OSDN Git Service

* cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
2
3         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
4         (DECL_SAVED_INLINE): Rename to ...
5         (DECL_DEFERRED_FN): ... this.
6         (in_function_p): Remove declaration.
7         (mark_inline_for_output): Rename to ... 
8         (defer_fn): ... this.
9         * decl.c (finish_function): Adjust call to mark_inline_for_output.
10         (in_function_p): Remove definition.
11         * decl2.c (saved_inlines): Rename to ...
12         (deferred_fns): ... this.
13         (saved_inlines_used): Rename to ...
14         (deferred_fns_used): ... this.
15         (mark_inline_for_output): Rename to ...
16         (defer_fn): ... this.
17         (finish_file): Adjust accordingly.
18         (init_decl2): Likewise.
19         * lex.c (cons_up_default_function): Likewise.
20         * pt.c (mark_decl_instantiated): Likewise.
21         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
22         circumstances.
23         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
24         * semantics.c (expand_body): Defer more functions.
25
26 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
27
28         * rtti.c (dfs_class_hint_mark): New static function.
29         (dfs_class_hint_unmark): New static function.
30         (class_hint_flags): Use them.
31
32 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
33
34         * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
35
36 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
37
38         * cp-tree.h (instantiate_decl): Change prototype.
39         * decl2.c (mark_used): Adjust call.
40         * optimize.c (inlinable_function_p): Adjust handling of templates.
41         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
42         (do_type_instantiation): Likewise.
43         (instantiate_decl): Defer more templates.
44         (instantiate_pending_templates): Adjust logic to handle inline
45         friend functions.
46
47         * Makefile.in (GGC_H): New variable.  Use it throughout in place
48         of ggc.h.
49         
50         * call.c: Don't include obstack.h.  Include ggc.h.
51         (obstack_chunk_alloc): Don't define.
52         (obstack_chunk_free): Likewise.
53         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
54         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
55         (pop_switch): Free it.
56
57         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
58
59         * dump.c (dequeue_and_dump): Don't try to print the bit_position
60         if we don't have a DECL_FIELD_OFFSET.
61
62 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
63
64         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
65         special_function_p.
66
67 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
68
69         * cfns.gperf (hash, libc_name_p): Prototype.
70
71         * rtti.c (build_dynamic_cast_1): Constification.
72
73         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
74
75         * semantics.c (deferred_type_access_control): Prototype.
76
77 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
78
79         Correct many new ABI issues regarding vbase and vcall offset
80         layout.
81         * cp-tree.h (BINFO_VTABLE): Document.
82         (struct lang_type): Tweak formatting.
83         (BINFO_PRIMARY_BINFO): Add to documentation.
84         (CLASSTYPE_VSIZE): Fix typo in comment.
85         (CLASSTYPE_VBASECLASSES): Update documentation.
86         (BINFO_VBASE_MARKED): Remove.
87         (SET_BINFO_VBASE_MARKED): Likewise.
88         (CLEAR_BINFO_VBASE_MARKED): Likewise.
89         (BINFO_FIELDS_MARKED): Remove.
90         (SET_BINFO_FIELDS_MARKED): Likewise.
91         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
92         (enum access_kind): New enumeration.
93         (num_extra_vtbl_entries): Remove declaration.
94         (size_extra_vtbl_entries): Likewise.
95         (get_vtbl_decl_for_binfo): New function.
96         (dfs_vbase_unmark): Remove declaration.
97         (mark_primary_bases): Likewise.
98         * class.c (SAME_FN): Remove.
99         (struct vcall_offset_data_s): Move definition.
100         (build_vbase_pointer): Use `build', not `build_binary_op', to
101         access the vbase pointer under the new ABI.
102         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
103         (build_primary_vtable): Likewise.
104         (dfs_mark_primary_bases): Move here from search.c.
105         (mark_primary_bases): Likewise.
106         (determine_primary_bases): Under the new ABI, don't make a base
107         class a primary base just because we don't yet have any virtual
108         functions.
109         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
110         (num_vfun_entries): Remove.
111         (dfs_count_virtuals): Likewise.
112         (num_extra_vtbl_entries): Likewise.
113         (size_extra_vtbl_entries): Likewise.
114         (layout_virtual_bases): Iterate in inheritance graph order under
115         the new ABI.
116         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
117         indicate that a vfield is present.
118         (init_class_processing): Initialize access_public_node, etc., from
119         ak_public, etc.
120         (get_vtbl_decl_for_binfo): New function.
121         (dump_class_hierarchy_r): Likewise.
122         (dump_class_hierarchy): Use it.
123         (finish_vtbls): Build the vtbls in inheritance graph order.
124         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
125         (initialize_vtable): Use get_vtbl_decl_for_binfo.
126         (accumulate_vtbl_inits): Add comments explaining why a pre-order
127         walk is required.
128         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
129         where the vptr points, even for primary vtables.
130         (build_vtbl_initializer): Adjust handling of vbase and vcall
131         offsets.
132         (build_vcall_and_vbase_vtable_entries): New function.
133         (dfs_build_vbase_offset_vtbl_entries): Remove.
134         (build_vbase_offset_vtbl_entries): Reimplement.
135         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
136         were already handled in a primary base class vtable.
137         (build_vcall_offset_vtbl_entries): Adjust.
138         (build_rtti_vtbl_entries): Adjust.
139         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
140         * init.c (expand_virtual_init): Simplify.
141         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
142         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
143         * search.c (BINFO_ACCESS): New macro.
144         (SET_BINFO_ACCESS): Likewise.
145         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
146         (access_in_type): Likewise.
147         (dfs_accessible_p): Likewise.
148         (protected_accessible_p): Likewise.
149         (lookup_fnfields_1): Adjust documentation.
150         (dfs_mark_primary_bases): Move to class.c
151         (mark_primary_bases): Likewise.
152         (dfs_vbase_unmark): Remove.
153         (virtual_context): Use BINFO_FOR_VBASE.
154         (dfs_get_vbase_types): Simplify.
155         (dfs_build_inheritance_graph_order): New function.
156         (get_vbase_types): Use it.
157         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
158
159         * tinfo.cc (get_vbase_offset): New function.
160         (__vmi_class_type_info::do_find_public_src): Use it.
161         (__vmi_class_type_info::do_dyncast): Likewise.
162         (__vmi_class_type_info::do_upcast): Likewise.
163         
164 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
165
166         * lang-specs.h: Pass -fno-show-column to the preprocessor.
167
168 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
169
170         * rtti.c (class_hint_flags): Rename flags.
171         (class_initializer): Remove flags.
172         (synthesize_tinfo_var): Combine offset and flags. Add flags
173         for __vmi_class_type_info.
174         (create_tinfo_types): Remove flags from __class_type_info and
175         __si_class_type_info. Merge flags and offset from
176         base_class_type_info.
177         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
178         (__base_class_info::is_virtual_p): Adjust.
179         (__base_class_info::is_public_p): Adjust.
180         (__base_class_info::offset): New accessor.
181         (__class_type_info::details): Remove member.
182         (__class_type_info::__class_type_info): Lose details.
183         (__class_type_info::detail_masks): Remove.
184         (__si_class_type_info::__si_class_type_info): Lose details.
185         (__vmi_class_type_info::details): New member.
186         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
187         (__vmi_class_type_info::detail_masks): New member.
188         * tinfo.cc (__class_type_info::do_upcast): Initialize result
189         with unknown_details_mask.
190         (__vmi_class_type_info::do_find_public_src): Adjust
191         (__vmi_class_type_info::do_dyncast): Adjust.
192         (__vmi_class_type_info::do_upcast): Set result details, if
193         needed. Adjust.
194         (__dynamic_cast): Temporarily #if out optimization.
195
196 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
197
198         * rtti.c (get_tinfo_decl): Mark used.
199         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
200         mark as dealt with, if we output it.
201
202 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
203
204         * class.c: Reorganize to put virtual function table initialization
205         machinery at the end of the file.
206
207 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
208
209         * class.c (finish_struct): Use bitsize_zero_node.
210         * pt.c (instantiate_class_template): Likewise.
211
212 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
213
214         Put RTTI entries at negative offsets in new ABI.
215         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
216         vbase offset at index -3, not -1.
217         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
218         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
219         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
220         (build_rtti_vtbl_entries): New function.
221         (set_rtti_entry): Remove.
222         (build_primary_vtable): Don't use it.
223         (build_secondary_vtable): Likewise.
224         (start_vtable): Remove.
225         (first_vfun_index): New function.
226         (set_vindex): Likewise.
227         (add_virtual_function): Don't call start_vtable.  Do call
228         set_vindex.
229         (set_primary_base): Rename parameter.
230         (determine_primary_base): Likewise.
231         (num_vfun_entries): Don't use skip_rtti_stuff.
232         (num_extra_vtbl_entries): Include RTTI information.
233         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
234         (skip_rtti_stuff): Remove.
235         (dfs_modify_vtables): Don't use it.
236         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
237         (layout_nonempty_base_or_field): Update size handling.
238         (create_vtable_ptr): Tweak.
239         (layout_class_type): Adjust parameter names.
240         (finish_struct_1): Simplify.
241         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
242         (skip_rtti_stuff): Remove.
243         (first_vfun_index): New function.
244         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
245         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
246         (marked_vtable_pathp): Declare.
247         (unmarked_vtable_pathp): Likewise.
248         * error.c (dump_expr): Use first_vfun_index to calculate vtable
249         offsets.
250         * rtti.c (build_headof): Look for RTTI at negative offsets.
251         (get_tinfo_decl_dynamic): Likewise.
252         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
253         here.
254         (create_pseudo_type_info): Do it here instead.  Adjust so that
255         vptr points at first virtual function.
256         * search.c (marked_vtable_pathp): Make it global.
257         (unmarked_vtable_pathp): Likewise.
258         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
259         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
260         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
261         (get_pure_virtuals): Likewise.
262         (expand_upcast_fixups): Likewise.
263         * tree.c (debug_binfo): Likewise.
264         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
265         negative offset.
266         
267 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
268
269         * class.c (check_field_decl): Fix typo.
270         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
271         (check_methods): Likewise.
272         (check_field_decls): Likewise.
273         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
274         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
275         Use DECL_RESULT_FLD, not DECL_RESULT.
276         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
277         * lex.c (identifier_type): Likewise.
278         * pt.c (determine_specialization, lookup_template_class): Likewise.
279         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
280         (resolve_overloaded_unification, more_specialized): Likewise.
281         * semantics.c (finish_member_declaration): Likewise.
282         * typeck.c (build_x_function_call): Likewise.
283         
284 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
285
286         * class.c (layout_empty_base): Handle empty bases with non-byte
287         alignment.
288         (build_base_field): Likewise.
289         (layout_virtual_bases): Likewise.
290
291         * class.c (finish_struct_1): Fix typo in this change:
292         
293         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
294
295 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
296
297         * decl.c (grokdeclarator): Count partial specializations when
298         keeping track of how many template classes have been seen.
299
300         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
301         
302 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
303
304         * class.c (build_vbase_pointer_fields): layout_field now place_field.
305         (get_vfield_offset): Use byte_position.
306         (set_rtti_entry): Set OFFSET to ssizetype zero.
307         (get_binfo_offset_as_int): Deleted.
308         (dfs_record_base_offsets): Use tree_low_cst.
309         (dfs_search_base_offsets): Likewise.
310         (layout_nonempty_base_or_field): Reflect changes in RLI format
311         and call byte_position.
312         (layout_empty_base): Convert offset to ssizetype.
313         (build_base_field): use rli_size_unit_so_far.
314         (dfs_propagate_binfo_offsets): Do computation in proper type.
315         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
316         (layout_class_type): Reflect changes in RLI names and fields.
317         (finish_struct_1): Set DECL_FIELD_OFFSET.
318         * dump.c (dequeue_and_dump): Call bit_position.
319         * expr.c (cplus_expand_constant): Use byte_position.
320         * rtti.c (expand_class_desc): Use bitsize_one_node.
321         * typeck.c (build_component_addr): Use byte_position and don't
322         special case for zero offset.
323         
324 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
325
326         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
327         
328         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
329         tinfo object.
330         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
331         vtable.
332
333 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
334
335         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
336         DECL_P macros.
337         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
338         make_typename_type, check_initializer, cp_finish_decl,
339         xref_tag): Likewise.
340         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
341         decl_namespace, arg_assoc_template_arg, arg_assoc,
342         validate_nonmember_using_decl, do_class_using_decl): Likewise.
343         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
344         args_to_string): Likewise.
345         * friend.c (is_friend): Likewise.
346         * lex.c (note_got_semicolon, note_list_got_semicolon,
347         is_global): Likewise.
348         * method.c (build_overload_nested_name, build_overload_value,
349         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
350         * parse.y (typename_sub, typename_sub1): Likewise.
351         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
352         process_partial_specialization, convert_template_argument,
353         template_args_equal, add_pending_template, lookup_template_class,
354         for_each_template_parm_r, maybe_fold_nontype_arg,
355         tsubst, instantiate_template, type_unification_real, unify,
356         instantiate_pending_templates, set_mangled_name_for_template_decl):
357         Likewise.
358         * repo.c (repo_get_id, repo_template_used): Likewise.
359         * search.c (lookup_field_1): Likewise.
360         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
361         * xref.c (classname): Likewise.
362         
363 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
364
365         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
366         (CANONICAL_BINFO): New macro.
367         (BINFO_NEW_VTABLE_MARKED): Use it.
368         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
369         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
370         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
371         not TREE_TYPE.
372         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
373         (build_secondary_vtable): Likewise.
374         (dfs_finish_vtbls): Likewise.
375         (dfs_accumulate_vtbl_inits): Likewise.
376         (accumulate_vtbl_inits): New function.
377         (finish_vtbls): Make sure that virtual bases come after
378         non-virtual bases in the vtable group.
379         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
380         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
381         * search.c (struct vbase_info): Move definition.
382         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
383         (unmarked_new_vtable_p): Likewise.
384         (dfs_mark_vtable_path): Remove.
385         (dfs_mark_new_vtable): Remove.
386         (dfs_unmark_new_vtable): Likewise.
387         (dfs_clear_search_slot): Likewise.
388         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
389         (dfs_clear_vbase_slots): Likewise.
390         (init_vbase_pointers): LIkewise.
391         
392 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
393
394         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
395         SIZETYPE to a non-SIZETYPE.
396
397 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
398
399         * class.c (layout_virtual_bases): Adjust names in conditionally
400         compiled code.
401         
402         * class.c (record_base_offsets): New function.
403         (layout_conflict_p): Likewise.
404         (layout_nonempty_base_or_field): Use it.
405         (layout_empty_base): New function.
406         (build_base_field): Use it.
407         (build_base_fields): Update comment.
408         (layout_virtual_bases): Fold in a little code form
409         layout_basetypes.  Use layout_empty_base.
410         (layout_basetypes): Remove.
411         (end_of_class): New function.
412         (layout_class_type): Use it.  Adjust.
413
414         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
415         (fntype_p): Remove.
416         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
417         comment. 
418         (dfs_skip_nonprimary_vbases_markedp): Likewise.
419         * typeck.c (fntype_p): Remove.
420
421         * cp-tree.h (TI_SPEC_INFO): Remove.
422         (CLASSTYPE_TI_SPEC_INFO): Likewise.
423         * pt.c (process_partial_specialization): Likewise.
424
425         * class.c (build_base_field): Fix thinko in computation of binfo
426         offsets.
427
428         * tree.c (mark_local_for_remap_p): Mark variables declared in
429         TARGET_EXPRs as well.
430
431 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
432
433         * typeck.c (require_complete_type, complete_type,
434         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
435         build_array_ref, convert_arguments, pointer_diff,
436         build_x_unary_op, build_unary_op, build_c_cast,
437         build_modify_expr): Use COMPLETE_TYPE_P etc.
438         * call.c (is_complete, convert_like_real,
439         build_new_method_call): Likewise.
440         * class.c (build_vbase_pointer_fields, check_bases,
441         build_base_field, finish_struct_1, pushclass): Likewise.
442         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
443         * decl.c (maybe_process_template_type_declaration, pushtag,
444         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
445         layout_var_decl, check_initializer, cp_finish_decl,
446         grokdeclarator, require_complete_types_for_parms,
447         grok_op_properties, xref_tag, xref_basetypes,
448         check_function_type): Likewise.
449         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
450         * friend.c (do_friend): Likewise.
451         * init.c (build_offset_ref): Likewise.
452         * parse.y (structsp): Likewise.
453         * pt.c (maybe_process_partial_specialization,
454         tsubst_friend_function, instantiate_class_template, tsubst,
455         do_type_instantiation, instantiate_pending_templates): Likewise.
456         * repo.c (repo_get_id): Likewise.
457         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
458         synthesize_tinfo_var, emit_support_tinfos): Likewise.
459         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
460         * semantics.c (begin_class_definition): Likewise.
461         * tree.c (build_cplus_method_type): Likewise.
462         * typeck2.c (digest_init, build_functional_cast,
463         add_exception_specifier): Likewise.
464         * parse.h, parse.c: Regenerated.
465
466 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
467
468         * inc/cxxabi.h: New header file. Define new-abi entry points.
469         (__pointer_type_info::target): Rename member to ...
470         (__pointer_type_info::type): ... here.
471         (__base_class_info::type): Rename member to ...
472         (__base_class_info::base): ... here.
473         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
474         * cp-tree.h (CPTI_ABI): New global tree enumeration.
475         (abi_node): New global tree node.
476         * decl.c (abi_node): Document.
477         (init_decl_processing): Initialize abi_node.
478         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
479         (get_vmi_pseudo_type_info): Likewise.
480         (create_tinfo_types): Likewise.
481         (emit_support_tinfos): Likewise.
482         * tinfo.h (cxxabi.h): Include for new-abi.
483         Move rtti class definitions to new header file.
484         * tinfo.cc (abi): Use the namespace.
485         (std): Move new abi rtti classes from here ...
486         (__cxxabiv1): ... to here.
487         * tinfo2.cc (cxxabi.h): Include for new-abi.
488         Move rtti class definitions to new header file.
489         (std): Move new abi rtti classes from here ...
490         (__cxxabiv1): ... to here.
491         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
492         namespace.
493
494 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
495             Jason Merrill  <jason@casey.cygnus.com>
496
497         * method.c (build_overload_int): Use host_integerp.
498
499 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
500
501         * init.c (build_offset_ref): Handle the case of a templated member
502         function.
503     
504 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
505
506         * except.c (expand_exception_blocks): Clear catch_clauses_last.
507
508 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
509
510         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
511         * class.c (check_bitfield_decl): Turn illegal bitfields into
512         non-bitfields.
513         (dfs_propagate_binfo_offsets): Adjust for new size_binop
514         semantics.
515         (dfs_offset_for_unshared_vbases): Likewise.
516         * cvt.c (cp_convert_to_pointer): Convert NULL to a
517         pointer-to-member correctly under the new ABI.
518         * expr.c (cplus_expand_constant): Don't use cp_convert when
519         turning an offset into a pointer-to-member.
520         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
521         when dereferencing them under the new ABI.
522         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
523         of pointers-to-members under the new ABI.
524         
525         * class.c (check_bitfield_decl): Remove restriction on really long
526         bitfields.
527         (layout_class_type): Implement new ABI handling of bitfields
528         longer than their types.
529
530 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
531
532         * parse.y (extdefs): Call ggc_collect.
533         * parse.c: Regenerated.
534
535 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
536
537         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
538         (note_name_declared_in_class): Use OVL_CURRENT to get at a
539         potential overload.
540
541 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
542
543         * class.c (build_vbase_path): Use integer_zerop.
544         (build_vtable_entry): Use tree_low_cst.
545         (get_vfield_offset): Use bit_position.
546         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
547         Use tree_low_cst.
548         (check_bitfield_decl): Set DECL_SIZE using convert.
549         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
550         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
551         Use tree_low_cst.
552         (finish_struct_1): Use bit_position.
553         (dump_class_hierarchy): Use tree_low_cst.
554         * cp-tree.h (min_precision): Add declaration.
555         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
556         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
557         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
558         * expr.c (cplus_expand_constant): Use bit_position.
559         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
560         * rtti.c (get_base_offset): Use bit_position.
561         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
562         host_integerp, and tree_low_cst.
563         (pointer_int_sum): Use integer_zerop.
564         (build_component_addr): Use bit_position.
565         
566 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
567
568         * typeck.c (require_complete_type): Don't assume size_zero_node.
569         (complete_type_or_else): Likewise.
570
571 2000-03-16  Steven Grady <grady@digitaldeck.com>
572             Jason Merrill  <jason@casey.cygnus.com>
573
574         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
575
576 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
577
578         * decl2.c (grokfield): Bail out if type is error_mark_node.
579
580 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
581
582         * tinfo2.cc (__ptr_to_member_data): Rename to ...
583         (__pointer_to_member_data): ... here. Adjust.
584         * rtti.c (create_tinfo_types): Adjust.
585
586 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
587
588         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
589         * decl.c (ref_desc_type_node): Undocument.
590         * rtti.c (ptr_ref_initializer): Rename to ...
591         (ptr_initializer): ... here. Adjust comments.
592         (ptmd_initializer): Fix comment thinko.
593         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
594         (create_tinfo_types): Remove ref_desc_type_node init.
595         * tinfo2.cc (__reference_type_info): Remove.
596
597 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
598
599         * decl.c (cp_finish_decl): Remove obsolete comment.
600         
601         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
602
603 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
604
605         * cp-tree.h: Tweak documentation.
606         * class.c (build_vbase_pointer_fields): Layout the fields, too.
607         (avoid_overlap): Remove.
608         (get_binfo_offset_as_int): New function.
609         (dfs_serach_base_offsets): Likewise.
610         (layout_nonempty_base_or_field): Likewise.
611         (build_base_field): Layout fields here.  Avoid placing two objects
612         of the same type at the same address, under the new ABI.
613         (build_base_fields): Adjust accordingly.
614         (create_vtable_ptr): Return the new field, but don't attach it to
615         TYPE_FIELDS.
616         (remove_base_field): Remove.
617         (remove_base_fields): Remove.
618         (layout_basetypes): Adjust accordingly.
619         (layout_class_type): Call layout_field for each field, rather than
620         just making a wholesale call to layout_type.
621
622 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
623
624         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
625
626 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
627
628         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
629
630         * except.c (dtor_nothrow): New fn.
631         (do_pop_exception): Use it.  Take type parm.
632         (push_eh_cleanup): Take type parm.
633         (expand_start_catch_block): Pass it.
634         (build_eh_type_type_ref): Accept null type.
635
636 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
637
638         * cp-tree.h (revert_static_member_fn): Change prototype.
639         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
640         (grok_op_properties): Likewise.
641         (start_function): Likewise.
642         (revert_static_member_fn): Simplify.
643         * pt.c (check_explicit_specialization): Adjust call to
644         revert_static_member_fn.
645
646 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
647
648         * cp-tree.h (scope_kind): New type.
649         (tmpl_spec_kind): Likewise.
650         (declare_pseudo_global_level): Remove.
651         (pseudo_global_level_p): Rename to template_parm_scope_p.
652         (pushlevel): Remove declaration.
653         (begin_scope): New function.
654         (finish_scope): Likewise.
655         (current_tmpl_spec_kind): Likewise.
656         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
657         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
658         Add template_spec_p.
659         (toplevel_bindings_p): Adjust.
660         (declare_pseudo_global_level): Remove.
661         (pseudo_global_level_p): Rename to template_parm_scope_p.
662         (current_tmpl_spec_kind): New function.
663         (begin_scope): Likewise.
664         (finish_scope): Likewise.
665         (maybe_push_to_top_level): Adjust.
666         (maybe_process_template_type_declaration): Likewise.
667         (pushtag): Likewise.
668         (pushdecl_nonclass_level): Likewise.
669         (lookup_tag): Likewise.
670         (grokfndecl): Handle member template specializations.  Share
671         constructor and non-constructor code.
672         * decl2.c (check_classfn): Handle member template specializations.
673         * pt.c (begin_template_parm_list): Use begin_scope.
674         (begin_specialization): Likewise.
675         (end_specialization): Likewise.
676         (check_explicit_specialization): Use current_tmpl_spec_kind.
677         Handle member template specializations.
678         (end_template_decl): Use finish_scope.  Remove call to
679         get_pending_sizes.
680         (push_template_decl_real): Remove bogus error message.
681         (tsubst_decl): Fix typo in code contained in comment.
682         (instantiate_template): Handle member template specializations.
683         (most_general_template): Likewise.
684         
685 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
686
687         * lex.c (whitespace_cr): Compress consecutive calls to warning().
688         (do_identifier): Ditto for error().
689
690         * pt.c (convert_nontype_argument): Ditto for cp_error().
691         (convert_template_argument): Ditto for cp_pedwarn().
692
693 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
694
695         * exception.cc (__check_null_eh_spec): New fn.
696         * except.c (expand_end_eh_spec): Call it if the spec is throw().
697
698 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
699
700         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
701         * except.c (expand_end_eh_spec): Add the return type.
702         * rtti.c (throw_bad_cast): Add the parmtypes.
703         (throw_bad_typeid): Likewise.
704
705         * semantics.c (expand_stmt): Only leave out rtl for unused
706         artificials, and set DECL_IGNORED_P on them as well.
707         * decl.c (wrapup_globals_for_namespace): Likewise.
708
709 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
710
711         * decl.c (maybe_commonize_var): Skip all artificial decls.
712         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
713
714 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
715
716         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
717         * cp-tree.h: Declare flag_enforce_eh_specs.
718         * decl.c (store_parm_decls, finish_function): Check it.
719
720         C library functions don't throw.
721         * Makefile.in (cfns.h): New target.
722         (except.o): Depend on it.
723         * Make-lang.in (cc1plus): Depend on cfns.gperf.
724         * cfns.gperf: New file.
725         * cfns.h: Generated.
726         * except.c: Include it.
727         (nothrow_libfn_p): New fn.
728         * decl.c (grokfndecl): Use it.
729         * cp-tree.h: Declare it.
730         
731         * decl.c (push_overloaded_decl_1, auto_function, 
732         define_function): Lose.
733         (build_library_fn_1): New static fn.
734         (builtin_function): Use it.
735         (get_atexit_node): Use build_library_fn_ptr.
736         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
737         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
738         push_void_library_fn, push_throw_library_fn): New fns.
739         * cp-tree.h: Declare them.
740         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
741         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
742         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
743         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
744         * rtti.c (build_runtime_decl): Lose.
745         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl, 
746         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
747         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
748
749         * call.c (build_call): Remove result_type parm.
750         Call mark_used on unused artificial fns.
751         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
752
753 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
754
755         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
756         appropriate.
757         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
758         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
759         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
760         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
761         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
762         expand_generic_desc): Likewise.
763
764 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
765
766         * exception.cc (__cp_pop_exception): Cleanup the original object.
767
768 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
769
770         * decl.c (grok_op_properties): Merge conversion to void warning
771         with other silly op warnings.
772
773 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
774
775         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
776         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
777
778 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
779
780         * decl.c (cp_make_fname_decl): New function.
781         (wrapup_globals_for_namespace): Don't emit unused static vars.
782         (init_decl_processing): Remove comment about use of
783         array_domain_type. Set make_fname_decl.
784         (cp_finish_decl): Remove __FUNCTION__ nadgering.
785         * semantics.c (begin_compound_stmt): Remove
786         current_function_name_declared flagging.
787         (expand_stmt): Don't emit unused local statics.
788         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
789         specially.
790
791 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
792
793         * typeck.c (convert_for_assignment): Don't look at array
794         initializer.
795         * call.c (convert_like_real): Likewise. 
796
797 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
798
799         Add initial support for '\uNNNN' specifier.
800         * lex.c (read_ucs): New fn.
801         (readescape, skip_white_space): Call it.
802         (is_extended_char, is_extended_char_1): New fns.
803         (utf8_extend_token): New fn, #if 0'd out.
804         (real_yylex): Treat extended chars like letters.
805
806         * search.c (note_debug_info_needed): Walk the bases even if we 
807         weren't deferring the type itself.
808
809 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
810
811         * decl2.c (finish_objects): Constify a char*.
812
813         * method.c (emit_thunk): Likewise.
814
815 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
816
817         * typeck.c (dubious_conversion_warnings): Look through
818         REFERENCE_TYPE.
819
820 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
821
822         * class.c (dfs_modify_vtables): I is now unsigned.
823         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
824         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
825         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
826         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
827         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
828         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
829         Call integer_all_onesp.
830         * typeck2.c (process_init_constructor): Use compare_tree_int.
831
832         * lang-specs.h (as): Don't call if -syntax-only.
833
834 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
835
836         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
837         RTL_EXPR_HAS_NO_SCOPE after all.
838
839 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
840
841         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
842         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
843         RTL_EXPR_HAS_NO_SCOPE.
844
845         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
846         later.
847         
848         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
849
850 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
851
852         * call.c (convert_like): Macrofy.
853         (convert_like_with_context): New macro.
854         (convert_like_real): Renamed from convert_like.  Add calling
855         context parameters, for diagnostics. Add recursive flag.  Call 
856         dubious_conversion_warnings for outer conversion.
857         (build_user_type_conversion): Use convert_like_with_context.
858         (build_over_call): Likewise. Don't warn about dubious
859         conversions here. Adjust convert_default_arg calls.
860         (convert_default_arg): Add context parameters for diagnostics.
861         Pass throught to convert_like_with_context.
862         * cp-tree.h (convert_default_arg): Add context parameters.
863         (dubious_conversion_warnings): Prototype new function.
864         * typeck.c (convert_arguments): Adjust convert_default_arg call.
865         (dubious_conversion_warnings): New function, broken
866         out of convert_for_assignment. 
867         (convert_for_assignment): Adjust.
868
869 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
870
871         * decl2.c (key_method): Break out from...
872         (import_export_vtable, import_export_class): ...here.
873
874         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
875         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
876
877         * search.c (note_debug_info_needed, dfs_debug_mark, 
878         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
879         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
880
881 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
882
883         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
884         typos.
885
886 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
887
888         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
889         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
890         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
891         (lang_type): Split gets_new into has_new and has_array_new.
892         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
893         (TYPE_GETS_NEW): Split into ...
894         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
895         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
896         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
897         (build_op_new_call): Don't declare.
898         (build_new_1): Likewise.
899         * call.c (build_op_new_call): Remove.
900         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
901         instead of TYPE_NEEDS_DESTRUCTOR.
902         (finish_struct_bits): Likewise.
903         (add_implicitly_declared_members): Likewise.
904         (check_field_decl): Likewise.
905         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
906         correctly under the new ABI.
907         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
908         instead of TYPE_NEEDS_DESTRUCTOR.
909         (initialize_local_var): Likewise.
910         (destroy_local_var): Likewise.
911         (cp_finish_decl): Likewise.
912         (register_dtor_fn): Likewise.
913         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
914         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
915         TYPE_VEC_DELETE_TAKES_SIZE here.
916         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
917         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
918         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
919         (finish_destructor_body): Likewise.
920         (maybe_build_cleanup_1): Likewise.
921         * decl2.c (do_static_destruction): Likewise.
922         * init.c (build_new_1): Make it static.
923         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
924         (expand_cleanup_for_base): Likewise.
925         (get_cookie_size): New function.
926         (build_new_1): Handle array-new cookies correctly under the new
927         ABI.
928         (build_vec_delete_1): Likewise.
929         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
930         (build_delete): Likewise.
931         (build_vec_delete): Handle array-new cookies correctly under the new
932         ABI.
933         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
934         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
935         TYPE_HAS_ARRAY_NEW_OPERATOR.
936         * ptree.c (print_lang_type): Check them.
937         * search.c (context_for_name_lookup): Fix typo in comment.
938         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
939         * tree.c (break_out_cleanups): Likewise.
940         (build_cplus_array_test_1): Likewise.
941         (cp_build_qualified_type_real): Likewise.
942         * typeck.c (complete_type): Likewise.
943         
944         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
945         the command-line, not the end.
946         
947 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
948
949         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
950
951 2000-03-02  Tom Tromey  <tromey@cygnus.com>
952
953         * cp-tree.h (build_java_class_ref): Declare.
954         * init.c (build_java_class_ref): No longer static.
955         * except.c (expand_throw): Generate a Java-style `throw' if the
956         thrown object is a "Java" object.
957         (initialize_handler_parm): Generate a Java-style lookup of
958         exception info if the caught object is a "Java" object.
959         (catch_language, catch_language_init): New globals.
960         (decl_is_java_type): New function.
961         (expand_start_catch_block): Don't call push_eh_info() or
962         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
963         class reference to build_catch_block.
964
965 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
966
967         * typeck.c (comptypes): Treat sizetype like its language equivalent.
968
969 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
970
971         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
972         to merge reference/pointer code and fix incorrect warnings.
973
974 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
975
976         * search.c (protected_accessible_p): Use context_for_name_lookup.
977
978         * init.c (construct_virtual_bases): Fix thinko.
979         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
980
981 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
982
983         * decl.c (current_function_decl): Move to toplev.c.
984
985 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
986
987         * pt.c (fn_type_unification): Unify return type, whenever
988         provided.
989         (get_bindings_real): Only pass return type when necessary.
990         Remove explicit return type check.
991         * class.c (resolve_address_of_overloaded_function): Pass desired
992         return type to fn_type_unification.
993
994 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
995
996         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
997         DECL_FIELD_SIZE.
998         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
999         DECL_FIELD_SIZE.
1000         * rtti.c (expand_class_desc): Likewise.
1001         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
1002         (THUNK_VCALL_OFFSET): Likewise.
1003         (THUNK_DELTA): Reflect changes in ../tree.h.
1004
1005 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
1006
1007         * search.c (protected_accessible_p): Also allow the access if
1008         the member is public in DERIVED.  Lose TYPE parm.
1009         (friend_accessible_p): Lose TYPE parm.
1010         (accessible_p): Adjust.
1011
1012 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1013
1014         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
1015         on things that are not sizes; ssize_binop deleted.
1016         Call size_diffop when appropriate.
1017         (dfs_build_vcall_offset_vtbl_entries): Likewise.
1018         (build_primary_vtable, build_secondary_vtable): Likewise.
1019         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
1020         Variable I is HOST_WIDE_INT.
1021         (get_vfield_offset): Pass proper types to size_binop.
1022         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
1023         (finish_struct_1): Likewise.
1024         (skip_rtti_stuff): Arg N is now pointer to signed.
1025         (layout_class_type): Use size_zero_node.
1026         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
1027         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
1028         * decl.c (complete_arry_type): Pass proper types to size_binop.
1029         (xref_basetypes): BINFO_OFFSET is sizetype.
1030         * error.c (dump_expr): Don't use size_binop non-sizes.
1031         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
1032         * init.c (construct_virtual_bases): Fix type error.
1033         (build_vec_delete_1): Pass proper type to size_binop and don't
1034         fold result.
1035         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
1036         * rtti.c (get_base_offset): Pass proper type to size_binop.
1037         * search.c (dfs_find_vbases): Fix type error.
1038         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
1039         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
1040         * tree.c (debug_binfo): Variable N is signed.
1041         Use HOST_WIDE_INT_PRINT_DEC.
1042         * typeck.c (comptypes): sizetype is same as equivalent integer type.
1043         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
1044         size_one_node and size_zero_node.
1045         (c_alignof): Use size_one_node.
1046         (build_component_addr): Pass proper types to size_binop.
1047         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
1048
1049 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
1050
1051         Implement class scope using-declarations for functions.
1052         * class.c (handle_using_decl): Call add_method for used functions.
1053         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
1054         (add_method): Used functions are hidden by local functions.
1055         (check_bases_and_members): Handle using-decls before finalizing
1056         CLASSTYPE_METHOD_VEC.
1057         * call.c (add_function_candidate): Add ctype parm; if non-zero,
1058         override the type of 'this' accordingly.
1059         (add_template_candidate, add_template_candidate_real): Add ctype parm.
1060         (convert_class_to_reference, build_user_type_conversion_1, 
1061         build_new_function_call, build_object_call, build_new_op,
1062         build_new_method_call): Pass ctype parm.
1063
1064         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
1065         the baselink.
1066         * call.c (convert_class_to_reference, build_user_type_conversion_1, 
1067         build_new_function_call, build_object_call, build_new_op,
1068         build_new_method_call, build_op_delete_call): Don't get basetype_path
1069         from a baselink.
1070         * typeck.c (build_component_ref): Likewise.
1071         * init.c (build_offset_ref): Likewise.
1072         (resolve_offset_ref): Don't call enforce_access.  
1073         Call build_scoped_ref.
1074         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
1075         would cause an error or if -pedantic.
1076         * class.c (alter_access): Lose binfo parm.
1077
1078 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
1079
1080         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
1081         types.
1082
1083 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
1084
1085         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
1086         pseudo_type_info creation into the std namespace
1087
1088 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
1089
1090         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
1091         (import_export_class): Remove declaration.
1092         * decl2.c (import_export_class): Make it static.
1093         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
1094         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
1095         EXPR_WITH_FILE_LOCATION.
1096         * lex.c (check_newline): Tweak filename/lineno setting.
1097         * semantics.c (begin_while_stmt): Fix typo in comment.
1098         
1099 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1100
1101         * lang-options.h (-fmessage-length=): Add missing option.
1102
1103         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
1104
1105 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
1106
1107         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
1108
1109 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
1110
1111         * optimize.c (expand_call_inline): Emit the return label before
1112         evaluating the return value.
1113
1114 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
1115
1116         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
1117         than duplicating functionality here.
1118         * optimize.c: Include input.h.
1119         (expand_call_inline): Use push_srcloc and pop_srcloc.
1120         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
1121         * parse.c: Regenerated.
1122         * Makefile.in (lex.o): Depend on input.h.
1123         (optimize.o): Likewise.
1124         
1125 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
1126
1127         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
1128         function type, rather than ICE.
1129
1130 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
1131
1132         * decl.c (grokdeclarator): Call decl_type_access_control.
1133         * parse.y (parse_end_decl): Don't call decl_type_access_control if
1134         decl is null.
1135
1136 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
1137
1138         * decl.c (decls_match): Remove obsolete static member nadgering.
1139
1140 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1141
1142         * decl.c (grokdeclarator): Change ANSI to ISO.
1143         * lex.c (consume_string, readescape, do_identifier): Likewise.
1144         (parse_float, real_yylex): Likewise.
1145         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
1146         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
1147         new_type_id, maybe_label_decls, simple_stmt, 
1148         for.init.statement): Likewise.
1149         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
1150         * semantics.c (finish_named_return_value): Likewise.
1151         * parse.c: Regenerate.
1152
1153 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
1154
1155         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
1156         (CPTI_CLASS_STAR_TYPE): Remove.
1157         (vtable_index_type): Likewise.
1158         (class_star_type_node): Remove.
1159         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
1160         (build_binary_op_nodefault): Remove.
1161         * call.c (build_new_op): Use build_binary_op instead of
1162         build_binary_op_nodefault.
1163         * decl.c (init_decl_processing): Remove class_star_type_node
1164         initialization.  Make delta_type_node ptrdiff_type_node under the
1165         new ABI.  Initialize vtable_index_type.
1166         (build_ptrmemfunc_type): Build different structures for the new
1167         ABI.
1168         (build_enumerator): Use build_binary_op instead of
1169         build_binary_op_nodefault.
1170         * method.c (build_overload_value): Mangle pointers-to-members
1171         appropriately under the new ABI.
1172         * typeck.c (build_array_ref): Use build_binary_op instead of
1173         build_binary_op_nodefault.
1174         (get_member_function_from_ptrfunc): Adjust for the new ABI.
1175         (build_binary_op_nodefault): Rename to ...
1176         (build_binary_op): ... this.  Remove old version.  Adjust for
1177         pointer-to-member comparisons under the new ABI.
1178         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
1179         (build_ptrmemfunc): Adjust for the new ABI.
1180         (expand_ptrmemfunc_cst): Likewise.
1181         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
1182         (pfn_from_ptrmemfunc): Adjust for the new ABI.
1183         
1184 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
1185
1186         * call.c (build_object_call): Compress consecutive calls to
1187         cp_error.
1188         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
1189         (build_op_delete_call): Adjust message formatting.
1190
1191         * class.c (check_bases): Compress consecutive calls to
1192         cp_pedwarn. 
1193         (finish_struct_anon): Say 'ISO C++'.
1194
1195         * decl.c (start_decl): Same here.
1196         (grok_reference_init): Likewise.
1197         (grokfndecl): Correct message formatting.
1198         (grokfndecl): Improve diagnostic.
1199         (check_static_variable_definition): Likewise. Say 'ISO C++'
1200         (compute_array_index_type): Say 'ISO C++'
1201         (create_array_type_for_decl): Compress consecutive calls to
1202         cp_error. 
1203         (grokdeclarator): Say 'ISO C++'
1204         (grok_op_properties): Likewise.
1205
1206         * decl2.c (delete_sanity): Clairify diagnostic.
1207         (check_member_template): Same here.
1208         (grok_function_init): Use consistent terminology.
1209
1210         * expr.c (do_case): Say 'ISO C++'
1211
1212         * friend.c (do_friend): Compress consecutive calls to warning.
1213         
1214 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
1215
1216         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
1217         * class.c (build_secondary_vtable): Reorganize.  Don't create a
1218         new vtable under the new ABI.
1219         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
1220         computing the size.
1221         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
1222         the initializing elements.
1223         (initialize_vtable): New function.
1224         (dfs_finish_vtbls): Use it.
1225         (dfs_accumulate_vtbl_inits): New function.
1226         (finish_vtbls): Merge primary and secondary vtables under the new
1227         ABI.
1228         (finish_struct_1): Remove redundant call to layout_vtable_decl.
1229         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
1230         aren't VAR_DECLs.
1231
1232         * class.c (build_vtable): New function, split out from ...
1233         (get_vtable_decl): ... here, and ...
1234         (build_secondary_vtable): ... here.
1235
1236         * pt.c (tsubst_decl): Fix formatting.
1237         
1238 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1239
1240         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
1241         (avoid_overlap, build_base_field): Likewise.
1242         (build_base_field, build_base_fields, is_empty_class): 
1243         Test DECL_SIZE with integer_zero.
1244         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
1245         * cp-tree.h (struct lang_type): New field size_unit.
1246         (CLASSTYPE_SIZE_UNIT): New macro.
1247         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
1248         (cp_finish_decl): Delete -Wlarger-than processing.
1249         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
1250         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
1251         * tree.c (make_binfo): binfo vector is one entry longer.
1252         (walk_tree): Walk DECL_SIZE_UNIT.
1253
1254 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
1255
1256         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
1257         comment.
1258         (build_vtable_entry): Don't assume all vtable entries are
1259         functions.
1260         (build_vtbl_initializer): Adjust accordingly.
1261         (get_vtable_decl): Fix formatting.
1262         
1263 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
1264
1265         * semantics.c (deferred_type_access_control): Walk the entire
1266         type_lookups list.
1267         (save_type_access_control): Rename from 
1268         initial_deferred_type_access_control.  Just remember the value.
1269         (decl_type_access_control): New fn.
1270         (begin_function_definition): Use deferred_type_access_control, after
1271         we've started the function.  Set type_lookups to error_mark_node.
1272         * parse.y (frob_specs, fn.def1): Adjust.
1273         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
1274         (parse_end_decl, parse_bitfield0, parse_method): New fns.
1275         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
1276         (after_type_component_declarator0): Likewise.
1277         (after_type_component_declarator): Likewise.
1278         (notype_component_declarator): Likewise.
1279         * cp-tree.h: Adjust.
1280
1281         * decl.c (redeclaration_error_message): Allow redeclaration of 
1282         namespace-scope decls.
1283
1284 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
1285
1286         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
1287
1288 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
1289
1290         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
1291         * decl2.c (grokclassfn): Likewise.
1292
1293         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
1294
1295         * decl2.c (lang_decode_option): Don't set default message length
1296         here.
1297         * lex.c (lang_init_options): Set it here.
1298
1299 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
1300
1301         Make DECL_CONTEXT mean the class in which a member function was
1302         declared, even for a virtual function.
1303         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
1304         (DECL_FRIEND_CONTEXT): New macro.
1305         (DECL_REAL_CONTEXT): Remove.
1306         (SET_DECL_FRIEND_CONTEXT): Likewise.
1307         (DECL_VIRTUAL_CONTEXT): Adjust.
1308         (DECL_CLASS_SCOPE_P): Use TYPE_P.
1309         (add_friends): Remove.
1310         (hack_decl_function_context): Likewise.
1311         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
1312         CP_DECL_CONTEXT.
1313         (build_over_call): Fix indentation.  Use DECL_CONTEXT
1314         instead of DECL_CLASS_CONTEXT.
1315         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
1316         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
1317         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
1318         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
1319         (build_base_field): Likewise.
1320         (finish_struct_1): Likewise.
1321         (build_self_reference): Likewise.
1322         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
1323         DECL_REAL_CONTEXT.
1324         (pushtag): Use decl_function_context, not
1325         hack_decl_function_context.
1326         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
1327         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
1328         (pushdecl): Remove bogus code.
1329         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
1330         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
1331         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
1332         Use decl_function_context, nothack_decl_function_context.
1333         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
1334         (grokdeclarator): Likewise.  Use decl_function_context, not
1335         hack_decl_function_context.
1336         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
1337         (start_function): Use DECL_FRIEND_CONTEXT, not
1338         DECL_CLASS_CONTEXT.  Use decl_function_context, not
1339         hack_decl_function_context.
1340         (finish_function): Use decl_function_context, not
1341         hack_decl_function_context.
1342         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
1343         DECL_CLASS_CONTEXT.
1344         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
1345         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
1346         (grokfield): Likewise.
1347         (finish_builtin_type): Likewise.
1348         (finish_vtable_vardec): Use decl_function_context, not
1349         hack_decl_function_context.
1350         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
1351         (start_static_initialization_or_destruction): Likewise.
1352         (finish_static_initialization_or_destruction): Likewise.
1353         (mark_used): Adjust logic for deciding when to synthesize methods.
1354         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
1355         DECL_REAL_CONTEXT.
1356         * error.c (dump_function_decl): Use DECL_CONTEXT, not
1357         DECL_CLASS_CONTEXT.
1358         * friend.c (is_friend): Likewise.
1359         (add_friends): Remove.
1360         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
1361         * lex.c (begin_definition_of_inclass_inline): Use
1362         decl_function_context, not hack_decl_function_context.
1363         (process_next_inline): Likewise.
1364         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
1365         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
1366         DECL_CLASSS_CONTEXT.
1367         (hack_identifier): Likewise.
1368         (synthesize_method):  Use decl_function_context, not
1369         hack_decl_function_context.
1370         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
1371         DECL_REAL_CONTEXT.
1372         (is_member_template): Use decl_function_context, not
1373         hack_decl_function_context.  Use DECL_CONTEXT, not
1374         DECL_CLASS_CONTEXT.
1375         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not 
1376         DECL_CLASS_CONTEXT.
1377         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
1378         DECL_REAL_CONTEXT.
1379         (push_template_decl_real): Likewise.
1380         (instantiate_class_template): Don't call add_friends.
1381         (tsubst_default_argument): Use DECL_CONTEXT, not
1382         DECL_REAL_CONTEXT.
1383         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
1384         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
1385         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
1386         DECL_CLASS_CONTEXT.
1387         * repo.c (repo_inline_used): Likewise.
1388         * search.c (current_scope): Adjust for new _CONTEXT macros.
1389         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
1390         DECL_REAL_CONTEXT.
1391         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
1392         (lookup_fnfields_here):Likewise.
1393         (check_final_overrider): Likewise.
1394         (init_vbase_pointers): Likewise.
1395         (virtual_context): Likewise.
1396         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
1397         (expand_body): Use decl_function_context, not
1398         hack_decl_function_context.
1399         * tree.c (hack_decl_function_context): Remove.
1400         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
1401         DECL_CLASS_CONTEXT.
1402         * typeck2.c (error_not_base_type): Likewise.
1403         
1404 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
1405
1406         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
1407
1408 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1409
1410         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
1411
1412 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
1413
1414         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
1415
1416 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
1417
1418         * decl2.c (lang_decode_option): Enable automatic line wrapping.
1419
1420 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
1421
1422         * parse.y (frob_specs): Split out...
1423         (parse_decl): From here.
1424         (fn.def2): Call initial_deferred_type_access_control.
1425         (after_type_component_declarator0): Call frob_specs.
1426         (notype_component_declarator0): Likewise.
1427         * search.c (friend_accessible_p): Nested classes are friends of their
1428         enclosing classes.
1429
1430 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
1431
1432         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
1433         used to create an implicit temporary.
1434
1435         * class.c (dfs_modify_vtables): Tweak calculation of functions to
1436         override.
1437
1438 2000-02-08  Nathan Sidwell  <nathan@acm.org>
1439
1440         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
1441         strip array element qualifiers too.
1442
1443 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
1444
1445         * decl.c (store_parm_decls): Don't build cleanups for parameters
1446         while processing_template_decl.
1447
1448 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
1449
1450         * cp-tree.h (struct saved_scope): Add incomplete field.
1451         (namespace_scope_incomplete): New macro.
1452         * decl.c (pushdecl): Use it.
1453         (hack_incomplete_structures): Use it.  See through artificial
1454         binding levels.
1455         (mark_saved_scope): Mark it.
1456
1457         Implement access control for nested types.
1458         * search.c (type_access_control): New fn.
1459         (accessible_p): Now we do perform access control for types.
1460         * semantics.c (deferred_type_access_control): New fn.
1461         (initial_deferred_type_access_control): New fn.
1462         (begin_function_definition): Call it.  Add lookups parm.
1463         * decl.c (struct binding_level): Add this_class field.
1464         (pushlevel_class): Set it.
1465         (mark_binding_level): Mark it.
1466         (lookup_name_real): Use it.  Call type_access_control.
1467         (mark_saved_scope): Mark lookups field.
1468         * cp-tree.h (flagged_type_tree): Add lookups field.
1469         (struct saved_scope): Add lookups field.
1470         (type_lookups): New macro.
1471         * parse.y (declmods): Now <ftype>.
1472         (parse_decl): Add lookups parm.  Call 
1473         initial_deferred_type_access_control.
1474         (lang_extdef): Clear type_lookups.
1475         (typed_declspecs, declmods, typespec): Set lookups field.
1476         (initdcl): Call deferred_type_access_control.
1477         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
1478         component_decl_1, named_parm): Adjust.
1479         * friend.c (is_friend): Nested classes are friends of their
1480         enclosing classes.
1481
1482         * class.c (currently_open_derived_class): New fn.
1483         * method.c (hack_identifier): Use it.
1484
1485         * lex.c (do_identifier): Remove obsolete code.
1486
1487         * parse.y (typed_typespecs): Propagate new_type_flag properly.
1488
1489 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
1490
1491         * tinfo.h: Remove apostrophes from C++ comment (xgettext
1492         thinks this file is plain C).
1493
1494 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1495
1496         * Makefile.in (call.o): Depend on $(EXPR_H).
1497
1498         * call.c: Include "expr.h".
1499
1500         * class.c (dump_class_hierarchy): Add prototype.
1501
1502         * search.c (dfs_get_pure_virtuals): Likewise.
1503
1504 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
1505
1506         * parse.y (simple_stmt): Allow :: token in asm parameter list.
1507         * parse.c: Rebuilt.
1508
1509 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
1510
1511         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
1512         Store it in DECL_FCONTEXT.
1513         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
1514
1515 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
1516
1517         * tinfo.h (old abi): #include "tconfig.h".
1518         * tinfo.cc (convert_to_base): Move into old abi section.
1519
1520 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
1521
1522         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
1523         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
1524         (BINFO_PRIMARY_BINFO): New macro.
1525         (BF_DELTA): Rename to ...
1526         (BV_DELTA): ... this.
1527         (BF_VCALL_INDEX): Rename to ...
1528         (BV_VCALL_INDEX): ... this.
1529         (BF_FN): Rename to ...
1530         (BV_FN): ... this.
1531         * class.c (build_vbase_path): Adjust for changes to reverse_path.
1532         (set_rtti_entry): Rename BF_ macros to BV_ variants.
1533         (modify_vtable_entry): Simplify.
1534         (add_virtual_function): Rename BF_ macros to BV_ variants.
1535         (build_vtable_initializer): Likewise.
1536         (get_class_offset_1): Remove.
1537         (dfs_get_class_offset): Likewise.
1538         (get_class_offset): Likewise.
1539         (dfs_find_final_overrider): New function.
1540         (find_final_overrider): Likewise.
1541         (modify_one_vtable): Remove.
1542         (dfs_find_base): New function.
1543         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
1544         find_final_overrider.
1545         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
1546         virtuals.
1547         (dfs_fixup_vtable_deltas): Remove.
1548         (override_one_vtable): Remove.
1549         (merge_overrides): Likewise.
1550         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
1551         unreal chilren of virtual bases.
1552         (finish_struct_1): Don't use merge_overrides.  Don't use
1553         dfs_fixup_vtable_deltas.
1554         * tree.c (reverse_path): Return a TREE_LIST, not a chain of 
1555         BINFOs.
1556         
1557 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
1558             Jason Merrill  <jason@yorick.cygnus.com>
1559
1560         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
1561
1562 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
1563
1564         * exception.cc (__throw_bad_typeid): Add missing std::.
1565
1566 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1567
1568         * cp-tree.h (make_thunk): PROTO -> PARAMS.
1569
1570 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
1571
1572         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
1573
1574         Runtime support for new-abi rtti.
1575         * inc/typeinfo (type_info::operator!=): Define in class.
1576         (type_info::before, type_info::name, type_info::operator==,
1577         type_info::operator!=): Define new ABI implementations.
1578         (type_info::is_pointer_p, type_info::is_function_p): Declare
1579         new virtual functions.
1580         (type_info::do_catch, type_info::do_upcast): Likewise.
1581         
1582         * tinfo.h (__base_class_info): Define new class.
1583         (__class_type_info): Likewise.
1584         (__si_class_type_info): Likewise.
1585         (__vmi_class_type_info): Likewise.
1586         (__dynamic_cast): Prototype.
1587         
1588         * tinfo.cc: Conditionalize old and new rtti mechanisms.
1589         (type_info::is_pointer_p): Define new function.
1590         (type_info::is_function_p): Likewise.
1591         (type_info::do_catch): Likewise.
1592         (type_info::do_upcast): Likewise.
1593         (vtable_prefix): New structure for vtable access.
1594         (adjust_pointer): Define new template function.
1595         (contained_p, public_p, virtual_p, contained_public_p,
1596         contained_nonpublic_p, contained_nonvirtual_p): Define new
1597         functions.
1598         (nonvirtual_base_type): New local variable.
1599         (__class_type_info::~__class_type_info): Define.
1600         (__si_class_type_info::~__si_class_type_info): Likewise.
1601         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
1602         (__class_type_info::do_catch): Define new function.
1603         (__class_type_info::do_upcast): Likewise.
1604         (__class_type_info::find_public_src): Likewise.
1605         (__class_type_info::do_find_public_src): Likewise.
1606         (__si_class_type_info::do_find_public_src): Likewise.
1607         (__vmi_class_type_info::do_find_public_src): Likewise.
1608         (__class_type_info::do_dyncast): Likewise.
1609         (__si_class_type_info::do_dyncast): Likewise.
1610         (__vmi_class_type_info::do_dyncast): Likewise.
1611         (__class_type_info::do_upcast): Likewise.
1612         (__si_class_type_info::do_upcast): Likewise.
1613         (__vmi_class_type_info::do_upcast): Likewise.
1614         (__dynamic_cast): Likewise.
1615         
1616         * tinfo2.cc (__fundamental_type_info): Define new class.
1617         (__pointer_type_info): Likewise.
1618         (__reference_type_info): Likewise.
1619         (__array_type_info): Likewise.
1620         (__function_type_info): Likewise.
1621         (__enum_type_info): Likewise.
1622         (__ptr_to_member_type_info): Likewise.
1623         (__fundamental_type_info::~__fundamental_type_info): Define.
1624         (__pointer_type_info::~__pointer_type_info): Likewise.
1625         (__reference_type_info::~__reference_type_info): Likewise.
1626         (__array_type_info::~__array_type_info): Likewise.
1627         (__function_type_info::~__function_type_info): Likewise.
1628         (__enum_type_info::~__enum_type_info): Likewise.
1629         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
1630         (__pointer_type_info::do_catch): Define new function.
1631         (__ptr_to_member_type_info::do_catch): Define new function.
1632         
1633         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
1634         (__is_pointer): Likewise.
1635
1636         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
1637
1638 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
1639
1640         * cp/class.c (build_vtable): Rename to build_primary_vtable.
1641         (prepare_fresh_vtable): Rename to build_secondary_vtable.
1642         (make_new_vtable): New function.
1643         (modify_vtable_entry): Handle generation of new vtables correctly.
1644         (modify_one_vtable): Remove unused parameter.
1645         (dfs_fixup_vtable_deltas): Likewise.
1646         (override_one_vtable): Use build_secondary_vtable.
1647         (finish_struct_1): Use build_primary_vtable and
1648         build_secondary_vtable.
1649         
1650 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
1651
1652         * cp/decl.c: Adjust variable names, comments, help strings.
1653
1654 2000-01-29  Nathan Sidwell  <nathan@acm.org>
1655
1656         * new2.cc (operator delete[]): Use operator delete, don't assume
1657         implementation.
1658
1659 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
1660
1661         * class.c (build_vtbl_initializer): Add argument to
1662         build_vtable_entry call.
1663
1664 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
1665
1666         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
1667         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
1668         (BF_DELTA): New macro.
1669         (BF_VCALL_INDEX): Likewise.
1670         (BF_FN): Likewise.
1671         (THUNK_VCALL_OFFSET): Likewise.
1672         (make_thunk): Change prototype.
1673         * class.c (build_vtable_entry): Integrate
1674         build_vtable_entry_for_fn.  Handle vcall indices.
1675         (build_vtable_entry_for_fn): Remove.
1676         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
1677         BF_VCALL_INDEX, BF_FN.
1678         (modify_vtable_entry): Integrate common code from
1679         modify_one_vtable and dfs_fixup_vtable_deltas.
1680         (add_virtual_function): Set BF_VCALL_INDEX.
1681         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
1682         and BF_FN.
1683         (modify_one_vtable): Simplify.
1684         (dfs_fixup_vtable_deltas): Likewise.
1685         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. 
1686         * method.c (make_thunk): Handle vcall indices.
1687         
1688 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
1689
1690         Compiler side new abi rtti (not enabled).
1691         * cp-tree.h (new_abi_rtti_p): New macro.
1692         (emit_support_tinfos): Prototype new function.
1693         (tinfo_decl_p): Likewise.
1694         (emit_tinfo_decl): Likwise.
1695         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
1696         macros.
1697         (doing_runtime): New local static.
1698         (init_rtti_processing): Add new-abi initializer.
1699         (get_tinfo_decl): Add new-abi logic.
1700         (tinfo_from_decl): Likewise.
1701         (build_dynamic_cast_1): Likewise.
1702         (qualifier_flags): New static function.
1703         (tinfo_base_init): Likewise.
1704         (generic_initializer): Likewise.
1705         (ptr_ref_initializer): Likewise.
1706         (ptmd_initializer): Likewise.
1707         (class_hint_flags): Likewise.
1708         (class_initializer): Likewise.
1709         (synthesize_tinfo_var): Likewise.
1710         (create_real_tinfo_var): Likewise.
1711         (create_pseudo_type_info): Likewise.
1712         (get_vmi_pseudo_type_info): Likewise.
1713         (create_tinfo_types): Likewise.
1714         (emit_support_tinfos): New global function.
1715         (tinfo_decl_p): New global predicate.
1716         (emit_tinfo_decl): New global function.
1717         * class.c (set_rtti_entry): Generalize for old and new rtti.
1718         (build_vtbl_initializer): Likewise.
1719         * decl2.c (finish_file): Likewise.
1720
1721 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
1722
1723         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
1724         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
1725
1726 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
1727
1728         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
1729         for scopes.
1730
1731 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
1732
1733         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
1734
1735 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
1736
1737         * optimize.c (calls_setjmp_r): Supply new argument
1738         to special_function_p.
1739
1740 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1741
1742         * call.c: PROTO -> PARAMS.
1743         * class.c: Likewise.
1744         * cp-tree.h: Likewise.
1745         * cvt.c: Likewise.
1746         * decl.c: Likewise.
1747         * decl.h: Likewise.
1748         * decl2.c: Likewise.
1749         * dump.c: Likewise.
1750         * errfn.c: Likewise.
1751         * error.c: Likewise.
1752         * except.c: Likewise.
1753         * expr.c: Likewise.
1754         * init.c: Likewise.
1755         * input.c: Likewise.
1756         * lex.c: Likewise.
1757         * lex.h: Likewise.
1758         * method.c: Likewise.
1759         * optimize.c: Likewise.
1760         * parse.y: Likewise.
1761         * pt.c: Likewise.
1762         * repo.c: Likewise.
1763         * rtti.c: Likewise.
1764         * search.c: Likewise.
1765         * semantics.c: Likewise.
1766         * spew.c: Likewise.
1767         * tree.c: Likewise.
1768         * typeck.c: Likewise.
1769         * typeck2.c: Likewise.
1770         * xref.c: Likewise.
1771
1772 2000-01-25  Richard Henderson  <rth@cygnus.com>
1773
1774         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
1775
1776 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
1777
1778         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
1779         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
1780         (struct vcall_offset_data_s): New type.
1781         (dfs_vcall_offset_queue_p): New function.
1782         (dfs_build_vcall_offset_vtbl_entries): Likewise.
1783         (build_vcall_offset_vtbl_entries): Likewise.
1784         (layout_vtable_decl): Likewise.
1785         (num_vfun_entries): Likewise.
1786         (num_extra_vtbl_entries): Add the entries for vcall offsets.
1787         (build_vtbl_initializer): Likewise.
1788         (dfs_finish_vtabls): Use layout_vtable_decl.
1789         (modify_one_vtables): Always duplicate vtables under the new ABI.
1790         (finish_struct_1): Use layout_vtable_decl.
1791         
1792 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1793
1794         * decl.c (member_function_or_else): Change third arg from a format
1795         specifier to an `enum overload_flags'.  Callers changed.
1796
1797 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
1798
1799         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
1800         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
1801         build_const_cast, get_delta_difference, check_return_expr): Avoid
1802         ANSI string concatenation usage.  
1803
1804 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
1805
1806         * class.c (layout_class_type): Put the fields required to make a
1807         class non-empty at the end, not the beginning, of the TYPE_FIELDs
1808         list.
1809
1810 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
1811
1812         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
1813         template.
1814
1815         * decl2.c (mark_used): Do instantiate inlines that have been
1816         explicitly instantiated.
1817
1818 2000-01-24  Richard Henderson  <rth@cygnus.com>
1819
1820         * call.c (build_over_call): Use expand_tree_builtin.
1821         * typeck.c (build_function_call_real): Likewise.
1822         (build_binary_op_nodefault): Handle unordered compares.
1823
1824 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
1825
1826         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
1827         cp_tree_index values.
1828         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
1829         New global node #defines for them.
1830         * rtti.c (call_void_fn): Replace with ...
1831         (build_runtime_decl): ... new static function.
1832         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
1833         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
1834         (build_dynamic_cast_1): Always produce correctly typed result.
1835         Explicitly produce type_info addresses. Use dynamic_cast_node.
1836         * exception.cc (__throw_bad_cast): Return `void *'.
1837         (__throw_bad_typeid): Return `const type_info &'.
1838
1839 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
1840
1841         * cp-tree.h (get_vtable_decl): Prototype new function.
1842         * class.c (get_vtable_decl): New function. Broken out from ...
1843         (build_vtable): ... here. Use it.
1844         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
1845         by get_vtable_decl.
1846
1847 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
1848
1849         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
1850         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
1851         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
1852         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
1853         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
1854         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
1855         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
1856         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
1857         (CPTI_TINFO_VAR_ID): New enumeration.
1858         (__tp_desc_type_node, __access_mode_type_node,
1859         __bltn_desc_type_node, __user_desc_type_node,
1860         __class_desc_type_node, __ptr_desc_type_node,
1861         __attr_desc_type_node, __func_desc_type_node,
1862         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
1863         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
1864         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
1865         enum_desc_type_node, class_desc_type_node,
1866         si_class_desc_type_node, vmi_class_desc_type_node,
1867         ptmd_desc_type_node, base_desc_type_node): New #defines.
1868         (tinfo_fn_id, tinfo_fn_type): Rename to ...
1869         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
1870         (tinfo_var_id): New enumeration.
1871         (DECL_TINFO_FN_P): Augment comment.
1872         * decl.c (cp_global_trees): Adjust documentation.
1873         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
1874         tinfo_decl_type and tinfo_var_id.
1875         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
1876         (build_typeid): Remove unused variable.
1877         (get_tinfo_var): Use tinfo_var_id.
1878         (tinfo_name): New static function.
1879         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
1880         (tinfo_from_decl): Likewise.
1881         (get_base_offset): New static function, broken out of
1882         expand_class_desc.
1883         (expand_si_desc): Use tinfo_name.
1884         (expand_class_desc): Likewise. Lose local static variable.
1885         Use base_desc_type_node. Use get_base_offset.
1886         (expand_ptr_desc): Use tinfo_name.
1887         (expand_attr_desc): Likewise.
1888         (expand_generic_desc): Likewise.
1889
1890         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
1891         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
1892
1893 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
1894
1895         * cp-tree.h (__eprintf): Remove declaration.
1896         * tree.c (__eprintf): Remove definition.
1897
1898 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
1899             Mark Mitchell  <mark@codesourcery.com>
1900
1901         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
1902         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
1903
1904 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
1905
1906         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
1907
1908 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
1909
1910         * cp-tree.h (register_dtor_fn): New function.
1911         * decl.c (destroy_local_static): Rename to ...
1912         (register_dtor_fn): ... this.  Give it external linkage.
1913         (expand_static_init): Use it.
1914         * decl2.c (do_static_initialization): Likewise, if using
1915         __cxa_atexit.
1916         (do_static_destruction): Check that __cxa_atexit is not in use.
1917         (finish_file): Don't call do_static_destruction if using
1918         __cxa_atexit.
1919
1920         * typeck.c (convert_arguments): Restore two-message error
1921         reporting.
1922         
1923 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
1924
1925         Remap dynamic cast hint values to be consistent across ABIs.
1926         * search.c (dynamic_cast_base_recurse): Remap generated value.
1927         (get_dynamic_cast_base_type): Adjust documentation.
1928         * tinfo.h (__user_type_info::dyncast): Likewise.
1929         (__user_type_info::find_public_subobj): Remap BOFF meaning.
1930         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
1931         (__class_type_info::do_dyncast): Likewise.
1932         (__class_type_info::do_find_public_subobj): Likewise.
1933         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.     
1934
1935 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
1936
1937         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
1938
1939         * typeck2.c (incomplete_type_error): Restore previous
1940         cp_error and cp_error_at call sequence.
1941         
1942 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
1943
1944         * class.c (dump_class_hierarchy): Make format agree with argument;
1945         cast pointer to unsigned long and print with %lx.
1946         
1947 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
1948
1949         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
1950         
1951         * typeck.c (composite_pointer_type, common_type,
1952         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
1953         build_function_call_real, convert_arguments,
1954         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
1955         build_unary_op, mark_addressable, build_compound_expr,
1956         build_static_cast, build_reinterpret_cast, build_const_cast,
1957         build_c_cast, build_modify_expr, get_delta_difference,
1958         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with 
1959         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
1960         into a single one.
1961         * typeck2.c (readonly_error, abstract_virtuals_error,
1962         process_init_constructor, check_for_new_type): Likewise.
1963
1964 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
1965
1966         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
1967         VAR_DECLs.
1968
1969 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
1970
1971         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
1972         (build_x_typeid): Likewise.
1973         (get_tinfo_fn): Likewise.
1974         (get_tinfo_fn_unused): Rename to ...
1975         (get_tinfo_decl): ... here.
1976         * rtti.c (build_headof): Replace logic error with assertion.
1977         (get_tinfo_fn_dynamic): Rename to ...
1978         (get_tinfo_decl_dynamic): ... here. Make static. Use
1979         complete_type_or_else.
1980         (build_x_typeid): Move into ...
1981         (build_typeid): ... here. Adjust call to
1982         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
1983         throw_bad_typeid expression.
1984         (get_tinfo_fn_unused): Rename to ...
1985         (get_tinfo_decl): ... here. Adjust comment.
1986         (get_tinfo_fn): Delete.
1987         (tinfo_from_decl): New static function.
1988         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
1989         (get_typeid): Use complete_type_or_else.
1990         (build_dynamic_cast_1): Adjust calls to
1991         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
1992         * parse.y (primary): Adjust call to build_typeid.
1993         * except.c (build_eh_type_type_ref): Adjust call to
1994         get_tinfo_decl. Mark as used.
1995         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
1996         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
1997         * parse.c: Regenerated.
1998
1999 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
2000
2001         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
2002         calling convention.
2003         (resolves_to_fixed_type_p): Document calling convention.
2004         * rtti.c (build_x_typeid): Initialize NONNULL.
2005
2006         * cp-tree.h (build_shared_int_cst): New function.
2007         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
2008         * class.c (modify_vtable_entry): Likewise.
2009         (add_virtual_function): Split out code to generated shared
2010         INTEGER_CSTs to build_share_int_cst.
2011         (modify_all_vtables): Handle all the overridden functions here.
2012         Add overridden functions from non-primary virtual bases to the
2013         primary vtable.
2014         (finish_struct_1): Adjust call to modify_all_vtables.  Add
2015         overridden functions from non-primary bases to the vtable.
2016         * tree.c (build_shared_int_cst): New function.
2017         
2018         * cp-tree.h (scratchalloc): Remove.
2019         (build_scratch_list): Likewise.
2020         * call.c (convert_class_to_reference): Replace build_scratch_list
2021         and build_expr_list with build_tree_list.
2022         (add_candidate): Replace scratchalloc with expralloc.  Note memory
2023         leak.
2024         (build_user_type_conversion_1):  Replace build_scratch_list
2025         and build_expr_list with build_tree_list.
2026         (build_new_op): Likewise.
2027         (build_op_delete_call): Likewise.
2028         (convert_like): Likewise.
2029         * cvt.c (ocp_convert): Likewise.
2030         * decl.c (start_decl): Likewise.
2031         (start_function): Likewise.
2032         (finish_destructor_body): Likewise.
2033         (maybe_build_cleanup_1): Likewise.
2034         * decl2.c (reparse_decl_as_expr): Likewise.
2035         * init.c (perform_member_init): Likewise.
2036         (expand_cleanup_for_base): Likewise.
2037         (build_builtin_delete_call): Likewise.
2038         (build_new_1): Likewise.
2039         (build_delete): Likewise.
2040         * method.c (do_build_assign_ref): Likewise.
2041         * parse.y (already_scoped_stmt): Likewise.
2042         (nontrivial_exprlist): Likewise.
2043         (net_initializer): Likewise.
2044         (initlist): Likewise.
2045         * parse.c: Regenerated.
2046         * rtti.c (build_x_typeid): Likewise.
2047         (build_dynamic_cast_1): Likewise.
2048         * typeck.c (build_x_compound_expr): Likewise.
2049         (build_static_cast): Likewise.
2050         (build_modify_expr): Likewise.
2051         
2052         * cp-tree.h (DECL_VINDEX): Add documentation.
2053         * class.c (build_vtable_entry): Likewise.
2054         (start_vtable): Add comment.
2055         (add_virtual_function): Replace pending_hard_virtuals with
2056         overridden_virtuals and pending_virtuals with new_virtuals.
2057         Replace redundant assignments with assertions.
2058         (check_for_override): Add comment.
2059         (check_bases_and_members): Replace pending_hard_virtuals with
2060         overridden_virtuals and pending_virtuals with new_virtuals.
2061         (create_vtbl_ptr): Likewise.
2062         (layout_class_type): Likewise.
2063         (finish_struct_1): Likewise.  Add comments.
2064         
2065 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
2066
2067         * class.c (finish_struct_1): Replace redundant code with
2068         assertions.
2069
2070         * cp-tree.h (flag_new_abi): Move.
2071         (flag_use_cxa_atexit): Likewise.
2072         (flag_honor_std): Likewise.
2073         (flag_rtti): Likewise.
2074         (vbase_offsets_in_vtable_p): Define.
2075         (vptrs_present_everywhere_p): Likewise.
2076         (TYPE_CONTAINS_VPTR_P): Likewise.
2077         (dfs_walk_real): Declare.
2078         * class.c (build_vbase_pointer_fields): Check
2079         vbase_offsets_in_vtable_p.
2080         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
2081         BINFO_VPTR_FIELD.
2082         (build_vbase_offset_vtbl_entries): Simplify.
2083         (build_vbase_offset_vtbl_entries): Adjust.
2084         (build_vbase_pointer): Add ability to look up vbase offsets in
2085         vtable. 
2086         (start_vtable): New function.
2087         (add_virtual_function): Use it.
2088         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
2089         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
2090         (build_vtbl_initializer): Take the type of the complete object as
2091         input.  Use it to correctly calculate vbase offsets.
2092         (dfs_finish_vtbls): Pass the complete type to
2093         build_vtbl_initializer.
2094         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
2095         (create_vtable_ptr): Create a vtable even if there are no
2096         new virtual functions, under the new ABI.
2097         (finish_struct_1): Likewise.
2098         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
2099         * decl.c (exapnd_static_init): Remove call to
2100         preserve_initializer.
2101         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
2102         vtables.
2103         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
2104         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
2105         (construct_virtual_bases): Don't initialize virtual base pointers
2106         under the new ABI.
2107         (build_aggr_init): Clean up comment.
2108         (expand_aggr_init_1): Likewise.
2109         * rtti.c (expand_class_desc): Store the virtual function table
2110         index where the vbase offset lives in the offset field.
2111         * search.c (dfs_walk_real): Make it global.
2112         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
2113         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
2114         
2115         * tinfo.h (USItype): Make it signed under the new ABI.
2116         * tinfo.cc (convert_to_base): New function.  Encapsulate base
2117         conversion logic here.
2118         (__class_type_info::do_upcast): Use it.
2119         (__class_type_info::do_dyncast): Likewise.
2120         (__class_type_info::do_find_public_subobj): Likewise.
2121         
2122         * init.c (construct_virtual_bases): Don't look up the addresses of
2123         virtual bases at run-time.
2124
2125         * class.c (build_vbase_pointer): Relocate.
2126         (build_vbase_pointer_fields): Likewise.
2127         (dfs_build_vbase_offset_vtbl_entries): Likewise.
2128         (build_vbase_offset_vtbl_entries): Likewise.
2129
2130         * decl.c (init_decl_processing): Complain if -fnew-abi
2131         -fno-vtable-thunks is used.
2132
2133         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
2134         flag_new_abi.
2135
2136 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
2137
2138         * cp-tree.h (num_extra_vtbl_entries): New function.
2139         (size_extra_vtbl_entries): Likewise.
2140         (dfs_vtable_path_unmark): Likewise.
2141         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
2142         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
2143         * class.c (num_extra_vtbl_entries): New function.
2144         (size_extra_vtbl_entries): Likewise.
2145         (dfs_build_vbase_offset_vtbl_entries): New function.
2146         (build_vbase_offset_vtbl_entries): Likewise.
2147         (build_vtbl_initializer): Use it.
2148         (finish_struct_1): Adjust vtable sizes (using
2149         num_extra_vtbl_entries).
2150         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
2151         THUNK_DECL is non-NULL before expanding it.
2152         * init.c (expand_virtual_init): Adjust the vtable pointer by
2153         size_extra_vtbl_entries before storing it.
2154         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
2155         Handle TREE_LIST parameters here, not in the dfs_* functions.
2156         (dfs_unmarked_real_bases_queue_p): Adjust.
2157         (dfs_marked_real_bases_queue_p): Likewise.
2158         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
2159         (dfs_vtable_path_marked_real_bases_queue_p): New function.
2160         (dfs_vtable_path_unmark): Likewise.
2161         
2162 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
2163
2164         * optimize.c (copy_body_r): Clear the operand three of a
2165         TARGET_EXPR when copying it.
2166
2167 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2168
2169         * method.c (build_decl_overload_real): Check whether we are in ::
2170         before returning __builtin_new/delete.
2171
2172 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
2173
2174         * pt.c (tsubst_friend_function): Improve comment.
2175         (instantiate_decl): Avoid crashing when a "nested" function is
2176         instantiated from the top level.
2177         
2178         * dump.c (dqeueue_and_dump): Dump
2179         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
2180
2181 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2182
2183         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
2184
2185 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
2186
2187         * g++spec.c (lang_specific_driver): Add -fnew-abi if
2188         ENABLE_NEW_GXX_ABI defined.
2189         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
2190         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
2191         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
2192
2193 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
2194
2195         * decl.c (start_cleanup_fn): Call pushdecl.
2196
2197         * call.c (convert_class_to_reference): Fix typos.
2198         (build_conditional_expr): Handle errors gracefully.
2199         * class.c (push_nested_class): Likewise.
2200         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
2201         (DECL_THIS_EXTERN): Use it.
2202         (DECL_THIS_STATIC): Likewise.
2203         * cvt.c (convert_to_void): Handle errors gracefully.
2204         (build_expr_type_conversion): Likewise.
2205         * decl.c (maybe_push_decl): Likewise.
2206         (start_decl_1): Likewise.
2207         (require_complete_types_for_parms): Likewise.
2208         * parse.y (structsp): Likewise.
2209         (base_class): Likewise.
2210         * parse.c: Regenerated.
2211         * pt.c (finish_member_template_decl): Likewise.
2212         * typeck.c (decay_conversion): Likewise.
2213         
2214         * cp-tree.h (dfs_skip_vbases): New function.
2215         (find_vbase_instance): Likewise.
2216         * class.c (determine_primary_base): Allow a nearly empty base to
2217         serve as a primary base class under the new ABI.
2218         (get_class_offset_1): Rename to ...
2219         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
2220         messages here.
2221         (get_class_offset): Use it.  Issue error messages here.
2222         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
2223         find the right copies of virtual bases.
2224         (fixup_vtable_deltas1): Rename to ...
2225         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
2226         bases as primary bases.
2227         (fixup_vtable_deltas): Remove.
2228         (override_one_vtable): Handle virtual bases as primary bases.
2229         (merge_overrides): Likewise.
2230         (finish_struct_1): Likewise.
2231         (dump_class_hierarchy): Dump primary-ness of bases as well.
2232         * search.c (mark_primary_bases): Use a pre-order traversal to
2233         handle primary virtual bases.
2234         (dfs_skip_vbases): New fiunction.
2235         (expand_upcast_fixups): Adjust to handle primary virtual bases.
2236         (fixup_virtual_upcast_offsets): Likewise.
2237         (fixup_all_virtual_upcast_offsets): Likewise.
2238         (dfs_find_vbase_instances): New function.
2239         (find_vbase_instance): Likewise.
2240         
2241 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
2242
2243         * lex.c (DIR_SEPARATOR): Delete macro.
2244
2245 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
2246  
2247        * decl2.c (lang_decode_option): Handle automatic line wrapping
2248        option.
2249         
2250 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
2251
2252         * friend.c (do_friend): Don't resolve scopes when processing
2253         template declarations, even if the qualifying scope doesn't
2254         involve template parameters.
2255
2256 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
2257
2258         * class.c (dfs_modify_vtables_queue_p): Remove.
2259         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
2260         and dfs_marked_real_bases_queue_p instead of
2261         dfs_modify_vtables_queue_p.
2262
2263         * class.c (build_vbase_path): Simplify.
2264         (dfs_propagate_binfo_offsets): New function.
2265         (propagate_binfo_offsets): Use it.
2266         (remove_base_field): Simplify.
2267         (dfs_set_offset_for_vbases): Remove.
2268         (dfs_set_offset_for_shared_vbases): New function.
2269         (dfs_set_offset_for_unshared_vbases): Likewise.
2270         (layout_virtual_bases): Use them.
2271         (layout_basetypes): Don't call propagate_binfo_offsets.
2272         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
2273         for the vbases.
2274         
2275         * class.c (build_base_field): New function, split out from ...
2276         (build_base_fields): ... here.  Use it.  Allocate primary bases
2277         first, under the new ABI.
2278         (get_vtable_entry): Remove.
2279         (remove_base_field): New function, split out from ...
2280         (remove_base_fields): ... here.  Adjust since primary bases come
2281         first under the new ABI.
2282         
2283         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
2284         (initialize_vtbl_ptrs): New function.
2285         (expand_indirect_vtbls_init): Change prototype.
2286         (convert_pointer_to_vbase): Declare.
2287         * init.c (expand_direct_vtbls_init): Remove.
2288         (dfs_initialize_vtbl_ptrs): New function.
2289         (initialize_vtbl_ptrs): Likewise.
2290         (emit_base_init): Use initialize_vtbl_ptrs.
2291         * search.c (convert_pointer_to_vbase): Make it global.
2292         (expand_indirect_vtbls_init): Remove vtable initialization code.
2293         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
2294         
2295         * class.c (dfs_finish_vtbls): New function.
2296         (finish_vtbls): Use it.
2297         (dump_class_hierarchy): New function.
2298         
2299         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
2300         (BINFO_VBASE_PRIMARY_P): New macro.
2301         (BINFO_VIRTUALS): Add to documentation.
2302         (SET_BINFO_PRIMARY_MARKED_P): Remove.
2303         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
2304         (dfs_mark_primary_bases_queue_p): Likewise.
2305         (dfs_unmarked_real_bases_queue_p): New function.
2306         (dfs_marked_real_bases_queue_p): Likewise.
2307         * search.c (dfs_mark_primary_bases): Adjust.
2308         (mark_primary_bases): Likewise.
2309         (get_shared_vbase_if_not_primary): New function.
2310         (dfs_unmarked_real_bases_queue_p): Likewise.
2311         (dfs_marked_real_bases_queue_p): Likewise.
2312         (dfs_get_pure_virtuals): Simplify.
2313         (get_pure_virtuals): Likewise.
2314         
2315 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2316
2317         * lex.c: Include tm_p.h.
2318
2319 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
2320
2321         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
2322
2323 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
2324
2325         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
2326         * pt.c (instantiate_decl): Defer comdat templates that might not be
2327         needed.
2328         
2329         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
2330         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
2331         (finish_file): Likewise.
2332
2333         * decl2.c (import_export_class): Undo 12/14 change.
2334
2335         * error.c (dump_decl): operator new, not operatornew.
2336
2337         * class.c (field_decl_cmp): A nontype is "greater" than a type.
2338         * search.c (lookup_field_1): Look for the last field with the
2339         desired name.
2340
2341 2000-01-05  Nathan Sidwell  <nathan@acm.org>
2342
2343         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
2344         FUNCTION_DECL.
2345
2346 2000-01-05  Nathan Sidwell  <nathan@acm.org>
2347
2348         * typeck.c (build_static_cast): Don't strip target qualifiers
2349         when casting from a class.
2350
2351 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2352
2353         * class.c (warn_hidden): Initialize variable `fndecl'.
2354
2355 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
2356
2357         * decl.c (flag_isoc9x): New variable to be able to use code in
2358         c-common.c.  For now always zero.
2359
2360 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
2361
2362         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
2363         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
2364         or unshare_base_binfos for virtual bases here.
2365         * search.c (dfs_get_vbase_types): Do it here.
2366         (get_vbase_types): Adjust.
2367         
2368 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
2369
2370         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
2371         (BINFO_PRIMARY_MARKED_P): Use flag 5.
2372         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
2373         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
2374         (unmark_primary_bases): Remove declaration.
2375         (unmarkedp): Declare.
2376         (dfs_vbase_unmark): Likewise.
2377         * class.c (determine_primary_base): Return immediately if there
2378         are no base classes.  Call mark_primary_bases here.
2379         (modify_all_direct_vtables): Remove.
2380         (modify_all_indirect_vtables): Remove.
2381         (dfs_modify_vtables_queue_p): New function.     
2382         (dfs_modify_vtables): New function.
2383         (modify_all_vtables): Use them.
2384         (build_base_fields): Build FIELD_DECLs for primary virtual base
2385         classes.
2386         (create_vtable_ptr): Don't call determine_primary_base here.
2387         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
2388         (dfs_set_offset_for_vbases): ... this.
2389         (layout_virtual_bases): Use it.
2390         (layout_class_type): Call determine_primary_base here.
2391         * search.c (unmarkedp): Make it global.
2392         (shared_marked_p): Simplify.
2393         (shared_unmarked_p): Likewise.
2394         (dfs_primary_bases_queue_p): Remove.
2395         (dfs_unmark_primary_bases): Likewise.
2396         (unmark_primary_bases): Likewise.
2397         (mark_primary_bases): Simplify.
2398         (get_pure_virtuals): Don't call mark_primary_bases here.
2399         (dfs_vbase_unmark): New function.
2400         (get_vbase_types): Simplify.
2401
2402         * class.c (struct base_info): Remove.
2403         (determine_primary_base): Take has_virtual_p rather than a
2404         base_info as input.  Don't calculate max_has_virtual.
2405         (finish_struct_bits): Remove max_has_virtual argument.
2406         (create_vtable_ptr): Remove max_has_virtual_p argument.
2407         (layout_virtual_bases): Remove max argument.
2408         (layout_basetypes): Likewise.
2409         (layout_class_type): Remove max_has_virtual_p argument.
2410         (finish_struct_1): Remove max_has_virtual.
2411
2412         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
2413         (layout_basetypes): Remove.
2414         * class.c (propagate_binfo_offsets): Moved here from tree.c.
2415         Update to handle primary virtual bases.
2416         (remove_base_fields): New function, split out from
2417         layout_basetypes.
2418         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
2419         (layout_virtual_bases): New function, split out from
2420         layout_basetypes.  Update to handle primary virtual bases.
2421         (layout_basetypes): Moved here from tree.c.  Use
2422         remove_base_fields and layout_virtual_bases.
2423         * search.c (dfs_mark_primary_bases_queue_p): New function.
2424         (mark_primary_bases): Use it.
2425         * tree.c (CEIL): Remove.
2426         (propagate_binfo_offsets): Remove.
2427         (layout_basetypes): Remove.
2428         
2429 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
2430
2431         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
2432         (BINFO_PRIMARY_MARKED_P): New macro.
2433         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
2434         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
2435         (mark_primary_bases): New function.
2436         (unmark_primary_bases): Likewise.
2437         * search.c (get_abstract_virtuals_1): Remove.
2438         (dfs_mark_primary_bases): New function.
2439         (mark_primary_bases): Likewise.
2440         (dfs_unmark_primary_bases): Likewise.
2441         (unmark_primary_bases): Likewise.
2442         (dfs_get_pure_virtuals): Likewise.
2443         
2444 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
2445
2446         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
2447         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
2448         (modify_one_vtable): Adjust.
2449         (fixup_vtable_deltas1): Likewise.
2450         (override_one_vtable): Likewise.
2451         * search.c (get_abstract_virtuals_1): Likewise.
2452         (get_pure_virtuals): Likewise.
2453         (expand_upcast_fixups): Likewise.
2454         * tree.c (debug_binfo): Likewise.
2455         
2456         * class.c (build_vtable): Don't return a value.  Don't rebuild
2457         vtables for bases that have already been handled.
2458         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
2459         already been handled.
2460         (modify_one_vtable): Adjust accordingly.
2461         (fixup_vtable_deltas1): Likewise.
2462         (finish_struct_1): Likewise.
2463
2464 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2465
2466         * call.c (build_new_method_call): Also check destructors.
2467
2468 1999-12-31  Mark Mitchell  <mark@codesourcery.com>
2469
2470         * cp-tree.h (VF_NORMAL_VALUE): Remove.
2471         * class.c (struct base_info): Remove vfield, vfields, and rtti.
2472         (set_primary_base): New function, split out from ...
2473         (finish_base_struct): ... here.  Rename to ...
2474         (determine_primary_base): ... this.  Simplify.
2475         (create_vtable_ptr): Tweak accordingly.
2476         (finish_struct_1): Simplify.
2477         
2478         * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
2479         (CLASSTYPE_N_BASECLASSES): Likewise.
2480         (BINFO_FOR_VBASE): New macro.
2481         (get_vbase_types): Change prototype.
2482         * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
2483         (prepare_fresh_vtable): Likewise.
2484         (finish_vtbls): Likewise.
2485         (get_class_offset_1): Likewise.
2486         (modify_all_indirect_vtables): Likewise.
2487         (build_vbase_pointer_fields): Likewise.
2488         * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
2489         * init.c (sort_base_init): Use BINFO_FOR_VBASE.
2490         (expand_member_init): Likewise.
2491         * search.c (get_base_distance): Likewise.
2492         (lookup_field_queue_p): Likewise.
2493         (virtual_context): Likewise.
2494         (get_vbase_types): Don't return a value.  Set
2495         CLASSTYPE_VBASECLASSES here.
2496         * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
2497         
2498 1999-12-30  Mark Mitchell  <mark@codesourcery.com>
2499
2500         * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
2501
2502 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
2503
2504         * class.c (create_vtable_ptr): Put the vtable at the beginning of
2505         the class, not the end, in the new ABI.
2506         * tree.c (propagate_binfo_offsets): Do the right thing for the new
2507         ABI.
2508
2509 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
2510
2511         * cp-tree.h (lang_type): Add nearly_empty_p.  Adjust dummy.
2512         (CLASSTYPE_NEARLY_EMPTY_P): New macro.
2513         * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
2514         (check_field_decls): Likewise.
2515         (check_bases_and_members): Likewise.
2516
2517 1999-12-28  Mark Mitchell  <mark@codesourcery.com>
2518
2519         * cp-tree.h (do_inline_function_hair): Remove.
2520         * class.c (layout_class_type): New function, split out from
2521         finish_struct_1.
2522         (fixup_pending_inline): Likewise.
2523         (fixup_inline_methods): New function.
2524         * method.c (fixup_pending_inline): Remove.
2525         (do_inline_function_hair): Likewise.
2526         
2527         * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
2528         new ABI.
2529         
2530         * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
2531         (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
2532         (CLASSTYPE_PURE_VIRTUALS): ... this.
2533         (lang_decl_flags): Replace abstract_virtual with pure_virtual.
2534         (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
2535         (DECL_PURE_VIRTUAL_P): ... this.
2536         (get_abstract_virtuals): Rename to ...
2537         (get_pure_virtuals): ... this.
2538         * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
2539         DECL_ABSTRACT_VIRTUAL_P.  Replace CLASSTYPE_ABSTRACT_VIRTUALS with
2540         CLASSTYPE_PURE_VIRTUALS.
2541         * class.c (build_vtable_entry): Likewise.
2542         (finish_struct_bits): Likewise.  Call get_pure_virtuals, not
2543         get_abstract_virtuals.
2544         (build_vtbl_initializer): Likewise.
2545         (override_one_vtable): Likewise.
2546         (check_methods): Likewise.
2547         * decl.c (duplicate_decls): Likewise.
2548         (redeclaration_error_message): Likewise.
2549         (lang_mark_tree): Likewise.
2550         * decl2.c (grok_function_init): Likewise.
2551         (import_export_vtable): Likewise.
2552         (import_expor_class): Likewise.
2553         * typeck2.c (abstract_virtuals_error): Likewise.
2554         * xref.c (GNU_xref_member): Likewise.
2555         * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
2556         
2557 1999-12-26  Zack Weinberg  <zack@wolery.cumb.org>
2558
2559         * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
2560         throughout.
2561
2562 1999-12-26  Mark Mitchell  <mark@codesourcery.com>
2563
2564         * decl.c (store_return_init): Use mode of old RTL generated for
2565         DECL_RESULT, not the mode of DECL_RESULT itself.
2566         * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
2567         for functions that used named return values.
2568         
2569 1999-12-24  Mark Mitchell  <mark@codesourcery.com>
2570
2571         * semantics.c (expand_body): Use
2572         note_deferral_of_defined_inline_function.
2573
2574 1999-12-22  Mark Mitchell  <mark@codesourcery.com>
2575
2576         * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
2577
2578 1999-12-22  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
2579
2580         * error.c (dump_decl): Support named return values.
2581
2582 1999-12-20  Mark Mitchell  <mark@codesourcery.com>
2583
2584         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
2585         (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
2586         (CLASSTYPE_PRIMARY_BINFO): Likewise.
2587         * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
2588         TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
2589         (check_bases_and_members): Set them here instead.
2590         (create_vtable_ptr): New function, split out from ...
2591         (finish_struct_1): ... here.  Use it.  Tidy.  Use
2592         CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
2593         * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
2594         the first field in the class.
2595         * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES.  Handle
2596         seeing TYPE_VFIELD as the first field in the class.
2597         
2598         * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
2599         (TYPE_POLYMORPHIC_P): ... this.
2600         (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
2601         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
2602         (TREE_CALLS_NEW): Remove.
2603         (TREE_MANGLED): Likewise.
2604         * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
2605         and TYPE_POLYMORPHIC_P.
2606         * class.c (check_bases): Likewise.
2607         (finish_base_struct): Likewise.
2608         (finish_struct_bits): Likewise.
2609         (check_for_override): Likewise.
2610         (finish_struct_1): Likewise.
2611         (get_vfield_name): Likewise.
2612         * decl.c (xref_basetypes): Likewise.
2613         * decl2.c (import_export_class): Likewise.
2614         (import_export_decl): Likewise.
2615         * error.c (dump_function_decl): Likewise.
2616         * pt.c (instantiate_class_template): Likewise.
2617         * repo.c (repo_inline_used): Likewise.
2618         * rtti.c (build_headof): Likewise.
2619         (get_tinfo_fn_dynamic): Likewise.
2620         (build_x_typeid): Likewise.
2621         (get_tinfo_var): Likewise.
2622         (build_dynamic_cast_1): Likewise.
2623         (synthesize_tinfo_fn): Likewise.
2624         * search.c (lookup_field_1): Likewise.
2625         (dfs_debug_mark): Likewise.
2626         (maybe_suppress_debug_info): Likewise.
2627         * typeck.c (build_component_ref): Likewise.
2628         (build_component_addr): Likewise.
2629         * typeck2.c (process_init_constructor): Likewise.
2630         
2631 1999-12-20  Nathan Sidwell  <nathan@acm.org>
2632
2633         * typeck.c (strip_all_pointer_quals): New static function.
2634         (build_static_cast): Use it. Don't use at_least_as_qualified_p.
2635
2636 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
2637
2638         * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
2639         (dso_handle_node): New macro.
2640         (flag_use_cxa_atexit): New variable.
2641         (declare_global_var): New function.
2642         (start_anon_func): Remove declaration.
2643         (end_anon_func): Likewise.
2644         * decl.c (get_atexit_node): New function, split out from
2645         destroy_local_static.  Handle flag_use_cxa_atexit.
2646         (get_dso_handle_node): Likewise.
2647         (start_cleanup_fn): Renamed from start_anon_func.  Moved here from
2648         except.c.  Handle flag_use_cxa_atexit.
2649         (end_cleanup_fn): Renamed from end_anon_func.  Moved here from
2650         except.c.
2651         (declare_global_var): New variable.
2652         (destroy_local_static): Handle flag_use_cxa_atexit.
2653         * decl2.c (flag_use_cxa_atexit): New variable.
2654         (lang_f_options): Likewise.
2655         * except.c (start_anon_func): Remove.
2656         (end_anon_func): Liekwise.
2657         * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
2658         * rtti.c (get_tinfo_var): Use declare_global_var.
2659
2660 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
2661
2662         * class.c (check_field_decls): Don't return a value.
2663         (avoid_overlap): Moved here from tree.c.
2664         (build_base_fields): Likewise.
2665         (check_bases): New function, split out from finish_base_struct.
2666         (check_bases_and_members): New function, split out from 
2667         finish_struct_1.
2668         (struct base_info): Remove cant_have_default_ctor,
2669         cant_have_const_ctor, cant_have_asn_ref.
2670         (finish_base_struct): Split semantic analysis into check_bases.
2671         (finish_struct_methods): Fix bogus assertion.
2672         (check_field_decls): Call finish_struct_anon here.
2673         (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
2674         (finish_struct_1): Use check_bases_and_members.  Reorganize.
2675         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
2676         (build_base_fields): Don't declare.
2677         * tree.c (avoid_overlap): Remove.
2678         (build_base_fields): Likewise.
2679         
2680         * optimize.c (struct inline_data): Remove scope_stmt.
2681         (remap_block): Don't use insert_block_after_note.  Don't update
2682         scope_stmt.
2683         (expand_call_inline): Don't update scope_stmt.
2684         (optimize_function): Don't initialize scope_stmt.
2685         * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
2686         NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
2687
2688 1999-12-15  Mark Mitchell  <mark@codesourcery.com>
2689
2690         * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
2691         out of the class, rather than taking them as parameters.
2692         (build_vbase_pointer_fields): Move here from tree.c.
2693         (build_vtbl_or_vbase_field): New function.
2694         (check_methods): Likewise.
2695         (remove_zero_width_bitfields): Likewise.
2696         (add_virtual_function): Use tree_cons instead of temp_tree_cons.
2697         (delete_duplicate_fields_1): Tidy.  Don't delete duplicate
2698         USING_DECLs here.
2699         (finish_struct_methods): Handle the case where there are no
2700         methods here.
2701         (get_basefndecls): Use tree_cons instead of temp_tree_cons.
2702         (check_field_decls): Call delete_duplicate_fields here.
2703         (finish_struct_1): Tidy.  Use check_methods and
2704         remove_zero_width_bitfields.
2705         * cp-tree.h (build_vbase_pointer_fields): Remove.
2706         * decl.c (grokdeclarator): Use tree_cons instead of
2707         temp_tree_cons.
2708         * decl2.c (qualified_lookup_using_namespace): Use tree_cons
2709         instead of temp_tree_cons.
2710         * lex.c (cons_up_default_function): Remove dead code.
2711         * method.c (fixup_pending_inline): New function, split out from ...
2712         (do_inline_function_hair): ... here.
2713         * tree.c (build_vbase_pointer_fields): Remove.
2714         
2715 1999-12-15  Jason Merrill  <jason@casey.cygnus.com>
2716
2717         * tree.c (walk_tree): Walk operand subtrees in forward order.
2718         * optimize.c (expand_call_inline): Likewise.
2719         (optimize_function): Initialize id->scope_stmt to something useful.
2720         (remap_block): Assume id->scope_stmt has a useful value.
2721
2722 1999-12-15  Nathan Sidwell  <nathan@acm.org>
2723
2724         * typeck.c (build_c_cast): Expand warning message. Move pointer
2725         alignment warning to after the cast. Don't warn about pointer
2726         alignment when given a pointer to incomplete.
2727
2728 1999-12-15  Richard Henderson  <rth@cygnus.com>
2729
2730         * cp-tree.h (make_aggr_type): Declare.
2731         * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
2732         (make_aggr_type): New.
2733
2734         * decl.c (build_typename_type, init_decl_processing): Use it.
2735         (build_ptrmemfunc_type, xref_tag): Likewise.
2736         * except.c (call_eh_info): Likewise.
2737         * init.c (init_init_processing): Likewise.
2738         * pt.c (process_template_parm, lookup_template_class): Likewise.
2739         * rtti.c (expand_class_desc): Likewise.
2740         * semantics.c (begin_class_definition, finish_typeof): Likewise.
2741         * tree.c (copy_template_template_parm): Likewise.
2742
2743 1999-12-15  Jason Merrill  <jason@yorick.cygnus.com>
2744
2745         * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
2746         sizeof (struct tree_common).
2747
2748 1999-12-14  Jason Merrill  <jason@casey.cygnus.com>
2749
2750         * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
2751         outermost block to point to the inlined function decl.
2752
2753         * error.c (dump_decl): operator==, not operator ==.
2754         (op_to_string): Likewise.
2755
2756         * decl.c (compute_array_index_type): Handle null name.
2757
2758         * decl2.c (ambiguous_decl): Fix to match comment.
2759         (lookup_using_namespace): Adjust.
2760
2761         * decl2.c (import_export_class): Don't ignore dllimport.
2762
2763 1999-12-14  Mark Mitchell  <mark@codesourcery.com>
2764
2765         * class.c (check_field_decls): Split out from ...
2766         (finish_struct_1): ... here.  Use it.  Tidy.
2767
2768         * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
2769         * optimize.c (copy_body_r): Pass it.
2770         * tree.c (remap_save_expr): Clear walk_subtrees for an
2771         already-handled SAVE_EXPR.
2772         (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
2773
2774         * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
2775         * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
2776
2777         * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
2778
2779 1999-12-14  Mumit Khan  <khan@xraylith.wisc.edu>
2780
2781         * class.c (finish_base_struct): Allow multiple COM base classes
2782         as well as non-COM bases as long as it's not the leftmost.
2783
2784 1999-12-13  Mumit Khan  <khan@xraylith.wisc.edu>
2785
2786         * lex.c (saving_parse_to_obstack): New global.
2787         (reinit_parse_for_block): Use.
2788         (reinit_parse_for_expr): Use.
2789         (check_newline): Use.
2790
2791 1999-12-13  Mark Mitchell  <mark@codesourcery.com>
2792
2793         * optimize.c (initialize_inlined_parameters): Take FN to which the
2794         parameters belong as an argument.
2795         (expand_call_inline): Expand calls into the parameter
2796         initializations before pushing the function onto the list of
2797         functions we are presently expanding.
2798
2799 1999-12-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2800
2801         * class.c (get_vtable_name): Use a literal format string and
2802         VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
2803         (prepare_fresh_vtable): Likewise.
2804
2805         * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
2806         VTABLE_NAME_FORMAT.
2807
2808         * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
2809
2810         * init.c (build_vec_init): Initialize variable `try_body'.
2811
2812         * lex.c (yyerror): Don't call a variadic function with a
2813         non-literal format string.
2814
2815         * optimize.c (optimize_function): Call memset, not bzero.
2816
2817         * pt.c (for_each_template_parm_r): Add static prototype.
2818
2819 1999-12-09  Andreas Jaeger  <aj@suse.de>
2820
2821         * except.c (expand_throw): Add static attribute to match
2822         prototype.
2823
2824         * Makefile.in (semantics.o): Add dependency on output.h.
2825         * semantics.c: Include output.h for declaration of
2826         make_function_rtl.
2827
2828 1999-12-09  Mark Mitchell  <mark@codesourcery.com>
2829
2830         * decl.c (init_decl_processing): Reenable inlining on trees.
2831         (finish_function): Likewise.
2832         * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
2833         * semantics.c (simplify_aggr_init_exprs): New function.
2834         (expand_body): Use it.
2835         * tree.c (walk_tree): Special-case TARGET_EXPRs since they
2836         sometimes present the same sub-tree twice.
2837         
2838         * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
2839         `csl'.
2840
2841         * semantics.c (finish_switch_cond): Do conversions here, not ...
2842         * typeck.c (c_expand_start_case): Here.
2843
2844         * semantics.c (do_poplevel): Remove unused variable.
2845         
2846 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
2847
2848         * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
2849         unless we're declaring the variable in question.
2850
2851 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
2852
2853         * decl.c (init_decl_processing): #if 0 last patch.
2854         (finish_function): Likewise.
2855
2856 1999-12-05  Mark Mitchell  <mark@codesourcery.com>
2857
2858         * decl.c (init_decl_processing): Set flag_inline_trees if
2859         !flag_no_inline.
2860
2861         * cp-tree.h (calls_setjmp_p): Declare.
2862         * decl.c (finish_function): Mark functions that call setjmp as
2863         uninlinable.
2864         * optimize.c (calls_setjmp_r): New function.
2865         (calls_setjmp_p): Likewise.
2866
2867 1999-12-04  Mark Mitchell  <mark@codesourcery.com>
2868
2869         * optimize.c (expand_call_inline): Wrap the expanded call in an
2870         EXPR_WITH_FILE_LOCATION node to get correct line numbers for
2871         inlined functions.
2872
2873         * optimize.c (inline_data): Remove fns_top.  Add scope_stmt.  Add
2874         in_target_cleanup_p.
2875         (remap_decl): New function.
2876         (remap_block): Likewise.
2877         (copy_scope_stmt): Likewise.
2878         (copy_body_r): Use remap_decl and copy_scope_stmt.
2879         (copy_body): Use VARRAY_TOP_TREE.
2880         (initialize_inlined_parameters): Likewise.
2881         (declare_return_variable): Likewise.
2882         (inlinable_function_p): Check flag_inline_trees.
2883         (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
2884         specially.  Use VARRAY_PUSH_TREE.  Create a BLOCK for the
2885         parameters of the inlined function.
2886         (optimize_function): Prevent recursion into partially complete
2887         functions.
2888         
2889         * cp-tree.def (SCOPE_STMT): Take one operand.
2890         * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
2891         (SCOPE_NULLIFIED_P): Redefine.
2892         (SCOPE_NO_CLEANUPS_P): New macro.
2893         (add_scope_stmt): Change prototype.
2894         * decl.c (poplevel): Tidy.  Warn about unused variables here.
2895         Record SCOPE_STMT_BLOCKs.
2896         (finish_function): Keep DECL_INITIAL for functions that might be
2897         inlined.
2898         * ir.texi: Document SCOPE_NO_CLEANUPS_P.
2899         * semantics.c: Include rtl.h.
2900         (add_scope_stmt): Return the new scope statement and, for an
2901         end-of-scope statement, its matching begin statement.  Don't set
2902         SCOPE_NULLIFIED_P.
2903         (do_pushlevel): Simplify, now that we are always
2904         function-at-a-time.
2905         (do_poplevel): Likewise.  Record SCOPE_STMT_BLOCKs.
2906         (expand_stmt): Don't call expand_start_bindings or
2907         expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
2908         * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
2909         SCOPE_NULLIFIED_P.
2910         * Makefile.in (semantics.o): Depend on RTL_H.
2911         
2912         * decl2.c (pending_statics_used): Make it a macro.
2913         (saved_inlines_used): Likewise.
2914         (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
2915         (mark_inline_for_output): Likewise.
2916         (ssdf_decls_used): Remove.
2917         (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
2918         (generate_ctor_or_dtor_function): Adjust accordingly.
2919         
2920 1999-11-24  Geoffrey Keating  <geoffk@cygnus.com>
2921             Greg McGary  <gkm@gnu.org>
2922
2923         * decl.c (duplicate_decls): Merge
2924         DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
2925         DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
2926
2927 1999-12-02  Mike Stump  <mrs@wrs.com>
2928
2929         * init.c (perform_member_init): Handle parse errors better.
2930
2931 1999-12-01  Mark Mitchell  <mark@codesourcery.com>
2932
2933         * cp-tree.h (min_tree_cons): Remove.
2934         (scratch_ovl_cons): Likewise.
2935         * decl.c (saveable_obstack): Don't declare.
2936         (duplicate_decls): Tweak error-message.
2937         (initialize_local_var): Explicitly mark the definition as static.
2938         (finish_function): Call permanent_allocation, just so
2939         that the middle-end sees the obstacks it expects.
2940         (mark_cp_function_context): Likewise.
2941         * init.c (build_new): Don't use min_tree_cons.
2942         * lex.c (permanent_obstack): Don't declare.
2943         (current_obstack, saveable_obstack): Likewise.
2944         * spew.c (current_obstack, saveable_obstack): Likewise.
2945         * tree.c (current_obstack, saveable_obstack): Likewise.
2946         (scratch_ovl_cons): Remove.
2947         (build_min_nt): Don't mess with obstacks.
2948         (build_min): Likewise.
2949         (min_tree_cons): Remove
2950         * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
2951         (build_x_function_call): Likewise.
2952         (build_c_cast): Don't use min_tree_cons.
2953         
2954 1999-11-29  Mark Mitchell  <mark@codesourcery.com>
2955
2956         * pt.c (tsubst_decl): Robustify.
2957
2958 1999-11-27  Mark Mitchell  <mark@codesourcery.com>
2959
2960         * decl2.c (finish_file): Call expand_body for inline functions
2961         that will be written out but that do not yet have RTL.
2962         * semantics.c (expand_body): Do not generate RTL For inline
2963         functions that do not yet need to be written out.
2964
2965 1999-11-25  Mark Mitchell  <mark@codesourcery.com>
2966
2967         * Make-lang.in (CXX_SRCS): Add optimize.c.  
2968         * Makefile.in (CXX_OBJS): Add optimize.o.
2969         (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
2970         (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
2971         (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
2972         (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
2973         (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
2974         (dump.o): Likewise.
2975         (optimize.o): New target.  
2976         * class.c: Don't include splay-tree.h.
2977         * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.  
2978         * cp-tree.h: Include splay-tree.h.
2979         (DECL_UNINLINABLE): New macro.
2980         (CTOR_BEGIN_P, CTOR_END_P): New macros.
2981         (flag_inline_trees): New variable.
2982         (local_variable_p): New function.
2983         (nonstatic_local_decl_p): Likewise.
2984         (optimize_function): Likewise.
2985         (cplus_unsave_expr_now): Remove.
2986         (copy_tree_r): Declare.
2987         (remap_save_expr): Likewise.  
2988         * decl.c (local_variable_p): Don't
2989         make it static.
2990         (local_variable_p_walkfn): New function.
2991         (make_rtl_for_local_static): Remove code to try to avoid writing
2992         out static constants.
2993         (emit_local_var): Fix indentation.
2994         (nonstatic_local_decl_p): New function.
2995         (check_default_argument): Use local_variable_p_walkfn, not
2996         local_variable_p, when walking the tree.
2997         (start_function): Set the DECL_CONTEXT for automatically generated
2998         labels.
2999         (finish_constructor_body): Use CTOR_STMT to mark the end of a
3000         constructor.  
3001         * decl2.c: Don't include splay-tree.h.
3002         (flag_inline_trees): Define.  
3003         * dump.c: Don't include
3004         splay-tree.h.  
3005         * except.c (expand_end_catch_block): Fix comment formatting.
3006         (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
3007         (expand_throw): Tidy comment.  
3008         * init.c (build_vec_delete_1): Use create_temporary_var.  
3009         * lex.c (cplus_tree_code_type): Make it static.
3010         (cplus_tree_code_length): Likewise.
3011         (cplus_tree_code_name): Likewise.  
3012         * optimize.c: New file.  
3013         * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
3014         with computed gotos.
3015         (setup_vtbl_ptr): Mark the beginnings of constructors with
3016         CTOR_STMT.
3017         (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
3018         (expand_body): Call optimize_function.  Save bodies if we're doing
3019         inlining on trees.
3020         * tree.c: Don't include splay-tree.h.  Include insn-config.h and
3021         integrate.h.
3022         (copy_tree_r): Make it public.
3023         (statement_code_p): New function.
3024         (mark_local_for_remap_r): Likewise.
3025         (cp_usave_r): Likewise.
3026         (cp_unsave): Likewise.
3027         (build_cplus_new): Set DECL_CONTEXT for temporary variables.
3028         (walk_tree): Walk into `s' class nodes.  Walk statement chains.
3029         (copy_tree_r): Handle 's' class nodes.  Restore chains for
3030         statements.  Nullify scopes.  Don't copy types.
3031         (init_tree): Set lang_unsave to cp_unsave.
3032         (remap_save_expr): Define.
3033         * ir.texi: Document CTOR_STMT.
3034         
3035 1999-11-24  Jason Merrill  <jason@casey.cygnus.com>
3036
3037         * search.c (note_debug_info_needed): Do perform this optimization
3038         for dwarf2.  
3039         (maybe_suppress_debug_info): Likewise.  Start by clearing
3040         TYPE_DECL_SUPPRESS_DEBUG.
3041
3042 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
3043
3044         * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
3045
3046         * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
3047
3048 1999-11-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3049
3050         * decl.c (pushdecl, grokdeclarator): Don't call a variadic
3051         function with a non-literal format string.
3052
3053         * lex.c (do_identifier): Likewise.
3054
3055         * typeck.c (build_unary_op): Likewise.
3056
3057 1999-11-23  Mark Mitchell  <mark@codesourcery.com>
3058
3059         * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
3060
3061 1999-11-22  Mark Mitchell  <mark@codesourcery.com>
3062
3063         * cp-tree.def (CTOR_COMPLETE): New tree node.
3064         * decl.c (finish_constructor_body): Add it, to mark the end of the
3065         constructor.
3066         (finish_function): Don't call end_protect_partials here.
3067         * ir.texi (CTOR_COMPLETE): Document it.
3068         * semantics.c (expand_stmt): Handle it.
3069         
3070         * cp-tree.def (FUNCTION_NAME): New tree node.
3071         * cp-tree.h (current_function_name_declared): Tweak documentation.
3072         (lang_decl_flags): Add pretty_function_p, adjust dummy.
3073         (DECL_PRETTY_FUNCTION_P): New macro.
3074         * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
3075         etc., in a template function.  Use at_function_scope_p instead of
3076         expanding it inline.
3077         * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
3078         specially.
3079         (tsubst): Handle FUNCTION_NAME.
3080         (tsubst_copy): Likewise.
3081         (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
3082         etc. in instantiation.
3083         * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
3084         even in template functions.
3085         (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
3086         conditional scope at the top of a destructor.
3087         
3088         * error.c (dump_function_decl): Use `[ with ... ]' syntax for
3089         specializations too.
3090
3091 1999-11-22  Nathan Sidwell  <nathan@acm.org>
3092
3093         * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
3094         when actually negative.
3095
3096         * typeck.c (convert_for_assignment): Expand comment about
3097         strange NULL check, moved from ...
3098         (convert_for_initialization): ... here. Remove unneeded
3099         code.
3100
3101 1999-11-21  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
3102
3103         * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
3104         * init.c (build_vec_delete, build_vec_delete_1): Likewise.
3105         Always destruct virtual bases of array components, but never
3106         delete them.
3107         (build_vec_init): Adjust invocations.
3108         (build_delete): Likewise.
3109         * decl2.c (delete_sanity): Likewise.
3110
3111 1999-11-19  Nathan Sidwell  <nathan@acm.org>
3112
3113         * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
3114         * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
3115         * decl2.c (grok_method_quals): Accept `restrict' as applying to
3116         the object pointer. Return such qualifiers.
3117         (grokclassfn): Apply this pointer qualifiers. Cleanup unused
3118         variables.
3119
3120 1999-11-18  Mark Mitchell  <mark@codesourcery.com>
3121
3122         * except.c (expand_end_catch_block): Fix typo.
3123         (expand_exception_blocks): Simplify.  Don't call
3124         expand_leftover_cleanups.
3125
3126 1999-11-15  Jason Merrill  <jason@casey.cygnus.com>
3127
3128         * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
3129         * pt.c (tsubst, case INTEGER_TYPE): Call it.  
3130         Check uses_template_parms.
3131
3132         * class.c (finish_struct): If we're a local class in a template
3133         function, add a TAG_DEFN.
3134         * pt.c (lookup_template_class): If this is a local class in a
3135         template function, call pushtag.
3136         (tsubst_expr, case TAG_DEFN): Handle classes, too.
3137
3138         Emit debug info with the vtable.
3139         * search.c (maybe_suppress_debug_info): New function...
3140         * class.c (finish_struct_1): ...split out from here.
3141         * cp-tree.h: Declare it.
3142         * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
3143         if we're writing out the vtable.
3144         * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, 
3145         note_debug_info_needed): #if 0 out.
3146
3147 1999-11-14  Mark Mitchell  <mark@codesourcery.com>
3148
3149         * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
3150         * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
3151         TREE_PERMANENT.
3152         * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
3153         * decl2.c (lookup_arg_dependent): Use it.
3154         
3155         * cp-tree.h (cp_finish_decl): Change prototype.
3156         (finish_static_data_member_decl): Likewise.
3157         (push_permanent_obstack): Remove declaration.
3158         (push_expression_obstack): Likewise.
3159         (push_scratch_obstack): Likewise.
3160         (DECL_TEMPLATE_PARM_P): Robustify.
3161         (SET_DECL_TEMPLATE_PARM_P): New macro.
3162         * class.c (add_method): Don't manipulate obstacks.
3163         (finish_vtbls): Likewise.
3164         * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
3165         * decl.c (binding_for_name): Don't manipulate obstacks.
3166         (maybe_push_to_top_level): Likewise.
3167         (pop_from_top_level): Likewise.
3168         (duplicate_decls): Likewise.
3169         (pushdecl): Likewise.
3170         (implicitly_declare): Likewise.
3171         (build_typename_type): Likewise.
3172         (start_decl): Likewise.
3173         (cp_finish_decl): Likewise.
3174         (finish_decl): Likewise.
3175         (destroy_local_static): Likewise.
3176         (expand_static_init): Likewise.
3177         (complete_array_type): Likewise.
3178         (grokvardecl): Likewise.
3179         (build_ptrmemfnc_type): Likewise.
3180         (grokdeclarator): Likewise.
3181         (xref_tag): Likewise.
3182         (xref_basetypes): Likewise.
3183         (start_enum): Likewise.
3184         (finish_enum): Likewise.
3185         (start_function): Likewise.
3186         (finish_function): Likewise.
3187         (start_method): Adjust call to cp_finish_decl.
3188         * decl2.c (finish_static_data_member_decl): Don't manipulate
3189         obstacks.
3190         (grokfield): Likewise.
3191         (grokbitfield): Likewise.
3192         (get_temp_name): Likewise.
3193         (get_sentry): Likewise.
3194         (fnish_file): Likewise.
3195         (lookup_arg_dependent): Likewise.
3196         * except.c (call_eh_info): Likewise.
3197         (push_eh_info): Likewise.
3198         (do_pop_exception): Likewise.
3199         (initialize_handler_parm): Likewise.
3200         (expand_end_eh_spec): Likewise.
3201         (alloc_eh_object): Likewise.
3202         (expand_throw): Likewise.
3203         * expr.c (extract_scalar_init): Likewise.
3204         * init.c (build_java_class_ref): Likewise.
3205         * lex.c (get_time_identifier): Likewise.
3206         (snarf_defarg): Likewise.
3207         (add_defarg_fn): Likewise.
3208         (is_global): Simplify.
3209         (do_identifier): Don't check TREE_PERMANENT.
3210         * method.c (emit_thunk): Don't manipulate obstacks.
3211         * parse.y (condition): Adjust call to cp_finish_decl.
3212         (primary): Likewise.
3213         (initdcl): Likewise.
3214         (initdcl0_innards): Likewise.
3215         (nomods_initdcl0): Likewise.
3216         * pt.c (push_inline_template_parms_recursive): Use
3217         SET_DECL_TEMPLATE_PARM_P.
3218         (process_template_parm): Likewise.
3219         (lookup_template_class): Don't manipulate obstacks.
3220         (instantiate_class_template): Adjust call to
3221         finish_static_data_member_decl.
3222         (tsubst_decl): Don't manipulate obstacks.
3223         (tsubst_expr): Likewise.
3224         (instantiate_template): Likewise.
3225         (instantiate_decl): Adjust calls to cp_finish_decl.
3226         * rtti.c (call_void_fn): Don't manipulate obstacks.
3227         (get_tinfo_var): Likewise.
3228         (get_tinfo_fn_unused): Likewise.
3229         (build_dynamic_cast_1): Likewise.
3230         (expand_si_desc): Likewise.
3231         (expand_class_desc): Likewise.
3232         (expand_ptr_desc): Likewise.
3233         (expand_attr_desc): Likewise.
3234         (expand_generic_desc): Likewise.
3235         (synthesize_tinfo_fn): Likewise.
3236         * search.c (expand_upcast_fixups): Likewise.
3237         * semantics.c (finish_asm_stmt): Likewise.
3238         (finish_named_return_value): Likewise.
3239         (begin_class_definition): Likewise.
3240         (finish_class_definition): Likewise.
3241         (finish_typeof): Likewise.
3242         * tree.c (build_cplus_method_type): Likewise.
3243         (reverse_path): Likewise.
3244         (copy_template_template_parm): Likewise.
3245         (build_expr_ptr_wrapper): Likewise.
3246         (push_expression_obstack): Remove.
3247         (push_permanent_obstack): Likewise.
3248         * typeck.c (mark_addressable): Likewise.
3249         
3250 1999-11-13  Mark Mitchell  <mark@codesourcery.com>
3251
3252         * call.c (build_conditional_expr): Use build_target_expr_with_type.
3253         (convert_like): Likewise.
3254         (build_over_call): Likewise.
3255         * cp-tree.h (build_target_expr): Remove.
3256         (build_target_expr_with_type): New function.
3257         * cvt.c (build_up_reference): Use get_target_expr.
3258         * decl.c (build_target_expr): Move to ...
3259         * tree.c (build_target_expr): Here.  Make it static.
3260         (build_target_expr_with_type): New function.  Set DECL_CONTEXT on
3261         the temporary VAR_DECLs.
3262         (get_target_expr): Use it.
3263
3264 1999-11-13  Jason Merrill  <jason@yorick.cygnus.com>
3265
3266         * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
3267         * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
3268         * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
3269         * class.c (set_rtti_entry): Use it.
3270
3271 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
3272
3273         * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
3274         here.
3275         * semantics.c (finish_expr_stmt): Call it here instead.  Move
3276         default_conversion logic to semantic-analysis time.
3277
3278 1999-11-12  Jason Merrill  <jason@yorick.cygnus.com>
3279
3280         * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
3281
3282 Fri Nov 12 12:56:32 MST 1999    Diego Novillo <dnovillo@cygnus.com>
3283
3284         * init.c (init_init_processing): Re-instated Nov 11 patch after
3285         approval.
3286
3287 Fri Nov 12 10:42:02 MST 1999    Diego Novillo <dnovillo@cygnus.com>
3288
3289         * init.c (init_init_processing): Undo patch from Nov 11, 1999.
3290         Patch had not been approved yet.
3291
3292 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
3293
3294         * decl.c (compute_array_index_type): New function, split out from
3295         grokdeclarator.
3296         (create_array_type_for_decl): Likewise.
3297         (grokdeclarator): Use them.
3298
3299         * semantics.c (expand_stmt): Don't suspend_momentary or
3300         resume_momentary.
3301
3302 Thu Nov 11 12:42:11 MST 1999    Diego Novillo <dnovillo@cygnus.com>
3303
3304         * init.c (init_init_processing): Header information for
3305         arrays allocated via `new' should have the same alignment used by
3306         malloc.
3307
3308 1999-11-10  Mark Mitchell  <mark@codesourcery.com>
3309
3310         * error.c (dump_function_name): Don't crash if given a friend
3311         pseudo-instantiation.
3312
3313         * cp-tree.h (build_enumerator): Change prototype.
3314         * decl.c (enum_next_value): Remove.
3315         (enum_overflow): Likewise.
3316         (init_decl_processing): Don't register enum_next_value as a root.
3317         (start_enum): Clear TYPE_VALUES for a redefined enum.
3318         (finish_enum): Reset the type of enumeration constants.
3319         (build_enumerator): Fix indentation.  Don't copy CONST_DECLs when
3320         we don't need to.  Maintain the TYPE_VALUES list and look there
3321         for the previously defined enumeration constant.  Let enumeration
3322         constants have the type of their values until the enumeration type
3323         is complete.
3324         * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
3325         (structsp): Adjust.
3326         * parse.c: Regenerated.
3327         * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
3328         
3329 Wed Nov 10 12:43:21 1999  Philippe De Muyter  <phdm@macqel.be>
3330                           Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3331
3332         * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
3333
3334 1999-11-09  Mark Mitchell  <mark@codesourcery.com>
3335
3336         * cp-tree.h (language_function): Remove x_last_dtor_insn and
3337         x_last_parm_cleanup_insn.
3338         * decl.c (last_dtor_insn): Remove.
3339         (last_parm_cleanup_insn): Likewise.
3340         (expand_start_early_try_stmts): Don't set them.
3341         (store_parm_decls): Likewise.
3342         (save_function_data): Or save them.
3343         (mark_lang_function): Or mark them.
3344
3345 1999-11-08  Mark Mitchell  <mark@codesourcery.com>
3346
3347         * decl.c (store_parm_decls): Generate cleanup code at
3348         semantic-analysis time.  Destroy objects in the correct order.
3349
3350 1999-11-07  Mark Mitchell  <mark@codesourcery.com>
3351
3352         * cp-tree.h (begin_new_placement): Remove.
3353         (finish_new_placement): Likewise.
3354         * class.c (finish_struct_1): Don't suspend_momentary or
3355         resume_momentary.
3356         * decl.c (grokdeclarator): Likewise.
3357         (maybe_build_cleanup_1): Likewise.
3358         * except.c (push_eh_cleanup): Likewise.
3359         (build_terminate_handler): Likewise.
3360         * init.c (build_new_1): Likewise.
3361         * parse.y (parse_decl): Change prototype.
3362         (initdecls, notype_initdecls, initdcl): Don't return int.
3363         (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
3364         (.begin_new_placement): Remove.
3365         (.finish_new_placement): Likewise.
3366         (nonmomentary_expr): Likewise.
3367         (suspend_mom): Likewise.
3368         (condition): Don't suspend_momentary, resume_momentary, or keep
3369         track of need to resume.
3370         (unary_expr): Likewise.
3371         (new_placement): Likewise.
3372         (decl): Likewise.
3373         (structsp): Likewise.
3374         (new_type_id): Likewise.
3375         (maybe_parmlist): Likewise.
3376         (direct_after_type_declaration): Likewise.
3377         (direct_new_declarator): Likewise.
3378         (direct_abstract_declaration): Likewise.
3379         * parse.c: Regenerated.
3380         * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
3381         * semantics.c (begin_new_placement): Remove.
3382         (finish_new_placement): Likewise.
3383         
3384 1999-11-05  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3385
3386         * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
3387         (DECL_TEMPLATE_INFO): Use it.
3388         * decl.c (warn_extern_redeclared_static): Do nothing for
3389         TEMPLATE_DECLs.
3390         * decl2.c (mark_used): Explicitly check for function or variable.
3391         * semantics.c (finish_unary_op_expr): Check whether result is also
3392         an INTEGER_CST.
3393
3394 1999-11-05  Mark Mitchell  <mark@codesourcery.com>
3395
3396         * Makefile.in (typeck2.o): Depend on output.h.
3397         * typeck2.c: Include output.h.
3398
3399         * decl.c (flag_ansi): Remove declaration.
3400
3401         * pt.c (tinst_level_tick): Make it static.
3402         (last_template_error_tick): Likewise.
3403         
3404         * cp-tree.h (mapcar): Remove declaration.
3405         (search_tree): Likewise.
3406         (walk_tree_fn): New typedef.
3407         (walk_tree): New function.
3408         * tree.c (bot_manip): Change prototype.  Adjust to be called via
3409         walk_tree.
3410         (bot_replace): Likewise.
3411         (no_linkage_helper): Likewise.
3412         (copy_tree_r): New function.
3413         (search_tree): Rename, and adjust, to become ...
3414         (walk_tree): New function.
3415         (mapcar): Remove.
3416         (target_remap): Remove.
3417         (target_remap_count): Likewise.
3418         (break_out_target_exprs): Use walk_tree.
3419         * decl.c (local_variable_p): Change prototype.
3420         (check_default_argument): Use walk_tree.
3421         * pt.c (for_each_template_parm_r): New function, split out from ...
3422         (for_each_template_parm): Here.  Use it, via walk_tree.
3423         
3424 1999-11-03  Mark Mitchell  <mark@codesourcery.com>
3425
3426         * class.c (check_bitfield_decl): New function, split out from
3427         finish_stuct_1.
3428         (check_field_decl): Likewise.  Recursively examine members of
3429         anonymous structs.
3430         (finish_struct_1): Use them.
3431         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
3432         
3433 1999-11-02  Mark Mitchell  <mark@codesourcery.com>
3434
3435         * decl.c (grokfndecl): Remove dead code.
3436
3437         * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
3438
3439 1999-11-02  Scott Snyder  <snyder@fnal.gov>
3440
3441         * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
3442         IMAGPART_EXPR.
3443         * pt.c (tsubst_copy): Likewise.
3444
3445 1999-11-01  Jason Merrill  <jason@yorick.cygnus.com>
3446
3447         * decl2.c (maybe_make_one_only): Always make things comdat on
3448         ELF targets, too.
3449
3450 1999-10-31  Mark Mitchell  <mark@codesourcery.com>
3451
3452         * decl.c (finish_function): Call free_after_parsing for functions
3453         we are not immediately turning into RTL.
3454
3455 1999-10-31  Brendan Kehoe  <brendan@cygnus.com>
3456
3457         * cp-tree.h (flag_dump_translation_unit): Add decl.
3458
3459 Sat Oct 30 22:42:50 1999  Stephen L Moshier <moshier@mediaone.net>
3460
3461         * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
3462
3463 1999-10-30  Mark Mitchell  <mark@codesourcery.com>
3464
3465         * decl.c (pop_cp_function_context): Don't call free on a NULL
3466         pointer.
3467         * semantics.c: Include ggc.h.
3468         (expand_body): Do garbage-collection after processing a template
3469         function.  Clear DECL_SAVED_TREE after generating RTL for a
3470         function.
3471         * Makefile.in (semantics.o): Depend on ggc.h.
3472         
3473 1999-10-29  Mark Mitchell  <mark@codesourcery.com>
3474
3475         * cp-tree.h (make_typename_type): Change prototype.
3476         * decl.c (make_typename_type): Only complain if so requested.
3477         * parse.y (nested_name_specifier): Adjust calls.
3478         (typename_sub0): Likewise.
3479         (typename_sub1): Likewise.
3480         * parse.c: Regenerated.
3481         * pt.c (convert_template_argument): Pass complain to
3482         make_typename_type.
3483         (tsubst): Likewise.
3484         
3485 1999-10-28  Mark Mitchell  <mark@codesourcery.com>
3486
3487         * semantics.c (finish_handler): End the scope of the handler
3488         before attaching it to the statement-tree.
3489
3490 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
3491
3492         * rtti.c (build_dynamic_cast_1): Give a better error message for
3493         an attempt to dynamic_cast from a non-polymorphic type.
3494
3495 1999-10-27  Mark Mitchell  <mark@codesourcery.com>
3496
3497         * cp-tree.h (make_temp_vec): Remove.
3498         (make_scratch_vec): Likewise.
3499         * call.c (add_function_candidate): Use make_tree_vec.
3500         (add_conv_candidate): Likewise.
3501         (build_builtin_candidate): Likewise.
3502         (add_template_candidate_real): Likewise.
3503         * class.c (resolve_address_of_overloaded_function): Likewise.
3504         * decl.c (start_function): Don't fool with the momentary obstack.
3505         (finish_function): Likewise.
3506         * init.c (expand_direct_vtbls_init): Likewise.
3507         (begin_init_stmts): Likewise.
3508         (finish_init_stmts): Likewise.
3509         * pt.c (add_to_template_args): Use make_tree_vec.
3510         (check_explicit_specialization): Likewise.
3511         (coerce_template_parms): Likewise.
3512         (lookup_template_class): Don't fool with the momentary obstack.
3513         (instantiate_class_template): Likewise.
3514         (tsubst_template_arg_vector): Use make_tree_vec.
3515         (tsubst_aggr_type): Don't fool with the momentary obstack.
3516         (tsubst_decl): Likewise.  Use make_tree_vec.
3517         (try_one_overload): Likewise.
3518         (try_class_unification):  Don't fool with the momentary obstack.
3519         (get_bindings_real): Use make_tree_vec.
3520         (set_mangled_name_for_template_decl): Likewise.
3521         * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
3522         * semantics.c (finish_expr_stmt): Likewise.
3523         (finish_do_stmt): Likewise.
3524         (finish_for_expr): Likewise.
3525         (finish_switch_cond): Likewise.
3526         (do_pushlevel): Likewise.
3527         (do_poplevel): Likewise.
3528         * tree.c (make_temp_vec): Remove.
3529         
3530         * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.  Dump
3531         CLEANUP_P for a TRY_BLOCK.
3532         * ir.texi: Document SAVE_EXPR.
3533
3534 Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
3535
3536         * call.c (build_over_call):  Check that the built-in function is
3537         of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
3538         * typeck.c (build_function_call_real): Similarly. 
3539
3540 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
3541
3542         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
3543         remember_end_note.
3544
3545 1999-10-24  Mark Mitchell  <mark@codesourcery.com>
3546
3547         * decl.c (push_overloaded_decl_1): Use pushdecl.
3548         
3549         * decl.c (auto_function): Replace #ifdef'd __inline with just
3550         plain inline.
3551         * lex.c (my_get_run_time): Likeise.
3552         (yyprint): Likewise.
3553         (identifier_type): Likewise.
3554         * method.c (start_squangling): Likewise.
3555         (end_squangling): Likewise.
3556         (icat): Likewise.
3557         (old_backref_index): Likewise.
3558         (flush_repeats): Likewise.
3559         (issue_ktype): Likewise.
3560         * parse.y (empty_parms): Likewise.
3561         * parse.c: Regenerated.
3562         
3563 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
3564
3565         * dump.c (dequeue_and_dump): Replace several uses of
3566         queue_and_dump_index with dump_child.
3567
3568 1999-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3569
3570         * expr.c: Include tm_p.h.
3571
3572 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
3573
3574         * cp-tree.h (SCOPE_PARTIAL_P): New macro.
3575         (pushlevel_temporary): Remove.
3576         (add_scope_stmt): New function.
3577         * decl.c (pushlevel_temporary): Remove.
3578         (poplevel): Use add_scope_stmt.
3579         (start_decl_1): Likewise.
3580         * semantics.c (add_scope_stmt): New function.
3581         (do_pushlevel): Use it.
3582         (do_poplevel): Use it.
3583         (expand_stmt): Check SCOPE_PARTIAL_P.
3584         
3585         * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
3586         * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
3587         * expr.c (cplus_expand_expr): Expand it.
3588         * ir.texi: Document EMPTY_CLASS_EXPR.
3589         
3590 1999-10-20  Mark Mitchell  <mark@codesourcery.com>
3591
3592         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
3593         parameters as having namespace scope.
3594
3595 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
3596
3597         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
3598         (mangling_flags): New type.
3599         (build_overload_int): Change prototype.
3600         (build_overload_value): Likewise.
3601         (numeric_output_need_bar): Improve comment.
3602         (mangle_expression): New function, broken out from ...
3603         (build_overload_int): Here.
3604         (build_overload_value): Adjust for use of mangling flags.  Don't
3605         warn about real-valued template parameters here.  Do handle
3606         complex expressions involving real-valued template parameters.
3607         (build_template_parm_names): Encase non-type template parameters
3608         in underscores, if necessary.
3609         (process_overload_item): Remove conditional on
3610         PARM_CAN_BE_ARRAY_TYPE.
3611
3612 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
3613
3614         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
3615
3616         * ir.texi: Clean up documentation of RETURN_INIT.
3617         
3618 1999-10-15  Greg McGary  <gkm@gnu.org>
3619
3620         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
3621         (lang_init): Set default for flag_bounds_check if still "unspecified".
3622
3623 1999-10-13  Andrew Haley  <aph@cygnus.com>
3624
3625         * class.c (finish_struct_1): Force alignment of non-bitfields to
3626         BITS_PER_UNIT.
3627
3628 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
3629
3630         * typeck2.c (process_init_constructor): Handle empty constructors.
3631
3632 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
3633
3634         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
3635
3636         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
3637         array error.
3638
3639 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
3640
3641         * decl.c (make_rtl_for_local_static): Don't create register RTL
3642         for addressable constants.
3643
3644 1999-10-13  Nathan Sidwell  <nathan@acm.org>
3645
3646         * cp-tree.h (build_x_va_arg): Prototype new function.
3647         * call.c (build_x_va_arg): Define it.
3648         * parse.y (unary_expr): Call build_x_va_arg.
3649         
3650         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
3651         * call.c (convert_type_from_ellipsis): Define it.
3652         * decl.c (init_decl_processing): Set lang_type_promotes_to.
3653
3654         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
3655
3656 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
3657
3658         * class.c (fixed_type_or_null): Always set *nonnull.
3659
3660 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3661
3662         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
3663         __GNUC__ and __GNUC_MINOR__.
3664
3665 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
3666
3667         * cp-tree.h (make_rtl_for_local_static): New function.  
3668         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
3669         local statics ...
3670         (make_rtl_for_local_static): Here.
3671         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
3672         
3673 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3674
3675         * method.c: Include tm_p.h.
3676
3677 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3678
3679         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
3680         * lex.c (cp_make_lake_type): Likewise.
3681         * tree.c (init_tree): Init make_lang_type_fn.
3682         
3683 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
3684
3685         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
3686         paramter.
3687         
3688         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
3689         local statics if we don't really have them.
3690
3691         * ir.texi: Improve documentation for STMT_EXPR.  Describe
3692         CLEANUP_POINT_EXPR.
3693
3694 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
3695
3696         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
3697
3698 1999-10-07  Greg McGary  <gkm@gnu.org>
3699
3700         * class.c (finish_struct_1): Use simpler method of
3701         removing elements of a singly-linked list which doesn't
3702         lose for classes without data members.
3703
3704 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
3705
3706         * friend.c (make_friend_class): Robustify.
3707
3708         * semantics.c (finish_object_call_expr): Reject calls to template
3709         types.
3710
3711 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
3712
3713         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
3714
3715         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
3716         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
3717         CLASSTYPE_VFIELD.
3718         * class.c (get_vfield_offset): Likewise.
3719         (finish_base_struct): Likewise.
3720         (modify_one_vtable): Likewise.
3721         (fixup_vtable_deltas): Likewise.
3722         (finish_struct_1): Likewise.
3723         * init.c (expand_virtual_init): Likewise.
3724         * search.c (lookup_field_1): Likewise.
3725         (expand_upcast_fixups): Likewise.
3726         * typeck.c (build_component_ref): Likewise.
3727         (build_binary_op_nodefault): Likewise.
3728         
3729         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
3730         * ir.texi: Document TYPE_VFIELD.
3731
3732 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
3733
3734         * decl.c (grokdeclarator): Only warn about non-zero arrays if
3735         !in_system_header (linux socketbits.h can give this for
3736         __cmsg_data, which is using a GNU extension).
3737
3738 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
3739
3740         * decl2.c (start_static_storage_duration_function): Push the
3741         function declaration so it ends up in namespace scope.
3742
3743         * dump.c (DUMP_CHILDREN): Remove.
3744         (DUMP_BINFO): Adjust.
3745         (struct dump_node_info): Remove dump_children_p.
3746         (queue_and_dump_type): Remove dump_children_p parameter.
3747         (queue): Don't set dump_children_p.
3748         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
3749         queue_and_dump_index.
3750         (dequeue_and_dump): Unconditionally print children.  Adjust calls
3751         to functions mentioned above.
3752         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
3753         
3754         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
3755         * dump.c (dequeue_and_dump): Dump them.
3756         
3757         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
3758
3759         * decl.c (start_function): Set current_in_charge_parm for
3760         constructors, too, where appropriate.
3761         * search.c (fixup_all_virtual_upcast_offsets): New function.
3762         (expand_indirect_vtbls_init): Use it.
3763         
3764 1999-10-04  Nathan Sidwell  <nathan@acm.org>
3765
3766         * decl2.c (grok_alignof): Don't decay lvalues.
3767         
3768         * init.c (build_new): Remove unused variable.
3769
3770 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
3771
3772         * cp-tree.h (struct language_function): Remove static_labelno.
3773         (static_labelno): Remove macro.
3774         * method.c (build_overload_nested_name): Make static_labelno
3775         static here.
3776         
3777         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
3778         to decide whether or not a function is defined.
3779
3780         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
3781         situations where make_node will do it automatically.
3782         * decl.c (grok_reference_init): Likewise.
3783         (expand_static_init): Likewise.
3784         (do_static_initialization): Likewise.
3785         * init.c (perform_member_init): Likewise.
3786         (expand_aggr_init_1): Likewise.
3787         (build_new_1): Likewise.
3788         * method.c (do_build_copy_constructor): Likewise.
3789         (do_build_assign_ref): Likewise.
3790         * search.c (expand_upcast_fixups): Likewise.
3791         * semantics.c (finish_stmt_expr): Likewise.
3792         * typeck.c (build_unary_op): Likewise.
3793         (check_return_expr): Likewise.
3794
3795 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
3796
3797         * init.c (build_vec_delete_1): Fold COND_EXPRs.
3798
3799 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
3800
3801         * cp-tree.def (VEC_INIT_EXPR): Remove.
3802         * cp-tree.h (struct stmt_tree): New type.
3803         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
3804         x_stmt_tree.
3805         (class_cache_firstobj): Remove.
3806         (struct language_function): Remove stmts_are_full_exprs_p,
3807         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
3808         (current_stmt_tree): New macro.
3809         (last_tree): Adjust.
3810         (last_expr_type): Likewise.
3811         (doing_semantic_analysis_p): Simplify.
3812         (stmts_are_full_exprs_p): Adjust.
3813         (begin_tree): Remove prototype.
3814         (end_tree): Likewise.
3815         (begin_stmt_tree): Change prototype.
3816         (finish_stmt_tree): Likewise.
3817         (building_stmt_tree): Simplify.
3818         * decl.c (mark_stmt_tree): New function.
3819         (mark_saved_scope): Use it.
3820         (start_function): Rearrange slightly to call begin_stmt_tree 
3821         earlier.
3822         (save_function_data): Tweak.
3823         (finish_function): Adjust call to finish_stmt_tree.
3824         (mark_lang_function): Use mark_stmt_tree.
3825         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
3826         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
3827         (build_vec_init): Remove creation of stand-in intializer.
3828         * pt.c (begin_tree): Remove.
3829         (end_tree): Likewise.
3830         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
3831         (begin_compound_stmt): Handle a compound-statement outside of a
3832         function.
3833         (begin_stmt_expr): Handle a statement-expression outsidef of a
3834         function.
3835         (finish_stmt_expr): Likewise.
3836         (begin_class_definition): Don't call begin_tree.
3837         (finish_inline_definitions): Don't call end_tree.
3838         (begin_stmt_tree): Take a pointer to tree, not a function as input.
3839         (finish_stmt_tree): Likewise.
3840         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
3841         (mapcar): Likewise.
3842         
3843         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
3844         * parse.c: Regenerated.
3845         
3846         * dump.c (dqueue_and_dump): Dump bitfieldness.
3847         
3848         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
3849         bitfields, rather than DECL_BIT_FIELD.
3850         * ir.texi: Document how to tell whether or not a field is a
3851         bitfield.
3852         
3853         * lex.c (make_lang_type): Fix typo in comment.
3854
3855 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
3856
3857         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
3858
3859 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
3860
3861         * pt.c (tsubst_decl): If the type of a template instantiation is
3862         bogus, so is the whole instantiation.
3863
3864 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
3865
3866         * decl.c (initialize_local_var): Handle static variables here.
3867         (cp_finish_decl): Tweak handling of function-scope static
3868         variables.
3869         * semantics.c (expand_stmt): Handle DECL_STMTs for static
3870         variables.
3871
3872         * method.c (emit_thunk): Don't crash when -fsyntax-only.
3873
3874         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
3875         global_dtor_p.  Add init_priority.
3876         (DECL_ACCESS): Adjust accordingly.
3877         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
3878         (GLOBAL_INIT_PRIORITY): Likewise.
3879         * decl.c (lang_mark_tree): Adjust accordingly.
3880         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
3881         and GLOBAL_INIT_PRIORITY.
3882         * dump.c (dequeue_and_dump): Print them.
3883         * ir.texi: Document them.
3884
3885         * decl2.c (struct priority_info_s): Remove initialization_sequence
3886         and destruction_sequence.
3887         (start_static_storage_duration_function): Return the body of the
3888         function.  Convert for function-at-a-time mode.
3889         (generate_inits_for_priority): Remove.
3890         (finish_static_storage_duration_function): Change prototype.
3891         Adjust for function-at-a-time mode.
3892         (do_static_initialization): Likewise.
3893         (do_static_destruction): Likewise.
3894         (do_static_initialization_and_destruction): Remove.
3895         (start_static_initialization_or_destruction): New function.
3896         (finish_static_initialization_or_destruction): Likewise.
3897         (get_priority_info): Don't manipulation initialization_sequence or
3898         destruction_sequence.
3899         (prune_vars_needing_no_initialization): New function.
3900         (write_out_vars): Likewise.
3901         (finish_file): Use the various new functions instead of the old.
3902         
3903 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
3904
3905         * cp-tree.h (warn_float_equal): Declare.
3906         * decl2.c (warn_float_equal): Define.
3907         (lang_decode_option): Recognize -W[no-]float-equal.
3908         * typeck.c (build_binary_op_nodefault): Conditionally warn
3909         about equality tests of floating point types.
3910
3911 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
3912
3913         Support normal type_info-based EH mechanisms with -fno-rtti.
3914         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
3915         (build_eh_type_type_ref): Likewise.
3916         (build_eh_type): Remove.
3917         (expand_throw): Call build_eh_type_type, not build_eh_type.
3918         * decl2.c (import_export_decl): Don't associate the tinfo fn with
3919         the vtable if -fno-rtti.
3920         * decl.c (init_decl_processing): Always init_rtti_processing.
3921
3922         * rtti.c (get_typeid): Don't complain about -fno-rtti.
3923
3924         * class.c (class_cache_obstack, class_obstack): Remove.
3925         (init_class_processing): Don't initialize class_obstack.
3926         (push_cache_obstack): Remove.
3927         (pushclass): Don't call it.
3928         * cp-tree.h: Remove prototype for push_cache_obstack.
3929         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
3930         (pushlevel_class): Don't push_decl_level.
3931         (poplevel_class): Don't pop_stack_level.
3932         (push_class_level_binding): Don't push_cache_obstack.
3933         (init_decl_processing): Don't intialize decl_obstack.
3934         * search.c (push_class_decls): Don't push_cache_obstack.
3935         * tree.c (list_hash_add): Put hash node on permanent_obstack.
3936         (hash_tree_cons): Don't mess with obstacks.
3937         (print_lang_statistics): Don't print stats for class_obstack and
3938         decl_obstack.
3939
3940 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
3941
3942         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
3943         * ir.texi: Document DECL_EXTERNAL.
3944
3945         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
3946         * ir.texi: Document THUNK_DECLs.
3947
3948         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
3949         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
3950         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
3951         * error.c (dump_template_bindings): Remove unused parameter.
3952         Handle multiple levels of template parameters.
3953         (dump_template_decl): Use `parms', not `args', for template
3954         parameters.  Fix thinko.
3955         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
3956         flags to dump_template_bindings.
3957         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
3958         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
3959         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
3960         (tsubst_copy): Clarify variable name.
3961         (most_general_template): Robustify.
3962         
3963 1999-09-29  Nathan Sidwell  <nathan@acm.org>
3964
3965         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
3966         to change primary template rendering.
3967
3968 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
3969
3970         * cp-tree.h (UPT_TEMPLATE): Remove.
3971         (UPT_PARMS): Likewise.
3972         (DECL_NEEDED_P): New macro.
3973         * decl2.c (finish_vtable_vardecl): Use it.
3974         (finish_objects): Don't crash with -fsyntax-only.
3975         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
3976         -fsyntax-only.
3977         * pt.c (tsubst_friend_function): Remove FIXME that talks about
3978         obstacks.
3979         (tsubst_expr): Correct handling of function try-blocks.
3980         * semantics.c: Include flags.h.
3981         (expand_body): Don't do RTL generation if -fsyntax-only.
3982         * Makefile.in (semantics.o): Depends on flags.h.
3983         
3984 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
3985
3986         * pt.c (most_general_template): Adjust declaration.
3987
3988         * cp-tree.h: (most_general_template): Declare.
3989
3990         * error.c (dump_template_value): Rename to ...
3991         (dump_template_argument): This.
3992         (dump_template_argument_list): New function.
3993         (dump_type): Use it.
3994         (dump_template_parameter): New function.
3995         (dump_template_decl): Use it.
3996         (dump_template_bindings): New function.
3997         (dump_function_decl): Use it. Pretty print function template
3998         instantiations.
3999
4000 1999-09-28  Nathan Sidwell  <nathan@acm.org>
4001
4002         * decl.c (grokdeclarator): Distinguish parameter context for
4003         diagnostics. Tidy up missing type diagnostic.
4004         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
4005
4006 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
4007
4008         * ir.texi: Improve documentation for TARGET_EXPR.
4009
4010 1999-09-27  Nathan Sidwell  <nathan@acm.org>
4011
4012         Augment stringification of trees.
4013         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
4014         (fndecl_as_string, type_as_string_real, args_as_string,
4015         code_as_string, language_as_string, parm_as_string,
4016         op_as_string, assop_as_string, cv_as_string): Remove.
4017         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
4018         (context_as_string): Declare new function.
4019         * error.c (cp_printers): Move definition.
4020         (OB_UNPUT): Remove.
4021         (OB_END_TEMPLATE_ID): Adjust.
4022         (interesting_scope_p): Remove.
4023         (dump_scope): New static function.
4024         (dump_qualifiers): Adjust prototype, reimplement.
4025         (dump_template_value): Use tree_string_flags.
4026         (dump_type_real): Move back to dump_type.
4027         (dump_type): Adjust prototype. Use tree_string_flags.
4028         (dump_aggr_type): Likewise. Use dump_template_parms.
4029         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
4030         Return pad flag.
4031         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
4032         (dump_simple_decl): Likewise.
4033         (dump_decl): Likewise. Use dump_template_decl.
4034         (dump_template_decl): New static function broken out of dump_decl.
4035         (dump_function_decl): Adjust prototype. Use tree_string_flags.
4036         (dump_parameters): Likewise. Prefix space.
4037         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
4038         (dump_function_name): Likewise. Use dump_template_parms.
4039         (dump_template_parms): New static function broken out of
4040         dump_function_name.
4041         (dump_expr_list): Adjust prototype. Use tree_string_flags.
4042         (dump_expr): Likewise.
4043         (fndecl_as_string): Removed
4044         (type_as_string_real): Removed
4045         (dump_binary_op): Adjust prototype. Use tree_string_flags.
4046         (dump_unary_op): Likewise.
4047         (type_as_string): Likewise.
4048         (expr_as_string): Likewise.
4049         (decl_as_string): Likewise.
4050         (context_as_string): New function.
4051         (lang_decl_name): Adjust.
4052         (decl_to_string): New static print callback.
4053         (expr_to_string): Likewise.
4054         (fndecl_to_string): Likewise.
4055         (code_as_string): Renamed to ...
4056         (code_to_string): ... here. Adjust.
4057         (language_as_string): Renamed to ...
4058         (language_to_string): ... here. Adjust.
4059         (parm_as_string): Renamed to ...
4060         (parm_to_string): ... here.
4061         (op_as_string): Renamed to ...
4062         (op_to_string): ... here.
4063         (assop_as_string): Renamed to ...
4064         (assop_to_string): ... here.
4065         (type_to_string): New static print callback.
4066         (args_as_string): Renamed to ...
4067         (args_to_string): ... here. Adjust.
4068         (cv_as_string): Renamed to ...
4069         (cv_to_string): ... here. Adjust.
4070         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
4071         (print_template_context): Likewise.
4072
4073 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
4074
4075         * cp-tree.h (expand_throw): Remove prototype.
4076         * except.c (expand_throw): Make it static.  Use tree-generation
4077         functions, rather than RTL-generation functions.
4078         (build_throw): Use it.
4079         * expr.c: Include except.h.
4080         (cplus_expand_expr): Don't call expand_throw here.
4081         * Makefile.in (expr.o): Depend on except.h.
4082         * ir.texi: Update documentation for THROW_EXPR.
4083         
4084         * decl.c (start_function): Set x_dont_save_pending_sizes rather
4085         than calling get_pending_sizes.
4086         * init.c (build_new): Don't save and restore
4087         immediate_size_expand; instead, assert that it has the expected
4088         value already.
4089
4090 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4091
4092         * lex.c (compiler_error): Add missing call to va_end().
4093
4094 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
4095
4096         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
4097         * ir.texi: Document RESULT_DECL and DECL_RESULT.
4098
4099         * cp-tree.h (check_return_expr): New function.
4100         * decl.c (finish_constructor_body): New function.
4101         (pushdecl): Put global friend functions in namespace binding
4102         level, not the class binding level.
4103         (finish_destructor_body): Make sure the dtor_label is always
4104         defined.  Fix typo in comment.
4105         (finish_function): Move generation of constructor-termination code
4106         to semantic-analysis time.  Move generation of implicit `main'
4107         return value to semantic-analysis time.
4108         * semantics.c (finish_return_stmt): Generate goto's to
4109         ctor_label/dtor_label here.  Use check_return_expr to do semantic
4110         analysis on the returned expression.
4111         * typeck.c (maybe_warn_about_returning_address_of_local): New
4112         function split out from c_expand_return.
4113         (check_return_expr): Likewise.
4114         (c_expand_return): Just generate the RTL for the return.
4115         
4116 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
4117
4118         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
4119         (cleanup_type): Likewise.
4120         (search_tree): Change prototype.
4121         * decl.c (local_variable_p): Adjust for new interface to
4122         search_tree.
4123         (check_default_argument): Likewise.
4124         * error.c (dump_expr): Handle INIT_EXPR.
4125         * except.c (expand_throw): Don't make cleanup_type a local static.
4126         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
4127         * init.c (build_new): Call build_new_1 directly, rather than
4128         building a NEW_EXPR.
4129         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
4130         processing file-scope initializers.
4131         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
4132         * tree.c: Include splay-tree.h
4133         (no_linkage_helper): Adjust for new interface to search_tree.
4134         (search_tree): Pass around pointers to tree nodes, rather than the
4135         nodes themselves.  Handle VEC_INIT_EXPR.
4136         (no_linkage_check): Adjust for new interface to search_tree.
4137         (mapcar): Handle VEC_INIT_EXPR.
4138         (target_remap): New variable.
4139         (bot_manip): Use it.
4140         (bot_replace): New function.
4141         (break_out_target_exprs): Use it to remap all variables used in a
4142         default argument expression.
4143         * typeck.c (build_modify_expr): Don't crash when outside a
4144         function and presented with an INIT_EXPR assignment
4145         * Makefile.in (tree.o): Depend on splay-tree.h.
4146
4147 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
4148
4149         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
4150         DECL_BUILT_IN.
4151         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
4152         callers changed.
4153         Set the builtin's DECL_BUILT_IN_CLASS.
4154
4155 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
4156
4157         * decl.c (pushdecl): Don't make local declarations of extern
4158         variables give the variable a DECL_CONTEXT for the function.
4159         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
4160         Don't accidentally make RTL for local declarations.
4161         (emit_local_var): Handle declarations with asm-specifiers here.
4162         
4163 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
4164
4165         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
4166         STMT_IS_FULL_EXPR_P.
4167
4168         * cp-tree.h (language_function): Add cannot_inline.
4169         * decl.c (start_function): Restore current_function_cannot_inline
4170         from the saved value.
4171         (save_function_data): Save current_function_cannot_inline.
4172         * decl2.c (start_objects): Change prototype.  Build the function
4173         in function-at-a-time mode.
4174         (finish_objects): Likewise.
4175         (generate_ctor_or_dtor_function): Adjust accordingly.
4176         
4177         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
4178         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
4179         Don't call expand_anon_union_decl here
4180         * semantics.c (exapnd_stmt): Call it here, instead.
4181         * typeck.c (mark_addressable): Addressed variables are implicitly
4182         used.
4183         
4184 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4185
4186         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
4187         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
4188         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
4189         * cp-tree.h: Add tree checking macros to various tree access
4190         macros. 
4191         * ptree.c (print_lang_decl): Test for function or variable
4192         before accessing template info.
4193
4194 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
4195
4196         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
4197         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
4198         * decl2.c (lang_f_options): Add -fshort-wchar.
4199         * cp-tree.h: Declare flag_short_wchar.
4200         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
4201         int' for wchar_t.
4202
4203 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4204
4205         * ir.texi: Fix formatting errors and typos.
4206
4207 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
4208
4209         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
4210
4211         * decl.c (pushdecl): Do create a binding for extern "C" functions,
4212         but not for their DECL_ASSEMBLER_NAMEs.
4213         (lookup_name_current_level): Fix formatting.
4214         (xref_tag): Likewise.
4215         * decl2.c (start_objects): Mark static constructors and
4216         destructors as used.
4217
4218 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
4219
4220         * decl.c (define_case_label): Don't crash if we're not in a switch.
4221
4222         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
4223         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
4224         for unsupported flags.
4225
4226 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
4227
4228         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
4229         Accept and warn about -fthis-is-variable.
4230
4231 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
4232
4233         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
4234         CLEANUP_STMT, and SCOPE_STMT.
4235
4236         * decl2.c (lang_decode_option): Adjust, in the wake of recent
4237         changes to option processing.
4238
4239 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4240
4241         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
4242         function pointer from pmfs with no object given.
4243         (convert_for_assignment): Do not return error when converting
4244         pmfs.
4245
4246 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
4247
4248         * lex.c (internal_filename): New variable.
4249         (INTERNAL_FILENAME): New macro.
4250         (init_parse): Allocate internal_filename and mark as root.  Use it
4251         instead of a string constant.
4252
4253 1999-09-21  Nathan Sidwell  <nathan@acm.org>
4254
4255         Reimplement dynamic cast and catch matching.
4256         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
4257         * search.c (dynamic_cast_base_recurse): New function.
4258         (get_dynamic_cast_base_type): New function for dynamic cast.
4259         * rtti.c (build_dynamic_cast_1): Determine source and target
4260         class relationship. Call __dynamic_cast_2.
4261         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
4262         (__user_type_info::dyncast): New dynamic cast dispatcher.
4263         (__user_type_info::sub_kind): New nested enumeration.
4264         (__user_type_info::contained_p): sub_kind predicate.
4265         (__user_type_info::contained_public_p): Likewise.
4266         (__user_type_info::contained_nonpublic_p): Likewise.
4267         (__user_type_info::contained_nonvirtual_p: Likewise.
4268         (__user_type_info::upcast_result): New nested struct.
4269         (__user_type_info::dyncast_result): New nested struct.
4270         (*::do_upcast): New catch function.
4271         (*::do_dyncast): New dynamic cast function.
4272         (__user_type_info::find_public_subobj): New dynamic cast
4273         helper dispatcher.
4274         (*::do_find_public_subobj): New dynamic cast helper function.
4275         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
4276         (__user_type_info::dyncast): Define dynamic cast dispatcher.
4277         (*::do_upcast): Define catch function.
4278         (*::do_dyncast): Define dynamic cast function.
4279         (*::do_find_public_subobj): Define dynamic cast helper function.
4280         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
4281         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
4282         (__dynamic_cast_2): New dynamic cast runtime.
4283
4284 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
4285
4286         * cp-tree.h (finish_stmt_expr): Change prototype.
4287         * expr.c (cplus_expand_expr): Adjust call accordingly.
4288         * init.c (finish_init_stmts): Likewise.
4289         * parse.y (primary): Likewise.
4290         * pt.c (tsubst_copy): Likewise.
4291         * semantics.c (finish_stmt_expr): Don't take two parameters.
4292         Don't remove generated BLOCKs from the block-tree.
4293
4294         Remove support for assigning to `this'.
4295         * NEWS: Note that fact.
4296         * class.c (build_vbase_path): Don't check flag_this_is_variable.
4297         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
4298         (language_function): Remove assigns_this, just_assigned_this, and
4299         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
4300         (base_init_expr): Remove.
4301         (current_vcalls_possible_p): New macro.
4302         (vtbls_set_up_p): Likewise.
4303         (emit_base_init): Change prototype.
4304         * decl.c (finish_destructor_body): New function, split out from
4305         finish_function.
4306         (current_function_assigns_this): Remove.
4307         (current_function_just_assigned_this): Likewise.
4308         (start_function): Don't set them.
4309         (finish_function): Don't check them.  Don't emit
4310         base-initialization code here.  Generate code for destructors when
4311         doing semantic analysis.
4312         (finish_stmt): Don't check current_function_just_assigned_this.
4313         * decl2.c (lang_f_options): Remove this-is-variable.
4314         (lang_decode_option): Likewise.
4315         (grokclassfn): Don't check flag_this_is_variable.
4316         * init.c (emit_base_init): Return the expression generated.
4317         (construct_virtual_bases): Don't push/pop obstacks.  Fix
4318         typo.
4319         (build_new_1): Don't check flag_this_is_variable.
4320         (get_temp_regvar): Don't set DECL_REGISTER.
4321         (build_vec_init): Don't call use_variable.
4322         * lang-options.h: Remove "-fthis-is-variable" and
4323         "-fno-this-is-variable".
4324         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
4325         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
4326         expand_expr_stmt.
4327         * semantics.c (finish_expr_stmt_real): Rename to ...
4328         (finish_expr_stmt): This.  Remove assigned_this parameter.
4329         (begin_if_stmt): Call do_pushlevel before starting the statement.
4330         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
4331         blocks.
4332         (setup_vtbl_ptr): Emit initialization code for bases and members
4333         at semantic-analysis time.  Emit code to initialize vtables in
4334         destructors here.
4335         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
4336         Don't handle CTOR_INITIALIZER any more.
4337         * typeck.c (build_modify_expr): Don't check for assignments to
4338         this.
4339         (c_expand_return): Don't suggest assigning to `this'.
4340         
4341         * Makefile.in (decl.o): Depend on RTL_H.
4342         (decl2.o): Likewise.
4343         (class.o): Likewise.
4344         (call.o): Likewise.
4345         (method.o): Likewise.
4346         (search.o): Likewise.
4347         (tree.o): Likewise.
4348         (pt.o): Likewise.
4349
4350         * decl.c (duplicate_decls): When a builtin function is redeclared
4351         as static, make sure it is mangled correctly.
4352
4353         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
4354         detail about the statement-tree.
4355         
4356 1999-09-20  Nathan Sidwell  <nathan@acm.org>
4357
4358         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
4359
4360 1999-09-20  Nick Clifton  <nickc@cygnus.com>
4361
4362         * decl2.c (lang_decode_option): Extend comment.
4363
4364 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
4365
4366         * typeck.c: Include "tm_p.h".
4367
4368 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
4369
4370         * ir.texi: New file.
4371
4372 1999-09-19  Paul Burchard <burchard@pobox.com>
4373
4374         * semantics.c (expand_stmt): Initialize return value.
4375
4376 1999-09-18  Paul Burchard <burchard@pobox.com>
4377
4378         * gxxint.texi: G++ now implements namespaces.
4379         
4380 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
4381
4382         * decl.c (pop_label): Don't warn about unused labels more than
4383         once.
4384         * semantics.c (finish_goto_stmt): Always marked used labels as
4385         used.
4386
4387         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
4388         even when the declaration is external.
4389         (cp_finish_decl): Adjust call to layout_var_decl.
4390         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
4391
4392 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4393
4394         * typeck.c (get_member_function_from_ptrfunc): Always consider
4395         virtuality inside member pointer.
4396
4397 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
4398
4399         Turn on function-at-a-time processing.  
4400         * cp-tree.h (doing_semantic_analysis_p): New macro.
4401         (SF_DEFAULT): Define to zero, not SF_EXPAND.
4402         (start_handler_parms): Change prototype.
4403         (expand_start_catch_block): Likewise.
4404         (expand_end_catch_block): Likewise.
4405         (expand_start_eh_spec): Likewise.
4406         (expand_end_eh_spec): Declare.
4407         (finish_handler_parms): Change prototype.
4408         (begin_catch_block): Declare.
4409         (finish_handler): Change prototype.
4410         (do_pushlevel): Declare.
4411         (do_poplevel): Likewise.  
4412         * decl.c (pushlevel): Don't create
4413         binding levels when not doing semantic analysis.
4414         (poplevel): Don't pop them.
4415         (pushdecl): Assert that we are never called when not doing
4416         semantic analysis.
4417         (pushdecl_top_level): Use push_to_top_level.
4418         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
4419         label when expanding.
4420         (cp_finish_decl): Only inject for-scope variables when doing
4421         semantic analysis.  Add comments.
4422         (start_handler_parms): Return the handler parm.
4423         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
4424         already set.  Reinitialize from saved function data if available.
4425         Don't pushlevel when not doing semantic analysis.
4426         (store_parm_decls): Only generate RTL when expanding.  Only
4427         pushdecl when doing semantic analysis.  Set
4428         current_eh_spec_try_block if appropriate.
4429         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
4430         Combine common code.  Don't poplevel when not doing semantic
4431         analysis.
4432         (push_cp_function_context): Don't expand functions without an
4433         explicit call to expand_body.
4434         (mark_lang_function): Make eh_spec_try_block and
4435         x_scope_stmt_stack.  
4436         * except.c (expand_end_eh_spec): Don't
4437         declare.
4438         (process_start_catch_block): Likewise.
4439         (push_eh_cleanup): Use finish_decl_cleanup.
4440         (initialize_handler_parm): New function.
4441         (expand_start_catch_block): Use it.
4442         (expand_end_catch_block): Use tree-generation functions, not
4443         RTL-generation functions.
4444         (expand_start_eh_spec): Likewise.
4445         (expand_end_eh_spec): Likewise.
4446         (expand_exception_blocks): Simplify.
4447         (start_anon_func): Use do_pushlevel.
4448         (end_anon_func): Use do_poplvel.  Call expand_body for the
4449         function.  
4450         * expr.c (do_case): Don't call define_case_label.  
4451         * init.c (create_temporary_var): Set DECL_CONTEXT for local
4452         variables.  
4453         * method.c (emit_thunk): Call expand_body for the
4454         thunk.
4455         (sythesize_method): Likewise.  
4456         * parse.y (handler_args): Give it ttype.
4457         (eat_saved_input): Call expand_body.
4458         (base_init): Use do_pushlevel.
4459         (pending_inline): Call expand_body.
4460         (handler): Adjust calls to finish_handler_parms and
4461         finish_handler.
4462         (handler_args): Don't call expand_start_catch_block.  Return the
4463         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
4464         * parse.c: Regenerated.
4465         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
4466         * semantics.c (do_pushlevel): Give it external linkage.  Build
4467         SCOPE_STMTs.
4468         (do_poplevel): Likewise.
4469         (finish_case_label): Call define_case_label when doing semantic
4470         analysis.
4471         (finish_goto_stmt): Create RTL for labels.
4472         (finish_function_try_block): Set in_function_try_handler
4473         unconditionally.
4474         (finish_function_handler_sequence): Unset it.
4475         (finish_handler_parms): Use expand_start_catch_block even when
4476         building a statement-tree.
4477         (begin_catch_block): New function.
4478         (finish_handler): Move a little RTL-generation logic here.
4479         (finish_decl_cleanup): Allow cleanups for empty declarations.
4480         (finish_named_return_value): Don't pushdecl when not doing
4481         semantic analysis.
4482         (expand_stmt): Don't do semantic analysis for variable
4483         declarations.  Handle START_CATCH_STMT.  Call expand_label
4484         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
4485         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
4486         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
4487         RETURN_INIT and function try blocks.
4488         
4489         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
4490         x_scope_stmt_stack.  Add x_in_charge_parm.
4491         (current_eh_spec_try_block): New macro.
4492         (current_scope_stmt_stack): Likewise.
4493         (current_in_charge_parm): Likewise.
4494         * decl.c (start_function): Initialize current_in_charge_parm.
4495         (finish_function): Use current_in_charge_parm rather than looking
4496         up __in_chrg.
4497         * search.c (expand_indirect_vtbls_init): Likewise.
4498
4499         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
4500         (TRY_BLOCK): Likewise.
4501         (HANDLER): Likewise.
4502         (START_CATCH_STMT): New tree node.
4503         (SCOPE_STMT): Likewise.
4504         * cp-tree.h (SCOPE_BEGIN_P): New macro.
4505         (SCOPE_NULLIFIED_P): Likewise.
4506         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
4507         (struct lang_decl): Add saved_language_function.
4508         (DECL_PENDING_INLINE_INFO): Adjust documentation.
4509         (DECL_PENDING_INLINE_P): New macro.
4510         (TYPE_TI_ARGS): Fix typo in comment.
4511         (DECL_SAVED_TREE): Add to documentation.
4512         (DECL_SAVED_FUNCTION_DATA): New macro.
4513         (START_CATCH_TYPE): Likewise.
4514         (SCOPE_END_P): New macro.
4515         (declare_parm_level): Don't declare.
4516         * decl.c (mark_lang_function): New function, split out from
4517         mark_cp_function_context.
4518         (save_function_data): New function.
4519         (declare_parm_level): Remove.
4520         (finish_function): Use save_function_data to squirrel away
4521         important stuff for later use.
4522         (mark_cp_function_context): Use mark_function_data.
4523         (lang_mark_tree): Likewise.
4524         * lex.c (begin_definition_of_inclass_inline): Set
4525         DECL_PENDING_INLINE_P.
4526         (store_pending_inline): Clear it.
4527         * pt.c (tsubst_decl): Likewise.
4528
4529 1999-09-17  Nathan Sidwell  <nathan@acm.org>
4530
4531         * call.c (perform_implicit_conversion): Deal with error_mark_node.
4532
4533 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
4534
4535         * decl.c (warn_extern_redeclared_static): Don't get confused by
4536         static member functions.
4537         (duplicate_decls): Merge DECL_THIS_STATIC.
4538
4539         * decl.c (expand_static_init): Make sure assignments to local
4540         statics actually occur.
4541
4542 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
4543
4544         * cp-tree.h (poplevel_class): Declare.
4545         * class.c (popclass): Use poplevel_class, not poplevel.
4546         * decl.c (poplevel_class): Don't make it static.  Don't return a
4547         value.
4548         (poplevel): Don't call poplevel_class; abort in a class
4549         binding level is seen.
4550         * semantics.c (finish_translation_unit): Use pop_everything.
4551         * parse.y (member_init): Allow errors.
4552         (pending_inline): Call finish_function.
4553         * parse.c: Regenerated.
4554         * Makefile.in (CONFLICTS): Adjust.
4555
4556 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
4557         
4558         * error.c: Reduce code duplication.
4559         (dump_template_value): New function.
4560         (dump_type_real): Use it.
4561         (dump_decl): Likewise.
4562         (dump_function_name): Likewise.
4563         (dump_function_decl): Don't be too talkative about function return
4564         type variety.
4565
4566 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4567
4568         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
4569
4570         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
4571
4572 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
4573
4574         * decl2.c (finish_file): Also call check_global_declarations for
4575         the pending_statics list.
4576
4577 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
4578
4579         * lex.c (cp_pragma_implementation): Allow #pragma implementation
4580         in header files.
4581
4582 1999-09-15  Richard Henderson  <rth@cygnus.com>
4583
4584         * lex.c (mark_impl_file_chain): Follow the next chain.
4585
4586 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
4587
4588         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
4589         problems with extern "C" functions redeclared as static.
4590         (duplicate_decls): When a builtin is redeclared static, make the
4591         new function have internal linkage.
4592         
4593 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
4594
4595         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
4596         * pt.c (tsubst_copy): Likewise.
4597         * tree.c (search_tree): Likewise.
4598         (mapcar): Likewise.
4599
4600 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4601
4602         * typeck2.c (ack): Don't declare progname.
4603
4604 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
4605
4606         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
4607         filenames with ggc_alloc_string.
4608
4609 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
4610
4611         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
4612         TARGET_EXPR.
4613         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
4614         the TARGET_EXPR.
4615         * cvt.c (build_up_reference): Likewise.
4616         * tree.c (build_cplus_new): Likewise.
4617         (get_target_expr): Likewise.
4618         
4619 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
4620
4621         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
4622
4623 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
4624
4625         * cp-tree.h (build_target_expr): New function.
4626         * call.c (build_conditional_expr): Use build_target_expr.
4627         (convert_like): Likewise.
4628         (build_over_call): Likewise.
4629         * cvt.c (build_up_reference): Likewise.
4630         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
4631         (destroy_local_var): Here.
4632         (build_target_expr): New function.
4633         * tree.c (build_cplus_new): Use it.
4634         (get_target_expr): Likewise.
4635
4636 1999-09-13  Nathan Sidwell  <nathan@acm.org>
4637
4638         * typeck.c (expr_sizeof): Don't decay arrays and functions.
4639         Remove misleading comment.
4640         (build_compound_expr): Don't decay arrays.
4641
4642 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
4643
4644         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
4645         class rvalues again.
4646
4647 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4648
4649         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
4650
4651         * g++spec.c: Include gcc.h.
4652         (lang_specific_driver): Constify a char*.  Call xcalloc, not
4653         xmalloc/bzero.  All calls to the function pointer parameter now
4654         explicitly call `fatal'.
4655
4656 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
4657
4658         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
4659         * cvt.c (ocp_convert): Complete the from and destination types.
4660         Adjust warning about functions always being `true' in conditionals.
4661         * decl.c (duplicate_decls): Don't play funny games with abort.
4662         * error.c (dump_expr): Handle OVERLOADs.
4663         * spew.c (probe_obstack): Remove.
4664         * typeck.c (condition_conversion): Use perform_implicit_conversion.
4665         
4666 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
4667
4668         * cp-tree.h (auto_function, define_function): Adjust prototypes.
4669         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
4670         changed.
4671         (auto_function): Likewise, for CODE arg.
4672         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
4673         (builtin_function): ... here.
4674
4675 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
4676
4677         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
4678         (init_decl_processing): Don't set TREE_PERMANENT for the
4679         error_mark_node.
4680         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
4681         (grokdeclarator): Likewise.
4682         (grokparms): Don't check TREE_PERMANENT when building up lists.
4683         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
4684         (mark_inline_for_output): Likewise.
4685         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
4686         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
4687         * lex.c (check_newline): Don't check ggc_p; it is always one.
4688         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
4689         * spew.c (yylex): Don't copy_node or probe_obstacks for
4690         non-permanent CONSTANTs and STRINGs.
4691         * tree.c (build_cplus_array_type_1): Don't fuss with
4692         TREE_PERMANENT on ARRAY_TYPEs.
4693         
4694         * cp-tree.def (CLEANUP_STMT): New node.
4695         * cp-tree.h (language_function): Add name_declared.
4696         (current_function_name_declared): New macro.
4697         (CLEANUP_DECL): New macro.
4698         (CLEANUP_EXPR): Likewise.
4699         (emit_local_var): Likewise.
4700         (finish_decl_cleanup): New function.
4701         * cvt.c (build_up_reference): Simplify.
4702         (ocp_convert): Remove dead code.
4703         * decl.c (start_decl): Remove call to add_decl_stmt.
4704         (grok_reference_init): Adjust, to handle bindings temporaries to
4705         references.  Remove dead code.
4706         (initialize_local_var): Don't generate RTL for
4707         declarations here, or build cleanups here.  Don't fuss with
4708         obstacks.  Replace expand_start_target_temps calls with explicit
4709         setting of stms_are_full_exprs_p.
4710         (destroy_local_var): New function.
4711         (emit_local_var): Likewise.
4712         (cp_finish_decl): Use them, as appropriate.
4713         (start_function): Announce template functions.
4714         (store_parm_decls): Don't call declare_function_name here.
4715         (finish_stmt): Don't start emit base-initialization code when just
4716         building the statement-tree.
4717         * init.c (create_temporary_var): Move add_decl_stmt call ...
4718         (get_temp_regvar): Here.
4719         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
4720         cp_finish_decl would expect.  Don't call add_decl_stmt.
4721         * semantics.c (begin_compound_stmt): Call declare_function_name,
4722         if appropriate.
4723         (finish_decl_cleanup): New function.
4724         (expand_stmt): Use emit_local_var to output variables.          
4725         (expand_body): Set current_funtion_name_declared.
4726         
4727 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
4728
4729         * cp-tree.h (finish_cleanup_try_block): New function.
4730         * semantics.c (finish_cleanup_try_block): Add comment.
4731
4732 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
4733
4734         * cp-tree.h: Delete declarations for all tree nodes now moved to
4735         global_trees.
4736         * decl.c: Delete their definitions.
4737         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
4738         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
4739         provide defaults.
4740         (init_decl_processing): Call build_common_tree_nodes and
4741         build_common_tree_nodes_2 instead of building their nodes here.
4742         Don't add gc roots for them.
4743
4744 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
4745
4746         * cp-tree.h (language_function): Rename expanding_p to
4747         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
4748         (expanding_p): Adjust accordingly.
4749         (TREE_VIA_PRIVATE): Fix typo in comment.
4750         (DECL_REFERENCE_SLOT): Remove.
4751         (SET_DECL_REFERENCE_SLOT): Likewise.
4752         * decl.c (named_label_uses): Adjust. Remove chicken comment.
4753         (push_overloaded_decl): Don't truncate the chain of bindings when
4754         adding an overloaded function.
4755         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
4756         (initialize_local_var): Fix typo in comment.
4757         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
4758         * decl2.c (start_objects): Make the fact that we are expanding
4759         the generated function right away explicit.
4760         (start_static_storage_duration_function): Likewise.
4761         (finish_file): Fix typo in comment.
4762         * init.c (build_vec_init): Correct bugs in handling cleanups.
4763         * semantics.c (maybe_convert_cond): New function.
4764         (FINISH_COND): Always store the condition, even if there's
4765         a declaration.
4766         (finish_if_stmt_cond): Use maybe_convert_cond.
4767         (finish_while_stmt_cond): Likewise.
4768         (finish_do_stmt): Likewise.
4769         (finish_for_cond): Likewise.
4770         (expand_cond): Adjust.
4771         
4772         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
4773         * init.c (perform_member_init): Remove obstack machinations.
4774         (expand_cleanup_for_base): Likewise.
4775         (finish_init_stmts): Mark the statement-expression as used.
4776         * method.c (emit_thunk): Use tree-generating functions, not
4777         RTL.
4778         (do_build_copy_constructor): Likewise.
4779         (do_build_assign_ref): Likewise.
4780         (synthesize_method): Likewise.  Keep track of line numbers.
4781         * pt.c (tsubst_expr): Handle various kinds of try blocks.
4782         * semantics.c (expand_stmts): Remove.
4783         (begin_function_try_block): Set FN_TRY_BLOCK_P.
4784         (finish_function_try_block): Be careful rechaining 
4785         function try blocks.
4786         (expand_stmt): Loop through all the statements at a given level.
4787         (exapnd_body): Be careful with line-numbers here too.  Prepare for
4788         being called directly from the parser.
4789
4790         * cp-tree.h (finish_function): Adjust prototype.
4791         * decl.c (finish_function): Return the function compiled.
4792         * pt.c (instantiate_decl): Don't play games with obstacks.
4793         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
4794         (search_tree): Likewise.
4795         * typeck.c: Fix typo in comment.
4796         * typeck2.c (store_init_value): Add comment.
4797
4798         * cp-tree.h (CPTI_ATEXIT): New macro.
4799         (atexit_node): Likewise.
4800         * decl.c (destroy_local_static): New function, broken out from ...
4801         (expand_static_init): Here.
4802
4803         * rtti.c (get_tinfo_var): These should always be global
4804         (expand_si_desc): Use tree, not RTL, functions to generate code.
4805         (expand_class_desc): Likewise.
4806         (expand_ptr_desc): Likewise.
4807         (expand_attr_desc): Likewise.
4808         (expand_generic_desc): Likewise.
4809         (synthesize_tinfo_fn): Likewise.
4810
4811 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
4812
4813         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
4814         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
4815         RECHAIN_STMTS. 
4816         (RECHAIN_STMST_FROM_CHAIN): Likewise.
4817
4818         * parse.y (simple_stmt): Fix typo in last change.
4819
4820         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
4821         (STMT_IS_FULL_EXPR_P): Likewise.
4822         (STMT_LINENO_FOR_FN_P): Likewise.
4823         (prep_stmt): New function.
4824         (building_stmt_tree): Tweak for safety.
4825         * pt.c (tsubst_expr): Use prep_stmt throughout.
4826         (add_tree): Move it to semantics.c
4827         * semantics.c (add_tree): Move it here.
4828         (finish_expr_stmt_real): New function.
4829         (finish_expr_stmt): Use it.
4830         (finish_if_stmt_cond): Use FINISH_COND.
4831         (finish_while_stmt_cond): Likewise.
4832         (finish_for_cond): Likewise.
4833         (finish_stmt_tree): Tweak line-number handling.
4834         (prep_stmt): New function.
4835         (expand_stmt): Use it.
4836         
4837         * cp-tree.h (begin_switch_stmt): Adjust prototype.
4838         (finish_switch_cond): Likewise.
4839         * parse.y (simple_stmt): Adjust accordingly.
4840         * parse.c: Regenerated.
4841         * pt.c (tsubst_expr): Adjust accordingly.
4842         * semantics.c (expand_cond): New function.
4843         (FINISH_COND): New macro.
4844         (begin_switch_stmt): Build the SWITCH_STMT here.
4845         (finish_switch_stmt_cond): Not here.
4846         (expand_stmt): Adjust calls to begin_switch_stmt and
4847         finish_switch_cond.  Use expand_cond throughout.
4848
4849         * dump.c (dequeue_and_dump): Dump types for constants.
4850         Describe DECL_ARG_TYPE more intuitively.
4851         Handle ARRAY_REF.
4852
4853         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
4854         (lang_cleanup_tree): Remove.
4855         * lex.c (make_lang_type): Use ggc_alloc to allocate
4856         TYPE_LANG_SPECIFIC.
4857
4858         Reorganize per-function data.
4859         * cp-tree.h (saved_scope): Add function_decl, bindings.
4860         (language_function): Rename binding_level to bindings.
4861         (cp_function_chain): Use the current_function, not the
4862         outer_function_chain.
4863         (current_class_ptr): Make it work, even when there's no 
4864         current function.
4865         (current_class_ref): Likewise.
4866         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
4867         macros.
4868         (clear_temp_name): Remove.
4869         * decl.c (check_function_type): New function, broken out from
4870         start_function.
4871         (current_binding_level): Adjust definition.
4872         (pushlevel): Simplify.
4873         (poplevel): Don't use named_label_uses when we're outside
4874         a function scope.
4875         (mark_saved_scope): Mark function_decl and bindings.
4876         (maybe_push_to_top_level): Don't unconditionally push a new
4877         function context.  Save bindings and the current_function_decl.
4878         Don't clear named_labels.
4879         (pop_from_top_level): Pop function context if appropriate.
4880         (init_decl_processing): Set init_lang_status and free_lang_status,
4881         rather than save_lang_status and restore_lang_status.
4882         (start_function): Take SF_* flags.  Don't clear per-function data.
4883         Reorder and simplify to use new per-function data code.  Add
4884         asserts.
4885         (store_parm_decls): Don't call init_function_start here.
4886         (finish_function): Adjust for new handling of per-function data.
4887         (push_cp_function_context): Simplify.
4888         (mark_cp_function_context): Change binding_level to bindings.
4889         * decl2.c (clear_temp_name): Remove.
4890         (start_objects): Use SF flags to start_function.
4891         (start_static_storage_duration_function): Likewise.
4892         * except.c (start_anon_func): Remove redundant calls to 
4893         push_function_context_to.  Use SF flags to start function.
4894         (end_anon_func): Remove redundant call to pop_function_context
4895         from.
4896         * lex.c (reinit_parse_for_function): Don't initialize per-function 
4897         data.
4898         * method.c (emit_thunk): Clear current_function after calling
4899         assemble_end_function.  Use SF flags for start_function.
4900         (synthesize_method): Use SF flags for start_function.
4901         * parse.c: Regenerated.
4902         * parse.y (fn.defpen): Likewise.
4903         (pending_inline): Clear current_function, even if something goes
4904         wrong.
4905         * pt.c (instantiate_decl): Use SF flags to start_function.
4906         Don't save and restore expanding_p.
4907         (add_tree): Handle the case where we are outside any function.
4908         (end_tree): Likewise.
4909         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
4910         * semantics.c (begin_function_definition): Likewise.
4911         (expand_body): Likewise.
4912         
4913 1999-09-09  Nathan Sidwell  <nathan@acm.org>
4914
4915         * cp-tree.h (convert_to_void): Prototype new function.
4916         (require_complete_type_in_void): Remove prototype.
4917         * cvt.c (convert_to_void): New function.
4918         (ocp_convert): Use convert_to_void.
4919         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
4920         expressions.
4921         * typeck.c (require_complete_type_in_void): Remove function.
4922         (build_compound_expr): Use convert_to_void.
4923         (build_static_cast): Likewise.
4924         (build_c_cast): Likewise.
4925         * semantics.c (finish_expr_stmt): Do not decay full expressions.
4926         
4927         * typeck.c (build_x_compound_expr): Add FIXME.
4928
4929 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
4930
4931         * cp-tree.h (scratch_tree_cons): Remove.
4932         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
4933         and perm_tree_cons with plain tree_cons.
4934         * class.c: Likewise.
4935         * decl.c: Likewise.
4936         * decl2.c: Likewise.
4937         * except.c: Likewise.
4938         * expr.c: Likewise.
4939         * init.c: Likewise.
4940         * lex.c: Likewise.
4941         * method.c: Likewise.
4942         * parse.y: Likewise.
4943         * pt.c: Likewise.
4944         * repo.c: Likewise.
4945         * rtti.c: Likewise.
4946         * search.c: Likewise.
4947         * typeck.c: Likewise.
4948         * parse.c: Regenerated.
4949         * tree.c (build_srcloc): Simplify.
4950         
4951 1999-09-08  Bruce Korb  autogen@linuxbox.com
4952
4953         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
4954
4955 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
4956
4957         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
4958         Remove next.
4959         (LANG_DECL_PERMANENT): Remove.
4960         * decl.c (duplicate_decls): Don't mess about with obstacks trying
4961         to free memory.
4962         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
4963         * lex.c (free_lang_decl_chain): Remove.
4964         (build_lang_decl): Don't use obstacks.
4965         (retrofit_lang_decl): Likewise.
4966         (copy_lang_decl): Likewise.
4967
4968         * cp-tree.h (saved_scope): Remove old_binding_level and 
4969         function_decl.  Tidy up.
4970         * decl.c (mark_saved_scope): Don't set them.
4971         (maybe_push_to_top_level): Clear memory.
4972
4973         * decl.c (layout_var_decl): Change prototype.  Don't complete
4974         types for external objects.
4975         (check_initializer): Likewise.  Tidy.
4976         (initialize_local_var): Complete types here.
4977         (cp_finish_decl): Not here.  Reorganize a little.
4978         (grokvardecl): Don't complete types here.
4979
4980         * decl.c (start_function): Clear last_dtor_insn and
4981         last_parm_cleanup_insn. 
4982         (push_cp_function_context): Just copy over a little of
4983         the old context, not all of it.
4984
4985         * cp-tree.h (copy_to_permanent): Remove.
4986         (permanent_p): Likewise.
4987         * decl.c (building_typename_type): Don't use copy_to_permanent.
4988         (start_decl): Likewise.
4989         (grok_reference_init): Likewise.
4990         (cp_finish_decl): Likewise.
4991         * init.c (build_new_1): Don't use mapcar.
4992         (build_vec_delete_1): Don't use copy_to_permanent.
4993         (build_vec_init): Likewise.
4994         * parse.y (primary): Likewise.
4995         * parse.c: Regenerated.
4996         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
4997         (lookup_template_class): Likewise.
4998         (tsubst_friend_function): Likewise.
4999         (instantiate_class_template): Likewise.
5000         (tsubst_decl): Likewise.
5001         (tsubst): Likewise.
5002         (instantiate_template): Likewise.
5003         (unify): Likewise.
5004         * rtti.c (get_tinfo_fn): Likewise.
5005         (build_dynamic_cast): Likewise.
5006         * semantics.c (finish_if_stmt_cond): Likewise.
5007         (finish_while_stmt_cond): Likewise.
5008         (finish_do_stmt): Likewise.
5009         (finish_for_cond): Likewise.
5010         (finish_for_expr): Likewise.
5011         (finish_cleanup): Likewise.
5012         (add_decl_stmt): Likewise.
5013         (finish_named_return_value): Likewise.
5014         (finish_qualified_call_expr): Likewise.
5015         * tree.c (perm_manip): Remove.
5016         (build_exception_variant): Don't use copy_to_permanent.
5017         (permanent_p): Remove.
5018         (copy_to_permament): Remove.
5019         (build_min_nt): Don't use copy_to_permanent.
5020         (build_min): Likewise.
5021         (min_tree_cons): Likewise.
5022         * typeckc.c (build_static_cast): Likewise.
5023         (build_reinterpret_cast): Likewise.
5024         (build_const_cast): Likewise.
5025         
5026 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
5027
5028         * decl.c (ggc_p): Set it to 1.
5029         (mark_saved_scope): Add prototype.
5030
5031 1999-09-07  Richard Henderson  <rth@cygnus.com>
5032
5033         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
5034         * typeck.c (self_promoting_args_p): Delete.
5035
5036 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
5037
5038         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
5039         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
5040
5041 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
5042
5043         * Makefile.in (tree.o): Depend on ggc.h.
5044         * class.c (make_method_vec): Remove.
5045         (free_method_vec): Likewise.
5046         (free_method_vecs): Remove.
5047         (add_method): Don't use them.
5048         * cp-tree.def (PTRMEM_CST): Make it longer.
5049         (TEMPLATE_PARM_INDEX): Make it shorter.
5050         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
5051         (template_parm_index): Remove RTL field.
5052         (ptrmem_cst): Add RTL field.
5053         (finish_function): Removed parameter.
5054         (process_next_inline): Change prototype.
5055         (init_cplus_unsave): Rename to init_tree.
5056         (binding_init): Remove.
5057         * decl.c (free_binding_nodes): Remove.
5058         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
5059         (pop_binding): Don't use free_binding_nodes.
5060         (free_binding_vecs): Remove.
5061         (store_bindings): Don't use them.
5062         (pop_from_top_level): Likewise.
5063         (lookup_namespace_name): Simplify.
5064         (build_typename_type): Don't use obstack_free.
5065         (unqualified_namespace_lookup): Simplify.
5066         (lookup_name_real): Simplify.
5067         (start_function): Remove comment about leaks.
5068         (finish_function): Removed nested parameter.  Call
5069         expand_end_bindings even when building_stmt_tree.
5070         Call ggc_push_context and ggc_pop_context around
5071         rest_of_compilation, if necessary.
5072         (mark_cp_function_context): Handle a NULL language-context.
5073         (lang_mark_false_label_stack): Fix typo.
5074         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
5075         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
5076         pointer to method types.
5077         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
5078         * decl2.c (finish_objects): Adjust call to finish_function.
5079         (finish_static_store_duration_function): Likewise.
5080         (do_nonmember_using_decl): Remove call to binding_init.
5081         * except.c (end_anon_func): Adjust call to finish_function.
5082         * lex.c (mark_impl_file_chain): New function.
5083         (init_parse): Call init_tree, not init_cplus_unsave.
5084         Add GC roots.
5085         (cp_pramga_interface): Use xmalloc, not permalloc.
5086         (cp_pragma_implementation): Likewise.
5087         (begin_definition_of_inclass_inline): Simplify.
5088         (process_next_inline): Adjust prototype.
5089         (do_scoped_id): Don't call binding_init.
5090         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
5091         * method.c (emit_thunk): Adjust call to finish_function.
5092         (synthesize_method): Likewise.
5093         * parse.y (%union): Add a new `pi' variant.
5094         (PRE_PARSED_FUNCTION_DECL): Use it.
5095         (fn.defpen): Likewise.
5096         (fndef): Adjust call to finish_function.
5097         * pt.c (instantiate_decl): Likewise.
5098         * rtti.c (syntheisze_tinfo_fn): Likewise.
5099         * semantics.c (expand_body): Likewise.
5100         * tree.c: Include ggc.h.
5101         (mark_list_hash): New function.
5102         (binding_init): Remove.
5103         (init_cplus_unsave): Rename to ...
5104         (init_tree): This.  Add GC roots.
5105         
5106 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
5107
5108         Get ready for garbage collection.
5109         * Makefile.in (CXX_TREE_H): Add varray.h
5110         (lex.o): Depend on ggc.h.
5111         (decl.o): Likewise.
5112         (decl2.o): Likewise.
5113         (method.o): Likewise.
5114         (search.o): Likewise.
5115         (pt.o): Likewise.
5116         (repo.o): Likewise.
5117         * class.c: Include ggc.h.
5118         (current_class_name): Remove.
5119         (current_class_type): Likewise.
5120         (current_access_specifier): Likewise.
5121         (previous_class_type): Likewise.
5122         (previous_class_values): Likewise.
5123         (class_cache_firstobj): Likewise.
5124         (current_lang_base): Likewise.
5125         (current_lang_stack): Likewise.
5126         (current_lang_stacksize): Likewise.
5127         (lang_name_c): Likewise.
5128         (lang_name_cplusplus): Likewise.
5129         (lang_name_java): Likewise.
5130         (current_lang_name): Likewise.
5131         (base_layout_decl): Likewise.
5132         (access_default_node): Likewise.
5133         (access_public_node): Likewise.
5134         (access_protected_node): Likewise.
5135         (access_private_node): Likewise.
5136         (access_default_virtual_node): Likewise.
5137         (access_public_virtual_node): Likewise.
5138         (access_protected_virtual_node): Likewise.
5139         (access_private_virtual_node): Likewise.
5140         (signed_zero_node): Likewise.
5141         (init_class_processing): Don't build base_layout_decl.
5142         (push_lang_context): Adjust now that current_lang_base is a varray.
5143         (pop_lang_context): Likewise.
5144         * cp-tree.h: Include varray.h.
5145         (cp_global_trees): Add access_default, access_public,
5146         access_protected, access_private, access_default_virtual,
5147         access_public_virtual, access_protected_virtual,
5148         access_private_virtual, ctor_identifier, delta2_identifier, 
5149         delta_identifier, dtor_identifier, in_charge_identifier,
5150         index_identifier, nelts_identifier, this_identifier,
5151         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
5152         lang_name_c, lang_name_cplusplus, lang_name_java,
5153         empty_except_spec, null, jclass, minus_one, terminate.
5154         (saved_scope): Move here from decl.c.  Define globals in terms of
5155         saved_scope: current_namespace, current_class_name,
5156         current_class_type, current_access_specifier, current_lang_stack,
5157         current_lang_base, current_lang_name, current_function_parms,
5158         current_template_parms, processing_template_decl,
5159         processing_specialization, processing_explicit_instantiation,
5160         previous_class_type, previous_class_values, class_cache_firstobj.
5161         (scope_chain): New variable.
5162         (init_pt): New function.
5163         * decl.c (current_namespace): Remove.
5164         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
5165         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
5166         (delta_identifier, delta2_identifier): Likewise.
5167         (pfn_or_delta2_identifier, tag_identifier): Likewise
5168         (vt_off_identifier, empty_except_spec, null_node): Likewise.
5169         (current_function_parms, current_lang_base): Remove.
5170         (current_lang_stack, previous_class_values): Remove.
5171         (class_binding_level): Macroize.
5172         (saved_scope): Remove.
5173         (current_saved_scope): Rename to scope_chain.
5174         (mark_saved_scope): Adjust for new scope structure.
5175         (maybe_push_to_top_level): Likewise.
5176         (pop_from_top_level): Likewise.
5177         (duplicate_decls): Adjust now that current_lang_base is a varray.
5178         (build_typename_type): Call ggc_add_tree_hash_table_root.
5179         (init_decl_processing): Call init_pt.  Call push_to_top_level to
5180         set up globals.  Add GC roots.
5181         (xref_basetypes): Adjust now that current_lang_base is a varray.
5182         * decl.h (this_identifier): Remove.
5183         (in_charge_identifier): Likewise.
5184         * decl2.c: Don't include varray.h.
5185         (current_namespace): Remove.
5186         (init_decl2): Add GC roots.
5187         * except.c (Terminate): Remove. 
5188         (init_exception_processing): Use terminate_node instead.
5189         (build_terminate_handler): Likewise.
5190         * init.c (nc_nelts_field_id): Remove.
5191         (minus_one): Likewise.
5192         (init_init_processing): Use minus_one_node and nelts_identifier
5193         instead.  Add GC roots.
5194         (jclass_node): Remove.
5195         (build_new_1): Use nelts_identifier.
5196         (build_vec_init): Likewise.
5197         (build_vec_delete): Likewise.
5198         * lex.c: Include ggc.h.
5199         (defarg_fn): Move declaration early.
5200         (defarg_parms): Likewise.
5201         (init_parse): Add GC roots.
5202         (handle_cp_pragma): Remove redundant declaration of
5203         pending_vtables.
5204         * method.c: Include ggc.h.
5205         (btypelist): Make it a varray.  All uses changed.
5206         (ktypelist): Likewise.
5207         (init_method): Add GC roots.
5208         * pt.c: Don't include varray.h.  Include ggc.h.
5209         (current_template_parms): Remove.
5210         (processing_template_decl): Likewise.
5211         (processing_specialization): Likewise.
5212         (processing_explicit_instantiation): Likewise.
5213         (init_pt): New function.
5214         * repo.c: Include ggc.h.
5215         (init_repo): Add GC roots.
5216         * search.c: Don't include varray.h.
5217         (_vptr_name): Remove.
5218         (lookup_field_1): Use vtpr_identifier instead.
5219         (expand_indirect_vtbls_init): Remove redundant declaration of
5220         in_charge_identifier.
5221         (init_search_processing): Use vptr_identifier.
5222         
5223 1999-09-05  Richard Henderson  <rth@cygnus.com>
5224             Bernd Schmidt <bernds@cygnus.co.uk>
5225             Mark Mitchell  <mark@codesourcery.com>
5226
5227         * Makefile.in (parse.o): Depend on ggc.h.
5228         (decl2.o): Depend on ggc.h.
5229         (init.o): Depend on ggc.h.
5230         * cp-tree.h (init_decl2): Declare.
5231         (cp_parse_init): Likewise.
5232         * decl.c (ggc_p): Define to zero.
5233         (mark_saved_scope): New function.
5234         (init_decl_processing): Call cp_parse_init, and cp_decl2.
5235         Register GC roots.
5236         (expand_static_init): Add GC roots.
5237         * decl2.c: Include ggc.h.
5238         (init_decl2): New function.
5239         * init.c: Include ggc.h.
5240         (init_init_processing): Add GC roots.
5241         * parse.y: Include ggc.h.
5242         (cp_parse_init): New function.
5243         
5244 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
5245
5246         * decl.c (init_decl_processing): Set mark_lang_status.
5247         (lang_mark_false_label_stack): Adjust prototype.
5248         * decl2.c (grok_function_init): Remove extraneous declaration of
5249         abort_fndecl.
5250
5251         * Make-lang.in (cc1plus): Remove dependency on GGC.
5252         * Makefile.in (OBJS): Don't mention ggc-simple.o.
5253         (OBJDEPS): Don't mention ggc-simple.o.
5254
5255         * Make-lang.in (cc1plus): Depend on $(GGC).
5256         * Makefile.in (OBJS): Add ggc-simple.o.
5257         (OBJDEPS): Likewise.
5258         * cp-tree.h (language_function): Rename members to `x_' versions;
5259         we now have x_named_labels, x_ctor_label, x_dtor_label,
5260         x_base_init_list, x_member_init_list, x_base_init_expr,
5261         x_current_class_ptr, x_current_class_ref, x_last_tree,
5262         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
5263         x_result_rtx. 
5264         (dtor_label, ctor_label, current_base_init_list,
5265         current_member_init_list, base_init_expr, current_class_ptr,
5266         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
5267         * decl.c: Include ggc.h.
5268         (last_dtor_insn): Adjust to use x_ names.
5269         (last_parm_cleanup_insn): Likewise.
5270         (original_result_rtx): Likewise.
5271         (named_labels): Likewise.
5272         (mark_binding_level): New function.
5273         (mark_cp_function_context): Likewise.
5274         (mark_false_label_stack): Likewise.
5275         (lang_mark_tree): Likewise.
5276         (lang_cleanup_tree): Likewise.
5277         
5278 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
5279
5280         * Makefile.in (CXX_TREE_H): Include function.h.
5281         (decl.o): Don't depend on function.h.
5282         (decl2.o): Likewise.
5283         (typeck.o): Likewise.
5284         (init.o): Likewise.
5285         (method.o): Likewise.
5286         * cp-tree.h: Include function.h.
5287         (cp_function): Rename to language_function.  Remove next.
5288         (cp_function_chain): Make it a macro, not a variable.
5289         (push_cp_function_context): Don't declare.
5290         (pop_cp_function_context): Likewise.
5291         * decl.c: Don't include function.h.
5292         (push_cp_function_context): Make it static.  Make it suitable for
5293         a save_lang_status callback.
5294         (pop_cp_function_context): Likewise.
5295         (maybe_push_to_top_level): Call push_function_context_to, not
5296         push_cp_function_context.
5297         (pop_from_top_level): Call pop_function_context_from, not
5298         pop_cp_function_context.
5299         (init_decl_processing):  Set save_lang_status and
5300         restore_lang_status.  Call push_function_context_to, not
5301         push_cp_function_context.
5302         (cp_function_chain): Remove.
5303         * decl2.c: Don't include function.h.
5304         * except.c: Don't include function.h.
5305         (start_anon_func): Call push_function_context_to, not
5306         push_cp_function_context.
5307         (end_anon_func):  Call pop_function_context_from, not
5308         pop_cp_function_context.
5309         * init.c: Don't include function.h.
5310         * lex.c (begin_definition_of_inclass_inline): Call
5311         push_function_context_to, not push_cp_function_context. 
5312         (process_next_inline):  Call pop_function_context_from, not
5313         pop_cp_function_context.
5314         * method.c: Don't include function.h.
5315         (synthesize_method): Call push_function_context_to, not
5316         push_cp_function_context.  Call pop_function_context_from, not
5317         pop_cp_function_context.
5318         * typeck.c: Don't include function.h.
5319         
5320         * decl.c (expand_static_init): Tweak handling of static
5321         initializations for objects without constructors.
5322
5323 1999-09-03  Nathan Sidwell  <nathan@acm.org>
5324
5325         * typeck.c (build_indirect_ref): Reject dereference of pointer to
5326         void.
5327
5328 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
5329
5330         * cp-tree.h (cp_function): Move here, from decl.c.
5331         (cp_function_chain): Declare.
5332         (dtor_label): New macro, instead of variable.
5333         (ctor_label): Likewise.
5334         (current_base_init_list): Likewise.
5335         (current_member_init_list): Likewise.
5336         (base_init_expr): Likewise.
5337         (current_class_ptr): Likewise.
5338         (current_class_ref): Likewise.
5339         (last_tree): Likewise.
5340         (last_expr_type): Likewise.
5341         (current_function_returns_value): Likewise.
5342         (current_function_returns_null): Likewise.
5343         (current_function_just_assigned_this): Likewise.
5344         (current_function_parms_stored): Likewise.
5345         (temp_name_counter): Likewise.
5346         (static_labelno): Likewise.
5347         (expanding_p): Likewise.
5348         (stmts_are_full_exprs_p): Likewise.
5349         (in_function_try_handler): Likewise.
5350         (lang_type): Remove nested type_flags.  All uses changed.
5351         * call.c (ctor_label): Remove.
5352         (dtor_label): Likewise.
5353         * class.c (current_class_ptr): Remove.
5354         (current_class_ref): Likewise.
5355         * decl.c (static_labelno): Remove.
5356         (dtor_label): Likewise.
5357         (last_dtor_insn): New macro, instead of variable.
5358         (last_parm_cleanup_insn): Likewise.
5359         (original_result_rtx): Likewise.
5360         (in_function_try_handler): Remove.
5361         (named_label_uses): New macro, instead of variable.
5362         (named_labels): Likewise.
5363         (current_function_returns_value): Remove.
5364         (current_function_returns_null): Likewise.
5365         (current_function_assigns_this): New macro, instead of variable.
5366         (current_function_just_assigned_this): Likewise.
5367         (current_binding_level): Likewise.
5368         (init_decl_processing): Call push_cp_function_context.
5369         (cp_function): Move to cp-tree.h
5370         (cp_function_chain): Make it global.
5371         (temp_name_counter): Remove.
5372         (push_cp_function_context): Simplify.
5373         (pop_cp_function_context): Likewise.
5374         * decl2.c (temp_name_counter): Remove.
5375         * init_c (current_base_init_list): Likewise.
5376         (current_member_init_list): Likewise.
5377         (base_init_expr): Likewise.
5378         * method.c (static_labelno): Likewise.
5379         * pt.c (last_tree): Likewise.
5380         * semantics.c (expanding_p): Likewise.
5381         (stmts_are_full_exprs_p): Likewise.
5382         (last_expr_type): Likewise.
5383         * typeck.c (dtor_label): Likewise.
5384         (ctor_label): Likewise.
5385         
5386 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
5387
5388         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
5389         (arg_assoc_class): Use arg_assoc_template_arg for template
5390         arguments. 
5391         (arg_assoc): Likewise.
5392         * pt.c (mangle_class_name_for_template): Allow member template
5393         template arguments.
5394
5395 1999-09-02  Nathan Sidwell  <nathan@acm.org>
5396
5397         * call.c (build_conditional_expr): Warn on enum mismatches.
5398         (convert_arg_to_ellipsis): Move non-pod check to after
5399         conversion.
5400
5401 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5402
5403         * gxx.gperf (hash, is_reserved_word): Add prototypes.
5404
5405         * init.c (build_vec_init): Initialize variable `try_block'.
5406
5407         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
5408         Likewise for bzero/memset.
5409         (token_getch, token_put_back): Add static prototypes.  Remove
5410         `inline' from the definitions.
5411         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
5412
5413 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
5414
5415         * cp-tree.h (lang_type): Move align into type_flags.
5416         (CLASSTYPE_ALIGN): Adjust accordingly.
5417         * call.c (direct_reference_binding): Remove misleading comment.
5418
5419 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5420
5421         * parse.y (language_string): Constify.
5422
5423 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5424
5425         * repo.c (getpwd): Don't prototype.
5426         * xref.c (getpwd): Likewise
5427
5428 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5429
5430         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
5431         Remove hacks for stuff which now comes from libiberty.
5432
5433 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
5434
5435         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
5436
5437 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
5438
5439         * cp-tree.h (begin_init_stmts): Declare.
5440         (finish_init_stmts): Likewise.
5441         * cvt.c (build_up_reference): Wrap the declaration of a temporary
5442         in a statement-expression so that we will see it when expanding
5443         tree structure later.
5444         * init.c (begin_init_stmts): Don't make it static.
5445         (finish_init_stmts): Likewise.
5446
5447         * cp-tree.h (start_handler_parms): New function.
5448         (expand_start_catch_block): Take only one parameter.
5449         (start_handler_parms): New function.
5450         * decl.c (start_handler_parms): Define it.
5451         * except.c (process_start_catch_block): Take only one parameter.
5452         Don't call grokdeclarator here.
5453         (expand_start_catch_block): Don't call grokdeclarator here,
5454         either.
5455         * parse.y (handler_args): Adjust call to
5456         expand_start_catch_block.  Use start_handler_parms.
5457         * pt.c (push_template_decl_real): Make permanent lists have
5458         permanent elements.
5459         (tsubst_expr): Adjust calls to expand_start_catch_block
5460         appropriately.
5461         * semantics.c (expand_stmt): Likewise.
5462         
5463 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
5464
5465         * pt.c (push_template_decl_real): Use template declaration from
5466         class type if it exists.
5467
5468 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
5469
5470         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
5471         (maybe_inject_for_scope_var): Declare it.
5472         (initialize_local_var): Likewise.
5473         * decl.c (maybe_inject_for_scope_var): Make it global.
5474         (initialize_local_var): Likewise.  Move cleanup handling here,
5475         from cp_finish_decl.
5476         (make_rtl_for_nonlocal_decl): Use
5477         push_obstacks_nochange/pop_obstacks, rather than
5478         end_temporary_allocation/resume_temporary_allocation.
5479         (cp_finish_decl): Try to complete the type of a variable when it
5480         is declared.  Move cleanup-handling to initialize_local_var.
5481         (expand_static_init): Use tree-building code, rather than
5482         RTL-building code.
5483         * decl2.c (get_temp_name): Assert non-initializedness of
5484         temporaries.
5485         * init.c (create_temporary_var): Move RTL-assigning code to ...
5486         (get_temp_regvar): Here.
5487         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
5488         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
5489         call initialize_local_var to generate initialization code.
5490         
5491 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5492
5493         * cp-tree.h (fndecl_as_string, type_as_string,
5494         type_as_string_real, args_as_string, decl_as_string,
5495         expr_as_string, code_as_string, language_as_string,
5496         parm_as_string, op_as_string, assop_as_string, cv_as_string,
5497         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
5498
5499         * errfn.c (cp_printer): Likewise.
5500
5501         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
5502         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
5503         cp_file_of, code_as_string, language_as_string, parm_as_string,
5504         op_as_string, assop_as_string, args_as_string, cv_as_string):
5505         Likewise.
5506
5507         * tree.c (lang_printable_name): Likewise.
5508
5509 1999-08-28  Richard Henderson  <rth@cygnus.com>
5510
5511         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
5512
5513 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
5514
5515         * cp-tree.h (strip_array_types): New function.
5516         * decl.c (maybe_deduce_size_from_array_init): New function, split
5517         out from cp_finish_decl.
5518         (layout_var_decl): Likewise.
5519         (maybe_commonize_var): Likewise.
5520         (maybe_inject_for_scope_var): Likewise.
5521         (initialize_local_var): Likewise.
5522         (build_cleanup_on_safe_obstack): Likewise.
5523         (check_initializer): Likewise.
5524         (make_rtl_for_nonlocal_decl): Likewise.
5525         (cp_finish_decl): Use them.
5526         * typeck.c (strip_array_types): New function.
5527         
5528         * cp-tree.def (LABEL_STMT): New tree node.
5529         * cp-tree.h (LABEL_STMT_LABEL): New macro.
5530         (shadow_label): Remove.
5531         (declare_local_label): New function.
5532         (finish_label_decl): Likewise.
5533         * decl.c (make_label_decl): New function, split out from
5534         lookup_label.
5535         (shadowed_labels): Remove.
5536         (binding_level): Add shadowed_labels.
5537         (clear_binding_level): Remove.
5538         (push_binding_level): Just bzero the new binding level.
5539         (pushlevel): Fix indentation.
5540         (pop_label): New function.
5541         (pop_labels): Likewise, split out from poplevel.
5542         (poplevel): Pop local labels.  Use pop_labels.
5543         (maybe_push_to_top_level): Don't clear shadowed_labels.
5544         (lookup_label): Use make_label_decl.
5545         (shadow_label): Remove.
5546         (declare_local_label): New function.
5547         (define_label): Simplify.
5548         (start_function): Don't clear shadowed_labels.
5549         (cp_function): Remove shadowed_labels.
5550         (push_cp_function_context): Don't save shadowed_labels.
5551         (pop_cp_function_context): Don't restore it.
5552         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
5553         * parse.y (label_decl): Use finish_label_decl.
5554         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
5555         declarations.
5556         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
5557         building_stmt_tree.
5558         (finish_label_decl): New function.
5559         (expand_stmt): Handle LABEL_STMTs and local label declarations.
5560         
5561 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
5562
5563         * decl.c (lookup_label): Build labels on the permanent obstack
5564         when building statement trees.  Don't build RTL for labels when
5565         building statement trees.
5566         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
5567         building statement trees.
5568         (finish_label_stmt): Likewise.
5569         (expand_stmt): Adjust accordingly.
5570         * pt.c (tsubst_expr); Likewise.
5571         (do_decl_instantiation): Robustify.
5572         
5573         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
5574         * tree.c (build_cplus_new): Set it.
5575         * expr.c (cplus_expand_expr): Use it.
5576         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
5577         
5578         * decl.c (store_parm_decls): Reset immediate_size_expand.
5579         (finish_function): Likewise.
5580         
5581         * tree.c (cplus_unsave_expr_now): Don't return a value.
5582
5583         * semantics.c (do_poplevel): Always initialize the return value.
5584
5585 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
5586
5587         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
5588         * tree.h (cplus_unsave_expr_now) : Same.
5589
5590 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
5591
5592         * decl.c (grokdeclarator): Amend comment.
5593         * except.c (expand_start_catch_block): Call push_template_decl for
5594         catch-block parameters.
5595         * method.c (synthesize_method): Build an empty compound statement
5596         for the body of a constructor.
5597
5598 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
5599
5600         * tree.c (cp_build_qualified_type_real): If we're asking for the
5601         same quals we already have, just return.
5602
5603 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
5604
5605         * cp-tree.def (SUBOBJECT): New tree node.
5606         * cp-tree.h (CLEANUP_P): New macro.
5607         (SUBOBJECT_CLEANUP): Likewise.
5608         (keep_next_level): Add parameter.
5609         (get_temp_regvar): Don't declare.
5610         (emit_base_init): Remove parameter.
5611         (expand_aggr_init): Rename to build_aggr_init.
5612         (expand_vec_init): Rename to build_vec_init.
5613         (do_pushlevel): Remove.
5614         (do_poplevel): Likewise.
5615         (finish_cleanup): New function.
5616         (finish_subobject): Likewise.
5617         (stmts_are_full_exprs_p): New variable.
5618         * decl.c (keep_next_level): Add parameter.
5619         (cp_finish_decl): Use build_aggr_init, not
5620         expand_aggr_init.  Use finish_expr_stmt to expand the code.
5621         (expand_static_init): Use tree-generating, not RTL-generating,
5622         functions to handle the initialization.
5623         (start_function): Remove dead code.  Always have a momentary
5624         obstack inside the function, even before hitting the first curly
5625         brace.
5626         (cplus_expand_expr_stmt): Move calls to
5627         expand_{start,end}_target_temps into semantics.c.
5628         (cp_function): Add stmts_are_full_exprs_p.
5629         (push_cp_function_context): Save it.
5630         (pop_cp_function_context): Restore it.
5631         * decl2.c (get_temp_regvar): Move to init.c.
5632         (do_static_initialization): Use build_{aggr,vec}_init.
5633         (do_static_destruction): Fix typo in comment.
5634         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
5635         * except.c (expand_throw): Use create_temporary_var.
5636         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
5637         * init.c (expand_vec_init_try_block): Remove.
5638         (expand_vec_init_catch_clause): Likewise.
5639         (get_temp_regvar): New function.
5640         (begin_init_stmts): Likewise.
5641         (finish_init_stmts): Likewise.
5642         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
5643         structure here.
5644         (emit_base_init): Likewise.  Remove unused parameter.
5645         (expand_virtual_init): Likewise.
5646         (expand_cleanup_for_base): Use finish_subobject.
5647         (expand_aggr_vbase_init_1): Simplify.
5648         (construct_virtual_bases): Use tree-generating functions to build
5649         up initialization.
5650         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
5651         (expand_default_init): Likewise.
5652         (expand_aggr_init_1): Likewise.
5653         (expand_vec_init): Rename to build_vec_init.
5654         * method.c (do_build_copy_constructor): Use tree-generating
5655         functions.  Don't call clear_last_expr.
5656         (do_build_assign_ref): Likewise.
5657         (synthesize_method): Call clear_last_expr here.
5658         * parse.y (base_init): Don't call clear_last_expr here.
5659         (nodecls): Likewise.
5660         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
5661         * semantics.c (do_pushlevel): Move to here.
5662         (do_poplevel): Likewise.
5663         (stmts_are_full_exprs_p): New variable.
5664         (finish_expr_stmt): Handle logic for temoprary cleanup here.
5665         (finish_for_stmt): Use finish_expr_stmt.
5666         (finish_cleanup): New function.
5667         (finish_function_try_block): Fix indentation.
5668         (finish_subobject): New function.
5669         (setup_vtbl_ptr): Call keep_next_level here.
5670         (finish_stmt_expr): Handle a block with no scope inside the
5671         statement-expression.
5672         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
5673         SUBOBJECT.
5674         * tree.c (search_tree): Handle INIT_EXPR.
5675         (mapcar): Likewise.
5676         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
5677         * typeck2.c (store_init_value): Change expand_aggr_init to
5678         build_aggr_init in comment.
5679         
5680 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
5681
5682         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
5683
5684 1999-08-25  Nathan Sidwell  <nathan@acm.org>
5685
5686         * decl2.c (handle_class_head): Be graceful about additional
5687         scope qualifiers. Adjust comments to reflect reality.
5688
5689 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
5690
5691         * call.c (build_conditional_expr): Fix typo.
5692         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
5693         lvalue before trying to mess with the sides.
5694
5695         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
5696
5697 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
5698
5699         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
5700
5701 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
5702
5703         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
5704         Return arbitrary pointer or NULL.
5705         (check_eh_spec): Call __throw_type_match_rtti_2.
5706         * tinfo.h (*::dcast): Return int.  Add valp parm.
5707         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
5708         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
5709         (__throw_type_match_rtti): Now just a wrapper.
5710
5711         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
5712         (init_exception_processing): Don't initialize them.
5713
5714 1999-08-23  Paul Burchard <burchard@pobox.com>
5715
5716         * decl.c (check_default_argument): Fix typo.
5717
5718 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
5719
5720         * cp-tree.def (STMT_EXPR): Fix typo in node name.
5721
5722         * dump.c (dump_next_stmt): New function.
5723         (dequeue_and_dump): Use it.
5724         
5725         * pt.c (tsubst_copy): Make sure to initialize return value for a
5726         STMT_EXPR, even when processing_template_decl.
5727         * semantics.c (finish_stmt_expr): A statement-expression whose
5728         last statement is not an expression-statement has type `void'.  
5729         
5730 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
5731
5732         * semantics.c (finish_stmt_expr): Fix typo in comment.
5733         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
5734         (mapcar): Likewise.
5735         * init.c (build_vec_delete_1): Make the children of a permanent
5736         BIND_EXPR permanent.
5737         * pt.c (register_specialization): Don't register a specialization
5738         more than once.
5739         
5740 1999-08-18  Andrew Haley  <aph@cygnus.com>
5741
5742         * method.c (process_overload_item): Call build_mangled_C9x_name ()
5743         for all integer parameter types larger than long long.
5744
5745 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
5746
5747         * pt.c (redeclare_class_template): Merge default template
5748         arguments in both directions.
5749
5750         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
5751         compiler_error message.
5752
5753 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
5754
5755         * cp-tree.h: Declare flag_use_repository.
5756         * pt.c (do_decl_instantiation): Don't complain about duplicate
5757         instantiation with -frepo.
5758         (do_type_instantiation): Likewise.
5759
5760         * pt.c (push_template_decl_real): Complain about everything
5761         that isn't a valid template.
5762
5763         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
5764         affect inlines.
5765
5766 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
5767
5768         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
5769         * decl2.c (build_expr_from_tree): Handle it.
5770         * error.c (dump_expr): Likewise.
5771         * pt.c (for_each_template_parm): Likewise.
5772         (tsubst_copy): Likewise.
5773         * tree.c (search_tree): Likewise.
5774         * semantics.c (finish_pseudo_destructor_call): Create it.
5775         
5776 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
5777
5778         * search.c (setup_class_bindings): Robustify.
5779         * typeck.c (common_type): Use same_type_p, not pointer equality,
5780         to compare types.
5781
5782         * cp-tree.h (build_lang_field_decl): Remove.
5783         * class.c (build_vtable): Replace calls to build_lang_field_decl
5784         with build_lang_decl.
5785         (prepare_fresh_vtable): Likewise.
5786         (finish_struct_1): Likewise.
5787         (init_class_processing): Likewise.
5788         * decl.c (push_using_decl): Likewise.
5789         (init_decl_processsing): Likewise.
5790         (grokvardecl): Likewise.
5791         (build_ptrmemfunc_type): Likewise.
5792         (grokdeclarator): Likewise.
5793         (build_enumerator): Likewise.
5794         * decl2.c (grok_x_components): Likewise.
5795         (do_class_using_decl): Likewise.
5796         * except.c (call_eh_info): Likewise.
5797         * init.c (init_init_processing): Likewise.
5798         * rtti.c (expand_class_decl): Likewise.
5799         * tree.c (build_base_fields): Likewise.
5800         (build_vbase_pointer_fields): Likewise.
5801         * lex.c (build_lang_decl): Build declarations on the permanent
5802         obstack if we're building statmeent trees.
5803         (retrofit_lang_decl): Handle both the full lang_decl and also the
5804         smaller lang_decl_flags here.
5805         (build_lang_field_decl): Remove.
5806         * pt.c (push_template_decl_real): Issue errors for variable
5807         declarations that are not static members.
5808
5809 1999-08-18  Richard Henderson  <rth@cygnus.com>
5810
5811         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
5812         (mapcar): Likewise.
5813
5814 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
5815
5816         * cp-tree.h (back_end_hook): New variable.
5817         * decl2.c (back_end_hook): Define it.
5818         (finish_file): If it's non-NULL, call it.
5819
5820         * decl.c (add_decl_to_level): New function.
5821         (push_local_binding): Use it.
5822         (find_binding): Fix typo in comment.
5823         (pushdecl): Use add_decl_to_level.  Put templates on the
5824         corresponding namespace-scope binding levels.
5825         * dump.c (dequeue_and_dump): Print the specializations of a
5826         template.
5827         * pt.c (push_template_decl_real): Don't push a template multiple
5828         times.
5829
5830 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
5831
5832         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
5833         (CALL_DECLARATOR_QUALS): Likewise.
5834         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
5835         * decl.c (grokdeclarator): Adjust to use them.
5836         * decl2.c (grokfield): Likewise.
5837         (reparse_absdcl_as_casts): Likewise.
5838         * lex.c (make_call_declarator): Likewise.
5839         (set_quals_and_spec): Likewise.
5840         * pt.c (tsubst): Likewise.
5841         * tree.c (mapcar): Remove special hack to handle third operand of
5842         a CALL_EXPR.
5843
5844 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
5845
5846         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
5847         * class.c (build_vtable): Use build_lang_field_decl to build the
5848         VAR_DECLs for vtables.
5849         (prepare_fresh_vtable): Likewise.
5850         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
5851         CAN_HAVE_FULL_LANG_DECL_P.
5852         (push_using_decl): Use build_lang_decl to build USING_DECLs.
5853         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
5854         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
5855         (build_lang_field_decl): Likewise.
5856         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
5857         to copy.
5858         
5859         * cp-tree.def (STMT_EXPR): New tree node.
5860         * cp-tree.h (STMT_EXPR_STMT): New macro.
5861         (store_return_init): Change prototype.
5862         (finish_named_return_value): New function.
5863         (expand_stmt): Likewise.
5864         (expand_body): Likewise.
5865         (begin_stmt_tree): Likewise.
5866         (finish_stmt_tree): Likewise.
5867         (expanding_p): New variable.
5868         (last_expr_type): Likewise.
5869         (building_stmt_tree): New macro.
5870         * decl.c (start_function): Use building_stmt_tree, not
5871         processing_template_decl, where appropriate.
5872         (store_parm_decls): Likewise.
5873         (store_return_init): Move most of the body to semantics.c.
5874         (finish_function): Use building_stmt_tree.
5875         (finish_stmt): Clear last_expr_type here.
5876         (cp_function): Add expanding_p, last_tree, last_expr_type.
5877         (push_cp_function_context): Save them.
5878         (pop_cp_function_context): Restore them.
5879         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
5880         * error.c (dump_expr): Handle STMT_EXPR.
5881         * except.c (expand_start_catch_block): Use building_stmt_tree.
5882         Use add_decl_stmt.
5883         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
5884         (do_case): Move add_tree call to semantics.c.
5885         * parse.y (return_init): Use finish_named_return_value.
5886         (for.init.statement): Use finish_expr_stmt.
5887         * parse.c: Regenerated.
5888         * pt.c (do_pushlevel): Move to semantics.c.
5889         (do_poplevel): Likewise.
5890         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
5891         (tsubst_expr): Don't expand all the way to RTL here.  Handle
5892         RETURN_INIT and CTOR_INITIALIZER.
5893         (instantiate_decl): Call expand_body after tsubst'ing into
5894         DECL_SAVED_TREE.
5895         * semantics.c (expand_stmts): New function.
5896         (expanding_p): New variable.
5897         (last_expr_type): Likewise.
5898         (finish_expr_stmt): Use building_stmt_tree.
5899         (begin_if_stmt): Likewise.
5900         (finish_if_stmt_cond): Likewise.
5901         (finish_then_clause): Likewise.
5902         (begin_else_clause): Likewise.
5903         (finish_else_clause): Likewise.
5904         (begin_while_stmt): Likewise.
5905         (finish_while_stmt_cond): Likewise.
5906         (finish_while_stmt): Likewise.
5907         (finish_do_body): Likewise.
5908         (finish_do_stmt): Likewise.
5909         (finish_return_stmt): Likewise.
5910         (begin_for_stmt): Likewise.
5911         (fnish_for_init_stmt): Likewise.
5912         (finish_for_cond): Likewise.
5913         (finish_for_expr): Likewise.
5914         (finish_for_stmt): Likewise.
5915         (finish_break_stmt): Likewise.
5916         (finish_continue_stmt): Likewise.
5917         (finish_switch_cond): Likewise.
5918         (finish_switch_stmt): Likewise.
5919         (finish_case_label): Call add_tree here if necessary.
5920         (finish_goto_statement): Use building_stmt_tree.
5921         (begin_try_block): Likewise.
5922         (begin_function_try_block): Likewise.
5923         (finish_try_block): Likewise.
5924         (finish_function_try_block): Likewise.
5925         (finish_handler_sequence): Likewise.
5926         (finish_function_handler_sequence): Likewise.
5927         (begin_handler): Likewise.
5928         (finish_handler_parms): Likewise.
5929         (finish_handler): Likewise.
5930         (begin_compound_stmt): Likewise.
5931         (finish_compound_stmt): Likewise.
5932         (finish_asm_stmt): Likewise.
5933         (finish_label_stmt): Likewise.
5934         (finish_named_return_value): New function.
5935         (setup_vtbl_ptr): Moved here from decl2.c.
5936         (do_pushlevel): Moved here from pt.c.
5937         (do_poplevel): Likewise.
5938         (begin_stmt_expr): Use building_stmt_tree.
5939         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
5940         when building_stmt_tree.
5941         (begin_stmt_tree): New function.
5942         (finish_stmt_tree): Likewise.
5943         (expand_stmt): Likewise.
5944         (expand_body): Likewise.
5945         * tree.c (build_cplus_method_type): Make sure the argument types
5946         end up on the same obstack as the METHOD_TYPE.
5947         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
5948         THROW_EXPR, STMT_EXPR.
5949         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
5950         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
5951         sorry, if an unsupported node is encountered.
5952         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
5953         (c_expand_return): Don't call add_tree here.
5954         
5955 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
5956
5957         * pt.c (check_default_tmpl_args): Don't check in local scopes.
5958         (tsubst_decl): Make sure the declaration is on a saveable
5959         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
5960         variable.
5961         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
5962         
5963 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
5964
5965         Speed up Koenig lookup.
5966         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
5967         to return namespaces we've looked at.
5968         * decl2.c (lookup_using_namespace): Likewise.
5969         (add_function): Don't call ovl_member.
5970         (lookup_arg_dependent): Initialize k.namespaces to the list of 
5971         namespaces seen in unqualified lookup.
5972         * call.c (equal_functions): Move here from tree.c.
5973         (joust): Use it to handle duplicate candidates.
5974         * tree.c (ovl_member): Use ==.
5975
5976 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
5977
5978         * cp-tree.def (DECL_STMT): Make it smaller.
5979         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
5980         (lang_decl): ... here.  Add next.
5981         (DECL_SAVED_TREE): Adjust accordingly.
5982         (DECL_IMPLICIT_TYPEDEF_P): New macro.
5983         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
5984         (DECL_STMT_DECL): Likewise.
5985         (create_implicit_typedef): New function.
5986         (maybe_push_decl): Likewise.
5987         (tsubst_default_argument): New function.
5988         (at_function_scope_p): Likewise.
5989         (add_decl_stmt): Likewise.
5990         (push_permanent_obstack): Likewise.
5991         * call.c (convert_default_arg): Use tsubst_default_argument.
5992         * class.c (add_method): Use push_permanent_obstack.
5993         (build_self_reference): Create a TEMPLATE_DECL for the
5994         self-reference, if necessary.
5995         * decl.c (pseudo_global_level_p): Only look at the current binding
5996         level.
5997         (push_binding): Use push_permanent_obstack.
5998         (create_implicit_typedef): New function.
5999         (pushtag): Use it.
6000         (duplicate_decls): Use push_permanent_obstack.
6001         (maybe_push_decl): New function.
6002         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
6003         (start_decl_1): Remove dead code.
6004         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
6005         pseudo_global_level_p.
6006         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
6007         template.
6008         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
6009         pseudo_global_level_p.
6010         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
6011         a template.
6012         (get_sentry): Use push_permanent_obstack.
6013         * dump.c (dequeue_and_dump): Enable DECL_STMT.
6014         * except.c (call_eh_info): Use push_permanent_obstack.
6015         (build_eh_type_ref): Likewise.
6016         (do_pop_exception): Likewise.
6017         (expand_eh_spec): Likewise.
6018         (alloc_eh_object): Likewise.
6019         (expand_throw): Likewise.
6020         * init.c (build_java_class_ref): Likewise.
6021         * lex.c (get_time_identifier): Likewise.
6022         (free_lang_decl_chain): Correct type.
6023         (retrofit_lang_decl): Adjust accordingly.
6024         (build_lang_field_decl): Likewise.
6025         * lex.h (free_lang_decl_chain): Likewise.
6026         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
6027         * parse.c: Regenerated.
6028         * pt.c (tsubst_default_arguments): New function.
6029         (retrieve_local_specialization): Likewise.
6030         (register_local_specialization): Likewise.
6031         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
6032         pseudo_global_level_p to determine whether or not a template is
6033         primary.
6034         (lookup_template_class): Likewise.  Use create_implicit_typedef.
6035         (instantiate_class_template): Call tsubst_default_arguments for
6036         member functions, if appropriate.
6037         (tsubst_default_argument): New function.
6038         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
6039         * search.c (at_function_scope_p): New function.
6040         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
6041         (finish_label_stmt): Likewise.
6042         (add_decl_stmt): New function.
6043         (begin_class_definition): Likewise.
6044         (finish_typeof): Likewise.
6045         * tree.c (copy_template_template_parm): Likewise.
6046         (copy_to_permanent): Likewise.
6047         (push_permanent_obstack): Define.
6048         (mark_addressable): Use it.
6049         * typeck.c (mark_addressable): Likewise.
6050         
6051 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
6052
6053         * cp-tree.h (init_cplus_unsave): New.
6054         (cplus_unsave_expr_now): New.
6055         * lex.c (init_parse): Call init_cplus_unsave.
6056         * tree.c (init_cplus_unsave): New.
6057         (cplus_unsave_expr_now): New.
6058
6059 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
6060
6061         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
6062         decl_constant_value to simplify array bounds.
6063
6064 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
6065
6066         * lang-options.h: Add -fms-extensions.
6067         * cp-tree.h: Declare flag_ms_extensions.
6068         * decl2.c: Define it.
6069         * class.c (instantiate_type): Don't complain about taking the address
6070         of a bound member function if -fms-extensions.
6071         * typeck.c (build_unary_op): Likewise.
6072         * decl.c (grokdeclarator): Or about implicit int.
6073         * init.c (resolve_offset_ref): Or about implicit '&'.
6074
6075 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
6076
6077         * cp-tree.h (minimal_parse_mode): Remove.
6078         (finish_label_stmt): New function.
6079         * decl.c (saved_scope): Remove minimal parse mode.
6080         (maybe_push_to_top_level): Don't save it.
6081         (pop_from_top_level): Don't restore it.
6082         (define_label): Split out template-handling code to semantics.c.
6083         (start_decl): Don't use minimal_parse_mode.
6084         (cp_finish_decl): Likewise.
6085         (start_function): Don't increment it.
6086         (store_return_init): Don't use it.
6087         (finish_function): Don't decrement it.
6088         * parse.y (label_colon): Use finish_label_stmt throughout.
6089         * parse.c: Regenerated.
6090         * pt.c (minimal_parse_mode): Don't define it.
6091         (tsubst_expr): Use finish_label_stmt.
6092         * semantics.c (finish_label_stmt): New function.
6093
6094         * dump.c (queue): Be careful when computing bitmasks.
6095         (dequeue_and_dump): Describe binfos as binfos, not as
6096         vectors.
6097         
6098         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
6099         throughout.     
6100         * parse.c: Regenerated.
6101         
6102         * Make-lang.in (CXX_SRCS): Remove sig.c.
6103         * Makefile.in (CXX_OBJS): Remove sig.o.
6104         (sig.o): Remove.
6105         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
6106         (CPTI_SIGNATURE_TYPE): Likewise.
6107         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
6108         (opaque_type_node): Likewise.
6109         (signature_type_node): Likewise.
6110         (sigtable_entry_type): Likewise.
6111         (flag_handle_signatures): Likewise.
6112         (lang_type): Remove is_signature, is_signature_pointer,
6113         is_signature_reference, has_opaque_typedecls,
6114         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
6115         signature_pointer_to, signature_reference_to.
6116         (IS_SIGNATURE): Remove.
6117         (SET_SIGNATURE): Remove.
6118         (CLEAR_SIGNATURE): Remove.
6119         (IS_SIGNATURE_POINTER): Remove.
6120         (IS_SIGNATURE_REFERENCE): Remove.
6121         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
6122         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
6123         (CLASSTYPE_SIGNATURE): Remove.
6124         (SIGNATURE_TYPE): Remove.
6125         (SIGNATURE_METHOD_VEC): Remove.
6126         (SIGNATURE_POINTER_TO): Remove.
6127         (SIGNATURE_REFERENCE_TO): Remove.
6128         (lang_decl_flags): Remove is_default_implementation.  Rename
6129         memfunc_pointer_to to saved_tree.
6130         (IS_DEFAULT_IMPLEMENTATION): Remove.
6131         (DECL_MEMFUNC_POINTER_TO): Remove.
6132         (DECL_MEMFUNC_POINTING_TO): Remove.
6133         (DECL_SAVED_TREE): Adjust definition.
6134         (tag_types): Remove signature_type_node.
6135         (SIGNATURE_FIELD_NAME): Remove.
6136         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
6137         (SIGNATURE_OPTR_NAME): Likewise.
6138         (SIGNATURE_SPTR_NAME): Likewise.
6139         (SIGNATURE_POINTER_NAME): Likewise.
6140         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
6141         (SIGNATURE_REFERENCE_NAME): Likewise.
6142         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
6143         (SIGTABLE_PTR_TYPE): Likewise.
6144         (SIGTABLE_NAME_FORMAT): Likewise.
6145         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
6146         (SIGTABLE_TAG_NAME): Likewise.
6147         (SIGTABLE_VB_OFF_NAME): Likewise.
6148         (SIGTABLE_VT_OFF_NAME): Likewise.
6149         (finish_base_specifiers): Change prototype.
6150         (build_signature_pointer_type): Remove.
6151         (build_signature_reference_type): Remove.
6152         (build_signature_pointer_constructor): Remove.
6153         (build_signature_method_call): Remove.
6154         (build_optr_ref): Likewise.
6155         (append_signature_fields): Likewise.
6156         (signature_error): Likewise.
6157         * call.c (build_this): Remove signature support.
6158         (build_over_call): Likewise.
6159         (build_new_method_call): Likewise.
6160         * class.c (add_implicitly_declared_members): Likewise.
6161         (finish_struct_1): Likewise.
6162         (finish_struct): Likewise.
6163         * cvt.c (cp_convert_to_pointer): Likewise.
6164         (convert_to_pointer_force): Likewise.
6165         (ocp_convert): Likewise.
6166         * decl.c (sigtable_decl_p): Remove.
6167         (init_decl_processing): Remove support for signatures.
6168         (cp_finish_decl): Likewise.
6169         (grokdeclarator): Likewise.
6170         (grokparms): Likewise.
6171         (xref_tag): Likewise.
6172         (start_function): Likewise.
6173         (start_method): Likewise.
6174         * decl2.c (finish_sigtable_vardecl): Remove.
6175         (flag_handle_signatures): Remove.
6176         (lang_f_options): Remove handle-signatures.
6177         (grokfield): Remove support for signatures.
6178         (grokbitfield): Likewise.
6179         (finish_file): Likewise.
6180         (reparse_absdcl_as_casts): Likewise.
6181         * error.c (dump_type_real): Likewise.
6182         (dump_function_decl): Likewise.
6183         * friend.c (make_friend_class): Likewise.
6184         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
6185         * hash.h: Regenerated.
6186         * init.c (build_new_1): Remove support for signatures.
6187         * lang-options.h: Remove -fhandle-signatures,
6188         -fno-handle-signatures. 
6189         * lex.c (init_parse): Remove support for signatures.
6190         (yyprint): Likewise.
6191         * lex.h (rid): Remove RID_SIGNATURE.
6192         * method.c (build_decl_overload_real): Remove support for
6193         signatures. 
6194         (hack_identifier): Likewise.
6195         * parse.y (base_class): Likewise.
6196         (base_class.1): Likewise.
6197         (access_specifier): Likewise.
6198         * search.c (lookup_member): Likewise.
6199         * semantics.c (finish_qualified_object_call_expr): Likewise.
6200         (finish_template_type_parm): Likewise.
6201         (begin_class_definition): Likewise.
6202         (finish_base_specifier): Likewise.
6203         * sig.c: Remove.
6204         * tree.c (build_cplus_method_type): Remove support for signatures.
6205         * typeck.c (require_complete_type): Likewise.
6206         (c_sizeof): Likewise.
6207         (c_alignof): Likewise.
6208         (build_object_ref): Likewise.
6209         (build_component_ref): Likewise.
6210         (build_indirect_ref): Likewise.
6211         (build_c_cast): Likewise.
6212         (build_modify_expr): Likewise.
6213         (convert_for_initialization): Likewise.
6214         * typeck2.c (signature_error): Remove.
6215         (store_init_value): Remove support for signatures.
6216         (digest_init): Likewise.
6217         (build_x_arrow): Likewise.
6218         (build_functional_cast): Likewise.
6219         * xref.c (GNU_xref_decl): Likewise.
6220         
6221 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
6222
6223         * lex.c (do_identifier): Remove unnecessary lookup of class field.
6224
6225 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
6226
6227         * decl2.c (set_decl_namespace): Do not complain about non-matching
6228         decls if processing a template.
6229
6230 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
6231
6232         * decl.c (build_ptrmemfunc_type): Handle qualified
6233         pointer-to-member types here.
6234         * tree.c (cp_build_qualified_type_real): Simplify handling here.
6235
6236 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6237
6238         * lex.c (lang_identify): Likewise.
6239
6240 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
6241
6242         * Makefile.in: Update dependencies.
6243         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
6244         NULL_RTX.
6245         * decl.c: Include "function.h"
6246         (cleanup_label, return_label): Delete declarations.
6247         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
6248         (finish_function): Rename last_parm_insn variable to
6249         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
6250         * decl2.c: Include "function.h".
6251         (rtl_expr_chain): Delete declaration.
6252         * method.c: Include "function.h"
6253         * tree.c (build_vbase_pointer_fields): Don't initialize
6254         DECL_SAVED_INSNS with NULL_RTX.
6255         * typeck.c: Include "function.h"
6256
6257 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
6258
6259         * semantics.c (begin_function_try_block, finish_function_try_block,
6260         finish_function_handler_sequence): New fns.
6261         * parse.y (function_try_block): Use them.
6262         * pt.c (instantiate_decl): Likewise.
6263
6264         * cp-tree.h: Declare in_function_try_handler.
6265         * decl.c: Define it.
6266         (start_function): Clear it.
6267         (struct cp_function, push_cp_function_context): Save it.
6268         (pop_cp_function_context): Restore it.
6269         * parse.y (function_try_block): Set and clear it.
6270         * except.c (expand_end_catch_block): Rethrow if we reach the end
6271         of a function-try-block handler in a ctor or dtor.
6272         * typeck.c (c_expand_return): Complain about returning from a
6273         function-try-block handler of a ctor.
6274
6275         * parse.y (function_try_block): Call end_protect_partials
6276         before expand_start_all_catch.
6277
6278 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
6279
6280         * decl.c (struct binding_level): Add eh_region field.
6281         (push_binding_level): Set it.
6282         (define_label): Complain about jumping into an EH block.
6283
6284         * ptree.c (print_lang_type): Print the real type of a PMF.
6285         Print what exceptions a fn type throws.
6286
6287 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6288
6289         * class.c (count_fields, add_fields_to_vec): Add static prototype.
6290
6291         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
6292         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
6293         char*.
6294
6295         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
6296         Constify a char*.
6297
6298         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
6299         char*.
6300
6301         * dump.c (queue_and_dump_index, dump_int, dump_string,
6302         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
6303         a char*.
6304         (dump_stmt): Add static prototype.
6305
6306         * errfn.c (cp_thing): Constify a char*.
6307
6308         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
6309         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
6310         dump_expr): Constify a char*.
6311
6312         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
6313         read_line_number): Add static prototype.
6314         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
6315         (real_yylex): Move label `letter' into the scope where it is used.
6316
6317         * method.c (build_mangled_template_parm_index, build_overload_int,
6318         build_decl_overload_real, get_id_2): Constify a char*.
6319
6320         * search.c (check_final_overrider): Make static.
6321
6322         * typeck.c (composite_pointer_type): Constify a char*.
6323
6324 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
6325
6326         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
6327         we're looking at a class.
6328
6329         * decl.c (lookup_name_real): Set the complain flag if we're
6330         looking for a namespace member.
6331
6332         * lex.c (real_yylex): We can have a number with no digits.
6333
6334         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
6335
6336         * search.c (binfo_from_vbase): New fn.
6337         * cp-tree.h: Declare it.
6338         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
6339         from pointer to member of virtual base.  
6340         * typeck.c (get_delta_difference): Likewise.
6341
6342 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
6343
6344         * pt.c (tsubst): Use build_index_type to build in-template array
6345         index type.  Fixes g++.oliva/dwarf1.C.
6346         * decl.c (grokdeclarator): Likewise, just for consistency, as it
6347         doesn't seem to trigger the bug without it.
6348
6349 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
6350
6351         * typeck2.c (add_exception_specifier): Use complete_type.
6352
6353 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
6354
6355         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
6356         (dump_binary_op): Bulletproof.
6357         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
6358         * tree.c (search_tree): Don't enumerate all the nodes of classes
6359         `1', `2', and `<'; handle them generically.  Don't be sorry about
6360         "unrecognized tree codes"; just abort.
6361         (no_linkage_check): Don't do linkage checks for templates.
6362         
6363         * tree.c (cp_build_qualified_type_real): Handle
6364         pointer-to-member-function types correctly.
6365
6366 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
6367
6368         * decl.c (pushdecl): Only give an error for shadowing a parm 
6369         from *this* function.
6370
6371 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
6372
6373         * typeck2.c: Update URLs and mail addresses.
6374
6375 1999-08-04  Nathan Sidwell  <nathan@acm.org>
6376
6377         * cp-tree.h (empty_except_spec): New global var.
6378         (compexcepttypes): Remove prototype.
6379         (comp_except_specs): Prototype new global function.
6380         (add_exception_specifier): Prototype new global function.
6381         * decl.c (empty_except_spec): Define new global var.
6382         (duplicate_decls): Use comp_except_specs, reword error message.
6383         (init_decl_processing): Initialize empty_except_spec.
6384         Adjust build_exception_variant calls.
6385         * parse.y (exception_specification_opt): Use empty_except_spec.
6386         (ansi_raise_identifier): Call check_for_new_type.
6387         (ansi_raise_identifiers): Use add_exception_specifier.
6388         * pt.c (tsubst): Use add_exception_specifier to build exception
6389         specifier.
6390         * search.c (check_final_overrider): New static function, broken
6391         out of get_matching_virtual. Check throw specifiers, reword
6392         diagnostics.
6393         (get_matching_virtual): Use check_final_overrider.
6394         * tree.c (build_exception_variant): Use comp_except_specs.
6395         * typeck.c (compexcepttypes): Remove.
6396         (comp_except_types): New static function, helper for
6397         comp_except_specs. Compare two types as exception specifiers.
6398         (comp_except_specs): New global function, compare two exception
6399         specifiers.
6400         (comptypes): Adjust for comp_except_specs.
6401         * typeck2.c (add_exception_specifier): New global function.
6402         
6403         * class.c (check_for_override): Reword error message.
6404
6405 1999-08-03  Nathan Sidwell  <nathan@acm.org>
6406
6407         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
6408         * cp-tree.h (struct lang_type): Added non_pod_class flag.
6409         (CLASSTYPE_NON_POD_P): New macro to access it.
6410         * class.c (finish_struct_1): Determine non-PODness.
6411         Check for arrays of pointers (-Weffc++).
6412         Remove array inspection duplicated code.
6413         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
6414         Use CLASSTYPE_NON_POD_P.
6415
6416 1999-08-03  Nathan Sidwell  <nathan@acm.org>
6417
6418         * class.c (duplicate_tag_error): Preserve template information.
6419
6420 1999-08-03  Nathan Sidwell  <nathan@acm.org>
6421
6422         * decl.c (start_enum): Show location of previous definition.
6423         * parse.y (enumlist_opt): New reduction.
6424         (structsp): Simplify enum rules to use enumlist_opt.
6425
6426 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
6427
6428         * lex.c (yyprint): Handle PFUNCNAME.
6429
6430         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
6431         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
6432
6433 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
6434
6435         * decl.c (start_decl): Set attributes before duplicate_decls call.
6436
6437 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
6438
6439         * Make-lang.in (CXX_SRCS): Add dump.c.
6440         * Makefile.in (CXX_OBJS): Add dump.o.
6441         (dump.o): New target.
6442         * cp-tree.h (DECL_CONV_FN_P): Document.
6443         (DECL_OVERLOADED_OPERATOR_P): New function.
6444         (TYPE_PTRMEM_CLASS_TYPE): New macro.
6445         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
6446         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
6447         (ASM_VOLATILE_P): New macro.
6448         (STMT_LINENO): Likewise.
6449         (cp_namespace_decls): New function.
6450         (dump_node_to_file): New function.
6451         * decl.c (cp_namespace_decls): New function.
6452         (walk_namespaces_r): Use it.
6453         (wrapup_globals_for_namespace): Likewise.
6454         * decl2.c (flag_dump_translation_unit): New variable.
6455         (lang_decode_option): Handle -fdump-translation-unit.
6456         (finish_file): If flag_dump_translation_unit is set, dump the
6457         translation unit.
6458         * dump.c: New file.
6459         * lang-options.h: Add -fdump-translation-unit.
6460         * pt.c (tsubst_template_parms): Robustify.
6461         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
6462         (tsubst_expr): Use STMT_LINENO.
6463         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
6464         for invalid cv-qualifiers even while building templates.
6465         
6466 1999-08-02  Richard Henderson  <rth@cygnus.com>
6467
6468         * call.c: Include defaults.h instead of expr.h.
6469         * decl.c: Likewise.
6470         * pt.c: Likewise.
6471         * typeck.c: Include defaults.h.
6472
6473 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
6474
6475         * lex.c (errorcount, sorrycount): Don't declare.
6476         * repo.c (errorcount, sorrycount): Likewise.
6477         * typeck2.c (errorcount, sorrycount): Likewise.
6478
6479 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
6480
6481         * call.c (convert_default_arg, build_over_call): Change all uses of
6482         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
6483         Ensure expr.h is included.
6484         * decl.c (grokparams): Ditto.
6485         * pt.c (tsubst_decl): Ditto.
6486         * typeck.c (convert_arguments): Ditto.
6487
6488 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
6489
6490         * class.c (mark_overriders): Fix order of args to overrides.
6491         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
6492         functions with the same name.
6493
6494 1999-08-02  Richard Henderson  <rth@cygnus.com>
6495
6496         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
6497
6498 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
6499
6500         * call.c (build_conditional_expr): Fix typo in comment.
6501
6502 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
6503
6504         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
6505         case_stack; use in_control_zone_p.
6506         * typeck.c (c_expand_return): Likewise.
6507
6508 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
6509
6510         * except.c (catch_clauses): Delete declaration.
6511
6512 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
6513
6514         * call.c (build_conditional_expr): Call convert_from_reference to
6515         avoid reference/non-reference type confusion.  Fix typo.
6516
6517 1999-07-30  Richard Henderson  <rth@cygnus.com>
6518
6519         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
6520         * cp-tree.h (initializer_constant_valid_p): Remove.
6521
6522 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
6523
6524         * call.c (conditional_conversion): Don't build BASE_CONVs for
6525         conversions between things that have the same type.
6526         (build_conditional_expr): Tweak.
6527         (convert_like): Some BASE_CONVs really do require the generation
6528         of code.
6529         
6530         * init.c (perform_member_init): Don't go through build_modify_expr
6531         for simple initializations.
6532
6533 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
6534
6535         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
6536         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
6537         virtual functions and MI.  Simplify.
6538
6539         * method.c: Remove prototype for largest_union_member.
6540         * pt.c (determine_specialization): Fix uninitialized warning.
6541         * lex.c (real_yylex): Likewise.
6542
6543 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
6544
6545         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
6546         here too.
6547
6548         * cp-tree.h (BINFO_VIRTUALS): Document new format.
6549         * class.c (modify_one_vtable): Change prototype accordingly.
6550         (modify_all_vtables): Likewise.
6551         (modify_all_direct_vtables): Likewise.
6552         (modify_all_indirect_vtables): Likewise.
6553         (build_vtable_entry_for_fn): New function.
6554         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
6555         (modify_vtable_entry): Likewise.
6556         (add_virtual_function): Likewise.
6557         (build_vtbl_initializer): New function.
6558         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
6559         (fixup_vtable_deltas1): Likewise.
6560         (fixup_vtable_deltas): Likewise.
6561         (override_one_vtable): Likewise.
6562         (finish_struct_1): Likewise.
6563
6564         * error.c (dump_expr): Likewise.
6565         * search.c (get_abstract_virtuals_1): Likewise.
6566         (get_abstract_virtuals): Likewise.
6567         (expand_upcast_fixups): Likewise.
6568         * tree.c (debug_binfo): Likewise.
6569         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
6570         __pure_virtual here.
6571         
6572 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
6573
6574         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
6575         as per 1999-07-26 change.
6576
6577         * typeck.c (c_sizeof): Don't allow non-static data members.
6578         (expr_sizeof): Likewise.
6579
6580 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
6581
6582         * input.c (feed_input): Only touch lineno and input_filename
6583         if !USE_CPPLIB.  Save the old values before setting the new ones.
6584
6585         * input.c (feed_input): Add file, line parms.
6586         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
6587         (real_yylex): Check linemode before input_redirected().
6588
6589         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
6590         from op new to warning.
6591
6592 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
6593
6594         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
6595         * call.c: All uses changed.
6596         * typeck.c: Likewise.
6597
6598 1999-07-26  Nathan Sidwell  <nathan@acm.org>
6599
6600         * exception.cc (__cplus_type_matcher): Match __eh_matcher
6601         prototype.
6602
6603 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
6604
6605         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
6606         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
6607         (strip_top_quals): Declare.
6608         (ncp_convert): Likewise.
6609         (type_after_usual_arithmetic_converions): Likewise.
6610         (composite_pointer_type): Likewise.
6611         * call.c (strip_top_quals): Don't make it static.
6612         (promoted_arithmetic_type_p): New function.
6613         (conditional_conversion): Likewise.
6614         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
6615         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
6616         for converting a type to itself.
6617         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
6618         (implicit_conversion): Make sure the from and to types are
6619         complete.
6620         (add_builtin_candidate): Correct handling of ?: operator.
6621         (add_builtin_candidates): Improve documentation.
6622         (build_conditional_expr): New function.
6623         (can_convert): Implement in terms of can_convert_arg.
6624         (ncp_convert): New function.
6625         * typeck.c (type_after_usual_arithmetic_conversions): New
6626         function, split out from common_type.
6627         (composite_pointer_type): New function, split out from
6628         build_conditional_expr.
6629         (common_type): Use type_after_usual_arithmetic_conversions.
6630         Remove redundant attribute merging.
6631         (comptypes): Tidy.  Handle COMPLEX_TYPE.
6632         (build_binary_op_nodefault): Use null_ptr_cst_p.
6633         (build_conditional_expr): Remove.
6634         (convert_for_assignment): Use new conversion functions.
6635         
6636         * cp-tree.h (abstract_virtuals_error): Change declaration.
6637         * typeck2.c (abstract_virtuals_error): Check to see if an error
6638         ocurred, and return a boolean value accordingly.
6639         (build_functional_cast): Adjust accordingly.
6640         * class.c (finish_struct_1): Likewise.
6641         * cvt.c (ocp_convert): Likewise.
6642         * decl.c (cp_finish_decl): Likewise.
6643         (grokparams): Likewise.
6644         (grok_op_properties): Likewise.
6645         (start_function): Likewise.
6646         * init.c (build_new_1): Likewise.
6647
6648         * pt.c (unify): Don't get confused by pointers-to-member functions.
6649
6650         * search.c (build_cplus_new): Robustify.
6651         
6652 1999-07-24  Richard Henderson  <rth@cygnus.com>
6653
6654         * gxx.gperf (__builtin_va_arg): New.
6655         * parse.y (VA_ARG): New token.
6656         (unary_expr): Recognize it.
6657
6658 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
6659
6660         * g++FAQ.texi: Deleted per Joe Buck's request.
6661         * Makefile.in: Corresponding changes.
6662
6663 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
6664
6665         * lex.c: Sync with C frontend.
6666         (whitespace_cr): New fn.
6667         (skip_white_space): Use it.
6668         (init_parse): Reorder.
6669         (yyprint): Support CONSTANT.
6670         (pragma_getc, pragma_ungetc): Bring back.
6671         (read_line_number): Change in_system_header directly.
6672         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
6673         (parse_float): Update to C version.
6674         (yylex): Handle '$' under the letter case.
6675         Remove looking_for_typename handling.
6676         Support hex floating point constants.
6677         Follow C's lead for choosing type of integer constants.
6678         Rearrange stuff to match C frontend.
6679         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
6680         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
6681
6682 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
6683
6684         * call.c (reference_binding): Tweak.
6685         (mayble_handle_implicit_object): Use direct_reference_binding to
6686         create the right implicit conversion sequence.
6687
6688 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
6689
6690         * pt.c (convert_nontype_argument): Don't call decl_constant_value
6691         if we're converting to a reference type.
6692
6693         * call.c (NEED_TEMPORARY_P): New macro.
6694         (standard_conversion): Set it, for derived-to-base conversions.
6695         (reference_related_p): New function.
6696         (reference_compatible_p): Likewise.
6697         (convert_class_to_reference): Likewise.
6698         (direct_reference_binding): Likewise.
6699         (reference_binding): Rework for standards-compliance.
6700         (convert_like): Adjust accordingly.
6701         (maybe_handle_ref_bind): Simplify; the right conversion sequences
6702         are now built up in reference_binding.
6703         (initialize_reference): New function.
6704         * cp-tree.h (ICS_USER_FLAG): Document.
6705         (ICS_THIS_FLAG): Likewise.
6706         (ICS_BAD_FLAG): Likewise.
6707         (NEED_TEMPORARY_P): Likewise.
6708         (cp_lvalue_kind): New type.
6709         (real_lvalue_p): Return it.
6710         * error.c (dump_expr): Provide more accurate representation for
6711         AGGR_INIT_EXPRs.
6712         * init.c (expand_default_init): Do not try to perform implicit
6713         conversions for a brace-enclosed initializer.
6714         * search.c (lookup_conversions): Document.
6715         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
6716         appropriately.
6717         (real_lvalue_p): Adjust accordingly.
6718         (lvalue_p): Likewise.
6719         (build_cplus_new): Don't allow the creation of an abstract class.
6720         * typeck.c (convert_for_initialization): Use initialize_reference.
6721         
6722 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
6723
6724         * lex.c (real_yylex) : Correct the test for overflow when lexing
6725         integer literals.
6726
6727 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
6728
6729         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
6730         not DECL_BUILT_IN, to determine if a function is internally declared.
6731         (duplicate_decls): Likewise.  Improve handling of builtins.
6732         (push_overloaded_decl): Remove special handling of builtins.
6733
6734         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
6735
6736         * decl.c (grokdeclarator): Pull out decl_constant_value in
6737         templates, too.
6738
6739         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
6740         * cp-tree.h, pt.c, semantics.c: Adjust.
6741         * method.c (largest_union_member): Remove.
6742
6743         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
6744
6745         * lex.c (token_getch, token_put_back): New fns.
6746         (real_yylex): Use them.
6747
6748         * lex.c (lang_init): Generalize.
6749         (lang_init_options): Tell cpplib this is C++.
6750         (nextchar): Remove.  Replace uses with put_back.
6751         (skip_white_space): Handle linemode here.  Optimize for cpplib.
6752         (extend_token_buffer_to): New fn.
6753         (extend_token_buffer): Use it.
6754         (read_line_number, check_newline): Just deal with tokens.
6755         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
6756         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
6757         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
6758         * parse.y (PAREN_STAR_PAREN): Remove.
6759         * input.c: Don't use the putback machinery with cpplib.
6760         (sub_getch): Fold back into getch.
6761         (getch): Don't handle linemode here.
6762         (feed_input): Unget any text in the token buffer.
6763
6764         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
6765         nextyychar, nextyylval): Remove.
6766
6767 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
6768             Jason Merrill  <jason@yorick.cygnus.com>
6769
6770         * lex.c (indent_level): New variable.
6771         (init_parse): Set cpp_token to CPP_DIRECTIVE.
6772         (consume_string): Make this smart about USE_CPPLIB.
6773         (yyungetc): Use put_back function.
6774         (pragma_getc, pragma_ungetc): Functions deleted.
6775         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
6776         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
6777         pragma_ungetc.
6778         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
6779         Also, clean up cases where we redundantly set token_buffer[0].
6780         (read_line_number): New fn.
6781         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
6782         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
6783         (sub_getch): Conditionalize out code that's not appropriate if
6784         USE_CPPLIB.
6785         (put_back): Rewrite in case USE_CPPLIB is defined.
6786         (input_redirected): Ditto.
6787
6788 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
6789
6790         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
6791         c_global_trees and accessor macros defined in c-common.h.
6792         (cp_tree_index): New enumeration.
6793         (cp_global_trees): Declare new array.  Add accessor macros for it, and
6794         delete declarations of tree nodes replaced by it.
6795         (builtin_function): Delete macro, add declaration for new function.
6796         Include c-common.h.
6797         * decl.c: Delete definitions for tree nodes that were replaced by
6798         cp_global_trees and c_global_trees.
6799         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
6800         to generate the common builtins here.
6801         (builtin_function): New function.
6802         * decl2.c (abort_fndecl): Delete declaration.
6803         * except.c (expand_builtin_return_address): Delete declaration.
6804         (builtin_return_address_fndecl): Delete variable.
6805         (const_ptr_type_node): Delete declaration.
6806         * lex.c (cons_up_default_function): Delete declaration of
6807         void_list_node.
6808         * parse.y (void_list_node): Delete declaration.
6809         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
6810         Delete variables.
6811         (const_string_type_node): Delete declaration.
6812         * search.c (abort_fndecl): Delete declaration.
6813         * Makefile.in: Update dependencies.
6814
6815 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
6816
6817         * pt.c (check_default_tmpl_args): Move test for missing default
6818         arguments here, from ...
6819         (end_template_parm_list): Here.
6820
6821 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
6822
6823         * decl.c (lookup_nested_type): Remove.
6824         (pushtag): Don't call it.
6825
6826 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
6827
6828         * Makefile.in (INTERFACE): Bump to 2.
6829
6830 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
6831         
6832         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
6833         instructions to gcc.gnu.org.  Removed e-mail address.
6834
6835 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
6836
6837         * pt.c (determine_specialization): Tighten error-checking.
6838         (end_template_parm_list): Likewise.
6839
6840 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
6841
6842         * pt.c (check_default_tmpl_args): Handle friends defined in the
6843         class just like member functions defined in the class.
6844
6845 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
6846             Jason Merrill  <jason@yorick.cygnus.com>
6847
6848         * cp-tree.h (struct lang_decl): Added field for storing sorted
6849         FIELD_DECLs (used in TYPE_DECLs).
6850         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
6851         (DECL_SORTED_FIELDS): New macro.
6852         * class.c (method_name_cmp): New function.
6853         (finish_struct_methods): Modified to support sorting and searching
6854         methods.
6855         (finish_struct_anon): Changed code in inner loop to use ELT rather 
6856         than UELT (which required an extra indirection for every reference).
6857         (field_decl_cmp): New function to support sorting FIELD_DECLs.
6858         (finish_struct_1): Sort fields.
6859         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
6860         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
6861         Also, switch to using array indexing rather than a changing pointer.
6862         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
6863         DECL_SORTED_FIELDS.
6864
6865 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
6866
6867         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
6868         casts in system headers or extern "C" blocks.
6869
6870         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
6871         errors to pedwarn.
6872
6873 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
6874
6875         * decl2.c (write_virtuals): Deleted declaration.
6876         * cp-tree.h (write_virtuals): Deleted extern declaration.
6877         * class.c (finish_struct_1): Removed #if 0'd code that mentions
6878         write_virtuals.
6879         * semantics.c (begin_class_definition): Rewrite code to not depend
6880         on write_virtuals.
6881
6882         * lex.c (cp_pragma_interface): New function.
6883         (cp_pragma_implementation): Likewise.
6884         (handle_cp_pragma): Call them.
6885
6886         * typeck.c (comptypes): Simplify C code in look_hard.
6887
6888         * xref.c (PALLOC): Use xcalloc, not calloc.
6889         (SALLOC): Use xmalloc, not malloc.
6890
6891         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
6892
6893         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
6894         is NO_DEBUG.
6895
6896         * decl.c (duplicate_decls): If a redeclaration doesn't match the
6897         initial declaration, then don't save the inline info and by all
6898         means don't mark the function as a builtin function.
6899
6900         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
6901         CURRENT_CLASS_TYPE is 0.
6902
6903         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
6904         NULL_TREE.
6905
6906         * ptree.c (print_lang_type): Added vtable-needs-writing.
6907
6908 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
6909
6910         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
6911
6912 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
6913
6914         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
6915         Merged into c-common.
6916
6917 1999-07-05  Dave Brolley  <brolley@cygnus.com>
6918
6919         * lex.c (errorcount): Declare it.
6920         (finish_parse): Update errorcount for when using CPPLIB.
6921
6922 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
6923
6924         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
6925         parameters.
6926         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
6927         * decl.c (push_class_binding): Use it.
6928         (lookup_name_real): Likewise.
6929
6930 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
6931
6932         * cp-tree.h (widest_integer_literal_type_node,
6933         widest_unsigned_literal_type) : New.
6934         * decl.c (widest_integer_literal_type_node,
6935         widest_unsigned_literal_type) : New.
6936         (init_decl_processing): Handle/use the two new types.
6937         * lex.c (real_yylex): Same.
6938         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
6939         Same. 
6940
6941 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
6942
6943         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
6944         to anonymous cv-qualified types.
6945
6946 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
6947
6948         * lex.c (real_yylex) : Change integer literal overflow handling to
6949         be like c-lex.c.
6950
6951         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
6952
6953 1999-06-28  Richard Henderson  <rth@cygnus.com>
6954
6955         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
6956
6957 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
6958
6959         * error.c (dump_type_real): Handle TREE_LIST again.
6960
6961         * typeck.c (comp_target_parms): Don't complain about 
6962         converting from () to (...) if !flag_strict_prototype.
6963
6964         * decl.c (grokdeclarator): Update the names of all variants when
6965         de-anonymizing.
6966
6967 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
6968
6969         * init.c (expand_aggr_vbase_init): Rename to
6970         construct_virtual_bases.  Conditionalize construction here, 
6971         rather than ...
6972         (emit_base_init): Here.
6973
6974 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
6975
6976         * semantics.c (finish_asm_stmt): Apply decay conversions to
6977         input operands.
6978
6979         * decl.c (expand_static_init): When building an anonymous function
6980         for use with atexit, compute its body before and after entering
6981         the function.
6982
6983         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
6984         EXIT_EXPR.
6985         
6986 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
6987
6988         * init.c (expand_aggr_vbase_init): Add flag parameter.
6989         (build_partial_cleanup_for): Remove, inlining into ..
6990         (expand_cleanup_for_base): ... here.  Take flag parameter.
6991         (emit_base_init): Pass the in_chrg parameter to
6992         emit_aggr_vbase_init. 
6993         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
6994         
6995 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
6996
6997         * decl2.c (import_export_decl): Use same_type_p, rather than
6998         relying on pointer-equality for types.
6999
7000         * method.c (do_build_copy_constructor): Simplify.
7001
7002         * call.c (build_method_call): Remove bogus code for two-argument
7003         delete.
7004         * init.c (build_new_1): Expand on comment, and remove dead code.
7005
7006         * init.c (expand_cleanup_for_base): New function, split out
7007         from ...
7008         (emit_base_init): Here.
7009         (expand_aggr_vbase_init): Use it.
7010
7011 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
7012
7013         * cp-tree.h (class_cache_firstobj): Declare.
7014         (maybe_push_cache_obstack): Rename to push_cache_obstack.
7015         * class.c (permanent_obstack): Remove declaration.
7016         (class_cache_firstobj): Make it global.
7017         (add_method): Don't use permanent_obstack directly.
7018         (pushclass): Only free the class_cache_obstack if we know how far
7019         back to free it.
7020         (maybe_push_cache_obstack): Rename to push_cache_obstack.
7021         * decl.c: Remove dead comment.
7022         (saved_scope): Add class_cache_firstobj.
7023         (push_to_top_level): Save it.
7024         (pop_from_top_level): Restore it.
7025         (push_class_level_binding): Use push_cache_obstack, not
7026         maybe_push_cache_obstack.
7027         * search.c (push_class_decls): Likewise.
7028         
7029 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7030
7031         * pt.c (tsubst_friend_function): Push into namespace of friend
7032         function before pushdecl'ing it.
7033
7034 1999-06-14  Nathan Sidwell  <nathan@acm.org>
7035
7036         * call.c (build_new_op): Remove REF_BIND from all operands.
7037
7038 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
7039
7040         * init.c (build_new_1): Look up operator delete even if there was
7041         no explicit new placement.
7042
7043 1999-06-08  Nathan Sidwell  <nathan@acm.org>
7044
7045         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
7046         of ...
7047         (build_throw): ... here. Call it.
7048         (process_start_catch_block): Call it.
7049
7050 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
7051
7052         * search.c (convert_pointer_to_single_level): Reimplement without
7053         using get_binfo.
7054
7055 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
7056
7057         * method.c (is_back_referenceable_type): Back-reference bools when
7058         not squangling.
7059
7060 1999-06-07  Dave Brolley  <brolley@cygnus.com>
7061
7062         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
7063         * input.c (putback_buffer): New structure type.
7064         (putback): Replaces putback_char member.
7065         (putback): Replaces putback_char static variable.
7066         (feed_input): Use putback.
7067         (end_input): Use putback.
7068         (sub_getch): Use putback.
7069         (put_back): Use putback.
7070
7071 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
7072
7073         * decl.c (grokdeclarator): Fix typo in last change.
7074
7075 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
7076
7077         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
7078         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
7079
7080 1999-06-04  Nathan Sidwell  <nathan@acm.org>
7081
7082         * except.c (build_throw): Check throw expression validity.
7083
7084 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
7085
7086         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
7087         just because flag_signed_bitfields is false.
7088
7089 1999-06-03  Nathan Sidwell  <nathan@acm.org>
7090
7091         * semantics.c (begin_class_definition): Update the struct's
7092         location here ...
7093         * class.c (finish_struct): ... rather than here.
7094
7095         * decl.c (make_typename_type): Don't rely on uninitialized
7096         variable.
7097
7098 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7099
7100         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
7101
7102 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
7103
7104         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
7105         and friends rather than messing with current_obstack directly.
7106         (cp_build_qualified_type_real): Rework ARRAY_TYPE
7107         allocation to match practice throughout the rest of the 
7108         compiler.
7109
7110 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
7111
7112         * lex.c (make_lang_type): Create TYPE_BINFO for
7113         TEMPLATE_TYPE_PARMs just like for non-template types.
7114
7115         * decl.c (start_decl): Move checks on initialization to ...
7116         (cp_finish_decl): Here.  Tidy formatting slightly.
7117
7118 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
7119
7120         * decl.c (add_binding): Don't complain about a redeclaration of a
7121         semantically identical typedef in a local scope.
7122
7123 1999-05-28  Nathan Sidwell  <nathan@acm.org>
7124
7125         * decl.c (complete_array_type): Allocate off same obstack. Fix
7126         DO_DEFAULT comment to match reality.
7127
7128         * friend.c (make_friend_class): Fix diagnostic typo.
7129
7130 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
7131
7132         * decl.c (lookup_namespace_name): Handle getting a
7133         TEMPLATE_ID_EXPR.
7134         (expand_static_init): Don't call pushdecl for implicitly declared
7135         `atexit' used to register destructors.
7136
7137 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
7138
7139         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
7140         intialize a vtable.
7141
7142         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
7143         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
7144         by combining TEMPLATE_INFO and LEVEL into a single union.
7145         (DECL_TEMPLATE_INFO): Reformat.
7146         (DECL_SAVED_TREE): Document.
7147         (DECL_TEMPLATE_INJECT): Remove.
7148         * class.c (finish_struct): Remove code to deal with
7149         DECL_TEMPLATE_INJECT. 
7150
7151         * decl.c (maybe_process_template_type_declaration): Handle all new
7152         types in templates uniformly.
7153         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
7154         DECL_CONTEXT.
7155         * pt.c (lookup_template_class): Inject template instantiations of
7156         forward-declarations.
7157         (instantiate_class_template): Remove code processing
7158         DECL_TEMPLATE_INJECT.
7159         
7160         * pt.c (lookup_template_class): Tweak lookup to find member
7161         templates.
7162
7163         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
7164         ASM_CV_QUAL.
7165         * semantics.c (finish_asm_stmt): Make strings permanent if they're
7166         used in a template.
7167         
7168 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
7169
7170         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
7171         parts of pointer to data member types.
7172
7173 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
7174
7175         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
7176         and then make it look like `abort'.  Just use `abort' instead.
7177         
7178         * typeck.c (build_static_cast): Don't allow static_casts that cast
7179         away constness.
7180         (casts_away_constness_r): New function.
7181         (casts_away_constness): Likewise.
7182
7183         * decl.c (lookup_tag): Remove code no longer needed after
7184         name-lookup improvements.
7185         * decl2.c (handle_class_head): Make error-recovery more robust.
7186         * friend.c (make_friend_class): Reject templated typename types.
7187         * lex.c (is_global): A template parameter isn't global.
7188         * parse.y (class_head): Robustify.
7189         * parse.c: Regenerated.
7190         
7191 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
7192
7193         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
7194         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
7195         
7196         * cp-tree.h (push_nested_namespace): Declare.
7197         (pop_nested_namespace): Likewise.
7198         * decl.c (push_nested_namespace): New function.
7199         (pop_nested_namespace): Likewise.
7200         * pt.c (instantiate_class_template): Use them.
7201
7202         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
7203
7204         * cp-tree.h (cplus_expand_constant): Declare.
7205         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
7206         converted from one pointer-to-object type to another.
7207         * expr.c (cplus_expand_constant): Don't make it static.
7208         * typeck.c (build_component_ref): Don't crash when presented with
7209         a component which is a TEMPLATE_DECL.
7210         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
7211         cast from a pointer-to-member constant to its own type does not
7212         result in a valid non-type template argument.
7213
7214 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
7215             Nathan Sidwell  <nathan@acm.org>
7216         
7217         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
7218         * cp-tree.h: Fix typo in documentation on pointers-to-members.
7219         (cp_build_qualified_type): Make it a macro.
7220         (cp_build_qualified_type_real): Declare.
7221         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
7222         problem with template parameters and restrict-qualification.
7223         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
7224         * hash.h: Regenerated.
7225         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
7226         the enumeration.
7227         (NORID): Remove definition.
7228         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
7229         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
7230         (fn_type_unification): Check that the function type resulting from
7231         the deduction is legal.
7232         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
7233         (unify): Use cp_build_qualified_type_real.
7234         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
7235         (cp_build_qualified_type): Rename to ...
7236         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
7237         and modify appropriately.
7238         
7239         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
7240         reveal optimization opportunities.
7241
7242         * pt.c (tsubst): Don't issue error messages when we're not
7243         complaining, even if we see a qualified function type.
7244         (check_cv_quals_for_unify): Don't allow a qualified function
7245         type.
7246
7247 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
7248
7249         * class.c (instantiate_type): Downgrade errors for object-dependent
7250         memfn refs to pedwarn.
7251
7252 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
7253
7254         * decl.c (grokdeclarator): Don't treat [] as indicating a
7255         zero-sized array in a typedef.
7256
7257         * call.c (build_object_call): Don't look at DECL_NAME for a type.
7258         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
7259         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
7260
7261         * pt.c (for_each_template_parm): Rework to match documentation.
7262         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
7263
7264 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
7265
7266         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
7267
7268         * class.c (finish_base_struct): Allow non-COM bases for COM classes
7269         except at the leftmost position.
7270         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
7271         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
7272         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
7273
7274         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
7275         (build_cplus_new): Make sure that what we return is of the right type.
7276
7277 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
7278
7279         * cp-tree.h (make_ptrmem_cst): New function.
7280         * expr.c (cplus_expand_constant): Split out from ...
7281         (cplus_expand_expr): Here.  Use cplus_expand_constant.
7282         (init_cplus_expand): Set lang_expand_constant.
7283         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
7284
7285         * tree.c (make_ptrmem_cst): Define.
7286         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
7287         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
7288
7289 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
7290
7291         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
7292
7293         * decl2.c (start_static_storage_duration_function): Fix comment.
7294         (finish_file): Create static storage duration functions lazily.
7295
7296 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
7297
7298         Implement anonymous structs.
7299         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
7300         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
7301         * class.c (finish_struct_1): Remove redundant check for anon struct.
7302         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
7303         (check_tag_decl): Check for anonymous struct here.
7304         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
7305         * init.c (sort_member_init, emit_base_init): Handle getting fields
7306         as well as names in current_member_init_list.
7307         (perform_member_init): Handle getting an anon aggr.
7308         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
7309         (do_build_copy_constructor): Likewise.
7310
7311 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
7312
7313         * tree.c (cp_build_qualified_type): Don't allow qualified function
7314         types.
7315
7316 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
7317
7318         * gxxint.texi: Fix typo.
7319
7320 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
7321
7322         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
7323         * class.c (finish_struct_1): Use CLASS_TYPE_P.
7324         * ptree.c (print_lang_type): Likewise.
7325         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
7326         IS_AGGR_TYPE_CODE.
7327         * typeck2.c (digest_init): Likewise.
7328
7329 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
7330
7331         * call.c (joust): Compare the types of the conv ops, not the
7332         target types of the conversions.
7333
7334 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
7335
7336         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
7337         was not given.
7338
7339 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
7340
7341         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
7342         * decl.c (grokfndecl): Don't allow inline declarations of friend
7343         template specializations, or friend template specializations with
7344         default arguments.
7345         * pt.c (tsubst): Handle substitution into array types that does
7346         not yield a fixed upper bound, even when not processing a
7347         template.
7348         (tsubst_copy): Deal with the fact that the second operand to a
7349         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
7350         * search.c (marked_pushdecls_p): Don't descend into
7351         TEMPLATE_TYPE_PARMs and the like.
7352         (unmarked_pushdecls_p): Likewise.
7353         
7354         * call.c (build_over_call): Don't throw away
7355         initializations/copies of empty classes; use MODIFY_EXPR and
7356         INIT_EXPR as for non-empty classes.
7357         * class.c (finish_struct_1): Put the padding byte for an empty
7358         class on the TYPE_NONCOPIED_PARTS list for the class.
7359
7360 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
7361
7362         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
7363         indicate a reference to a field that is a qualified name.
7364
7365 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
7366
7367         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
7368         ASM_OUTPUT_CONSTRUCTOR.
7369
7370         * friend.c (do_friend): Add attrlist arg.  Remove support for
7371         getting a non-decl as 'decl'.
7372         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
7373         rtl.
7374         (grokdeclarator): Adjust.
7375         * cp-tree.h: Adjust.
7376
7377 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
7378
7379         * cp-tree.h (permanent_p): New function.
7380         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
7381         possibly complex tree node.
7382         * tree.c (mapcar): Adjust comments, and follow coding standards in
7383         conditional.
7384         (permanent_p): New function.
7385
7386 1999-05-13  Per Bothner  <bothner@cygnus.com>
7387
7388         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
7389         primitive Java types, if we actually see `extern "Java"'.
7390
7391 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
7392
7393         * lang-specs.h: Pass -$ to the preprocessor.
7394
7395 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
7396
7397         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
7398         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
7399         (resolve_offset_ref): Don't handle a raw baselink.
7400         * cvt.c (build_expr_type_conversion): Likewise.
7401         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
7402         convert_for_initialization): Likewise.
7403         * class.c (instantiate_type): Handle seeing a baselink under an
7404         OFFSET_REF.
7405         * error.c (dump_expr): Likewise.        
7406         * pt.c (for_each_template_parm): Likewise.
7407         (resolve_overloaded_unification): Likewise.
7408         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
7409         * typeck.c (expr_sizeof): Also complain about other permutations
7410         of overloaded functions.
7411
7412 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
7413
7414         * init.c (resolve_offset_ref): Don't return a raw method.
7415         Use BASELINK_P.
7416         * typeck.c (decay_conversion): Don't handle a raw method.
7417         Resolve all OFFSET_REFs.
7418         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
7419         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
7420         same_type_p for pmf bits.  Don't use build_binary_op to compare
7421         raw pointers to methods.
7422         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
7423         to decide when to call resolve_offset_ref.
7424         (build_c_cast, convert_for_initialization): Likewise.
7425         * cvt.c (build_expr_type_conversion): Likewise.
7426
7427 1999-05-06  Nathan Sidwell  <nathan@acm.org>
7428
7429         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
7430
7431 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
7432
7433         * decl2.c (start_objects): Don't let static constructors and
7434         destructors get inlined.
7435
7436         * parse.y (nested_name_specifier): Make sure ordinary types are
7437         complete, just like template types.
7438         * parse.c: Regenerated.
7439
7440         * pt.c (check_explicit_specialization): Improve error messages.
7441
7442 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7443
7444         * typeck.c (string_conv_p): Use same_type_p to check whether we
7445         try to convert between char and wchar_t.
7446
7447 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
7448
7449         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
7450         lookup to error_mark_node here.
7451         (lookup_member): Revise documentation.  Add comments.  Don't set
7452         the TREE_TYPE to error_mark_node here, and don't build up an extra
7453         TREE_LIST for ambiguous lookups.
7454         (setup_class_bindings): Adjust accordingly.
7455         (push_class_decls): Revise out-of-date comments.
7456         
7457         * typeck.c (build_const_cast): Tighten checks for legality.
7458
7459 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7460
7461         * init.c (build_member_call): Lookup names coming from
7462         namespace-scoped LOOKUP_EXPR.
7463
7464 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
7465
7466         * gxxint.texi: Add documentation for 'I'.
7467
7468 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7469
7470         * tinfo.cc (operator==): Qualify type_info with std::.
7471
7472 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
7473
7474         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
7475         (DECL_COMDAT): Remove definition.
7476
7477 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
7478
7479         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
7480         change.
7481
7482 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
7483
7484         * class.c (build_vtable): Use build_lang_decl when building
7485         vtables, not just build_decl.
7486         (prepare_fresh_vtable): Likewise.
7487         * decl.c (wrapup_globals_for_namespace): Mark vtables as
7488         DECL_EXTERNAL when calling wrapup_global_declarations.
7489         * decl2.c (priority_info_s): Add initializations_p and
7490         destructions_p members.
7491         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
7492         when deciding what vtables to write out.
7493         (ssdf_decls): New variable.
7494         (ssdf_decls_used): Likewise.
7495         (start_static_storage_duration_function): Deal with being called
7496         multiple times.  Avoid inlining this function.
7497         (generate_inits_for_priority): Deal with reuse of priority map.
7498         (get_priority_info): Clear initializations_p and destructions_p.
7499         (do_static_initialization): Tweak comment.
7500         (do_static_destruction): Likewise.  Fix condition on sentries for
7501         destruction.
7502         (generate_ctor_or_dtor_function): Call all of the static storage
7503         duration functions.
7504         (generate_ctor_or_dtor_function_for_priority): Check
7505         initializations_p and destructions_p to see what priorities need
7506         initialization functions.
7507         (finish_file): Rework to generate multiple static storage duration
7508         functions, rather than just one.
7509
7510         * typeck.c (build_const_cast): Tweak last change to handle
7511         templates correctly.
7512
7513         * typeck.c (build_const_cast): Disallow use of const_cast to
7514         anything but a pointer or reference type.
7515
7516 1999-04-30  Nathan Sidwell  <nathan@acm.org>
7517
7518         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
7519         signature type.
7520
7521 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
7522
7523         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
7524         (finish_file): Indent comments properly.
7525
7526 1999-04-29  Richard Henderson  <rth@cygnus.com>
7527
7528         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
7529         (do_static_destruction): Likewise.
7530
7531 1999-04-29  Nathan Sidwell  <nathan@acm.org>
7532
7533         * cp-tree.h (TYPE_NOTHROW_P): New macro.
7534         * decl2.c (delete_sanity): Warn on deleting void *.
7535         * init.c (build_new_1): Use TYPE_NOTHROW_P.
7536         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
7537         throwing operator new.
7538
7539 1999-04-28  Nathan Sidwell  <nathan@acm.org>
7540
7541         * cp-tree.h (build_component_addr): Remove prototype.
7542         * typeck.c (build_component_addr): Make static. Remove MSG
7543         argument.
7544         (build_component_addr): Remove MSG parameter, clean up
7545         comment.
7546         (build_x_function_call): Use cp_error.
7547         (build_unary_op): Adjust call of build_component_addr.
7548
7549 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
7550
7551         * pt.c (tsubst_friend_class): Check for NULL.
7552
7553 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
7554
7555         * search.c (binfo_for_vtable): Initialize bfvi.var.
7556
7557 1999-04-27  Nathan Sidwell  <nathan@acm.org>
7558
7559         * rtti.c (build_x_typeid): Check rtti is enabled.
7560
7561 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
7562
7563         * search.c (is_subobject_of_p): Make sure we're looking at the
7564         right baseclasses.
7565
7566 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
7567
7568         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
7569
7570 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
7571
7572         * decl2.c (finish_file): Tweak handling of extern inlines so that
7573         they are not unnecessarily put out.
7574
7575         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
7576         such as base classes.
7577
7578 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
7579
7580         * tree.c (build_exception_variant): Fix typo: use the chain of U,
7581         not trying V, while cycling through U.
7582
7583 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
7584
7585         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
7586         preserves_first_arg.  Enlarge dummy accordingly.
7587         (DECL_TINFO_FN_P): New macro.
7588         (SET_DECL_TINFO_FN_P): Likeiwse.
7589         (DECL_RETURNS_FIRST_ARG): Remove.
7590         (DECL_PRESERVES_THIS): Likewise.
7591         (DECL_INIT_PRIORITY): New macro.
7592         (finish_struct_1): Change prototype.
7593         (cat_namespace_levels): Remove prototype.
7594         (vtable_decl_p): New prototype.
7595         (vtype_decl_p): Likewise.
7596         (sigtable_decl_p): Likewise.
7597         (walk_globals_pred): New typedef.
7598         (walk_globals_fn): Likewise.
7599         (walk_globals): New prototype.
7600         (walk_namespaces_fn): New typedef.
7601         (walk_namespaces): New prototype.
7602         (wrapup_globals_for_namespace): Likewise.
7603         (walk_vtables): Remove prototype.
7604         (walk_sigtables): Likewise.
7605         (instantiate_pending_templates): New prototype.
7606         * class.c (finish_struct_1): Don't return a value.
7607         * decl.h (pending_statics): Remove declaration.
7608         * decl.c (walk_namespaces_r): New function.
7609         (walk_globals_r): Likewise.
7610         (vtable_decl_p): Likewise.
7611         (vtype_decl_p): Likewise.
7612         (sigtable_decl_p): Likewise.
7613         (walk_namespaces): Likewise.
7614         (walk_globals_data): New type.
7615         (walk_globals): New function.
7616         (wrapup_globals_for_namespace): Likewise.
7617         (expand_static_init): Remove assertion.  Remove redundancy in
7618         conditional.  Don't put static data members in static_aggregates
7619         Tidy.
7620         (finish_function): Remove redundancy in conditional.  Don't set
7621         DECL_RETURNS_FIRST_ARG.
7622         (cat_namespace_levels): Remove.
7623         * decl2.c: Include splay-tree.h and varray.h.
7624         (priority_info_s): New structure.
7625         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
7626         conventions.
7627         (prune_vtable_vardecl): Likewise.
7628         (finish_sigtable_vardecl): Likewise.
7629         (setup_initp): Remove.
7630         (do_dtors): Remove.
7631         (do_ctors): Remove.
7632         (start_static_storage_duration_function): New function.
7633         (generate_inits_for_priority): Likewise.
7634         (finish_static_storage_duration_function): Likewise.
7635         (get_priority_info): Likewise.
7636         (do_static_initialization): Likewise.
7637         (do_static_destruction): Likewise.
7638         (do_static_initialization_and_destruction): Likewise.
7639         (generate_ctor_or_dtor_function): Likewise.
7640         (generate_ctor_and_dtor_functions_for_priority): Likewise.
7641         (pending_statics): Make it a varray.
7642         (pending_statics_used): New variable.
7643         (saved_inlines): Make it a varray.
7644         (saved_inlines_used): New variable.
7645         (finish_static_data_member): Change method of updating
7646         pending_statics.
7647         (mark_inline_for_output): Remove #if 0'd code.  Change method of
7648         updating saved_inlines.
7649         (walk_vtables): Remove.
7650         (walk_sigtables): Likewise.
7651         (import_export_decl): Use DECL_TINFO_FN_P.
7652         (pending_templates): Remove declaration.
7653         (maybe_templates): Likewise.
7654         (static_aggregates_initp): Likewise.
7655         (setup_initp): Likewise.
7656         (finish_objects): Simplify.
7657         (INITIALIZE_P_IDENTIFIER): New macro.
7658         (PRIORITY_IDENTIFIER): New macro.
7659         (SSDF_IDENTIFIER): New macro.
7660         (initialize_p_decl): New variable.
7661         (priority_decl): Likewise.
7662         (ssdf_decl): Likewise.
7663         (priority_info_map): Likewise.
7664         (finish_file): Recode output of static intializers and other
7665         file-scope finalization tasks.
7666         * error.c (OB_END_TEMPLATE_ID): New macro.
7667         (dump_type_real): Use it.
7668         (dump_decl): Likewise.
7669         (dump_function_name): Likewise.
7670         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
7671         interface.
7672         (check_newline): Use walk_globals, not walk_vtables.
7673         * pt.c (pending_tempalte_expansions): Remove.
7674         (set_vardecl_interface_info): Likewise.
7675         (pending_templates): Make static.
7676         (maybe_templates): Likewise.
7677         (instantiate_class_template): Adjust call to finish_struct_1.
7678         (instantiate_pending_templates): New function.
7679         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
7680         * tree.c (static_aggregates_initp): Remove.
7681         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
7682         instead.
7683         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
7684
7685         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
7686         with the RTL code RETURN.
7687         * hash.h: Regenerated.
7688         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
7689         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
7690         * parse.c: Regenerated.
7691         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
7692         it.
7693         (inline_parm_levels): New variable.
7694         (inline_parm_levels_used): Likewise.
7695         (maybe_begin_member_template_processing): Update them.
7696         (maybe_end_member_template_processing): Use them, rather than
7697         guessing how many levels to pop.
7698
7699         * decl.c (make_typename_type): Tighten error-checking.
7700
7701 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
7702
7703         * cp-tree.h (build_binary_op): Remove unneeded parameter.
7704         * class.c (build_vrable_entry_ref): Adjust call to
7705         build_binary_op.
7706         * decl.c (expand_static_init): Likewise.
7707         (grokdeclarator): Likewise.
7708         (finish_function): Likewise.
7709         * decl2.c (delete_sanity): Likewise.
7710         (do_dtors): Likewise.
7711         (do_ctors): Likewise.
7712         * error.c (dump_type_suffix): Likewise.
7713         * expr.c (cplus_expand_expr): Likewise.
7714         * init.c (resolve_offset_ref): Likewise.
7715         (build_new): Likewise.
7716         (build_new_1): Likewise.
7717         (build_vec_delete_1): Likewise.
7718         (expand_vec_init_catch_clause): Likewise.
7719         (build_delete): Likewise.
7720         * pt.c (tsubst): Likewise.
7721         * rtti.c (synthesize_tinfo_fn): Likewise.
7722         * search.c (expand_upcast_fixups): Likewise.
7723         (expand_direct_vtbls_init): Likewise.
7724         * typeck.c (get_member_function_from_ptrfunc): Likewise.
7725         (build_binary_op_nodefault): Likewise.
7726         (point_int_sum): Likewise.
7727         (pointer_diff): Likewise.
7728         (build_unary_op): Likewise.
7729         (build_modify_expr): Likewise.
7730         (get_delta_difference): Likewise.
7731         (build_ptrmemfunc): Likewise.
7732         (expand_ptrmemfunc_cst): Likewise.
7733
7734 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
7735
7736         * decl.c (grokfndecl): Always call cplus_decl_attributes.
7737         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
7738
7739 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
7740
7741         * cp-tree.h (finish_static_data_member_decl): New function.
7742         * decl2.c (finish_static_data_member_decl): Split out from ...
7743         (grokfield): Here.
7744         * pt.c (instantiate_class_template): Use it here instead of
7745         trying to fake it.
7746         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
7747         finish_static_data_member_decl will do that.  Explicit set
7748         DECL_EXTERNAL to match non-template processing.
7749
7750 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
7751
7752         * cp-tree.h (finish_class_definition): Add parameter.
7753         * parse.y (structsp): Use it.  Don't call pop_scope here.
7754         * parse.c: Regenerated.
7755         * semantics.c (finish_class_definition): Pop it here.
7756
7757 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
7758
7759         * decl.c (xref_tag): Revise handling of nested template
7760         declarations.
7761         * pt.c (check_explicit_specialization): Tweak handling of friend
7762         templates in template classes.
7763         (tsubst_friend_class): Handle friend declarations for nested
7764         member template classes.
7765
7766 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
7767
7768         * class.c (finish_struct): Remove unused variable.
7769         (pushclass): Likewise.
7770         (invalidate_class_lookup_cache): Likewise.
7771         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
7772         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
7773         doesn't get obliterated.
7774         (make_typename_type): Handle template classes correctly.
7775
7776         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
7777         (storetags): Declare.
7778         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
7779         (pushclass): Likewise.  Use storetags to install tag declarations,
7780         not pushtag.
7781         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
7782         * decl.c (storetags): Make it global.
7783         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
7784         implicit typename declaration.
7785         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
7786         * method.c (hack_identifier): Likewise.
7787         * search.c (lookup_member): Likewise.
7788
7789         * decl.c (warn_about_implicit_typename_lookup): New function.
7790         (lookup_name_real): Use it.  Rework handling of implicit typename
7791         extension.
7792
7793 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
7794
7795         * cp-tree.h (lookup_nested_field): Remove.
7796         * class.c (push_nested_class): Handle UNION_TYPEs.
7797         (pop_nested_class): Likewise.
7798         * decl.c (lookup_name_real): Don't call lookup_nested_field.
7799         (start_decl): Use push_nested_class, not just pushclass.
7800         (cp_finish_decl): Use pop_nested_class, not just popclass.
7801         * search.c (lookup_nested_field): Remove.
7802
7803         * cp-tree.h (lang_type): Add documentation.
7804         * decl2.c (handle_class_head): Create template declarations here,
7805         as appropriate.
7806         * parse.y (class_head): Return whether or not we entered a new
7807         scope, as well as the type named.
7808         (named_class_head): Likewise.
7809         (named_complex_class_head_sans_basetype): Likewise.
7810         (structsp): Adjust accordingly.  Pop scope when required.
7811         * parse.c: Regenerated.
7812         * pt.c (check_default_tmpl_args): Robustify.
7813         (redeclare_class_template): Likewise.
7814         (instantiate_class_template): An instantiation of an
7815         anonymous union is itself an anonymous union.
7816         * semantics.c (begin_class_definition): Don't create template
7817         declarations here.
7818
7819 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
7820
7821         * parse.y (after_type_declarator_intern): New nonterminal.
7822         (after_type_declarator): Use it.
7823         (direct_after_type_declarator): Likewise.  Move above
7824         nonnested_type to fix reduce/reduce conflict resolution.
7825         (declmods): Reducing from just 'attributes' has EMPTY precedence.
7826         * Makefile.in (CONFLICTS): Update.
7827
7828         * decl.c (define_label): Downgrade error for jumping over a
7829         non-POD decl to pedwarn.
7830
7831 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
7832
7833         * cp-tree.h (popclass): Change declaration.
7834         (pop_nested_class): Likewise.
7835         (poplevel_class): Remove declaration.
7836         * call.c (convert_default_argument): Pass no arguments to
7837         popclass.
7838         * class.c (finish_struct_1): Likewise.
7839         (finish_struct): Likewise.
7840         (popclass): Remove argument.  Simplify code accordingly.
7841         (pop_nested_class): Likewise.
7842         * decl.c (poplevel_class): Declare it here, and make it static.
7843         (poplevel): Handle class scopes.
7844         (poplevel_class): Don't take an rgument.  Simplify.
7845         (pop_everything): Pass no arguments to pop_nested_class.
7846         (cp_finish_decl): Pass no arguments to popclass.
7847         (grokdeclarator): Pass no arguments to pop_nested_class.
7848         (finish_function): Likewise.
7849         * decl2.c (grokfield): Likewise.
7850         (pop_scope): Pass no arguments to popclass.
7851         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
7852         * pt.c (instantiate_class_template): Move call to pushclass, and
7853         document.  Pass no arguments to popclass.
7854         (regenerate_decl_from_template): Likewise.
7855
7856 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
7857
7858         * typeck.c (build_unary_op): Handle taking the address of a unique
7859         bound non-static member function.
7860
7861 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
7862
7863         * lang-options.h (-Wdeprecated): New flag.
7864         * decl2.c (warn_deprecated): New flag.
7865         (lang_decode_option): Deprecated this-is-variable,
7866         external-templates, alt-external-templates.
7867         Support -Wdeprecated.
7868         * errfn.c (cp_deprecated): New function.
7869
7870 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
7871
7872         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
7873         of the decls themselves.
7874
7875         * pt.c (tsubst_function_type): Copy attributes over.
7876
7877         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
7878         and com_interface.
7879         * cp-tree.h: Add prototype.
7880         * decl.c (init_decl_processing): Set valid_lang_attribute.
7881
7882 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
7883
7884         * class.c (finish_struct_1): Look at the const-ness of the field's
7885         type, not the TREE_READONLY-ness of the declaration.
7886         * method.c (synthesize_method): Likewise.
7887         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
7888         creating new declarations.
7889
7890 1999-04-13  Mike Stump  <mrs@wrs.com>
7891
7892         * decl2.c (import_export_decl): Because vtables always reference
7893         virtual functions, even if they are inlined, don't allow
7894         -fno-implement-inlines to not emit them, instead, emit them with
7895         the vtable.
7896         * decl.c (start_function): Likewise.
7897
7898 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
7899
7900         * cp-tree.h (struct lang_type): Add com_interface.
7901         (CLASSTYPE_COM_INTERFACE): New macro.
7902         * class.c (set_rtti_entry): COM interface classes have no RTTI
7903         entries in their vtables; adjust.
7904         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
7905         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
7906         finish_struct_1): Likewise.
7907         * decl2.c (mark_vtable_entries): Likewise.
7908         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
7909         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
7910         expand_upcast_fixups): Likewise.
7911         * tree.c (debug_binfo): Likewise.
7912
7913         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
7914         * typeck.c (comptypes): If we get it, ignore attributes.
7915         * class.c (instantiate_type): Use BASELINK_P.  Change complain
7916         parameter to flags; 2 means ignore attributes.
7917         * call.c (build_op_delete_call): Pass it.
7918
7919         * decl.c (xref_tag): Only complain once about using a typedef-name
7920         with 'struct'.  Downgrade to pedwarn.
7921
7922         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
7923
7924         * parse.y (absdcl_intern): New nonterminal.
7925         (absdcl, direct_abstract_declarator): Use it.
7926
7927         * pt.c (lookup_template_class): Look through implict typename.
7928
7929 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
7930
7931         * friend.c (add_friend): Deal gracefully with error_mark_node.
7932         * method.c (build_overload_value): Handle pointers-to-members as
7933         template parameters.
7934
7935         * decl.c (push_binding): Fix typo in comment.
7936
7937 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
7938
7939         * error.c (dump_type_real): If a typename is a template-id, put
7940         out the template arguments.
7941         (dump_expr): Handle TEMPLATE_ID_EXPR.
7942         * pt.c (lookup_template_class): Now that full arguments are
7943         available everywhere, remove code that tried to guess them.
7944
7945 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
7946
7947         * decl.c (make_typename_type): Complain if we don't find a type
7948         when trying to make a typename type for a non-template type.
7949
7950 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
7951
7952         * decl.c (start_decl): Pass attributes to grokdeclarator.
7953         (grokdeclarator): Handle attributes on constructor-syntax
7954         initializers.
7955
7956 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
7957
7958         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
7959         don't have types.
7960
7961         * search.c (template_self_reference_p): Tweak.
7962
7963 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
7964
7965         * init.c (build_offset_ref): Don't build yet another weird data
7966         structure to describe overloaded functions.
7967
7968 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
7969
7970         * cp-tree.h (BASELINK_P): New macro.
7971         (SET_BASELINK_P): Likewise.
7972         * init.c (build_member_call): Remove needless assignment in if
7973         statement.
7974         * search.c (lookup_field_r): Fix handling when we are looking
7975         specifically for a type; these are not hidden by functions and
7976         variables.
7977         (lookup_member): Use SET_BASELINK_P.
7978         * tree.c (is_overloaded_fn): Use BASELINK_P.
7979         (really_overloaed_fn): Likewise.
7980         (get_first_fn): Likewise.
7981
7982 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
7983
7984         * decl.c (lookup_name_current_level): Tweak, and improve
7985         documentation.
7986
7987         * class.c (maybe_fixup_vptrs): Remove declaration.
7988         (build_class_init_list): Likewise.
7989         * decl.c (pushdecl_class_level): Call check_template_shadow here
7990         ...
7991         (push_class_level_binding): ... not here.
7992         * search.c (dfs_push_type_decls): Only avoid
7993         template-self-reference TYPE_DECLs if they are from base classes.
7994
7995 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
7996
7997         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
7998         nodes.  Tidy.
7999
8000 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
8001
8002         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
8003         (finish_struct_1): Don't call build_class_init_list.
8004
8005 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
8006
8007         * tinfo.h (__class_type_info): Fix illegal declaration.
8008
8009         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
8010         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
8011         (IDENTIFIER_CLASS_VALUE): Improve documentation.
8012         (is_properly_derived_from): Declare.
8013         (invalidate_class_lookup_cache): Likewise.
8014         (maybe_maybe_note_name_used_in_class): Likewise.
8015         (note_name_declared_in_class): Likewise.
8016         (push_using_decl): Remove duplicate declaration.
8017         (id_in_current_class): Remove declaration.
8018         (push_class_binding): Change prototype.
8019         (clear_identitifer_class_values): Declare.
8020         * call.c (is_properly_derived_from): Make it global.
8021         (build_new_function_call): Be careful about updating candidates.
8022         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
8023         asked to make illegal calls.
8024         * class.c: Include splay-tree.h.
8025         (class_stack_node): Add names_used slot.
8026         (check_member_decl_is_same_in_complete_scope): Remove.
8027         (add_method): Fix comment.  Push the declaration into class
8028         scope.
8029         (finish_struct_1): When popping the class, pop the bindings too.
8030         Remove check for data member/function member conflict.
8031         (finish_struct): Remove calls to
8032         check_member_decl_is_same_in_complete_scope.  Change calls to
8033         popclass.
8034         (pushclass): Clear names_used in the class stack entry.
8035         Use invalidate_class_lookup_cache to remove cached entries, rather
8036         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
8037         before entering a new class.  Remove dead code.  Don't mess with
8038         current_function_decl when pushing declarations.
8039         (invalidate_class_lookup_cache): New function, split out from ...
8040         (popclass): Here.  Clean up names_used on our way out.
8041         (instantiate_type): Adjust.
8042         (build_self_reference): Don't push the declaration here.
8043         (maybe_note_name_used_in_class): New function.
8044         (note_name_declared_in_class): Likewise.
8045         * decl.c (add_binding): Change prototype.
8046         (find_class_binding_level): New function.
8047         (innermost_nonclass_level): Likewise.
8048         (current_binding_level): Update documentation.
8049         (inner_binding_level): Remove.  Replace with current_binding_level
8050         throughout.
8051         (push_binding_level): Remove special handling of
8052         class_binding_level.
8053         (pop_binding_level): Likewise.  Use find_class_binding_level.
8054         (suspend_binding_level): Likewise.
8055         (global_bindings_p): Use innermost_nonclass_level.
8056         (toplevel_bindings_p): Likewise.
8057         (namespace_bindings_p): Likewise.
8058         (pseudo_global_level_p): Likewise.
8059         (push_binding): Clear INHERITED_VALUE_BINDING_P.
8060         (add_binding): Check for illegal multiple declarations.  Return a
8061         value indicating whether or not the new binding was legal.
8062         (push_local_binding): Skip over class binding levels.  Check
8063         return value from add_binding.
8064         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
8065         note_name_declared_in_class.
8066         (pushlevel_class): Remove "fake out the rest of the compiler"
8067         code.
8068         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
8069         (clear_identifier_class_values): New function.
8070         (pop_from_top_level): Use it.
8071         (pop_everything): Tweak.
8072         (maybe_process_template_type_declaration): Don't push the
8073         declaration for the template here.
8074         (pushtag): Don't push tag declarations into class scope here.
8075         (pushdecl): Apply DeMorgan's law for readability.
8076         (pushdecl_class_level): Remove special-case code for
8077         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
8078         (push_class_level_bindng): Deal with inherited bindings.
8079         (lookup_name_real): Remove special-case code for
8080         TYPE_BEING_DEFINED, and some implicit typename magic.
8081         (grokdeclarator): Handle COMPONENT_REF for a template function.
8082         (build_enumerator): Don't call pushdecl_class_level here.
8083         (id_in_current_class): Remove.
8084         * decl2.c (grokfield): Don't call pushdecl_class_level or
8085         check_template_shadow.
8086         * errfn.c (cp_file_of): Don't declare.
8087         (cp_line_of): Likewise.
8088         * error.c (dump_decl): Handle an OVERLOAD.
8089         (cp_file_of): Likewise.
8090         (cp_line_of): Likewise.
8091         * init.c (build_member_call): Handle a COMPONENT_REF.
8092         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
8093         pushdecl_class_level.
8094         * method.c (hack_identifier): Build COMPONENT_REFs for references
8095         to member templates as well as member functions.  Remove dead
8096         code.
8097         * parse.y (left_curly): Remove.
8098         (nonnested_type): Call maybe_note_name_used_in_class, not
8099         pushdecl_class_level.
8100         * parse.c: Regenerated.
8101         (nested_name_specifier_1): Likewise.
8102         * pt.c (check_explicit_specialization): Adjust, for robustness.
8103         (check_template_shadow): Handle OVERLOADs.
8104         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
8105         TEMPLATE_DECL, if appropriate.
8106         * search.c (envelope_add_decl): Remove.
8107         (dfs_pushdecls): Likewise.
8108         (dfs_compress_decls): Likewise.
8109         (dfs_push_decls): New function.
8110         (dfs_push_type_decls): Likewise.
8111         (setup_class_bindings): Likewise.
8112         (template_self_reference_p): Likewise.
8113         (lookup_field_r): Use it.
8114         (looup_member): Remove old comment.  Deal with ambiguity.
8115         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
8116         and remove envelope processing.
8117         * semantics.c (begin_class_definition): Let pushclass push
8118         declarations for base classes.
8119         (finish_member_declaration): Push declarations into class scope.
8120         * typeck.c (build_component_ref): Just put an OVERLOAD into the
8121         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
8122         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
8123         * Makefile.in (class.o): Depend on splay-tree.h.
8124
8125 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
8126
8127         * cvt.c (convert_pointer_to_real): Use same_type_p.
8128         * typeck.c (comp_target_types): Use same_type_p.
8129
8130 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
8131
8132         * semantics.c (begin_inline_definitions,
8133         finish_inline_definitions): Rename from finish_default_args and
8134         begin_inline_definitions, respectively, to something that isn't a
8135         total lie.  :)
8136         * parse.y (structsp): Adjust.
8137
8138         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
8139         (list_hash_lookup): Likewise.
8140         (hash_tree_chain): Adjust.
8141         * pt.c (tsubst): Adjust.
8142         (tsubst_arg_types): Use plain hash_tree_cons.
8143         * cp-tree.h (hash_tree_cons_simple): Lose.
8144         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
8145
8146 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8147
8148         * Makefile.in (hash.h): Generate using gperf language 'C', not
8149         'KR-C', so gperf uses the `const' keyword on strings.
8150
8151         * gxx.gperf (resword): Const-ify a char*.
8152
8153 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
8154
8155         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
8156         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
8157         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
8158         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
8159         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
8160         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
8161         tree.c: Adjust.
8162
8163 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
8164
8165         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
8166
8167 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
8168
8169         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
8170
8171 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
8172
8173         * cp-tree.h (add_friend): Declare.
8174         (add_friends): Likewise.
8175         * friend.c (add_friend): Make it global.  Don't add to
8176         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
8177         (add_friends): Make it global.
8178         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
8179         befriending class is a template.
8180         * parse.y (component_decl_1): Fix typo in comment.
8181         * parse.c: Regenerated.
8182         * pt.c (instantiate_class_template): Use add_friend and
8183         add_friends rather that duplicating some of their functionality
8184         here.
8185
8186 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
8187
8188         * call.c (build_field_call): Unify 'this' and non-'this' cases.
8189
8190         * typeck.c (build_indirect_ref): Check for 'this' sooner.
8191
8192 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8193
8194         * call.c (op_error): Const-ify a char*.
8195         (add_candidate, source_type, add_warning): Add static prototype.
8196         (print_z_candidates): Const-ify a char*.
8197
8198         * class.c (resolve_address_of_overloaded_function,
8199         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
8200         (get_vtable_name, finish_struct_1): Const-ify a char*.
8201
8202         * cvt.c (convert_to_reference): Likewise.
8203
8204         * decl.c (redeclaration_error_message, record_builtin_type,
8205         record_unknown_type, member_function_or_else, bad_specifiers):
8206         Likewise.
8207         (find_binding, select_decl, unqualified_namespace_lookup,
8208         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
8209         Add static prototype.
8210         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
8211         implicitly_declare, record_builtin_java_type, define_function,
8212         grok_op_properties, tag_name): Const-ify a char*.
8213
8214         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
8215         (define_function, finish_builtin_type): Const-ify a char*.
8216         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
8217         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
8218         (file_name_nondirectory): Const-ify a char*.
8219         (init_filename_times): Don't prototype.
8220         (compiler_error): Prototype.
8221         (yyerror, init_repo): Const-ify a char*.
8222         (build_srcloc): Don't prototype.
8223         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
8224         Const-ify a char*.
8225         (warn_for_assignment): Don't prototype.
8226         (convert_for_initialization, readonly_error, check_for_new_type,
8227         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
8228         Const-ify a char*.
8229
8230         * decl2.c (acceptable_java_type, output_vtable_inherit,
8231         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
8232         merge_functions, decl_namespace, validate_nonmember_using_decl,
8233         do_nonmember_using_decl): Add static prototype.
8234         (lang_f_options): Const-ify a char*.
8235         (finish_builtin_type): Likewise.
8236         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
8237         prototype.
8238
8239         * errfn.c: Include cp-tree.h.
8240         (cp_thing): Add static prototype.
8241         (compiler_error): Don't protoptype.
8242         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
8243         passing it to `cp_thing'.
8244
8245         * error.c (interesting_scope_p): Add static prototype.
8246
8247         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
8248         a char*.
8249
8250         * init.c (compiler_error): Don't prototype.
8251         (member_init_ok_or_else): Const-ify a char*.
8252         (build_java_class_ref): Add static prototype.
8253
8254         * lex.c (compiler_error): Don't prototype.
8255         (get_time_identifier, interface_strcmp, extend_token_buffer,
8256         handle_cp_pragma): Const-ify a char*.
8257         (is_global, init_filename_times): Add static prototype.
8258         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
8259         (compiler_error): Change from fixed args to variable args.
8260         (yyerror): Const-ify a char*.
8261
8262         * parse.y (cond_stmt_keyword): Const-ify a char*.
8263         (parse_decl): Add static prototype.
8264
8265         * pt.c (template_args_equal, print_template_context): Likewise.
8266         (print_candidates, check_default_tmpl_args): Const-ify a char*.
8267         (instantiate_class_template): Likewise.
8268
8269         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
8270
8271         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
8272         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
8273
8274         * search.c (lookup_field_info, lookup_member): Likewise.
8275         (lookup_member): Cast the first argument of `bzero' to a PTR.
8276
8277         * sig.c (compiler_error): Don't prototype.
8278         (build_signature_pointer_or_reference_nam): Const-ify a char*.
8279         (get_sigtable_name, build_member_function_pointer): Likewise.
8280
8281         * tree.c (compiler_error): Don't prototype.
8282         (no_linkage_helper, build_srcloc): Add static prototype.
8283         (build_vbase_pointer_fields): Const-ify a char*.
8284         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
8285
8286         * typeck.c (compiler_error): Don't prototype.
8287         (convert_for_assignment): Const-ify a char*.
8288         (comp_cv_target_types): Add static prototype.
8289         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
8290         build_component_addr, build_unary_op, convert_for_initialization):
8291         Const-ify a char*.
8292
8293         * typeck2.c (ack): Add static prototype and change from fixed args
8294         to variable args.
8295         (readonly_error, check_for_new_type): Const-ify a char*.
8296
8297         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
8298         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
8299         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
8300         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
8301         gen_assign, GNU_xref_member): Const-ify a char*.
8302
8303 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8304
8305         * gxxint.texi: Remove old discussion on copying virtual bases.
8306
8307 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
8308
8309         * Make-lang.in: Remove all references to g++.o/g++.c.
8310         Link g++ from gcc.o.
8311
8312 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
8313
8314         * decl2.c (comdat_linkage): Treat vtables like functions.
8315
8316 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
8317
8318         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
8319
8320 1999-03-25  Nathan Sidwell  <nathan@acm.org>
8321
8322         * decl.c (init_decl_processing): Add `signed' type as a synonym
8323         for `int'.
8324
8325 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
8326
8327         * typeck.c (common_type): Handle cv-qual unification for pointers
8328         to members.
8329
8330         * decl.c (unqualified_namespace_lookup): Return error_mark_node
8331         on error.
8332         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
8333         * lex.c (do_identifier): If we got error_mark_node, call
8334         lookup_name again.
8335
8336 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8337
8338         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
8339         classes.
8340
8341 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
8342
8343         * decl.c (lookup_name_real): Do nested field lookup regardless of
8344         TYPE_BEING_DEFINED.
8345
8346 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
8347
8348         * cp-tree.h (lang_type): Remove has_assignment and
8349         has_real_assignment.  Add befriending_classes.
8350         (TYPE_HAS_ASSIGNMENT): Remove.
8351         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
8352         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
8353         (lang_decl): Document.
8354         (DECL_BEFRIENDING_CLASSES): New macro.
8355         (FRIEND_NAME): Move declaration to more obvious location.
8356         (FRIEND_DECLS): Likewise.
8357         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
8358         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
8359         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
8360         (grok_op_properties): Likewise.
8361         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
8362         (add_friend): Likewise.  Don't do weird things with assignment
8363         operators.  Update DECL_BEFRIENDING_CLASSES.
8364         (add_friends): Don't do weird things with assignment operators.
8365         (make_friend_class): Likewise.  Update
8366         CLASSTYPE_BEFRIENDING_CLASSES.
8367         * pt.c (instantiate_class_template): Don't set
8368         TYPE_HAS_ASSIGNMENT.
8369         (tsubst_copy): Substitute the TREE_TYPE for more unary
8370         expressions.
8371         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
8372         * search.c (protected_accessible_p): New function.
8373         (friend_accessible_p): Likewise.
8374         (accessible_p): Use them.
8375
8376 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
8377
8378         * pt.c (convert_nontype_argument): Don't create things that aren't
8379         PTRMEM_CSTs when applying a qualification conversion to a
8380         PTRMEM_CST.
8381
8382 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
8383
8384         * Makefile.in (OBJS): Don't mention hash.o.
8385         (OBJDEPS): Likewise.
8386
8387 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
8388
8389         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
8390         * decl.c (expand_static_init): Make sure we don't add any after
8391         then.
8392
8393         * decl.c (cp_finish_decl): Move intelligence about handling
8394         DECL_COMDAT for variables from here...
8395         * decl2.c (comdat_linkage): ...to here.
8396         (maybe_make_one_only): Tweak.
8397         (import_export_decl): Call comdat_linkage for variables, too.
8398         (finish_file): Handle template statics properly.
8399
8400 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
8401
8402         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
8403         Document internals of pointer-to-member-functions.
8404         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
8405         (PFN_FROM_PTRMEMFUNC): Likewise.
8406         (build_type_conversion): Remove unused parameter.
8407         (build_ptrmemfunc1): Declare.
8408         (expand_ptrmemfunc_cst): New function.
8409         (delta2_from_ptrmemfunc): Likewise.
8410         (pfn_from_ptrmemfunc): Likewise.
8411         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
8412         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
8413         (convert_to_reference): Remove unused parameter to
8414         build_type_conversion.
8415         (ocp_convert): Likewise.
8416         (build_user_type_conversion): Likewise.
8417         * error.c (dump_expr): Handle NULL pointer-to-member functions.
8418         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
8419         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
8420         open when handling pointer-to-member functions.
8421         * pt.c (convert_nontype_argument): Clean up error messages.  Be
8422         more stringent with pointers-to-members.
8423         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
8424         (build_unary_op): Tidy ever-so-slightly.
8425         (build_conditional_expr): Remove extra parameter to
8426         build_type_conversion.
8427         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
8428         we're using.
8429         (expand_ptrmemfunc_cst): Define.
8430         (delta2_from_ptrmemfunc): Likewise.
8431         (pfn_from_ptrmemfunc): Likewise.
8432
8433 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
8434
8435         * init.c (build_member_call): Handle template-id expressions
8436         correctly.
8437         * typeck.c (build_x_function_call): Likewise.
8438
8439 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
8440
8441         * friend.c (make_friend_class): Avoid core dump when
8442         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
8443
8444 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
8445
8446         * decl.c (start_function): Suppress normal linkage heuristics
8447         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
8448
8449 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
8450
8451         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
8452         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
8453
8454 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8455
8456         * parse.y (named_complex_class_head_sans_basetype):
8457         Do not push a scope for error_mark_node.
8458         (maybe_base_class_list): Likewise.
8459
8460         * decl.c (start_decl): Check for error_mark_node as a type.
8461         Detected by g++.brendan/array-refs.C.
8462         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
8463         (maybe_build_cleanup_1): Likewise.  Detected by
8464         g++.jason/incomplete1.C.
8465
8466         * tree.c (build_dummy_object): Use void_zero_node instead of the
8467         error_mark_node.
8468         (is_dummy_object): Check for such a node.
8469         Detected by g++.bob/inherit1.C
8470
8471 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
8472
8473         * method.c (old_backref_index): Split out...
8474         (flush_repeats): From here.  Rename back from try_old_backref.
8475         (build_mangled_name): Put back some old-style repeat handling.
8476
8477 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8478
8479         * lex.c: Don't include setjmp.h.
8480         (parse_float): New static function.
8481         (pf_args): New struct.
8482         (real_yylex): Use them in call to `do_float_handler'.
8483
8484 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
8485
8486         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
8487         * tree.c (layout_basetypes): Not here.
8488         * search.c (dfs_search): Remove; no longer used.
8489
8490 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
8491
8492         * decl2.c (validate_nonmember_using_decl): Issue sensible
8493         error-messages on bogus qualifiers.
8494
8495 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
8496
8497         * call.c (add_function_candidate): Fix uninitialized variable.
8498
8499         * Makefile.in (search.o): Add dependency on varray.h.
8500
8501 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
8502
8503         * decl.c (duplicate_decls): Use same_type_p.
8504         * method.c (try_old_backref): Renamed from flush_repeats.  Use
8505         same_type_p.  Don't try to handle repeats.  Return success.
8506         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
8507         calls from old-style code, too.
8508         (check_ktype): Use same_type_p.
8509         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
8510         (build_qualified_name): Simplify logic.
8511         (process_overload_item): Strip typedefs and quals at the top.
8512         (build_mangled_name_for_type_with_Gcode): Remove call to
8513         type_canonical_variant.
8514         (build_mangled_name): Likewise.  Remove support for old-style
8515         repeats, which have been disabled since 2.7.2.  Don't mess with
8516         TREE_USED.
8517         (build_decl_overload_real): Don't mess with TREE_USED.
8518
8519 1999-03-13  Nathan Sidwell  <nathan@acm.org>
8520
8521         * error.c (cp_printers): Add 'F' escape character.
8522         (dump_type_real): Remove TREE_LIST (fnargs) printing.
8523         Functionality moved to dump_parameters.
8524         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
8525         (dump_function_decl): Extend meaning of V parameter.  Use
8526         dump_parameters and dump_exception_spec.
8527         (dump_parameters): New static function.
8528         (dump_exception_spec): New static function.
8529         (fndecl_as_string): Change argument semantics.  Use
8530         dump_function_decl directly.
8531
8532         * sig.c (build_signature_table_constructor): Use cp_error.
8533
8534 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8535
8536         * semantics.c (finish_switch_cond): Handle error cases gracefully.
8537         Detected by g++.law/enum5.C.
8538
8539         * typeck.c (build_modify_expr): Check for errors after resolving
8540         offsets.  Detected by g++.brendan/static1.C.
8541
8542         * decl.c (complete_array_type): Ignore initial_value if it is an
8543         error.  Detected by g++.benjamin/17930.C.
8544
8545         * typeck2.c (process_init_constructor): Return error if one argument
8546         is in error.  Detected by g++.benjamin/13478.C.
8547
8548 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8549
8550         * decl.c (select_decl): Allow class templates when we need types.
8551         * decl2.c (ambiguous_decl): Likewise.
8552
8553 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
8554
8555         * lex.c (do_identifier): Correct call to enforce_access.
8556         * search.c (accessible_p): Tweak comment.
8557
8558 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
8559
8560         * semantics.c (begin_class_definition): Call build_self_reference.
8561         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
8562
8563         * search.c (assert_canonical_unmarked): Fix typo in prototype.
8564
8565         * search.c (dfs_canonical_queue): New function.
8566         (dfs_assert_unmarked_p): Likewise.
8567         (assert_canonical_unmarked): Likewise.
8568         (access_in_type): Use it.
8569         (accessible_p): Likewise.  Walk the whole tree when umarking.
8570
8571         * sig.c (build_signature_table_constructor): Use accessible_p
8572         instead of compute_access.
8573
8574 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
8575
8576         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
8577
8578 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
8579
8580         * cp-tree.h (flag_access_control): Declare.
8581         (TREE_VIA_PPUBLIC): Document.
8582         (DECL_NONSTATIC_MEMBER_P): New macro.
8583         (enforce_access): Return an indication of whether or not access
8584         was permitted.
8585         (build_self_reference): Change prototype.
8586         (compute_access): Replace with ...
8587         (accessible_p): New function.
8588         (dfs_walk): Change prototype.
8589         (dfs_unmark): Likewise.
8590         (markedp): Likewise.
8591         * call.c (enforce_access): Use accessible_p.
8592         * class.c (build_self_reference): Insert the declaration into the
8593         list of members for this type, and make it public.
8594         * decl.c (xref_basetypes): Avoid ill-timed recursion.
8595         * init.c (build_offset_ref): Use lookup_member, not three separate
8596         name-lookups.  Call enforce_access rather than checking for
8597         illegal accesses here.
8598         (resolve_offset_ref): Likewise.
8599         * lex.c (do_identifier): Likewise.
8600         * method.c (hack_identifier): Likewise.
8601         * parse.y (self_reference): Remove.
8602         (opt_component_decl_list): Don't use it.
8603         * parse.c: Regenerated.
8604         * pt.c (print_candidates): Generalize to handle lists of
8605         overloaded functions.
8606         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
8607         not set.
8608         (get_template_base): Use new calling convention for dfs_walk.
8609         * search.c: Include varray.h.  Add prototypes.
8610         (dfs_walk): Accept a data pointer to pass to the work functions.
8611         All callers changed.  All work functions changed.
8612         (breadth_first_search): Rename to bfs_walk, and make consistent
8613         with dfs_walk.
8614         (dfs_walk_real): New function.
8615         (canonical_binfo): New function.
8616         (context_for_name_lookup): Likewise.
8617         (shared_marked_p): Likewise.
8618         (shared_unmarked_p): Likewise.
8619         (lokup_field_queue_p): Likewise.
8620         (lookup_field_r): Generalize to handle both functions and fields.
8621         (lookup_field): Just call lookup_member.
8622         (lookup_fnfields): Likewise.
8623         (lookup_member): Move body of lookup_field here and generalize.
8624         (dfs_accessible_queue_p): Likewise.
8625         (dfs_accessible_p): Likewise.
8626         (dfs_access_in_type): Likewise.
8627         (access_in_type): Likewise.
8628         (compute_access): Remove, and replace with ...
8629         (accessible_p): New function.
8630         (vbase_types): Remove.
8631         (vbase_decl_ptr_intermediate): Likewise.
8632         (vbase_decl_ptr): Likewise.
8633         (vbase_init_result): Likewise.
8634         (closed_envelopes): Likewise.
8635         (bvtable): Likewise.
8636
8637 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
8638
8639         * call.c (add_function_candidate): Check for proper number of args
8640         before checking the validity of those args.
8641
8642 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
8643
8644         * cp-tree.h (struct lang_type): Add anon_union field.
8645         (ANON_UNION_TYPE_P): Use it instead of examining type.
8646         (SET_ANON_UNION_TYPE_P): New macro.
8647         * decl.c (check_tag_decl): Use it.
8648
8649         * search.c (compute_access): Handle non-type contexts earlier, and
8650         handle NULL_TREE.
8651
8652         * tree.c (build_exception_variant): Use copy_to_permanent.
8653
8654         * decl2.c (setup_initp): Give statics with no priority the default
8655         priority here.
8656         (do_dtors, do_ctors, finish_file): Remove special handling of
8657         non-prioritized statics.
8658
8659 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
8660
8661         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
8662         * decl.c (make_typename_type): Don't issue an error if an
8663         immediate lookup fails; it migt be resolved later.
8664         * friend.c (is_friend): Add comment.
8665         * search.c (breadth_first_search): Add POSTFN and DATA
8666         parameters.  Tidy.  All callers changed.
8667         (lookup_field_queue_p): New function.
8668         (lookup_field_r): Likewise.
8669         (lookup_field_post): Likewise.
8670         (lookup_field): Use them, via breadth_first_search, instead of
8671         duplicating logic.
8672         (compute_access): Robustify.
8673         (lookup_fnfield_info): New structure.
8674
8675 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
8676
8677         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
8678
8679 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
8680
8681         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
8682         cc happy.
8683
8684         * decl2.c (import_export_class): Also return if
8685         CLASSTYPE_INTERFACE_ONLY is set.
8686
8687 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8688
8689         * decl.c (push_overloaded_decl): Only overwrite the old binding if
8690         there was one.
8691         * decl2.c (do_local_using_decl): Fix loop termination.
8692
8693 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
8694
8695         * cp-tree.h (determine_specialization): Don't declare.
8696         * pt.c (determine_specialization): Make it static.  Eliminate
8697         complain parameter.  Note that decl is always non-NULL now, and
8698         simplify accordingly.
8699
8700         * decl.c (maybe_push_to_top_level): Always call
8701         push_cp_function_context.
8702         (pop_from_top_level): Always call pop_cp_function_context.
8703
8704 1999-02-26  Nathan Sidwell  <nathan@acm.org>
8705
8706         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
8707         diagnostics.
8708         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
8709         * init.c (build_new_1): Extra arg to complete_type_or_else.
8710         (build_delete): Likewise.
8711         * typeck.c (require_complete_type): Likewise.
8712         (pointer_int_sum): Likewise.
8713         (pointer_diff): Likewise.
8714         (build_component_ref): Likewise.
8715
8716         * typeck2.c (incomplete_type_error): Always use cp_error.
8717         Show declaration of undefined type, if appropriate.
8718         Deal with UNKNOWN_TYPE nodes.
8719
8720         * typeck.c (require_complete_type): Use TYPE_SIZE as
8721         size_zero_node to mean incomplete type.
8722         (require_complete_type_in_void): New function.
8723         (build_compound_expr): Call complete_type_in_void for LHS.
8724         (build_c_cast): Call complete_type_in_void for void cast.
8725         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
8726         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
8727         require_complete_type_in_void.  Call it.
8728         * cp-tree.h (require_complete_type_in_void): Prototype new function.
8729
8730         * typeck.c (convert_arguments): Use alternative format for
8731         function decls.  Don't require_complete_type here.  Simplify
8732         diagnostic printing.
8733         (convert_for_initialization): Don't require_complete_type on RHS yet.
8734         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
8735
8736         * call.c (build_over_call): Cope with qualified void return type.
8737         * semantics.c (finish_call_expr): Likewise.
8738         * typeck.c (build_function_call_real): Likewise.
8739         (c_expand_return): Likewise.
8740         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
8741
8742         * call.c (print_z_candidates): Use alternate print format, to be
8743         consistent with (pt.c) print_candidates.
8744         * method.c (hack_identifier): List candidate members.
8745         * search.c (lookup_field): Build ambiguous list, and show it, if
8746         ambiguous.
8747
8748 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
8749
8750         * typeck.c (decay_conversion): Don't confuse constant array
8751         variables with their initializers.
8752
8753         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
8754         merging decls.
8755         * pt.c (regenerate_decl_from_template): Tweak for clarity.
8756         (instantiate_decl): Mark a decl instantiated before regenerating
8757         it to avoid recursion.
8758         * tree.c (mapcar): Don't call decl_constant_value unless we know
8759         something is TREE_READONLY_DECL_P.
8760
8761         * class.c (check_for_override): Don't stop checking when we find
8762         the first overridden function.  Delete #if 0'd code.
8763         * search.c (get_matching_virtual): Likewise.
8764
8765 1999-02-25  Richard Henderson  <rth@cygnus.com>
8766
8767         * lang-specs.h: Define __FAST_MATH__ when appropriate.
8768
8769 1999-02-24  Mike Stump  <mrs@wrs.com>
8770
8771         * typeck.c (convert_for_assignment): Allow boolean integral constant
8772         expressions to convert to null pointer.
8773
8774 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8775
8776         * decl.c (lookup_namespace_name): Resolve namespace aliases.
8777
8778         * class.c (push_nested_class): Allow namespaces.
8779
8780         * decl2.c (set_decl_namespace): Add friendp parameter.
8781         * decl.c (grokfndecl): Pass it.
8782         (grokvardecl): Likewise.
8783         * cp-tree.h: Change declaration.
8784
8785 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
8786
8787         * pt.c (tsubst): Allow an array of explicit size zero.
8788
8789 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
8790
8791         * errfn.c: Change varargs code to look like toplev.c.
8792
8793         * method.c (process_modifiers): Don't prepend 'U' for char or
8794         wchar_t.
8795
8796 1999-02-20  Craig Burley  <craig@jcb-sc.com>
8797
8798         * Make-lang.in (cplib2.ready): Don't consider updating
8799         cplib2 stuff if the current directory isn't writable, as
8800         it won't work (such as during a `make install').
8801
8802 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
8803
8804         * decl2.c (start_objects): Make file scope constructors and
8805         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
8806         ASM_OUTPUT_DESTRUCTOR are defined.
8807
8808 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
8809
8810         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
8811         (fn_type_unification): Adjust prototype.
8812         (lookup_fnfields_1): Declare.
8813         * call.c (add_template_candidate_real): Adjust call to
8814         fn_type_unification.
8815         * class.c (add_method): Don't allow duplicate declarations of
8816         constructors or destructors.
8817         (resolve_address_of_overloaded_function): Remove unused variable.
8818         Adjust call to fn_type_unification.
8819         * decl.c (grokfndecl): Be more robust in the face of illegal
8820         specializations.
8821         * decl2.c (check_classfn): Remove hokey handling of member
8822         templates.
8823         * pt.c (determine_specialization): Improve comments.  Adjust to
8824         handle template argument deduction as per the standard.
8825         (check_explicit_specialization): Fix comment spacing.  Handle
8826         type-conversion operators correctly.  Improve error-recovery.
8827         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
8828         (get_bindings_real): Simplify handling of static members.
8829         * search.c (lookup_fnfields_1): Make it have external linkage.
8830         * typeck.c (compparms): Fix comment.
8831         (build_unary_op): Don't try to figure out which template
8832         specialization is being referred to when when the address-of
8833         operator is used with a template function.
8834
8835 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8836
8837         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
8838         keyword to match an analogous change at the top level.
8839
8840         * tree.c (lvalue_or_else): Likewise.
8841
8842 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
8843
8844         * decl.c (xref_basetypes): Comment.
8845         * pt.c (instantiate_class_template): Use xref_basetypes.
8846
8847 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
8848
8849         * cp-tree.h (tsubst): Change prototype.
8850         (tsubst_expr): Likewise.
8851         (tsubst_copy): Likewise.
8852         (type_unification): Remove prototype.
8853         * call.c (convert_default_arg): Adjust call to tsubst_expr.
8854         * class.c (resolve_address_of_overloaded_function): Just use
8855         fn_type_unification.
8856         * decl.c (grokdeclarator): Adjust call to tsubst.
8857         * method.c (build_template_parm_names): Likewise.
8858         * pt.c (GTB_VIA_VIRTUAL): New macro.
8859         (GTB_IGNORE_TYPE): Likewise.
8860         (resolve_overloaded_unification): Add `complain' parameter.
8861         (try_one_overload): Likewise.
8862         (tsubst_template_arg_vector): Likewise.
8863         (tsubst_template_parms): Likewise.
8864         (tsubst_aggr_type): Likewise.
8865         (tsubst_arg_types): Likewise.
8866         (tsubst_call_declarator_parms): Likewise.
8867         (unify): Remove explicit_mask.
8868         (type_unification_real): Likewise.
8869         (get_template_base_recursive): Likewise.
8870         (coerce_template_template_parms): Provide prototype.
8871         (tsubst_function_type): Likewise.
8872         (try_class_unification): New function.
8873         All callers changed to use new complain parameter.
8874         (get_template_base): Use try_class_unification.
8875         (unify): Adjust handling of classes derived from template types.
8876         (fn_type_unification): Substitute explicit arguments before
8877         unification.
8878
8879 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8880
8881         * decl.c (pushdecl): Remove dead code.
8882
8883 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
8884
8885         * decl2.c (finish_objects): Fix code I missed in previous change.
8886
8887 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
8888
8889         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
8890         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
8891
8892         * pt.c (maybe_process_partial_specialization): Complain about
8893         'template <>' on non-specialization.
8894
8895 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
8896
8897         * decl.c (grokdeclarator): Catch wierd declarators.
8898         * decl2.c (finish_file): Don't abort because of namespace parsing
8899         failure.
8900         (check_decl_namespace): Remove.
8901
8902 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
8903
8904         * cp-tree.h (get_template_base): Don't declare.
8905         (dfs_walk): Declare.
8906         (dfs_unmark): Likewise.
8907         (markedp): Likewise.
8908         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
8909         targs to get_template_base.
8910         (get_template_base_recursive): Move here from search.c.  Check to
8911         see that the base found can be instantiated to form the desired
8912         type.
8913         (get_template_base): Likewise.
8914         (get_class_bindings): Simplify.
8915         * search.c (get_template_base_recursive): Move to pt.c.
8916         (get_template_base): Likewise.
8917         (markedp): Make it global.
8918         (dfs_walk): Likewise.
8919         (dfs_unmark): Likewise.
8920
8921 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
8922
8923         * pt.c (maybe_process_partial_specialization): Complain about
8924         specialization in wrong namespace.
8925         * tree.c (decl_namespace_context): New fn.
8926
8927 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8928
8929         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
8930         * pt.c (coerce_template_template_parms): Handle nested
8931         template template parameters.
8932
8933 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
8934
8935         * typeck2.c: Update email addresses.
8936
8937 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8938
8939         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
8940         turned off.
8941
8942 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
8943
8944         * lex.c (retrofit_lang_decl): Split out...
8945         (build_lang_decl): From here.
8946         * decl.c (pushdecl): Call it for functions generated by the middle
8947         end that don't have DECL_LANG_SPECIFIC.
8948         * cp-tree.h: Declare it.
8949
8950         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
8951         (start_objects, finish_objects): Only use special
8952         init_priority code if the user specified a priority.
8953         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
8954         objects.
8955
8956 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
8957
8958         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
8959         mkstemp.o.  Get them from libiberty now.
8960         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
8961
8962 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
8963
8964         * decl2.c (lang_decode_option): Use read_integral_parameter.
8965
8966 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
8967
8968         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
8969         before calling complete_type_or_else.
8970
8971 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8972
8973         * input.c (inline): Don't define, its handled by system.h.
8974
8975 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
8976
8977         * decl2.c: Don't define flag_no_ident here.  Don't process
8978         -f(no-)ident here.
8979         * cp-tree.h: Don't declare flag_no_ident here.
8980         * lang-specs.h: Map -Qn to -fno-ident.
8981
8982 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
8983
8984         * cp-tree.h (struct tree_binding): Replace scope field with a union.
8985         (BINDING_SCOPE): Adjust.
8986         * decl.c (BINDING_LEVEL): Adjust.
8987
8988 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
8989
8990         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
8991         member constants.
8992
8993         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
8994         a ctor initializer.
8995
8996         * tree.c (equal_functions): Fix name in prototype.
8997
8998         * decl.c (push_local_binding): Add FLAGS argument.
8999         (pushdecl, push_overloaded_decl): Pass it.
9000         * decl2.c (do_local_using_decl): Likewise.
9001         * cp-tree.h: Adjust prototype.
9002         * decl.c (poplevel): Fix logic.
9003
9004         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
9005         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
9006         (cat_namespace_levels): Don't loop forever.
9007
9008 1999-01-25  Richard Henderson  <rth@cygnus.com>
9009
9010         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
9011
9012 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
9013
9014         * class.c (resolve_address_of_overloaded_function): Mark the
9015         chosen function used.
9016
9017         * call.c (build_call): Make sure that a function coming in has
9018         been marked used already.
9019         * decl.c (expand_static_init): Call mark_used instead of
9020         assemble_external.
9021         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
9022         alloc_eh_object, expand_throw): Likewise.
9023         * init.c (build_builtin_delete_call): Likewise.
9024         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
9025         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
9026         expand_generic_desc): Likewise.
9027
9028 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9029
9030         * tree.c (equal_functions): New function.
9031         (ovl_member): Call it.
9032
9033 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
9034
9035         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
9036
9037 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9038
9039         * decl.c (decls_match): Return 1 if old and new are identical.
9040         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
9041
9042 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
9043
9044         * decl.c (start_function): Make member functions one_only on windows.
9045         * decl2.c (import_export_decl): Likewise.
9046
9047         * decl.c (grokdeclarator): Don't complain about implicit int in
9048         a system header.  Change same-name field check to not complain in
9049         a system header instead of within extern "C".
9050
9051 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
9052
9053         * cp-tree.h (PUSH_GLOBAL): New macro.
9054         (PUSH_LOCAL): Likewise.
9055         (PUSH_USING): Likewise.
9056         (namespace_bindings_p): Declare.
9057         (push_overloaded_decl): Likewise.
9058         * decl.c (push_overloaded_decl): Don't make it static.  Check for
9059         illegal declarations after using declarations here.
9060         (namespace_bindings_p): Likewise.
9061         (duplicate_decls): Don't consider declarations from different
9062         namespaces to be the same.
9063         (pushdecl): Use symbolic PUSH_ constants in calls to
9064         push_overloaded_decl.
9065         (push_overloaded_decl_1): Likewise.
9066         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
9067         (do_nonmember_using_decl): Check for illegal using declarations
9068         after ordinary declarations here.
9069         (do_local_using_decl): Call pushdecl to insert declarations.
9070
9071 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
9072
9073         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
9074
9075 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
9076
9077         * tree.c (build_cplus_array_type_1): Don't call build_array_type
9078         for types involving template parameters.
9079
9080         * cp-tree.h (PARM_DECL_EXPR): Delete.
9081         (convert_default_arg): Change prototype.
9082         (check_default_argument): Declare.
9083         (search_tree): Likewise.
9084         * call.c (convert_default_arg): Take the function to which the
9085         default argument belongs as a parameter, and do any necessary
9086         instantiation here, instead of ...
9087         (build_over_call): Here.
9088         * decl.c (local_variable_p): New function.
9089         (check_default_argument): Likewise, split out and tidied from ...
9090         (grokparms): Here.
9091         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
9092         * pt.c (tsubst_call_declarator_parms): New function.
9093         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
9094         with CALL_EXPRs, rather than trying to be clever.
9095         (tsubst): Use tsubst_call_declarator_parms.
9096         * tree.c (search_tree): Don't make it static.
9097         * typeck.c (convert_arguments): Use new interface to
9098         convert_default_arg.
9099
9100 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
9101
9102         * error.c (dump_function_decl): Don't print the argument types for
9103         a function when the verbosity level is negative.
9104
9105         * call.c (build_over_call): Check format attributes at call-time.
9106
9107         * pt.c (tsubst_copy): Fix comment.
9108         (unify): Don't allow unification with variable-sized arrays.
9109
9110         * semantics.c (finish_stmt_expr): When processing a template make
9111         the BIND_EXPR long-lived.
9112
9113 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
9114
9115         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
9116         (import_export_vtable): Not here.
9117
9118 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
9119
9120         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
9121         non-static member function.
9122
9123 1999-01-18  Nathan Sidwell  <nathan@acm.org>
9124
9125         * class.c (instantiate_type): Only diagnose illegal address of member
9126         function if complaining.
9127
9128         * decl.c (lookup_name_real): Remove duplicate code.
9129
9130 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
9131
9132         * tree.c (copy_template_template_parm): Use permanent_obstack.
9133
9134 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
9135
9136         * pt.c (unify): Remove restrictions on deduction of argument
9137         of template template parameters.
9138
9139 1999-01-18  Nathan Sidwell  <nathan@acm.org>
9140
9141         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
9142
9143         * class.c (resolve_address_of_overloaded_function): Show list of
9144         all candidates, when none of them match.
9145
9146 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
9147
9148         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
9149         definition of 'casting away const' in reinterpret_cast<>.
9150
9151 1999-01-18  Graham  <grahams@rcp.co.uk>
9152
9153         * cvt.c: Add include for decl.h, remove extern for
9154         static_aggregates which is now provided by decl.h.
9155
9156         * Makefile.in (cvt.o): Add dependency for decl.h and missing
9157         dependencies for convert.h and flags.h.
9158
9159 1999-01-18  Nathan Sidwell  <nathan@acm.org>
9160
9161         * decl2.c (do_dtors): Set current location to that of the
9162         decl, for sensible diagnostics and debugging.
9163         (check_classfn): Issue `incomplete type' error, if
9164         class is not defined.
9165
9166 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
9167
9168         * cp-tree.h: Add prototype for bound_pmf_p.
9169
9170 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
9171             Manfred Hollstein <manfred@s-direktnet.de>
9172
9173         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
9174         -Wreturn-type.
9175
9176 1999-01-16  Nathan Sidwell  <nathan@acm.org>
9177
9178         * cp-tree.h (struct lang_type): Added has_mutable flag.
9179         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
9180         (TYPE_HAS_MUTABLE_P): New macro to read it.
9181         (cp_has_mutable_p): Prototype for new function.
9182         * class.c (finish_struct_1): Set has_mutable from members.
9183         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
9184         it contains a mutable.
9185         * typeck.c (cp_has_mutable_p): New function.
9186
9187 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
9188
9189         * pt.c (process_template_parm): Ignore top-level qualifiers on
9190         non-type parameters.
9191
9192         * decl.c (start_function): Use current_function_parms in the call
9193         to require_complete_type_for_parms, not the probably empty
9194         DECL_ARGUMENTS.
9195
9196 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
9197
9198         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
9199
9200         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
9201         that we don't suppress the other copies.
9202         * lex.c (handle_cp_pragma): Likewise.
9203
9204 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
9205
9206         * decl.c (grokdeclarator): Undo 1998-12-14 change.
9207         * tree.c (build_cplus_array_type_1): Likewise.
9208         * pt.c (instantiate_class_template): Remove misleading comment.
9209         (tsubst_aggr_type): Substitute if there are template parameters,
9210         regardless of whether or not they use template arguments.
9211         (unify): Likewise, but for unification.
9212
9213 1999-01-12  Richard Henderson  <rth@cygnus.com>
9214
9215         * cp-tree.h (flag_permissive): Declare extern.
9216
9217 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
9218
9219         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
9220         here.
9221         (lang_type): Add is_partial_instantiation.  Decrease width of
9222         dummy.
9223         (PARTIAL_INSTANTIATION_P): New macro.
9224         (OPERATOR_TYPENAME_P): Remove.
9225         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
9226         OPERATOR_TYPENAME_P.
9227         (grok_op_properties): Likewise.
9228         * friend.c (do_friend): Handle friends that are member functions
9229         correctly.
9230         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
9231         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
9232         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
9233         any more partial instantiation than is absolutely necessary for
9234         implicit typename.  Set PARTIAL_INSTANTIATION_P.
9235         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
9236         * semantics.c (begin_class_definition): Handle partial
9237         specializations of a type that was previously partially
9238         instantiated.
9239
9240 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
9241
9242         * g++spec.c (LIBSTDCXX): Provide default definition.
9243         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
9244
9245 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9246
9247         * Make-lang.in (g++.o): Depend on prefix.h.
9248
9249 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
9250
9251         * tree.c (bound_pmf_p): New fn.
9252         * typeck.c (build_c_cast): Use it.
9253
9254         * decl.c (grok_op_properties): Use same_type_p.
9255
9256 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9257
9258         * Makefile.in (cvt.o): Depend on toplev.h.
9259
9260         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
9261
9262         * cvt.c: Include toplev.h.
9263
9264         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
9265         definitions.
9266
9267         * init.c (expand_vec_init): Initialize variable `itype'.
9268
9269         * lex.c (yyerror): Cast the argument passed to a ctype function to
9270         an unsigned char.
9271
9272         * method.c (build_mangled_C9x_name): Wrap prototype and definition
9273         in "HOST_BITS_PER_WIDE_INT >= 64".
9274
9275         * typeck.c (build_binary_op): Mark parameter `convert_p' with
9276         ATTRIBUTE_UNUSED.
9277
9278 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
9279
9280         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
9281         * tree.c (build_exception_variant): Don't crash on empty throw
9282         specs.
9283
9284 1998-12-18  DJ Delorie  <dj@cygnus.com>
9285
9286         * cvt.c (convert_to_reference): Check for both error_mark_node
9287         and NULL_NODE after call to convert_for_initialization.
9288
9289 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
9290
9291         * error.c (interesting_scope_p): New fn.
9292         (dump_simple_decl): Use it.
9293         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
9294         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
9295
9296 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
9297
9298         * class.c (resolve_address_of_overloaded_function): Do conversion
9299         to correct type here, rather than ...
9300         (instantiate_type): Here.
9301
9302         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
9303         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
9304         (decl_template_parm_p): Remove.
9305         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
9306         parameter.
9307         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
9308         * pt.c (push_inline_template_parms_recursive): Set it.
9309         (decl_template_parm_p): Remove.
9310         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
9311         (process_template_parm): Set it.
9312
9313 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
9314
9315         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
9316         if configured with cpplib.
9317
9318 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
9319
9320         * decl.c (poplevel): Make sure ns_binding is initialized.
9321
9322         * decl.c (finish_function): Undo inadvertent change in previous
9323         patch.
9324
9325 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
9326
9327         * class.c (pushclass): Tweak handling of class-level bindings.
9328         (resolve_address_of_overloaded_function): Update pointer-to-member
9329         handling.
9330         (instantiate_type): Likewise.
9331         * cvt.c (cp_convert_to_pointer): Likewise.
9332         * decl.c (pop_binding): Take the DECL to pop, not just the name.
9333         Deal with `struct stat' hack.
9334         (binding_level): Add to documentation.
9335         (push_binding): Clear BINDING_TYPE.
9336         (add_binding): New function.
9337         (push_local_binding): Use it.
9338         (push_class_binding): Likewise.
9339         (poplevel): Adjust calls to pop_binding.
9340         (poplevel_class): Likewise.
9341         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
9342         declarations to current binding level.
9343         (push_class_level_binding): Likewise.
9344         (push_overloaded_decl): Adjust handling of OVERLOADs in local
9345         bindings.
9346         (lookup_namespace_name): Don't crash when confronted with a
9347         TEMPLATE_DECL.
9348         (lookup_name_real): Do `struct stat' hack in local binding
9349         contexts.
9350         (build_ptrmemfunc_type): Adjust documentation.
9351         (grokdeclarator): Don't avoid building real array types when
9352         processing templates unless really necessary.
9353         (finish_method): Adjust calls to pop_binding.
9354         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
9355         not reparse_decl_as_expr.
9356         (build_expr_from_tree): Deal with a template-id as the function to
9357         call in a METHOD_CALL_EXPR.
9358         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
9359         (maybe_adjust_types_For_deduction): Don't do peculiar things with
9360         METHOD_TYPEs here.
9361         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
9362         pointer-to-member types where necessary.
9363         * tree.c (build_cplus_array_type_1): Don't avoid building real
9364         array types when processing templates unless really necessary.
9365         (build_exception_variant): Compare the exception lists correctly.
9366
9367 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
9368
9369         * cp-tree.def (CPLUS_BINDING): Update documentation.
9370         * cp-tree.h (LOCAL_BINDING_P): New macro.
9371         (lang_identifier): Rename local_value to bindings.
9372         (tree_binding): Make `scope' of type `void*', not `tree'.
9373         (BINDING_SCOPE): Update documentation.
9374         (IDENTIFIER_LOCAL_VALUE): Remove.
9375         (IDENTIFIER_CLASS_VALUE): Document.
9376         (IDENTIFIER_BINDING): New macro.
9377         (IDENTIFIER_VALUE): Likewise.
9378         (TIME_IDENTIFIER_TIME): Likewise.
9379         (TIME_IDENTIFIER_FILEINFO): Likewise.
9380         (IMPLICIT_TYPENAME_P): Likewise.
9381         (set_identifier_local_value): Remove.
9382         (push_local_binding): New function.
9383         (push_class_binding): Likewise.
9384         * class.c (pushclass): Update comments; use push_class_binding.
9385         * decl.c (set_identifier_local_value_with_scope): Remove.
9386         (set_identifier_local_value): Likewise.
9387         (push_binding): New function.
9388         (pop_binding): Likewise.
9389         (binding_level): Update documentation.  Remove shadowed.
9390         (BINDING_LEVEL): New macro.
9391         (free_binding_nodes): New variable.
9392         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
9393         BLOCK_VARs when doing for-scope extension.  Remove effectively
9394         dead code.
9395         (pushlevel_class): Tweak formatting.
9396         (poplevel_class): Adjust for new name-lookup scheme.
9397         (print_binding_level): Likewise.
9398         (store_bindings): Likewise.
9399         (pushdecl): Likewise.
9400         (pushdecl_class_level): Likewise.
9401         (push_class_level_binding): Likewise.
9402         (push_overloaded_decl): Update comments.  Adjust for new
9403         name-lookup scheme.
9404         (lookup_name_real): Likewise.
9405         (lookup_name_current_level): Likewise.
9406         (cp_finish_decl): Likewise.
9407         (require_complete_types_for_parms): Likewise.  Remove misleading
9408         #if 0'd code.
9409         (grok_parms): Likewise.  Don't call
9410         require_complete_types_for_parms here.
9411         (grok_ctor_properties): Don't treat templates as copy
9412         constructors.
9413         (grop_op_properties): Or as assignment operators.
9414         (start_function): Document.  Adjust for new name-lookup scheme.
9415         (finish_function): Likewise.
9416         * decl2.c (do_local_using_decl): Use push_local_binding.
9417         * lex.c (begin_definition_of_inclass_inline): New function, split
9418         out from ...
9419         (do_pending_inlines): Here, and ...
9420         (process_next_inline): Here.
9421         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
9422         (init_filename_times): Likewise.
9423         (extract_interface_info): Likewise.
9424         (ste_typedecl_interface_info): Likewise.
9425         (check_newline): Likewise.
9426         (dump_time_statistics): Likewise.
9427         (handle_cp_pragma): Likewise.
9428         (do_identifier): Adjust for new name-lookup scheme.
9429         * parse.y (function_try_block): Return ctor_initializer_opt value.
9430         (fndef): Use it.
9431         (fn.defpen): Pass appropriate values to start_function.
9432         (pending_inline): Use functor_try_block value, and pass
9433         appropriate values to finish_function.
9434         * pt.c (is_member_template): Update documentation; remove handling
9435         of FUNCTION_DECLs.  As per name, this function should deal only in
9436         TEMPLATE_DECLs.
9437         (decl_template_parm_p): Change name of olddecl parameter to decl.
9438         (check_template_shadow): Adjust for new name-lookup scheme.
9439         (lookup_template_class): Likewise.
9440         (tsubst_decl): Tweak so as not to confuse member templates with
9441         copy constructors and assignment operators.
9442         (unify): Handle UNION_TYPEs.
9443         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
9444         (lang_print_xnode): Adjust for new name-lookup scheme.
9445         * typeck.c (mark_addressable): Likewise.
9446         (c_expand_return): Likewise.
9447
9448 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
9449
9450         * decl.c (grokdeclarator): Allow field with same name as class
9451         in extern "C".
9452
9453         * decl.c (lookup_name_real): Don't limit field lookup to types.
9454         * class.c (check_member_decl_is_same_in_complete_scope): No error
9455         if icv and x are the same.
9456         * lex.c (do_identifier): Tweak error message.
9457
9458 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
9459
9460         * decl.c (start_enum): Use push_obstacks, not
9461         end_temporary_allocation.
9462         (finish_enum): Call pop_obstacks.
9463
9464 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
9465
9466         * class.c (instantiate_type): Return error_mark_node rather than
9467         junk.
9468
9469 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
9470
9471         * cp-tree.h (most_specialized_instantiation): New function.
9472         (print_candidates): Likewise.
9473         * class.c (validate_lhs): Remove.
9474         (resolve_address_of_overloaded_function): New function, split out
9475         and then substantially reworked, from ...
9476         (instantiate_type): Use it.  Simplify.
9477         * cvt.c (convert_to_reference): Complain when caller has indicated
9478         that's the right thing to do.  Don't crash if instantiate_type
9479         fails.
9480         * pt.c: Substitute `parameters' for `paramters' throughout.
9481         (print_candidates): Don't make it static.
9482         (most_specialized_instantiation): Split out from ...
9483         (most_specialized): Here.
9484
9485 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
9486
9487         * lex.c (lang_init_options): Initialize cpplib.
9488         * decl2.c (parse_options,cpp_initialized): Removed.
9489         (lang_decode_option): Move initialization of cpplib to
9490         lang_init_options.
9491
9492 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
9493
9494         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
9495         well as the TYPE_DECL, when a typedef name is assigned to a
9496         previously anonymous type.
9497
9498 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
9499
9500         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
9501         __cp_eh_info for getting the eh info pointer.  Add table_index to
9502         field list.
9503         (push_eh_cleanup): Don't increment 'handlers' data field.
9504         (process_start_catch_block): Don't set the 'caught' field.
9505
9506         * cp/exception.cc (CP_EH_INFO): New macro for getting the
9507         exception info pointer within library routines.
9508         (__cp_eh_info): Use CP_EH_INFO.
9509         (__start_cp_handler): Get exception info pointer, set caught field,
9510         and increment the handlers field.  Avoids this being done by handlers.
9511         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
9512         (uncaught_exception): Use CP_EH_INFO macro.
9513
9514 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
9515
9516         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
9517
9518 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
9519
9520         * lex.c (check_newline): Add support for \ as `natural'
9521         characters in file names in #line to be consistent with #include
9522         handling.  We support escape processing in the # 1 "..." version of
9523         the command.  See also support in cp/lex.c.
9524
9525 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
9526
9527         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
9528         structure.
9529
9530 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
9531
9532         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
9533
9534         * error.c (dump_simple_decl): Also print namespace context.
9535         (dump_function_decl): Likewise.
9536
9537         * decl2.c (ambiguous_decl): Don't print old value if it's
9538         error_mark_node.
9539
9540         * decl.c (lookup_name_real): Fix handling of local types shadowed
9541         by a non-type decl.  Remove obsolete code.
9542         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
9543
9544         * lang-options.h: Add -fpermissive.
9545         * decl2.c: Likewise.
9546         * cp-tree.h: Add flag_permissive.
9547         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
9548         were specified, set flag_pedantic_errors.
9549         * call.c (build_over_call): Turn dropped qualifier messages
9550         back into pedwarns.
9551         * cvt.c (convert_to_reference): Likewise.
9552         * typeck.c (convert_for_assignment): Likewise.
9553
9554 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
9555
9556         * decl2.c (coerce_new_type): Use same_type_p.
9557         (coerce_delete_type): Likewise.
9558
9559         * call.c (check_dtor_name): Return 1, not error_mark_node.
9560
9561 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
9562
9563         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
9564         if MULTIPLE_SYMBOL_SPACES.
9565
9566         * pt.c (check_template_shadow): New fn.
9567         * decl2.c (grokfield): Use it.
9568         * decl.c (pushdecl): Likewise.
9569         (pushdecl_class_level): Likewise.
9570         (start_method): Likewise.
9571         (xref_tag): Don't try to use 't' if we're defining.
9572
9573         * call.c (check_dtor_name): Just return an error_mark_node.
9574         * pt.c (lookup_template_class): Complain about using non-template here.
9575         * parse.y (apparent_template_type): Not here.
9576
9577         * pt.c (check_explicit_specialization): Complain about specialization
9578         with C linkage.
9579
9580         * lang-options.h: Add -f{no-,}implicit-inline-templates.
9581
9582         * pt.c (convert_nontype_argument): Don't assume that any integer
9583         argument is intended to be a constant-expression.
9584
9585 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
9586
9587         * class.c (handle_using_decl): Fix comment.  Don't lookup
9588         constructors in base classes.
9589         (validate_lhs): Fix typo in comment.
9590         * search.c (lookup_field_1): Don't return a USING_DECL.
9591
9592         * cp-tree.h (DECL_ACCESS): Improve documentation.
9593
9594         * decl.c (expand_static_init): Don't set the initialization-done
9595         flag until the initialization is done.
9596
9597 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
9598
9599         * decl2.c (validate_nonmember_using_decl): Complain about using
9600         declarations for class members.
9601
9602 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
9603
9604         * typeck2.c (process_init_constructor): Use same_type_p.
9605
9606         * decl.c (check_tag_decl): Don't warn about null decl inside a
9607         class.
9608
9609         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
9610         UNIFY_ALLOW_NONE.
9611         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
9612         (resolve_overloaded_unification): Strip baselinks.
9613
9614 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9615
9616         * g++spec.c: Don't prototype xmalloc.
9617
9618 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
9619
9620         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
9621
9622         * decl.c (check_tag_decl): Do complain about null friend decl at
9623         file scope.
9624
9625 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
9626
9627         * lex.c (make_lang_type): Clear the whole struct lang_type, not
9628         only the first multiple of sizeof (int).
9629
9630 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
9631
9632         * decl.c (start_decl): An explicit specialization of a static data
9633         member is only a definition if it has an initializer.
9634
9635         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
9636         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
9637         cp_finish_decl.
9638         * init.c (expand_default_init): Check for DIRECT_BIND instead of
9639         DECL_ARTIFICIAL.
9640
9641         * call.c (build_over_call): Use build_decl.
9642
9643         * except.c (expand_throw): Just use convert, not
9644         build_reinterpret_cast.
9645
9646         * lex.c (handle_generic_pragma): Use token_buffer.
9647
9648         * decl.c (check_tag_decl): Don't complain about null friend decl.
9649
9650 1998-11-24  Dave Pitts  <dpitts@cozx.com>
9651
9652         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
9653         first position.
9654         * lex.c (check_newline): Use ISALPHA.
9655         (readescape): Use ISGRAPH.
9656         (yyerror): Use ISGRAPH.
9657
9658 1998-11-24  Nathan Sidwell  <nathan@acm.org>
9659
9660         * search.c (get_abstract_virtuals): Do not use initial
9661         CLASSTYPE_ABSTRACT_VIRTUALS.
9662         * typeck2.c (abstract_virtuals_error): Show location of abstract
9663         declaration.
9664         * call.c (build_new_method_call): Use
9665         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
9666         * class.c (finish_struct_bits): Don't bother working out whether
9667         get_abstract_virtuals will do anything, just do it.
9668
9669 1998-11-24  Graham  <grahams@rcp.co.uk>
9670
9671         * typeck.c (build_component_ref): Remove unused statement.
9672
9673 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
9674
9675         * class.c (add_method): Catch invalid overloads.
9676
9677         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
9678         * search.c (lookup_conversions): Handle getting real OVERLOADs.
9679         (add_conversions): Likewise.  Revert last change.
9680         * call.c (add_conv_candidate): Pass totype to add_candidate instead
9681         of fn.  Don't add a new candidate if the last one was for the same
9682         type.
9683         (print_z_candidates): Handle getting a type as a function.
9684         (joust): If we got two conversion candidates to the same type,
9685         just pick one.
9686         (build_object_call): Lose 'templates'.
9687         (build_user_type_conversion_1): Handle getting real OVERLOADs.
9688
9689 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
9690
9691         * typeck2.c (process_init_constructor): If there are elements
9692         that don't have initializers and they need to have constructors
9693         run, supply them with initializers.
9694
9695         * class.c (finish_struct_1): A class with a 0-width bitfield is
9696         still empty.
9697
9698 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
9699
9700         * pt.c (instantiate_class_template): Don't try to figure out what
9701         specialization to use for a partial instantiation.  Correct
9702         typos in a couple of comments.  Avoid calling uses_template_parms
9703         multiple times.
9704
9705 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
9706
9707         * method.c (process_overload_item): Add call to
9708         build_mangled_C9x_name for intTI_type_nodes.
9709         (build_mangled_C9x_name): Add prototype, define.
9710         * decl.c (init_decl_processing): Add names for
9711         TImode_type_node.
9712
9713 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
9714
9715         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
9716
9717         * class.c (finish_struct_1): Set things up for 0-width bitfields
9718         like we do for others.
9719
9720         * decl.c (check_tag_decl): New fn.
9721         (shadow_tag): Split out from here.
9722         * decl2.c (grok_x_components): Call it.
9723
9724 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
9725
9726         * decl.c: Lose warn_about_return_type.
9727         (grokdeclarator): Always complain about implicit int, except for
9728         `main () { ... }'.
9729
9730         * decl.c (tag_name): New fn.
9731         (xref_tag): Complain about using typedef-name after class-key.
9732
9733         * init.c (expand_vec_init): Also keep going if from_array.
9734
9735         * tree.c (is_overloaded_fn): Also handle the output of
9736         build_offset_ref.
9737
9738         * decl.c (grokdeclarator): Use constructor_name when comparing
9739         field name against enclosing class.
9740         * class.c (finish_struct_anon): Likewise.
9741
9742 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
9743
9744         * decl.c (poplevel): Remove code to handle KEEP == 2.
9745         (finish_function): Don't confuse BLOCK-order when
9746         processing a destructor.
9747
9748 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
9749
9750         * decl.c (require_complete_types_for_parms): Call layout_decl
9751         after we've completed the type.
9752
9753 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9754
9755         * decl2.c (validate_nonmember_using_decl): Allow using templates
9756         from the global namespace.
9757
9758 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
9759
9760         Handle specifying template args to member function templates.
9761         * tree.c (build_overload): Always create an OVERLOAD for a template.
9762         * search.c (add_conversions): Handle finding an OVERLOAD.
9763         * decl2.c (check_classfn): Likewise.
9764         * lex.c (identifier_type): See through a baselink.
9765         * parse.y (do_id): Don't call do_identifier if we got a baselink.
9766         * class.c (instantiate_type, case TREE_LIST): Recurse.
9767
9768         * decl.c (grokdeclarator): Allow a boolean constant for array
9769         bounds, odd as that sounds.
9770
9771         * pt.c (unify): Be more strict about non-type parms, except for
9772         array bounds.
9773         (UNIFY_ALLOW_INTEGER): New macro.
9774
9775 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
9776
9777         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
9778
9779 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
9780
9781         * semantics.c (begin_class_definition): Call
9782         maybe_process_partial_specialization before push_template_decl.
9783         Don't call push_template_decl for a specialization.
9784         * search.c (lookup_field): Do return a member template class.
9785         * decl2.c (handle_class_head): Handle member template classes.
9786
9787         * decl.c (grokdeclarator): A parm type need not be complete.
9788
9789         * pt.c (convert_nontype_argument): Fix thinko.
9790
9791 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
9792
9793         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
9794         (global_delete_fndecl): New variable.
9795         * decl.c (global_delete_fndecl): Define it.
9796         (init_decl_processing): Set it.
9797         * init.c (build_builtin_delete_call): Use it.
9798         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
9799         nodes.
9800
9801 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
9802
9803         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
9804         type.
9805
9806         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
9807         * call.c (build_object_call): Also support references to functions.
9808         * typeck.c (convert_for_initialization): Don't decay a function
9809         if the target is a reference to function.
9810
9811         * search.c (add_conversions): Get all the overloads from a class.
9812
9813         * decl.c (grok_ctor_properties): Complain about any constructor
9814         that will take a single arg of the class type by value.
9815
9816         * typeck2.c (build_functional_cast): Can't create objects of
9817         abstract classes this way.
9818         * cvt.c (ocp_convert): Likewise.
9819
9820         * decl.c (grokfndecl): Member functions of local classes are not
9821         public.
9822
9823 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
9824
9825         * Make-lang.in (cc1plus): Add dependency on hash.o.
9826
9827 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
9828
9829         * search.c (get_abstract_virtuals): Complain about virtuals with
9830         no final overrider.
9831         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
9832         with no final overrider.
9833         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
9834         on virtuals with no final overrider.
9835
9836         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
9837
9838         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
9839         after layout_type.
9840
9841         * friend.c (do_friend): Don't set_mangled_name_for_decl.
9842
9843         * class.c (finish_struct_anon): Complain about non-fields.
9844         * decl2.c (build_anon_union_vars): Likewise.
9845
9846         * decl.c (grokdeclarator): Normal data members can't have the same
9847         name as the class, either.
9848         * class.c (finish_struct_anon): Neither can members of an
9849         anonymous union.
9850
9851 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
9852
9853         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
9854         (TYPE_BINFO): Likewise.
9855         (IS_AGGR_TYPE): Tweak.
9856         (SET_IS_AGGR_TYPE): New macro.
9857         (CLASS_TYPE_P): Tweak.
9858         (lang_type): Group mark bitfields together.  Remove linenum.
9859         (CLASSTYPE_SOURCE_LINE): Remove macro.
9860         (CLASSTYPE_MARKED_N): New macro.
9861         (SET_CLASSTYPE_MARKED_N): Likewise.
9862         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
9863         (CLASS_TYPE_MARKED_*): Use them.
9864         (SET_CLASSTYPE_MARKED_*): Likewise.
9865         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
9866         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
9867         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
9868         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
9869         * class.c (class_cache_obstack): New variable.
9870         (class_cache_firstobj): Likewise.
9871         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
9872         (pushclass): Free the cache, when appropriate.
9873         (popclass): Tidy.
9874         (maybe_push_cache_obstack): Use class_cache_obstack.
9875         * decl.c (include hash.h).
9876         (typename_hash): New function.
9877         (typename_compare): Likewise.
9878         (build_typename_type): Check the hash table to avoid creating
9879         duplicates.
9880         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
9881         (grokdeclarator): Use CLASS_TYPE_P.
9882         (xref_basetypes): Likewise.
9883         (start_function): Likewise.  Don't put current_class_ref on the
9884         permanent obstack.
9885         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
9886         and TYPE_TI_ARGS.
9887         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
9888         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
9889         fields for types other than class types.  Do clear TYPE_ALIAS_SET
9890         for types other than class types, though.
9891         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
9892         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9893         * pt.c (process_template_parm): Don't set
9894         CLASSTYPE_GOT_SEMICOLON.
9895         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9896         Coerce arguments on the momentary obstack.
9897         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9898         (instantiate_class_template): Calculate template arguments on the
9899         momentary obstack.  Tidy.
9900         (tsubst_template_arg_vector): Use make_temp_vec.
9901         (tsubst_aggr_type): Put template arguments on the momentary
9902         obstack.
9903         (tsubst_decl): Likewise.
9904         (tsubst): Copy the array bounds index to the permanent obstack
9905         before building index types.  Use new macros.
9906         (unify): Use new macros.
9907         (do_type_instantiation): Likewise.
9908         * search.c (lookup_fnfields_1): Use new macros.
9909         (dfs_pushdecls): Build envelopes on the cache obstack.
9910         (dfs_compress_decls): Use new macros.
9911         (push_class_decls): Build on the cache obstack.
9912         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
9913         * sign.c (build_signature_pointer_or_reference_type): Use
9914         SET_IS_AGGR_TYPE.
9915         * tree.c (make_binfo): Check CLASS_TYPE_P.
9916         (copy_template_template_parm): Adjust.
9917         (make_temp_vec): Use push_expression_obstack.
9918         * typeck.c (complete_type): Use new macros.
9919         (comptypes): Likewise.
9920
9921 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
9922
9923         * pt.c (tsubst): Add diagnostics for invalid array, reference
9924         and pointer to member types.
9925
9926 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
9927
9928         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
9929
9930         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
9931         Simplify.
9932
9933         * parse.y (structsp): Fix cut-and-paste error.
9934
9935         * init.c (build_new): Complain about non-integral size.
9936
9937         * parse.y (unary_expr): Complain about defining types in sizeof.
9938
9939         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
9940
9941         * rtti.c (build_x_typeid): Complain about typeid without
9942         including <typeinfo>.
9943         (get_typeid): Likewise.  Complain about typeid of incomplete type.
9944         (get_tinfo_fn_dynamic): Likewise.
9945         (get_typeid_1): Not static anymore.
9946         * except.c (build_eh_type_type): Use get_typeid_1.
9947
9948         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
9949         ambiguous or private bases.  Fix warning for reference cast.
9950
9951 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
9952
9953         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
9954         * decl.c (duplicate_decls): Remove special-case code to deal with
9955         template friends, and just do the obvious thing.
9956         * pt.c (register_specialization): Tweak for clarity, and also to
9957         clear DECL_INITIAL for an instantiation before it is merged with a
9958         specialization.
9959         (check_explicit_specialization): Fix indentation.
9960         (tsubst_friend_function): Handle both definitions in friend
9961         declaration and outside friend declarations.
9962         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
9963         (regenerate_decl_from_template): Tweak accordingly.
9964         (instantiate_decl): Likewise.
9965
9966 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
9967
9968         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
9969         member function reference to error.
9970         * cvt.c (ocp_convert): Complain about converting an overloaded
9971         function to void.
9972
9973         * init.c (build_offset_ref): Just return a lone static member
9974         function.
9975
9976         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
9977         not internal ones.
9978
9979         * typeck.c (build_binary_op_nodefault): Improve error handling.
9980
9981         * decl.c (grokfndecl): Complain about making 'main' a template.
9982
9983         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
9984
9985         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
9986         TYPE_DECL in a template.
9987
9988 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
9989
9990         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
9991
9992         * decl.c (struct cp_function): Add named_label_uses.
9993         (push_cp_function_context): Save it.
9994         (pop_cp_function_context): Restore it.
9995         (define_label): Also complain about jumping into the scope of
9996         non-POD objects that don't have constructors.
9997         * tree.c (pod_type_p): New fn.
9998
9999         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
10000         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
10001         (get_tinfo_fn): Not here.
10002         * repo.c (repo_get_id): Abort if we get called for an incomplete
10003         type.
10004
10005 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
10006
10007         * except.c (expand_throw): Make sure first argument to
10008         __cp_push_exception is of type `void*' to avoid spurious error
10009         messages.
10010
10011 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
10012
10013         * pt.c (try_one_overload): Take orig_targs again.  Only check for
10014         mismatches against them; we don't care what a previous call found.
10015         (resolve_overloaded_unification): Adjust.
10016
10017         * search.c (lookup_field): Don't return anything for a non-type
10018         field from a dependent type.
10019         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
10020         in an array declarator.
10021         (start_decl): Push into the class before looking for the field.
10022
10023 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
10024
10025         * method.c (build_overload_value): Handle REFERENCE_TYPE.
10026
10027 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10028
10029         * decl.c (grokdeclarator): Allow namespace-scoped members if they
10030         are friends.
10031
10032 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
10033
10034         * pt.c (tsubst_decl): Don't mess with the global value of an
10035         un-mangled DECL_ASSEMBLER_NAME.
10036
10037 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
10038
10039         * decl.c (init_decl_processing): Remove CYGWIN conditional
10040         since CYGWIN is now able to deal with trapping signals.
10041
10042 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10043
10044         * cp-tree.h: Don't include gansidecl.h.
10045         * exception.cc: Include gansidecl.h (since we don't include config.h)
10046         * g++spec.c: Don't include gansidecl.h.
10047
10048 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
10049
10050         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
10051         size of dummy.
10052         (DECL_DEFINED_IN_CLASS_P): New macro.
10053         (TEMPLATE_PARMS_FOR_INLINE): Document.
10054         (check_static_variable_definition): New function.
10055         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
10056         appropriate.
10057         (check_static_variable_definition): Split out from ...
10058         (grokdeclarator): Here.
10059         * pt.c (check_default_tmpl_args): New function, split out from ...
10060         (push_template_decl_real): Here.
10061         (instantiate_template): Fix comment.
10062
10063 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
10064
10065         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
10066         (CP_TYPE_VOLATILE_P): Likewise.
10067         (CP_TYPE_RESTRICT_P): Likewise.
10068
10069 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
10070
10071         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
10072
10073 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
10074
10075         * class.c (instantiate_type): Be more helpful.
10076
10077         * decl2.c (import_export_decl): Call import_export_class.
10078
10079         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
10080         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
10081         * pt.c (tsubst_copy): Likewise.
10082
10083 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
10084
10085         * init.c (expand_vec_init): Fix off-by-one error.
10086
10087 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
10088
10089         * parse.y (apparent_template_type): New type.
10090         (named_complex_class_head_sans_basetype): Use it.
10091         * Makefile.in (CONFLICTS): One new conflict.
10092         * parse.c: Regenerated.
10093
10094 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
10095
10096         * cp-tree.h (COMPARE_STRICT): New macro.
10097         (COMPARE_BASE): Likewise.
10098         (COMPARE_RELAXED): Likewise.
10099         (COMPARE_REDECLARATION): Likewise.
10100         (same_type_p): Likewise.
10101         (same_or_base_type_p): Likewise.
10102         * call.c (standard_conversion): Use them, in place of comptypes
10103         with numeric arguments.
10104         (reference_binding): Likewise.
10105         (convert_like): Likewise.
10106         (build_over_call): Likewise.
10107         (is_subseq): Likewise.
10108         (is_properly_derived_from): Likewise.
10109         (compare_ics): Likewise.
10110         (joust): Likewise.
10111         * class.c (delete_duplicate_fields_1): Likewise.
10112         (resolves_to_fixed_type_p): Likewise.
10113         (instantiate_type): Likewise.  Remove #if 0'd code.
10114         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
10115         (pushdecl): Likewise.
10116         (lookup_name_real): Likewise.
10117         (grokdeclarator): Likewise.  Check for illegal array declarations.
10118         (grokparms): Likewise.
10119         (grok_op_properties): Likewise.
10120         * decl2.c (check_classfn): Likewise.
10121         * friend.c (is_friend): Likewise.
10122         (make_friend_class): Likewise.
10123         * init.c (expand_aggr_init): Likewise.
10124         (expand_vec_init): Likewise.
10125         * pt.c (is_member_template_class): Remove declaration.
10126         (is_specialization_of): Use COMPARE_* and new macros.
10127         (comp_template_parms): Likewise.
10128         (convert_nontype_argument): Likewise.
10129         (coerce_template_template_parms): Likewise.
10130         (template_args_equal): Likewise.
10131         (lookup_template_class): Likewise.
10132         (type_unification_real): Likewise.
10133         (unify): Likewise.
10134         (get_bindings_real): Likewise.
10135         * search.c (covariant_return_p): Likewise.
10136         (get_matching_virtual): Likewise.
10137         * sig.c (match_method_types): Likewise.
10138         * tree.c (vec_binfo_member): Likewise.
10139         (cp_tree_equal): Likewise.
10140         * typeck.c (common_type): Likewise.
10141         (comp_array_types): Likewise.  Get issues involving unknown array
10142         bounds right.
10143         (comptypes): Update comments.  Use new flags.
10144         (comp_target_types): Use new macros.
10145         (compparms): Likewise.
10146         (comp_target_parms): Likewise.
10147         (string_conv_p): Likewise.
10148         (build_component_ref): Likewise.
10149         (build_indirect_ref): Likewise.
10150         (build_conditional_expr): Likewise.
10151         (build_static_cast): Likewise.
10152         (build_reinterpret_cast): Likewise.
10153         (build_const_cast): Likewise.
10154         (build_modify_expr): Likewise.
10155         (convert_for_assignment): Likewise.
10156         (comp_ptr_ttypes_real): Likewise.
10157         (ptr_reasonably_similar): Likewise.
10158         (comp_ptr_ttypes_const): Likewise.
10159
10160 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
10161
10162         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
10163
10164 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
10165
10166         * decl2.c (delete_sanity): Pass integer_zero_node, not
10167         integer_two_node, to build_vec_delete.
10168         * init.c (build_array_eh_cleanup): Remove.
10169         (expand_vec_init_try_block): New function.
10170         (expand_vec_init_catch_clause): Likewise.
10171         (build_vec_delete_1): Don't deal with case that auto_delete_vec
10172         might be integer_two_node anymore.
10173         (expand_vec_init): Rework for initialization-correctness and
10174         exception-correctness.
10175         * typeck2.c (process_init_constructor): Make mutual exclusivity
10176         of cases more obvious.
10177
10178 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
10179
10180         * decl.c (lookup_name_real): OK, only warn if not lexing.
10181         Simplify suggested fix.
10182
10183         * cp-tree.h (IDENTIFIER_MARKED): New macro.
10184         * search.c (lookup_conversions): Use breadth_first_search.
10185         (add_conversions): Avoid adding two conversions to the same type.
10186         (breadth_first_search): Work with base binfos, rather
10187         than binfos and base indices.
10188         (get_virtual_destructor): Adjust.
10189         (tree_has_any_destructor_p): Adjust.
10190         (get_matching_virtual): Adjust.
10191
10192         * pt.c (push_template_decl_real): Generalize check for incorrect
10193         number of template parms.
10194         (is_member_template_class): #if 0.
10195
10196 1998-10-29  Richard Henderson  <rth@cygnus.com>
10197
10198         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
10199         last.
10200
10201 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
10202
10203         * lex.c: Call check_newline from lang_init always.  After
10204         calling cpp_start_read, set yy_cur and yy_lim to read from the
10205         cpplib token buffer.
10206
10207 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
10208
10209         * class.c (instantiate_type): Don't consider templates for a normal
10210         match.
10211
10212         * class.c (finish_struct_1): Don't complain about non-copy
10213         assignment ops in union members.
10214
10215         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
10216         (prepare_fresh_vtable): Likewise.
10217         (finish_struct_1): Don't call import_export_class.
10218         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
10219         (finish_prevtable_vardecl): Lose.
10220         (finish_file): Don't call it.
10221         * pt.c (instantiate_class_template): Likewise.
10222         * cp-tree.h: Remove it.
10223
10224         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
10225         * decl.c (finish_function): Not here.
10226         (start_function): Do set DECL_INITIAL.
10227
10228         * pt.c (push_template_decl_real): Complain about default template
10229         args for enclosing classes.
10230
10231         * call.c (add_function_candidate): Treat conversion functions
10232         as coming from the argument's class.
10233         * cp-tree.h (DECL_CONV_FN_P): New fn.
10234         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
10235         * class.c (add_method): Use DECL_CONV_FN_P.
10236         * decl2.c (check_classfn): Likewise.
10237         * error.c (dump_function_name): Likewise.
10238         (dump_function_decl): Likewise.
10239         * pt.c (fn_type_unification): Likewise.
10240         * search.c (add_conversions): Likewise.
10241
10242 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
10243
10244         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
10245         * method.c (hack_identifier): Also check for using RESULT_DECL
10246         from outer context.
10247
10248 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
10249
10250         * decl.c (grokdeclarator): Use type_quals, rather than constp,
10251         consistently.
10252
10253 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
10254
10255         * call.c (standard_conversion): instantiate_type here.
10256         (reference_binding): And here.
10257         (implicit_conversion): Not here.
10258         (build_op_delete_call): No need to cons up an OVERLOAD.
10259         * cvt.c (cp_convert_to_pointer): instantiate_type here.
10260         (convert_to_reference): And here.
10261         * decl.c (grok_reference_init): Not here.
10262         (grokparms): Or here.
10263         * typeck2.c (digest_init): Or here.
10264         * typeck.c (decay_conversion): Take the address of overloaded
10265         functions, too.
10266         (require_instantiated_type): Lose.
10267         (convert_arguments): Don't handle unknown types here.
10268         (build_c_cast): Likewise.
10269         (build_binary_op): Gut.
10270         (build_conditional_expr): Don't require_instantiated_type.
10271         (build_modify_expr): Likewise.
10272         (build_static_cast): Don't instantiate_type.
10273         (build_reinterpret_cast): Likewise.
10274         (build_const_cast): Likewise.
10275         (convert_for_initialization): Likewise.
10276         (build_ptrmemfunc): Use type_unknown_p.
10277         (convert_for_assignment): Also do default_conversion on overloaded
10278         functions.  Hand them off to ocp_convert.
10279
10280 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
10281
10282         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
10283         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
10284
10285         * class.c (finish_struct_1): Use build_cplus_array_type to build
10286         array types.
10287         * decl.c (init_decl_processing): Likewise.
10288         * except.c (expand_end_eh_spec): Likewise.
10289         * search.c (expand_upcast_fixups): Simplify very slightly.
10290
10291 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
10292
10293         * decl.c (grokdeclarator): Complain about a variable using
10294         constructor syntax coming back null from start_decl.
10295
10296         * friend.c (make_friend_class): Complain about trying to make
10297         a non-class type a friend.
10298
10299         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
10300         (start_function): Not here.
10301
10302 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
10303
10304         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
10305
10306 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
10307
10308         * typeck2.c (process_init_constructor): Only skip anonymous fields
10309         if they are bitfields.
10310
10311         * cp-tree.def (TYPEOF_TYPE): New code.
10312         * error.c (dump_type_real): Handle it.
10313         * pt.c (tsubst): Likewise.
10314         * tree.c (search_tree): Likewise.
10315         * semantics.c (finish_typeof): New fn.
10316         * parse.y (typespec): Use it.
10317         * cp-tree.h: Declare it.
10318
10319 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
10320
10321         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
10322
10323 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
10324
10325         * typeck.c (convert_arguments): Don't handle pmf references
10326         specially.
10327
10328         * init.c (build_member_call): Don't try to convert to the base type
10329         if it's ambiguous or pedantic.
10330
10331         * typeck2.c (check_for_new_type): Only depend on pedantic for
10332         C-style casts.
10333
10334 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
10335
10336         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
10337         non-converting constructors.
10338
10339 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10340
10341         * gxxint.texi: Correct documentation for n, N, Q, and B.
10342
10343 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10344
10345         * parse.y (condition): Convert VAR_DECL from reference to indirect
10346         reference.
10347
10348 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
10349
10350         * exception.cc (__cp_pop_exception): Free the original exception
10351         value, not the potentially coerced one.
10352
10353 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
10354
10355         * Makefile.in (hash.h): Run gperf when necessary.
10356
10357         * cp-tree.h (CP_TYPE_READONLY): Remove.
10358         (CP_TYPE_VOLATILE): Likewise.
10359         (CP_TYPE_QUALS): New macro.
10360         (CP_TYPE_CONST_P): Likewise.
10361         (CP_TYPE_VOLATILE_P): Likewise.
10362         (CP_TYPE_RESTRICT_P): Likewise.
10363         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
10364         (cp_build_type_variant): Rename to ...
10365         (cp_build_qualified_type): New function.
10366         (c_apply_type_quals_to_decl): Declare.
10367         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
10368         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
10369         (cp_type_qual_from_rid): New function.
10370         (compparms): Remove unused parameter.  All callers changed.
10371         (cp_type_quals): New function.
10372         (at_least_as_qualified_p): Likewise.
10373         (more_qualified_p): Likewise.
10374
10375         * call.c (standard_conversion): Replace calls to
10376         cp_build_type_variant with cp_build_qualified_type.  Use
10377         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
10378         compare them.  Use CP_TYPE_* macros to check qualifiers.
10379         (reference_binding): Likewise.
10380         (implicit_conversion): Likewise.
10381         (add_builtin_candidates): Likewise.
10382         (build_over_call): Likewise.
10383         * class.c (overrides): Compare all qualifiers, not just `const',
10384         on method declarations.
10385         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
10386         (convert_pointer_to_real): Likewise.
10387         (type_promotes_to): Likewise.
10388         * decl.c (check_for_uninitialized_const_var): New function.
10389         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
10390         (cp_finish_decl): Use check_for_uninitialized_const_var.
10391         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
10392         handle `restrict'.
10393         (grok_ctor_properties): Likewise.
10394         (grok_op_properties): Likewise.
10395         (start_function): Likewise.
10396         (rever_static_member_fn): Likewise.
10397         * decl2.c (grok_method_quals): Likewise.
10398         (grokfield): Likewise.
10399         * error.c (dump_readonly_or_volatile): Rename to ...
10400         (dump_qualifiers): New function.  Handle `restrict'.
10401         (dump_type_real): Use it.
10402         (dump_aggr_type): Likewise.
10403         (dump_type_prefix): Likewise.
10404         (dump_type_suffix): Likewise.
10405         (dump_function_decl): Likewise.
10406         (cv_as_string): Likewise.
10407         * gxx.gperf: Add __restrict and __restrict__.
10408         * gxxint.texi: Document `u' as used for `__restrict', and a few
10409         other previously undocumented codes.
10410         * hash.h: Regenerated.
10411         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
10412         (build_member_call): Likewise.
10413         (build_new_1): Likewise.
10414         * lex.c (init_parse): Add entry for RID_RESTRICT.
10415         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
10416         (cp_type_qual_from_rid): Define.
10417         * lex.h (enum rid): Add RID_RESTRICT.
10418         * method.c (process_modifiers): Deal with `restrict'.
10419         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
10420         * parse.c: Regenerated.
10421         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
10422         (tsubst_aggr_type): Likewise.
10423         (tsubst): Likewise.
10424         (check_cv_quals_for_unify): Likewise.
10425         (unify): Likewise.
10426         * rtti.c (init_rtti_processing): Likewise.
10427         (build_headof): Likewise.
10428         (get_tinfo_var): Likewise.
10429         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
10430         (expand_class_desc): Likewise.
10431         (expand_attr_desc): Likewise.
10432         (synthesize_tinfo_fn): Likewise.
10433         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
10434         (get_matching_virtual): Likewise.
10435         (expand_upcast_fixups): Likewise.
10436         * sig.c (build_signature_pointer_or_reference_name): Take
10437         type_quals, not constp and volatilep.
10438         (build_signature_pointer_or_reference_type): Likewise.
10439         (match_method_types): More CP_TYPE_QUALS conversion, etc.
10440         (build_signature_pointer_constructor): Likewise.
10441         (build_signature_method_call): Likewise.
10442         * tree.c (build_cplus_array_type): Likewise.
10443         (cp_build_type_variant): Rename to ...
10444         (cp_build_qualified_type): New function.  Deal with `__restrict'.
10445         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
10446         (build_exception_variant): Likewise.
10447         (mapcar): Likewise.
10448         * typeck.c (qualif_type): Likewise.
10449         (common_type): Likewise.
10450         (comptypes): Likewise.
10451         (comp_cv_target_types): Likewise.
10452         (at_least_as_qualified_p): Define.
10453         (more_qualified_p): Likewise.
10454         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
10455         (compparms): Likewise.
10456         (inline_conversion): Likewise.
10457         (string_conv_p): Likewise.
10458         (build_component_ref): Likewise.
10459         (build_indirect_ref): Likewise.
10460         (build_array_ref): Likewise.
10461         (build_unary_op): Likewise.
10462         (build_conditional_expr): Likewise.
10463         (build_static_cast): Likewise.
10464         (build_c_cast): Likewise.
10465         (build_modify_expr): Likewise.
10466         (convert_For_assignment): Likewise.
10467         (comp_ptr_ttypes_real): Likewise.
10468         (cp_type_quals): New function.
10469
10470 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
10471
10472         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
10473         (CP_TYPE_VOLATILE): Likewise.
10474         * decl.c (grokdeclarator): Use them.
10475         * tree.c (canonical_type_variant): Likewise.
10476
10477 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10478
10479         * parse.y (named_class_head): Push into class while parsing the
10480         base class list.
10481         * decl2.c (push_scope, pop_scope): New functions.
10482         * cp-tree.h: Declare them.
10483         * init.c (build_new_1): Delay cleanup until end of full expression.
10484
10485 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
10486
10487         * typeck.c (build_component_ref): Use of a type here is an error.
10488
10489 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
10490
10491         Revamp references to member functions.
10492         * method.c (hack_identifier): Call build_component_ref for a
10493         reference to a member function.
10494         * typeck.c (build_component_ref): Only return a single function
10495         if it's static.  Otherwise, return a COMPONENT_REF.
10496         (build_x_function_call): Handle a COMPONENT_REF.
10497         (build_unary_op): Handle all unknown-type things.
10498         * decl2.c (arg_assoc): Handle COMPONENT_REF.
10499         * class.c (instantiate_type): Complain if the function we get is a
10500         nonstatic member function.  Remove code for finding "compatible"
10501         functions.
10502         * pt.c (tsubst_copy): Handle NOP_EXPR.
10503         * tree.c (build_dummy_object): New fn.
10504         (maybe_dummy_object): New fn.
10505         (is_dummy_object): New fn.
10506         * cp-tree.h: Declare them.
10507         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
10508         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
10509         * init.c (build_member_call): Use maybe_dummy_object and
10510         is_dummy_object.
10511         (build_offset_ref): Use maybe_dummy_object.
10512         (resolve_offset_ref): Use is_dummy_object.
10513         * typeck.c (build_x_function_call): Call build_dummy_object.
10514         (unary_complex_lvalue): Call is_dummy_object.
10515
10516         * typeck.c (build_component_addr): Make sure field is a field.
10517
10518         * call.c (build_new_op): Delete obsolete code.
10519
10520         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
10521
10522 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10523
10524         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
10525         std if std is ignored.
10526
10527 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
10528
10529         * decl.c (grokvardecl): Fix thinko.
10530
10531         * decl.c (grokdeclarator): Embedded attrs bind to the right,
10532         not the left.
10533
10534         * parse.y (fn.def2): Fix 'attrs' format.
10535
10536 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
10537
10538         * Makefile.in (CONFLICTS): Update.
10539         * parse.y (expr_or_declarator_intern): New rule.
10540         (expr_or_declarator, direct_notype_declarator, primary,
10541         functional_cast): Use it.
10542         (notype_declarator_intern): New rule.
10543         (notype_declarator, complex_notype_declarator): Use it.
10544
10545 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
10546
10547         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
10548         (grokvardecl): Likewise.
10549
10550 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10551
10552         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
10553         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
10554
10555         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
10556
10557         * pt.c (process_partial_specialization): Cast 1st argument of
10558         `bzero' to (PTR).
10559
10560         * tree.c (build_base_fields): Cast `base_align' to (int) when
10561         comparing against one.
10562
10563 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
10564
10565         * decl.c (lookup_name_real): Handle template parameters for member
10566         templates where said parameters have the same name as the
10567         surrounding class.
10568
10569         * decl.c (expand_static_init): Build cleanups before entering the
10570         anonymous function used to do them to avoid access-checking
10571         confusion.
10572
10573         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
10574         accidentally removed by previous change, and make DECL_RTL here.
10575         * class.c (add_method): Don't make DECL_RTL here.
10576
10577         * pt.c (for_each_template_parm): Don't examine uninstantiated
10578         default arguments.
10579
10580 1998-10-16  Dave Brolley  <brolley@cygnus.com>
10581
10582         * lex.c (real_yylex): Fix unaligned access of wchar_t.
10583
10584 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
10585
10586         * class.c (add_method): Fix documentation to reflect previous
10587         changes.  Check for duplicate method declarations here.
10588         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
10589         correctly; such things never match.
10590         (grokfndecl): Don't look for duplicate methods here.
10591         * decl2.c (check_classfn): Don't assume names are mangled.
10592         Don't add bogus member function declarations to a class before the
10593         class type is complete.
10594         (grokfield): Reformat error message.
10595         * method.c (set_mangled_name_for_decl): Don't mangle names while
10596         processing_template_decl.
10597
10598 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
10599
10600         * typeck.c (build_indirect_ref): Complain about a pointer to data
10601         member, too.
10602         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
10603         data member.
10604         * init.c (resolve_offset_ref): Don't undo the above.
10605
10606         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
10607         (struct lang_decl_flags): Add `bitfield'.
10608         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
10609         DECL_BIT_FIELD.
10610         * decl2.c (grokbitfield, grok_alignof): Likewise.
10611         * init.c (build_offset_ref): Likewise.
10612         * typeck.c (build_component_addr, expr_sizeof): Likewise.
10613         * cvt.c (build_up_reference): Don't crash if taking the address
10614         returns error_mark_node.
10615
10616         * decl.c (grokfndecl): Also check ctype when checking for ::main().
10617
10618 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
10619
10620         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
10621         Do mangling here.
10622         (grokdeclarator): Instead of here.
10623         * friend.c (do_friend): Lose special handling of ::main and
10624         __builtin_*.
10625         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
10626
10627         * spew.c (yylex): Clear looking_for_typename if we got
10628         'enum { ... };'.
10629
10630 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
10631
10632         * class.c (maybe_warn_about_overly_private_class): Improve error
10633         messages for class with only private constructors.
10634
10635         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
10636         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
10637         (build_typename_type): New function.
10638         * decl.c (build_typename_type): Broken out from ...
10639         (make_typename_type): Use it.
10640         * search.c (lookup_field): Likewise.
10641
10642 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10643
10644         * pt.c (convert_nontype_argument): Check against type_referred_to.
10645         * decl.c (grokvardecl): Check for declarator name before building
10646         DECL_ASSEMBLER_NAME.
10647
10648 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
10649
10650         * pt.c (lookup_template_class): Add comment.
10651         (instantiate_class_template): Don't mark the _TYPE node for
10652         member class templates as an instantiation.
10653
10654 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
10655
10656         * decl.c (grokfndecl): Fix my thinko.
10657
10658 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
10659
10660         * tinfo2.cc (fast_compare): Remove.
10661         (before): Just use strcmp.
10662         * tinfo.cc (operator==): Just use strcmp.
10663
10664 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
10665
10666         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
10667         declarations.
10668
10669 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
10670
10671         * cp-tree.h (specializations_of_same_template_p): Remove.
10672         * search.c (get_template_base): Don't use it.
10673         (get_template_base_recursive): Likewise.
10674         * pt.c (specializations_of_same_template_p): Remove.
10675         (unify): Don't use it.
10676         (lookup_template_class): Find the correct parent when setting
10677         CLASSTYPE_TI_TEMPLATE.
10678
10679 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
10680
10681         * tinfo.cc (operator==): Always compare names.
10682
10683 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
10684
10685         * decl.c (start_function): Fix cut-and-paste error.
10686
10687 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
10688
10689         * inc/typeinfo: Add #pragma interface.
10690         (operator!=): Just call operator==.
10691         * tinfo.cc: Add #pragma implementation.
10692         (operator==): Move from inc/typeinfo and tinfo2.cc.
10693         Check __COMMON_UNRELIABLE instead of _WIN32.
10694
10695         * typeck2.c (my_friendly_abort): Add URL.
10696
10697 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
10698
10699         * decl.c (start_method): Added extra parameter for attributes.
10700         * cp-tree.h (start_method): Update prototype.
10701         * parse.y (fn.def2): Update start_method parameter list.
10702
10703 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
10704
10705         * cp-tree.h (specializations_of_same_template_p): Declare.
10706         * pt.c (specializations_of_same_template_p): New function.
10707         (unify): Use it.
10708         * search.c (get_template_base): Use it.
10709         (get_template_base_recursive): Likewise.
10710
10711 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
10712
10713         * decl2.c (start_objects): Add new variable `joiner' and
10714         initialize it properly.
10715
10716 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
10717
10718         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
10719         change to vtable types.
10720
10721         * cvt.c (ocp_convert): Avoid infinite recursion caused by
10722         1998-10-03 change.
10723
10724 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
10725
10726         * pt.c (resolve_overloaded_unification): New fn.
10727         (try_one_overload): Likewise.
10728         (unify): Don't fail on unknown type.
10729         (type_unification_real): Likewise.  Use resolve_overloaded_unification
10730         to handle an overloaded argument.
10731         (template_args_equal): Split out...
10732         (comp_template_args): From here.
10733         (determine_specialization): Also allow a template with more
10734         parms than were explicitly specified.
10735         * cp-tree.h: Add template_args_equal.
10736         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
10737
10738 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
10739
10740         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
10741         change.
10742
10743 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
10744
10745         * typeck.c (unsigned_type): Only return TItype nodes when
10746         HOST_BITS_PER_WIDE_INT is >= 64 bits.
10747         (signed_type): Likewise.
10748         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
10749         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
10750         (init_decl_processing): Only create TItype nodes when
10751         HOST_BITS_PER_WIDE_INT is >= 64 bits.
10752         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
10753         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
10754
10755 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10756
10757         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
10758         (gxx.gperf): Update comments describing invocation flags.
10759         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
10760
10761 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
10762
10763         * class.c (finish_struct_1): Add commentary on previous change.
10764
10765         * cp-tree.h (vtbl_ptr_type_node): New variable.
10766         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
10767         already of the right type.
10768         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
10769         Simplify code to grow vtable.
10770         * decl.c (vtbl_ptr_type_node): Define.
10771         (init_decl_processing): Initialize it.
10772
10773 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
10774
10775         * cp-tree.def (PTRMEM_CST): New tree node.
10776         * cp-tree.h (ptrmem_cst): New type.
10777         (lang_type): Remove local_typedecls.
10778         (dummy): Increase to 12 bits from 11.
10779         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
10780         (PTRMEM_CST_CLASS): New macro.
10781         (PTRMEM_CST_MEMBER): Likewise.
10782         (current_access_specifier): New variable.
10783         (current_class_type): Remove duplicate declaration.
10784         (finish_struct): Change prototype.
10785         (unreverse_member_declarations): New function.
10786         (pushdecl_class_level): Change prototype.
10787         (grok_enum_decls): Remove.
10788         (fixup_anonymous_union): New function.
10789         (grok_x_components): Change prototype.
10790         (tsubst_chain): Remove.
10791         (finish_member_template_decl): Likewise.
10792         (check_explicit_specialization): Fix indentation.
10793         (finish_class_definition): Change prototype.
10794         (finish_member_class_template): Likewise.
10795         (finish_member_declaration): New function.
10796         (check_multiple_declarators): Likewise.
10797         * class.c (class_stack_node_t): New type.
10798         (current_class_base): Remove.
10799         (current_class_stack): Change type.
10800         (current_access_specifier): New variable.
10801         (grow_method): Remove.
10802         (check_member_decl_is_same_in_complete_scope): Break out from
10803         finish_struct.
10804         (make_method_vec): New function.
10805         (free_method_vec): Likewise.
10806         (add_implicitly_declared_members): Break out from finish_struct_1.
10807         (free_method_vecs): New variable.
10808         (add_method): Rework for direct use from parser.
10809         (handle_using_decl): Watch for NULL_TREE while iterating through
10810         CLASSTYPE_METHOD_VEC.
10811         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
10812         just do some error-checking.
10813         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
10814         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
10815         (finish_struct): Change prototype.  Simplify; fields and methods
10816         are already set up at this point.
10817         (init_class_processing): Set up current_class_stack.
10818         (pushclass): Save current_access_specifier.
10819         (popclass): Restore it.
10820         (currently_open_class): Simplify.
10821         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
10822         * decl.c (saved_scope): Add access_specifier.
10823         (maybe_push_to_top_level): Save it.
10824         (pop_from_top_level): Restore it.
10825         (maybe_process_template_type_declaration): Use
10826         finish_member_declaration.
10827         (pushtag): Likewise.
10828         (pushdecl_class_level): Don't return a value.
10829         (fixup_anonymous_union): Break out from grok_x_components.
10830         (shadow_tag): Use it.
10831         (xref_tag): Complain about using an elaborated type specifier to
10832         reference a template type parameter or typedef name.
10833         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
10834         (current_local_enum): Remove.
10835         (build_enumerator): Call finish_member_declaration.
10836         (grok_enum_decls): Remove.
10837         * decl2.c (grok_x_components): Simplify.
10838         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
10839         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
10840         (merge_functions): Add to comment.
10841         (arg_assoc_type): Prototype.
10842         (arg_assoc): Pass as many arguments as there are parameters.
10843         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
10844         OFFSET_REF.
10845         * expr.c (cpls_expand_expr): Remove dead code.  Handle
10846         PTRMEM_CST.
10847         * friend.c (do_friend): Lookup friends when in nested classes.
10848         Change comments.
10849         * init.c (build_offset_ref): Do lookup even for classes that are
10850         only partially defined.
10851         (decl_constant_value): Remove dead code.
10852         * method.c (build_overload_value): Remove hack where by TYPE was
10853         not a TYPE.  Handle PTRMEM_CST.
10854         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
10855         should go.
10856         * parse.y (components, notype_components, component_decl,
10857         component_decl_1, component_declarator, component_declarator0):
10858         Now all are itype rather than ttype.  Rework to add members to
10859         classes on the fly.
10860         (typesqpecqual_reserved): Use check_multiple_declarators.
10861         (structsp): Update class to finish_class_definition.
10862         (do_xref_defn): Unsplit into named_class_head.
10863         (access_specifier): Set current_access_specifier.
10864         * pt.c (set_current_access_from_decl): New function.
10865         (finish_member_template_decl): Don't take the parameters.
10866         (comp_template_args): Make more robust.
10867         (lookup_template_class): Don't use current_local_enum.
10868         (for_each_template_parm): Handle PTRMEM_CST.
10869         (instantiate_class_template): Use set_current_access_from_decl,
10870         finish_member_declaration and unreverse_member_declarations.  Set
10871         lineno/input_filename before generating implicit member functions.
10872         (type_unification_real): Don't assume back-unification happens
10873         only for the last argument.
10874         (regenerate_decl_from_template): Call pushclass a bit earlier.
10875         (tsubst_chain): Remove.
10876         (tsubst_enum): Use set_current_access_from_decl.
10877         (set_mangled_name_for_template_decl): Fix indentation.
10878         * search.c (lookup_fnfields_1): Change iteration through
10879         CLASSTYPE_METHOD_VEC.
10880         (dfs_pushdecls): Likewise.
10881         (dfs_compress_decls): Likewise.
10882         (add_conversions): Likewise.
10883         * semantics.c (finish_class_definition): Don't take components.
10884         Change call to finish_struct.
10885         (finish_member_declaration): New function.
10886         (finish_member_class_template): Don't take template parameters.
10887         Change call to grok_x_components.  Call finish_member_template_decl.
10888         (check_multiple_declarators): New function.
10889         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
10890         a passed in fieldlist.
10891         * tree.c (search_tree): Handle PTRMEM_CST.
10892         (mapcar): Likewise.
10893         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
10894         INTEGER_CSTs, for pointer-to-data members.
10895
10896         * call.c (resolve_args): Resolve template specializations, if
10897         possible.
10898
10899 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10900
10901         * Makefile.in (spew.o): Depend on toplev.h.
10902
10903         * call.c (compare_ics): Initialize variables `deref_from_type2',
10904         `deref_to_type1' and `deref_to_type2'.
10905
10906         * except.c (get_eh_type): Hide prototype and definition.
10907         (process_start_catch_block_old): Remove unused static prototype.
10908
10909         * pt.c (tsubst_decl): Initialize variable `argvec'.
10910
10911         * spew.c: Include toplev.h.
10912
10913 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
10914
10915         * pt.c (instantiate_decl): Do save and restore file position.
10916
10917 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10918
10919         * method.c (build_decl_overload_real): Clear
10920         numeric_output_need_bar after __.
10921
10922 1998-10-05  Nathan Sidwell  <nathan@acm.org>
10923
10924         * call.c (build_new_method_call): Issue 'incomplete type' error,
10925         if class is not defined.
10926
10927 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10928
10929         * call.c (build_object_call): Move declaration of variable
10930         `fn' into the scope where it is used.  Don't access variable
10931         `fn' when it is uninitialized, instead use `fns'.
10932
10933 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10934
10935         * errfn.c (cp_thing): Print buf as a string not as a printf format
10936         to avoid problems with the operator%.  Consequently, `%%' sequences
10937         in format are copied as `%' in buf.
10938
10939 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
10940
10941         * pt.c (pop_tinst_level): Call extract_interface_info.
10942         (instantiate_decl): Don't save and restore file position.
10943
10944         * decl.c (cp_finish_decl): Make statics in extern inlines and
10945         templates common, if possible and the target doesn't support weak
10946         symbols.
10947
10948         * decl.c (grokdeclarator): Remove redundant calls to
10949         build_type_variant and some duplicated code.
10950         * sig.c (build_signature_reference_type): Only take the type parm.
10951         (build_signature_pointer_type): Likewise.
10952         * tree.c (build_cplus_method_type): Adjust.
10953         * cp-tree.h: Update.
10954
10955 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
10956
10957         * call.c (build_over_call): Make pedwarns about dropped qualifiers
10958         into full-fledged errors.
10959         * cvt.c (convert_to_reference): Likewise.
10960         * typeck.c (convert_for_assignment): Likewise.
10961
10962         * search.c (expand_upcast_vtables): In addition to unsetting
10963         TREE_READONLY, remove top-level const type qualifier.
10964
10965 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
10966
10967         * class.c (current_class_ptr, current_class_ref): Clarify
10968         documentation.
10969         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
10970         NOP type conversions.
10971         * decl.c (decls_match): Use comptypes directly; ignore
10972         qualifiers on the DECL.
10973         (duplicate_decls): Remove qualifier checks on DECL.
10974         (grokdeclarator): Make the type built up include top-level
10975         qualifiers.
10976         * decl2.c (do_dtors): Fix spelling error.
10977         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
10978         when printing type information.
10979         * init.c (build_new_1): Add documentation.  Deal with the fact
10980         that type of allocated memory now contains qualifiers.
10981         * lex.c (is_global): Improve error-recovery.
10982         * sig.c (build_member_function_pointer): Don't cast away const
10983         on fields of sigtable_entry_type.
10984         * tree.c (lvalue_type): Don't look at top-level qualifiers on
10985         expressions.
10986         * typeck.c (decay_conversion): Likewise.
10987         (build_component_ref): Make sure the type of the COMPONENT_REF
10988         contains top-level qualifiers, as appropriate.  Improve
10989         error-handling.
10990         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
10991         (build_array_ref): Likewise.
10992         (build_unary_op): Improve error-recovery.
10993         (unary_complex_lvalue): Make taking the address a bound member
10994         function an error, not a sorry.
10995         (build_conditional_expr): Look at the type qualifiers, not the
10996         qualifiers on the expression itself.
10997
10998 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
10999
11000         * decl2.c (merge_functions): Remove duplicates.
11001
11002         * decl2.c: Add -f{no-,}implicit-inline-templates.
11003         (import_export_decl): Check it.
11004
11005         * decl.c (lookup_name_real): Template parms also take precedence
11006         over implicit typename.  Only warn if yylex.
11007
11008         * typeck.c (build_conditional_expr): Only fold if ifexp is an
11009         INTEGER_CST.
11010
11011         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
11012         instead of linkage.
11013
11014 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
11015
11016         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
11017         * class.c (build_vbase_pointer): Use it.
11018         * rtti.c (expand_class_desc): Likewise.
11019         * tree.c (build_vbase_pointer_fields): Likewise.
11020
11021 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
11022
11023         * decl.c (start_decl): Add invocation of
11024         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
11025         (start_function): Add invocation of
11026         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
11027
11028         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
11029         HANDLE_GENERIC_PRAGMAS.
11030
11031 1998-09-28  Anthony Green  <green@cygnus.com>
11032
11033         * semantics.c (finish_asm_stmt): Always permit volatile asms.
11034
11035 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
11036
11037         * decl.c (grokdeclarator): Tighten checks for invalid
11038         destructors.  Improve error-messages and error-recovery.
11039         * decl2.c (check_classfn): Don't assume that mangled destructor
11040         names contain type information.
11041
11042 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
11043
11044         * search.c (get_base_distance): Remove assert.
11045
11046         * decl2.c (build_anon_union_vars): Don't process a field with no
11047         name.
11048         (finish_anon_union): Also complain about local anon unions with no
11049         members.
11050
11051 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11052
11053         * decl.c (lookup_namespace_name): If the name is a namespace,
11054         return it immediately.
11055
11056 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11057
11058         * cp-tree.h (define_case_label): Remove unused parameter.
11059         (check_java_method): Likewise.
11060         (grokclassfn): Likewise.
11061         (expand_aggr_init): Likewise.
11062         (build_x_delete): Likewise.
11063         (maybe_end_member_template_processing): Likewise.
11064         (unshare_base_binfos): Add prototype.
11065         (string_conv_p): Likewise.
11066         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
11067
11068         * cvt.c (build_up_reference): Remove unused parameter
11069         `checkconst', all callers changed.
11070         (build_type_conversion): Mark parameter `code' with
11071         ATTRIBUTE_UNUSED.
11072         (build_expr_type_conversion): Initialize variable `conv'.
11073
11074         * decl.c (push_namespace): Initialize variable `d'.
11075         (define_case_label): Remove unused parameter `decl', all callers
11076         changed.
11077
11078         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
11079         `argc' with ATTRIBUTE_UNUSED.
11080         (grokclassfn): Remove unused parameter `cname', all callers
11081         changed.
11082         (check_java_method): Likewise for parameter `ctype'.
11083         (copy_assignment_arg_p): Mark parameter `virtualp' with
11084         ATTRIBUTE_UNUSED.
11085         (finish_prevtable_vardecl): Likewise for parameter `prev'.
11086
11087         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
11088
11089         * init.c (expand_aggr_init_1): Remove unused parameter
11090         `alias_this', all callers changed.
11091         (expand_aggr_init): Likewise.
11092         (expand_default_init): Likewise.
11093         (build_new_1): Initialize variable `susp'.
11094         (build_x_delete): Remove unused parameter `type', all callers
11095         changed.
11096
11097         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
11098         ATTRIBUTE_UNUSED.
11099         (readescape): Use (unsigned) value in shift.
11100         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
11101         comparing to a signed quantity.
11102
11103         * pt.c (maybe_end_member_template_processing): Remove unused
11104         parameter `decl', all callers changed.
11105         (check_explicit_specialization): Add braces around empty body in
11106         an else-statement.
11107         (current_template_args): Initialize variable `args'.
11108         (lookup_template_class): Likewise for variable `prev_local_enum'.
11109         (tsubst_decl): Likewise for variable `r'.
11110         (set_mangled_name_for_template_decl): Initialize variable
11111         `context'.
11112
11113         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
11114         Likewise for variable `i'.
11115         (yylex): Initialize variable `trrr'.
11116
11117         * typeck.c (compparms): Mark variable `strict' with
11118         ATTRIBUTE_UNUSED.
11119
11120         * xref.c (simplify_type): Cast argument of ctype function to
11121         `unsigned char'.
11122
11123 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
11124
11125         * cp-tree.h (language_lvalue_valid): Remove.
11126         * decl.c (grokdeclarator): Don't disallow references to functions.
11127         * tree.c (lvalue_p_1): New function, combining duplicated
11128         code from ...
11129         (lvalue_p): Use it.
11130         (real_lvalue_p): Likewise.
11131         * typeck.c (language_lvalue_valid): Remove.
11132         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
11133         they don't have TREE_READONLY set.
11134         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
11135
11136 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11137
11138         * spew.c (yylex): Give diagnostic.
11139         * hash.h (is_reserved_word): Add export.
11140         * gxx.gperf: Likewise.
11141         * lex.h (rid): Add RID_EXPORT.
11142         * lex.c (init_parse): Likewise.
11143
11144 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
11145
11146         * friend.c (do_friend): Make warning a full sentence.
11147
11148 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
11149
11150         * parse.y (component_decl_list): Improve error-recovery.
11151
11152 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11153
11154         * decl.c (make_typename_type): Move error to point where name
11155         variable can be used by dump_type.
11156
11157 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
11158
11159         * decl.c (grokfndecl): Improve error-recovery.
11160         * decl2.c (grokfield): Likewise.
11161         * pt.c (finish_member_template_decl): Likewise.
11162
11163 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11164
11165         * method.c (hack_identifier): Finding multiple members is always
11166         an error.
11167
11168 1998-09-21  Per Bothner  <bothner@cygnus.com>
11169
11170         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
11171
11172 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
11173
11174         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
11175
11176 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
11177
11178         * class.c (maybe_warn_about_overly_private_class): Reformat.
11179
11180 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
11181
11182         * exception.cc (__cplus_type_matcher): Realign some code.
11183
11184 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
11185
11186         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
11187         (tinfo2.o): Likewise.
11188         (exception.o): Likewise.
11189         (new.o): Likewise.
11190         (opnew.o): Likewise.
11191         (opnewnt.o): Likewise.
11192         (opvnew.o): Likewise.
11193         (opvnewnt.o): Likewise.
11194         (opdel.o): Likewise.
11195         (opdelnt.o): Likewise.
11196         (opvdel.o): Likewise.
11197         (opvdelnt.o): Likewise.
11198
11199 1998-09-16  Richard Henderson  <rth@cygnus.com>
11200
11201         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
11202
11203 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
11204
11205         * call.c (build_field_call): Handle static data members too.
11206
11207         * typeck.c (comptypes): When comparing pointer types, check
11208         whether referred types match even in strictest modes.
11209
11210 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
11211
11212         * cp-tree.h: Revert previous change.
11213         (finish_struct_methods): Remove declaration.
11214         * class.c: Revert previous change.
11215         (maybe_warn_about_overly_private_class): New function.
11216         (finish_struct_methods): Declare here, and make static.  Remove
11217         unnecessary parameters.  Tidy slightly.  Use
11218         maybe_warn_about_overly_private_class.
11219         (finish_struct_1): Adjust.  Remove check for private constructors,
11220         now done elsewhere.
11221         (finish_struct): Adjust.
11222
11223 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
11224
11225         * except.c (expand_start_catch_block): No need to check for new
11226         exception model.
11227         (process_start_catch_block_old): Deleted.
11228         (process_start_catch_block): Add call to start_decl_1().
11229         (expand_end_catch_block): Add call to end_catch_handler().
11230         * exception.cc (__cplus_type_matcher): Only check the exception
11231         language if there is an exception table.
11232
11233 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
11234
11235         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
11236         as used to prevent conflicts with virtual function tables.
11237
11238 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
11239
11240         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
11241         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
11242         * class.c (maybe_class_too_private_p): New function.
11243         (finish_struct_methods): Use it.
11244         (finish_struct_1): Likewise.
11245         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
11246         appropriate.
11247
11248         * pt.c (check_specialization_scope): Fix spelling error.
11249         (check_explicit_specialization): Remove code to handle explicit
11250         specializations in class scope; they are now correctly diagnosed
11251         as errors.
11252
11253 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
11254
11255         * decl.c (pushdecl): Don't copy types if the
11256         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
11257         type.
11258
11259 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
11260
11261         * class.c (get_enclosing_class): New function.
11262         (is_base_of_enclosing_class): Likewise.
11263         * cp-tree.h (get_enclosing_class): Declare.
11264         (is_base_of_enclosing_class): Likewise.
11265         * pt.c (coerce_template_parms): Use them.
11266
11267 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
11268
11269         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
11270         null to decide whether to use it.
11271
11272         * error.c (dump_type_real): Handle NAMESPACE_DECL.
11273         * parse.y (base_class.1): Avoid crash on error.
11274
11275 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11276
11277         * decl.c (make_typename_type): If context is a namespace, the code
11278         is in error.
11279
11280 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
11281
11282         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
11283
11284 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
11285
11286         * cp-tree.h (anonymous_namespace_name): Declare.
11287         * decl.c: Define it.
11288         (push_namespace): Use anonymous_namespace_name, rather than local
11289         static anon_name.
11290         * error.c (dump_decl): If a namespace is named
11291         anonymous_namespace_name, call it {anonymous}.
11292
11293         * decl.c (grokparms): Distinguish between references and pointers
11294         in error message.
11295
11296 1998-09-08  Richard Henderson  <rth@cygnus.com>
11297             Mark Mitchell  <mark@markmitchell.com>
11298
11299         * pt.c (process_partial_specialization): Consistently allocate
11300         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
11301         tpd.parms, where appropriate.
11302
11303 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
11304
11305         * Makefile.in (INCLUDES): Update after recent toplevel gcc
11306         reorganizations.
11307
11308 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
11309
11310         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
11311         * class.c (finish_struct): Remove hackery to deal with explicit
11312         specializations in class scope.
11313         * decl.c (grokfndecl): Improve error-recovery.
11314         * decl2.c (grokfield): Likewise.
11315         * pt.c (check_specialization_scope): New function.
11316         (begin_specialization): Call it.
11317         (process_partial_specialization): New function, split out from
11318         push_template_decl.  Check partial specializations more
11319         stringently.
11320         (push_template_decl): Call it.
11321         (check_explicit_specialization): Don't attempt to handle explicit
11322         specializations in class scope.
11323         (template_parm_data): Document.  Add current_arg and
11324         arg_uses_template_parms.
11325         (mark_template_parm): Set it.
11326         (tsubst_arg_types): Remove unused variable.
11327         * semantics.c (begin_class_definition): Tweak.
11328
11329 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
11330
11331         * inc/typeinfo (type_info::type_info(const char*)): Make
11332         `explicit'.
11333
11334         * cp-tree.h (hash_tree_cons_simple): New macro.
11335         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
11336         (coerce_template_parms): Use make_temp_vec, instead of
11337         make_tree_vec.  Document this behavior.
11338         (lookup_template_class): Likewise.
11339         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
11340         Remove dead code (and add assertion to check its deadness).  Fix
11341         bug w.r.t. exception specifications.
11342
11343 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
11344
11345         * decl2.c (import_export_vtable): Always make artificials comdat.
11346         (import_export_decl): Likewise.
11347         * pt.c (mark_decl_instantiated): Likewise.
11348
11349 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
11350
11351         * cp-tree.h (finish_globally_qualified_member_call_expr):
11352         Rename to ...
11353         (finish_qualified_call_expr).
11354         * semantics.c: Likewise.
11355         * parse.y (primary): Use it.
11356         * method.c (hack_identifier): Remove redundant code.
11357
11358         * init.c (resolve_offset_ref): Call convert_from_reference to
11359         handle members of reference type.  Improve error recovery.
11360
11361 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
11362
11363         * cp-tree.h: Declare warn_nontemplate_friend.
11364         * decl2.c (lang_decode_option): Set.
11365         * lang-options.h: Add -Wnon-template-friend.
11366         * friend.c (do_friend): Use to toggle non-template function warning.
11367
11368 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
11369
11370         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
11371         corresponding INTEGER_CSTs when processing_template_decl.
11372         * pt.c (tsubst_enum): Tweak accordingly.
11373
11374 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11375
11376         * decl.c (pushdecl_class_level): Add warning here.
11377         (pushdecl): Tweak.
11378
11379 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
11380
11381         * cvt.c (convert_pointer_to_real): Tidy.
11382         * search.c (get_base_distance_recursive): Simplify.
11383         (get_base_distance): Likewise.
11384
11385         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
11386         parms.
11387
11388 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
11389
11390         * lex.c (check_newline):  Call HANDLE_PRAGMA before
11391         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
11392         if unknown pragmas are encountered.
11393         (handle_sysv_pragma): Interpret return code from
11394         handle_pragma_token ().  Return success/failure indication rather
11395         than next unprocessed character.
11396         (pragma_getc): New function: retrieves characters from the
11397         input stream.  Defined when HANDLE_PRAGMA is defined.
11398         (pragma_ungetc): New function: replaces characters back into the
11399         input stream.  Defined when HANDLE_PRAGMA is defined.
11400
11401 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
11402
11403         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
11404         * class.c (build_vtable_entry_ref): Likewise.
11405
11406 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
11407
11408         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
11409         * decl2.c (import_export_decl): Likewise.
11410         * pt.c (instantiate_decl): Use it.
11411
11412 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
11413
11414         * decl.c (lookup_name_real): Also do implicit typename thing for
11415         artificial TYPE_DECLs.
11416         * search.c (lookup_field): Likewise.
11417         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
11418         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
11419         (enter_scope_of): Extract type from implicit typename.
11420         (begin_class_definition): Likewise.
11421         * lex.c (identifier_type): Handle implicit typename when checking
11422         for SELFNAME.
11423
11424         * cp-tree.h: Declare flag_strict_prototype.
11425         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
11426         -fstrict-prototype.
11427         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
11428         specified, set it to the value of pedantic.
11429
11430 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
11431
11432         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
11433
11434 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
11435
11436         * decl.c (finish_enum): Handle member enums of classes declared in
11437         template functions.
11438
11439         * decl2.c (grok_x_components): Strip attributes before calling
11440         groktypename.
11441
11442 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
11443
11444         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
11445         -fenum-int-equivalence and -fno-nonnull-objects.
11446         * class.c (check_for_override): Remove support for -fall-virtual.
11447         (finish_struct_1): Likewise.
11448         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
11449         * typeck.c (build_binary_op_nodefault): Likewise.
11450         * cvt.c (ocp_convert): Likewise.
11451         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
11452         * class.c (build_vbase_path): Likewise.
11453
11454 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
11455
11456         * Makefile.in (INTERFACE): New, set to 1.
11457
11458 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
11459
11460         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
11461         comparing with global_namespace.
11462         (dump_aggr_type): Likewise.
11463
11464         * decl.c (grokfndecl): Issue error on declaration of friend
11465         templates with explicit template arguments.
11466
11467         * pt.c (convert_template_argument): New function, split out
11468         from...
11469         (coerce_template_parms): Here.
11470         (tsubst): Attempt better error-recovery.
11471
11472 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11473
11474         * pt.c (decl_template_parm_p): Add checks for
11475         TEMPLATE_TEMPLATE_PARM.
11476
11477 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
11478
11479         * lex.c (do_identifier): Fix thinko in previous change.
11480
11481 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
11482
11483         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
11484         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
11485
11486 1998-08-28  Richard Henderson  <rth@cygnus.com>
11487
11488         Add support for discarding unused virtual functions.
11489         * lang-options.h: Add -fvtable-gc.
11490         * cp-tree.h: Add flag_vtable_gc.
11491         * decl2.c (output_vtable_inherit): New fn.
11492         (finish_vtable_vardecl): Call it.
11493         * class.c (build_vtable_entry_ref): New fn.
11494         (build_vtbl_ref): Call it.
11495
11496 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
11497
11498         * cp-tree.h (build_enumerator): Take the enumeration type as a
11499         parameter.
11500         * decl.c (finish_enum): Don't set the TREE_TYPE for the
11501         enumeration constant values if we're processing_template_decls.
11502         Don't set the type for the CONST_DECLs either; that's done in
11503         build_enumerator.
11504         (build_enumerator): Take the enumeration type as a
11505         parameter.
11506         * lex.c (do_identifier): Don't resolve enumeration constants while
11507         processing template declarations, even if they happen to be
11508         TEMPLATE_PARM_INDEXs.
11509
11510         * parse.y (current_enum_type): New variable.
11511         (primary): Don't allow statement-expression in local classes just
11512         as we don't in global classes.
11513         (structsp): Use current_enum_type.
11514         (enum_list): Likewise.
11515         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
11516         finish_enum; they no longer occur.
11517
11518         * cp-tree.h (finish_base_specifier): New function.
11519         * parse.y (base_class): Use it.
11520         * semantics.c (finish_base_specifier): Define it.
11521
11522         * parse.y (structsp): Warn on use of typename outside of template
11523         declarations.
11524
11525 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
11526
11527         * lex.c (handle_cp_pragma): Remove #pragma vtable.
11528         * lang-options.h: Remove +e options.
11529         * decl2.c (lang_decode_option): Likewise.
11530         (import_export_vtable): Don't check write_virtuals.
11531         (finish_vtable_vardecl, finish_file): Likewise.
11532         * search.c (dfs_debug_mark): Likewise.
11533         * semantics.c (begin_class_definition): Likewise.
11534         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
11535
11536         * call.c (build_over_call): Check flag_elide_constructors.
11537         * decl2.c: flag_elide_constructors defaults to 1.
11538         * typeck.c (convert_arguments): Remove return_loc parm.
11539         (build_function_call_real): Adjust.
11540
11541         * search.c: Tear out all mi_matrix and memoize code.
11542         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
11543         * lang-options.h: Remove documentation for -fhandle-exceptions,
11544         -fmemoize-lookups and -fsave-memoized.
11545         * cp-tree.h: Lose mi_matrix and memoize support.
11546         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
11547         * class.c: Lose struct class_level.
11548         (pushclass, popclass): Lose memoize support.
11549         * init.c (build_offset_ref): Likewise.
11550
11551         Never change BINFO_INHERITANCE_CHAIN.
11552         * init.c (emit_base_init): Change modification of
11553         BINFO_INHERITANCE_CHAIN to an assert.
11554         * search.c (get_base_distance_recursive): Likewise.
11555         (get_base_distance): Likewise.
11556         (lookup_member): Likewise.
11557         (convert_pointer_to_single_level): Likewise.
11558         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
11559         (lookup_fnfields): Likewise.
11560         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
11561         (unshare_base_binfos): Don't call propagate_binfo_offsets.
11562         (layout_basetypes): Call propagate_binfo_offsets instead of
11563         unshare_base_binfos.
11564         * decl.c (xref_basetypes): Call unshare_base_binfos.
11565         * pt.c (instantiate_class_template): Likewise.
11566         * tree.c (reverse_path): Remove 'copy' parm; always make a
11567         temporary copy.
11568         * class.c (build_vbase_path): Just call it.
11569         * search.c (compute_access): Likewise.  Don't re-reverse.
11570
11571 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
11572
11573         * class.c (build_vbase_path): Use reverse_path.
11574         (finish_base_struct): Move warnings for inaccessible bases to
11575         layout_basetypes.
11576         (modify_one_vtable): Remove check of TREE_USED (binfo).
11577         (fixup_vtable_deltas1): Likewise.
11578         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
11579         (xref_tag): Remove binfos parameter.
11580         (make_binfo): Remove chain parameter.
11581         (reverse_path): Add copy parameter.
11582         * decl.c (init_decl_processing): Change calls to xref_tag.
11583         (xref_tag): Remove binfos parameter.
11584         (xref_basetypes): Change calls to make_binfo.
11585         * decl2.c (grok_x_components): Change calls to xref_tag.
11586         (handle_class_head): Likewise.
11587         * friend.c (do_friend): Likewise.
11588         * lex.c (make_lang_type): Change calls to make_binfo.
11589         * parse.y (structsp): Change calls to xref_tag.
11590         (named_complex_class_head_sans_basetype): Likewise.
11591         (named_class_head): Likewise.
11592         * rtti.c (init_rtti_processing): Likewise.
11593         * search.c (compute_access): Change calls to reverse_path.
11594         (dfs_get_vbase_types): Change calls to make_binfo.
11595         (get_vbase_types): Remove dead code.
11596         * tree.c (unshare_base_binfos): Change calls to make_binfo.
11597         (layout_basetypes): Warn here about inaccessible bases.
11598         (make_binfo): Remove chain parameter.
11599         (reverse_path): Add copy parameter.
11600
11601 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
11602
11603         * class.c: #if 0 complete_type_p.
11604         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
11605         * method.c (process_overload_item): Likewise.
11606         * typeck.c (comp_target_types): Likewise.
11607
11608         Stop sharing binfos for indirect virtual bases.
11609         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
11610         (layout_basetypes): Likewise.
11611         (unshare_base_binfos): Copy vbases, too.
11612         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
11613         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
11614         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
11615         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
11616         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
11617         reference to BINFO_VIA_PUBLIC.
11618         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
11619         (push_class_decls): Use them.
11620         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
11621         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
11622
11623 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
11624
11625         * decl.c (build_enumerator): Set DECL_CONTEXT for the
11626         CONST_DECLs.
11627
11628 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
11629
11630         * cp-tree.h (finish_enum): Change prototype.
11631         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
11632         VALUES parameter.  Don't try to compute mins/maxs if
11633         processing_template_decl.
11634         * parse.y (structsp): Use new calling sequence for finish_enum.
11635         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
11636         (lookup_template_class): Remove unused variables.  Tweak.
11637         Register enums on instantiation list before substituting
11638         enumeration constants.
11639         (tsubst_decl): Remove unused variables.
11640         (regenerate_decl_from_template): Likewise.
11641
11642         * decl.c (duplicate_decls): Don't obliterate the
11643         DECL_TEMPLATE_INFO for a template if we're not replacing it with
11644         anything.
11645
11646         * lex.c (do_identifier): Fix typo in comment.
11647
11648 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11649
11650         * errfn.c: Remove stdarg.h/varargs.h.
11651         * tree.c: Likewise.
11652
11653 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
11654
11655         * pt.c (tsubst_copy): Only do typename overloading on an
11656         IDENTIFIER_NODE that happens to look like a typename if it actually
11657         has a type for us to use.
11658
11659 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
11660
11661         * typeck.c (comp_cv_target_types): Split out...
11662         (comp_target_types): From here.  Don't allow cv-qual changes under
11663         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
11664         (build_ptrmemfunc): Pass 1 to nptrs.
11665         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
11666
11667 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
11668
11669         * search.c (dependent_base_p): Don't compare a binfo to
11670         current_class_type; use the TREE_TYPE of the binfo instead.
11671
11672         * cp-tree.h (CLASS_TYPE_P): Revise definition.
11673
11674 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
11675
11676         * decl.c (duplicate_decls): Don't complain about different
11677         exceptions from an internal decl even if pedantic.
11678
11679         * typeck.c (convert_for_assignment): Converting from pm of vbase
11680         to derived is an error, not a sorry.
11681
11682         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
11683         * class.c (fixed_type_or_null): Rename from
11684         resolves_to_fixed_type_p.  Return the dynamic type of the
11685         expression, if fixed, or null.
11686         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
11687         does not match the static type.
11688         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
11689         resolves_to_fixed_type_p again.
11690
11691 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
11692
11693         * pt.c (tsubst_decl): Move special case code for dealing with
11694         tricky friend templates here from ...
11695         (regenerate_decl_from_template): Here.
11696
11697 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
11698
11699         * decl.c (start_decl): Remove redundant linkage check.
11700
11701 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
11702
11703         * typeck.c (c_expand_return): Handle the case that valtype
11704         is wider than the functions return type.
11705
11706 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
11707
11708         * cp-tree.h (CLASS_TYPE_P): New macro.
11709         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
11710         * pt.c (process_template_parm): Undo previous change.
11711
11712 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
11713
11714         * cp-tree.h: Declare.
11715         * pt.c (decl_template_parm_p): New function.
11716         * decl.c (pushdecl): Check decls for redeclaring template parms.
11717         (xref_tag): Make redeclaration an error, print decl.
11718         * decl2.c (grokfield): Check field_decls for redeclaration as well.
11719
11720 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
11721
11722         * parse.y (primary): Fix up the type of string constants.
11723
11724 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
11725
11726         * typeck.c (convert_for_initialization): Move check for odd uses
11727         of NULL to avoid duplicate warnings.
11728
11729 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
11730
11731         * tree.c (lvalue_type): Fix for arrays.
11732         * typeck.c (string_conv_p): New fn.
11733         (convert_for_assignment): Use it.
11734         (build_unary_op): Use lvalue_type.
11735         * call.c (standard_conversion, convert_like): Use string_conv_p.
11736         (add_function_candidate): Use lvalue_type.
11737         * cvt.c (convert_to_reference): Likewise.
11738         * decl2.c (lang_decode_option): Ignore -traditional.
11739         * decl.c (init_decl_processing): flag_writable_strings inhibits
11740         flag_const_strings.
11741
11742 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
11743
11744         * lang-options.h (lang_options): Add fconst-strings to the list
11745         of valid options.
11746         * decl2.c (lang_f_options, lang_decode_option): Likewise.
11747
11748 1998-08-24  Nathan Sidwell  <nathan@acm.org>
11749
11750         * lex.c (real_yylex): Don't warn about long long constants if
11751         we're allowing long long.
11752
11753 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11754
11755         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
11756         accessing bindings directly.
11757
11758         * search.c (my_tree_cons): Reimplement.
11759
11760         * lang-specs.h: Remove __HONOR_STD.
11761         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
11762
11763 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
11764
11765         * decl.c (grokdeclarator): Complain about in-class initialization
11766         of aggregates and/or references.
11767         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
11768         TEMPLATE_TYPE_PARMs.
11769
11770         * decl2.c (grok_array_decl): Add comment.
11771         (mark_used): Don't instantiate an explicit instantiation.
11772         * friend.c (make_friend_class): Remove bogus comment.  Fix check
11773         for partial specializations.
11774         * pt.c (check_explicit_specialization): Don't
11775         SET_DECL_EXPLICIT_INSTANTIATION here.
11776         (mark_decl_instantiated): Or here.
11777         (do_decl_instantiation): Do it here, instead.  Add checks for
11778         duplicate explicit instantiations, etc.  Tidy.
11779         (do_type_instantiation): Likewise.
11780         (instantiate_decl): Improve comments.  Complain about explicit
11781         instantiations where no definition is available.
11782
11783         * cp-tree.h (ansi_null_node): Remove.
11784         * call.c (build_over_call): Warn about converting NULL to an
11785         arithmetic type.
11786         * cvt.c (build_expr_type_conversion): Likewise.  Use
11787         null_ptr_cst_p instead of expanding it inline.
11788         * decl.c (ansi_null_node): Remove.
11789         (init_decl_processing): Make null_node always have integral type.
11790         * except.c (build_throw): Warn about converting NULL to an
11791         arithmetic type.
11792         * lex.c (init_parse): Remove handling of ansi_null_node.
11793         * pt.c (type_unification_real): Don't convert NULL to void* type.
11794         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
11795         (convert_for_assignment): Warn about converting NULL to an
11796         arithmetic type.
11797         (convert_for_initialization): Likewise.
11798
11799 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
11800
11801         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
11802         * pt.c (coerce_template_parms): Use no_linkage_check.
11803         * decl.c (grokvardecl): Likewise.
11804         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
11805
11806         * method.c (process_overload_item): Remove useless code.
11807
11808 1998-08-20  Per Bothner  <bothner@cygnus.com>
11809
11810         Handle new'ing of Java classes.
11811         * init.c (build_class_classref):  New function.
11812         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
11813         constructor does not return this;  don't need to exception-protect.
11814
11815         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
11816         * decl2.c (acceptable_java_type):  Handle template-derived types.
11817
11818 1998-08-20  Per Bothner  <bothner@cygnus.com>
11819
11820         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
11821
11822 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
11823
11824         * decl.c (duplicate_decls): Always merge the old and new patterns
11825         for templates, regardless of whether or not the new one has
11826         DECL_INITIAL.  Don't throw away specializations.  Merge
11827         DECL_SAVED_TREE.
11828         * pt.c (tsubst_decl): Use the right pattern when calculating the
11829         complete args for a new template instance.
11830         (do_decl_instantiation): Fix typo in comment.
11831         (regenerate_decl_from_template): Deal with tricky friend template
11832         case.
11833         (instantiate_decl): Likewise.
11834
11835 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
11836
11837         * init.c (build_builtin_delete_call): Add missing assemble_external
11838         call.
11839
11840 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
11841
11842         * parse.y (notype_unqualified_id): Also accept ~A<int>.
11843
11844 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
11845
11846         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
11847         arithmetic.
11848         * except.c (build_throw): Warn when NULL is thrown, even with
11849         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
11850         thrown expression.
11851
11852         * cp-tree.h (ansi_null_node): New variable.
11853         * decl.c (ansi_null_node): New variable.
11854         (init_decl_processing): Initialize its type.
11855         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
11856         for null_node in non-ANSI mode.
11857         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
11858         place of null_node to avoid spurious errors.
11859
11860 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
11861
11862         * cp-tree.h (enter_scope_of): New function.
11863         * parse.y (complex_direct_notype_declarator): Use it.
11864         * semantics.c (enter_scope_of): New function.
11865
11866 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
11867
11868         * decl.c (grokparms): No, here.
11869
11870         * decl.c (grokdeclarator): Catch parm with pointer to array of
11871         unknown bound here...
11872         * method.c (process_overload_item): ...not here.
11873
11874         * gxxint.texi: Remove obsolete documentation of overloading code.
11875
11876         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
11877         * class.c (finish_struct_bits): Likewise.
11878
11879         * tree.c (lvalue_type): Fix for arrays.
11880         * typeck.c (build_unary_op): Use lvalue_type.
11881         * call.c (add_function_candidate): Likewise.
11882         * cvt.c (convert_to_reference): Likewise.
11883
11884         * decl2.c (lang_decode_option): Ignore -traditional.
11885
11886         * init.c (build_offset_ref): Don't mess with error_mark_node.
11887         * lex.c (do_scoped_id): Use cp_error.
11888
11889         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
11890
11891 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11892
11893         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
11894
11895 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
11896
11897         * cp-tree.h (set_identifier_local_value): Provide prototype.
11898
11899         * decl2.c (do_namespace_alias): Remove unused variables `binding'
11900         and `old'.
11901
11902 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
11903
11904         * Makefile.in: Rename BBISON to BISON so that it can be properly
11905         inherited from the parent makefile.
11906
11907 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
11908
11909         * lang-options.h: Add -finit-priority.
11910         * decl2.c: Likewise.  Check flag_init_priority instead of
11911         USE_INIT_PRIORITY.
11912
11913         * decl2.c (setup_initp): New fn.
11914         (start_objects, finish_objects, do_ctors): Handle init_priority.
11915         (do_dtors, finish_file): Likewise.
11916
11917 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
11918
11919         * pt.c (tsubst_copy): Hush warning.
11920
11921         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
11922
11923 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
11924
11925         * pt.c (print_template_context): Don't abort when instantiating a
11926         synthesized method.
11927
11928         * decl.c (grokdeclarator): Issue errors on namespace qualified
11929         declarators in parameter lists or in class scope.
11930
11931 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
11932
11933         * pt.c (check_explicit_specialization): Don't abort on bogus
11934         explicit instantiations.
11935
11936 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
11937
11938         * typeck.c (require_complete_type): Use complete_type_or_else.
11939         (complete_type_or_else): Always return NULL_TREE on failure, as
11940         documented.
11941
11942         * pt.c (tsubst_aggr_type): Prototype.
11943         (tsubst_decl): New function, split out from tsubst.  Set
11944         input_filename and lineno as appropriate.
11945         (pop_tinst_level): Restore the file and line number saved in
11946         push_tinst_level.
11947         (instantiate_class_template): Set input_filename and lineno as
11948         appropriate.
11949         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
11950         context for a TYPENAME_TYPE is complete.
11951
11952         * decl2.c (grokbitfield): Issue errors on bitfields declared with
11953         function type.
11954         (do_dtors): As in do_ctors, pretend to be a member of the same
11955         class as a static data member while generating a call to its
11956         destructor.
11957
11958         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
11959         conversions, even in complex virtual base class hierarchies.
11960
11961 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
11962
11963         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
11964         (TYPE_TEMPLATE_INFO): Likewise.
11965         (SET_TYPE_TEMPLATE_INFO): Likewise.
11966         (ENUM_TI_TEMPLATE): Likewise.
11967         (ENUM_TI_ARGS): Likewise.
11968         (lookup_nested_type_by_name): Remove.
11969         * decl.c (maybe_process_template_type_declaration): Handle enums.
11970         (start_enum): Don't check for primary-template enum declarations
11971         here.
11972         (finish_enum): Clean up, document.  Make sure template enum
11973         constants get the correct type.
11974         (build_enumerator): Copy initializers for template enumerations,
11975         too.
11976         (grok_enum_decls): Document.
11977         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
11978         better.  Build LOOKUP_EXPRs for local variables, even if they are
11979         TREE_PERMANENT.
11980         * pt.c (tsubst_enum): Remove field_chain parameter.
11981         (template_class_depth): Include the depth of surrounding function
11982         contexts.
11983         (push_template_decl): Check for primary-template enum declarations
11984         here.  Deal with enumeration templates.
11985         (lookup_template_class): Likewise.
11986         (for_each_template_parm): Likewise.
11987         (instantiate_class_template): Don't call tsubst_enum directly,
11988         call tsubst instead, to instantiate enums.  Deal with all
11989         field_chain issues here, not in tsubst_enum.
11990         (lookup_nested_type_by_name): Remove.
11991         (tsubst_aggr_type): Revise handling of enumeration types.
11992         (tsubst): Likewise.
11993         (tsubst_copy): Likewise.
11994         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
11995
11996 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
11997
11998         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
11999         uses template parameters.
12000         * method.c (build_template_parm_names): Use the full set of
12001         template arguments for tsubst'ing.
12002         (build_overload_identifier): Pass the full set of template
12003         arguments to build_template_parm_names, not just the
12004         innermost_args.
12005         * pt.c (TMPL_ARGS_DEPTH): Define using
12006         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
12007         (NUM_TMPL_ARGS): New macro.
12008         (add_outermost_template_args): Deal with the case where the outer
12009         args will be completely discarded.
12010         (coerce_template_parms): Use the full set of template arguments
12011         for tsubst'ing.  Simplify.  Add some asserts.  Improve
12012         error messages.
12013         (lookup_template_class): Pass the full set of template arguments
12014         to coerce_template_parms.
12015         (tsubst): Add assertion.
12016         (do_type_instantiation): Don't instantiate member template
12017         classes.
12018
12019         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
12020         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
12021
12022 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
12023
12024         * method.c (set_mangled_name_for_decl): Change return type to void.
12025
12026         * decl.c (lookup_name_real): A namespace-level decl takes priority
12027         over implicit typename.  Avoid doing the same lookup twice.
12028
12029         * search.c (dependent_base_p): New fn.
12030         (dfs_pushdecls, dfs_compress_decls): Use it.
12031
12032         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
12033         virtual functions if the type doesn't have any.
12034
12035 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
12036
12037         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
12038         uses template parameters.
12039
12040 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
12041
12042         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
12043         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
12044         * lex.c (do_identifier): Don't use a second argument, or a type,
12045         when building LOOKUP_EXPRs.
12046         (do_identifier): Likewise.
12047         (do_scoped_id): Likewise.
12048         * method.c (hack_identifier): Improve error message.
12049         * pt.c (lookup_template_function): Don't needlessly call
12050         copy_to_permanent or build_min.
12051         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
12052         necessary.
12053         (do_decl_instantiation): Improve error message.
12054         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
12055         (build_min): Copy the type to the permanent obstack, too.
12056
12057 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
12058
12059         * init.c (init_init_processing): Remove BI* handling.
12060         (build_builtin_call): Remove.
12061         (build_builtin_delete_call): New fn.
12062         (build_delete): Use it.
12063
12064 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
12065
12066         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
12067         (maybe_check_template_type): New function.
12068         * decl.c (maybe_process_template_type_declaration): New function,
12069         split out from pushtag  Call maybe_check_template_type.
12070         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
12071         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
12072         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
12073         * pt.c (template_class_depth_real): Generalization of ...
12074         (template_class_depth): Use it.
12075         (register_specialization): Use duplicate_decls for duplicate
12076         declarations of specializations.
12077         (maybe_check_template_type): New function.
12078         (push_template_decl_real): Fix comment.
12079         (convert_nontype_argument): Likewise.
12080         (lookup_template_class): Likewise.  Avoid an infinite loop on
12081         erroneous code.
12082         (tsubst_friend_function): Fix comment.
12083         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
12084         an IDENTIFIER_NODE.
12085         * semantics.c (begin_function_definition): Use
12086         reset_specialization to note that template headers don't apply
12087         directly to declarations after the opening curly for a function.
12088
12089 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
12090
12091         * decl.c (push_overloaded_decl): Use current_namespace instead of
12092         DECL_CONTEXT (decl) to determine where we go.
12093
12094         * decl.c (lookup_name_real): Fix typo.
12095
12096 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
12097
12098         * friend.c (is_friend): Be lenient with member functions to deal
12099         with nested friends.
12100
12101 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
12102
12103         * class.c (finish_struct_1): Convert integer_zero_node to
12104         ssizetype before passing it to set_rtti_entry.
12105         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
12106         of any size to a pointer.
12107
12108 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
12109
12110         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
12111         (build_template_decl_overload): Remove.
12112         (set_mangled_name_for_decl): New function.
12113         (innermost_args): Remove is_spec parameter.
12114         (most_specialized, most_specialized_class): Remove declarations.
12115         (lookup_template_class): Add entering_scope parameter.
12116         (maybe_process_partial_specialization): New function.
12117         (finish_template_decl): Likewise.
12118         (finish_template_type): Likewise.
12119         * class.c (finish_struct): Clean up processing of member template
12120         specializations.
12121         * decl.c (pushtag): Fix formatting.
12122         (lookup_tag): Improve handling of pseudo-global levels.
12123         (make_typename_type): Adjust call to lookup_template_class.
12124         (shadow_tag): Use maybe_process_partial_specialization.
12125         (xref_tag): Improve handling of member friends.
12126         (start_function): Call push_nested_class before
12127         push_template_decl.  Don't call push_template_decl for
12128         specializations.
12129         * decl2.c (grok_x_components): Don't call xref_tag for
12130         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
12131         (grokclassfn): Use set_mangled_name_for_decl.
12132         (arg_assoc_class): Adjust call to innermost_args.
12133         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
12134         * error.c (dump_function_name): Improve printing of template
12135         function names.
12136         * friend.c (is_friend): Don't compare types of decls to determine
12137         friendship, unless flag_guiding_decls.
12138         (make_friend_class): Partial specializations cannot be friends.
12139         (do_friend): Use set_mangled_name_for_decl.  Call
12140         push_template_decl_real instead of push_template_decl.
12141         * method.c (build_decl_overload_real): Remove prototype.  Give it
12142         external linkage.
12143         (build_overload_identififer): Adjust call to innermost_args.
12144         (build_template_decl_overload): Remove.
12145         (set_mangled_name_for_decl): New function.
12146         * parse.y (.finish_template_type): New non-terminal.
12147         (template_def): Use finish_template_decl.  Use template_extdef
12148         instead of extdef.
12149         (template_extdef, template_datadef): New non-terminals, containing
12150         only those rules for things which can be templates.
12151         (datadef): Tidy.
12152         (template_type, self_template_type): Use .finish_template_type.
12153         (named_class_head): Use maybe_process_partial_specialization.
12154         * pt.c (mangle_class_name_for_template): Remove context parameter.
12155         (get_class_bindings): Remove outer_args parameter.
12156         (complete_template_args): Remove.
12157         (add_outermost_template_args): New function.
12158         (register_specialization): Return the specialization.
12159         (unregister_specialization): New function.
12160         (tsubst_template_parms): Likewise.
12161         (most_specialized, most_specialized_class): Prototype here as
12162         static.
12163         (original_template): Rename to most_general_template.
12164         (tsubst_template_parms): New function.
12165         (set_mangled_name_for_template_decl): Likewise.
12166         (TMPL_ARGS_DEPTH): New macro.
12167         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
12168         (TMPL_ARGS_LEVEL): New macro.
12169         (SET_TMPL_ARGS_LEVEL): Likewise.
12170         (TMPL_ARG): Likewise.
12171         (SET_TMPL_ARG): Likewise.
12172         (TMPL_ARGS_DEPTH): Likewise.
12173         (finish_member_template_decl): Use finish_template_decl.
12174         (maybe_process_partial_specialization): New function, split out
12175         from tsubst.
12176         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
12177         (maybe_begin_member_template_processing): Use new macros.
12178         (is_member_template): Likewise.
12179         (is_member_template_class): Likewise.
12180         (add_to_template_args): Likewise.  Deal with multiple levels of
12181         args.
12182         (maybe_process_partial_specialization): New function.
12183         (retrieve_specialization): Add consistency check.
12184         (determine_specialization): Return full argument list.
12185         (check_explicit_specialization): Tweak friend handling.  Use full
12186         argument lists.  Simplify.
12187         (current_template_args): Use new macros.
12188         (push_template_decl_real): Change ill-named mainargs to specargs.
12189         Check that a partial specialization actually specializes at least
12190         one parameter.   Improve friend handling.  Modify for full
12191         template arguments.
12192         (classtype_mangled_name): Don't mangle the names of
12193         specializations.
12194         (lookup_template_class): Add entering_scope parameter.  Use it to
12195         avoid finding a template type when an instantiation is required.
12196         Simplify.  Use full template arguments.
12197         (tsubst_friend_function): Use unregister_specialization.  Use new
12198         macros.  Use full template arguments.
12199         (tsubst_friend_class): Substitute, using tsubst_template_parms,
12200         into the template parameters before passing them to
12201         redeclare_class_template.
12202         (instantiate_class_template): Simplify.  Use full template
12203         arguments.  Adjust calls to get_class_bindings.  Use
12204         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
12205         (innermost_args): Use new macros.
12206         (tsubst_aggr_type): New function, split out from tsubst.
12207         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
12208         conventions for lookup_template_class.  Refine handling of partial
12209         instantiations.   Remove calls to complete_template_args.
12210         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
12211         and set_mangled_name_for_template_decl.
12212         (tsubst_copy): Use tsubst_aggr_type.
12213         (instantiate_template): Use full template arguments.
12214         (more_specialized): Improve formatting.
12215         (more_specialized_class): Adjust calls to get_class_bindings.
12216         (get_bindings_real): Don't call complete_template_args.
12217         (most_specialized): Don't overwrite input; create a new list.
12218         (most_specialized_class): Use most_general_template.
12219         (regenerate_decl_from_template): Use unregister_specialization.
12220         Use full template arguments.
12221         (instantiate_decl): Use full template arguments.
12222         (set_mangled_name_for_template_decl): New function.
12223         * semantics.c (begin_class_definition): Use
12224         maybe_process_partial_specialization.
12225         (finish_member_class_template): New function.
12226         (finish_template_decl): Likewise.
12227         (finish_template_type): Likewise.
12228         (typeck.c): Don't crash after issuing a compiler_error.
12229         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
12230
12231 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
12232
12233         * typeck2.c (build_functional_cast): Handle default-initialization.
12234
12235         * call.c (build_over_call): Pass 1 to popclass.
12236
12237         * parse.y (direct_notype_declarator): Add precedence declaration
12238         to notype_unqualified_id case.
12239         * Makefile.in (EXPECT): Adjust.
12240
12241         * tree.c (ovl_member): Fix for single function in OVL.
12242
12243 1998-07-27  Dave Brolley  <brolley@cygnus.com>
12244
12245         * c-lex.c (yylex): Fix boundary conditions in character literal and
12246         string literal loops.
12247
12248 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
12249
12250         * decl.c (lookup_name_real): OK, do return the from_obj value
12251         unless got_object depends on template parms.
12252
12253         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
12254
12255         * pt.c (coerce_template_parms): Also complain about local enums.
12256
12257         * cp-tree.h: Add prototype for set_identifier_local_value.
12258         * decl.c (set_identifier_local_value_with_scope): Make static,
12259         prototype.
12260         * search.c (covariant_return_p): Likewise.
12261         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
12262
12263         * call.c (build_method_call): Only pull out the type of a destructor
12264         if it's a template type parm.
12265         * decl.c (lookup_name_real): Never return the from_obj value.
12266
12267 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
12268
12269         * except.c (process_start_catch_block_old): Call start_decl_1 for
12270         catch parm.
12271         * decl.c (start_decl_1): Avoid duplicate error.
12272
12273         * init.c (expand_default_init): Only perform the initialization if
12274         it will do something.
12275
12276 1998-07-23  H.J. Lu  (hjl@gnu.org)
12277
12278         * parse.y (base_class): Check for invalid base class.
12279
12280 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
12281
12282         * decl2.c (import_export_template): Fold in...
12283         (import_export_class): ...to here.  Handle dllimport/export.
12284
12285         * class.c (build_vtable): Pass at_eof to import_export_vtable.
12286         (prepare_fresh_vtable): Likewise.
12287         * decl2.c (import_export_class): Split out...
12288         (finish_prevtable_vardecl): From here.
12289         * class.c (finish_struct_1): Call import_export_class if at_eof.
12290
12291         * decl.c (start_function): #if 0 mysterious code I wrote and have
12292         forgotten why.
12293         * rtti.c (get_tinfo_fn): If this is for a class type, set
12294         DECL_CONTEXT.
12295
12296 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
12297
12298         * inc/exception: Change terminate and unexpected to ().
12299
12300         * parse.y (named_class_head_sans_basetype_defn): A
12301         named_class_head_sans_basetype followed by '{' or ':' is a defn.
12302
12303 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
12304
12305         * tree.c (canonical_type_variant): New fn to handle arrays.
12306         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
12307         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
12308         * method.c (process_overload_item): Use build_overload_value for
12309         arrays.
12310
12311 1998-07-20  Dave Brolley  <brolley@cygnus.com>
12312
12313         * lex.c (mbchar.h): #include it.
12314         (GET_ENVIRONMENT): New macro.
12315         (init_parse): Set character set based on LANG environment variable.
12316         (real_yylex): Handle multibyte characters in character literals.
12317         (real_yylex): Handle multibyte characters in string literals.
12318
12319 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
12320
12321         * lex.c (do_identifier): Look for class value even if we don't
12322         have a global value.  Do implicit declaration if parsing is 2.
12323         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
12324         lookup.
12325
12326 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
12327
12328         * decl.c (pushtag): Revert previous change.
12329         * pt.c (lookup_template_class): Don't put out debugging
12330         information for types that use template parameters.
12331
12332         * decl.c (pushtag): Don't put out debugging information for
12333         compiler-generated typedefs.
12334
12335         * error.c (dump_type_real): Don't crash when presented with
12336         intQI_type_node or the like.
12337
12338         * semantics.c (finish_translation_unit): Fix spelling error in
12339         comment.
12340
12341 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
12342
12343         * decl.c (lookup_name_real): Pull out single function here.
12344         (select_decl): Not here.
12345         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
12346
12347         * decl.c (qualify_lookup): Tweak again.
12348
12349         * pt.c (lookup_template_class): Don't mess with the context of the
12350         instantiation.
12351         * decl2.c (current_decl_namespace): Remove special handling for
12352         templates.
12353
12354         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
12355         a member template specialization.
12356
12357         * tree.c (ovl_member): Use decls_match to compare functions.
12358         * decl.c (decls_match): Check the context of a function.
12359
12360         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
12361         in Koenig lookup support rules.
12362         * semantics.c (finish_call_expr): Handle the new cases.
12363
12364         * typeck.c (build_x_function_call): Handle overloaded methods.
12365
12366         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
12367
12368 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
12369
12370         * semantics.c (finish_object_call_expr): Revert previous change.
12371         * call.c (build_new_method_call): Likewise.  Instead, convert
12372         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
12373
12374 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
12375
12376         * decl.c (qualify_lookup): Handle templates.
12377
12378         * decl2.c (do_using_directive): Don't pass ancestor.
12379         * decl.c (push_using_directive): Calculate ancestor.
12380
12381         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
12382         * decl.c (pushdecl): Move type shadowing handling from here...
12383         (duplicate_decls): ...to here.
12384         * decl.c (set_identifier_local_value_with_scope): New fn.
12385         (pushdecl): Use it.
12386         (set_identifier_local_value, lookup_type_current_level): New fns.
12387         * decl2.c (do_local_using_decl): Handle types and binding level
12388         stuff properly.
12389
12390         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
12391         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
12392         (lookup_namespace_name): Likewise.
12393         * typeck.c (build_unary_op): Not here anymore.
12394
12395         * decl2.c (do_class_using_decl): Make sure we get an identifier.
12396         * class.c (handle_using_decl): Ignore TYPE_DECLs.
12397
12398         * decl.c (qualify_lookup): New fn.
12399         (lookup_name_real): Use it.
12400
12401 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12402
12403         * decl2.c (add_using_namespace): When directly using a namespace
12404         that was indirect before, promote it.
12405
12406         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
12407         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
12408         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
12409         * decl.c (select_decl): Replace two flag parameters by one.
12410         (unqualified_namespace_lookup): Likewise, pass flag.
12411         (lookup_flags): New function.
12412         (lookup_name_real): Compute flags, pass them.
12413         (lookup_namespace_name): Call with zero-flag.
12414         * decl2.c (ambiguous_decl): Add flag parameter, complain only
12415         according to flags.
12416         (lookup_using_namespace, qualified_lookup_using_namespace):
12417         Add flag parameter, pass them through.
12418         * lex.c (do_scoped_id): Call with zero-flag.
12419
12420 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
12421
12422         * typeck.c (convert_for_assignment): Use comptypes.
12423
12424 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
12425
12426         * semantics.c (finish_object_call_expr): Move test for the
12427         function called being a TYPE_DECL to ...
12428         * call.c (build_new_method_call): Here.
12429
12430 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
12431
12432         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
12433         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
12434
12435         * lex.c (looking_for_typename): Don't initialize.
12436
12437         * decl2.c (ambiguous_decl): Clarify error message.
12438
12439         * decl.c (push_using_directive): Iterate over namespaces used
12440         indirectly.
12441
12442 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12443
12444         * decl2.c (add_using_namespace): Iterate over namespaces used
12445         indirectly.
12446
12447         * decl.c (lookup_name_real): Accept namespace aliases as locals.
12448         (cat_namespace_levels): Ignore aliases.
12449         (duplicate_decls): Ignore duplicate aliases.
12450         * decl2.c (do_namespace_alias): Process block level namespace
12451         aliases.  Store alias with pushdecl.  Remove odr errors.
12452         * parse.y (namespace_alias): New non-terminal.
12453         (extdef): Use it.
12454
12455 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
12456
12457         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
12458         Handle TEMPLATE_TYPE_PARM.
12459         (arg_assoc): Rewrite.
12460
12461         * pt.c (complete_template_args): Don't look at the context unless
12462         we have to.
12463
12464         * method.c (build_decl_overload_real): Fix namespace handling.
12465
12466         * typeck.c (build_unary_op): Extract a lone function from an
12467         OVERLOAD.
12468
12469         * call.c (build_scoped_method_call): Handle getting a namespace
12470         for basetype in a destructor call.
12471         (check_dtor_name): Handle enums.
12472
12473         * parse.y (using_directive): New nonterminal.
12474         (extdef, simple_stmt): Use it.
12475
12476 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12477
12478         * decl2.c (add_function): Move error message ...
12479         (arg_assoc_namespace): ... from here.
12480
12481 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
12482
12483         * parse.y (namespace_qualifier): Fix multiple level handling.
12484         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
12485         (arg_assoc): Don't skip the first argument of a function.
12486
12487 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
12488
12489         * search.c (my_tree_cons): Clean up.
12490
12491 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
12492
12493         * call.c (joust): Don't warn about "confusing" conversions to the
12494         same type.
12495
12496 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12497
12498         * class.c (push_nested_class): Complain about namespaces.
12499         * decl.c (start_decl): Enter the object's namespace.
12500         (cp_finish_decl): Leave it.
12501         (grokdeclarator): Likewise.
12502         * decl2.c (check_decl_namespace): New function.
12503         (finish_file): Call it.
12504         * parse.y (complex_direct_notype_declarator): Set complexity
12505         of namespace-qualified ids to -1, enter the namespace.
12506
12507         * method.c (build_template_decl_overload): Expect _DECL as first
12508         parameter.  Put context temporarily into current_namespace.
12509         * pt.c (check_explicit_specialization): Change caller.
12510         (tsubst): Likewise.
12511
12512         * init.c (build_offset_ref): Call mark_used and
12513         convert_from_reference for namespace members.
12514
12515 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12516
12517         * search.c (my_tree_cons): The bitfield is at index 2.
12518
12519 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
12520
12521         * lang-options.h: Format changed to work with new --help support
12522         in gcc/toplev.c
12523
12524 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12525
12526         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
12527         Do Koenig lookup in CALL_EXPR.
12528         (arg_assoc): Handle error_mark.
12529         * lex.c (is_global): New function.
12530         (do_identifier): Expect arguments for Koenig lookup.
12531         * parse.y (primary): Add rules for calls of unqualified function calls.
12532         (do_id): Change call of do_identifier.
12533         * pt.c (finish_stmt_expr): Likewise.
12534         * semantics.c (finish_id_expr): Likewise.
12535         (finish_call_expr): Add integer parameter to indicate
12536         argument-dependent lookup.
12537
12538         * decl.c (struct binding_level): New field using_directives.
12539         (push_using_decl): Not sorry anymore.
12540         (push_using_directive): New function.
12541         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
12542         (unqualified_namespace_lookup): New function, code from ...
12543         (lookup_name_real): ... here.
12544         * decl2.c (lookup_using_namespace): Pass using list instead of
12545         initial scope.
12546         (validate_nonmember_using_decl): New function.
12547         (do_nonmember_using_decl): New function.
12548         (do_toplevel_using_decl): Use them.
12549         (do_local_using_decl): New function.
12550         (do_using_directive): Support block-level directives.
12551         * parse.y (simple_stmt): Support using declarations and
12552         directives.
12553         (namespace_qualifier, namespace_using_decl): New non-terminals.
12554
12555         * xref.c (classname): New function.
12556         (GNU_xref_hier): Change class and base parameters to tree.
12557         * decl.c (xref_baseypes): Change caller.
12558         * friend.c (make_friend_class): Likewise.
12559
12560 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
12561
12562         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
12563         comparison.
12564
12565         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
12566         template template parameter, record its use.
12567         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
12568         its template arguments if exists.
12569
12570         * pt.c (coerce_template_template_parms): New function equivalent
12571         to coerce_template_parms when IS_TMPL_PARM is true.
12572         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
12573         all callers changed.
12574
12575         (coerce_template_parms): Access ARGLIST properly when creating a
12576         new vector.  Only accept implicit TYPE_DECL as valid argument for
12577         a template template parameter when it is a base class of
12578         current_class_type.  Don't display error message when COMPLAIN is
12579         false.
12580
12581 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
12582
12583         * repo.c (get_base_filename): Use file_name_nondirectory.
12584         (open_repo_file): Likewise.
12585         * cp-tree.h (file_name_nondirectory): Add prototype.
12586
12587 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
12588
12589         * friend.c (do_friend): Pull the identifier out of declarator.
12590         Use cp_error and friends.
12591         * decl2.c (qualified_lookup_using_namespace): Fix call to
12592         purpose_member.
12593         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
12594         (grokvardecl): Use DECL_CLASS_SCOPE_P.
12595         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
12596         * class.c (warn_hidden): Fix for OVERLOAD.
12597         From grahams@rcp.co.uk:
12598         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
12599         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
12600
12601 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
12602
12603         * g++.1 (-traditional): Remove duplicated documentation.
12604
12605 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
12606
12607         * method.c (flush_repeats): Add nrepeats parameter.
12608         (issue_nrepeats): Likewise.
12609         (is_back_referenceable_type): New function.  Don't back-reference
12610         TEMPLATE_TYPE_PARMs as well as simple types like integers.
12611         (build_mangled_name_for_type): Likewise.
12612         (build_mangled_name_for_type_with_Gcode): Likewise.
12613         (lasttype): Remove.
12614         (nrepeats): Likewise.
12615         (Nrepeats): Likewise.
12616         (start_squangling): Don't clear the variables removed above.
12617         (end_squangling): Likewise.
12618         (flush_repeats): Tidy.  Use nrepeats parameter rather than
12619         Nrepeats global.
12620         (issue_nrepeats): Likewise, but with nrepeats global.  Use
12621         is_backreferenceable_type.
12622         (build_overload_nested_name): Tidy.  Add comment.  Use
12623         build_mangled_name_for_type.
12624         (build_underscore_int): Comment.
12625         (build_overload_scope_ref): Use build_mangled_name_for_type.
12626         (build_overload_int): Likewise.
12627         (build_template_template_parm_names): Tidy.
12628         (build_template_parm_names): Use build_mangled_name_for_type.
12629         (build_overload_identifier): Add comments.
12630         (build_mangled_name_for_type_with_Gcode): Split out from
12631         build_mangled_name.
12632         (build_mangled_name_for_type): Use it.
12633         (build_mangled_name): Rework to use build_mangled_name_for_type
12634         and to not use global nrepeats/Nrepeats.  Tidy.
12635         (process_modifiers): Tidy.
12636         (check_btype): Use is_backreferenceable_type.  Add comment.
12637         Rename `node' to `type'.
12638         (process_overload_item): Set numeric_output_need_bar here.
12639         Use build_mangled_name_for_type.  Tidy.
12640         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
12641         build_mangled_name_for_type.
12642
12643         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
12644         for TYPE_DECLs.
12645
12646 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
12647
12648         * cp-tree.h (warn_long_long): Define.
12649         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
12650         warning "ANSI C++ does not support `long long'".
12651         * decl2.c (warn_long_long): Define.
12652         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
12653
12654 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
12655
12656         * decl.c (xref_tag): Handle attributes between 'class' and name.
12657         * parse.y (aggr): Likewise.
12658         * semantics.c (finish_class_definition): Likewise.
12659         * Makefile.in (EXPECTED): Adjust.
12660
12661         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
12662         * decl2.c: Define them.
12663         (lang_decode_option): Handle them.
12664         * lang-options.h: Add -foptional-diags.
12665         * class.c (finish_struct): Don't complain about multiple meanings of
12666         name if -fno-optional-diags.
12667         * decl.c (pushdecl_class_level): Likewise.
12668         * lex.c (real_yylex): Check warn_multichar.
12669
12670 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
12671
12672         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
12673
12674         * tree.c (make_binfo): Fix length.
12675
12676 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
12677
12678         * decl2.c (lang_decode_option): Remove warn_template_debugging.
12679         * lang-options.h: Likewise.
12680
12681 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12682
12683         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
12684         (process_start_catch_block): Likewise for variables
12685         `false_label_rtx', `call_rtx' and `return_value_rtx'.
12686
12687 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
12688
12689         * tree.c (build_srcloc): Make sure we allocate this node on the
12690         permanent obstack.
12691
12692 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
12693
12694         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
12695         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
12696         (lang_specific_driver): Only add -lm automatically if need_math is
12697         nonzero.
12698
12699 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
12700
12701         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
12702
12703 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12704
12705         * Makefile.in (EXPR_H): New dependency variable.
12706         (decl2.o): Depend on $(EXPR_H).
12707         (typeck.o): Likewise.
12708         (init.o): Likewise.
12709         (expr.o): Likewise.
12710
12711 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
12712
12713         * decl.c (start_enum): Put local enums on permanent_obstack.
12714
12715 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
12716
12717         * cp-tree.h (c_get_alias_set): Declare.
12718         * decl.c (init_decl_processing): Set lang_get_alias_set.
12719
12720 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
12721
12722         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
12723         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
12724         flag for all function decls which are in the exception table.
12725         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
12726         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
12727         code is emitted for any referenced rtti function.
12728
12729 1998-06-25  Dave Brolley  <brolley@cygnus.com>
12730
12731         * lang-specs.h: Use new | syntax to eliminate
12732         string concatenation.
12733
12734 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
12735
12736         * cp-tree.h (CP_DECL_CONTEXT): New macro.
12737         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
12738         * method.c (build_overload_nested_name): Likewise.
12739         * sig.c (build_signature_pointer_or_reference_type): Don't set
12740         DECL_CONTEXT.
12741
12742 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12743
12744         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
12745         * cp-tree.h (FROB_CONTEXT): New macro.
12746         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
12747         * decl.c (namespace_binding): Replace NULL_TREE with
12748         global_namespace.
12749         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
12750         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
12751         Likewise.
12752         * decl.c (pushtag): Use FROB_CONTEXT.
12753         (pushdecl, make_typename_type, define_function, grokdeclarator):
12754         Likewise.
12755         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
12756         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
12757         Likewise.
12758         * decl2.c (decl_namespace): Return global_namespace if no context.
12759         * method.c (build_overload_nested_name): Expect null as context.
12760         * pt.c (mangle_class_name_for_template): Do nothing for null
12761         contexts.
12762         (lookup_template_class): Allow for null id_context.
12763
12764 1998-06-25  Richard Henderson  <rth@cygnus.com>
12765
12766         * method.c (emit_thunk): Set current_function_is_thunk for the
12767         ASM_OUTPUT_MI_THUNK case as well.
12768
12769 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
12770
12771         * exception.cc (__cplus_type_matcher): Get a match_info pointer
12772         instead of an exception table entry as a parameter.
12773
12774 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
12775
12776         * parse.y (function_try_block): Don't call start_catch_handler.
12777         * except.c (call_eh_info): Remove coerced field from declaration.
12778         (build_eh_type_type_ref): New function to create an address of a
12779         rtti function for the new style exception tables.
12780         (expand_start_catch_block): Split function, this contains the
12781         common part.
12782         (process_start_catch_block_old): New function to perform the rest
12783         of expand_start_catch_block under old style exceptions.
12784         (process_start_catch_block_old): New function to perform the rest
12785         of expand_start_catch_block under new style exceptions.
12786         (expand_end_catch_block): Only pop the false label off the stack under
12787         the old style of exceptions.
12788         * semantics.c (finish_try_block): Don't call start_catch_handler.
12789         * exception.cc (struct cp_eh_info): Add original_value field.
12790         (__cplus_type_matcher): Perform type matching on the original exception
12791         value, and if we have a match, set the current value.
12792         (__cp_push_exception): Set the original exception value.
12793
12794 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
12795
12796         * call.c (joust): Fix confusing conversion warning.
12797
12798         * call.c (build_op_delete_call): Add placement parm.  Check
12799         LOOKUP_SPECULATIVELY.
12800         * cp-tree.h, decl2.c, init.c: Adjust.
12801         * decl.c (finish_function): Use it.
12802
12803         * pt.c (tsubst): Diagnose creating void fields or variables.
12804
12805 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12806
12807         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
12808
12809         * cp-tree.h (check_dtor_name): Add prototype.
12810
12811         * init.c (expand_member_init): Remove unused variables
12812         `ptr_type_node', `parm' and `rval'.
12813
12814         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
12815         in call to fprintf.
12816         (lang_print_xnode): Likewise.
12817
12818         * typeck2.c (enum_name_string): Cast argument to sprintf to long
12819         and use %ld specifier.
12820
12821         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
12822         specifier in call to fprintf.
12823         (GNU_xref_member): Cast argument to sprintf to int.
12824
12825 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12826
12827         * typeck2.c (pop_init_level): Warn about implicit zero initialization
12828         of struct members.
12829
12830 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12831
12832         * cp-tree.h: Prototype function `check_java_method'.
12833
12834 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
12835
12836         * class.c (finish_struct): Make conflicting use of id a pedwarn.
12837         * decl.c (pushdecl_class_level): Likewise.
12838
12839 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
12840
12841         * pt.c (convert_nontype_argument): Issue an error when presented
12842         with an integer (real) constant that cannot be simplified to an
12843         INT_CST (REAL_CST).
12844
12845         * cp-tree.h (c_get_alias_set): Remove declaration added in
12846         1998-06-13 change that should never have been checked in.
12847
12848 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
12849
12850         * typeck.c (build_binary_op_nodefault): Change % in format strings
12851         to %%.
12852
12853         * decl.c (grokvardecl): Don't build_static_name for decls that
12854         aren't at namespace scope.
12855
12856         * init.c (perform_member_init): Catch default-initialization of
12857         references.
12858
12859 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
12860
12861         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
12862
12863 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
12864
12865         * method.c (hack_identifier): Complain about getting a namespace
12866         or class template.
12867         * typeck.c (decay_conversion): Remove check for namespaces.
12868         * typeck2.c (incomplete_type_error): Likewise.
12869         * parse.y (template_arg): Add PTYPENAME expansion.
12870
12871 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
12872
12873         * decl.c (grokvardecl): Don't build external assembler names for
12874         TYPENAMEs in other namespaces as there is no declarator.
12875         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
12876         info from DECL_CONTEXT if it is NULL.
12877
12878 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
12879
12880         * call.c (check_dtor_name): Split out.
12881         (build_scoped_method_call): Use it.
12882         (build_method_call): Use it.
12883         * init.c (build_offset_ref): Use it.
12884
12885         * typeck.c (build_static_cast): Fix handling of pointers to members.
12886
12887         * decl.c (finish_function): Just return nothing from a constructor.
12888         * typeck.c (c_expand_return): Complain about returning a void
12889         expression from a destructor.
12890
12891 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
12892
12893         * class.c (alter_access): Accept a BINFO explaining how to get
12894         from the entity whose accessed is being altered to the type doing
12895         the altering.
12896         (handle_using_decl): New function containing code split out from ...
12897         (finish_struct_1): Here.
12898
12899         * cp-tree.h (complete_type_or_else): Declare.
12900         * init.c (build_new_1, build_delete): Use it.
12901         * typeck.c (require_complete_type): Use complete_type, rather than
12902         expanding it inline.
12903         (complete_type_or_else): New function.
12904         (build_component_ref): Use it.
12905         (pointer_int_sum): Make sure the type pointed to is complete.
12906         (pointer_diff): Likewise.
12907
12908         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
12909         types.
12910
12911         * search.c (get_matching_virtual): Note that member templates
12912         cannot override virtual functions.
12913
12914 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
12915
12916         * pt.c (check_explicit_specialization): If DECLARATOR turned into
12917         an error_mark_node from lookup_template_function, return the same.
12918         (determine_specialization): Also make sure TEMPLATE_ID isn't an
12919         error_mark_node, before we try to read its operands.
12920         * decl.c (grokdeclarator): If we got an error_mark_node from
12921         check_explicit_specialization, just return it right back.
12922
12923 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
12924
12925         * class.c (instantiate_type): Don't treat template-ids that don't
12926         specify any template arguments as equivalent to ordinary
12927         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
12928         pointer-to-members for member templates.  Tidy slightly.
12929         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
12930         * init.c (build_offset_ref): Handle template-ids like ordinary
12931         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
12932         offset part of the OFFSET_REF.
12933         * typeck.c (build_unary_op): Change check for unknown types to
12934         look for OFFSET_REFs, not SCOPE_REFs.
12935
12936 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
12937
12938         * pt.c (is_member_template_class): New function.
12939         (push_template_decl_real): Use it.
12940
12941 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
12942
12943         * friend.c (do_friend): Add support for nested classes using
12944         member functions of the enclosing class as friends.
12945
12946 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
12947
12948         * call.c (convert_default_arg): Make global, not static.
12949         (convert_arg_for_ellipsis): Split out from ...
12950         (build_over_call): Here.
12951         * cp-tree.h (convert_default_arg); Declare.
12952         (convert_arg_to_ellipsis): Likewise.
12953         (do_member_init): Remove.
12954         * init.c (do_member_init): Remove; this code is dead.
12955         (expand_member_init): Remove much of this code; it is dead.
12956         * typeck.c (convert_arguments): Use convert_default_arg and
12957         convert_arg_for_ellipsis, rather than duplicating here.
12958
12959         * call.c (convert_like): Don't fail silently if
12960         build_user_type_conversion fails.  Always return error_mark_node
12961         for failure.
12962
12963 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
12964
12965         * search.c (covariant_return_p): Complain about ambiguous base.
12966
12967         * typeck.c (build_component_ref): Diagnose ref to nested type.
12968
12969 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
12970
12971         * decl.c (grokparms): Check that INIT isn't an error_mark_node
12972         before giving error about invalid type for default arg.
12973
12974 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
12975
12976         * call.c (build_method_call): Fix thinko.
12977
12978 1998-06-10  Dave Brolley  <brolley@cygnus.com>
12979
12980         * decl2.c (lang_decode_option): New argc/argv interface.
12981         * cp-tree.h (lang_decode_option): New argc/argv interface.
12982         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
12983         specified for cpplib-enabled compilers.
12984         * lex.c (lang_init): Don't check_newline for cpplib.
12985         (init_parse): Don't initialize cpplib here.
12986
12987 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
12988
12989         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
12990         piece before checking DECL_MUTABLE_P.
12991
12992 1998-06-10  John Carr  <jfc@mit.edu>
12993
12994         * tree.c (debug_binfo): Make printf format match arguments.
12995
12996         * error.c (OB_PUTI): Make printf format match arguments.
12997
12998 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
12999
13000         * init.c (perform_member_init): Handle default-initialization.
13001
13002         * except.c (build_throw): Handle throwing NULL.
13003
13004         * typeck.c (build_x_function_call): Use resolve_offset_ref.
13005
13006         * search.c (compute_access): Only strip an anonymous union
13007         for a FIELD_DECL.
13008
13009         * call.c (add_builtin_candidates): Tweak.
13010
13011         * cvt.c (build_expr_type_conversion): Restore code for conversion
13012         from class types.
13013         * decl2.c (delete_sanity): Use it.  Clean up.
13014
13015         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
13016
13017 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
13018
13019         * typeck.c (c_expand_return): Don't warn about void expressions on
13020         return statements in functions returning void.
13021
13022 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
13023
13024         * pt.c (fn_type_unification): Revise documentation.  Tidy.
13025         (type_unification): Likewise.
13026
13027 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
13028
13029         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
13030         expand_end_catch.
13031         * parse.y (function_try_block): Rename expand_start_catch, and delete
13032         expand_end_catch.
13033         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
13034         expand_end_catch.
13035
13036 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
13037
13038         * search.c (lookup_member): New fn.
13039         * class.c (finish_struct_1): Use it.
13040         * decl.c (lookup_name_real): Use it.
13041
13042 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13043
13044         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
13045
13046         * cp-tree.h: Add prototype for `maybe_print_template_context' and
13047         `maybe_make_one_only'.
13048
13049         * decl.c (auto_function): Remove unused variable `decl'.
13050
13051         * decl2.c: Include dwarf2out.h and dwarfout.h.
13052
13053         * lex.c: Remove redundant declarations of `set_float_handler' and
13054         `asm_out_file'.
13055
13056 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
13057
13058         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
13059         time flag.  Call __cp_eh_info instead of __cp_exception_info.
13060         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
13061         (__cp_exception_info): Return offset into cp_eh_info structure to
13062         match what use to be the start of this structure.
13063         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
13064         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
13065         compile time flag.
13066         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
13067         __cp_eh_info instead of __cp_exception_info.
13068
13069 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
13070
13071         * decl.c (cp_finish_decl): Disable inlining of extern inlines
13072         with static variables.
13073
13074 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
13075
13076         * init.c (build_offset_ref): Correct previous change to use build,
13077         not build_min.
13078
13079 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
13080
13081         * class.c (instantiate_type): Handle pointer-to-members where the
13082         member is a template.
13083         * init.c (build_offset_ref): Likewise.
13084         * typeck.c (build_unary_op): Likewise.
13085
13086 1998-06-07  Richard Henderson  <rth@cygnus.com>
13087
13088         * lex.c (lang_init_options): New function.
13089         (lang_init): Remove flag_exceptions == 2 hack.
13090
13091 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
13092
13093         * search.c (envelope_add_decl): Tweak for implicit typename.
13094
13095         * call.c (joust): Also warn about confusing conversion op/constructor
13096         overload resolution.
13097
13098         * spew.c (yylex): Also return the TYPE_DECL if got_object.
13099         Don't clear got_object after '~'.
13100         * call.c (build_scoped_method_call): Tweak destructor handling.
13101         (build_method_call): Likewise.
13102         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
13103         TYPE_MAIN_VARIANT for destructors.
13104         * semantics.c (finish_object_call_expr): Complain about calling a
13105         TYPE_DECL.
13106
13107 1998-06-05  Per Bothner  <bothner@cygnus.com>
13108
13109         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
13110         Define - update needed by gcc.c change.
13111
13112 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
13113
13114         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
13115
13116 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
13117
13118         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
13119         * decl.c (lookup_name_real): Add namespaces_only parameter.
13120         If set, return only NAMESPACE_DECLs.
13121         (select_decl): Likewise.
13122         (identifier_type_value): Give additional parameter.
13123         (lookup_name_nonclass): Likewise.
13124         (lookup_name): Likewise.
13125         (find_binding): Skip namespace aliases.
13126         (binding_for_name): Likewise.
13127         (push_namespace): Check for namespace aliases.
13128         (lookup_name_namespace_only): New function.
13129         (begin_only_namespace_names, end_only_namespace_names): New functions.
13130         * decl2.c (set_decl_namespace): Skip namespace aliases.
13131         (do_using_directive): Likewise.
13132         (do_namespace_alias): Produce namespace aliases, fix alias
13133         redeclaration.
13134         * error.c (dump_decl): Support SCOPE_REF.
13135         * parse.y (extdef): Wrap lookup with namespace_only for namespace
13136         aliases and using declarations.
13137
13138 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
13139
13140         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
13141
13142         * error.c (dump_expr): Clean up NEW_EXPR case.
13143
13144 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13145
13146         Suggested by Brendan Kehoe
13147         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
13148         treat it as using ::decl.
13149
13150         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
13151
13152         * tree.c (mapcar): Support NEW_EXPR.
13153
13154         * error.c (dump_expr): Support NEW_EXPR.
13155
13156 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
13157
13158         * method.c (make_thunk): Use overload machinery to make name.
13159         * search.c (covariant_return_p): New fn.
13160         (get_matching_virtual): Use it.
13161
13162         * init.c (build_new_1): Fix check for void.
13163
13164 1998-06-01  Per Bothner  <bothner@cygnus.com>
13165
13166         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
13167         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
13168         java_int_type_node, java_long_type_node, java_float_type_node,
13169         java_double_type_node, java_char_type_node, java_boolean_type_node):
13170         New "primitive" types, with predefined names __java_byte etc.
13171         (record_builtin_java_type):  New function.
13172         (init_decl_processing):  Make Java types with record_builtin_java_type.
13173         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
13174         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
13175         (grokfndecl):  Call check_java_method for Java classes.
13176         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
13177         (process_overload_item):  Match types against specific
13178         java_XX_type_node types, rather than using is_java_type.
13179         * class.c (finish_struct_1):  Don't add default copy constructor
13180         or operator= if TYPE_FOR_JAVA.
13181         (pop_lang_conext):  Restore strict_prototyp proper if Java.
13182         * decl2.c (acceptable_java_type, check_java_method):  New functions.
13183         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
13184         (tsubst):  Move common statement after if statement.
13185         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
13186
13187 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
13188
13189         * pt.c (for_each_template_parm): Use first_rtl_op.
13190
13191         * tree.c (build_cplus_array_type_1): Also check index_type for
13192         template parms.
13193
13194 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
13195
13196         * pt.c (tsubst): Always copy BINFO_BASETYPES.
13197
13198 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
13199
13200         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
13201         TYPE_SIZE_UNIT too.
13202
13203 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
13204
13205         * decl.c (grokdeclarator): Don't complain about in-class
13206         initialization of static consts if we don't really know the type
13207         of the variable.
13208
13209 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
13210
13211         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
13212         * method.c (build_destructor_name): New fn.
13213         * decl2.c (maybe_retrofit_in_chrg): Split out...
13214         (grokclassfn): From here.  Reorganize.
13215         * decl.c (grok_ctor_properties): Make sure ctors for types with
13216         vbases have the in_chrg parm.
13217         * pt.c (instantiate_class_template): Update
13218         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
13219         grok_*_properties.
13220         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
13221
13222 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
13223
13224         * pt.c (instantiate_decl): Make test for whether or not static
13225         variables should be instantiated early match its comment.
13226
13227 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
13228
13229         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
13230         a member.
13231         (start_function): Call check_default_args.
13232         * decl2.c (grokfield): Don't call check_default_args.
13233         (check_default_args): Use cp_error_at.
13234         * lex.c (do_pending_defargs): Call check_default_args.
13235
13236 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
13237
13238         * call.c (build_method_call): Make sure get_type_value returns
13239         something before we try to use its TYPE_MAIN_VARIANT.
13240         (build_scoped_method_call): Likewise.
13241
13242 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
13243
13244         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
13245         initialize an array.
13246
13247         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
13248         DECL_VIRTUAL_P.
13249
13250         * friend.c (do_friend): Clarify template warning.
13251
13252 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
13253
13254         * decl.c (shadow_label): Don't treat decls as identifiers.
13255         (maybe_push_to_top_level): Clear shadowed_labels.
13256
13257         * pt.c (instantiate_decl): Reset lineno and filename after calling
13258         regenerate_decl_from_template.
13259
13260         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
13261         error_mark_node.
13262
13263 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
13264
13265         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
13266
13267 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13268
13269         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
13270         (convert_nontype_argument): Handle cases when nontype template
13271         parameters become classes after substitution.
13272
13273 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
13274
13275         * friend.c (is_friend): Use comptypes, rather than == to compare
13276         types.  Modify for new representation of template friends.
13277         (make_friend_class): Likewise.
13278         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
13279         (instantiate_class_template): Deal with template friends.
13280
13281         * decl.c (store_parm_decls): Remove redundant call to
13282         expand_main_function.
13283
13284 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13285
13286         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
13287         DECL_USE_TEMPLATE.
13288
13289 1998-05-26  Per Bothner  <bothner@cygnus.com>
13290
13291         * language_as_string:  Handle lang_java.
13292
13293 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
13294
13295         * decl.c (pushdecl): Don't copy the type_decl.
13296
13297 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13298
13299         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
13300         current_class_type.
13301         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
13302
13303         * parse.y (complex_direct_notype_declarator): Use $1 to access
13304         scope of notype_qualified_id.
13305
13306 1998-05-26  Dave Brolley  <brolley@cygnus.com>
13307
13308         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
13309         (init_parse): Initialize cpplib interface.
13310
13311         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
13312         empty continuation.
13313
13314 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
13315
13316         * decl.c (pushtag): Avoid crashing on erroneous input.
13317
13318 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13319
13320         * decl.c (push_namespace): Only produce one unique name for
13321         anonymous namespaces.
13322         (get_unique_name): Remove.
13323
13324 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
13325
13326         * call.c (tourney): Don't do any extra comparisons.
13327
13328         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
13329
13330         * cp-tree.h (processing_template_parmlist): Declare.
13331         * decl.c (pushtag): Don't call push_template_decl when we
13332         shouldn't.
13333         * pt.c (processing_template_parmlist): New variable.
13334         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
13335         (complete_template_args): Use it.
13336         (add_to_template_args): Likewise.
13337         (innermost_args): Likewise.
13338         (tsubst): Likewise.
13339         (begin_template_parm_list): Use processing_template_parmlist.
13340         (end_template_parm_list): Likewise.
13341
13342         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
13343         * decl.c (grokdeclarator): Use it.
13344         * decl2.c (grok_x_components): Likewise.
13345         * init.c (initializing_context): Likewise.
13346         * method.c (do_build_copy_constructor): Likewise.
13347         (do_build_assign_ref): Likewise.
13348         * search.c (compute_access): Likewise.
13349         * typeck.c (build_component_ref): Likewise.
13350
13351         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
13352         unnamed type a typedef name "for linkage purposes".
13353
13354         * pt.c (lookup_template_class): Don't look at
13355         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
13356
13357         * method.c (build_overload_int): Handle error cases gracefully.
13358
13359         * pt.c (instantiate_decl): Handle static member variables
13360         correctly.
13361
13362         * pt.c (tsubst): Use the tsubst'd type when producing new
13363         TEMPLATE_PARM_INDEX nodes.
13364
13365 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
13366
13367         * tree.c (cp_tree_equal): Handle pointers to member functions.
13368
13369         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
13370         sure the type of the REF_BIND is a reference type.
13371         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
13372         target_type for clarity.
13373
13374         * parse.y (xcond): Move call to condition_conversion ...
13375         * semantics.c (finish_for_cond): Here.
13376         * parse.c: Regenerated.
13377
13378 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
13379
13380         * decl.c (push_namespace): Namespaces have type void.
13381         * typeck2.c (incomplete_type_error): Complain about namespace
13382         used as expression.
13383         * typeck.c (decay_conversion): Likewise.
13384
13385 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13386
13387         * error.c (dump_expr): Support namespaces.
13388
13389 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
13390
13391         * cp-tree.def: Add SRCLOC.
13392         * cp-tree.h: Add struct tree_srcloc and accessor macros.
13393         * tree.c (build_srcloc, build_srcloc_here): New fns.
13394         * pt.c (add_pending_template): Use build_srcloc_here.
13395         (push_tinst_level): Update last_template_error_tick before erroring.
13396         (instantiate_decl): Restore lineno and input_filename before
13397         calling add_pending_template.
13398         * decl2.c (finish_file): Set up lineno and input_filename for
13399         pending templates.
13400
13401 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
13402
13403         * decl.c (lang_print_error_function): New fn.
13404         (init_decl_processing): Set print_error_function to use it.
13405         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
13406
13407         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
13408         ICS_BAD_FLAG.
13409
13410         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
13411         copy-initialization.
13412
13413         * class.c (build_vtable_entry): Use int_fits_type_p.
13414         (build_vtable): Pass a signed offset to build_vtable_entry.
13415         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
13416         set_rtti_entry): Likewise.
13417
13418 1998-05-22  Per Bothner  <bothner@cygnus.com>
13419
13420         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
13421         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
13422
13423 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
13424
13425         * pt.c (print_template_context): Use fprintf instead of cp_error.
13426
13427         * pt.c (determine_specialization): Just return an error_mark_node.
13428         Also print the decl we want in error messages.  If we complain,
13429         return error_mark_node.
13430         (tsubst_friend_function): Set lineno and input_filename so
13431         error messages will be useful.
13432         (instantiate_template): Just return an error_mark_node.
13433         (check_explicit_specialization): Don't mess with a returned
13434         error_mark_node.
13435
13436         * pt.c (print_template_context): Add new argument.
13437         (maybe_print_template_context): New fn.
13438         (push_tinst_level): Increment tinst_level_tick.
13439         (pop_tinst_level): Likewise.
13440         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
13441         xrealloc instead of xmalloc.
13442
13443         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
13444
13445 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
13446
13447         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
13448         if the template we looked up is the same as the one we already
13449         have.
13450
13451 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
13452
13453         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
13454         (cpp_reader,parse_in): Add for cpplib.
13455         (check_newline): Call handle_sysv_pragma with new interface.
13456         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
13457
13458         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
13459         (sub_getch): Call GETC for cpplib.
13460
13461         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
13462         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
13463
13464         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
13465
13466 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
13467
13468         * decl2.c (maybe_make_one_only): New fn.
13469         (import_export_vtable): Use it.
13470         (import_export_decl): Likewise.
13471         * pt.c (mark_decl_instantiated): Likewise.
13472
13473 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
13474
13475         * decl2.c (find_representative_member): Rename to ...
13476         (build_anon_union_vars): New function.
13477         (finish_anon_union): Fix stupidity of previous change.
13478
13479 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
13480
13481         * decl.c (grokfndecl): Handle definition of specialization in
13482         friend declaration.
13483
13484         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
13485
13486 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
13487
13488         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
13489         to look for type declarations.
13490         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
13491         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
13492         (finish_member_class_template): Declare.
13493         * decl.c (pushtag): Put member class templates on the
13494         CLASSTYPE_TAGS list, just as for ordinary member classes.
13495         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
13496         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
13497         IDENTIFIER_NAMESPACE_VALUEs.
13498         * parse.y (component_decl): Move code to ...
13499         * semantics.c (finish_member_class_template): New function.
13500         Don't put member class templates on the list of components for a
13501         class.
13502         * parse.c: Regenerated.
13503         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
13504         In fact, don't use DECL_CONTEXT at all here.
13505
13506 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
13507
13508         * decl.c (record_unknown_type): New function.
13509         (init_decl_processing): Call it for the unknown and global type
13510         nodes.
13511
13512 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
13513
13514         * decl2.c (find_representative_member): New function.
13515         (finish_anon_union): Use it.
13516
13517         * cp-tree.h (MAIN_NAME_P): New macro.
13518         (DECL_MAIN_P): Likwise.
13519         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
13520         (grokfndecl): Use the new macros.
13521         (grokdeclarator): Likewise.
13522         (start_function): Likewise.
13523         (store_parm_decls): Likewise.
13524         (finsh_function): Likewise.
13525         * friend.c (do_friend): Likewise.
13526         * typeck.c (build_function_call_real): Likewise.
13527         (build_unary_op): Likewise.
13528
13529 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
13530
13531         * decl2.c (start_objects, finish_objects, do_dtors,
13532         do_ctors): Split out from...
13533         (finish_file): ...here.
13534
13535 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
13536
13537         * tree.c (is_overloaded_fn): Don't abort on placeholders from
13538         push_class_decls.
13539
13540 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
13541
13542         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
13543
13544         * error.c (dump_expr): Handle an ARROW_EXPR.
13545
13546 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
13547
13548         * decl.c (saveable_obstack): Declare.
13549         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
13550         declare, if necessary.
13551
13552 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
13553
13554         * call.c (compare_qual): Remove.
13555         (is_subseq): Tweak.
13556         (is_properly_derived_from): New function.
13557         (maybe_handle_ref_bind): Likewise.
13558         (maybe_handle_implicit_object): Likewise.
13559         (compare_ics): Modify substantially to bring into conformance with
13560         the standard.
13561         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
13562         (comp_cv_qualification): Declare.
13563         (comp_cv_qual_signature): Likewise.
13564         * typeck.c (comp_cv_qualification): Likewise.
13565         (comp_cv_qual_signature): Likewise.
13566
13567 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13568
13569         * Makefile.in (parse.o): Depend on toplev.h.
13570
13571         * class.c (typecode_p): Remove prototype and definition.
13572
13573         * cp-tree.h (currently_open_class, is_empty_class, member_p):
13574         Add prototype.
13575
13576         * decl.c (push_overloaded_decl_top_level): Remove prototype and
13577         definition.
13578
13579         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
13580         in call to `cp_thing'.
13581         (cp_warning): Likewise for function pointer `warning'.
13582
13583         * except.c (do_function_call): Remove prototype and definition.
13584         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
13585
13586         * method.c (is_java_type): Add prototype and make it static.
13587
13588         * parse.y: Include toplev.h.
13589
13590         * pt.c (type_unification): Remove unused variable `arg'.
13591         (instantiate_decl): Likewise for `save_ti'.
13592
13593         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
13594
13595 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
13596
13597         * init.c (build_member_call): Handle template_ids.
13598         * parse.y (primary): Add global_scope template_id.
13599
13600 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
13601
13602         * decl2.c (get_sentry): Use end_temporary_allocation.
13603         Don't declare permanent_obstack.
13604
13605 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
13606
13607         * parse.y (.finish_new_placement): New non-terminal.
13608         (unary_expr, new_type_id): Use it.
13609         * parse.c: Regenerated.
13610
13611 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
13612
13613         * pt.c (redeclare_class_template): Say where the original definition
13614         of the template-parameter's default argument appeared.
13615
13616 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
13617
13618         * call.c (build_over_call): Tweak empty class handling.
13619
13620         * decl.c (make_typename_type): Use currently_open_class.
13621
13622         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
13623
13624 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
13625
13626         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
13627         for a type unless it is one.
13628
13629         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
13630
13631 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
13632
13633         * Makefile.in (program_transform_name, objdir): Define.
13634
13635         * Makefile.in (BISON): Use bison from the build tree if it exists.
13636         (FLEX): Likewise.
13637
13638 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
13639
13640         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
13641
13642         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
13643
13644 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
13645
13646         * call.c (build_scoped_method_call): Likewise.
13647
13648 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
13649
13650         * init.c (build_new_1): Call suspend_momentary around the creation
13651         of values that must be saved for exception handling.
13652         * parse.y (.build_new_placement): New non-terminal.
13653         (unary_expr, new_placement): Use it.
13654         * parse.c: Regenerated.
13655
13656 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
13657
13658         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
13659         old and new types.
13660
13661         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
13662         canonical type.
13663
13664         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
13665
13666 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
13667
13668         * decl.c (start_decl): Revert problem change.
13669
13670         * Makefile.in (CONFLICTS): Fix.
13671
13672 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13673
13674         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
13675
13676 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
13677
13678         * class.c (finish_struct_1): Use BINFO_SIZE.
13679
13680         * decl.c (start_decl): Use 'tem'.
13681
13682 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
13683
13684         * exception.cc: Include eh-common.h.
13685         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
13686         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
13687         (__cp_push_exception): Initialize eh_info struct as well.
13688         * except.c: Remove local structs and include eh-common.h.
13689         (init_exception_processing): Set language and version codes.
13690         (call_eh_info): Add presence of eh_info to runtime description of
13691         struct cp_eh_info.
13692         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
13693         * semantics.c (finish_try_block): Call start_catch_block() and
13694         end_catch_block().
13695         * parse.y (function_try_block): Call start_catch_block() and
13696         end_catch_block().
13697
13698 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
13699
13700         * typeck.c (original_type): New function.
13701         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
13702         to see if they're actually the same.
13703         * cp-tree.h (original_type): Declare.
13704
13705 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13706
13707         * Makefile.in (lex.o): Depend on output.h.
13708
13709         * call.c (add_function_candidate): Remove unused variable `cand'.
13710         (add_conv_candidate): Likewise.
13711         (build_builtin_candidate): Likewise.
13712
13713         * cp-tree.h: Add prototype for `types_overlap_p'.
13714
13715         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
13716
13717         * decl2.c (merge_functions): Remove unused variables `tmp' and
13718         `tempn'.
13719
13720         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
13721         (code_as_string): Likewise.
13722         (language_as_string): Likewise.
13723         (parm_as_string): Likewise.
13724         (op_as_string): Likewise.
13725         (assop_as_string): Likewise.
13726         (cv_as_string): Likewise.
13727
13728         * lex.c: Include output.h.
13729
13730         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
13731
13732         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
13733         ATTRIBUTE_UNUSED.
13734
13735         * tinfo.cc (__class_type_info::dcast): Change the type of variable
13736         `i' from int to size_t.
13737
13738         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
13739         ATTRIBUTE_UNUSED.
13740
13741 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
13742
13743         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
13744         DECL_NAMESPACE_SCOPE_P.
13745         (lang_decl_name): Likewise.
13746         * pt.c (tsubst_friend_function, tsubst): Likewise.
13747         * decl.c (pushdecl, redeclaration_error_message, start_decl,
13748         cp_finish_decl, start_function): Likewise.
13749         * class.c (finish_struct_1): Likewise.
13750         * call.c (build_over_call): Likewise.
13751         (compare_ics): Use DERIVED_FROM_P.
13752
13753 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
13754
13755         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
13756         * method.c (build_mangled_name): Use it.
13757         (build_decl_overload_real): Likewise.
13758
13759         * error.c (dump_simple_decl): New function, broken out from ...
13760         (dump_decl): Use it.
13761
13762 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
13763
13764         * ptree.c (lang_print_xnode): Add missing `break'.
13765
13766         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
13767
13768         * call.c (add_template_candidate): Adjust for changes to
13769         fn_type_unification.
13770         (add_template_candidate_real): Likewise.
13771         (add_template_conv_candidate): Likewise.
13772         (build_user_type_conversion_1): Likewise.
13773         (build_new_function_call): Likewise.
13774         (build_object_call): Likewise.
13775         (build_new_op): Likewise.
13776         (build_new_method_call): Likewise.
13777         * class.c (instantiate_type): Likewise.
13778         * cp-tree.h (unification_kind_t): New type.
13779         (fn_type_unification): Adjust prototype.
13780         (type_unificaiton): Likewise.
13781         * pt.c (UNIFY_ALLOW_NONE): New macro.
13782         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
13783         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
13784         (UNIFY_ALLOW_DERIVED): Likewise.
13785         (unify): Change prototype.
13786         (maybe_adjust_types_for_deduction): New function.
13787         (check_cv_quals_for_unify): Likewise.
13788         (determine_specialization): Adjust.
13789         (fn_type_unification): Likewise.
13790         (type_unification): Likewise.
13791         (type_unification_real): Likewise.  Use
13792         maybe_adjust_types_for_deduction.  Fix mishandling of
13793         back-unification of template functions passed as arguments.  Pass
13794         appropriate combination of UNIFY_ALLOW_* to unify.
13795         (unify): Remove unused NTPARMS parameter.  Use
13796         check_cv_quals_for_unify.  Remove bogus code that allowed
13797         too-generous unification in order to adhere more closely to standard.
13798         (get_bindings_real): Adjust.
13799         (get_class_bindings): Likewise.
13800
13801         * method.c (build_overload_identifier): Only use the innermost
13802         template arguments when mangling.
13803         * pt.c (tsubst_template_argument_vector): New function.
13804         (complete_template_args): Deal with the situation where the
13805         extra_args contain more than one level of arguments.
13806         (lookup_template_class): Deal with member template classes, which
13807         may have more than one level of arguments.
13808         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
13809         Improve handling of member template classes.  Use
13810         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
13811         tsubst_template_argument_vector where appropriate.
13812         (regenerate_decl_from_template): Break out from ...
13813         (instantiate_decl): Here.
13814
13815         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
13816         * parse.h: Regenerated.
13817         * parse.c: Really regenerated.
13818
13819         * cp-tree.h (finish_unary_op_expr): New function.
13820         (finish_id_expr): Likewise.
13821         (begin_new_placement): Likewise.
13822         (finish_new_placement): Likewise.
13823         (finish_declarator): Likewise.
13824         (finish_translation_unit): Likewise.
13825         (finish_parmlist): Likewise.
13826         (begin_class_definition): Likewise.
13827         (finish_class_definition): Likewise.
13828         (finish_default_args): Likewise.
13829         (finish_inline_definitions): Likewise.
13830         * parse.y (GCC_ASM_KEYWORD): Remove.
13831         (TYPENAME_ELLIPSIS): Likewise.
13832         * parse.c: Regenerated.
13833         Use new functions in semantics.c in the actions for many rules.
13834         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
13835         * hash.h: Regenerated.
13836         * semantics.c (finish_expr_stmt): Allow NULL expr.
13837         (finish_unary_op_expr): New function, containing
13838         code previously in parse.y.
13839         (finish_id_expr): Likewise.
13840         (begin_new_placement): Likewise.
13841         (finish_new_placement): Likewise.
13842         (finish_declarator): Likewise.
13843         (finish_translation_unit): Likewise.
13844         (finish_parmlist): Likewise.
13845         (begin_class_definition): Likewise.
13846         (finish_class_definition): Likewise.
13847         (finish_default_args): Likewise.
13848         (finish_inline_definitions): Likewise.
13849
13850 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
13851
13852         * typeck.c (build_c_cast): Don't decay arrays and functions to
13853         pointer type when converting to a class type.
13854
13855 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
13856
13857         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
13858         (DECL_CLASS_SCOPE_P): Likewise.
13859
13860 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
13861
13862         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
13863         * decl2.c (constructor_name_full): Likewise.
13864
13865 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
13866
13867         * tree.c (mapcar): Add OVERLOAD support.
13868
13869         * init.c (resolve_offset_ref): We must use basetype_path before we
13870         destroy it with a call to convert_pointer_to.
13871
13872 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
13873
13874         * class.c (currently_open_class): New fn.
13875         * decl.c (lookup_name_real): Use it.
13876         * search.c (lookup_field): Likewise.
13877
13878 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
13879
13880         * cp-tree.def (OVERLOAD): New node.
13881         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
13882         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
13883         (NAMESPACE_BINDING): Remove.
13884         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
13885         namespace_binding.
13886         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
13887         Define.
13888         (tree_overload): New struct.
13889         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
13890         (REAL_IDENTIFIER_TYPE_VALUE): Define.
13891         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
13892         (lang_decl_flags): Remove in_namespace.
13893         (lang_decl): Remove chain.
13894         (DECL_CHAIN, DECL_NAMESPACE): Remove.
13895         (flag_honor_std): Declare extern.
13896         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
13897         namespace_binding, set_namespace_binding,
13898         lookup_function_nonclass, cat_namespace_levels,
13899         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
13900         scratch_ovl_cons, ovl_member, build_overload): Declare.
13901         (decl_list_length, get_namespace_id, current_namespace_id,
13902         overloaded_globals_p): Remove.
13903         (lookup_using_namespace, qualified_lookup_using_namespace): Change
13904         return type.
13905         (push_scratch_obstack): New macro.
13906         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
13907         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
13908         convs, fns.
13909         (build_new_function_call): Iterate using OVL_CHAIN.
13910         Print DECL_NAME in when reporting ambiguities.
13911         (build_object_call): Iterate using OVL_NEXT for fns, convs.
13912         (build_new_op): Call lookup_function_nonclass.
13913         Iterate using OVL_NEXT.
13914         (build_op_delete_call): Change detection of members.
13915         Do not wrap TREE_LIST around fields and single global functions.
13916         (build_over_call): Don't push a class level if the context is a
13917         namespace.
13918         (build_new_method_call): Iterate using OVL_NEXT.
13919         * class.c (add_method): Chain overloaded members using
13920         build_overload.  Remove copying of method.
13921         (grow_method): When iterating through the obstack, expect OVERLOAD
13922         nodes.  Chain overload members.
13923         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
13924         nodes in call to get_baselinks.
13925         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
13926         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
13927         fdecls that are OVERLOAD nodes.
13928         (validate_lhs): New function.
13929         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
13930         code.  Use DECL_NAME in error messages.  Split code between global
13931         and member function processing.
13932         * decl.c (global_type_node): New static variable.
13933         (in_std): New global.
13934         (struct binding_level): New field usings.
13935         (resume_binding_level): Assert that we are not in a class.
13936         (toplevel_bindings_p): Just check for namespace_p or
13937         pseudo_global.
13938         (resume_level): Remove.
13939         (find_binding): New function.
13940         (binding_for_name): Call it.
13941         (namespace_binding, set_namespace_binding): New functions.
13942         (push_namespace): Associate binding level with new namespace,
13943         resume_binding_level for existing namespace.  Remove old code.
13944         Fake std by counting.
13945         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
13946         (maybe_push_to_top_level): Save current namespace.
13947         (pop_from_top_level): Restore saved namespace.
13948         (pop_namespace): Call suspend_binding_level.  Remove old code.
13949         (cat_namespace_levels): New function.
13950         (set_identifier_type_value_with_scope): For namespace bindings,
13951         set BINDING_TYPE, and use global_type_node.
13952         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
13953         (identifier_type_value): New function.
13954         (pushtag): If no context, use current_namespace.
13955         (duplicate_decls): Don't process DECL_CHAIN.
13956         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
13957         already set.  Never reset it to NULL_TREE.  Lookup global variables
13958         in their namespace.  Push overloaded templates if they are on
13959         namespace level.
13960         (pushdecl_namespace_level): New function.
13961         (pushdecl_top_level): Implement using pushdecl_namespace_level.
13962         (pushdecl_using_decl): New function.
13963         (overloaded_globals_p): Remove.
13964         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
13965         them.  Use namespace_binding and set_namespace_value.
13966         (redeclaration_error_message): Complain if the declarations come
13967         from different namespaces.
13968         (lookup_tag): On namespace level, look in the BINDING_TYPE.
13969         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
13970         old code.
13971         (select_decl): New function.
13972         (lookup_name_real): Call it for qualified and unqualified lookup.
13973         Pass tree_bindings from the stack.
13974         If prefer_type is 1, also accept namespaces.
13975         (lookup_function_nonclass): New function.
13976         (init_decl_processing): Set the binding level of the global
13977         namespace to global_binding_level.
13978         Build a proper type list for __builtin_apply.
13979         Initialize std_node to "fake std" if flag_honor_std is set.
13980         Initialize global_type_node.
13981         Allocated bad_alloc in namespace std if flag_honor_std.
13982         (define_function): Set the DECL_CONTEXT to the current_namespace.
13983         (start_decl): A namespace is not considered as a context here.  If
13984         the DECL_CONTEXT is a namespace, push the decl.
13985         (cp_finish_decl): Check for namespaces used as initializers.
13986         (grokfndecl): Add namespace parameter.  Remove processing of
13987         DECL_CHAIN.
13988         (grokvardecl): Add namespace parameter.
13989         (grokdeclarator): Process SCOPEs that are namespaces.  For
13990         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
13991         (start_function): Check for contexts that are namespaces.
13992         Set context for declarations that have not been pushed.
13993         (store_parm_decls): Check for ::main only.
13994         (finish_function): Likewise.
13995         (start_method): Check for contexts that are namespaces.
13996         (start_method): Remove DECL_CHAIN processing.
13997         * decl2.c (flag_honor_std): Declare.
13998         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
13999         (decl_namespace_list): New static global.
14000         (grok_x_components): Ignore namespaces as type contexts.
14001         (check_classfn): Expect OVERLOAD nodes.
14002         (grokfield): Remove DECL_CHAIN processing.
14003         (finish_file): Call cat_namespace_levels.
14004         (merge_functions): New function.
14005         (ambiguous_decl): Rewrite.
14006         (lookup_using_namespace): Produce tree_bindings.
14007         (qualified_lookup_using_namespace): Likewise.
14008         (set_decl_namespace, decl_namespace, current_decl_namespace,
14009         push_decl_namespace, pop_decl_namespace): New functions.
14010         (arg_lookup): New struct.
14011         (add_function, arg_assoc_namespace, arg_assoc_class,
14012         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
14013         New functions.
14014         (get_namespace_id, current_namespace_id): Remove.
14015         (do_toplevel_using_decl): Rewrite.
14016         (do_class_using_decl): Complain about namespace qualifiers.
14017         (do_using_directive): Sorry if not on namespace level.  Complain
14018         about unknown namespaces.
14019         * error.c (dump_aggr_type): Check for namespace contexts.
14020         * except.c (init_exception_processing): Push terminate into std.
14021         * friend.c (is_friend): A namespace is not a context, here.
14022         * init.c (expand_member_init): Remove DECL_CHAIN processing.
14023         (build_offset_ref): Process OVERLOAD nodes.
14024         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
14025         * lex.c (identifier_type): Loop using OVL_CHAIN.
14026         (see_typename): Set looking_for_typename to 2.
14027         (real_yylex): Likewise.
14028         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
14029         (do_scoped_id): Expect OVERLOAD nodes.
14030         Change calling convention for qualified_lookup_using_namespace.
14031         (build_lang_decl): Don't set in_namespace anymore.
14032         * method.c (typevec_size): New global.
14033         (build_overload_nested_name): Return if global_namespace.
14034         Otherwise, always expect a declaration context.
14035         (build_qualified_name): Likewise.
14036         Make sure we don't write beyond typevec_size.
14037         (build_decl_overload_real): Likewise.
14038         Allocate one extra slot for the namespace.
14039         (hack_identifier): Mark code dead.
14040         Process OVERLOAD and NAMESPACE_DECL nodes.
14041         * parse.y (program): Pop namespaces until in global namespace.
14042         (extdef): In a using-declaration, don't discard the identifier if
14043         there is no declaration.
14044         (left_curly): Ignore type contexts which are namespaces.
14045         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
14046         used as scope.
14047         * pt.c (template_class_depth): Expect types to be namespaces.
14048         (determine_specialization): Simplify by expecting OVERLOAD nodes.
14049         (push_template_decl): Push into namespace level.
14050         Reset ctx if it is a namespace.
14051         Set DECL_CONTEXT to current_namespace if not set already.
14052         Ignore real contexts that are namespaces.
14053         (mangle_class_name_for_template): Skip global_namespace.
14054         Mangle other namespaces as declarations.
14055         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
14056         (lookup_template_class): Push into namespace of context.
14057         If the context is a namespace, set it to global_namespace.
14058         Use id_context for mangling.
14059         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
14060         (tsubst_friend_function): Ignore namespace contexts.
14061         Push into namespace level.
14062         (tsubst): Handle NAMESPACE_DECL nodes.
14063         Remove DECL_CHAIN processing.
14064         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
14065         * ptree.c (print_lang_identifier): Print bindings.
14066         (lang_print_xnode): Print OVERLOAD nodes.
14067         * rtti.c (init_rtti_processing): Push type_info into std.
14068         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
14069         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
14070         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
14071         lookup_fnfields_here): Likewise.
14072         Process all nodes, instead of going through TREE_CHAIN.
14073         * sig.c (build_signature_pointer_or_reference_type): Set context
14074         to global_namespace.
14075         (build_signature_table_constructor): Expect OVERLOAD nodes.
14076         * spew.c (yylex): Save old setting of looking_for_typename.
14077         * tree.c (decl_list_length): Remove.
14078         (binding_init): New function.
14079         (count_functions): Rewrite.
14080         (is_overloaded_fn): Expect OVERLOAD nodes.
14081         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
14082         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
14083         ovl_member): New functions.
14084         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
14085         (type_unknown_p): Likewise.
14086         (require_instantiated_type): Likewise.
14087         (build_component_ref): Declare code dead.
14088         (build_x_function_call): Create and expect OVERLOAD nodes.
14089         (build_function_call_real): Check for ::main only.
14090         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
14091         (convert_for_assignment): Check for TREE_LIST before accessing
14092         TREE_VALUE.
14093         * decl.c (duplicate_decls): Check for namespace bindings instead
14094         of global bindings.
14095         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
14096         lookup_name_current_level, start_decl, xref_tag,
14097         finish_enum): Likewise.
14098         * init.c (build_offset_ref): Likewise.
14099         * search.c (lookup_field): Likewise.
14100         (lookup_fnfields): Likewise.
14101         (dfs_debug_mark): Likewise.
14102         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
14103         (poplevel_class, pop_from_top_level): Likewise.
14104         * decl2.c (finish_method): Likewise.
14105         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
14106         * decl.c (record_builtin_type): Likewise.
14107         (init_decl_processing, grokfndecl): Likewise.
14108         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
14109         (make_lang_type): Likewise.
14110         * parse.y (make_thunk): Likewise.
14111         * pt.c (tsubst): Likewise.
14112         * tree.c (debug_binfo): Likewise.
14113         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
14114         tinfo2.cc, inc/new.h: Add std qualifications.
14115         * inc/new: Wrap with namespace std if __HONOR_STD.
14116         * inc/typeinfo: Likewise.
14117
14118 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
14119
14120         * call.c (build_user_type_conversion_1): Handle second_conv
14121         properly for templates.
14122
14123 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
14124
14125         * method.c (build_decl_overload_real): Set TREE_USED flag to
14126         zero for build_type_variants nodes as well.
14127
14128 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
14129
14130         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
14131
14132 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
14133
14134         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
14135         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
14136         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
14137         xref.o): Add toplev.h dependencies.
14138
14139 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
14140
14141         * errfn.c (cp_error, cp_warning): Remove declarations for
14142         error and warning respectively.
14143
14144 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14145
14146         * error.c: Convert to using ctype macros defined in system.h.
14147         * method.c: Likewise.
14148         * xref.c: Likewise.
14149         * lex.c: Likewise.  Also remove redundant system header stuff.
14150
14151 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
14152
14153         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
14154         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
14155         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
14156         xref.c: Add include of toplev.h.
14157
14158 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
14159
14160         * tree.c (perm_manip): Also regenerate the RTL of an extern.
14161         (copy_to_permanent): Use end_temporary_allocation.
14162
14163 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
14164
14165         * init.c (expand_vec_init): The initialization of each array
14166         element is a full-expression.
14167
14168 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
14169
14170         * method.c (build_mangled_name): Add a call to build_type_variant
14171         to get the right type.
14172
14173 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
14174
14175         * Makefile.in: Add .SUFFIXES.
14176
14177         * cp-tree.def: Remove NAMESPACE_DECL.
14178
14179 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
14180
14181         * call.c (build_over_call): Do evaluate arg even if it has empty
14182         class type.
14183         * decl.c (start_function): Don't push a member function.
14184
14185 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
14186
14187         * Makefile.in (g++FAQ.info): Put -o option before input file.
14188
14189 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
14190
14191         * gxxint.texi: Add info for squangling codes K and B.
14192
14193 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
14194
14195         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
14196         the expression in templates.
14197         (finish_stmt_expr): Likewise.
14198
14199 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
14200
14201         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
14202
14203 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
14204
14205         * decl.c (maybe_push_to_top_level): Always clear
14206         current_template_parms and processing_template_decl.
14207         (pushtag): Remove check of current_class_type and some comments,
14208         since maybe_push_to_top_level no longer creates confusion.
14209
14210 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
14211
14212         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
14213         (DECL_CLASS_TEMPLATE_P): Likewise.
14214         (DECL_PRIMARY_TEMPLATE): Likewise.
14215         (PRIMARY_TEMPLATE_P): Use it.
14216         (push_template_decl_real): New function.
14217         (redeclare_class_template): Take new template parameters as
14218         input.
14219         (is_specialization_of): New function.
14220         (comp_template_args): Declare.
14221         * decl.c (pushtag): Handle friend template classes.
14222         (xref_tag): Likewise.  Use new calling convention for
14223         redeclare_class_template.
14224         * decl2.c (grok_x_components): Handle friend templates.
14225         * friend.c (is_friend): Use is_specialization_of where
14226         appropriate.  Deal with friend class templates.
14227         (make_friend_class): Let a class template be friends with itself.
14228         * pt.c (comp_template_args): Remove declaration.
14229         (tsubst_friend_class): New function.
14230         (push_template_decl_real): New function.
14231         (push_template_decl): Use it.
14232         (redeclare_class_template): Adjust for new calling convention.
14233         (comp_template_args): Give it external linkage.
14234         (instantiate_class_type): Use tsubst_friend_class to deal
14235         with friend templates.
14236         * typeck.c (comptypes): Use comp_template_args, rather than
14237         expanding it inline.
14238         * parse.y (component_decl): Handle a nested template type
14239         like other component type declarations.
14240
14241         * pt.c (check_explicit_specialization): Handle overloaded
14242         constructors correctly.
14243
14244         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
14245         (lookup_template_class): Use it.
14246
14247 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
14248
14249         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
14250         * cp-tree.h: Add WRAPPER support.
14251         * call.c (add_candidate): Split out from add_*_candidate fns.
14252         (build_over_call): Take the candidate instead of function and args.
14253         Enforce access control here.  Emit overload warnings here.
14254         (add_warning): New fn.
14255         (joust): Add WARN parm.  If not set, call add_warning instead of
14256         printing a warning.  Re-enable some warnings.
14257         (tourney): Pass it.
14258         (convert_like): Adjust.
14259         (build_new_op): Adjust.
14260         (build_new_function_call): Adjust.
14261         (build_user_type_conversion_1): Adjust.
14262         (USER_CONV_FN): Adjust.
14263         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
14264         build_int_wrapper): New fns.
14265
14266 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
14267
14268         * pt.c (unify): Fix typo in previous change.
14269
14270 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
14271
14272         * error.c (dump_type_real): Declare canonical_name.
14273
14274         * typeck.c (comp_target_types): Fix PMFs.
14275
14276 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
14277
14278         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
14279         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
14280         TEMPLATE_DECL.
14281
14282         * pt.c (tsubst): Decrease the template-level of
14283         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
14284         TEMPLATE_PARM_INDEX.
14285         (template_decl_level): New function.
14286         (unify): Make sure to record unifications for template
14287         parameters, even when the parameters exactly match the arguments.
14288         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
14289         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
14290         aren't from the level we're currently working on.
14291
14292 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
14293
14294         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
14295
14296         * decl2.c (check_member_template): Set DECL_IGNORED for member
14297         class templates, too.
14298
14299         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
14300
14301 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14302
14303         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
14304
14305 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
14306
14307         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
14308         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
14309         (init_decl_processing): Handle TI types.
14310         * typeck.c (unsigned_type, signed_type): Handle TI types.
14311
14312 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
14313
14314         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
14315         New local added_libraries.  Increment count when add library to
14316         arglist.
14317
14318 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
14319
14320         * cp-tree.h (type_as_string_real): New function.
14321         * pt.c (mangle_class_name_for_template): Use it.
14322         * error.c (dump_aggr_type): Change prototype.
14323         (dump_type_prefix): Likewise.
14324         (dump_type_suffix): Likewise.
14325         (dump_type_real): Convert from dump_type.  If desired, the
14326         "canonica" name of a typedef, i.e., the name of the underlying
14327         type, can be printed.
14328         (dump_type): Call dump_type_real.
14329
14330 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
14331
14332         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
14333
14334         * typeck.c (comp_target_types): Tweak pedantic case.
14335         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
14336         Return -1 or 1 instead of 1 or 2.
14337         (compparms): Remove STRICT handling.
14338         (convert_for_assignment): Fix handling of pmfs.
14339
14340 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
14341
14342         * typeck.c (comp_target_types): Handle references like pointers.
14343         (comp_target_parms): Note that return code from comp_target_types
14344         can be negative to indicate failure.
14345
14346 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14347
14348         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
14349         which requires a working target compiler to build.
14350
14351 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
14352
14353         * tree.c (avoid_overlap): Add prototype.
14354
14355         * spew.c (num_tokens): Add prototype.
14356         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
14357
14358         * search.c (dfs_check_overlap): Add prototype.
14359         (dfs_no_overlap_yet): Likewise.
14360
14361         * pt.c (original_template): Add prototype.
14362         (inline_needs_template_parms): Likewise.
14363         (push_inline_template_parms_recursive): Likewise.
14364         (retrieve_specialization, register_specialization): Likewise.
14365         (print_candidates, reduce_template_parm_level): Likewise.
14366         (build_template_decl, mark_template_parm): Likewise.
14367         (tsubst_friend_function, get_bindings_real): Likewise.
14368
14369         * method.c (start_squangling): Add prototype.
14370         (end_squangling, check_ktype, issue_ktype): Likewise.
14371         (build_overloaded_scope_ref, check_btype): Likewise.
14372         (build_mangled_template_parm_index): Likewise.
14373
14374         * lex.c (init_cpp_parse): Add prototype.
14375         (handle_cp_pragma, handle_sysv_pragma): Likewise.
14376         (reduce_cmp, token_cmp): Likewise.
14377
14378         * except.c (call_eh_info): Add prototype.
14379         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
14380         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
14381
14382         * decl2.c (is_namespace_ancestor): Add prototype.
14383         (namespace_ancestor, add_using_namespace): Likewise.
14384         (ambiguous_decl): Likewise.
14385
14386         * decl.c (indent): Add prototype.
14387
14388         * call.c (add_template_candidate_real): Add prototype.
14389
14390 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
14391
14392         * decl2.c (build_expr_from_tree): Just return a PMF.
14393
14394 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
14395
14396         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
14397         when doing initializations.
14398
14399         * pt.c (unify): Use comptypes to compare type args.
14400
14401 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
14402
14403         * decl.c (duplicate_decls): Fix check for when it's safe to free
14404         the new decl.
14405
14406         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
14407         to type_as_string.
14408
14409 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
14410
14411         * pt.c (build_template_parm_index): Add prototype.
14412
14413         * search.c (my_tree_cons): Don't clear words outside the
14414         newly allocated node.
14415
14416 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
14417
14418         * lex.c (init_parse): Now returns char* containing the filename.
14419
14420 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
14421                           Jeff Law   <law@cygnus.com>
14422
14423         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
14424         than a pointer.
14425
14426 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14427
14428         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
14429
14430 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
14431
14432         * decl.c (duplicate_decls): Don't warn for redundant decls if
14433         friend: let add_friend take care of it.
14434
14435 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
14436
14437         * sig.c (build_signature_pointer_constructor): Don't set
14438         TREE_HAS_CONSTRUCTOR for a signature pointer.
14439         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
14440         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
14441         here, too.
14442         * typeck.c (build_unary_op): Only allow taking the address of a
14443         real constructor.
14444         * typeck2.c (digest_init): Simplify.
14445         (store_init_value): Don't pedwarn about using { } for pmfs.
14446
14447 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
14448
14449         * cp-tree.h (start_decl):  Update prototype.
14450         * decl.c (start_decl):  Like the C version, new parameters
14451         for the attributes.  Call cplus_decl_attributes here,
14452         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
14453         (grokdeclarator):  Pass NULL for new start_decl arguments.
14454         * pt.c (tsubst_expr):  Likewise.
14455         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
14456         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
14457         * lex.c (build_lang_decl): Add lang_name_java.
14458         * class.c (push_lang_context): Add lang_name_java.
14459         * method.c (build_mangled_name): Check for is_java_type.
14460
14461 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
14462
14463         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
14464         * call.c (build_scoped_method_call): Check for TREE_CODE for
14465         VOID_TYPE instead of type ==  void_type_node.
14466         (build_method_call): Likewise.
14467         * decl.c (lookup_name_real): Likewise.
14468         (grokdeclarator): Likewise.
14469         (start_decl): Likewise.
14470         (grokparms): Likewise.
14471         (start_function): Likewise.
14472         (finish_function): Likewise.
14473         (start_method): Likewise.
14474
14475 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
14476
14477         * lex.c (finput): New variable.
14478         (init_cpp_parse):  Renamed from init_parse.
14479         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
14480         (finish_parse): New function.
14481         * cp-tree.h (init_lex, init_parse): Remove declarations.
14482
14483 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
14484
14485         * call.c (build_call): Still evaluate the actual argument.
14486         * class.c (is_empty_class): Update for -fnew-abi.
14487
14488         * decl2.c: -fnew-abi implies -fsquangle.
14489
14490         * method.c (do_build_assign_ref): Don't do anything to copy
14491         an empty class.
14492         (do_build_copy_constructor): Likewise.
14493         * call.c (build_over_call): Likewise.
14494
14495 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
14496
14497         * tree.c (avoid_overlap): Return a value.
14498
14499 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
14500
14501         * method.c (check_btype): Add missing argument to xrealloc.
14502         (check_ktype): Likewise.
14503
14504 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
14505
14506         Implement empty base optimization.
14507         * class.c (finish_struct_1): Add vbase fields earlier.  Set
14508         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
14509         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
14510         (types_overlap_p): New fn.
14511         * tree.c (avoid_overlap): New fn.
14512         (build_base_fields): Use it to avoid overlapping empty bases.
14513         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
14514
14515         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
14516
14517         Re-implement allocation of base class subobjects.
14518         * tree.c (unshare_base_binfos): New fn.
14519         (layout_basetypes): Use it.  Now handles offsets of both virtual and
14520         non-virtual bases, after layout_type.
14521         (layout_vbasetypes): Remove.
14522         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
14523         (build_vbase_pointer_fields): Split out from old layout_basetypes.
14524         * class.c (finish_base_struct): Lose offset handling code.
14525         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
14526         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
14527         * cp-tree.h: Adjust.
14528
14529 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
14530
14531         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
14532         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
14533         * class.c (duplicate_tag_error): Likewise.
14534         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
14535         * tree.c (layout_vbasetypes): Update from layout_record, remove
14536         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
14537         (layout_basetypes): Likewise.
14538
14539 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
14540
14541         * class.c, Make sure system.h is included just after config.h.
14542         Delete lingering stdio and errno references too.
14543         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
14544
14545 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
14546
14547         * friend.c (is_friend): Fix access control for local classes.
14548
14549         * class.c (is_empty_class): New fn.
14550         * call.c (build_call): Don't pass empty class objects to a function.
14551
14552 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
14553
14554         * call.c (build_over_call): Do name resolution for default
14555         arguments of function templates in the scope of the templates.
14556
14557 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
14558
14559         * call.c: Include system.h.  Remove includes, declarations and
14560         defines provided by system.h.
14561         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
14562         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
14563         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
14564         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
14565         * typeck2.c, xref.c: Likewise.
14566         * Makefile.in: Dependencies updated as appropriate.
14567         * Make-lang.in: Likewise.
14568
14569 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
14570
14571         * pt.c (fn_type_unification): Allow incomplete unification without
14572         an immediate error message.
14573
14574 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
14575
14576         * tree.c (member_p): New fn.
14577         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
14578         initializing class members.
14579
14580         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
14581         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
14582
14583         * call.c (build_method_call): Handle non-scoped destructors, too.
14584         * pt.c (tsubst_copy): Likewise.
14585
14586         * pt.c (print_template_context): Split out...
14587         (push_tinst_level): ...from here.
14588
14589         * friend.c (is_friend): Don't pass a type to decl_function_context.
14590
14591         * typeck.c (convert_for_initialization): Always hand off
14592         conversions to class type.
14593
14594 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
14595
14596         * friend.c (is_friend): Local classes have the same access as the
14597         enclosing function.
14598
14599 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
14600
14601         * typeck.c (expand_target_expr): Delete dead function.
14602
14603         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
14604
14605         * repo.c (save_string): Delete dead function.
14606
14607         * method.c (thunk_printable_name): Delete dead function.
14608
14609         * lex.c (yynextch): Delete dead function.
14610
14611         * expr.c (tree_extract_aggr_init): #if 0 out.
14612
14613         * except.c (do_unwind): Delete dead function.
14614         (easy_expand_asm): Likewise.
14615
14616         * cvt.c (build_conversion_type_1): Delete dead function.
14617
14618         * cp-tree.h (push_expression_obstack): Declare.
14619
14620         * call.c (source_type): #if 0 out.
14621
14622         * class.c (alter_access): Remove unused label.  Add braces
14623         around empty else clause.
14624
14625         * lex.c (yyprint): Fix argument to printf.
14626
14627 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
14628
14629         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
14630
14631         * pt.c (instantiate_class_template): Make sure template
14632         arguments are permanent.
14633         * init.c (resolve_offset_ref): Don't go looking around in
14634         template types.
14635
14636         * semantics.c: Add routines to handle expressions, and some
14637         declaration processing.
14638         * parse.y: Use them.
14639         (current_class_depth): Move declaration to cp-tree.h.
14640         * parse.c: Regenerated.
14641         * cp-tree.h: Use them.
14642         (current_class_depth): Declare.
14643         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
14644
14645 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
14646
14647         * error.c (dump_decl): Be a bit more explicit with template
14648         type arguments, when verbose.
14649
14650 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
14651
14652         * inc/exception: Reorder closing braces.
14653
14654 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
14655
14656         * pt.c (redeclare_class_template): New function.
14657         * cp_tree.h (redeclare_class_template): Declare it.
14658         * decl.c (xref_tag): Use it.
14659
14660 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
14661
14662         * call.c (build_over_call): Check IS_AGGR_TYPE, not
14663         TYPE_LANG_SPECIFIC.
14664         * typeck.c (convert_arguments): Likewise.
14665
14666         * decl.c (grokdeclarator): Remove const and volatile from type after
14667         setting constp and volatilep.
14668
14669         * class.c (finish_struct_1): Don't warn about bool bitfield larger
14670         than one bit.
14671
14672 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
14673
14674         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
14675
14676 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
14677
14678         * call.c (build_object_call): Complain about ambiguous operator(),
14679         rather that crashing.
14680         (build_new_op): Likewise.
14681         (build_op_delete_call): Likewise.
14682
14683 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
14684
14685         * cvt.c (perform_qualification_conversions): Use comp_target_types
14686         instead of comp_ptr_ttypes.
14687
14688 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
14689
14690         * cp-tree.h (enforce_access): Declare.
14691         * call.c (enforce_access): Make it extern, not static.
14692         * class.c (alter_access): Use enforce_access; modify code for ISO
14693         compliance, rather than ARM rules.
14694
14695 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14696
14697         * cp-tree.h: Fix typo.
14698
14699 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
14700
14701         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
14702         if (aggregate_value_p (type)).
14703
14704         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
14705
14706 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
14707
14708         * tree.c (mapcar): When dealing with a DECL, use it's constant
14709         value, if any.
14710         * pt.c (lookup_template_class): Don't mangle the names of template
14711         classes whose arguments are unknown.
14712
14713         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
14714
14715 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
14716
14717         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
14718
14719 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
14720
14721         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
14722         boolean_type_node to 1.
14723
14724 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
14725
14726         * error.c (dump_expr): Remove unused variable `l'.
14727
14728         * pt.c (for_each_template_parm): New function, created by
14729         converting uses_template_parms.
14730         (tree_fn_t): New typedef.
14731         (uses_template_parms): Use it.
14732         (mark_template_parm): New function.
14733         (push_template_decl): Check that the argument list of a partial
14734         specialization uses all the template parameters.
14735
14736         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
14737         with it; we might want it for debugging.
14738         * cp-tree.h (type_unification): Change interface.
14739         * class.c (finish_struct_1): Skip nested template types, just like
14740         ordinary nested types.
14741         (instantiate_type): Use new interface to type_unification.
14742         * lex.c (init_lex): Add __sz as opname for sizeof.
14743         * method.c (build_overload_scope_ref): New function.
14744         (build_overload_int): Handle complex expressions.  Set
14745         numeric_output_need_bar if necessary.
14746         (build_overload_value): Handle non-PARM_DECL nodes; this
14747         routine is now used by build_overload_int.  Remove some
14748         assignments to numeric_output_need_bar.  Use
14749         build_overload_scope_ref.
14750         (build_qualified_name): Note that some template mangled names end
14751         with digits, and set numeric_output_need_bar appropriately.  Use
14752         build_underscore_int.
14753         * pt.c (unify): Change interface.
14754         (type_unification_real): Likewise.
14755         (determine_specialization): Use new interfaces.
14756         (tsubst): Deal gracefully with situations in which the argument
14757         vector is not fully filled.
14758         (fn_type_unification): Use new interfaces.
14759         (type_unification): Likewise.  Remove NOP_EXPR hack.
14760         (type_unification_real): Likewise.
14761         (unify): Likewise.  Deal with unification of complex expressions.
14762
14763 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
14764
14765         * pt.c (complete_template_args): Initialize skip properly.
14766
14767         * decl.c (make_typename_type): Revert.
14768         (make_implicit_typename): Remove.
14769         (lookup_name_real): Don't call it.  Call lookup_field if we see a
14770         TYPE_DECL from a template base.
14771         * search.c (lookup_field): Do implicit typename stuff.
14772
14773 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
14774                           Geoff Noer    <noer@cygnus.com>
14775
14776         * Makefile.in: Various fixes for building cygwin32 native toolchains.
14777         * Make-lang.in: Likewise.
14778
14779 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14780
14781         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
14782
14783 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
14784
14785         * decl.c (make_implicit_typename): Rewrite removed code.
14786         (make_typename_type): Call it if the type we look up comes from
14787         a base that uses template parms.
14788
14789         * pt.c (complete_template_args): Rewrite.
14790         (tsubst, FUNCTION_DECL): Use it.
14791
14792 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
14793
14794         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
14795         c_expand_asm_operands () if output_operands, input_operands or
14796         clobbers is not NULL_TREE.
14797
14798 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14799
14800         * pt.c (complete_template_args): New function.
14801         (get_bindings): Deal with specializations of function templates
14802         with return type containing parameters from outer class
14803         templates.
14804         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
14805         substitute arguments and compose a new type.
14806
14807 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
14808
14809         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
14810         FUNCTION_DECLs.
14811
14812 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
14813
14814         * decl.c (make_implicit_typename): Lose useless code.
14815
14816         * call.c (standard_conversion): Handle A* -> const A* properly.
14817
14818         * pt.c (get_bindings_real): Rename from get_bindings.  Add
14819         check_rettype parm.
14820         (get_bindings): Pass 1.
14821         (get_bindings_overload): Pass 0.
14822
14823 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
14824
14825         * pt.c (check_explicit_specialization): When reverting a static
14826         member function, also remove the `this' parameter from
14827         last_function_parms.
14828
14829 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
14830
14831         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
14832         a function context.
14833
14834         * decl.c (store_bindings): Use free_binding_vecs.
14835         (pop_from_top_level): Likewise.
14836
14837 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
14838
14839         * decl.c (make_implicit_typename): Only change the type of a
14840         TYPENAME_TYPE.
14841
14842 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
14843
14844         * semantics.c: New file, containing routines to perform the
14845         semantic phase of parsing.
14846         * parse.y: Use it.
14847         * pt.c (tsubst_expr): Likewise.
14848         * cp-tree.h: Declare the various functions in semantics.c.
14849         Provide macros to access _STMT tree nodes.
14850         * cp-tree.def: Add ASM_STMT tree node.
14851         * Makefile.in, Make-lang.in: Add dependencies on and for
14852         semantics.c.
14853
14854 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
14855
14856         * pt.c (push_template_decl): Only check primary templates.
14857
14858         * pt.c (check_explicit_specialization): Complain about default args
14859         in explicit specialization.
14860
14861         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
14862         constructor_declarator.
14863
14864 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
14865
14866         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
14867         has no overloaded operator ->.
14868
14869         * call.c (build_field_call): Don't crash when presented with a
14870         field that is actually a nested type.
14871
14872         * decl.c (pushtag): Deal with friend class injection in local
14873         classes.
14874
14875         * call.c (build_object_call): Don't crash if OBJ is a
14876         pointer-to-member-function.
14877
14878 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
14879
14880         * pt.c (push_template_decl): Complain about template with C linkage,
14881         anonymous template class.
14882
14883 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
14884
14885         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
14886         * search.c: Likewise.
14887
14888         * lex.c (do_pending_defargs): Only call
14889         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
14890
14891         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
14892
14893 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
14894
14895         * parse.y: Deal with CONSTRUCTORS in new_initializers.
14896
14897 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
14898
14899         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
14900         closely mimics the behavior in parse.y.
14901         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
14902         into a compound statement.
14903
14904 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
14905
14906         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
14907         * pt.c (inline_needs_template_parms): New fn.
14908         (original_template): New fn.
14909         (push_inline_template_parms_recursive): New fn.
14910         (maybe_begin_member_template_processing): Use them.
14911         (maybe_end_member_template_processing): Likewise.
14912         (is_member_or_friend_template): Rename to is_member_template.
14913         Member functions of local classes are never member templates.
14914
14915 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14916
14917         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
14918         added in the class scope to catch redefinition error.
14919
14920         * pt.c (reduce_template_parm_level): Also copy
14921         the DECL_TEMPLATE_PARMS field.
14922
14923 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
14924
14925         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
14926         reduced-level template type parameter.
14927
14928 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14929
14930         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
14931         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
14932         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
14933         * decl.c (duplicate_decls): Propagate it.
14934         * typeck2.c (abstract_virtuals_error): Use two loops to emit
14935         abstract virtual functions and virtual functions which need a
14936         final overrider separately.
14937
14938 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14939
14940         * lang-specs.h: Properly put brackets around array elements in
14941         initializer.
14942
14943         * typeck.c (build_binary_op_nodefault): Correctly place parens around
14944         && and || in expression.
14945
14946 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14947
14948         * call.c (default_parm_conversions): Remove prototype definition.
14949         (build_method_call): Remove unused variable result.
14950
14951         * cvt.c (ocp_convert): Remove unused variable conversion.
14952
14953         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
14954
14955         * except.c (do_unwind): #if 0 definition of unused variables fcall
14956         and next_pc.
14957
14958         * expr.c (extract_scalar_init): #if 0 prototype and function
14959         definition.
14960
14961         * init.c (expand_aggr_init_1): Remove unused variable init_type.
14962         (build_new_1): Remove unused variable t.
14963
14964         * pt.c (instantiate_class_template): Remove unused variable newtag;
14965         cast called function return value to void.
14966         (do_decl_instantiation): Remove unused variables name and fn.
14967
14968         * tree.c (get_type_decl): Add default return to shut up compiler from
14969         complaining control reaches end of non-void function.
14970
14971         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
14972
14973 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14974
14975         * call.c (default_parm_conversions): Remove prototype definition.
14976         (build_method_call): Remove unused variable result.
14977         (build_over_call): Add default case in enumeration switch.
14978
14979 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14980
14981         * decl2.c (lang_decode_option): Change j's type to size_t.
14982
14983         * tree.c (layout_vbasetypes): record_align and desired_align are of
14984         type unsigned int; const_size and nonvirtual_const_size likewise.
14985
14986 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
14987
14988         * parse.y (new_initializer): Make sure all initializers are
14989         lists.
14990
14991 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
14992
14993         * decl2.c (import_export_decl): Mark tinfo functions for
14994         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
14995
14996 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
14997
14998         * method.c: Fix typo.
14999
15000 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15001
15002         * method.c: Include "system.h" to get stdlib.h, stdio.h,
15003         ctype.h, string.h, etc.
15004         (issue_nrepeats): Add default case in enumeration switch.
15005         (check_btype): Likewise.
15006         (process_overload_item): Likewise.
15007
15008         * Makefile.in (method.o): Depend on system.h.
15009
15010 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
15011
15012         * lex.c (do_scoped_id): Fix parenthesizing.
15013
15014 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
15015
15016         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
15017         FLAG_RTTI is unset, initialize type info machinery and continue
15018         with FLAG_RTTI enabled.
15019         (get_typeid): Likewise.
15020
15021 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
15022
15023         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
15024         from B.
15025
15026 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
15027
15028         * pt.c (finish_member_template_decl): Deal more gracefully with
15029         invalid declarations.
15030
15031 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
15032
15033         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
15034         cp-tree.h: Clean up more old overloading code, old RTTI code, and
15035         some formatting quirks.
15036
15037         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
15038         method.c, pt.c, ptree.c, typeck.c: Remove support for
15039         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
15040         * class.h: Remove.
15041         * Makefile.in: Adjust.
15042
15043         * pt.c (unify): Don't allow reduced cv-quals when strict.
15044
15045         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
15046         *type_unification* and unify.
15047
15048 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
15049
15050         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
15051         (nested_name_specifier): And add it before this use.
15052         (typename_sub0): And this use.  Also add use without the keyword.
15053         (typename_sub1): Likewise.
15054         * pt.c (instantiate_class_template): Don't actually instantiate
15055         anything if our type uses template parms.
15056
15057 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
15058
15059         * decl.c (start_function): Don't call temporary_allocation for a
15060         nested function.
15061
15062 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
15063
15064         * pt.c (instantiate_class_template): Don't mess with friends if
15065         our type uses template parms.
15066
15067 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
15068
15069         * parse.y (nested_name_specifier): Use explicit_template_type.
15070         (typename_sub): Allow a template_type, an explicit_template_type,
15071         or an implicit template type at the end.
15072         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
15073         * decl.c (make_typename_type): Handle template-id where the name
15074         is a TEMPLATE_DECL.
15075         * call.c (build_scoped_method_call): Handle member template
15076         destructor call.
15077         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
15078         destructor is represented by the type.
15079
15080         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
15081         * parse.y (nested_name_specifier): Add 'template' case.
15082         (explicit_template_type): New rule.
15083         (typename_sub): Use it.
15084         * decl.c (make_typename_type): Handle getting a template-id for NAME.
15085         * pt.c (tsubst): Likewise.
15086
15087 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
15088
15089         * pt.c (add_to_template_args): Fix thinko.
15090         (instantiate_class_template): Call it later.
15091
15092         * pt.c (get_class_bindings): Add outer_args parm.
15093         (most_specialized_class): Likewise.
15094         (instantiate_class_template): Pass it.
15095         (more_specialized_class): Likewise.
15096         (lookup_template_class): Get context from template if none
15097         was specified.
15098         (finish_member_template_decl): Don't do anything with a
15099         partial specialization.
15100         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
15101         AGGREGATE_TYPE_P.
15102         * class.c (finish_struct): Member class templates have already been
15103         checked for name clashes.
15104         * decl.c (pushdecl_with_scope): Handle pushing at class level.
15105
15106 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
15107
15108         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
15109         (tsubst, *_PARM): Support multiple levels of template classes.
15110         (instantiate_class_template): Look up the pattern from the
15111         original template.
15112         (lookup_template_class): Handle getting a template for d1.
15113         (push_template_decl): Correct setting of 'primary'.
15114         (reduce_template_parm_level): Add 'levels' parm.
15115         (finish_member_template_decl): Support member class templates.
15116         (template_class_depth): Handle multiple levels.
15117         * parse.y (component_decl_1, fn.def2): Remove member template case.
15118         (component_decl): Add member template cases.
15119         * decl2.c (check_member_template): We now handle member template
15120         classes.
15121         * decl.c (pushtag): Handle member templates.
15122         * method.c (do_inline_function_hair): Don't touch
15123         IDENTIFIER_GLOBAL_VALUE.
15124         * init.c (build_offset_ref): If name isn't an identifier, just
15125         return it.
15126         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
15127
15128         * typeck.c (get_delta_difference): Do adjust for conversions to
15129         and from virtual base.
15130
15131 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
15132
15133         * typeck.c (get_delta_difference): Give hard error for conversion
15134         from virtual base.
15135
15136         * cp-tree.h: Tweak formatting.
15137
15138 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
15139
15140         * decl.c (push_namespace): Handle redeclaration error.
15141
15142         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
15143         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
15144         (NAMESPACE_BINDING): New macro.
15145         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
15146         * *.c: Use them.
15147
15148         * pt.c (push_template_decl): Use innermost_args.
15149
15150         * decl.c (get_unique_name): Tweak from earlier in the name.
15151
15152 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15153
15154         * cp-tree.def: Add CPLUS_BINDING node.
15155         * cp-tree.h (tree_binding): New struct.
15156         (BINDING_SCOPE, BINDING_VALUE): New macros.
15157         (current_namespace, global_namespace): Declare extern.
15158         (struct lang_decl_flags): New field in_namespace.
15159         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
15160         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
15161         (TREE_INDIRECT_USING): New macro.
15162         * decl2.c (current_namespace, global_namespace): Declare.  The
15163         value is a NAMESPACE_DECL now, not a TREE_LIST.
15164         (is_namespace_ancestor, namespace_ancestor): New static functions.
15165         (add_using_namespace, ambiguous_decl): Likewise.
15166         (lookup_using_namespace): New support function for lookup_name.
15167         (qualified_lookup_using_namespace): New support function for
15168         do_scoped_id and lookup_namespace_name.
15169         (get_namespace_id): Mark as obsolete.
15170         (current_namespace_id): Likewise.
15171         (do_namespace_alias): Implement.
15172         (do_using_directive): Implement as call to add_using_namespace.
15173         * decl.c (binding_for_name): New function.
15174         (push_namespace, pop_namespace): Implement.
15175         (push_decl): Don't install a FUNCTION_DECL in the global branch.
15176         (lookup_namespace_name): Implement using qualified lookup.
15177         (lookup_name_real): For global scoping, lookup in
15178         global_namespace.  For namespace scoping, lookup in given
15179         namespace.  For unscoped lookup, iterate over namespace,
15180         considering using directives.
15181         (init_decl_processing): Initialize global_namespace.
15182         (grokvardecl): Build assembler name as static name for globals.
15183         (grokdeclarator): Remove old namespace mangling.
15184         (xref_tag): When installing a global binding for the
15185         tag, make sure we have an identifier.
15186         * method.c (build_overload_nested_name): Mangle namespaces.
15187         (build_qualified_name): Likewise.
15188         (build_decl_overload_real): Likewise.
15189         * lex.c (build_lang_decl): Set namespace for new declaration to
15190         current_namespace.
15191         (do_scoped_id): Find global names in global or current
15192         namespace, or using qualified namespace lookup, depending on
15193         context.
15194         * init.c (build_member_call): When scope is namespace, use
15195         build_x_function_call instead.
15196         (build_offset_ref): When scope is namespace, collapse processing
15197         to lookup_namespace_name instead.
15198         * error.c (dump_decl): Support NAMESPACE_DECL.
15199         * decl.c (pushdecl): Bind globals to current namespace.
15200         (push_overloaded_decl): Likewise.
15201         (lookup_tag): Likewise.
15202         (lookup_name_current_level): Likewise.
15203         (xref_tag): Likewise.
15204         (start_function): Likewise.
15205         * lex.c (do_identifier): Likewise.
15206         (identifier_typedecl_value): Likewise.
15207         (real_yylex): Likewise.
15208         * method.c (do_inline_function_hair): Likewise.
15209         * parse.y (unscoped): Likewise.
15210         * pt.c (check_explicit_specialization): Likewise.
15211         (lookup_template_class): Likewise.
15212         * rtti.c (call_void_fn): Likewise.
15213         * sig.c (build_sigtable): Likewise.
15214         * ptree.c (lang_print_xnode): New function.
15215
15216 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
15217
15218         * pt.c (instantiate_class_template): Don't instantiate if pedantic
15219         and the args use template parms.
15220
15221         * pt.c (push_tinst_level): If the instantiation uses template parms,
15222         fail silently.
15223         * decl.c (xref_basetypes): Do call complete_type for basetypes
15224         that involve template parameters.
15225
15226 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
15227
15228         * typeck2.c (process_init_constructor): Fix labeled init check.
15229
15230 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
15231
15232         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
15233         argument to tsubst and friends.
15234
15235         * pt.c (tsubst, FUNCTION_DECL): Tidy.
15236
15237         * typeck.c (build_x_function_call): Handle static member function
15238         templates like non-templates.  Handle friend templates like normal
15239         function templates.
15240         * pt.c (tsubst, *_PARM): Don't use orig_level.
15241         (get_bindings): Don't call add_to_template_args.
15242         (instantiate_template): Likewise.
15243         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
15244         * ptree.c (print_lang_type): Print index/level for template parms.
15245
15246 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
15247
15248         * Make-lang.in (cc1plus): Note that cc1plus depends on
15249         cp/cp-tree.h and cp/cp-tree.def.
15250
15251         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
15252         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
15253         position in a template parameter list.
15254         * cp-tree.h (template_parm_index): New structure, used as the tree
15255         structure for a TEMPLATE_PARM_INDEX.
15256         (TEMPLATE_PARM_IDX): New macro.
15257         (TEMPLATE_PARM_LEVEL): Likewise.
15258         (TEMPLATE_PARM_DESCENDANTS): Likewise.
15259         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
15260         (TEMPLATE_PARM_DECL): Likewise.
15261         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
15262         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
15263         (TEMPLATE_TYPE_DECL): Likewise.
15264         (TEMPLATE_CONST_IDX): Remove.
15265         (TEMPLATE_CONST_LEVEL): Likewise.
15266         (TEMPLATE_CONST_SET_INFO): Likewise.
15267         (TEMPLATE_TYPE_SET_INFO): Likewise.
15268         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
15269         node.
15270         (TEMPLATE_TYPE_LEVEL): Likewise.
15271         * decl.c (decls_match): Call comp_template_parms, rather than
15272         expanding it inline.
15273         (duplicate_decls): If two template declarations are being merged,
15274         then their TEMPLATE_INFOs should be merged as well.
15275         (grokfndecl): Save template-id information when declaring a friend
15276         with explicit template arguments.  Pass arguments to
15277         check_explicit_specialization via correct convention; at some
15278         point check_explicit_specialization changed, but these call-sites
15279         did not.
15280         (grokdeclarator): Tidy up slightly.
15281         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
15282         two template functions with the same DECL_ASSEMBLER_NAME the same,
15283         since the names are not yet mangled.
15284         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
15285         TEMPLATE_CONST_PARM.
15286         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
15287         decl for a non-type parameter, rather than printing `<tparm ...>'.
15288         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
15289         (do_friend): Deal with template friends.
15290         * lex.c (do_pending_inlines): Call
15291         maybe_begin_member_template_processing, rather than
15292         conditionally calling begin_member_template_processing.
15293         (process_next_inline): Likewise.  Call
15294         maybe_end_member_template_processing, rather than
15295         conditionally calling end_member_template_processing.
15296         (do_pending_defargs): Likewise.
15297         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
15298         TEMPLATE_CONST_PARM.
15299         * method.c (build_mangled_template_parm_index): New function.
15300         (build_overload_value): Use it.
15301         (build_overload_name): Likewise.
15302         * pt.c (finish_member_template_decl): Allow friend declarations.
15303         (template_class_depth): New function.
15304         (is_member_template): Rename, and modify, to become...
15305         (is_member_or_friend_template): New function.
15306         (end_member_template_processing): Rename, and modify, to become...
15307         (maybe_end_member_template_processing).
15308         (build_template_parm_index): New function.
15309         (reduce_template_parm_level): New function.
15310         (process_template_parm): Modify to use build_template_parm_index.
15311         (push_template_decl): Deal with friend templates.
15312         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
15313         TEMPLATE_CONST_PARM.
15314         (tsubst_friend_function): New function.
15315         (instantiate_class_template): Generate the DECL_FRIENDLIST
15316         for a new instantiation by using tsubst_friend_function rather
15317         than just tsubst.
15318         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
15319         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
15320         appropriate new macros.  Use reduce_template_parm_level to
15321         generate lower-level template parameters.  Handle tsubst'ing into
15322         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
15323         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
15324         templates.  Similarly for the template parameters for a new
15325         template.
15326         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
15327         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
15328         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
15329         (get_bindings): Call add_to_template_args if necessary.
15330         (instantiate_decl): Handle instantiations of friend templates.
15331         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
15332         TEMPLATE_TYPE_PARM as a list of fields; it's not!
15333         * spew.c (yylex): Do a little manual constant propagation to
15334         clarify the code.
15335
15336 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
15337
15338         * error.c: Include sys/types.h.
15339
15340 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
15341
15342         * method.c (build_mangled_name): Start CPP directives in column zero.
15343
15344 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
15345
15346         * typeck2.c (process_init_constructor): Sorry about non-trivial
15347         labeled initializers.
15348         * parse.y (initlist): Re-enable labeled initializers.
15349
15350 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15351
15352         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
15353         all callers changed.  Rely on the new parameter instead of arg
15354         being a TREE_LIST when determine whether we are working inside
15355         template template parameter.  Clean up is_type test.
15356
15357 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
15358
15359         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
15360         * typeck2.c (initializer_constant_valid_p): Allow conversions
15361         between pointers and references.
15362
15363 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
15364
15365         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
15366         if pedantic || warn_pointer_arith.
15367
15368 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15369
15370         * pt.c (unify): Handle TEMPLATE_DECL.
15371
15372 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
15373
15374         * cp-tree.h (strip_attrs): Remove decl.
15375
15376 1998-02-18  Doug Evans  <devans@cygnus.com>
15377
15378         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
15379         Update olddecl's attributes too.
15380         (strip_attrs): Remove function.
15381         * typeck.c (common_type): Call merge_machine_type_attributes.
15382
15383 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
15384
15385         * parse.y (initdcl0_innards): New grammar symbol.
15386         (nomods_initdecls, nomods_initdcl0): Change type from itype to
15387         none, since the resulting value is never used.
15388         (parse_decl): New function.
15389         (datadef): Remove redundant actions.
15390         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
15391         * parse.c: Regenerated.
15392
15393 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
15394
15395         * parse.y (simple_stmt): Use getdecls() to check for decl.
15396
15397 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
15398
15399         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
15400         macros.
15401         (c++.install-common): Install c++filt properly as native or as cross
15402         variant.
15403         (c++.uninstall): Add c++filt.
15404
15405 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
15406
15407         * call.c (standard_conversion): Fix multi-level ptr conversions.
15408
15409 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
15410
15411         * init.c (build_new): Propagate error_mark_node up.
15412
15413 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
15414
15415         * parse.y (simple_stmt): If the condition isn't a declaration,
15416         start the controlled block after the test.
15417
15418 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
15419
15420         * call.c (build_over_call): Convert builtin abs, labs and fabs to
15421         tree-codes.
15422         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
15423         builtins.
15424
15425 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
15426
15427         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
15428
15429 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
15430
15431         * cp-tree.h: Add access_protected_virtual_node.
15432         * class.c (init_class_processing): Initialize it.
15433         * decl.c (xref_basetypes): Use it.
15434         * parse.y (base_class_access_list): Likewise.
15435
15436         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
15437         (c++.install-common): Install c++filt.
15438
15439 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15440
15441         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
15442
15443 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
15444
15445         * call.c (reference_binding): Use comptypes when comparing
15446         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
15447
15448 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
15449
15450         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
15451         (really_overloaded_fn): Move check here from is_overloaded_fn.
15452         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
15453
15454 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
15455
15456         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
15457         conversions.
15458
15459 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
15460
15461         * cp-tree.h (push_template_decl): Return the decl passed in, or an
15462         equivalent duplicate.
15463         * decl.c (pushtag): Use the return value from push_template_decl.
15464         (duplicate_decls): When duplicating a template declaration, merge
15465         the DECL_TEMPLATE_RESULTs as well.
15466         (make_implicit_typename): Don't try to dive into typename types to
15467         find a context for making a new implicit typename.
15468         (start_decl): Use the return value from push_template_decl.
15469         (grokdeclarator): Complain about declarations list `const operator
15470         int'.  Since we don't correctly handle in-class initializations of
15471         non-static data members, complain about this (now illegal)
15472         practice.  Issue an error for initializations of non-const statics
15473         since that is illegal as well, and since we don't handle that case
15474         correctly either.
15475         (start_function): Use the return value from push_template_decl.
15476         (start_method): Likewise.
15477         * decl2.c (grokfield): Likewise.  Since the change to
15478         grokdeclarator ensures that all initialized fields are in fact
15479         static, remove a redundant test for TREE_PUBLIC.
15480         * parse.y (initlist): Disable labeled initializers since they do
15481         not work as per the documentation, and since they do not use the
15482         same syntax as the C front end.
15483         * pt.c (push_template_decl): Return the decl passed in, or an
15484         equivalent duplicate.
15485         (lookup_template_class): When searching in a nested context,
15486         use the right arguments.
15487         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
15488         * typeck.c (build_component_ref): Assign the correct type to the
15489         result of build_vfn_ref.
15490
15491 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
15492
15493         * pt.c (convert_nontype_argument): Fix typo.
15494         (check_explicit_specialization): Allow old-style specialization
15495         of class template members.
15496
15497 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
15498                           Manfred Hollstein  <manfred@s-direktnet.de>
15499
15500         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
15501         when deciding to override DECL_ASSEMBLER_NAME.
15502
15503 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
15504
15505         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
15506         * cp-tree.h (flag_do_squangling): Add declaration.
15507         * lang-options.h: Add -fsquangle and -fno-squangle.
15508         * method.c: Add macros and static variables for squangling.
15509         (build_overload_name): Rename to build_mangled_name, add logic for B
15510         compression, and split into process_modifiers and
15511         process_overload_item.
15512         (process_modifiers): New function, to handle constant, reference,
15513         and pointer types.
15514         (process_overload_item): New function, handles issue of type codes.
15515         (build_overload_name): New function, start squangling and call
15516         build_mangled_name.
15517         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
15518         (start_squangling): New function to initialize squangling structs.
15519         (end_squangling): New function to destroy squangling structs.
15520         (nrepeats): Rename variable to Nrepeats.
15521         (issue_nrepeats): New function for issuing 'n' type repeats.
15522         (check_ktype): New function to check for type K name compression.
15523         (build_overload_nested_name): Add a check for K name compression.
15524         (build_qualified_name): Add a check for K name compression and don't
15525         use DECL_ASSEMBLER_NAME when squangling is on.
15526         (check_btype): New function, checks for B type compression.
15527         (build_static_name, build_decl_overload_real): Initiate squangling.
15528         (build_typename_overload, build_overload_with_type): Initiate
15529         squangling
15530
15531 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
15532
15533         * method.c (make_thunk): Avoid name buffer overflow.
15534
15535 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
15536
15537         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
15538         don't define them yet.
15539
15540         * parse.y (nomods_initdcl0): Add constructor_declarator case.
15541
15542 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15543
15544         * config-lang.in (diff_excludes): Use basename only.
15545
15546 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
15547
15548         * tinfo2.cc: Add tinfo for signed char.
15549
15550 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
15551
15552         * search.c (compute_access): Handle protected constructors in derived
15553         classes as accessible.
15554
15555 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
15556
15557         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
15558         Call convert_from_reference sooner.
15559
15560 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
15561
15562         * cvt.c (ocp_convert): Obtain the constant values from constant
15563         decls even if the destination type is the same as the type of the
15564         decl.
15565
15566         * decl2.c (finish_file): Make sure that static inlines with
15567         definitions are not marked DECL_EXTERNAL before returning.
15568
15569 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
15570
15571         * decl.c: Lose arg_looking_for_template.
15572         (lookup_name_real): Likewise.
15573         * parse.y: Lose processing_template_arg, template_arg1.
15574         (primary): Likewise.
15575         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
15576
15577 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15578
15579         * error.c (dump_decl): Fix type of default arguments for template
15580         template parameters and nontype template parameters.
15581         * parse.y (template_parm): Handle invalid default template
15582         template arguments here.
15583
15584         * parse.y (template_parm): Use template_arg instead of PTYPENAME
15585         for default template template argument.
15586         * pt.c (coerce_template_parms): Merge default template argument
15587         codes.  Can treat RECORD_TYPE as template name if it is implicitly
15588         created.  Fix argument index in error message.
15589         * typeck.c (comptypes): Merge template argument comparison codes in
15590         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
15591
15592 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
15593
15594         * lex.c (file_name_nondirectory): Also check for '/'.
15595
15596 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
15597
15598         * parse.y (primary): Deal with statement-expressions in
15599         templates.
15600         * pt.c (tsubst_copy): Handle BIND_EXPR.
15601         * tree.c (mapcar): Likewise.
15602
15603         * call.c (add_template_candidate_real): Pass extra parameter to
15604         fn_type_unification.
15605         * cp-tree.h (fn_type_unification): Add parameter.
15606         * pt.c (fn_type_unification): Add additional parameter to deal with
15607         static member functions.
15608         (get_bindings): Deal with static member functions.
15609
15610         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
15611         (revert_static_member_fn): Declare.
15612         * decl.c (revert_static_member_fn): Remove declaration.  Change
15613         linkage from internal to external.
15614         (cp_finish_decl): Deal with virtual functions in classes local to
15615         template functions.
15616         * decl2.c (finish_file): Don't forget to emit increment/decrement
15617         expressions in initializers for file-scope variables.
15618         * parse.y (typename_sub2): If the typename doesn't names a
15619         template, rather than a type, issue an error message.
15620         * pt.c (check_explicit_specialization): Handle specializations of
15621         static member functions.
15622         (coerce_template_parms): Handle offset references to lists of
15623         member functions.
15624         * search.c (note_debug_info_needed): Don't crash when handed a
15625         type which is being defined.
15626         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
15627         that can happen with some illegal code.
15628
15629 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15630
15631         * call.c (user_harshness): Initialize `code' to 0.
15632         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
15633         (null_ptr_cst_p): Add parentheses around && within ||.
15634         (standard_conversion): Likewise.
15635         (z_candidate): Likewise.
15636         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
15637         (build_object_call): Likewise for `mem_args'.
15638         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
15639         default case in enumeration switch.
15640
15641         * class.c (build_vtable_entry): Add explicit braces to avoid
15642         ambiguous `else'.
15643         (build_class_init_list): Likewise.
15644         (finish_struct_1): Initialize `width' to 0.
15645         (instantiate_type): Initialize `name' to NULL_TREE.  Add
15646         explicit braces to avoid ambiguous `else'.
15647
15648         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
15649         `else'.
15650
15651         * decl.c (grok_reference_init): Eliminate unused parameter, all
15652         callers changed.
15653         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
15654         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
15655         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
15656         (grokdeclarator): Add parentheses around && within ||.  Add
15657         explicit braces to avoid ambiguous `else'.
15658         (grokparms): Initialize `type' to NULL_TREE.
15659         (xref_tag): Remove unused label `just_return'.
15660         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
15661         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
15662         (hack_incomplete_structures): Add parentheses around assignment
15663         used as truth value.
15664
15665         * decl2.c (coerce_delete_type): Hide definition of `e3'.
15666
15667         * error.c: Include <stdlib.h>.
15668         (dump_expr): Change the type of `i' to size_t.  Remove unused
15669         label `error'.
15670
15671         * except.c (init_exception_processing): Remove unused variable `d'.
15672         (expand_throw): Likewise for `label'.
15673
15674         * friend.c (add_friends): Add explicit braces to avoid ambiguous
15675         `else'.
15676
15677         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
15678         (sort_base_init): Likewise for `binfo'.
15679         (expand_member_init): Likewise for `rval'.
15680         (build_member_call): Add parentheses around assignment used as
15681         truth value.
15682         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
15683         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
15684         `old_immediate_size_expand' to 0.
15685         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
15686         (build_vec_delete_1): Remove unused variable `block'.
15687         (expand_vec_init): Initialize `itype' to NULL_TREE.
15688
15689         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
15690         declaration of `index' and `rindex' with autoconf macros.
15691         (reinit_parse_for_expr): Remove unused variables
15692         `look_for_semicolon' and `look_for_lbrac'.
15693         (cons_up_default_function): Initialize `args' to NULL_TREE.
15694         (readescape): Initialize `firstdig' to 0.
15695         (real_yylex): Add parentheses around assignment used as truth value.
15696
15697         * method.c: Include <strings.h> if we don't have <string.h>.
15698         Protect declaration of `index' with autoconf macro.
15699
15700         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
15701         Initialize `type' to NULL_TREE.
15702         (structsp): Remove unused variable `id'.
15703
15704         * pt.c (coerce_template_parms): Add explicit braces to avoid
15705         ambiguous `else'.
15706         (lookup_template_class): Initialize `template' to NULL_TREE.
15707         (instantiate_class_template): Remove unused variable `name' and `e'.
15708         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
15709         (do_poplevel): Initialize `saved_warn_unused' to 0.
15710         (type_unification): Remove unused varable `parm'.
15711         (unify): Likewise for `j'.
15712
15713         * repo.c (init_repo): Add parentheses around assignment used as
15714         truth value.
15715         (finish_repo): Remove unused varable `p'.
15716
15717         * search.c (get_binfo): Initialize `type' to NULL_TREE.
15718         (get_base_distance): Likewise.
15719         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
15720         and `new_v' to NULL_TREE.
15721         (lookup_fnfields): Likewise for `rval_binfo_h'.
15722         (breadth_first_search): Add parentheses around assignment used as
15723         truth value.
15724         (get_template_base): Initialize `type' to NULL_TREE.
15725
15726         * sig.c (append_signature_fields): Initialize `last_mfptr' to
15727         NULL_TREE.
15728         (build_signature_table_constructor): Likewise for
15729         `last_rhs_field', `pfn' and `vt_off'.
15730         (build_sigtable): Likewise for `init'.
15731
15732         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
15733         (propagate_binfo_offsets): Likewise for `delta'.
15734         (hash_tree_cons): Initialize hashcode to 0.
15735         (can_free): Likewise for `size'.
15736         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
15737
15738         * typeck.c (convert_sequence): Hide prototype.
15739         (common_type): Add explicit braces to avoid ambiguous `else'.
15740         (comp_target_types): Likewise.
15741         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
15742         (build_function_call_real): Add explicit braces to avoid ambiguous
15743         `else'.
15744         (convert_arguments): Initialize `called_thing' to 0.
15745         (convert_for_initialization): Initialize `savew' and `savee' to 0.
15746
15747         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
15748         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
15749         (build_x_arrow): Likewise for `last_rval'.
15750
15751         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
15752
15753 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
15754
15755         * decl.c (init_decl_processing): Use set_sizetype.
15756         * decl2.c (sizetype): Don't declare.
15757         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
15758         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
15759         (build_component_addr, unary_complex_lvalue): Likewise.
15760         * rtti.c (expand_class_desc): Likewise.
15761         * class.c (get_vfield_offset): Likewise.
15762
15763 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
15764
15765         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
15766         early to avoid bogus error.  Handle overloaded function
15767         names provided as template arguments correctly.
15768         (coerce_template_parms): Don't mishandle overloaded functions when
15769         dealing with template template parameters.
15770         (lookup_template_class): Issue an error message, rather than
15771         crashing, when the TYPE_DECL provided is not a template type.
15772
15773 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
15774
15775         * class.c (instantiate_type): Don't just return a known type if
15776         it's wrong.
15777
15778 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
15779
15780         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
15781         since that code could never be reached.
15782
15783         * error.c (dump_decl): Avoid aborting in the midst of printing an
15784         error message about an illegal template declaration.
15785
15786         * parse.y (structsp): Print an error message, rather than crashing,
15787         when a class-head does not name a class.
15788
15789         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
15790         template arguments as a g++ extension.
15791
15792         * cp-tree.def (ALIGNOF_EXPR): New tree code.
15793         * decl2.c (grok_alignof): If processing_template_decl, just store
15794         the expression.
15795         * typeck.c (c_alignof): Likewise.
15796         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
15797         * error.c (dump_expr): Likewise.
15798         * pt.c (tsubst_copy): Likewise.
15799         * tree.c (cp_tree_equal): Likewise.
15800         * pt.c (uses_template_parms): Correctly determine whether or not a
15801         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
15802         folding can be done.
15803
15804         * cp-tree.h (grok_enum_decls): Remove type parameter.
15805         * decl.c (grok_enum_decls): Likewise.
15806         * decl2.c (grok_x_components): Call grok_enum_decls
15807         unconditionally, since it will do nothing if there is no
15808         current_local_enum.  Use the new calling sequence.
15809         * pt.c (tsubst_enum): Use the new calling sequence for
15810         grok_enum_decls.
15811
15812         * decl.c (start_function): Make member functions of local classes
15813         in extern inline functions have comdat linkage here...
15814         (grokdeclarator): Rather than here.
15815
15816 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
15817
15818         * pt.c (convert_nontype_argument): Use decl_constant_value.
15819
15820 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
15821
15822         * call.c (add_template_candidate_real): New function.
15823         (add_template_candidate): Use it.
15824         (add_template_conv_candidate): Likewise.
15825         (joust): Pass extra argument to more_specialized.
15826         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
15827         (is_local_class): Remove.
15828         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
15829         * cp-tree.h (is_local_class): Remove.
15830         (perform_array_to_pointer_conversion): Likewise.
15831         (finish_member_template_decl): Add.
15832         (check_explicit_specialization): Return a tree, not an int.
15833         (more_specialized): Take additional argument.
15834         (get_bindings): Likewise.
15835         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
15836         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
15837         (perform_array_to_pointer_conversion): Remove.
15838         * decl.c (saved_scope): Add processing_specialization,
15839         processing_explicit_instantiation fields.
15840         (maybe_push_to_top_level): Save them.
15841         (pop_from_top_level): Restore them.
15842         (grokfndecl): Use new return value from
15843         check_explicit_specialization.
15844         (start_decl): Don't check flag_guiding_decls before pushing
15845         decls.
15846         (cp_finish_decl): Remove previous (bogus) change.
15847         (grok_declarator): Use decl_function_context rather than
15848         is_local_class.
15849         * decl2.c (finish_file): Pass extra argument to get_bindings.
15850         (build_expr_from_tree): Let build_x_component_ref check
15851         validity of arguments rather than doing it here.
15852         * lex.c (cons_up_default_function): Remove code fooling with
15853         processing_specialization, processing_explicit_instantiation
15854         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
15855         * method.c (build_overload_identifier): Mangle local classes in
15856         template functions correctly.
15857         * parse.y (finish_member_template_decl): Move to pt.c.
15858         * pt.c (finish_member_template_decl): Moved here from parse.y.
15859         (print_candidates): New function.
15860         (determine_specialization): Change interface.  Properly look for
15861         most specialized versions of template candidates.
15862         (check_explicit_specialization): Fully process explicit
15863         instantiations.
15864         (push_template_decl): Avoid looking at CLASSTYPE fields in
15865         FUNCTION_DECLS.
15866         (determine_overloaded_function): Remove.
15867         (convert_nontype_argument): Change name from
15868         convert_nontype_parameter.  Use determine_overloaded_function
15869         instead of instantiate_type.
15870         (mangle_class_name_for_template): Handle type contexts as well as
15871         function contexts.
15872         (classtype_mangled_name): Likewise.
15873         (lookup_template_class): Likewise.
15874         (tsubst): Likewise.
15875         (more_specialized): Take explict template arguments as a
15876         parameter.
15877         (most_specialized): Likewise.
15878         (get_bindings): Likewise.  Check that return types match before
15879         proclaiming a function a match.
15880         (do_decl_instantiation): Remove code searching for function to
15881         instantiate; that is now done in check_explicit_specialization.
15882         (add_maybe_template): Pass extra argument to get_bindings.
15883         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
15884         implementation.
15885         * typeck.c (build_component_ref): Check for invalid arguments.
15886
15887 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
15888
15889         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
15890         return_target and call_target are equivalent.
15891
15892         * pt.c (type_unification_real): Just accept function parms that
15893         don't use any template parms.
15894
15895 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
15896
15897         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
15898         unset DECL_NOT_REALLY_EXTERN.
15899
15900         * parse.y (typename_sub*): Fix std::.
15901
15902 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
15903
15904         * error.c (dump_decl): Fix type default template args.
15905         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
15906
15907 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
15908
15909         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
15910         (file_name_nondirectory): Use.
15911
15912 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15913
15914         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
15915         that are not really present.  Substitute default arguments in
15916         template template arguments.  Correctly convert TEMPLATE_DECL to
15917         TEMPLATE_TEMPLATE_PARM.
15918         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
15919         are no longer treated specially here.
15920         * parse.y (template_template_parm): Fix copy error.
15921         * decl.c (grokdeclarator): Warn about missing `typename' for nested
15922         type created from template template parameters.
15923         * parse.y (bad_parm): Likewise
15924
15925         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
15926         (push_nested_class): Likewise.
15927         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
15928         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
15929         (copy_template_template_parm): Declare.
15930         * decl.c (arg_looking_for_template): New variable.
15931         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
15932         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
15933         node if arg_looking_for_template is nonzero.
15934         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
15935         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
15936         (grokdeclarator): Handle TEMPLATE_DECL.
15937         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
15938         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
15939         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
15940         (dump_decl): Handle unnamed template type parameters.
15941         Handle template template parameters.
15942         (dump_function_name): Handle template template parameters.
15943         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
15944         Handle TEMPLATE_TEMPLATE_PARM.
15945         * method.c (build_template_template_parm_names): New function.
15946         (build_template_parm_names): Handle TEMPLATE_DECL.
15947         (build_overload_nested_name, build_overload_name):
15948         Handle TEMPLATE_TEMPLATE_PARM.
15949         * parse.y (maybe_identifier): New nonterminal.
15950         (template_type_parm): Use it.
15951         (template_template_parm, template_arg1): New nonterminal.
15952         (template_parm): Add template_template_parm rules.
15953         (template_arg): Set processing_template_arg.
15954         (template_arg1): Rules moved from template_arg.
15955         (primary, nonnested_type): Set arg_looking_for_template if we are
15956         processing template arguments.
15957         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
15958         (process_template_parm): Handle template template parameters.
15959         (coerce_template_parms, comp_template_args): Likewise.
15960         (mangle_class_name_for_template, lookup_template_class): Likewise.
15961         (uses_template_parms): Handle TEMPLATE_DECL and
15962         TEMPLATE_TEMPLATE_PARM.
15963         (current_template_args): Handle TEMPLATE_DECL.
15964         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
15965         * search.c (dfs_walk, dfs_record_inheritance):
15966         Handle TEMPLATE_TEMPLATE_PARM.
15967         * tree.c (copy_template_template_parm): New function.
15968         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
15969         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
15970
15971 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
15972
15973         * decl.c (start_decl): Don't allow duplicate definitions of static
15974         data members.
15975
15976         * call.c (build_user_type_conversion_1): Handle user-defined
15977         template conversion operators correctly.
15978
15979         * decl2.c (build_expr_from_tree): Issue an error message if the
15980         object in a COMPONENT_REF is a TEMPLATE_DECL.
15981
15982         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
15983
15984         * class.c (is_local_class): New function.
15985         * cp-tree.h (is_local_class): Declare it.
15986         (last_tree): Likewise.
15987         (begin_tree): Likewise.
15988         (end_tree): Likewise.
15989         (lookup_template_class): Change prototype.
15990         * decl.c (cp_finish_decl): Check for NULL where necessary.
15991         Consider FUNCTION_DECLS to declare objects with top-level binding,
15992         when calling make_decl_rtl.
15993         (grokdeclarator): Give members of local classes internal linkage.
15994         (start_function): Remove declaration of last_tree.
15995         (finish_function): Set flag_keep_inline_functions around call to
15996         rest_of_compilation if we are processing a member function in a
15997         local class.
15998         (start_method): Call push_template_decl for member functions of
15999         local classes in template functions.
16000         * decl2.c (import_export_decl): Don't give external linkage to
16001         instantiations of templates with internal linkage.
16002         * parse.y (last_tree): Remove declaration.
16003         (template_type): Pass extra parameter to lookup_template_class.
16004         (self_template_type): Likewise.
16005         (structsp): Move call to reset_specialization into left_curly.
16006         (left_curly): Call reset_specialization, and begin_tree.
16007         * pt.c (saved_trees): New variable.
16008         (mangle_class_name_for_template): Change prototype.  Use
16009         additional function context to name local classes in templates
16010         correctly.
16011         (classtype_mangled_name): Pass the context.
16012         (push_template_decl): Handle local classes and templates, and
16013         member functions for such classes.
16014         (convert_nontype_parameter): Fix handling of pointer-to-member
16015         constants.
16016         (lookup_template_class): Handle local classes in templates.
16017         (tsubst): Likewise.  Don't assume that template instantiations
16018         have external linkage; pay attention to the template declaration.
16019         (mark_decl_instantiated): Likewise.
16020         (begin_tree): New function.
16021         (end_tree): Likewise.
16022
16023         * decl.c (xref_basetypes): Don't call complete_type for basetypes
16024         that involve template parameters; that can lead to infinite
16025         recursion unnecessarily.
16026
16027         * pt.c (register_specialization): Do not register specializations
16028         that aren't ready to be registered yet.
16029         (check_explicit_specialization): Handle explicit specialization of
16030         constructors and destructors.
16031         (build_template_decl): New function.
16032         (push_template_delc): Handle out-of-class specializations of
16033         member templates.
16034
16035         * pt.c (check_explicit_specialization): Set up the template
16036         information before registering the specialization.
16037         (coerce_template_parms): Fix thinko.
16038         (tsubst): Handle specializations of member templates correctly.
16039
16040         * class.c (finish_struct_methods): Remove calls to
16041         check_explicit_specialization from here.
16042         (finish_struct): And insert them here.
16043         * cp-tree.h (perform_qualification_conversions): New function.
16044         (perform_array_to_pointer_conversion): Likewise.
16045         (begin_explicit_instantiation): Likewise.
16046         (end_explicit_instantiation): Likewise.
16047         (determine_specialization): Renamed from
16048         determine_explicit_specialization.
16049         (comp_template_parms): New function.
16050         (processing_explicit_instantiation): New variable.
16051         * cvt.c (perform_qualification_conversions): New function.
16052         (perform_array_to_pointer_conversion): Likewise.
16053         * decl.c (duplicate_decls): Don't consider template functions
16054         alike unless they have the same parameters.  Refine handling of
16055         instantiation/specialization mismatches.
16056         (start_decl): Don't call pushdecl for template specializations,
16057         since they don't affect overloading.
16058         (start_function): Likewise.
16059         (grokfndecl): Call check_explicit_specialization a little later.
16060         Don't call duplicate_decls for memberm template specializations.
16061         (grokdeclarator): Don't update template_count for classes that are
16062         themselves specializations.  Remove use of `2' as parameter to
16063         grokfndecl since that value isn't used.
16064         * lex.c (cons_up_default_function): Save and restore
16065         processing_explicit_instantiation around calls to grokfield.
16066         * parse.y (finish_member_template_decl): New function.
16067         (component_decl_1): Use it.
16068         (fn.def2): Likewise.
16069         (template_arg_list_opt): New nonterminal.
16070         (template_type): Use it.
16071         (self_template_type): Likewise.
16072         (template_id): Likewise.
16073         (object_template_id): Likewise.
16074         (notype_template_declarator): Likwise.
16075         (begin_explicit_instantiation): Likewise.
16076         (end_explicit_instantiation): Likewise.
16077         (explicit_instantiation): Use them.
16078         * pt.c (coerce_template_parms): Add parameters.
16079         (processing_explicit_instantiation): New variable.
16080         (convert_nontype_parameter): New function.
16081         (determine_overloaded_function): Likewise.
16082         (begin_explicit_instantiation): Likewise.
16083         (end_explicit_instantiation): Likewise.
16084         (retrieve_specialization): Likewise.
16085         (register_specialization): Likewise.
16086         (processing_explicit_specialization): Removed.
16087         (determine_specialization): Handle specializations of member
16088         functions of template class instantiations.
16089         (check_explicit_specialization): Refine to conform to standard.
16090         (comp_template_parms): New function.
16091         (coerce_template_parms): Call convert_nontype_parameter.
16092         (tsubst): Refine handling of member templates.  Use
16093         register_specialization.
16094         (instantiate_template): Use retrieve_specialization.
16095         (do_decl_instantiation): Likewise.
16096         (instantiate_decl): Likewise.
16097         (type_unification): Improve handling of explict template
16098         arguments.
16099         * tree.c (mapcar): Return error_mark_node, rather than aborting,
16100         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
16101         * typeck.c (build_unary_op): Call determine_specialization, rather
16102         than determine_explicit_specialization.
16103
16104 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
16105
16106         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
16107
16108 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
16109
16110         * error.c (dump_decl): For enum tags, output the tag, not its value.
16111
16112 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
16113
16114         * decl.c (init_decl_processing): Only call init_rtti_processing
16115         FLAG_RTTI is set.
16116
16117 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
16118
16119         * init.c (build_new_1): Split out from build_new.
16120         (build_new): Just return a NEW_EXPR.
16121         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
16122
16123         * decl2.c (get_temp_regvar): Tweak.
16124
16125         * cp-tree.h (TREE_CALLS_NEW): Comment out.
16126         * class.c (resolves_to_fixed_type_p): Remove use.
16127         * method.c (build_opfncall): Likewise.
16128         * call.c (build_new_op): Likewise.
16129
16130 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
16131
16132         * exception.cc (__eh_alloc, __eh_free): New fns.
16133         (__cp_push_exception, __cp_pop_exception): Use them.
16134         (__uncatch_exception): Call terminate here if no exception.
16135         * except.c (build_terminate_handler): New fn.
16136         (expand_start_catch_block): Use it.
16137         (expand_exception_blocks): Likewise.
16138         (alloc_eh_object): New fn.
16139         (expand_throw): Use it.  Protect exception init with terminate.
16140         * typeck.c (build_modify_expr): Remove code that ignores trivial
16141         methods.
16142
16143 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16144
16145         * call.c (add_builtin_candidate): Add default case in enumeration
16146         switch.
16147         (build_new_op): Likewise.
16148         (convert_like): Likewise.
16149         * cvt.c (build_expr_type_conversion): Likewise.
16150         * tree.c (real_lvalue_p): Likewise.
16151         (lvalue_p): Likewise.
16152         (cp_tree_equal): Likewise.
16153         * typeck.c (comptypes): Likewise.
16154         (build_component_ref): Likewise.
16155         (build_function_call_real): Likewise.
16156         (build_binary_op_nodefault): Likewise.
16157         (build_unary_op): Likewise.
16158         (build_modify_expr): Likewise.
16159         * typeck2.c (initializer_constant_valid_p): Likewise.
16160
16161 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
16162
16163         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
16164
16165 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
16166
16167         * pt.c (coerce_template_parms): Make sure to digest_init if
16168         possible.
16169
16170         * decl.c (duplicate_decls): Make the newdecl virtual if the
16171         olddecl was, just as is done with other attributes of olddecl.
16172
16173 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
16174
16175         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
16176         address of an OFFSET_REF.
16177
16178         * cp-tree.def: Add AGGR_INIT_EXPR.
16179         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
16180         AGGR_INIT_EXPR where appropriate.
16181         * expr.c (cplus_expand_expr): Likewise.  Simplify.
16182
16183         * decl2.c (finish_file): Remove call to register_exception_table.
16184
16185 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16186
16187         * pt.c (instantiate_class_template): Don't do injection when
16188         processing_template_decl is true, as pollutes current_binding_level
16189         for base classes.
16190
16191 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
16192
16193         * pt.c (maybe_fold_nontype_arg): Add prototype.
16194
16195 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
16196
16197         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
16198         * error.c (dump_expr): Likewise.
16199
16200 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
16201
16202         * typeck.c (build_function_call_real): Remove "inline called before
16203         definition" pedwarn.
16204
16205         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
16206
16207 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
16208
16209         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
16210
16211         * pt.c (type_unification_real): Change __null to type void* with
16212         a warning.
16213
16214 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
16215
16216         * call.c (implicit_conversion): Don't call
16217         build_user_type_conversion_1 with a NULL expr, since it will
16218         crash.
16219
16220         * pt.c (unify): Don't try to unify array bounds if either array is
16221         unbounded.
16222
16223 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
16224
16225         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
16226         Replace extern decls with casts.
16227
16228         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
16229         Update last_parm_cleanup_insn.
16230         (store_after_parms): Remove.
16231         * cp-tree.h: Adjust.
16232
16233 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
16234
16235         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
16236         (finish_file): Check DECL_COMDAT instead of weak|one_only.
16237         (import_export_vtable): Use make_decl_one_only instead of
16238         comdat_linkage for win32 tweak.
16239         (import_export_decl): Likewise.
16240         * pt.c (mark_decl_instantiated): Likewise.
16241
16242         * decl2.c (finish_file): Lose handling of templates in pending_statics.
16243
16244 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
16245
16246         * decl2.c (finish_file): Lose call to expand_builtin_throw.
16247         * except.c (expand_builtin_throw): Remove.
16248         * cp-tree.h: Remove ptr_ptr_type_node.
16249         * decl.c: Likewise.
16250
16251 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
16252
16253         * decl.c (ptr_ptr_type_node): Define.
16254         (init_decl_processing): Initialize it.
16255         * cp-tree.h: Declare it.
16256         * exception.cc (__cp_exception_info): Use __get_eh_info.
16257         (__cp_push_exception): Likewise.
16258         (__cp_pop_exception): Likewise.
16259
16260         From Scott Snyder <snyder@d0sgif.fnal.gov>:
16261         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
16262         saved_pc.
16263         (init_exception_processing): Removed saved_pc initialization.
16264
16265 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
16266
16267         * pt.c (instantiate_decl): Defer all templates but inline functions.
16268
16269 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
16270
16271         * init.c (expand_vec_init): Don't fold a list of parameters.
16272
16273         * decl.c (copy_args_p): Handle copy elision for types with virtual
16274         bases.
16275         * call.c (build_over_call): Likewise.
16276
16277 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
16278
16279         * pt.c (lookup_template_function): Copy the template arguments,
16280         not just the list containing them, to the permanent obstack.
16281
16282 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
16283
16284         * except.c (expand_start_catch_block): suspend_momentary for the
16285         terminate handler.
16286
16287         * error.c (dump_decl): Handle LOOKUP_EXPR.
16288
16289 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
16290
16291         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
16292         permanent obstack if we are processing a template decl.
16293         * typeck.c (build_static_cast): Likewise.
16294         (build_const_cast): Likewise.
16295         (build_reinterpret_cast): Likewise.
16296
16297         * pt.c (coerce_template_parms): Coerce some expressions, even
16298         when processing_template_decl.
16299
16300 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
16301
16302         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
16303         handling of pointer difference expressions.
16304
16305         * typeck.c (comp_target_types): Comparison of function/method types
16306         is independent of nptrs.
16307
16308 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
16309
16310         * pt.c (tsubst): Avoid creating pointer to reference and
16311         reference to reference types.
16312
16313 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
16314
16315         * parse.y (do_id): New nonterminal.
16316         (template_id): Use it.
16317
16318 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
16319
16320         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
16321         * spew.c (yylex): Don't do_identifier here.
16322         * decl2.c (build_expr_from_tree): Revert last change.
16323
16324         * decl2.c (build_expr_from_tree): Expand the name for a method call.
16325         * parse.y (object_template_id): Don't try to take the DECL_NAME.
16326
16327 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
16328
16329         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
16330         alloc_expr.
16331         * call.c (build_op_delete_call): Adjust.
16332
16333         * except.c (expand_end_catch_block): Lose rethrow region.
16334         (expand_start_catch_block): Likewise.
16335         (expand_end_catch_block): Don't expand_leftover_cleanups.
16336
16337 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16338
16339         * pt.c (tsubst): Remove tree_cons call (places redundant info into
16340         DECL_TEMPLATE_INSTANTIATION).
16341
16342 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
16343
16344         * tree.c (is_overloaded_fn): Handle getting a fn template.
16345         (really_overloaded_fn): Likewise.
16346         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
16347         * pt.c (check_explicit_specialization): Tweak.
16348         (determine_explicit_specialization): Tweak.
16349
16350         * tree.c, cp-tree.h (get_target_expr): New fn.
16351
16352 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
16353
16354         * pt.c (check_explicit_specialization): Fix misspelling in
16355         diagnostic: `preceeded'.
16356         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
16357         `conversiona'.
16358
16359 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
16360
16361         * pt.c (determine_explicit_specialization): Avoid an internal
16362         error for bad specializations.
16363
16364         * method.c (build_overload_value): Handle SCOPE_REF.
16365
16366 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
16367
16368         * class.c (prepare_fresh_vtable): Enable even more complex MI
16369         vtable names.
16370
16371 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
16372
16373         * exception.cc (__check_eh_spec): Optimize a bit.
16374
16375         * exception.cc (__cp_pop_exception): Lose handler arg.
16376         * except.c (do_pop_exception): Likewise.
16377         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
16378         (expand_end_catch_block): Likewise.
16379
16380 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
16381
16382         * pt.c (check_explicit_specialization): Complain about using a
16383         template-id for a non-specialization.
16384
16385 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
16386
16387         * repo.c: Prototype rindex only if needed.
16388         * xref.c: Likewise.
16389
16390 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
16391
16392         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
16393
16394 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
16395
16396         * typeck.c (build_const_cast): Handle references here instead of
16397         handing off to convert_to_reference.
16398
16399         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
16400         TerminateFunctionCall.
16401         (init_exception_processing): Likewise.  Terminate et al are now
16402         the fns, not ADDR_EXPRs.
16403         (various): Lose redundant assemble_external calls.
16404         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
16405
16406         * cp-tree.h (struct lang_decl_flags): Add comdat.
16407         (DECL_COMDAT): New macro.
16408         * decl.c (duplicate_decls): Propagate it.
16409         (cp_finish_decl): Handle it.
16410         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
16411
16412         * class.c: Remove static pending_hard_virtuals.
16413         (add_virtual_function): Take pointers to pending_virtuals
16414         and pending_hard_virtuals.
16415         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
16416
16417 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
16418
16419         * decl2.c (import_export_vtable): If we support one_only but not
16420         weak symbols, mark instantiated template vtables one_only.
16421         (import_export_decl): Likewise for tinfo functions.
16422         (finish_vtable_vardecl): Also write out vtables from explicitly
16423         instantiated template classes.
16424         * pt.c (mark_class_instantiated): Revert last change.
16425
16426         * except.c (expand_throw): Call mark_used on the destructor.
16427
16428 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
16429
16430         * lex.c (lang_init): Enable flag_exceptions by default if no
16431         command line switch was specified.
16432
16433 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
16434
16435         * pt.c (unify): Handle `void' template parameters in
16436         specializations.
16437
16438 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
16439
16440         * rtti.c (build_dynamic_cast): Handle template case here.
16441         (build_dynamic_cast_1): Not here.
16442
16443         * typeck2.c (digest_init): Make copies where appropriate.
16444
16445         * decl2.c (delete_sanity): resolve_offset_ref.
16446
16447         * except.c: Call terminate without caching so many bits.
16448
16449         * except.c (expand_start_catch_block): Fix catching a reference
16450         to pointer.
16451
16452 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
16453
16454         * init.c (build_new): Copy size to the saveable obstack.
16455
16456         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
16457         TRY_CATCH_EXPR for now.
16458
16459 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
16460
16461         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
16462         has DECL_LANG_SPECIFIC.
16463
16464         * exception.cc (struct cp_eh_info): Add handlers field.
16465         (__cp_push_exception): Initialize it.
16466         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
16467         (__throw_bad_exception): Remove.
16468         * except.c (call_eh_info): Add handlers field.
16469         (get_eh_handlers): New fn.
16470         (push_eh_cleanup): Increment handlers.
16471
16472 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
16473
16474         * except.c (expand_start_eh_spec): Use the try/catch code.
16475         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
16476         doing everything inline.
16477         (init_exception_processing): throw_type_match now takes
16478         const void pointers.
16479         * exception.cc (__check_eh_spec): New fn.
16480         * inc/exception: Neither terminate nor unexpected return.
16481         * decl.c: Make const_ptr_type_node public.
16482         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
16483
16484         * except.c (expand_start_catch_block): We only need the rethrow
16485         region for non-sjlj exceptions.
16486         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
16487
16488 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
16489
16490         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
16491         (various.o): Likewise.
16492         * inc/new: Add placement deletes.  Add throw specs for default new.
16493         * new.cc (set_new_handler): Move here from libgcc2.
16494         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
16495         (new): Move from libgcc2.  Throw bad_alloc.
16496         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
16497         * decl.c (init_decl_processing): Update exception specs on new and
16498         delete.
16499
16500         * method.c (build_decl_overload_real): Don't mess with global
16501         placement delete.
16502
16503         * init.c (build_new): Check for null throw spec, not nothrow_t.
16504
16505         * decl.c (duplicate_decls): Don't complain about different exceptions
16506         from an internal declaration.
16507
16508         * call.c (build_op_delete_call): Fix check for member fns again.
16509
16510         * decl2.c (import_export_decl): Interface hackery affects
16511         virtual synthesized methods.
16512
16513 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
16514
16515         * decl.c (start_decl): Don't just complain about a mismatched
16516         scope, fix it.
16517
16518         * decl.c (make_implicit_typename): Handle case where t is not
16519         actually from context.
16520         * tree.c (get_type_decl): Lose identifier case.
16521         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
16522         * parse.y (nonnested_type): Just use lookup_name.
16523         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
16524
16525 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
16526
16527         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
16528         T was built in C language context (for example, by
16529         output_func_start_profiler).
16530
16531 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
16532
16533         * decl.c (make_implicit_typename): New fn.
16534         (lookup_name_real): Use it.  Use current_class_type as the context.
16535
16536 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
16537
16538         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
16539
16540 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
16541
16542         * friend.c (do_friend): Warn about non-template friends in templates.
16543
16544         * call.c (build_op_delete_call): Fix handling of inherited delete.
16545
16546         * search.c (dfs_record_inheritance): Ignore template type parms.
16547
16548 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
16549
16550         * call.c (build_new_op): Fix copy error.
16551         (build_op_new_call): New fn.
16552         (build_op_delete_call): New fn.
16553         * cp-tree.h: Declare them.
16554         * init.c (build_new): Use them.  Support placement delete.
16555         (build_x_delete): Use build_op_delete_call.
16556         (build_delete): Likewise.
16557         * decl2.c (delete_sanity): Likewise.
16558         (coerce_delete_type): Don't complain about placement delete.
16559
16560 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16561
16562         * call.c (build_new_function_call): Remove unused 'obj' parm.
16563         * cp-tree.h, typeck.c: Adjust.
16564
16565         * init.c (build_new): Make the cleanup last longer.
16566         (expand_vec_init): Call do_pending_stack_adjust.
16567
16568 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
16569
16570         * pt.c (do_type_instantiation): Fix typo.
16571         (mark_class_instantiated): If we support one_only but not weak
16572         symbols, don't mark this as known.
16573
16574         * init.c (build_new): Handle vec delete in EH cleanup.
16575
16576 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16577
16578         * call.c (build_method_call): Call complete_type before checking
16579         for destructor.
16580
16581 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
16582
16583         * decl.c (add_block_current_level): Delete.
16584         * init.c (build_vec_delete_1): Delete build_block and
16585         add_block_current_level calls.
16586
16587 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
16588
16589         * init.c (build_new): Handle freeing allocated memory when the
16590         constructor throws.
16591
16592         * call.c (build_new_method_call): Fix flags arg.
16593
16594         * pt.c (do_type_instantiation): Don't try to instantiate
16595         member templates.
16596         (mark_decl_instantiated): If we support one_only but not
16597         weak symbols, mark this one_only.
16598         * decl2.c (import_export_vtable): Don't defer handling of vtables
16599         if MULTIPLE_SYMBOL_SPACES.
16600
16601 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
16602
16603         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
16604
16605 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
16606
16607         * except.c (do_pop_exception): Return a value.
16608
16609 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
16610
16611         * call.c (build_new_method_call): Handle getting a
16612         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
16613         if we got template parms.
16614         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
16615         not just the args.
16616         * decl2.c (build_expr_from_tree): Tweak last change.
16617         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
16618         (maybe_fold_nontype_arg): Split out from tsubst_copy.
16619         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
16620
16621 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
16622
16623         * pt.c (tsubst_copy): Handle explicit template arguments in
16624         function calls.
16625         * typeck.c (build_x_function_call): Likewise.
16626         * decl2.c (build_expr_from_tree): Lookup function name if it
16627         hasn't been done.
16628
16629         * pt.c (tsubst): Instantiate template functions properly when
16630         template parameter does not appear in function arguments and return
16631         type.
16632         (comp_template_args): Handle member templates required by tsubst.
16633
16634 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
16635
16636         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
16637         previous change.
16638
16639 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
16640
16641         * pt.c (coerce_template_parms): Tweak error message.
16642
16643         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
16644         return type defaults to `int', even if there are storage-class
16645         specifiers.
16646
16647 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
16648
16649         Complete nested exception support.
16650         * except.c (do_pop_exception): Split out...
16651         (push_eh_cleanup): From here.  Handle the EH region by hand.
16652         (expand_start_catch_block): Add a new level for the catch parm.
16653         Move the rethrow region outside the two cleanup regions.
16654         Protect the initializer for the catch parm with terminate.
16655         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
16656         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
16657         popping off the middle of the stack.
16658         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
16659         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
16660         (build_cplus_new): Only wrap CALL_EXPRs.
16661         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
16662         the constructor call.
16663
16664 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16665
16666         * Make-lang.in (c++.distdir): Make inc subdirectory.
16667
16668 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
16669
16670         * decl2.c (finish_file): Put back some code.
16671
16672 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
16673
16674         * decl2.c (finish_file): Remove redundant code.
16675         * method.c (emit_thunk): Don't let the backend defer generic thunks.
16676
16677 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
16678
16679         * except.c (call_eh_info): Split out...
16680         (push_eh_info): From here.
16681         (expand_builtin_throw): Use it.
16682         (expand_start_catch_block): Move region start back.
16683
16684 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
16685
16686         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
16687         (real_yylex): Record wide strings using target endianness, not host.
16688
16689 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
16690
16691         * repo.c (rindex): Add decl unconditionally.
16692         (get_base_filename, open_repo_file): Don't cast rindex.
16693         * xref.c (rindex): Add decl unconditionally.
16694         (index): Remove unused decl.
16695         (open_xref_file): Don't cast rindex.
16696
16697 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
16698
16699         * class.c (build_vbase_path): Propagate the result type properly.
16700
16701 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
16702
16703         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
16704         remaining use of saved_throw_type with a call to get_eh_type.
16705
16706 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
16707
16708         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
16709         (file_name_nondirectory): New function, doing the same as the macro.
16710         (set_typedecl_interface_info): Use it instead of the macro.
16711         (check_newline): Likewise.
16712         (handle_cp_pragma): Likewise.
16713
16714         * repo.c (get_base_filename): Cast result of rindex to char*.
16715         (open_repo_file): Likewise.
16716         * xref.c (open_xref_file): Likewise.
16717         * error.c (dump_char): Make its arg int, not char.
16718
16719         * except.c (push_eh_info): Pass the number of fields - 1 down, not
16720         the exact number of fields.
16721
16722 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
16723
16724         Support for nested exceptions.
16725         * tinfo2.cc (__is_pointer): New fn.
16726         * exception.cc (struct cp_eh_info): Define.
16727         (__cp_exception_info, __uncatch_exception): New fns.
16728         (__cp_push_exception, __cp_pop_exception): New fns.
16729         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
16730         Lose empty_fndecl.
16731         (init_exception_processing): Likewise.  __eh_pc is now external.
16732         (push_eh_info): New fn.
16733         (get_eh_{info,value,type,caught}): New fns.
16734         (push_eh_cleanup): Just call __cp_pop_exception.
16735         (expand_start_catch_block): Use push_eh_info.  Start the eh region
16736         sooner.
16737         (expand_end_eh_spec): Use push_eh_info.
16738         (expand_throw): Call __cp_push_exception to set up the exception info.
16739         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
16740         when we rethrow.
16741         (expand_builtin_throw): Don't refer to empty_fndecl.
16742
16743 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
16744
16745         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
16746
16747 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
16748
16749         * method.c (build_template_parm_names, build_decl_overload_real):
16750         Add static to definitions.
16751         * pt.c (add_to_template_args, note_template_header,
16752         processing_explicit_specialization, type_unification_real): Likewise.
16753         ({determine,check}_explicit_specialization): Use a single string for
16754         error messages.
16755
16756 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
16757
16758         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
16759         (expand_end_catch_block): Likewise.
16760         (expand_end_eh_spec): Likewise.
16761
16762 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
16763
16764         * decl.c (duplicate_decls): Handle template specializations
16765         correctly.
16766         * error.c (dump_function_name): Fix printing of specializations of
16767         member functions that are not member templates.
16768         * cp-tree.h (processing_specialization): Make global.
16769         * pt.c (processing_specialization): Likewise.
16770         * lex.c (cons_up_default_function): Save and restore
16771         processing_specialization to avoid confusion.
16772
16773 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
16774
16775         * decl.c (init_decl_processing): Give null_node unknown* type.
16776         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
16777         (common_type): Likewise.
16778         * error.c (args_as_string): Recognize null_node.
16779
16780 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16781
16782         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
16783         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
16784
16785         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
16786
16787         * Make-lang.in (g++): Include prefix.o.
16788
16789 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
16790
16791         * pt.c (determine_explicit_specialization): Initialize "dummy"
16792         to keep Purify quiet.
16793
16794 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
16795
16796         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
16797         (build_overload_int): Not here.
16798
16799 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
16800
16801         * class.c (build_type_pathname): Remove.
16802         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
16803
16804 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
16805
16806         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
16807         &&label GNU extension.
16808
16809 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
16810
16811         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
16812         so as to avoid incorrect manglings.
16813         * method.c (build_decl_overload_real): Don't mangle return types
16814         for constructors.
16815
16816 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
16817
16818         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
16819         scratch_tree_cons): Define as macros for now.
16820         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
16821         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
16822         typeck2.c: Use them and the expression_obstack variants.
16823
16824 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16825
16826         * decl.c (store_return_init): Allow classes with explicit ctors to
16827         be used with the named return values extension.
16828
16829 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
16830
16831         * pt.c (instantiate_decl): Fix previous change.
16832
16833 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
16834
16835         * pt.c (tsubst): Fix thinko.
16836         (instantiate_decl): Really use the original template.
16837
16838         * call.c (build_new_method_call): Use simple constructor_name for
16839         error messages.
16840
16841 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
16842
16843         * method.c (build_underscore_int): Don't use ANSI specific
16844         features.
16845
16846 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
16847
16848         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
16849         for our key method; it might have been inlined by -O3.
16850
16851 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
16852
16853         * decl.c (make_typename_type): Do not try to call lookup_field for
16854         non-aggregate types.
16855
16856 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
16857
16858         * typeck.c (build_reinterpret_cast): Tweak.
16859
16860 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
16861
16862         * typeck.c (build_reinterpret_cast): Converting a void pointer
16863         to function pointer with a reinterpret_cast produces a warning
16864         if -pedantic is issued.
16865
16866 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
16867
16868         * typeck.c (c_expand_return): Don't warn about returning a
16869         reference-type variable as a reference.
16870
16871 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
16872
16873         * method.c (build_static_name): Fix typo.
16874
16875 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
16876
16877         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
16878         OLDDECL before we try to do DECL_USE_TEMPLATE.
16879
16880 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16881
16882         * decl.c (duplicate_decls): Don't warn about template instances.
16883
16884         * typeck.c (mark_addressable): Lose ancient code that unsets
16885         DECL_EXTERNAL.
16886
16887         * pt.c (do_decl_instantiation): Lose support for instantiating
16888         non-templates.
16889
16890         * call.c (build_new_function_call): Fix handling of null explicit
16891         template args.
16892         (build_new_method_call): Likewise.
16893
16894 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
16895
16896         * method.c (build_underscore_int): Fix typo.
16897
16898 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
16899
16900         * tree.c (print_lang_statistics): #if 0 call to
16901         print_inline_obstack_statistics until its definition is checked in.
16902
16903 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
16904
16905         * decl2.c (finish_file): Move dump_tree_statistics to end.
16906
16907         * pt.c (instantiate_decl): Look for the original template.
16908         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
16909         of member templates.
16910
16911 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
16912
16913         * Makefile.in (g++FAQ.*): New rules.
16914         (CONFLICTS): Update.
16915         * g++FAQ.texi: Moved from libg++.
16916
16917         * parse.y (PFUNCNAME): Only specify the type once.
16918
16919 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
16920
16921         * lex.c (real_yylex): Clean up the code to fully behave the way
16922         the c-lex.c parser does for complex and real numbers.
16923
16924 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16925
16926         * method.c (build_decl_overload_real): Reformat.
16927
16928 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
16929
16930         * method.c (synthesize_method): If at_eof, determine our linkage.
16931
16932 1997-09-29  Paul Eggert  <eggert@twinsun.com>
16933
16934         * lex.c (real_yylex): Treat `$' just like `_', except issue a
16935         diagnostic if !dollars_in_ident or if pedantic.
16936
16937         * lang-specs.h (@c++): -ansi no longer implies -$.
16938
16939         * decl2.c (lang_decode_option):
16940         -traditional and -ansi now do not mess with
16941         dollars_in_ident.
16942
16943 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
16944
16945         * Makefile.in (parse.o, decl.o): Also depend on
16946         $(srcdir)/../except.h $(srcdir)/../output.h.
16947         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
16948         $(srcdir)/../except.h $(srcdir)/../output.h.
16949         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
16950         ../insn-codes.h.
16951
16952         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
16953
16954         * expr.c (cplus_expand_expr): Make it static.
16955
16956         * decl2.c, init.c, typeck.c: Include "expr.h".
16957         (expand_expr): Use proper values when calling the function.
16958
16959 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
16960
16961         * lang-options.h: New -Wold-style-cast flag.
16962         * cp-tree.h (warn_old_style_cast): New variable.
16963         * decl2.c (warn_old_style_cast): Likewise.
16964         (lang_decode_option): Support -Wold-style-cast.
16965         (reparse_absdcl_as_casts): Produce old-style-cast warning.
16966
16967 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16968
16969         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
16970         TREE_USED, reset value based on already_used.
16971
16972         * init.c (expand_member_init): Revert change.
16973
16974 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
16975
16976         * cp-tree.h, decl.c, decl2.c, pt.c:
16977         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
16978
16979         * decl2.c (lang_decode_option): Add missing ;.
16980
16981 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
16982
16983         * friend.c (do_friend): Disable injection for all template-derived
16984         decls.
16985         * decl2.c (lang_decode_option): Handle -fguiding-decls.
16986         * parse.y (notype_template_declarator): New nonterminal.
16987         (direct_notype_declarator): Use it.
16988         (complex_direct_notype_declarator): Likewise.
16989         (object_template_id): Accept any kind of identifier after TEMPLATE.
16990         (notype_qualified_id): Don't add template declarators here.
16991
16992 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
16993
16994         * call.c (add_template_candidate): Add explicit_targs parameter.
16995         (build_scoped_method_call): Use it.
16996         (build_overload_call_real): Likewise.
16997         (build_user_type_conversion_1): Likewise.
16998         (build_new_function_call): Likewise.
16999         (build_object_call): Likewise.
17000         (build_new_op): Likewise.
17001         (build_new_method_call): Likewise.
17002         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
17003         (build_new_method_call): Likewise.
17004
17005         * class.c (finish_struct_methods): Add specialization pass to
17006         determine which methods were specializing which other methods.
17007         (instantiate_type): Handle TEMPLATE_ID_EXPR.
17008
17009         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
17010
17011         * cp-tree.h (name_mangling_version): New variable.
17012         (flag_guiding_decls): Likewise.
17013         (build_template_decl_overload): New function.
17014         (begin_specialization): Likewise.
17015         (reset_specialization): Likewise.
17016         (end_specialization): Likewise.
17017         (determine_explicit_specialization): Likewise.
17018         (check_explicit_specialization): Likewise.
17019         (lookup_template_function): Likewise.
17020         (fn_type_unification): Add explicit_targs parameter.
17021         (type_unification): Likewise.
17022
17023         * decl.c (duplicate_decls): Add smarts for explicit
17024         specializations.
17025         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
17026         specializations.
17027         (grokfndecl): Call check_explicit_specialization.
17028
17029         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
17030         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
17031         (check_classfn): Handle specializations.
17032
17033         * error.c (dump_function_name): Print specialization arguments.
17034
17035         * friend.c (do_friend): Don't call pushdecl for template
17036         instantiations.
17037
17038         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
17039
17040         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
17041         and -fno-guiding-decls.
17042
17043         * lex.c (identifier_type): Return PFUNCNAME for template function
17044         names.
17045
17046         * method.c (build_decl_overload_real): New function.
17047         (build_template_parm_names): New function.
17048         (build_overload_identifier): Use it.
17049         (build_underscore_int): New function.
17050         (build_overload_int): Use it.  Add levels for template
17051         parameters.
17052         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
17053         (build_overload_nested_names): Handle template type parameters.
17054         (build_template_decl_overload): New function.
17055
17056         * parse.y (YYSTYPE): New ntype member.
17057         (nested_name_specifier): Use it.
17058         (nested_name_specifier_1): Likewise.
17059         (PFUNCNAME): New token.
17060         (template_id, object_template_id): New non-terminals.
17061         (template_parm_list): Note specializations.
17062         (template_def): Likewise.
17063         (structsp): Likewise.
17064         (fn.def2): Handle member template specializations.
17065         (component_decl_1): Likewise.
17066         (direct_notype_declarator): Handle template-ids.
17067         (component_decl_1): Likewise.
17068         (direct_notype_declarator): Handle template-ids.
17069         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
17070
17071         * pt.c (processing_specializations): New variable.
17072         (template_header_count): Likewise.
17073         (type_unification_real): New function.
17074         (processing_explicit_specialization): Likewise.
17075         (note_template_header): Likewise.
17076         (is_member_template): Handle specializations.
17077         (end_template_decl): Call reset_specialization.
17078         (push_template_decl): Handle member template specializations.
17079         (tsubst): Likewise.
17080         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
17081         (instantiate_template): Handle specializations.
17082         (instantiate_decl): Likewise.
17083         (fn_type_unification): Handle explicit_targs.
17084         (type_unification): Likewise.  Allow incomplete unification
17085         without an error message, if allow_incomplete.
17086         (get_bindings): Use new calling sequence for fn_type_unification.
17087
17088         * spew.c (yylex): Handle PFUNCNAME.
17089
17090         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
17091         (really_overloaded_fn): Likewise.
17092         (get_first_fn): Handle function templates.
17093
17094         * typeck.c (build_x_function_call): Use really_overloaded_fn.
17095         Handle TEMPLATE_ID_EXPR.
17096         (build_x_unary_op): Likewise.
17097         (build_unary_op): Likewise.
17098         (mark_addressable): Templates whose address is taken are marked
17099         as used.
17100
17101 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
17102
17103         * decl.c (init_decl_processing): Declare __builtin_constant_p as
17104         accepting any kind of type, not only int.
17105
17106 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
17107
17108         * search.c (get_matching_virtual): Notice virtual bases when sorrying
17109         about covariant returns.
17110
17111         * parse.y (member_init): Also imply typename here.  Remove ancient
17112         extension for initializing base members.
17113
17114 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
17115
17116         Handle multi-level typenames and implicit typename in base list.
17117         * parse.y (typename_sub{,[0-2]}): New rules.
17118         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
17119         (nonnested_type): New rule.
17120         (complete_type_name): Use it.
17121         (base_class.1): Use typename_sub and nonnested_type.
17122         (nested_name_specifier): Don't elide std:: here.
17123         * decl.c (make_typename_type): Handle getting a type for NAME.
17124         (lookup_name_real): Turn std:: into :: here.
17125
17126         Rvalue conversions were removed in London.
17127         * call.c (is_subseq): Don't consider lvalue transformations.
17128         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
17129         (joust): Re-enable ?: kludge.
17130
17131 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
17132
17133         * decl.c (start_function): Up warning of no return type to be a
17134         pedwarn.
17135
17136 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
17137
17138         * init.c (expand_member_init): Don't set TREE_USED.
17139         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
17140         set,don't clear TREE_USED wholesale.
17141
17142 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
17143
17144         * call.c (build_over_call): Do require_complete_type before
17145         build_cplus_new.
17146
17147 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
17148
17149         * search.c (lookup_field): Call complete_type in all cases.
17150
17151         * decl.c (finish_function): Just warn about flowing off the end.
17152
17153 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
17154
17155         * decl.c (grokparms): Don't bash a permanent list node if we're
17156         in a function.
17157
17158 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
17159
17160         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
17161
17162 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
17163
17164         * call.c (build_new_op): Give better error for syntactically
17165         correct, but semantically invalid, use of undeclared template.
17166
17167         * call.c (compare_qual): Handle pmfs.
17168
17169         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
17170         after the exception spec.
17171
17172 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
17173
17174         * call.c (null_ptr_cst_p): Integer type, not integral type.
17175
17176         * call.c (joust): Disable warnings until they can be moved to the
17177         right place.
17178
17179 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
17180
17181         * Makefile.in, config-lang.in:  Convert to autoconf.
17182
17183 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
17184
17185         * decl.c (lookup_name_real): Add implicit 'typename' to types from
17186         base classes.
17187
17188         * pt.c (most_specialized_class): Fix typo.
17189         (tsubst): Move constant folding to TREE_VEC case.
17190
17191 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
17192
17193         * pt.c (do_poplevel): Don't warn about unused local variables
17194         while processing_template_decl since we don't always know whether
17195         or not they will need constructing/destructing.
17196
17197         * pt.c (uses_template_parms): Check the values of an enumeration
17198         type to make sure they don't depend on template parms.
17199
17200         * decl.c (make_typename_type): Don't lookup the field if the
17201         context uses template parms, even if we're not
17202         processing_template_decl at the moment.
17203
17204         * pt.c (coerce_template_parms): Avoid looking at the
17205         TYPE_LANG_DECL portion of a typename type, since there won't be
17206         one.
17207         (tsubst): Do constant folding as necessary to make sure that
17208         arguments passed to lookup_template_class really are constants.
17209
17210 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
17211
17212         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
17213         * decl2.c (finish_file): Only register exception tables if we
17214         need to.
17215
17216         * decl.c (init_decl_processing): Add __builtin_[fs]p.
17217
17218 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
17219
17220         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
17221
17222 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
17223
17224         * error.c (dump_decl): Avoid crashing when presented with a
17225         uninitialized constant, as can occur with a template parameter.
17226         (dump_expr): Make sure that there are enough levels of
17227         current_template_parms before we start diving through them.
17228
17229 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
17230
17231         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
17232         c-typeck.c.
17233
17234 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
17235
17236         * except.c (expand_throw): Call build_delete for all
17237         exception types, not just objects with destructors.
17238
17239 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
17240
17241         * decl.c (current_local_enum): Remove static.
17242         * pt.c (tsubst_enum): Save and restore value of current_local_enum
17243         in case template is expanded in enum decl.
17244         (instantiate_class_template): Use new tsubst_enum signature.
17245         (tsubst_expr): Likewise.
17246
17247 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
17248
17249         * pt.c (begin_member_template_processing): Take a function as
17250         argument, not a set of template arguments.  Use the template
17251         parameters, rather than the arguments.  Handle non-type parameters
17252         correctly.  Push a binding level for the parameters so that multiple
17253         member templates using the same parameter names can be declared.
17254         (end_member_template_processing): Pop the binding level.
17255         (push_template_decl): Mark member templates as static when
17256         appropriate.
17257
17258         * lex.c (do_pending_inlines): Pass the function, not its template
17259         arguments, to begin_member_template_processing.
17260         (process_next_inline): Likewise.
17261         (do_pending_defargs): Likewise.
17262
17263         * error.c (dump_expr): Obtain the correct declaration for a
17264         TEMPLATE_CONST_PARM.
17265
17266         * call.c (add_template_conv_candidate): New function.
17267         (build_object_call): Handle member templates, as done in the other
17268         build_ functions.
17269
17270 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
17271
17272         * decl.c (replace_defag): Undo previous change.
17273         * lex.c (do_pending_defargs): Deal with member templates.
17274
17275         * pt.c (is_member_template): Avoid crashing when passed a
17276         non-function argument.
17277
17278 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
17279
17280         * class.c (grow_method): Remove check for redeclaration.
17281
17282 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
17283
17284         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
17285         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
17286         (PRIMARY_TEMPLATE_P): Use it.
17287         * call.c (build_overload_call_real): Use it.
17288         * class.c (instantiate_type): Likewise.
17289         * decl.c (decls_match): Likewise.
17290         * method.c (build_overload_identifier): Likewise.
17291         * pt.c (push_template_decl): Likewise.
17292         (classtype_mangled_name): Likewise.
17293         (lookup_template_class): Likewise.
17294
17295         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
17296         DECL_NTPARMS to conform to usage elsewhere.
17297         * call.c (add_template_candidate): Likewise.
17298         * class.c (instantiate_type): Likewise.
17299         * pt.c (instantiate_template): Likewise.
17300         (get_bindings): Likewise.
17301
17302         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
17303         is_member_template.
17304
17305         * pt.c (unify): Undo changes to allow multiple levels of template
17306         parameters.
17307         (type_unification): Likewise.
17308         (fn_type_unification): Likewise.
17309         (get_class_bindings): Likewise.
17310         * cp-tree.h (Likewise).
17311
17312         * decl.c (replace_defarg): Check that the type of the default
17313         parameter does not invlove a template type before complaining
17314         about the initialization.
17315
17316         * error.c (dump_expr): Deal with template constant parameters in
17317         member templates correctly.
17318
17319         * pt.c (is_member_template): Deal with class specializations
17320         correctly.
17321         (tsubst): Handle "partial instantiation" of member templates
17322         correctly.
17323
17324 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
17325
17326         * pt.c (type_unification): Change calling sequence to allow for
17327         multiple levels of template parameters.
17328         (tsubst_expr): Likewise.
17329         (tsubst): Likewise.
17330         (tsubst_copy): Likewise.
17331         (instantiate_template): Likewise.
17332         (unify): Likewise.
17333         * call.c (build_overload_call_real): Use it.
17334         (add_builtin_candidate): Use it.
17335         (build_new_method_call): Use it.
17336         * class.c (instantiate_type): Use it.
17337         * decl.c (grokdeclarator): Use it.
17338         * decl2.c (finish_file): Use it.
17339         * method.c (build_overload_identifier): Use it.
17340
17341         * call.c (add_template_candidate):  Add additional parameter for
17342         the function return type.  Call fn_type_unification istead of
17343         type_unification.
17344         (build_user_type_conversion_1): Handle member templates.
17345         (build_new_function_call): Likewise.
17346         (build_new_op): Likewise.
17347         (build_new_method_call): Likewise.
17348
17349         * class.c (grow_method): Don't give an error message indicating
17350         that two member templates with the same name are ambiguous.
17351         (finish_struct): Treat member template functions just like member
17352         functions.
17353
17354         * cp-tree.h (check_member_template): Add declaration.
17355         (begin_member_template_processing): Likewise.
17356         (end_member_template_processing): Likewise.
17357         (fn_type_unification): Likewise.
17358         (is_member_template): Likewise.
17359         (tsubst): Change prototype.
17360         (tsubst_expr): Likewise.
17361         (tsubst_copy): Likewise.
17362         (instantiate_template): Likewise.
17363         (get_bindings): Likewise.
17364
17365         * decl.c (decls_match): Handle multiple levels of template
17366         parameters.
17367         (pushdecl): Handle template type params just like other type
17368         declarations.
17369         (push_class_level_binding): Return immediately if the
17370         class_binding_level is NULL.
17371         (grokfndecl): If check_classfn() returns a member_template, use
17372         the result of the template, not the template itself.
17373
17374         * decl2.c (check_member_template): New function.  Check to see
17375         that the entity declared to be a member template can be one.
17376         (check_classfn): Allow redeclaration of member template functions
17377         with different types; the new functions can be specializations or
17378         explicit instantiations.
17379
17380         * error.c (dump_decl): Handle multiple levels of template
17381         parameters.
17382         (dump_function_decl): Update to handle function templates.
17383
17384         * lex.c (do_pending_inlines): Set up template parameter context
17385         for member templates.
17386         (process_next_inline): Likewise.
17387
17388         * method.c (build_overload_identifier): Adjust for multiple levels
17389         of template parameters.
17390
17391         * parse.y (fn.def2): Add member templates.
17392         (component_decl_1): Likewise.
17393
17394         * pt.c (begin_member_template_processing): New function.
17395         (end_member_template_processing): Likewise.
17396         (is_member_template): Likewise.
17397         (fn_type_unification): Likewise.
17398         (current_template_parms): Return a vector of all the template
17399         parms, not just the innermost level of parms.
17400         (push_template_decl): Deal with the possibility of member
17401         templates.
17402         (lookup_template_class): Likewise.
17403         (uses_template_parms): Likewise.
17404         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
17405         TEMPLATE_CONST_PARM to deal with multiple levels of template
17406         arguments.   Add processing of TEMPLATE_DECL to produce new
17407         TEMPLATE_DECLs from old ones.
17408         (do_decl_instantiation): Handle member templates.
17409
17410         * search.c (lookup_fnfields_1): Handle member template conversion
17411         operators.
17412
17413         * tree.c (cp_tree_equal): Check the levels, as well as the
17414         indices, of TEMPLATE_CONST_PARMs.
17415
17416         * typeck.c (comptypes): Check the levels, as well as the indices,
17417         fo TEMPLATE_TYPE_PARMs.
17418         (build_x_function_call): Treat member templates like member
17419         functions.
17420
17421 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
17422
17423         * typeck.c (c_expand_return): Always convert_for_initialization
17424         before checking for returning a pointer to local.
17425
17426         * pt.c (type_unification): If strict and the function parm doesn't
17427         use template parms, just compare types.
17428
17429 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
17430
17431         * method.c (build_overloaded_value): Replace direct call
17432         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
17433
17434 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
17435
17436         * typeck.c (convert_arguments): Don't arbitrarily choose the first
17437         of a set of overloaded functions.
17438
17439 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
17440
17441         * lex.c (real_yylex): Don't elide __FUNCTION__.
17442
17443         * method.c (build_overload_value): Add in_template parm.
17444         (build_overload_int): Likewise.
17445         (build_overload_identifier): Pass it.
17446
17447         * decl.c (duplicate_decls): Don't bash a previous template
17448         definition with a redeclaration.
17449
17450         * pt.c (unify): float doesn't match double.
17451
17452         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
17453         TYPE_DECL.  Handle getting non-template types.
17454         * parse.y (explicit_instantiation): Use typespec instead of
17455         aggr template_type.
17456
17457 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
17458
17459         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
17460
17461 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
17462
17463         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
17464         (compare_ics): Likewise.
17465
17466 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
17467
17468         * call.c (joust): Warn about choosing one conversion op over
17469         another because of 'this' argument when the other return type is
17470         better.
17471         (source_type): New fn.
17472
17473         * call.c (build_new_op): Strip leading REF_BIND from first operand
17474         to builtin operator.
17475
17476         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
17477         use its RTL.
17478
17479 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
17480
17481         * call.c (null_ptr_cst_p): Remove support for (void*)0.
17482
17483 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
17484
17485         * typeck.c (expand_target_expr): Make definition match declaration.
17486
17487         * class.c (get_basefndecls): Make definition match declaration.
17488
17489 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
17490
17491         * input.c (sub_getch): Eventually give up and release the input file.
17492
17493         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
17494         right place.
17495
17496         * call.c (joust): Tweak message.
17497
17498 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
17499
17500         * error.c (type_as_string): Put const/volatile on template type
17501         parameters where appropriate.
17502
17503 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
17504
17505         * call.c (strictly_better): Make arguments unsigned ints.
17506
17507 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
17508
17509         * lex.c (real_yylex): Refer to __complex instead of complex.
17510
17511 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
17512
17513         * lex.c (real_yylex): Don't use getc directly.
17514
17515 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
17516
17517         * call.c (is_subseq): Don't try to be clever.
17518
17519 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
17520
17521         * parse.y, pt.c: Include "except.h".
17522         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
17523         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
17524         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
17525         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
17526         prototyping.
17527
17528 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
17529
17530         * decl2.c (mark_vtable_entries): Instead of replacing pure
17531         virtuals with a reference to __pure_virtual, copy the decl and
17532         change the RTL.
17533
17534 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
17535
17536         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
17537
17538         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
17539
17540         * pt.c (instantiate_class_template): Call repo_template_used
17541         before finish_prevtable_vardecl.
17542
17543         * call.c (is_subseq): New fn.
17544         (compare_ics): Use it.
17545
17546         * repo.c (finish_repo): Don't crash on no args.
17547
17548         * parse.y (named_complex_class_head_sans_basetype): Handle
17549         explicit global scope.
17550         * decl2.c (handle_class_head): New fn.
17551
17552         * pt.c (unify): Add CONST_DECL case.
17553
17554 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17555
17556         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
17557
17558         * cp-tree.h (report_type_mismatch): Add prototype.
17559         * call.c (build_overload_call_real): Remove erroneous fourth
17560         argument to report_type_mismatch.
17561         (build_user_type_conversion_1): Remove erroneous second arg to
17562         tourney.
17563         (build_new_function_call): Likewise.
17564         (build_object_call): Likewise.
17565         (build_new_op): Likewise.
17566         (build_new_method_call): Likewise.
17567
17568 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
17569
17570         * error.c (dump_decl): Don't bother processing a function with no
17571         DECL_LANG_SPECIFIC.
17572
17573         * method.c (emit_thunk): Call init_function_start in the macro case.
17574
17575 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
17576
17577         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
17578         defined and used to set flag_vtable_thunks.
17579
17580 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
17581
17582         * parse.y: Don't clear the inlines from their obstack until they've
17583         all been processed.
17584
17585         * decl.c (duplicate_decls): Don't complain about exception
17586         specification mismatch if flag_exceptions is off.
17587
17588 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
17589
17590         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
17591
17592 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
17593
17594         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
17595         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
17596         Include <stdio.h> before include files that formerly used STDIO_PROTO.
17597
17598         * decl.c, g++spec.c, lex.c, method.c, repo.c:
17599         Include "config.h" first, as per autoconf manual.
17600
17601 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
17602
17603         * decl.c (duplicate_decls): Tweak wording.
17604         * lex.c (do_pending_defargs): Don't die if we see a default arg
17605         that isn't a DEFAULT_ARG.
17606         * error.c (dump_expr): Handle DEFAULT_ARG.
17607
17608         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
17609         * lang-options.h: Add -fhandle-exceptions.
17610
17611         * class.c (build_vtable): Vtables are artificial.
17612         (prepare_fresh_vtable): Likewise.
17613
17614 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
17615
17616         * cvt.c (ocp_convert): After converting to the target type, set
17617         LOOKUP_NO_CONVERSION.
17618
17619         * call.c (joust): Warn about potentially confusing promotion rules
17620         with -Wsign-promo.
17621         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
17622
17623 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
17624
17625         * exception.cc: Declare __terminate_func with noreturn attribute.
17626
17627 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
17628
17629         * parse.y: Break out eat_saved_input, handle errors.
17630         (function_try_block): Use compstmt instead of compstmt_or_error.
17631
17632 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
17633
17634         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
17635
17636 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
17637
17638         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
17639         existence of cc1plus check whether $(LANGUAGES) contains C++.
17640
17641 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
17642
17643         * method.c (do_build_copy_constructor): When copying an anonymous
17644         union member loop around to handle nested anonymous unions.  Use
17645         the offset of the member relative to the outer structure, not the
17646         union.
17647
17648 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
17649
17650         * call.c (resolve_args): New fn.
17651         (build_new_function_call): Use it.
17652         (build_object_call): Likewise.
17653         (build_new_method_call): Likewise.
17654
17655 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
17656
17657         * call.c (build_over_call): tsubst all default parms from templates.
17658
17659 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
17660
17661         * decl.c (struct cp_function): Add static_labelno.
17662         (push_cp_function_context): Save it.
17663         (pop_cp_function_context): Restore it.
17664
17665 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
17666
17667         * typeck.c (build_component_ref_1): Convert from reference.
17668
17669 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17670
17671         * parse.y (current_declspecs, prefix_attributes): Initialize to
17672         NULL_TREE.
17673
17674         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
17675         before we try to force it to be a TREE_LIST.
17676         (decl): Make sure $1.t is non-nil.
17677
17678 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
17679
17680         * pt.c (uses_template_parms): Handle template first-parse codes.
17681
17682         * decl.c (cp_finish_decl): Only warn about user-defined statics.
17683
17684 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
17685
17686         * pt.c (unify): Handle BOOLEAN_TYPE.
17687
17688         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
17689         * pt.c (tsubst): Don't set it.
17690         * call.c (build_over_call): Use uses_template_parms.
17691
17692 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
17693
17694         * method.c (build_overload_nested_name): Use static_labelno
17695         instead of var_labelno.
17696         (build_qualified_name): New fn.
17697         (build_overload_name): Split out from here.
17698         (build_static_name): Use build_qualified_name.
17699         * decl.c (cp_finish_decl): Statics in extern inline functions
17700         have comdat linkage.
17701         (start_function): Initialize static_labelno.
17702
17703 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
17704
17705         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
17706         before "all member functions in class [] are private".
17707
17708 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
17709
17710         * lex.c (do_scoped_id): convert_from_reference.
17711         * init.c (build_offset_ref): Likewise.
17712
17713 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
17714
17715         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
17716
17717 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
17718
17719         * typeck.c (get_member_function_from_ptrfunc): Promote index
17720         before saving it.
17721
17722 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
17723
17724         * tree.c (layout_basetypes): Move non-virtual destructor warning.
17725         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
17726
17727 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
17728
17729         * decl.c (grokdeclarator): Call add_defarg_fn for the function
17730         type, too.
17731         * lex.c (add_defarg_fn): Adjust.
17732         (do_pending_defargs): Adjust.  Don't skip the first parm.
17733
17734 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
17735
17736         * decl.c (build_enumerator): Global enumerators are also readonly.
17737
17738         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
17739         (build_dynamic_cast): Call it and convert_from_reference.
17740
17741         * lex.c (add_defarg_fn): New fn.
17742         (snarf_defarg): Don't add to defarg_types.
17743         (do_pending_defargs): Lose defarg_types.  All fns we process now
17744         have defargs.
17745         * decl.c (grokfndecl): Call add_defarg_fn.
17746
17747         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
17748         * cp-tree.def: Add DEFAULT_ARG.
17749         * spew.c (yylex): Call snarf_defarg as appropriate.
17750         * parse.y: New tokens DEFARG and DEFARG_MARKER.
17751         (defarg_again, pending_defargs, defarg, defarg1): New rules.
17752         (structsp): Use pending_defargs.
17753         (parms, full_parm): Use defarg.
17754         * lex.c (init_lex): Initialize inline_text_firstobj.
17755         (do_pending_inlines): Never pass the obstack to feed_input.
17756         (process_next_inline): Call end_input instead of restore_pending_input.
17757         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
17758         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
17759         * input.c (end_input): New fn.
17760         (sub_getch): At the end of some fed input, just keep returning EOF
17761         until someone calls end_input.
17762         Remove 'obstack' field from struct input_source.
17763         * decl.c (grokparms): Handle DEFAULT_ARG.
17764         (replace_defarg): New fn.
17765         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
17766
17767 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
17768
17769         * call.c (implicit_conversion): If nothing else works, try binding
17770         an rvalue to a reference.
17771
17772 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
17773
17774         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
17775         ifndef for Cygwin32 to include SIGSEGV.
17776
17777 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
17778
17779         * class.c (finish_struct_1): Only complain about pointers without
17780         copy stuff if there are any constructors.
17781
17782         * rtti.c (build_dynamic_cast): Call complete_type on the types.
17783
17784         * decl.c (grokfndecl): If the function we chose doesn't actually
17785         match, die.
17786
17787         * decl2.c (grokclassfn): Don't specify 'const int' for the
17788         artificial destructor parm.
17789
17790         * pt.c (type_unification): If we are called recursively, nothing
17791         decays.
17792
17793 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
17794
17795         * decl.c (init_decl_processing): Stop trying to catch signals
17796         other than SIGABRT since the Cygwin32 library doesn't support
17797         them correctly yet.  This fixes a situation in which g++ causes
17798         a hang on SIGSEGVs and other such signals in our Win32-hosted
17799         tools.
17800
17801 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
17802
17803         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
17804
17805 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
17806
17807         * typeck2.c (store_init_value): Always return the value if our
17808         type needs constructing.
17809
17810         * method.c (hack_identifier): Convert class statics from
17811         reference, too.
17812
17813 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
17814
17815         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
17816
17817 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
17818
17819         * typeck.c (c_expand_return): Make sure we clean up temporaries at
17820         the end of return x;
17821
17822 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17823
17824         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
17825
17826 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
17827
17828         * except.c (expand_builtin_throw): Add support
17829         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
17830
17831 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
17832
17833         * repo.c (extract_string): Null-terminate.
17834
17835         * cp-tree.h (TI_SPEC_INFO): New macro.
17836         (CLASSTYPE_TI_SPEC_INFO): New macro.
17837         * pt.c (push_template_decl): Correctly determine # of template parms
17838         for partial specs.
17839
17840         * call.c (compare_ics): Really fix 'this' conversions.
17841
17842         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
17843         non-template fn.
17844
17845         * pt.c (push_template_decl): Complain about mismatch in # of
17846         template parms between a class template and a member template.
17847
17848 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
17849
17850         * method.c (synthesize_method): You can't call
17851         function_cannot_inline_p after finish_function.
17852         * decl.c (finish_function): Turn on flag_inline_functions and turn
17853         off DECL_INLINE before handing a synthesized method to the
17854         backend.
17855
17856 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
17857
17858         * method.c (synthesize_method): Remove July 30 change to never set
17859         DECL_INLINE if at_eof.
17860
17861 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
17862
17863         * xref.c (GNU_xref_member): Ensure that the node has a
17864         decl_lang_specific part before checking DECL_FRIEND_P.
17865
17866 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
17867
17868         * pt.c (instantiate_class_template): Diagnose non-class types used
17869         as bases.
17870
17871 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
17872
17873         * typeck.c (build_conditional_expr): Use convert_for_initialization
17874         instead of convert_and_check.
17875
17876 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17877
17878         * parse.y (typespec): Don't pedwarn for typeof.
17879
17880 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
17881
17882         * repo.c (finish_repo): Only check changes if we would write a
17883         repo file.
17884
17885         * call.c (compare_ics): Fix handling of 'this' conversions.
17886
17887         * pt.c (do_decl_instantiation): Support static data too.  Rename
17888         from do_function_instantiation.
17889         * cp-tree.h: Adjust.
17890         * parse.y: Adjust.
17891
17892         * repo.c (extract_string): New fn.
17893         (get_base_filename): Use it.
17894         (init_repo): Compare old args with current args.
17895
17896 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
17897
17898         * Makefile.in, Make-lang.in: Protect C-ls with a comment
17899         character, idea from Paul Eggert <eggert@twinsun.com>.
17900
17901 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
17902
17903         * typeck.c (c_expand_return): Be more persistent in looking for
17904         returned temps.
17905
17906         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
17907         pointer to reference.
17908
17909         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
17910
17911 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
17912
17913         * init.c (build_member_call, build_offset_ref):
17914         Use do_scoped_id instead of do_identifier.
17915
17916         * cvt.c (convert): Remove bogosity.
17917
17918 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17919
17920         * cvt.c (build_up_reference): Do checks of ARGTYPE and
17921         TARGET_TYPE before trying to use get_binfo.
17922
17923 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
17924
17925         * cvt.c (build_up_reference): Call get_binfo to get access control.
17926
17927         * decl2.c (import_export_decl): If we don't support weaks, leave
17928         statics undefined.
17929
17930 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
17931
17932         * except.c (expand_builtin_throw): Add support for machines that
17933         cannot access globals after throw's epilogue when
17934         -fno-sjlj-exceptions is used.
17935
17936 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
17937
17938         * parse.y: 'std::' becomes '::'.
17939         * lex.c (real_yylex): Remove 'namespace' warning.
17940         * init.c (build_member_call): Ignore 'std::'.
17941         (build_offset_ref): Likewise.
17942         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
17943         (do_toplevel_using_decl): Ignore 'using std::whatever'.
17944         * decl.c (push_namespace): Just sorry.
17945         (pop_namespace): Nop.
17946         (init_decl_processing): Declare std namespace.
17947
17948 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
17949
17950         * search.c (push_class_decls): A name which ambiguously refers to
17951         several instantiations of the same template just refers to the
17952         template.
17953
17954 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
17955
17956         * decl.c (build_enumerator): Fix problem with unsigned long
17957         enumerated values being smashed to ints, causing overflow
17958         when computing next enumerated value (for enum values around
17959         MAX_VAL).
17960
17961 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
17962
17963         * typeck.c (build_component_ref): Only call mark_used on a decl.
17964
17965 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17966
17967         * typeck.c (build_c_cast): Make the check for a ptr to function
17968         more specific before possible default_conversion call.
17969
17970 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
17971
17972         * except.c (expand_exception_blocks): Simplify and fix and make
17973         sure we don't end a region in a sequence, as expand_end_bindings
17974         doesn't like it.
17975
17976 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
17977
17978         * except.c (init_exception_processing): Mark terminate as not
17979         returning so that the optimizer can optimize better.
17980
17981 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
17982
17983         * cvt.c (convert): Don't do any extra work, if we can avoid it
17984         easily.
17985
17986 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
17987
17988         * *.[chy]: Change cp_convert to ocp_convert, change convert to
17989         cp_convert.  convert is now reserved for the backend, and doesn't
17990         have the semantics a frontend person should ever want.
17991
17992 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
17993
17994         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
17995         Lose -traditional support.
17996
17997 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
17998
17999         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
18000
18001         * parse.y (self_reference): Do it for templates, too.
18002         * class.c (pushclass): Don't overload_template_name; the alias
18003         generated by build_self_reference serves the same purpose.
18004
18005         * tree.c (list_hash): Make static, take more args.
18006         (list_hash_lookup): Likewise.
18007         (list_hash_add): Make static.
18008         (list_hash_canon): Lose.
18009         (hash_tree_cons): Only build a new node if one isn't already in the
18010         hashtable.
18011         (hash_tree_chain): Use hash_tree_cons.
18012         * cp-tree.h: Adjust.
18013         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
18014         of calling lookup_name.
18015
18016 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
18017
18018         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
18019         doesn't refer to the CONST_DECLs.
18020
18021 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
18022
18023         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
18024         is bigger.
18025         (expand_class_desc): Convert the last argument to a sizetype.
18026
18027 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18028
18029         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
18030         __real__): Add reswords.
18031         * hash.h: Regenerate.
18032         * lex.h (rid): Add RID_COMPLEX.
18033         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
18034         * lex.c (init_lex): Add building of RID_COMPLEX.
18035         (real_yylex): General cleanup in line with what c-lex.c also has,
18036         sans the cruft for traditional; add handling of SPEC_IMAG, complex
18037         types, and imaginary numeric constants.
18038         * parse.y (REALPART, IMAGPART): Add tokens.
18039         (unary_expr): Add REALPART and IMAGPART rules.
18040         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
18041         * decl.c (complex_{integer,float,double,long}_type_node): Define
18042         types.
18043         (init_decl_processing): Set up the types.
18044         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
18045         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
18046         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
18047         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
18048         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
18049         COMPLEX_TYPE case.
18050         * method.c (build_overload_name): Add handling of the different
18051         COMPLEX_TYPEs, prefixing them with `J'.
18052         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
18053         as a template parm.
18054         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
18055         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
18056         (mapcar): Handle COMPLEX_CST.
18057         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
18058         (common_type): Add code for complex types.
18059         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
18060         (convert_for_assignment): Likewise.
18061         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
18062
18063 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
18064
18065         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
18066         tsubst_expr, as it might try to do overload resolution.
18067
18068 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
18069
18070         * pt.c (instantiate_class_template): Oops.
18071
18072 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
18073
18074         * cp-tree.def: Add TAG_DEFN.
18075         * pt.c (tsubst_enum): New fn.
18076         (instantiate_class_template): Use it.
18077         (tsubst_expr): Support TAG_DEFN.
18078         (tsubst): Support local enums.
18079         (tsubst_copy): Likewise.
18080         * decl.c (finish_enum): Likewise.
18081         (start_enum): If this is a local enum, switch to permanent_obstack.
18082
18083 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
18084
18085         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
18086         (finish_function): Put the base init code for constructors just
18087         after the parm cleanup insns.
18088         (struct cp_function): Add last_parm_cleanup_insn.
18089         (push_cp_function_context): Likewise.
18090         (pop_cp_function_context): Likewise.
18091
18092 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
18093
18094         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
18095
18096 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18097
18098         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
18099         for THUNK_FNDECL before we switch to temporary allocation.
18100
18101 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
18102
18103         * call.c (build_new_op): Handle null arg2 for ?:.
18104
18105 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
18106
18107         * except.c (expand_exception_blocks): Ensure that we flow through
18108         the end of the exception region for the exception specification.
18109         Move exception region for the exception specification in, so that
18110         it doesn't protect the parm cleanup.  Remove some obsolete code.
18111         * decl.c (store_parm_decls): Likewise.
18112         (finish_function): Likewise.
18113
18114 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
18115
18116         * init.c (build_new): Fix nothrow handling.
18117
18118 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18119
18120         * init.c (emit_base_init): Don't warn about the initialization
18121         list for an artificial member.
18122
18123 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18124
18125         * expr.c (do_case): Handle !START case for the error msg.
18126
18127 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
18128
18129         * decl2.c, lang-options.h: New option -Weffc++.
18130         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
18131         to -Weffc++.
18132
18133         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
18134         to MULTIPLE_SYMBOL_SPACES.
18135
18136 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
18137
18138         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
18139
18140         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
18141
18142         * typeck.c (c_expand_return): Don't complain about returning void
18143         to void in an artificial function.
18144         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
18145         don't set DECL_RESULT, set DECL_ARTIFICIAL.
18146         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
18147
18148 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
18149
18150         * init.c (init_decl_processing): Add support for setjmp/longjmp based
18151         exception handling.
18152         * except.c (init_exception_processing): Likewise.
18153         (expand_end_catch_block): Likewise.
18154         (expand_exception_blocks): Likewise.
18155         (expand_throw): Likewise.
18156         * exception.cc (__default_terminate): Likewise.
18157
18158         * init.c (perform_member_init): Use new method of expr level
18159         cleanups, instead of cleanups_this_call and friends.
18160         (emit_base_init): Likewise.
18161         (expand_aggr_vbase_init_1): Likewise.
18162         (expand_vec_init): Likewise.
18163         * decl.c (cp_finish_decl): Likewise.
18164         (expand_static_init): Likewise.
18165         (store_parm_decls): Likewise.
18166         (cplus_expand_expr_stmt): Likewise.
18167         * decl2.c (finish_file): Likewise.
18168
18169         * Make-lang.in (exception.o): Ok to compile with -O now.
18170
18171         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
18172         we know it will be done later by the backend.
18173
18174         * decl2.c (lang_f_options): Remove support for short temps.
18175         * lang-options.h: Likewise.
18176
18177 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
18178
18179         * tree.c (varargs_function_p): New fn.
18180         * method.c (emit_thunk): Replace broken generic code with code to
18181         generate a heavyweight thunk function.
18182
18183 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
18184
18185         * pt.c (process_template_parm): pedwarn about floating-point parms.
18186
18187         * decl.c (grokdeclarator): inline no longer implies static.
18188
18189         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
18190
18191 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
18192
18193         * class.c (check_for_override): The signature of an overriding
18194         function is not changed.
18195
18196         * call.c (build_over_call): Move setting of conv into the loop.
18197         Note: this change, along with the related changes of the 18th thru
18198         the 20th of April, fix an infinite loop problem in conversions.
18199
18200 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
18201
18202         * call.c (build_user_type_conversion_1): Really ignore rvalue
18203         conversions when looking for a REFERENCE_TYPE.
18204
18205         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
18206         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
18207         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
18208         (build_unary_op): Likewise.
18209         * call.c (build_over_call): See through a CONVERT_EXPR around the
18210         ADDR_EXPR for on a temporary.
18211         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
18212         the ADDR_EXPR for a local variable.
18213
18214 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
18215
18216         * call.c (build_user_type_conversion_1): If we're trying to
18217         convert to a REFERENCE_TYPE, only consider lvalue conversions.
18218         (build_new_function_call): Print candidates.
18219         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
18220         (reference_binding): Binding a temporary of a reference-related type
18221         is BAD.
18222
18223 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18224
18225         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
18226         * tinfo2.cc (type_info::before): Likewise.
18227
18228 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
18229
18230         * call.c (implicit_conversion): Oops.
18231
18232 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
18233
18234         * call.c (implicit_conversion): Try to find a reference conversion
18235         before binding a const reference to a temporary.
18236
18237 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
18238
18239         * exception.cc (__default_unexpected): Call terminate by default,
18240         so that if the user overrides terminate, the correct function will
18241         be called.
18242
18243 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
18244
18245         * parse.y (left_curly): Avoid trying to use any fields of
18246         error_mark_node, as there aren't any.
18247
18248 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
18249
18250         * lex.c (do_identifier): Avoid breaking on overloaded methods
18251         as default arguments.
18252
18253 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
18254
18255         * call.c (add_template_candidate): Initialize the variable "dummy".
18256
18257 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
18258
18259         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
18260         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
18261
18262 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18263
18264         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
18265         (debug_binfo): Delete decl, not needed.
18266
18267         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
18268         promotes_to_aggr_type): Delete fns.
18269         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
18270         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
18271         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
18272
18273         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
18274
18275         * friend.c (is_friend_type): Delete fn.
18276         * cp-tree.h (is_friend_type): Delete decl.
18277
18278         * decl.c (original_result_rtx, double_ftype_double,
18279         double_ftype_double_double, int_ftype_int, long_ftype_long,
18280         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
18281         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
18282
18283         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
18284         fwd decls.
18285         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
18286
18287         * decl.c (pushdecl_nonclass_level): #if 0, unused.
18288         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
18289
18290         * lex.c (reinit_lang_specific): #if 0, unused.
18291         * cp-tree.h (reinit_lang_specific): #if 0 decl.
18292
18293         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
18294         * cp-tree.h (revert_static_member_fn): Delete decl.
18295
18296         * class.c (root_lang_context_p): Delete fn.
18297         * cp-tree.h (root_lang_context_p): Delete decl.
18298
18299         * decl.c (set_current_level_tags_transparency): #if 0, unused.
18300         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
18301
18302         * lex.c (set_vardecl_interface_info): Make static.
18303         * cp-tree.h (set_vardecl_interface_info): Delete decl.
18304
18305         * call.c (find_scoped_type): Make static.
18306         * cp-tree.h (find_scoped_type): Delete decl.
18307
18308         * search.c (convert_pointer_to_vbase): Make static.
18309         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
18310
18311         * decl.c (const_ptr_type_node): Likewise.
18312         * cp-tree.h (const_ptr_type_node): Delete decl.
18313
18314         * typeck.c (common_base_type): Make static.
18315         * cp-tree.h (common_base_types): Delete erroneous decl.
18316
18317         * pt.c (classtype_mangled_name): Make static.
18318         * cp-tree.h (classtype_mangled_name): Delete decl.
18319
18320         * lex.c (check_newline): Make static.
18321         * cp-tree.h (check_newline): Delete decl.
18322
18323         * typeck.c (build_x_array_ref): Delete fn, same idea as
18324         grok_array_decl.
18325         * cp-tree.h (build_x_array_ref): Delete decl.
18326
18327         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
18328         copy_lang_decl.
18329         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
18330
18331         * class.c (build_vtable_entry): Make static.
18332         * cp-tree.h (build_vtable_entry): Delete decl.
18333
18334         * class.c (build_vbase_pointer): Make static.
18335         * cp-tree.h (build_vbase_pointer): Delete decl.
18336
18337         * sig.c (build_sptr_ref): Add forward decl and make static.
18338         * cp-tree.h (build_sptr_ref): Delete decl.
18339
18340         * call.c (build_new_method_call): Add forward decl and make static.
18341         * cp-tree.h (build_new_method_call): Delete decl.
18342
18343         * call.c (build_object_call): Make static.
18344         * class.c (check_for_override, complete_type_p, mark_overriders):
18345         Likewise.
18346         * decl.c (cp_function_chain): Likewise.
18347         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
18348         Likewise.
18349         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
18350         Likewise.
18351         * tree.c (build_cplus_array_type_1): Likewise.
18352         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
18353         (comp_target_parms): Likewise.
18354
18355         * init.c (build_builtin_call): Make static.
18356         * cp-tree.h (build_builtin_call): Delete decl.
18357
18358         * typeck.c (binary_op_error): Delete decl.
18359         * cp-tree.h (binary_op_error): Likewise.
18360
18361 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18362
18363         * call.c (build_method_call): Compare against error_mark_node
18364         directly, rather than the ERROR_MARK tree code.
18365         * cvt.c (cp_convert): Likewise.
18366         * decl.c (print_binding_level): Likewise.
18367         (duplicate_decls): Likewise.
18368         (grokdeclarator): Likewise.
18369         (grokdeclarator): Likewise.
18370         * init.c (expand_aggr_init_1): Likewise.
18371         (decl_constant_value): Likewise.
18372         * method.c (build_opfncall): Likewise.
18373         (hack_identifier): Likewise.
18374         * typeck.c (build_modify_expr): Likewise.
18375
18376         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
18377
18378 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
18379
18380         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
18381
18382         * pt.c (coerce_template_parms): Add new error message.
18383
18384         * method.c (build_overload_value): Implement name mangling for
18385         floating-point template arguments.
18386
18387         * method.c (build_overload_int, icat, dicat): Fix mangling of template
18388         arguments whose absolute value doesn't fit in a signed word.
18389
18390 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18391
18392         * friend.c: New file; put all of the friend stuff in here.
18393         * init.c: Instead of here.
18394         * Makefile.in (CXX_OBJS): Add friend.o.
18395         (friend.o): Add dependencies.
18396         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
18397
18398 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
18399
18400         * call.c (build_scoped_method_call): Complain if the scope isn't a
18401         base.
18402
18403 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
18404
18405         * parse.y (left_curly): Don't crash on erroneous type.
18406
18407         * init.c (build_delete): Fix type of ref.
18408
18409 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
18410
18411         * search.c (get_vbase_1): Renamed from get_vbase.
18412         (get_vbase): Wrapper, now non-static.
18413         (convert_pointer_to_vbase): Now static.
18414
18415         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
18416         * init.c (build_delete): Pass one.
18417         (build_partial_cleanup_for): Use build_scoped_method_call.
18418         * decl.c (finish_function): Pass a binfo.
18419
18420 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
18421
18422         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
18423
18424         * typeck.c (build_c_cast): Lose other reference to flag.
18425
18426         * call.c (build_field_call): Don't look for [cd]tor_identifier.
18427         * decl2.c (delete_sanity): Remove meaningless use of
18428         LOOKUP_HAS_IN_CHARGE.
18429         * decl.c (finish_function): Use build_scoped_method_call instead
18430         of build_delete for running vbase dtors.
18431         * init.c (build_delete): Call overload resolution code instead of
18432         duplicating it badly.
18433
18434 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
18435
18436         * call.c (build_over_call): Call mark_used before trying to elide
18437         the call.
18438
18439         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
18440
18441 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18442
18443         * typeck.c (build_modify_expr): Always pedwarn for a cast to
18444         non-reference used as an lvalue.
18445
18446 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
18447
18448         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
18449
18450 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
18451
18452         * parse.y (handler): Fix template typo.
18453
18454 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
18455
18456         * error.c (lang_decl_name): New fn.
18457         * tree.c (lang_printable_name): Use it.
18458
18459 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
18460
18461         * g++spec.c: Include config.h so that we can catch bzero #defines
18462         from the config file.
18463
18464 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
18465
18466         * new1.cc: Include a declaration for malloc, to avoid warning, and
18467         avoid lossing on systems that require one (ones that define malloc
18468         in xm.h).
18469
18470 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
18471
18472         * decl2.c (max_tinst_depth): New variable.
18473         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
18474         option.
18475         * pt.c (max_tinst_depth): Variable moved.
18476         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
18477         as legal.
18478
18479 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
18480
18481         * decl.c (xref_basetypes): Allow a base class that depends on
18482         template parms to be incomplete.
18483
18484         * decl2.c (build_expr_from_tree): Support typeid(type).
18485         * rtti.c (get_typeid): Support templates.
18486         (expand_si_desc, expand_class_desc): Fix string length.
18487         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
18488
18489 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
18490
18491         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
18492
18493         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
18494
18495 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
18496
18497         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
18498         smashes together template and non-template decls of the same
18499         signature.
18500
18501 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
18502
18503         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
18504
18505 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18506
18507         * decl.c (duplicate_decls): Next route, pedwarn about different
18508         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
18509
18510 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18511
18512         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
18513         (struct lang_type): Delete has_default_implementation member.
18514         Increase dummy to 21.
18515         * decl.c (start_method): Delete usage.
18516
18517         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
18518         store_after_parms, start_decl_1, auto_function): Add decls.
18519         (get_arglist_len_in_bytes, declare_implicit_exception,
18520         have_exceptions_p, make_type_decl, typedecl_for_tag,
18521         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
18522         build_component_type_expr, cplus_exception_name,
18523         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
18524         * call.c (build_this): Make static.
18525         (is_complete): Likewise.
18526         (implicit_conversion): Likewise.
18527         (reference_binding): Likewise.
18528         (standard_conversion): Likewise.
18529         (strip_top_quals): Likewise.
18530         (non_reference): Likewise.
18531         (build_conv): Likewise.
18532         (user_harshness): Likewise.
18533         (rank_for_ideal): Likewise.
18534         * decl.c (start_decl_1): Delete forward decl.
18535         (push_decl_level): Make static.
18536         (resume_binding_level): Make static.
18537         (namespace_bindings_p): Make static.
18538         (declare_namespace_level): Make static.
18539         (lookup_name_real): Make static.
18540         (duplicate_decls): Make static.  Take register off NEWDECL and
18541         OLDDECL parm decls.
18542         * decl2.c (get_sentry): Make static.
18543         (temp_name_p): Delete fn.
18544         * except.c (auto_function): Delete decl.
18545         * lex.c (handle_{cp,sysv}_pragma): Make static.
18546         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
18547         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
18548         * pt.c (tsubst_expr_values): Make static.
18549         * rtti.c (combine_strings): Delete decl.
18550
18551 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
18552
18553         * pt.c (push_template_decl): Handle getting a typedef.
18554
18555         * call.c (build_new_function_call): Complain about void arg.
18556
18557 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18558
18559         * decl.c (duplicate_decls): Give pedwarn of different exceptions
18560         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
18561
18562 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
18563
18564         * except.c (expand_throw): Don't expand the cleanup tree here,
18565         since we are not going to write the rtl out.  Fixes problem with
18566         -g -O on SPARC.
18567
18568 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
18569
18570         * Make-lang.in: Add $(exeext) as necessary.
18571
18572 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
18573
18574         * parse.y (handler_seq): Must have at least one catch clause.
18575
18576 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
18577
18578         * call.c (add_builtin_candidate): Restore ?: hack.
18579
18580         * decl.c (grok_op_properties): More warnings.
18581
18582 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18583
18584         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
18585         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
18586
18587         * decl.c (duplicate_decls): Scale back to a warning, and only do
18588         'em if -pedantic.
18589
18590 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
18591
18592         * decl.c (duplicate_decls): pedwarn mismatched exception
18593         specifications.
18594
18595 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
18596
18597         * call.c (build_new_method_call): Don't display the invisible
18598         argument for controlling virtual bases.
18599
18600 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
18601
18602         * new: Add nothrow new and delete, bad_alloc and throw specifications
18603         for delete.
18604         * decl.c (init_decl_processing): Add throw specification for delete.
18605         * new.cc (nothrow): Define.
18606         * lex.c (real_yylex): Removing warning that throw and friends are
18607         keywords.
18608         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
18609         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
18610         * Make-lang.in: Add new{1,2}.{cc,o}.
18611
18612 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
18613
18614         * lex.c (cons_up_default_function): Fix return type of synth op=.
18615
18616         * init.c (emit_base_init): Add warnings for uninitialized members
18617         and bases.
18618
18619         * decl.c (xref_basetypes): Add warning for non-polymorphic type
18620         with destructor used as base type.
18621
18622         * decl.c (grok_op_properties): Add warning for op= returning void.
18623         * typeck.c (c_expand_return): Add warning for op= returning anything
18624         other than *this.
18625
18626         * class.c (finish_struct_1): Add warning for class with pointers
18627         but not copy ctor or copy op=.
18628
18629         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
18630         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
18631         (instantiate_template): If -fexternal-templates, add this
18632         instantiation to pending_templates.
18633
18634         * decl2.c (copy_assignment_arg_p): Disable old hack to support
18635         Booch components.
18636
18637 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
18638
18639         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
18640
18641 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
18642
18643         * call.c (standard_conversion): Handle getting references.  Tack
18644         on RVALUE_CONV here.  Do it for non-class types, too.
18645         (reference_binding): Pass references to standard_conversion.
18646         (implicit_conversion): Likewise.
18647         (add_builtin_candidate): Disable one ?: kludge.
18648         (convert_like): Handle RVALUE_CONVs for non-class types.
18649         (joust): Disable the other ?: kludge.
18650
18651 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18652
18653         * decl.c (init_decl_processing): Add code to build up common
18654         function types beforehand, to avoid creation then removal of
18655         things already in the hash table.
18656
18657 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
18658
18659         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
18660         the arguments.
18661
18662         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
18663         current_template_parms.
18664
18665 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
18666
18667         * search.c (lookup_field): Don't return a function, check want_type.
18668
18669 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18670
18671         * init.c (build_new): Make sure PLACEMENT has a type.
18672
18673 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
18674
18675         * init.c (build_new): Support new (nothrow).
18676
18677 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
18678
18679         * pt.c (instantiate_decl): Also do push_to_top_level before setting
18680         up DECL_INITIAL.
18681
18682         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
18683         * pt.c (tsubst): Defer instantiation of default args.
18684         * call.c (build_over_call): Until here.
18685
18686 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18687
18688         * search.c (lookup_field): Make sure we have an
18689         IDENTIFIER_CLASS_VALUE before we try to return it.
18690
18691 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18692
18693         * call.c (build_method_call): Delete unused var PARM.
18694         (build_overload_call_real): Likewise.
18695         (build_object_call): Delete unused var P.
18696         (build_new_op): Likewise.
18697         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
18698         var definitions, which are never used.
18699         (shadow_tag): Delete unused var FN.
18700         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
18701         * init.c (build_new): Delete unused var ALLOC_TEMP.
18702         * method.c (hack_identifier): Delete unused var CONTEXT.
18703         (do_build_copy_constructor): Delete unused var NAME.
18704         (synthesize_method): Delete unused var BASE.
18705         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
18706         * rtti.c (build_headof): Delete unused var VPTR.
18707         (get_typeid): Delete unused var T.
18708         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
18709         and ORIG_OP2.
18710         (build_ptrmemfunc): Delete unused vars U and NINDEX.
18711         * typeck2.c (build_functional_cast): Delete unused var BINFO.
18712
18713 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
18714
18715         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
18716         things in a type being defined.
18717         * decl.c (finish_enum): Reverse the values so that they are in
18718         the correct order.
18719
18720         * pt.c (instantiate_class_template): Don't initialize
18721         BINFO_BASETYPES until the vector is filled out.
18722         (unify): Don't abort on conflicting bindings, just fail.
18723         (instantiate_decl): Do push_tinst_level before any tsubsting.
18724
18725         * method.c (build_overload_value): Handle getting a
18726         TEMPLATE_CONST_PARM for a pointer.
18727
18728 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
18729
18730         * init.c (expand_member_init): Don't give 'not a base' error for
18731         templates.
18732
18733         * pt.c (instantiate_decl): Call import_export_decl later.
18734
18735         * pt.c (instantiate_class_template): Return a value.
18736
18737         * parse.y (extension): New rule for __extension__.
18738         (extdef, unary_expr, decl, component_decl): Use it.
18739
18740 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
18741
18742         * class.c (base_binfo): Remove unused base_has_virtual member.
18743         (finish_base_struct): Likewise.
18744         (finish_struct_1): Likewise.
18745
18746 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
18747
18748         * search.c (expand_upcast_fixups): Fix bogus code generation
18749         problem where the generated code uses the wrong index into the
18750         runtime built vtable on the stack.  Old code could clobber random
18751         stack values.
18752
18753 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
18754
18755         * init.c (perform_member_init): Make sure the partial EH cleanups
18756         live on the function_obstack.
18757
18758 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
18759
18760         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
18761         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
18762
18763 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
18764
18765         * decl.c (grokvardecl): Avoid ANSI style initialization.
18766
18767 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
18768
18769         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
18770
18771 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
18772
18773         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
18774
18775 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18776
18777         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
18778         arguments we compare against.  Start the count of I at 1, not 0,
18779         since argv[0] is still the command.
18780
18781 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
18782
18783         * lang-specs.h: Accept .cp as an C++ extension.
18784
18785 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18786
18787         * cp-tree.h (ptr_reasonably_similar): Add decl.
18788
18789 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18790
18791         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
18792         pointer.  New local SPECBITS with the parm's value.
18793         (grokdeclarator): Pass &specbits down.
18794
18795         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
18796         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
18797
18798         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
18799         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
18800
18801         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
18802         not an error_mark_node.
18803
18804 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
18805
18806         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
18807         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
18808
18809 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
18810
18811         * decl.c (grokdeclarator): When giving an anonymous struct a name,
18812         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
18813         not affected).
18814
18815         * typeck2.c (build_m_component_ref): If component is a pointer
18816         to data member, resolve the OFFSET_REF now.
18817
18818         * call.c (convert_like): Don't go into infinite recursion.
18819
18820         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
18821
18822         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
18823         * tree.c (layout_basetypes): And on the vbase ptr.
18824
18825 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
18826
18827         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
18828         CHAR_TYPE_SIZE so bool is always the same size as another type.
18829
18830         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
18831
18832 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
18833
18834         * decl2.c (grok_x_components): Remove synthesized methods from
18835         TYPE_METHODS of an anonymous union, complain about member
18836         functions.
18837         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
18838         anonymous unions.
18839         (finish_function): Just clear the DECL_RTL of our arguments.
18840
18841 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18842
18843         * decl2.c (finish_file): Emit DWARF debugging info for static data
18844         members.
18845
18846         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
18847
18848 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
18849
18850         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
18851         IDENTIFIER_NODE.
18852
18853 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
18854
18855         * Make-lang.in (g++-cross$(exeext)): Fix typo.
18856
18857 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18858
18859         Make the g++ driver now be a standalone program, rather than one
18860         that tries to run the gcc driver after munging up the options.
18861         * Make-lang.in (g++.c, g++spec.o): New rules.
18862         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
18863         added.
18864         (g++$(exeext)): New rule, based on xgcc rule.
18865         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
18866         * g++spec.c: New file.
18867         * g++.c: Removed file.
18868
18869 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
18870
18871         * cvt.c (build_up_reference): Arrange for any temporary values
18872         that have been keep in registers until now to be put into memory.
18873
18874 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18875
18876         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
18877         that make -j3 bootstrap works better.
18878
18879 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
18880
18881         * decl.c (pushtag): Do pushdecl for anon tags.
18882
18883 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
18884
18885         * typeck.c (c_expand_return): Fix logic.
18886         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
18887
18888 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
18889
18890         * g++.c (main): Make sure arglist has a final NULL entry.  Add
18891         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
18892         stdin/stdout of the invoked program are redirected to
18893         nowheresville.
18894
18895 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18896
18897         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
18898
18899 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
18900
18901         * init.c (resolve_offset_ref): Handle obj.vfn better.
18902         * typeck.c (build_component_ref): Set TREE_TYPE on result from
18903         build_vfn_ref.
18904
18905 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
18906
18907         * typeck.c (convert_for_assignment): Also handle anachronistic
18908         implicit conversions from (::*)() to cv void*.
18909         * cvt.c (cp_convert_to_pointer): Likewise.
18910
18911 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
18912
18913         * lex.c (handle_cp_pragma): Fix bogus warning.
18914
18915 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
18916
18917         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
18918         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
18919
18920 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18921
18922         * class.c (finish_struct_1): Support DWARF2_DEBUG.
18923         * search.c (dfs_debug_mark): Likewise.
18924         * decl2.c (finish_vtable_vardecl): Likewise.
18925         * decl.c (pushtag, finish_enum): Likewise.
18926         * lex.c (check_newline): Use debug_* instead of calling *out
18927         functions directly.
18928
18929 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18930
18931         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
18932         on some picky hosts.
18933
18934 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
18935
18936         * class.c (finish_struct_1): A class has a non-trivial copy
18937         constructor if it has virtual functions.
18938
18939         * cvt.c (cp_convert): Always call a constructor.
18940
18941         * call.c (reference_binding): Still tack on a REF_BIND
18942         for bad conversions.
18943         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
18944
18945         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
18946         (c_expand_return): Likewise.
18947         * typeck2.c (digest_init): Likewise for { }.
18948         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
18949         * cvt.c (cp_convert): Handle failure better.
18950
18951 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18952
18953         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
18954         of GCC be path-relative.
18955
18956 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
18957
18958         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
18959         it does need choose-temp.o and pexecute.o.
18960
18961 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18962
18963         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
18964         that we still use it.
18965         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
18966
18967 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
18968
18969         * init.c (expand_default_init): Avoid calling constructors to
18970         initialize reference temps.
18971
18972         * cvt.c (convert_to_reference): Fix.
18973
18974 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
18975
18976         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
18977         (convert_to_reference): Likewise.
18978         * typeck.c (convert_for_initialization): Likewise.
18979         * init.c (expand_default_init): Likewise.
18980         (expand_aggr_init_1): Likewise.
18981         * cp-tree.h (CONV_NONCONVERTING): Lose.
18982         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
18983         * *.c: Adjust.
18984         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
18985
18986 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
18987
18988         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
18989
18990 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18991
18992         * init.c (expand_aggr_init_1): Don't crash on non-constructor
18993         TARGET_EXPR.
18994
18995 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18996
18997         * g++.c: Include gansidecl.h.
18998         (VPROTO, PVPROTO, VA_START): Delete.
18999         (choose_temp_base_try, choose_temp_base, perror_exec,
19000         run_dos) [__MSDOS__]: Delete fns.
19001         (pfatal_with_name): Delete fn.
19002         (temp_filename): Declare like in gcc.c.
19003         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
19004         (error_count, signal_count): Define.
19005         (error): Delete both definitions.
19006         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
19007         (pfatal_pexecute): Add fn from gcc.c.
19008         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
19009         code to use the pexecute stuff also used by gcc.c.
19010         (MIN_FATAL_STATUS): Define.
19011         * Make-lang.in (g++): Add dependency on and linking with
19012         choose-temp.o and pexecute.o.
19013
19014         * cp-tree.h: Include gansidecl.h.
19015         (STDIO_PROTO): Delete #undef/#define.
19016         * cvt.c (NULL): Delete #undef/#define.
19017         * expr.c (NULL): Likewise.
19018         * init.c (NULL): Likewise.
19019         * rtti.c (NULL): Likewise.
19020         * xref.c (NULL): Likewise.
19021
19022         * cp-tree.h (build_user_type_conversion): Add prototype.
19023         * call.c (build_user_type_conversion): Delete prototype.  Correct
19024         decl of FLAGS arg to be an int.
19025         * cvt.c (build_user_type_conversion): Likewise.
19026
19027 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
19028
19029         * cp-tree.def: Add TRY_BLOCK and HANDLER.
19030         * except.c (expand_start_catch_block): Support templates.
19031         * parse.y (try_block, handler_seq): Likewise.
19032         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
19033
19034 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
19035
19036         * pt.c (current_template_args): New fn.
19037         (push_template_decl): Use it.
19038         * decl.c (grokdeclarator): Use it.
19039
19040         * decl2.c (build_expr_from_tree): Dereference ref vars.
19041
19042         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
19043         the decl-specifier-seq.
19044
19045         * decl.c (grok_op_properties): Don't force the type of a conversion
19046         op to be complete.  Don't warn about converting to the same type
19047         for template instantiations.
19048
19049         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
19050         methods.
19051
19052 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
19053
19054         * typeck.c (get_delta_difference): Remove previous bogusness.
19055         Don't give errors if force is set.
19056
19057 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
19058
19059         * decl2.c (finish_file): Don't emit debug info.
19060         * decl.c (pushdecl): Lose obsolete code.
19061         (grokdeclarator): Still do the long long thing after complaining.
19062         * search.c (note_debug_info_needed): Don't do anything if we're in a
19063         template.
19064         * method.c (synthesize_method): For non-local classes,
19065         push_to_top_level first.
19066
19067 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
19068
19069         * typeck.c (get_delta_difference): Add no_error parameter.
19070         (build_ptrmemfunc): Call get_delta_difference with no_error set;
19071         we don't want error messages when converting unrelated
19072         pointer-to-member functions.
19073
19074 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
19075
19076         * error.c (dump_expr): Improve the wording on error messages that
19077         involve pointer to member functions.
19078
19079 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
19080
19081         * cvt.c (cp_convert_to_pointer): Move code for conversions from
19082         (::*)() to void* or (*)() up a bit, so that we can convert from
19083         METHOD_TYPEs as well.
19084
19085 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
19086
19087         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
19088         There are no 'member' types.
19089         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
19090         (build_x_typeid): Handle errors.
19091
19092 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
19093
19094         * typeck.c (convert_for_assignment): Handle anachronistic implicit
19095         conversions from (::*)() to void* or (*)().
19096         * cvt.c (cp_convert_to_pointer): Likewise.
19097         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
19098         conversions from here.
19099         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
19100         * lang-options.h: Likewise.
19101         * decl2.c (warn_pmf2ptr): Define.
19102         * cp-tree.h: Declare it.
19103         * typeck2.c (digest_init): Allow pmfs down into
19104         convert_for_initialization.
19105
19106 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
19107
19108         * typeck.c (c_expand_return): Fix for returning overloaded fn.
19109
19110 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
19111
19112         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
19113         * decl.c (grok_reference_init): Pass DIRECT_BIND.
19114         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
19115         DIRECT_BIND.
19116         * call.c (convert_like): Don't pass INDIRECT_BIND.
19117         * typeck.c (convert_arguments): Likewise.
19118         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
19119
19120 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
19121
19122         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
19123         similar code in build_up_ref.
19124         * cvt.c (build_up_reference): Drastically simplify.
19125
19126 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
19127
19128         * typeck.c (signed_or_unsigned_type): If the given type already
19129         as the correct signedness, then just return it.
19130
19131         * typeck.c ({un,}signed_type): If can't do anything, call
19132         signed_or_unsigned_type.
19133
19134 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
19135
19136         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
19137         current_class_type is NULL.
19138
19139 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
19140
19141         * class.c (finish_struct_1): Avoid empty structs by adding a field
19142         so layout_type gets the mode right.
19143
19144         * typeck.c (c_expand_return): Drastically simplify.
19145
19146 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
19147
19148         * typeck.c (decay_conversion): Handle overloaded methods.
19149
19150 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
19151
19152         * call.c (build_over_call): A TARGET_EXPR has side-effects.
19153
19154 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
19155
19156         * cvt.c (convert_to_pointer_force): Add code to support pointer to
19157         member function to pointer to function conversions.
19158         * init.c (resolve_offset_ref): Add code to allow faked up objects,
19159         ignoring them if they are not used, and giving an error, if they
19160         are needed.
19161         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
19162         code, and so that we can give an error, if we needed an object,
19163         and one was not provided.
19164         (build_c_cast): Don't call default_conversion when we want to
19165         convert to pointer to function from a METHOD_TYPE.
19166
19167 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
19168
19169         * Make-lang.in (cplib2.ready): Fix logic.
19170
19171         * decl.c (shadow_tag): Only complain about non-artificial function
19172         members.
19173
19174         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
19175
19176 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
19177
19178         * expr.c (cplus_expand_expr): Pre-tweak call_target like
19179         expand_inline_function would.
19180
19181         * pt.c (mark_decl_instantiated): If extern_p, call
19182         mark_inline_for_output.
19183
19184 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
19185
19186         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
19187         pmd conversions.
19188
19189         * typeck.c (get_delta_difference): Fix wording, as we can be used
19190         for pointer to data members.
19191
19192 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
19193
19194         * pt.c (tsubst): If the function decl isn't a member of this
19195         template, return a copy of the decl (including copying the
19196         lang-specific part) so we don't hose ourselves later.
19197
19198 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
19199
19200         * class.c (finish_struct): Remove DWARF-specific tag handling.
19201         * decl.c (pushtag): Likewise.
19202         (finish_function): Always clear DECL_ARGUMENTS on function decls with
19203         no saved RTX.
19204         * decl2.c (finish_file): Emit DWARF debugging info for static data
19205         members.
19206
19207 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
19208
19209         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
19210         isn't the same as the new one before we whack it.
19211
19212 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
19213
19214         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
19215         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
19216         warn_traditional and warn_strict_prototypes; remove ancient
19217         'overload' code; remove references to flag_traditional.
19218
19219 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
19220
19221         * input.c (sub_getch): Handle 8-bit characters in string literals.
19222
19223 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
19224
19225         * tree.c (mapcar): Handle CONSTRUCTORs.
19226         (copy_to_permanent): Handle expression_obstack properly.
19227
19228         * Make-lang.in (cplib2.txt): Also depend on the headers.
19229
19230         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
19231         INT_TYPE_SIZE.
19232         (expand_class_desc): Use USItype for offset field.
19233         * tinfo.h (struct __class_type_info): Likewise.
19234
19235         * method.c (build_overload_int): TYPE_PRECISION should be applied
19236         to types.
19237
19238 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
19239
19240         * call.c (build_new_op): A COND_EXPR involving void must be a
19241         builtin.
19242
19243 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19244
19245         * typeck.c (build_x_component_ref): New fn.
19246         (build_object_ref): Use it.
19247         * parse.y (primary): Use it.
19248         * decl2.c (build_expr_from_tree): Use it.
19249         * cp-tree.h: Declare it.
19250
19251         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
19252         * error.c (dump_type_suffix): Handle variable arrays.
19253
19254 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19255
19256         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
19257
19258 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
19259
19260         * decl.c (lookup_name_real): Don't try to look up anything in a
19261         TYPENAME_TYPE.
19262
19263         * tinfo2.cc (__throw_type_match_rtti): Oops.
19264
19265 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19266
19267         * Make-lang.in (exception.o): Use -fno-PIC for now.
19268
19269 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
19270
19271         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
19272         calling them.
19273         (get_tinfo_fn_dynamic): Extracted from build_typeid.
19274         * tinfo2.cc (__dynamic_cast): Adjust.
19275
19276         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
19277         (build_x_typeid): Likewise.
19278
19279         * parse.y: Call build_x_typeid instead of build_typeid.
19280         * cp-tree.def: Add TYPEID_EXPR.
19281         * pt.c (tsubst_copy): Handle typeid.
19282         * decl2.c (build_expr_from_tree): Likewise.
19283         * rtti.c (build_x_typeid): Throw bad_typeid from here.
19284         (build_typeid): Not here.
19285         * cp-tree.h: Declare build_x_typeid.
19286
19287 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
19288
19289         * call.c (convert_like): Pull out constant values.
19290
19291         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
19292
19293 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
19294
19295         * decl.c (init_decl_processing): Create short int types before
19296         creating size_t in case a machine description needs to use
19297         unsigned short for size_t.
19298
19299 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
19300
19301         * Make-lang.in (exception.o): Turn off pic.
19302
19303         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
19304         type, multi-level ptr conversions.
19305
19306         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
19307         (throw_bad_cast): Use it.
19308         (throw_bad_typeid): New fn.
19309         (build_typeid): Throw bad_typeid as needed.
19310         Use build_call.
19311         (synthesize_tinfo_fn): Handle functions and arrays before checking
19312         for cv-quals.
19313
19314         * Remove .h from standard C++ headers, add new.h, move into inc
19315         subdirectory.
19316
19317         * exception*: Remove pointer from object, constructors.  Add
19318         default exception::what that uses type_info::name.  Add
19319         __throw_bad_typeid.
19320
19321         * init.c (build_new): Don't add a cookie to new (void *) T[2].
19322
19323 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
19324
19325         * Make-lang.in: Building C++ code depends on cc1plus.
19326
19327 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19328
19329         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
19330         a HOST_WIDE_INT, not a tree.
19331
19332 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
19333
19334         * exception.cc: Don't include <stdlib.h>.
19335
19336         * Make-lang.in (c++.clean): Remove cplib2.*.
19337
19338 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
19339
19340         * parse.y (component_decl_1, component_costructor_declarator case):
19341         Pass attributes/prefix_attributes in tree list.
19342
19343 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
19344
19345         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
19346
19347 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
19348
19349         * lex.c (do_identifier): Don't do deferred lookup in a template
19350         header.
19351
19352         * typeck2.c (store_init_value): Oops.
19353
19354         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
19355         New files for C++ lang-support library.
19356         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
19357         (CXX_LIB2FUNCS): Define.
19358         And rules for building the C++ lang-support code.
19359         * config-lang.in (headers): Define.
19360         (lib2funcs): Define.
19361
19362 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
19363
19364         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
19365         digest_init.
19366         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
19367         * typeck2.c (store_init_value): Check for initializing pmf with { }
19368         here.
19369         (process_init_constructor): Not here.
19370
19371 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
19372
19373         * pt.c (begin_template_parm_list): Increment
19374         processing_template_decl here.
19375         (end_template_parm_list): Not here.
19376         (process_template_parm): No need to add 1 to it now.
19377         * *.c: Use processing_template_decl instead of current_template_parms
19378         to check for being in a template.
19379
19380         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
19381         (tsubst_copy): Handle CONSTRUCTOR.
19382         (instantiate_decl): Set up context properly for variables.
19383         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
19384         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
19385
19386 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19387
19388         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
19389
19390 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
19391
19392         * method.c (make_thunk): Call comdat_linkage before setting the
19393         TREE_CODE.
19394
19395         * decl2.c (comdat_linkage): Use make_decl_one_only.
19396         (import_export_decl): Likewise.
19397         * decl.c (init_decl_processing): Check supports_one_only instead of
19398         SUPPORTS_WEAK.
19399
19400 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
19401
19402         * decl2.c (grokfield): Tighten checking for access decls.
19403
19404         * decl.c (make_typename_type): Resolve references to
19405         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
19406         (lookup_name_real): Types that depend on a template parameter get
19407         an implicit 'typename' unless they're in the current scope.
19408         (start_decl_1): We don't care about incomplete types that depend
19409         on a template parm.
19410         (grokdeclarator): Resolve 'typename's in the type specifier that
19411         refer to members of the current scope.
19412
19413         * call.c (build_over_call): Remove 'inline called before
19414         definition' diagnostic.
19415         (build_method_call): Likewise.
19416         * decl.c (duplicate_decls): Downgrade 'used before declared
19417         inline' to a warning, only with -Winline.
19418
19419 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
19420
19421         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
19422
19423 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
19424
19425         * call.c (build_method_call): When calling a signature
19426         default implementation, as in other cases, let instance_ptr simply
19427         be instance.
19428
19429 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
19430
19431         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
19432
19433 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
19434
19435         * except.c (expand_start_catch_block): Add a pushlevel so that -g
19436         works on hppa and SPARC.
19437
19438 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19439
19440         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
19441
19442 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
19443
19444         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
19445         before testing whether it's a signature.
19446
19447 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
19448
19449         * call.c (build_new_method_call): Don't complain about signature
19450         pointers and references not being an aggr type.
19451         (build_this): If a signature pointer or reference was passed in,
19452         just return it.
19453         (build_new_method_call): If instance is a signature pointer, set
19454         basetype to the signature type of instance.
19455         * sig.c (build_signature_method_call): Deleted basetype and
19456         instance parameters, they can be found as the DECL_CONTEXT of
19457         function and as the first argument passed in.
19458         * cp-tree.h: Changed declaration of build_signature_method_call.
19459         * call.c (build_method_call): Deleted first two arguments in call
19460         of build_signature_method_call.
19461         (build_over_call): Added call to build_signature_method_call.
19462
19463 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
19464
19465         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
19466         target_expr.
19467
19468 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19469
19470         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
19471
19472 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
19473
19474         * except.c (expand_start_try_stmts): Move to except.c in the backend.
19475         (expand_end_try_stmts): Remove.
19476
19477         * init.c (perform_member_init): Use add_partial_entry () instead
19478         of directly manipulating lists.
19479         (emit_base_init): Likewise.
19480
19481 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
19482
19483         * except.c (expand_exception_blocks): Always make sure USE and
19484         CLOBBER insns that came at the end still do, the backend relies
19485         upon this.
19486
19487 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
19488
19489         * call.c (build_over_call): We can only use a TARGET_EXPR of the
19490         right type.
19491
19492 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
19493
19494         * cvt.c (convert_to_reference): Revert last change, don't complain
19495         about temp without target decl.
19496
19497 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
19498
19499         * decl.c (grokdeclarator): Don't core dump when void() is given.
19500
19501 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
19502
19503         * decl.c (copy_args_p): Don't crash.
19504
19505 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
19506
19507         * pt.c (tsubst): And support template args inside the exception
19508         specification.
19509
19510         * pt.c (tsubst): Add support for exception specifications in
19511         template functions.
19512
19513 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
19514
19515         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
19516         fields now.
19517         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
19518         (start_function): Likewise.
19519         (start_method): Likewise.
19520         (grokfield): Likewise.
19521         (make_call_declarator): Add throw spec parameter.
19522         (set_quals_and_spec): Add routine.
19523         * lex.c (set_quals_and_spec): Likewise.
19524         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
19525         * decl.c (shadow_tag): Eliminate the throw spec parameter to
19526         grokdeclarator.
19527         (groktypename): Likewise.
19528         (start_decl): Eliminate the throw spec parameter.  Eliminate the
19529         throw spec parameter to grokdeclarator.  Eliminate the throw spec
19530         field in DECL_STMT.
19531         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
19532         (grokfndecl): Remove useless set of raises.
19533         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
19534         the throw spec parameter to start_decl.  Pull the throw spec out
19535         of the call declarator.
19536         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
19537         (start_function): Eliminate the throw spec parameter.  Eliminate
19538         the throw spec parameter to grokdeclarator.
19539         (start_method): Likewise.
19540         * decl2.c (grokfield): Likewise.
19541         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
19542         (grokoptypename): Likewise.
19543         (finish_file): Eliminate the throw spec parameter to
19544         start_function.  Add throw spec to make_call_declarator.
19545         * except.c (init_exception_processing): Add throw spec to
19546         make_call_declarator.  Eliminate the throw spec parameter to
19547         start_decl.
19548         (expand_start_catch_block): Eliminate the throw spec parameter to
19549         grokdeclarator.
19550         (expand_builtin_throw): Add throw spec to make_call_declarator.
19551         Eliminate the throw spec parameter to start_function.
19552         (start_anon_func): Likewise.
19553         * lex.c (make_call_declarator): Add throw spec parameter.
19554         (set_quals_and_spec): New routine.
19555         (cons_up_default_function): Add throw spec to make_call_declarator.
19556         Eliminate the throw spec parameter to grokfield.
19557         * method.c (synthesize_method): Eliminate the throw spec parameter
19558         to start_function.
19559         * pt.c (process_template_parm): Eliminate the throw spec parameter
19560         to grokdeclarator.
19561         (tsubst): Add throw spec to make_call_declarator.
19562         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
19563         (do_function_instantiation): Eliminate the throw spec parameter to
19564         grokdeclarator.  Eliminate the throw spec parameter to
19565         start_function.
19566         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
19567         to start_function.
19568         * parse.y (datadef): Remove non-winning optimization.
19569         (decl): Likewise.
19570         (fndef): Remove ambiguous error productions uncovered by grammar
19571         fixing.
19572         (constructor_declarator): Add exception_specification_opt here.
19573         (component_constructor_declarator): Likewise.
19574         (direct_after_type_declarator): Likewise.
19575         (complex_direct_notype_declarator): Likewise.
19576         (direct_abstract_declarator): Likewise.
19577         (fn.def1): Remove exception_specification_opt.
19578         (fn.def2): Likewise.
19579         (condition): Likewise.
19580         (initdcl0): Likewise.
19581         (initdcl): Likewise.
19582         (notype_initdcl0): Likewise.
19583         (nomods_initdcl0): Likewise.
19584         (component_decl_1): Likewise.
19585         (component_declarator): Likewise.
19586         (after_type_component_declarator0): Likewise.
19587         (after_type_component_declarator): Likewise.
19588         (notype_component_declarator): Likewise.
19589
19590 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19591
19592         * call.c (build_over_call): Also use an INIT_EXPR when
19593         initializing anything from an rvalue.
19594
19595         * call.c (build_over_call): Call stabilize_reference when building
19596         an INIT_EXPR instead of calling the copy ctor.
19597
19598         * call.c (joust): Extend the previous change to all comparisons.
19599
19600         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
19601         NO_LINKAGE_HEURISTICS.
19602
19603         * decl2.c (finish_file): Emit any statics that weren't already.
19604
19605         * typeck.c (build_static_cast): Implement.
19606         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
19607         * decl.c (grokparms): Use can_convert_arg instead of
19608         implicit_conversion directly.
19609         (copy_args_p): New fn.
19610         * cvt.c (convert_to_reference): Don't complain about temp with
19611         static_cast.
19612         (build_up_reference): Handle TARGET_EXPRs.
19613         * call.c (build_over_call): Elide unnecessary temps.
19614         (can_convert*): Use new overloading code.
19615
19616 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
19617
19618         * call.c: Move TYPE_PTR*_MACROS ...
19619         * cp-tree.h: To here.
19620         * typeck.c (build_reinterpret_cast): Implement.
19621
19622         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
19623         ptr_complete_ob.
19624         (joust): If we're comparing a function to a builtin and the worst
19625         conversion for the builtin is worse than the worst conversion for the
19626         function, take the function.
19627
19628         * typeck.c (build_const_cast): Implement.
19629         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
19630         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
19631
19632 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
19633
19634         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
19635         too early.  Make sure we explode if exprtype turns out to be a
19636         NULL_TREE when it shouldn't be.
19637
19638 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
19639
19640         * cp-tree.h: New routine make_call_declarator.
19641         * lex.c (make_call_declarator): Define it.
19642         * except.c (init_exception_processing): Use it.
19643         (expand_builtin_throw): Likewise.
19644         (start_anon_func): Likewise.
19645         * decl2.c (finish_file): Likewise.
19646         * lex.c (cons_up_default_function): Likewise.
19647         * parse.y: Likewise.
19648         * pt.c (tsubst): Likewise.
19649
19650 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
19651
19652         * decl2.c (groktypefield): Remove unused code.
19653
19654 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
19655
19656         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
19657         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
19658         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
19659         nonempty_cv_qualifiers.
19660         * hash.h: Rebuild.
19661
19662         * lex.c (make_pointer_declarator): Change type_quals into
19663         cv_qualifiers.
19664         (make_reference_declarator): Likewise.
19665
19666 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
19667
19668         * decl.c (start_function): Only check interface_* for templates
19669         with flag_alt_external_templates.
19670
19671         * call.c (build_new_op): Check for comparison of different enum types.
19672         (build_over_call): Fix arg # output.
19673
19674         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
19675
19676 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
19677
19678         * call.c (build_new_op): Check for erroneous args.
19679
19680         * call.c (build_new_method_call): Add missing args to cp_error.
19681
19682         * tree.c (error_type): Don't print reference-to-array.
19683
19684         * typeck.c (convert_for_assignment): Don't say contravariance for
19685         removing const.
19686
19687 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
19688
19689         * call.c (build_over_call): Diagnose bad convs for `this'.
19690
19691         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
19692         on _ctor_arg.
19693
19694         * call.c (convert_like): Handle bad convs.
19695         (build_over_call): Handle bad convs better.
19696
19697         * decl2.c: -fansi-overloading is now the default.
19698
19699         * call.c (build_new_method_call): Check for erroneous args.
19700
19701         * pt.c (instantiate_class_template): Propagate
19702         TYPE_USES_MULTIPLE_INHERITANCE.
19703
19704 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
19705
19706         * call.c (enforce_access): Add static to routine.
19707
19708 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
19709
19710         * call.c (build_user_type_conversion_1): Fix bad handling.
19711         (compare_ics): Likewise.
19712
19713 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
19714
19715         * call.c (standard_conversion): Oops.
19716
19717 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
19718
19719         * g++.c: Update test for win32 (&& ! cygwin32).
19720
19721 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
19722
19723         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
19724         (ptr_reasonably_similar): New fn.
19725         * call.c (BAD_RANK): New rank.
19726         (ICS_BAD_FLAG): New macro.
19727         (standard_conversion): Handle almost-right pointer conversions.
19728         (reference_binding): Handle bad rvalue bindings.
19729         (add_*_candidate): Stuff.
19730         (build_over_call): Pass bad conversions to convert_for_initialization.
19731         (compare_ics): Handle bad convs.
19732         (joust): Likewise.
19733
19734 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
19735
19736         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
19737         integer_type_node when computing pointer offsets.
19738
19739 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
19740
19741         * tree.c (lvalue_type): New fn.
19742         (error_type): New fn.
19743         * call.c (op_error): Use error_type.
19744         (add_conv_candidate): Use lvalue_type.
19745         (add_builtin_candidates): Likewise.
19746         * error.c (args_as_string): Use error_type.
19747
19748 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
19749
19750         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
19751         (tsubst): Not here.
19752
19753         * decl.c (init_decl_processing): With -ansi, __null's type is the
19754         signed integral type with the same number of bits as a pointer.
19755         Introduce a new variable null_node for it.
19756         * cp-tree.h: Adjust.
19757         * call.c (null_ptr_cst_p): Adjust.
19758
19759 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
19760
19761         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
19762         optimize.
19763
19764 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
19765
19766         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
19767         fns of classes without virtual functions.
19768
19769         * call.c (add_function_candidate): Handle `this' specially.
19770         (compare_ics): Likewise.
19771
19772 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
19773
19774         * typeck.c (build_conditional_expr): Fix handling of __null.
19775
19776         * decl2.c (comdat_linkage): New fn.
19777         (import_export_vtable): Use it.
19778         (import_export_decl): Use it.
19779         * method.c (make_thunk): Use it.
19780
19781 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
19782
19783         * pt.c (end_template_decl): If we don't actually have parms, return.
19784         * parse.y (template_header): Accept 'template <>'.
19785
19786         * errfn.c: Allow 5 args.
19787
19788 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
19789
19790         * tree.c (make_temp_vec): New fn.
19791         * pt.c (push_template_decl): Handle partial specs.
19792         (instantiate_class_template): Likewise.
19793         (more_specialized): Use get_bindings.
19794         (more_specialized_class): New fn.
19795         (get_class_bindings): New fn.
19796         (most_specialized_class): New fn.
19797         (do_function_instantiation): List candidates for ambiguous case.
19798         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
19799         (shadow_tag): Call push_template_decl for partial specializations.
19800         * parse.y: Likewise.
19801         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
19802         DECL_TEMPLATE_MEMBERS.
19803         * call.c (print_z_candidates): Reduce duplication.
19804
19805 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
19806
19807         * decl2.c (lang_decode_option): Allow -fansi-overloading.
19808
19809 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
19810
19811         * pt.c (get_bindings): New fn.
19812         (most_specialized): Likewise.
19813         (do_function_instantiation): Use them.
19814         (add_maybe_template): New fn.
19815         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
19816         * call.c (build_new_op): Handle guiding decls.
19817         (build_new_function_call): Likewise.
19818         * decl2.c (finish_file): Likewise.
19819
19820         * decl2.c (mark_used): Do synthesis here.
19821         * call.c (build_method_call): Not here.
19822         (build_over_call): Or here.
19823         * typeck.c (build_function_call_real): Or here.
19824         * tree.c (bot_manip): Call mark_used on functions used in default
19825         args.
19826
19827 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
19828
19829         * decl2.c (import_export_vtable): Delete code that disabled vtable
19830         heuristic on systems with ASM_OUTPUT_EXTERNAL.
19831
19832 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
19833
19834         * typeck.c (build_x_function_call): Handle static call context
19835         better.
19836
19837         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
19838         the function, not its outer block.
19839
19840         * call.c (build_field_call): Pass fields on to build_opfncall
19841         regardless of TYPE_OVERLOADS_CALL_EXPR.
19842         (build_method_call): Pass on to build_new_method_call sooner.
19843
19844         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
19845         gives us.
19846         * class.c (instantiate_type): Don't put a POINTER_TYPE to
19847         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
19848         modifying it.
19849
19850 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
19851
19852         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
19853         (add_builtin_candidate): Don't take enums for ++.
19854         (build_new_method_call): Handle non-aggregates and field calls.
19855         Move new overloading code from...
19856         * cvt.c: Here.
19857
19858         * decl.c (grokparms): Don't check default args in templates.
19859
19860 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
19861
19862         * cvt.c (build_new_op): Fix args to build_unary_op.
19863         (add_builtin_candidates): Don't call type_promotes_to on float.
19864
19865         * decl.c (grokparms): Check the type of the default arg.
19866
19867         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
19868         returning NULL_TREE.
19869
19870         * typeck.c (build_x_binary_op): Avoid doing extra work.
19871         (build_x_unary_op): Likewise.
19872         (build_x_conditional_expr): Likewise.
19873         * cvt.c (build_over_call): Return.
19874         (add_builtin_candidate): Fix MEMBER_REF.
19875         (build_new_op): Likewise.
19876
19877 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
19878
19879         * method.c (build_overload_name): Put bug fix into code but leave
19880         disabled for now so we can be bug compatible with older releases
19881         that do repeats incorrectly.  In the future, we can enable it.
19882
19883 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
19884
19885         * cvt.c (convert_like): Don't call build_cplus_new twice.
19886
19887         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
19888         Control new overloading code with -fansi-overloading.
19889
19890 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
19891
19892         * cvt.c (build_over_call): Call build_cplus_new.
19893         * call.c (build_method_call): Likewise.
19894         * typeck.c (build_function_call_real): Likewise.
19895         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
19896         the COND_EXPR in a TARGET_EXPR so they use the same slot.
19897
19898         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
19899         recursive calls.
19900         * typeck.c (complete_type): Propagate
19901         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
19902
19903 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
19904
19905         * cvt.c (joust): More ?: kludging.  Sigh.
19906         (build_over_call): Don't try to synthesize global fns.
19907
19908         * search.c (lookup_conversions): Use binfo marking.
19909
19910 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
19911
19912         * search.c (build_mi_matrix): Use the correct value of cid
19913         when determining the new mi_size.
19914
19915 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
19916
19917         * cvt.c (add_builtin_candidates): Do consider type conversion ops
19918         for the first parms of += et al.
19919         (strip_top_quals): New fn.
19920         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
19921         (implicit_conversion): Likewise.
19922         (add_builtin_candidates): Be careful about arrays.
19923         (build_new_method_call): Handle vtable optimization.
19924
19925 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
19926
19927         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
19928         * cvt.c (reference_binding): Use it.
19929         (implicit_conversion): Use it.
19930         (add_builtin_candidate, COND_EXPR): Use it.
19931
19932         * cvt.c (build_new_function_call): Check for error args.
19933
19934         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
19935
19936         * gxx.gperf: Add __null.
19937         * hash.h: Regenerate.
19938         * lex.h: Add RID_NULL.
19939         * lex.c (init_lex): Create null_pointer_node here, stick it in
19940         RID_NULL.
19941         * decl.c (init_decl_processing): Still set its type here.
19942         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
19943         (convert_to_pointer_force): Likewise.
19944         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
19945         if (! pedantic).
19946         * call.c (convert_harshness): Use null_ptr_cst_p.
19947         * typeck.c (convert_for_assignment): Likewise.  Don't produce
19948         null_pointer_node.
19949
19950         * error.c (args_as_string): Handle lists of actual args, too.
19951         * cvt.c (null_ptr_cst): Support (void*)0 for now.
19952         (build_user_type_conversion_1): Improve diagnostics.
19953         (build_new_function_call): Likewise.
19954         (build_object_call): Likewise.
19955         (build_new_method_call): Likewise.  Move call before def diagnostic...
19956         (build_over_call): Here.
19957
19958         * cvt.c (build_new_method_call): Don't complain about no match if
19959         LOOKUP_SPECULATIVELY.
19960         (build_over_call): Fix 'this' for virtual fn.
19961         (build_new_method_call): Add diagnostic.
19962
19963 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
19964
19965         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
19966         constructors to be passed in.
19967         (build_over_call): Likewise.
19968         (build_user_type_conversion_1): Pass them in.
19969         (convert_like): Likewise.
19970         (build_object_call): Handle overloaded conversions.
19971         (build_over_call): Pass the right args to build_vfn_ref.
19972         (standard_conversion): Fix pmf convs.
19973         (joust): Handle comparing statics and non-statics.
19974         (build_new_method_call): New fn.
19975         * call.c (build_method_call): Call it if NEW_OVER.
19976
19977 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
19978
19979         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
19980         %D instead.
19981
19982 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
19983
19984         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
19985         instead of just maybe_build_cleanup so that we deallocate the
19986         thrown object.
19987
19988 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19989
19990         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
19991         * cp-tree.h (finish_prevtable_vardecl): Add decl.
19992
19993 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
19994
19995         * pt.c (instantiate_class_template): Call complete_type.  Also, if
19996         we're at the end of the file and we just instantiated a template
19997         class with a vtable, call finish_prevtable_vardecl.
19998
19999         * error.c (dump_decl): Don't explode (or explode more gracefully
20000         as appropriate) if the object being dumped has a null type.
20001         (dump_expr): Likewise.
20002
20003         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
20004         by counting the number of nodes that we'll need before allocating
20005         the array.
20006         (lookup_fnfields): Fix comment.
20007         (breadth_first_search): Fix comment.
20008
20009 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
20010
20011         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
20012         TYPE_ALIGN.
20013         * class.c (finish_struct): Call cplus_decl_attributes here.
20014         (finish_struct_1): Not here.
20015         * cp-tree.h: Adjust.
20016
20017         * pt.c (type_unification): New parameter STRICT.
20018         (unify): If STRICT, don't allow cv addition or base deduction.
20019         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
20020
20021 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
20022
20023         * search.c (get_template_base{_recursive}): New fns.
20024         * pt.c (more_specialized): New fn.
20025         (do_function_instantiation): Use it.
20026         (unify): Handle base deduction.
20027         * cvt.c (joust): Use more_specialized.
20028         Don't arbitrarily choose between non-builtin candidates.
20029         (build_over_call): Call require_complete_type.
20030
20031         * decl.c (start_function): Statics are static even in a #pragma
20032         interface file.
20033
20034         * decl2.c (import_export_vtable): Disable vtable heuristic on
20035         systems with ASM_OUTPUT_EXTERNAL.
20036
20037         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
20038         (standard_conversion): No std conv to enum type.
20039
20040         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
20041         for ptm's.
20042
20043         * cvt.c (reference_binding): Bind directly to a base subobject of
20044         a class rvalue.
20045
20046         * cvt.c (build_new_op): Enforce access control.
20047
20048 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
20049
20050         * typeck2.c (process_init_constructor): When scanning the
20051         union for a named field, skip things that aren't FIELD_DECLs.
20052
20053         * method.c (synthesize_method): Don't scan fndecl's rtl if
20054         we're at the end of the file; just assume the function can't
20055         be inlined.
20056
20057 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20058
20059         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
20060         it failed.
20061
20062         * cvt.c (build_user_type_conversion_1): Handle overloaded
20063         conversion ops.
20064
20065         * cvt.c (add_builtin_candidates): Don't consider type conversion
20066         operators for the first parameter of operator=.
20067
20068 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
20069
20070         * typeck.c (complete_type): Only call layout_type if we're not
20071         expanding a template.
20072
20073 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
20074
20075         * cvt.c (compare_ics): Oops.
20076
20077         * cvt.c (op_error): Oops.
20078
20079         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
20080         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
20081         (build_conv): Use them.
20082         (implicit_conversion): Use them.
20083         (convert_like): Handle them.
20084         (build_new_op): Handle builtin COND_EXPR again.
20085         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
20086         in lists of types for COND_EXPR.
20087         (add_builtin_candidate): Add enum candidates for COND_EXPR.
20088
20089 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
20090
20091         * typeck.c (build_modify_expr): Always attempt to build a call to
20092         the assignment operator, even if we're using a default one.
20093         (convert_for_initialization): Call complete_type.
20094
20095 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
20096
20097         * cvt.c (reference_binding): A REF_BIND gets the reference type.
20098         (implicit_conversion): Likewise.
20099         (convert_like): Likewise.
20100         (compare_ics): Likewise.
20101         (compare_qual): Likewise.
20102         (print_z_candidates): Handle no candidates.
20103         (build_new_op): Don't handle builtin COND_EXPR for now.
20104
20105 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
20106
20107         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
20108
20109 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
20110
20111         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
20112
20113         * cvt.c (build_builtin_candidate): Oops.
20114         (build_new_op): Oops.
20115
20116         * method.c (build_opfncall): Pass COND_EXPR on.
20117         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
20118         (add_builtin_candidate{,s}): Likewise.
20119         (add_builtin_candidates): Likewise.
20120         (print_z_candidates, op_error, build_new_op): Likewise.
20121         (type_decays_to): New fn.
20122         * lex.c (init_lex): Just say ?: for COND_EXPR.
20123
20124 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20125
20126         * typeck.c (complete_type): Call layout_type rather than building
20127         a new array type.
20128
20129         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
20130         only use ptrdiff_t.
20131
20132 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
20133
20134         * cvt.c: Always compile the new overloading code (but don't use it).
20135         (implicit_conversion): Add a BASE_CONV when converting to
20136         the same class type.
20137         (convert_like): Handle BASE_CONV.
20138
20139 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20140
20141         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
20142         (add_builtin_candidate): Likewise.
20143
20144         NEW_OVER changes:
20145         * typeck.c (build_x_function_call): Try an operator function
20146         whenever we call an object of class type.
20147         * method.c (build_opfncall): Pass CALL_EXPRs through.
20148         * cvt.c (implicit_conversion): Do const-ref case first.
20149         (add_conv_candidate, build_object_call, op_error): New fns.
20150         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
20151         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
20152         builtin candidates.
20153         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
20154         Fall back on preincrement handling.  Use op_error.
20155         Handle warn_synth.
20156         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
20157         an error_mark_node.
20158         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
20159         properly.
20160
20161 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
20162
20163         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
20164
20165 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
20166
20167         * typeck.c (build_component_ref_1): Use build_component_ref
20168         instead of open coding it here.
20169
20170 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
20171
20172         * g++.c (main): Don't link with -lg++.
20173
20174         NEW_OVER changes:
20175         * cvt.c (convert_to_reference): Don't use convert_from_reference on
20176         result of build_type_conversion.
20177         (cp_convert): Only call build_method_call for ctors if
20178         build_type_conversion failed.
20179         (ptr_complete_ob): New function.
20180         (TYPE_PTR{,OB,MEM}_P): New macros.
20181         ({add,build}_builtin_candidate{,s}): New functions.
20182         (print_z_candidates): Handle builtins.
20183         (build_user_type_conversion_1): Don't use conversion fns for
20184         converting to a base type.
20185         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
20186         (build_user_type_conversion): Use convert_from_reference.
20187         (build_new_op): New function.
20188         (build_over_call): Fix handling of methods.
20189         (compare_ics): Handle AMBIG_CONV properly.
20190         * typeck2.c: Increment abort count.
20191         * method.c (build_opfncall): Forward most requests to build_new_op.
20192         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
20193
20194 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20195
20196         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
20197         invalid second argument to dump_expr_list.
20198
20199 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
20200
20201         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
20202
20203 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
20204
20205         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
20206         ASSEMBLE_EXTERNAL.
20207
20208 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
20209
20210         * typeck2.c (process_init_constructor): New pedwarn for using { }
20211         to initialize a pointer to member function.
20212         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
20213         we can avoid the new error.
20214
20215 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
20216
20217         * typeck.c (build_ptrmemfunc1): New function to hide details of
20218         pointer to member functions better.
20219
20220 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
20221
20222         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
20223         methods into the actual method, as we know the implied object is
20224         not used.
20225
20226 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20227
20228         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
20229         inside a system header.
20230
20231 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
20232
20233         * call.c (build_method_call): Call complete_type on the
20234         instance type.
20235
20236 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
20237
20238         * typeck.c (build_component_ref): Always build up an OFFSET_REF
20239         for obj_ptr->func so that we can know which object to use in a
20240         method call.
20241
20242 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
20243
20244         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
20245         around things.  Also improve maintainability.
20246
20247 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
20248
20249         * decl.c (grokdeclarator): Check for overflow when evaluating an
20250         array dimension.
20251
20252 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
20253
20254         * cvt.c (cp_convert): Don't check for ambiguity with constructor
20255         if NEW_OVER.
20256
20257         * typeck.c (build_x_function_call): Pass function overload
20258         questions to new overloading code if NEW_OVER.
20259         * init.c (expand_aggr_init_1): Only check for type conversion ops
20260         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
20261         Don't check for ambiguity with constructor if NEW_OVER.
20262         * cvt.c (convert_to_reference): Dereference the result of a type
20263         conversion operator.
20264         (build_conv): Propagate ICS_USER_FLAG.
20265         (implicit_conversion): Call instantiate_type.
20266         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
20267         (add_function_candidate): Fix cv-quals on argtype.
20268         (print_z_candidates): New function.
20269         (build_new_function_call): Call it.
20270         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
20271         consider non-converting constructors.
20272         Call print_z_candidates.
20273         Return an AMBIG_CONV for an ambiguous conversion.
20274         (build_user_type_conversion): Handle AMBIG_CONV.
20275         (convert_like): Fix test for building TARGET_EXPR.
20276         Call instantiate_type.
20277         Handle AMBIG_CONV and LVALUE_CONV.
20278         (build_over_call): Handle 0 args and ellipsis.
20279         * cp-tree.def: Add AMBIG_CONV.
20280
20281 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
20282
20283         * decl.c (lookup_name_real): If we find mem in obj when parsing
20284         `obj->mem', make sure we return the right value.
20285
20286 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
20287
20288         * search.c (get_base_distance): Call complete_type.
20289
20290 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
20291
20292         * decl.c (store_bindings): Make static.
20293
20294 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
20295
20296         * init.c (expand_aggr_init_1): Don't check type conversions if
20297         NEW_OVER.
20298
20299         * cvt.c (z_candidate): Put back template field.
20300         (add_function_candidate): Set it.
20301         (add_template_candidate): Likewise.
20302         (joust): Use it.
20303         (compare_qual): Handle references and pointers to members.
20304         (compare_ics): Handle reference bindings.
20305
20306         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
20307
20308 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
20309
20310         * call.c (compute_conversion_costs): Call complete_type.
20311
20312         * tree.c (vec_binfo_member): Use comptypes instead of comparing
20313         pointers, so we can handle template parameters.
20314
20315 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
20316
20317         * cvt.c (cp_convert_to_pointer): We have to call complete_type
20318         here; let's make it explicit instead of a side effect of an
20319         error check.
20320
20321 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
20322
20323         * cvt.c (z_candidate): Remove template field.
20324         (reference_binding): Handle binding to temporary.
20325         (implicit_conversion): Likewise.
20326         (add_function_candidate): Handle artificial constructor parms.
20327         Handle functions with too few parms.
20328         (add_template_candidate): New function.
20329         (build_user_type_conversion_1): Handle constructors.
20330         (convert_like): Likewise.
20331         (build_over_call): Likewise.
20332         (build_new_function_call): Support templates.
20333         (compare_ics): Fix reference, inheritance handling.
20334
20335 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
20336
20337         * decl.c: Add signed_size_zero_node.
20338         (init_decl_processing): Build it.
20339         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
20340         when we're trying to make a negative delta.
20341
20342 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20343
20344         Stop doing this damn index==strchr variable name confusion.
20345         * class.c (add_virtual_function): Change local var INDEX to be
20346         named IDX.
20347         (add_method): Likewise.
20348         * lex.c (print_parse_statistics): Likewise.
20349         * search.c (make_memoized_table_entry): Likewise.
20350         (lookup_fnfields_here): Likewise.
20351         (lookup_field): Likewise.
20352         (lookup_fnfields): Likewise.
20353         (get_baselinks): Likewise.
20354         * sig.c (build_signature_table_constructor): Likewise.
20355         (build_signature_method_call): Likewise.
20356         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
20357         (get_member_function_from_ptrfunc): Likewise.
20358         (build_ptrmemfunc): Change local var INDEX to be IDX.
20359         (c_expand_start_case): Likewise.
20360
20361 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
20362
20363         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
20364         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
20365         (convert_to_reference): Use build_type_conversion to convert to
20366         the reference type directly.
20367         (standard_conversion): Fix void* case, non-conversions.
20368         (reference_binding): Fix expr == 0 case, non-conversions.
20369         (convert_like): Support REF_BIND.
20370         (compare_qual): Split out from compare_ics.
20371         (compare_ics): Use it, handle icses with only a qual_conv.
20372
20373         * init.c (expand_vec_init): Don't crash if decl is NULL.
20374
20375 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
20376
20377         * mpw-config.in: New file, configury for Mac MPW.
20378         * mpw-make.sed: New file, makefile editing for MPW.
20379
20380 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20381
20382         * pt.c (instantiate_class_template): Call repo_template_used.
20383
20384         * search.c (lookup_conversions): Only lookup conversions in
20385         complete types.
20386
20387 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20388
20389         * cp-tree.def: Renamed from tree.def, to avoid confusion with
20390         gcc's tree.def.
20391         * cp-tree.h, lex.c: Include cp-tree.def.
20392         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
20393
20394 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
20395
20396         * init.c (build_vec_delete_1): Call complete_type.
20397
20398 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
20399
20400         * except.c (start_anon_func): Make sure anonymous functions are
20401         never external.
20402
20403 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
20404
20405         * decl.c (finish_function): If function_depth > 1, set nested.
20406
20407         * decl2.c (grokbitfield): Revert Bob's change.
20408         * class.c (finish_struct_1): Fix handling of named bitfield widths.
20409
20410 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
20411
20412         * pt.c (add_pending_template): Handle types.
20413         (lookup_template_class): With -fexternal-templates, just add the class
20414         to pending_templates instead of instantiating it now.
20415         * decl2.c (finish_file): Handle types in pending_templates.
20416
20417 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
20418
20419         * decl2.c (grokbitfield): Handle constant decls appropriately.
20420         Give an appropriate error message now instead of spewing core
20421         later.
20422
20423 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
20424
20425         * decl2.c: Don't turn on thunks by default for now.
20426
20427 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
20428
20429         * typeck.c (complete_type): Handle error_mark_node.
20430         (common_type, OFFSET_TYPE): Handle template_type_parms.
20431
20432 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
20433
20434         * pt.c (instantiate_decl): If at_eof, call import_export_decl
20435         regardless of DECL_INLINE.
20436
20437         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
20438
20439         * class.c (finish_struct_bits): Copy TYPE_SIZE.
20440
20441         * rtti.c (build_dynamic_cast): Support templates.
20442         * tree.def: Support DYNAMIC_CAST_EXPR.
20443         * pt.c (tsubst_copy): Likewise.
20444         * decl2.c (build_expr_from_tree): Likewise.
20445
20446 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
20447
20448         * typeck.c (build_static_cast): Support templates.
20449         (build_const_cast): Likewise.
20450         * tree.def: Support CONST/STATIC_CAST_EXPR.
20451         * pt.c (tsubst_copy): Likewise.
20452         * decl2.c (build_expr_from_tree): Likewise.
20453
20454 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
20455
20456         * decl2.c (finish_vtable_vardecl): Don't trust
20457         TREE_SYMBOL_REFERENCED for vtables of local classes.
20458
20459 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
20460
20461         * pt.c (tsubst_copy): Handle operator T.
20462
20463 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20464
20465         * init.c (build_delete): Move creation of PARMS inside test of
20466         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
20467
20468 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
20469
20470         * typeck.c (build_conditional_expr): Don't assume that
20471         the arguments to ?: are always pointers or records.
20472
20473 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
20474
20475         * decl2.c (import_export_decl): Still emit static/weak/comdat
20476         copies of inline template functions with -fno-implicit-templates.
20477
20478 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
20479
20480         * init.c (build_delete): Determine the complete basetype
20481         path to the destructor we're calling.
20482
20483 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
20484
20485         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
20486         initialize the enum, because we really and truly don't know where
20487         it came from.
20488         (start_enum): Don't copy integer_zero_node because
20489         build_enumerator will do it.
20490
20491 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20492
20493         * decl.c (finish_function): Do access control on base destructors.
20494
20495         * pt.c (tsubst, case FUNCTION_DECL): Set up
20496         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
20497         hose us.
20498
20499 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
20500
20501         * cvt.c (build_up_reference): If we have already extended the
20502         lifetime of the temporary, don't try it again.
20503         * typeck.c (c_expand_return): Don't try and convert the return
20504         value twice when we want a reference, once is enough.
20505
20506 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
20507
20508         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
20509         LOOKUP_ONLYCONVERTING at all for now.
20510
20511         * search.c (add_conversions): Put the conversion function in
20512         TREE_VALUE, the basetype in TREE_PURPOSE.
20513         * cvt.c (build_type_conversion): Adjust.
20514         * cvt.c (build_expr_type_conversion): Adjust.
20515         * call.c (user_harshness): Adjust.
20516
20517 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
20518
20519         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
20520         backend's benefit.
20521
20522 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
20523
20524         * except.c (expand_start_catch_block): Add a dummy region, if we
20525         get an error, so that we can avoid core dumping later.
20526
20527 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
20528
20529         * cp-tree.h (OFFSET_REF): Remove.
20530         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
20531         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
20532         * init.c (expand_aggr_init_1): Likewise.
20533         (build_new): Likewise.
20534         * typeck.c (expand_target_expr): Likewise.
20535
20536 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
20537
20538         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
20539         TARGET_EXPR.
20540
20541 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
20542
20543         * cvt.c (build_up_reference): Redo how and when temporaries are
20544         created.
20545         * decl.c (grok_reference_init): Don't try and be smart about
20546         running cleanups.
20547
20548 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
20549
20550         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
20551         (TARGET_EXPR...), now that it has 4 arguments.
20552         * tree.c (build_cplus_new): Likewise.
20553
20554 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20555
20556         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
20557
20558         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
20559         * decl.c (struct saved_scope): Remove named_labels,
20560         {base,member}_init_list.
20561         (maybe_push_to_top_level): Don't set them.  Call
20562         push_cp_function_context if appropriate.
20563         (pop_from_top_level): Likewise.
20564
20565         * method.c (do_build_assign_ref): Remove obsolete check of
20566         TYPE_HAS_ASSIGN_REF (basetype).
20567
20568         * decl.c (grokfndecl): Diagnose user definition of
20569         implicitly-declared methods.
20570
20571 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
20572
20573         * method.c (do_build_copy_constructor): Add code to give
20574         meaningful error messages instead of crashing.
20575         (do_build_assign_ref): Don't synthesize assignment operators for
20576         classes containing reference or const members.
20577
20578         * class.c (struct base_info): Remove cant_synth_copy_ctor
20579         and cant_synth_asn_ref.
20580         (finish_base_struct): Remove the code that tries to conditionalize
20581         synthesis of copy constructors & assignment operators based on
20582         access permissions.  Instead, let it fail when it tries to
20583         synthesize the copy constructor.  This will give meaningful error
20584         messages instead of silently generating code to perform a bitcopy.
20585
20586 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
20587
20588         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
20589         determining types for constant values.
20590
20591         * decl.c (struct named_label_list): Use instead of stuffing
20592         random items into a TREE_LIST node.
20593         (named_label_uses): Use the new struct.
20594         (poplevel): Likewise.
20595         (lookup_label): Likewise.
20596         (define_label): Add an error message to tell the user the line
20597         where the goto is located in addition to the destination of the
20598         goto.
20599         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
20600         named_label_uses.
20601         (finish_function): Likewise.
20602
20603         (start_decl): Complain about defining a static data member
20604         in a different type from which it was declared.
20605
20606 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
20607
20608         * cvt.c (build_expr_type_conversion): Adjust.
20609
20610 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
20611
20612         * call.c (build_method_call): Always convert 'this' to the
20613         appropriate type.
20614
20615         * search.c (add_conversions): Put the conversion function in
20616         TREE_VALUE, the type in TREE_PURPOSE.
20617         * cvt.c (build_type_conversion): Adjust.
20618         * call.c (user_harshness): Adjust.
20619
20620         * method.c (emit_thunk): Call temporary_allocation and
20621         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
20622
20623         * tree.c (build_cplus_array_type): Handle tweaking of
20624         TYPE_MAIN_VARIANT here.
20625         * typeck.c (common_type): Not here.
20626
20627         * typeck.c (complete_type): Only try to complete an array type if
20628         it has a domain.
20629
20630 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
20631
20632         * decl.c (grokvardecl): Call complete_type.
20633         (grokdeclarator): Call complete_type for PARM_DECLs.
20634
20635 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
20636
20637         * pt.c (instantiate_class_template): Re-set
20638         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
20639
20640 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
20641
20642         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
20643         smart enough to do it right.
20644         * tree.c (cp_expand_decl_cleanup): Likewise.
20645         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
20646         cp_expand_decl_cleanup.
20647         (store_parm_decls): Likewise.
20648         (hack_incomplete_structures): Likewise.
20649         * except.c (push_eh_cleanup): Likewise.
20650
20651 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
20652
20653         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
20654         frontend to the backend where it belongs.
20655         * tree.c (unsave_expr): Likewise.
20656         (unsave_expr_now): Likewise.
20657         * tree.def (UNSAVE_EXPR): Likewise.
20658         * cp-tree.h (unsave_expr): Likewise.
20659         (unsave_expr_now): Likewise.
20660
20661 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
20662
20663         * init.c (emit_base_init): Make sure the partial EH cleanups live
20664         on the function_obstack.
20665
20666 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
20667
20668         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
20669         when checking for pointer types.
20670
20671 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
20672
20673         * pt.c (instantiate_class_template): Remove obsolete check for
20674         access declarations.
20675
20676 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
20677
20678         * call.c (build_overload_call): Simplify calls to
20679         build_overload_call by removing last parameter.
20680         (build_method_call): Likewise.
20681         * cp-tree.h: Likewise.
20682         * method.c (build_opfncall): Likewise.
20683         * typeck.c (build_x_function_call): Likewise.
20684
20685 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
20686
20687         * call.c (default_parm_conversions): Factor out common code.
20688         (build_method_call): Use it.
20689         (build_overload_call_real): Use it.
20690
20691 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
20692
20693         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
20694         but pedwarn as the code is bogus.
20695         * typeck.c (decay_conversion): Likewise.
20696         (build_function_call_real): Use build_addr_func instead of
20697         default_conversion.  Don't allow pointer-to-method functions down
20698         here.
20699         (build_unary_op): Use real pointer-to-member functions instead of
20700         fake ones.
20701         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
20702         (convert_for_assignment): Removed some obsolete code.
20703         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
20704         build_x_function_call instead of current_class_ptr.  Only call
20705         digest_init once on an initializer, we do this just checking
20706         TREE_TYPE.
20707         (build_expr_from_tree): Pass current_class_ref to
20708         build_x_function_call instead of current_class_ptr.
20709         * init.c (build_member_call): Likewise.
20710         * pase.y: Likewise.
20711         * error.c (dump_expr): Handle OFFSET_REFs better.
20712         * pt.c (unify): Handle pointer-to-member functions better.
20713         * decl.c (finish_function): Clear out current_class_ref just like
20714         we do for current_class_ptr.
20715
20716         * typeck.c (get_delta_difference): Handle virtual bases better.
20717
20718 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
20719
20720         * sig.c (build_signature_table_constructor): Use the delta for
20721         the original basetype for this virtual function with thunks.
20722         (build_signature_method_call): We still need to adjust 'this'
20723         with thunks.
20724
20725 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
20726
20727         * call.c (build_addr_func): New routine.  Used to get the `real'
20728         address of a function or a method.  Needed to avoid getting a
20729         pointer-to-member function.
20730         (build_call): New routine to build CALL_EXPRs.
20731         (build_method_call): Use it.
20732         * cvt.c (convert_to_aggr): Likewise.
20733         * typeck.c (build_function_call_real): Likewise.
20734         * sig.c (build_signature_table_constructor): Use build_addr_func.
20735         * cp-tree.h (build_call, build_addr_func): Declare them.
20736
20737 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
20738
20739         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
20740         * parse.y: Remove uses of LOOKUP_AGGR.
20741
20742 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
20743
20744         * *.[chy]: Rename current_class_decl to current_class_ptr, and
20745         C_C_D to current_class_ref.
20746
20747 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
20748
20749         * call.c (convert_harshness): Tighten up pointer conversions.
20750
20751 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
20752
20753         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
20754         (finish_file): Likewise.
20755
20756 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
20757
20758         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
20759
20760         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
20761         code.
20762
20763 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20764
20765         * decl2.c: Turn on thunks by default where supported.
20766
20767 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
20768
20769         * cp-tree.h (build_overload_call_maybe): Removed.
20770         * call.c (build_overload_call_real): Invert meaning of last arg to
20771         be require_complete.
20772         (build_overload_call): Likewise.
20773         * typeck.c (build_x_function_call): Use build_overload_call_real
20774         instead of build_overload_call_maybe.
20775
20776 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
20777
20778         * decl2.c (finish_file): Don't try to emit functions that haven't
20779         been compiled.
20780
20781 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
20782
20783         * decl2.c (finish_vtable_vardecl): Oops.
20784
20785         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
20786         Also store the bindings from previous_class_values.
20787         (pop_from_top_level): Restore them.
20788
20789 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
20790
20791         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
20792         symbol has been referenced.
20793         (finish_file): Re-join synthesis/vtable loop with inline emission
20794         loop, disable inlining when an inline is output.
20795
20796 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
20797
20798         * except.c (init_exception_processing): Setup saved_in_catch.
20799         (push_eh_cleanup): Reset __eh_in_catch.
20800         (expand_start_catch_block): Set __eh_in_catch.
20801
20802 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
20803
20804         * except.c (push_eh_cleanup): Add tracking for whether or not we
20805         have an active exception object.
20806         (expand_builtin_throw): Use it to make sure a rethrow without an
20807         exception object is caught.
20808
20809 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
20810
20811         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
20812         cache.
20813
20814 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
20815
20816         * decl2.c (finish_file): Also use sentries for vars with
20817         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
20818         created).
20819
20820         * lex.c (handle_cp_pragma): Disable #pragma
20821         interface/implementation if SUPPORTS_ONE_ONLY > 1.
20822
20823 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
20824
20825         * method.c (emit_thunk): Wrap default case in
20826         temporary/permanent_allocation.
20827
20828         * method.c (make_thunk): Use DECL_ONE_ONLY.
20829         (emit_thunk): Call assemble_end_function.
20830
20831 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
20832
20833         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
20834         (import_export_decl): Likewise.
20835         (finish_prevtable_vardecl): Disable vtable hack if
20836         SUPPORTS_ONE_ONLY > 1.
20837
20838 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
20839
20840         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
20841         PREDECREMENT_EXPRs take two arguments, not one.
20842
20843 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
20844
20845         * class.c (build_vtable_entry): Don't build thunks for abstract
20846         virtuals.
20847
20848         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
20849         frontend.
20850
20851 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
20852
20853         * class.c (set_rtti_entry): Use size_zero_node.
20854         (build_vtable): Likewise.
20855
20856 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
20857
20858         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
20859         (prepare_fresh_vtable): Likewise.
20860
20861 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
20862
20863         * method.c (emit_thunk): Call mark_used on the target function.
20864
20865         * call.c (build_method_call): Don't warn about pending templates.
20866
20867 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
20868
20869         * decl2.c (finish_file): Fix list walking logic.
20870
20871         * typeck2.c (check_for_new_type): Only warn if -pedantic.
20872
20873 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
20874
20875         * class.c (finish_struct_1): Remove old code for
20876         dont_allow_type_definitions.
20877         * cp-tree.h: Likewise.
20878         * spew.c: Make sure cp-tree.h is included before parse.h, so the
20879         definition of flagged_type_tree is found before it is used.
20880         * lex.c: Likewise.
20881         * parse.y: Added the ftype member to the type union, and changed a
20882         number of rules to use it instead of ttype.  Added calls to
20883         check_for_new_type() as appropriate.
20884         * typeck2.c (check_for_new_type): New function for checking
20885         if a newly defined type appears in the specified tree.
20886         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
20887         for check_for_new_type().
20888
20889 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
20890
20891         * decl2.c (finish_file): Only use a sentry if the decl is public.
20892
20893         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
20894         don't pass LOOKUP_ONLYCONVERTING.
20895
20896 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
20897
20898         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
20899         properly keeps track of const and volatile type modifiers.
20900
20901 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
20902
20903         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
20904         * pt.c (comp_template_args): Use it.
20905
20906         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
20907         assemble_external for artificial function decls.
20908
20909         * decl.c (cp_finish_decl): Oops.
20910
20911 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
20912
20913         * decl2.c (import_export_decl): Put static data member templates
20914         into common storage, or make them weak, depending on whether they
20915         are dynamically or statically initialized.
20916         (get_sentry): New function.
20917         (finish_file): Do import_export_decl for static data members before
20918         building the init/fini functions.  Don't init/fini a variable that's
20919         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
20920         push/pop_temp_slots.
20921         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
20922         expand_static_init thang.
20923         * method.c (get_id_2): New function.
20924
20925 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
20926
20927         * parse.y (empty_parms): Make sure we use C++-style prototypes
20928         when we're declaring member functions.
20929
20930 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
20931
20932         * Makefile.in (CONFLICTS): 16 s/r conflicts.
20933         * parse.y (self_template_type): New nonterminal.
20934
20935 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
20936
20937         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
20938         name.
20939         * parse.y (base_class.1): Allow 'typename foo::bar'.
20940
20941         * lex.c (check_newline): Remove #pragma code that plays with the
20942         input stream, since we now deal with tokens.  Clear nextchar when
20943         we're done.
20944         (handle_cp_pragma): Use real_yylex.
20945         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
20946         in one place.
20947
20948         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
20949
20950         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
20951
20952 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20953
20954         * parse.y: New token SELFNAME for potential constructor.
20955         * spew.c (yylex): Handle it.
20956         * lex.c (identifier_type): Produce it.
20957
20958         * parse.y (complete_type_name): In :: case, don't push class binding.
20959         (complex_type_name): Likewise.
20960
20961 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
20962
20963         * typeck.c (build_reinterpret_cast): Handle pointer to member
20964         functions.
20965
20966 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20967
20968         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
20969         pragmas.
20970         (check_newline): Put the vtable/unit/implementation/interface pragma
20971         code into handle_cp_pragma, replacing it with a call.
20972         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
20973         args.  Get the next token after handling the pragma token.
20974
20975 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
20976
20977         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
20978         (convert_to_pointer_force): Likewise.
20979
20980         * init.c (build_new): Fix array new without -fcheck-new.
20981
20982 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
20983
20984         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
20985         tree.c: Lose TYPE_NESTED_NAME.
20986
20987         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
20988         as identifiers.
20989
20990         * tree.def: Add VEC_INIT_EXPR.
20991         * expr.c (cplus_expand_expr): Handle it.
20992         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
20993         the extra file-scope symbol nastiness.
20994
20995 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
20996
20997         * method.c (make_thunk): Thunks are static.
20998         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
20999
21000         * decl2.c (mark_vtable_entries): Emit thunks as needed.
21001         (finish_file): Don't emit them here.
21002
21003 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
21004
21005         * rtti.c (build_dynamic_cast): Handle null pointers.
21006         (ifnonnull): New function.
21007
21008 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
21009
21010         * call.c (build_method_call): Remember the original basetype we
21011         were called with.  Give an error message instead of trying
21012         (incorrectly) to call a non-static member function through a
21013         non-inherited class.
21014
21015         * search.c (expand_upcast_fixups): Mark the new fixup as
21016         DECL_ARTIFICIAL.
21017
21018 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
21019
21020         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
21021
21022         * class.c (set_rtti_entry): Fix for thunks.
21023
21024         * decl2.c (import_export_decl): Still emit typeinfo fns for
21025         cv-variants of builtin types.
21026
21027         * rtti.c (expand_class_desc): Set up base_info_type_node here.
21028         (init_rtti_processing): Instead of here.
21029
21030 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
21031
21032         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
21033         (build_typeid): Only complain about taking dynamic typeid without
21034         -frtti.
21035
21036         * decl2.c: flag_rtti defaults to 1.
21037
21038         * rtti.c (get_tinfo_var): The general class case is now smaller.
21039         (init_rtti_processing): Pack the latter three fields of base_info
21040         into 32 bits.
21041
21042 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
21043
21044         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
21045
21046 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
21047
21048         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
21049         (push_memoized_context): Split out code to undefer pop_type_level to
21050         (clear_memoized_cache): here.
21051         (pop_memoized_context): We can only handle one layer of deferral of
21052         pop_type_level so clear the cache, if there was a previous level.
21053
21054 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
21055
21056         * rtti.c (init_rtti_processing): Build up base_info_type_node.
21057         (expand_class_desc): Use one pointer to an array of base_info
21058         structs, passed using a CONSTRUCTOR.
21059
21060 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
21061
21062         * class.c (build_vbase_path): Remove block extern for
21063         flag_assume_nonnull_objects here.
21064         (build_vfn_ref): Split out functionality into build_vtbl_ref.
21065         (build_vtbl_ref): New routine.
21066         (build_vtable): Set up rtti info here.
21067         (add_virtual_function): Note in CLASSTYPE_RTTI the best
21068         place where we can get the rtti pointers from to avoid having to
21069         search around for a place.
21070         (finish_base_struct): Likewise.
21071         (finish_struct_1): Likewise.  Never create totally new vtables
21072         with totally new vtable pointers for rtti.  Disable code to layout
21073         vtable pointers better until we want to break binary
21074         compatibility.
21075         * rtti.c (build_headof_sub): New routine to convert down to a
21076         sub-object that has an rtti pointer in the vtable.
21077         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
21078         maintainable.
21079         (build_dynamic_cast): Make sure we have saved it, if we need to.
21080         * search.c (dfs_init_vbase_pointers): Disable code that deals with
21081         a more efficient vtable layout, enable later.
21082         * call.c (flag_assume_nonnull_objects): Moved declaration to
21083         * cp-tree.h: here.  Declare build_vtbl_ref.
21084         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
21085         function calls that want a tree.
21086
21087 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
21088
21089         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
21090         other X subobjects in the most derived type.  Ack.
21091
21092         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
21093         get_typeid will do it for us.
21094         (get_typeid_1): Break out call-building for expand_*_desc to use.
21095         (get_typeid): Call it.
21096         (expand_*_desc): Likewise.
21097         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
21098         and void *.
21099         (init_decl_processing): Lose builtin_type_tdescs lossage.
21100         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
21101
21102 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
21103
21104         * pt.c (tsubst): When calling set_nested_typename, use
21105         TYPE_NESTED_NAME (current_class_type) instead of
21106         current_class_name.
21107
21108         * decl.c (pushdecl): Likewise.
21109         (pushdecl_class_level): Likewise.
21110         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
21111         set_nested_typename.
21112
21113 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
21114
21115         * rtti.c (synthesize_tinfo_fn): Handle arrays.
21116
21117         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
21118
21119 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
21120
21121         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
21122         (init_rtti_processing): Lose bad_cast_type.
21123         (build_dynamic_cast): Use throw_bad_cast.
21124
21125         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
21126
21127         * decl2.c (finish_file): Don't synthesize artificial functions
21128         that are external and not inline.
21129
21130         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
21131
21132         * decl2.c (finish_file): Handle having new inlines added to
21133         saved_inlines by synthesis.
21134
21135         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
21136
21137 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
21138
21139         RTTI rewrite to initialize nodes as needed, not require that
21140         users #include <typeinfo>, complete functionality and reduce wasted
21141         space.
21142         * rtti.c (init_rtti_processing): New fn.
21143         (build_typeid): The vtable entry is now a function.
21144         (get_tinfo_var): New fn.
21145         (get_tinfo_fn): Likewise.
21146         (get_typeid): Use it.
21147         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
21148         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
21149         points __rtti_*.
21150         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
21151         (synthesize_tinfo_fn): New fn.
21152         * method.c (build_t_desc_overload): Lose.
21153         (build_overload_with_type): More generic.
21154         * decl.c (init_decl_processing): Call init_rtti_processing.
21155         * class.c (set_rtti_entry): Use get_tinfo_fn.
21156         * decl2.c (mark_vtable_entries): Mark the rtti function.
21157         (finish_prevtable_vardecl): Don't build_t_desc.
21158         (import_export_decl): Handle tinfo functions.
21159         (finish_file): Likewise.
21160         * typeck.c (inline_conversion): New fn.
21161         (build_function_call_real): Use it.
21162         * cp-tree.h: Add decls.
21163
21164         * method.c (hack_identifier): Also convert component_refs from
21165         references.
21166
21167         * lex.c (cons_up_default_function): Use the type, not the name, in
21168         declspecs.
21169
21170         * decl2.c (import_export_vtable): Fix weak vtables.
21171
21172 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
21173
21174         * search.c (get_base_distance_recursive): Fix access checks for
21175         protected bases.
21176
21177 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21178
21179         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
21180         cp-tree.h.
21181         (convert_harshness): Add prototypes wrapped by PROTO.
21182         * decl2.c (grok_function_init): Likewise.
21183         (do_toplevel_using_decl): Change to void return type.
21184         * class.c (build_vtable_entry): Remove decl of make_thunk.
21185         (merge_overrides): Fix order of arg definitions.
21186         (finish_vtbls): Likewise.
21187         (fixup_vtable_deltas): Likewise.
21188         (modify_all_direct_vtables): Likewise.
21189         (modify_all_indirect_vtables): Likewise.
21190         * search.c (get_base_distance_recursive): Likewise.
21191         (get_abstract_virtuals_1): Likewise.
21192         (fixup_virtual_upcast_offsets): Likewise.
21193         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
21194         * init.c (perform_member_init): Fix order of arg definitions.
21195         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
21196         * cp-tree.h (make_thunk): Add decl.
21197         (overload_template_name, push_template_decl): Add decls.
21198         (do_toplevel_using_decl): Change to void return type.
21199         (vec_binfo_member): Add decl.
21200
21201 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21202
21203         * typeck.c (mark_addressable, convert_for_assignment,
21204         convert_for_initialization, pointer_int_sum, pointer_diff,
21205         unary_complex_lvalue): Add prototypes wrapped by PROTO.
21206         (convert_sequence): #if 0 fn decl, since definition also is.
21207
21208 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
21209
21210         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
21211         cast to pointer types for type searching.
21212
21213 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21214
21215         * typeck.c (get_delta_difference): Use cp_error, not error, in the
21216         case where BINFO == 0.
21217
21218 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
21219
21220         * call.c (build_method_call): Fix wording of error messages so
21221         constructors come out right.
21222
21223 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
21224
21225         * decl.c (push_overloaded_decl): Don't warn about hidden
21226         constructors when both the type and the function are declared
21227         in a system header file.
21228
21229 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
21230
21231         * class.c (finish_struct_1): Propagate the TYPE_PACKED
21232         flag for the type to the type's fields.
21233
21234 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21235
21236         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
21237
21238 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
21239
21240         * class.c (base_info, finish_base_struct): Replace
21241         needs_virtual_dtor with base_has_virtual.
21242
21243         (finish_struct_1): Remove the old code that tried to make default
21244         destructors virtual.  Use base_has_virtual when checking if we need
21245         to add a vtable entry for the rtti code.
21246
21247 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
21248
21249         * pt.c (push_template_decl): Complain about template decl with
21250         inappropriate declaration.
21251
21252 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
21253
21254         * typeck.c (build_x_unary_op): Remove bogus check for taking
21255         the address of a member function.
21256
21257 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
21258
21259         * parse.y (constructor_declarator): Only push the class if
21260         we are not already in the class.
21261
21262 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
21263
21264         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
21265         Add additional argument to INIT_CUMULATIVE_ARGS.
21266
21267 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
21268
21269         * decl.c (shadow_tag): Fix error about anon union with methods.
21270
21271         * parse.y (self_reference): Only generate a self-reference if this
21272         is a non-template class.
21273         (opt.component_decl_list): Only use it if it was generated.
21274
21275         * parse.y (component_decl_1): Use constructor_declarator.
21276         (fn.def2): Likewise.
21277         (notype_component_declarator0): Likewise.
21278
21279 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
21280
21281         * typeck.c (build_x_unary_op): Add checks for taking the address
21282         of a TARGET_EXPR or of a member function, and give appropriate
21283         warnings.
21284
21285 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
21286
21287         * pt.c (process_template_parm): Allow template type parms to be
21288         used as types for template const parms.
21289
21290 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
21291
21292         * init.c (expand_vec_init): Ensure the eh cleanups are on the
21293         function_obstack.
21294
21295 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
21296
21297         * decl.c (lookup_name_real): Be even more picky about the
21298         ambiguous lookup warning.
21299         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
21300         * parse.y (constructor_declarator): Rather than here.
21301
21302         * parse.y (constructor_declarator): New nonterminal.
21303         (fn.def1): Use it.
21304         (explicit_instantiation): Likewise.
21305
21306 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21307
21308         Add implicit declaration of class name at class scope.
21309         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
21310         * parse.y (self_reference): New nonterminal.
21311         (opt.component_decl_list): Use it.
21312         (fn.def1): Add nested_name_specifier type_name cases.
21313         * class.c (build_self_reference): New function.
21314         (finish_struct): Handle access_default later, move self-reference
21315         decl to the end.
21316         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
21317         * cp-tree.h: Adjust.
21318
21319         * pt.c (do_function_instantiation): Separate handling of member
21320         functions and non-member functions properly.
21321
21322 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
21323
21324         * pt.c (process_template_parm): Improve error for 'volatile class K'.
21325
21326         * class.c (finish_struct_1): Check the right slot for destructors.
21327
21328         * decl.c (start_enum): Complain about enum templates.
21329
21330 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
21331
21332         * init.c (resolve_offset_ref): Offset pointers to member data by one.
21333         * typeck.c (unary_complex_lvalue): Likewise.
21334
21335 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
21336
21337         * typeck.c (c_expand_return): Check for a returned local
21338         array name, similar to the check for an ADDR_EXPR.
21339
21340 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
21341
21342         * decl.c (cp_finish_decl): Don't build cleanups for static
21343         variables here.
21344
21345 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
21346
21347         * typeck.c (build_modify_expr): Fix error messages to be more
21348         accurate.
21349         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
21350         assignment operators.
21351         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
21352         assignment operators.
21353
21354 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
21355
21356         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
21357         give an error if initialized.  pedwarn about nested type with the
21358         same name as its enclosing class.
21359
21360         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
21361
21362         * typeck.c (require_complete_type): Be sure to instantiate the
21363         MAIN_VARIANT of the type.
21364
21365         * decl2.c (finish_file): Instantiate pending templates before
21366         processing static constructors and destructors.
21367
21368         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
21369         unless at_eof.
21370
21371 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
21372
21373         * decl2.c (delete_sanity): If error_mark_node is passed
21374         in as an expression, quit while we're ahead.
21375
21376         * decl.c (grokdeclarator): Give an error message if `friend'
21377         is combined with any storage class specifiers.
21378
21379 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
21380
21381         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
21382         definition of nonexistent nested type.
21383
21384         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
21385         not to say 'typedef'.
21386
21387 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21388
21389         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
21390         * search.c (dfs_walk, dfs_init_vbase_pointers,
21391         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
21392         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
21393
21394 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
21395
21396         * except.c (build_throw): Support minimal parse.
21397         * pt.c (tsubst_copy): Support THROW_EXPR.
21398         * decl2.c (build_expr_from_tree): Likewise.
21399
21400         * pt.c (mangle_class_name_for_template): Always allocate
21401         scratch_firstobj.
21402
21403 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
21404
21405         * cvt.c (cp_convert_to_pointer): Give an appropriate error
21406         when trying to cast from an incomplete type.
21407
21408 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21409
21410         * pt.c (instantiate_class_template): Don't bother setting up
21411         CLASSTYPE_TAGS explicitly, as the nested types will add
21412         themselves.
21413
21414 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
21415
21416         * decl.c (shadow_tag): Remove old error check for usage of
21417         an enum without a previous declaration.
21418         (xref_tag): Add error message about usage of enums without a
21419         previous declaration.
21420
21421 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
21422
21423         * lex.c (do_identifier): Only do name consistency check if we're
21424         parsing.
21425
21426         * pt.c (push_template_decl): Don't crash if we get a member defn
21427         that doesn't match.
21428
21429         * decl.c (xref_tag_from_type): New function to do an xref without
21430         always having to figure out code_type_node.
21431         * cp-tree.h: Declare it.
21432         * pt.c (instantiate_class_template): Use it for friend classes.
21433         (lookup_template_class): Use it.
21434
21435         * typeck2.c (build_functional_cast): Pull out a single parm before
21436         passing it to build_c_cast.
21437
21438 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
21439
21440         * expr.c (do_case): Give an error message if a pointer is
21441         given as a case value.
21442
21443 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
21444
21445         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
21446         an overload list.
21447
21448         * lex.c (cons_up_default_function): Really, now, interface hackery
21449         does not apply to synthesized methods.
21450
21451 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
21452
21453         * call.c (build_method_call): Ctors and dtors now have special names
21454         with respect to lookups.
21455         * class.c (add_method): Likewise.
21456         (grow_method): Likewise.
21457         (finish_struct_methods): Likewise.
21458         (warn_hidden): Likewise.
21459         (finish_struct_1): Likewise.
21460         * cvt.c (convert_to_reference): Likewise.
21461         (convert_to_aggr): Likewise.
21462         (cp_convert): Likewise.
21463         * decl2.c (check_classfn): Likewise.
21464         * init.c (expand_member_init): Likewise.
21465         (expand_default_init): Likewise.
21466         (expand_aggr_init_1): Likewise.
21467         (build_offset_ref): Likewise.
21468         (build_new): Likewise.
21469         (build_delete): Likewise.
21470         * lex.c (do_inline_function_hair): Likewise.
21471         * search.c (lookup_field_1): Likewise.
21472         (lookup_fnfields_here): Likewise.
21473         (lookup_field): Likewise.
21474         (lookup_fnfields): Likewise.
21475         (get_virtual_destructor): Likewise.
21476         (dfs_debug_mark): Likewise.
21477         (dfs_pushdecls): Likewise.
21478         (dfs_compress_decls): Likewise.
21479         * tree.c (layout_basetypes): Likewise.
21480         * typeck.c (build_component_ref): Likewise.
21481         (build_x_function_call): Likewise.
21482         (build_modify_expr): Likewise.
21483         (convert_for_initialization): Likewise.
21484         (build_functional_cast): Likewise.
21485         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
21486         (CTOR_NAME): New.
21487         (DTOR_NAME): New.
21488         * decl.c (ctor_identifier): New.
21489         (dtor_identifier): New.
21490         (init_decl_processing): Set them.
21491
21492 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
21493
21494         * typeck.c (build_component_ref): Don't get confused by fields whose
21495         context has no type name, like pointer to member functions.
21496
21497 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
21498
21499         * decl.c (grokdeclarator): Handle typedef without declarator.
21500
21501         * pt.c (tsubst): Handle SCOPE_REF in declarator.
21502
21503         * parse.y (bad_parm): Catch another case of missing `typename'.
21504
21505         * lex.c (yyprint): Handle TYPE_DECLs.
21506
21507         * decl.c (start_function): Don't try to be clever.
21508
21509         * lex.c: Lose compiler_error_with_decl.
21510         * typeck2.c: Lose error_with_aggr_type.
21511         (incomplete_type_error): Use cp_* instead of old functions.
21512         (readonly_error): Likewise.
21513         * typeck.c (convert_arguments): Likewise.
21514         * search.c (lookup_nested_field): Likewise.
21515         * method.c (make_thunk): Likewise.
21516         * decl.c (grokparms): Likewise.
21517         * cp-tree.h: Update.
21518
21519         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
21520         and value.
21521
21522 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
21523
21524         * method.c (build_opfncall): When deleting a pointer to an
21525         array, build a new pointer to the tree past any ARRAY_TYPE
21526         nodes.
21527
21528 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21529
21530         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
21531
21532 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
21533
21534         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
21535         and ! DECL_INLINE.
21536
21537         * decl.c (finish_function): Don't set nested based on
21538         hack_decl_function_context.
21539         * parse.y (function_try_block): Check for nested function.
21540         (pending_inlines): Likewise.
21541
21542         * decl2.c (build_expr_from_tree): If a unary op already has a
21543         type, just return it.
21544
21545         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
21546
21547         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
21548         (finish_file): Check the return value of walk_vtables.
21549         (finish_prevtable_vardecl): Return int.
21550         (finish_vtable_vardecl): Likewise.
21551         (prune_vtable_vardecl): Likewise.
21552         * lex.c (set_vardecl_interface_info): Likewise.
21553         * cp-tree.h: Adjust return types.
21554
21555         * class.c (delete_duplicate_fields_1): Don't complain about
21556         duplicate nested types if they're the same type.
21557         (finish_struct): Remove check for duplicate.
21558         * decl2.c (grokfield): Don't check for typedef of anonymous type.
21559
21560 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
21561
21562         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
21563
21564         * decl.c (grokdeclarator): Lose special handling of class-level
21565         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
21566         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
21567
21568         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
21569
21570         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
21571
21572         * search.c (compute_access): Fix handling of anonymous union
21573         members.
21574         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
21575         from anonymous unions to their members.
21576
21577         * typeck.c (build_x_function_call): For static member functions,
21578         hand off to build_member_call.
21579
21580 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
21581
21582         * typeck.c (build_component_ref): Handle OFFSET_REFs.
21583
21584         * init.c (expand_vec_init): Fix init == 0 case.
21585
21586 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
21587
21588         * init.c (build_new): pedwarn about init and array new.
21589         (expand_vec_init): Handle lists, use convert_for_initialization.
21590
21591         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
21592         when converting to an aggregate type.
21593         * cvt.c (cp_convert): Pass it through.
21594
21595         * typeck.c (build_conditional_expr): Handle user-defined
21596         conversions to slightly different types.
21597
21598         * decl.c (grokdeclarator): Force an array type in a parm to be
21599         permanent.
21600
21601         * decl2.c (do_using_directive): Sorry.
21602         (do_namespace_alias): Likewise.
21603         * lex.c (real_yylex): Warn about using the `namespace' keyword.
21604
21605 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
21606
21607         * parse.y (datadef): Move call to note_list_got_semicolon up.
21608
21609 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
21610
21611         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
21612
21613 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
21614
21615         * decl.c (cp_finish_decl): The exception regions have to be
21616         nested, not overlapping.  We start the exception region for a
21617         decl, after it has been fully built, and all temporaries for it
21618         have been cleaned up.
21619
21620 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
21621
21622         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
21623
21624 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
21625
21626         * tree.def: Add RETURN_INIT.
21627         * pt.c (instantiate_decl): Handle RETURN_INIT.
21628         * decl.c (store_return_init): Handle minimal_parse_mode.
21629
21630         * tree.c (cp_build_type_variant): Just return an error_mark_node.
21631         * decl.c (make_typename_type): Don't try to get the file and line
21632         of an identifier.
21633         * typeck.c (comptypes): Handle TYPENAME_TYPE.
21634
21635 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
21636
21637         * decl.c (poplevel): Make sure we clear out and restore old local
21638         non-VAR_DECL values by default when they go out of scope.
21639
21640 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
21641
21642         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
21643         referring to addresses of variables and functions.
21644
21645         * error.c (dump_expr): Support SIZEOF_EXPR.
21646
21647         * init.c (do_friend): Use the return value of check_classfn.
21648
21649         * typeck.c (convert_arguments): Call complete_type.
21650
21651         * method.c (hack_identifier): After giving an error, set value to
21652         error_mark_node.
21653
21654 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
21655
21656         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
21657         lossage for local classes.
21658         * cp-tree.h: Declare it.
21659         * decl.c (lookup_name_real): Evil, painful hack for local classes.
21660         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
21661         Use hack_decl_function_context.
21662         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
21663         (start_function): Use hack_decl_function_context.
21664         (finish_function): Likewise.
21665         * method.c (synthesize_method): Likewise.
21666         * lex.c (process_next_inline): Likewise.
21667         (do_pending_inlines): Likewise.
21668         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
21669         done with it.
21670
21671 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
21672
21673         * sig.c (build_signature_pointer_or_reference_type): Align
21674         signature pointers/references on 8-byte boundaries so they can be
21675         grabbed 2 words at a time on a Sparc.
21676
21677 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
21678
21679         * method.c (hack_identifier): Requiring a static chain is now a
21680         hard error.
21681         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
21682         functions.
21683
21684 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21685
21686         * init.c (build_offset_ref): Call complete_type.
21687
21688         * decl.c (pop_from_top_level): Always pop previous_class_type.
21689
21690         * parse.y: Handle multiple decls in a for-init-statement.
21691         * pt.c (tsubst_expr): Likewise.
21692
21693         * pt.c (tsubst): Use tsubst_expr for the second operand of an
21694         ARRAY_REF.
21695
21696         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
21697         (poplevel_class): Set it here.
21698         (pop_from_top_level): Pop it here if we're returning to class scope.
21699         * class.c (pushclass): Don't set it here.
21700
21701         * decl.c (maybe_push_to_top_level): Save current_template_parms,
21702         and clear it if !pseudo.
21703         (pop_from_top_level): Restore it.
21704
21705         * decl2.c (finish_file): Push the dummy each time we walk the list
21706         of vtables.
21707
21708         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
21709         something for CAST_EXPR.
21710
21711 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
21712
21713         * cvt.c (cp_convert): Warn about implicit conversion of the
21714         address of a function to bool, as it is always true.
21715
21716 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
21717
21718         * typeck.c (c_expand_return): Fix warning for local externs returned.
21719
21720 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
21721
21722         * tree.c (mapcar): Propagate const and volatile properly.
21723
21724         * typeck.c (complete_type): Be sure to instantiate the
21725         MAIN_VARIANT of the type.
21726
21727         * method.c (synthesize_method): Class interface hackery does not
21728         apply to synthesized methods.
21729
21730 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
21731
21732         * pt.c (comp_template_args): Use comptypes rather than just
21733         checking for TEMPLATE_TYPE_PARM equivalence.
21734
21735         * typeck.c (build_x_function_call): Call complete_type before
21736         checking TYPE_OVERLOADS_CALL_EXPR.
21737
21738 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
21739
21740         * g++.c (main): Check also for new define ALT_LIBM.
21741
21742 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21743
21744         * pt.c (instantiate_class_template): If we don't have a pattern
21745         yet, that's OK.
21746         (coerce_template_parms): If we see a local class, bail.
21747
21748         * decl.c (grok_reference_init): Make sure there's a type before
21749         checking its code.
21750
21751         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
21752         (push_template_decl): Likewise.
21753
21754         * parse.y (named_class_head): Set
21755         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
21756
21757         * decl.c (xref_tag): Diagnose redeclaration of template
21758         type-parameter name.
21759
21760         * error.c (dump_type): Handle anonymous template type parms.
21761
21762         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
21763         TYPE_STUB_DECL.
21764         (coerce_template_parms): Likewise.
21765
21766 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
21767
21768         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
21769         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
21770
21771 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
21772
21773         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
21774         before trying to get its STUB_DECL.
21775         (coerce_template_parms): Likewise.
21776
21777         * parse.y (template_type_parm): If they didn't use 'class',
21778         pretend they did after giving an error.
21779
21780         * pt.c (coerce_template_parms): Diagnose use of local class.
21781
21782         * decl.c (grok_reference_init): Use instantiate_type.
21783
21784         * error.c (dump_expr): Handle TEMPLATE_DECLs.
21785
21786         * parse.y (named_class_head): Diagnose mismatching types and tags.
21787
21788         * decl.c (pushdecl): Type decls and class templates clash with
21789         artificial type decls, not hide them.
21790
21791         * decl.c (redeclaration_error_message): Diagnose redefinition of
21792         templates properly.
21793         (duplicate_decls): Diagnose disallowed overloads for template
21794         functions, too.
21795
21796         * decl.c (start_decl): Call complete_type before checking for a
21797         destructor.
21798
21799         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
21800
21801         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
21802
21803 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
21804
21805         * decl.c (grok_op_properties): Don't check for operator++(int) in
21806         a template.
21807
21808         * tree.c (perm_manip): Return a copy of variable and function
21809         decls with external linkage.
21810
21811         * tree.def: Change some of the min tree codes to type "1".
21812         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
21813         * method.c (build_overload_int): Emit something arbitrary for
21814         anything but an INTEGER_CST if we're in a template.
21815
21816         * decl.c (cp_finish_decl): Call complete_type before deciding
21817         whether or not to lay out the decl.
21818
21819         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
21820
21821 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
21822
21823         * typeck2.c (build_x_arrow): Call complete_type.
21824
21825         * pt.c (add_pending_template): Broken out.
21826         (lookup_template_class): If -fexternal-templates, call it for all
21827         the methods of implemented types.
21828         (instantiate_class_template): Instead of instantiating them here.
21829         (instantiate_decl): Handle -fexternal-templates earlier.
21830
21831 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21832
21833         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
21834         memoized lookup stuff inside GATHER_STATISTICS.
21835
21836 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
21837
21838         * decl.c (start_decl): Complain about array of incomplete type
21839         here.
21840         (grokdeclarator): Not here.
21841
21842         * parse.y (template_parm): Expand full_parm inline so we can set
21843         the rule's precedence.
21844
21845         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
21846         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
21847         * decl2.c (grokbitfield): Don't check for integer constant here.
21848         * class.c (finish_struct_1): Check here.
21849
21850         * decl.c (define_label): Make the min decl go on permanent_obstack.
21851
21852         * pt.c (unify): Don't handle CONST_DECLs.
21853         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
21854         (tsubst_copy): Likewise.
21855
21856         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
21857         CONST_DECL for a template parm.
21858
21859 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
21860
21861         * decl.c (grokdeclarator): Complain about array of incomplete type
21862         here.
21863         (start_decl_1): Not here.
21864
21865         * pt.c (tsubst): Handle pointer-to-function declarators.
21866
21867         * method.c (hack_identifier): If pedantic, diagnose local class
21868         methods that require a static chain.
21869
21870         * decl.c (grok_op_properties): No longer static.
21871         * cp-tree.h: Declare it.
21872         * pt.c (tsubst): Call it for operators.
21873         Use tsubst_copy for TREE_VECs.
21874
21875         * parse.y (template_arg): The expr has precedence like '>'.
21876
21877 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
21878
21879         * pt.c (coerce_template_parms): Don't coerce an expression using
21880         template parms.
21881         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
21882         (tsubst): Don't use build_index_2_type if the max_value uses template
21883         parms.
21884         * method.c (build_overload_int): Emit something arbitrary for an
21885         expression using template parms.
21886
21887         * parse.y (template_close_bracket): New non-terminal to catch use
21888         of '>>' instead of '> >' in template class names.
21889         (template_type): Use it.
21890         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
21891
21892         * tree.def: Add CAST_EXPR.
21893         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
21894         CONVERT_EXPR for minimal_parse_mode.
21895         * typeck.c (build_c_cast): Likewise.
21896         * pt.c (tsubst_copy): Likewise.
21897         * decl2.c (build_expr_from_tree): Likewise.
21898         * error.c (dump_expr): Likewise.
21899
21900 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21901
21902         * except.c (SetTerminate, SetUnexpected): Put back global vars.
21903         (init_exception_processing): Put back decl/init of
21904         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
21905         fns from libstdc++.
21906
21907         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
21908         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
21909         Delete unused fns.
21910         * cp-tree.h (declare_uninstantiated_type_level,
21911         uninstantiated_type_level_p): Delete prototypes.
21912
21913 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
21914
21915         * pt.c (tsubst_expr): Add default return.
21916
21917 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21918
21919         * error.c (fndecl_as_string): Delete unused arg CNAME.
21920         * sig.c (build_signature_table_constructor,
21921         build_signature_method_call): Fix calls.
21922
21923         * class.c (the_null_vtable_entry): Delete var definition.
21924         (init_class_processing): Delete tree the_null_vtable_entry init.
21925         * decl.c (no_print_{functions, builtins}): Declare as static.
21926         (__tp_desc_type_node): #if 0 var definition.
21927         (init_type_desc): #if 0 init of __tp_desc_type_node.
21928         (vb_off_identifier): Move var decl into init_decl_processing.
21929         (current_function_assigns_this): Declare as static.
21930         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
21931         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
21932         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
21933         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
21934         * init.c (BI_header_type, BI_header_size): Declare as static.
21935         * pt.c (template_classes): Delete unused var.
21936         (add_pending_template): Delete decl for non-existent fn.
21937         (lookup_template_class): Delete vars CODE and TAG_CODE.
21938         (instantiate_template): Delete unused var TARGS.
21939         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
21940         Delete decls.
21941         (__tp_desc_type_node): #if 0 var decl.
21942         (fndecl_as_string): Fix prototype.
21943
21944 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
21945
21946         * tree.def: Add GOTO_STMT.
21947         * pt.c (tsubst_expr): Support goto and labels.
21948         * decl.c (define_label): Support minimal parsing.
21949         * parse.y (simple_stmt): Likewise.
21950
21951 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21952
21953         * xref.c (GNU_xref_member): Only define/set var I if
21954         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
21955         used.
21956         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
21957         (GNU_xref_end): Fix call.
21958         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
21959         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
21960
21961         * tree.c (build_exception_variant): Delete unused vars I, A, T,
21962         T2, and CNAME.
21963         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
21964         (mapcar): Delete unused var CODE.
21965         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
21966         (break_out_cleanups): Fix call.
21967         (bot_manip): Likewise.
21968         * call.c (build_method_call): Likewise.
21969         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
21970         Likewise.
21971         * typeck.c (unary_complex_lvalue, build_modify_expr,
21972         convert_for_initialization): Likewise.
21973         * typeck2.c (build_functional_cast): Likewise.
21974         * cp-tree.h (build_cplus_new): Fix prototype.
21975
21976         * repo.c (open_repo_file): Delete unused var Q.
21977         (repo_compile_flags, repo_template_declared,
21978         repo_template_defined, repo_class_defined, repo_inline_used,
21979         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
21980         (repo_get_id, repo_vtable_used): Declare as static.
21981         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
21982         prototypes.
21983
21984 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
21985
21986         * parse.y (pending_inlines): Add function_try_block case.
21987
21988         * pt.c (unify): Fix for template const parms.
21989
21990 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21991
21992         * lex.c (extract_interface_info): Delete forward decl.
21993         (default_copy_constructor_body, default_assign_ref_body): Delete
21994         decls for non-existent functions.
21995         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
21996         (init_lex): Delete setting them.
21997         (cons_up_default_function): Delete unused vars FUNC_BUF,
21998         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
21999         #if 0'd synth code.
22000         (toplevel, expression_obstack): Delete unused extern decls.
22001         (tree_node_kind): Delete unused enum.
22002         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
22003         GATHER_STATISTICS.
22004         (tree_node_kind_names): Delete unused extern decl.
22005         (synth_obstack): Delete unused var.
22006         (init_lex): Don't set it.
22007         (init_parse): Add decl before use.
22008         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
22009         (current_unit_{name, language}): Delete unused vars.
22010         (check_newline): Don't bother setting them, just accept the #pragma.
22011         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
22012         (current_unit_{name, language}): Delete decls.
22013
22014         * search.c: Wrap all of the memoized functions, macros, and
22015         variables inside #ifdef GATHER_STATISTICS.
22016         (lookup_field, lookup_fnfields): Likewise.
22017         (init_search_processing): Likewise.
22018         (reinit_search_statistics): Wrap whole function.
22019         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
22020
22021         * decl.c (finish_function): Only call pop_memoized_context if
22022         GATHER_STATISTICS is defined.
22023         (start_function): Likewise for push_memoized_context.
22024         * class.c (pushclass, popclass): Likewise.
22025
22026         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
22027         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
22028
22029         * cvt.c (cp_convert): Delete unused local var FORM.
22030         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
22031         prototypes.
22032
22033 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
22034
22035         * pt.c (do_poplevel): Oops; really return what we get from
22036         poplevel this time.
22037
22038 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22039
22040         * cp-tree.h (is_aggr_type): Add prototype.
22041
22042         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
22043         * method.c ({push,pop}_cp_function_context): Delete decls.
22044         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
22045         (SetUnexpected, SetTerminate): Delete unused vars.
22046         (init_exception_processing): Don't set SetUnexpected or
22047         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
22048         (output_exception_table_entry): Delete unused array LABEL.
22049         (expand_internal_throw): Delete unused var PARAMS.
22050         (expand_start_catch_block): Delete unused var CLEANUP.
22051         (emit_exception_table): Delete unused var EH_NODE_DECL.
22052         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
22053         GOTO_UNWIND_AND_THROW.  Don't set them.
22054         (end_eh_unwinder): Add top decl.
22055         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
22056         (exception_section, push_rtl_perm, do_function_call,
22057         lang_interim_eh, push_eh_cleanup, eh_outer_context,
22058         expand_end_eh_spec, end_eh_unwinder): Declare as static.
22059         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
22060         throw_used): Likewise.
22061         * cp-tree.h (expand_end_eh_spec): Delete prototype.
22062
22063         * search.c (dfs_mark, dfs_mark_vtable_path,
22064         dfs_unmark_vtable_path, dfs_mark_new_vtable,
22065         dfs_unmark_new_vtable, dfs_clear_search_slot,
22066         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
22067         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
22068         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
22069         functions.
22070         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
22071         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
22072         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
22073         Only define #ifdef GATHER_STATISTICS.
22074         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
22075         is defined.
22076         (vbase_decl): Delete var definition.
22077         (init_search): Delete old decl.
22078         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
22079         never actually used.
22080         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
22081         (get_base_distance_recursive): Delete unused fourth arg
22082         BASETYPE_PATH.  Fix call .
22083         (get_base_distance): Fix call.
22084         (push_class_decls): Delete unused var ID.
22085         (make_memoized_table_entry): Declare as static.
22086         (breadth_first_search): Declare as static.
22087         (tree_has_any_destructor_p): Declare as static.
22088         (pop_class_decls): Delete unused arg pop_class_decls.
22089         * class.c (popclass): Fix call to pop_class_decls.
22090         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
22091         tree_has_any_destructor_p): Delete prototypes.
22092
22093         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
22094         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
22095         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
22096         (build_user_desc): Delete unused var T.
22097         (build_class_desc): Delete unused vars T and OFF.
22098         (build_t_desc): Delete unused var NAME_STRING.
22099         (build_headof): Make static.
22100         (get_bad_cast_node): Likewise.
22101         (get_def_to_follow): Likewise.
22102         * cp-tree.h (init_type_desc): Add prototype.
22103         (build_headof): Remove prototype.
22104
22105 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
22106
22107         * pt.c (tsubst): Only look for matching decls at file scope for
22108         non-member functions.
22109
22110         * call.c (build_scoped_method_call): Handle scoped destructor
22111         calls in templates.
22112
22113         * decl.c (*_top_level): Also save previous_class_values.
22114
22115         * pt.c (tsubst_expr): Support do {} while loops.
22116         * parse.y (simple_stmt): Likewise.
22117         * tree.def: Likewise.
22118
22119         * method.c (build_overload_identifier): For a class nested in a
22120         template class, don't mangle in the template parms from our
22121         context.
22122
22123         * lex.c, cp-tree.h: Remove support for template instantiations in
22124         the pending_inlines code.
22125         * pt.c: Remove dead functions and unused arguments.
22126         (uses_template_parms): TYPENAME_TYPEs always use template parms.
22127         * parse.y: Stop passing anything to end_template_decl.
22128         * tree.c (print_lang_statistics): Only print tinst info #ifdef
22129         GATHER_STATISTICS.
22130
22131 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22132
22133         * init.c (expand_recursive_init{,_1}): Delete decls.
22134         (sort_member_init): Delete unused var INIT.
22135         (emit_base_init): Delete unused var X.
22136         (build_offset_ref): Delete unused var CNAME.
22137         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
22138         (emit_base_init): Delete unused local var BASE.  Delete extern
22139         decl of IN_CHARGE_IDENTIFIER.
22140         (build_delete): Delete unused local var VIRTUAL_SIZE.
22141
22142         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
22143         (build_delete): Fix call.
22144         * decl2.c (delete_sanity): Likewise.
22145         * cp-tree.h (build_vec_delete): Update prototype.
22146
22147         * typeck.c (common_base_type): Delete unused var TMP.
22148         (build_binary_op): Delete local var ARGS_SAVE.
22149         (build_array_ref): Delete unused var ITYPE.
22150         (c_expand_return): Delete unused var USE_TEMP.
22151
22152         * typeck.c (compexcepttypes): Delete unused arg STRICT.
22153         (comptypes): Fix calls.
22154         * decl.c (duplicate_decls): Likewise.
22155         * cp-tree.h (compexcepttypes): Delete extra arg.
22156
22157         * decl2.c (check_classfn): Delete unused second arg CNAME.
22158         * decl.c (start_decl, grokfndecl): Fix calls.
22159         * init.c (do_friend): Likewise.
22160         * cp-tree.h (check_classfn): Update prototype.
22161
22162         * cp-tree.h (signature_error, import_export_vtable,
22163         append_signature_fields, id_in_current_class, mark_used,
22164         copy_assignment_arg_p): Add decls.
22165         * decl2.c (mark_used): Delete decl.
22166
22167         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
22168
22169         * class.c (get_vtable_entry): Disable unused function.
22170         (doing_hard_virtuals): Delete unused static global var.
22171         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
22172         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
22173         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
22174         (modify_one_vtable): Delete unused var OLD_RTTI.
22175         (finish_struct_anon): Delete unused vars OFFSET and X.
22176         (finish_struct_bits): Delete unused var METHOD_VEC.
22177         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
22178         for-scope local variable METHODS.
22179
22180         * call.c (user_harshness): Delete unused/unneeded arg PARM.
22181         (ideal_candidate): Delete unused args BASETYPE and PARMS.
22182         (build_method_call): Delete unused args passed into ideal_candidate.
22183         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
22184         * cp-tree.h (synthesize_method): Add decl.
22185
22186         * decl.c (note_level_for_for): Give void return type.
22187         (pushdecl_nonclass_level): Likewise.
22188         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
22189         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
22190         (suspend_binding_level): Delete unused var LEVEL.
22191         (duplicate_decls): Delete unused var CTYPE.
22192         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
22193         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
22194         PTR_ENDLINK.
22195         (grokdeclarator): Delete unused var C.
22196         (grokdeclarator): Delete unused var SIZE_VARIES.
22197         (grokparms): Delete unused var SAW_VOID.
22198         (start_function): Delete unused var OLDDECL.
22199         (cplus_expand_expr_stmt): Delete unused var
22200         REMOVE_IMPLICIT_IMMEDIATELY.
22201
22202         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
22203
22204         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
22205
22206 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
22207
22208         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
22209         (build_min_nt): Likewise.
22210         * pt.c (do_pushlevel): Emit line note.
22211         (do_poplevel): Return what we get from poplevel.
22212         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
22213         * parse.y: Use do_pushlevel and do_poplevel.
22214         * cp-tree.h: Declare do_poplevel.
22215
22216         * cp-tree.h: Declare at_eof.
22217         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
22218         * decl2.c (import_export_decl): Renamed from import_export_inline.
22219         (finish_file): Call it to do interface handling for statics.
22220         * pt.c (tsubst_copy): Call mark_used on variables and functions
22221         used here.
22222
22223         * decl2.c (finish_file): Don't emit statics we can't generate.
22224         * pt.c (instantiate_decl): Don't set interface on instantiations
22225         we can't generate.
22226
22227         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
22228         * tree.c (print_lang_statistics): Print max template depth.
22229         * pt.c (push_tinst_level): Dump entire instantiation context.
22230         (instantiate_class_template): Use it and pop_tinst_level.
22231         (instantiate_decl): Likewise.
22232
22233         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
22234         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
22235
22236 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
22237
22238         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
22239         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
22240         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
22241         the new template implementation.
22242
22243 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22244
22245         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
22246
22247 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
22248
22249         * decl.c (cp_finish_decl): Delay emitting the debug information for
22250         a typedef that has been installed as the canonical typedef, if the
22251         type has not yet been defined.
22252
22253 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
22254
22255         * decl2.c (grokfield): Still call pop_nested_class for access decls.
22256
22257 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22258
22259         * decl.c (lookup_label): Call label_rtx.
22260
22261         * decl.c (make_binding_level): New function.
22262         (pushlevel, pushlevel_class): Call it instead of explicit
22263         duplicate calls to xmalloc.
22264
22265         * decl.c (init_decl_processing): Delete useless build_pointer_type
22266         call.
22267
22268         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
22269         (sizet_ftype_string): Delete variable.
22270         (init_decl_processing): Add built-in functions fabsf, fabsl,
22271         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
22272         variable strlen_ftype, used for strlen.
22273
22274 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
22275
22276         * decl.c (push_to_top_level): Start from current_binding_level
22277         again for now; the stl hacks depend on g++ being broken in this
22278         way, and it'll be fixed in the template rewrite.
22279
22280         * tree.def: Add USING_DECL.
22281         * decl2.c (do_class_using_decl): Implement.
22282         (grokfield): Pass access decls off to do_class_using_decl instead of
22283         grokdeclarator.
22284         * error.c (dump_decl): Handle USING_DECLs.
22285         * decl.c (grokdeclarator): Remove code for handling access decls.
22286         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
22287         as access decls for now.
22288         (finish_struct): Don't check USING_DECLs for other uses of the name.
22289
22290         * search.c (get_matching_virtual): Use cp_error_at.
22291
22292 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22293
22294         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
22295         match c-typeck.c.
22296         (self_promoting_args_p): Move the check that TYPE is non-nil
22297         before trying to look at its main variant.
22298         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
22299
22300         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
22301         Delete macros.
22302         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
22303         (do_friend): Delete call to xref_friend.
22304         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
22305
22306         * typeck.c (convert_sequence): #if 0 unused function.
22307
22308         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
22309         be in decl_in_memory_p.
22310         (decl_in_memory_p): Delete decl.
22311         * expr.c (decl_in_memory_p): Delete fn.
22312         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
22313
22314         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
22315
22316 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
22317
22318         * class.c (finish_struct_1): Check for a pure-specifier on a
22319         non-virtual function here.
22320
22321         * decl2.c (grok_function_init): Don't check whether the function
22322         is virtual here.
22323         (grokfield): Don't call check_for_override here.
22324
22325         * decl.c (push_to_top_level): Start from inner_binding_level,
22326         check class_shadowed in class levels.
22327
22328 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
22329
22330         * decl.c (resume_level): Ignore things that don't have names, instead
22331         of core dumping.
22332
22333 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22334
22335         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
22336
22337 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
22338
22339         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
22340         synthesized dtor.
22341
22342         * parse.y (complete_type_name): Bind global_scope earlier.
22343         (complex_type_name): Likewise.
22344         (qualified_type_name): Remove.
22345
22346 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
22347
22348         * decl.c (grokfndecl): Move code that looks for virtuals in base
22349         classes...
22350         * class.c (check_for_override): ... to a new function.
22351         (finish_struct_1): Call it.
22352
22353         * cp-tree.h: Declare warn_sign_compare.
22354
22355         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
22356         rather than extra_warnings to decide whether to warn about
22357         comparison of signed and unsigned.
22358
22359         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
22360         implies -Wsign-compare.  -Wall doesn't imply -W.
22361
22362 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
22363
22364         * typeck.c (build_component_ref): Fix to handle anon unions in base
22365         classes as well.
22366
22367 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22368
22369         * class.c (resolves_to_fixed_type_p): Delete code dealing with
22370         a WITH_CLEANUP_EXPR, since we don't generate them any more.
22371         * cvt.c (build_up_reference): Likewise.
22372         * decl.c (grok_reference_init): Likewise.
22373         (cp_finish_decl): Likewise.
22374         * error.c (dump_expr): Likewise.
22375         * tree.c (real_lvalue_p): Likewise.
22376         (lvalue_p): Likewise.
22377         (build_cplus_new): Likewise.
22378         (unsave_expr_now): Likewise.
22379         * typeck.c (unary_complex_lvalue, build_modify_expr,
22380         c_expand_return): Likewise.
22381
22382 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22383
22384         Make the C++ front-end pay attention to attributes for structures.
22385         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
22386         finish_struct_1.
22387         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
22388         Take out old round_up_size use and setting the DECL_ALIGN possibly
22389         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
22390         can override what the attribute set.
22391         * cp-tree.h (finish_struct): Update prototype.
22392         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
22393         attributes to finish_struct.
22394         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
22395         value down into finish_struct.
22396         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
22397
22398 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
22399
22400         * decl.c (poplevel):  Re-word dead for local handling.
22401         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
22402         (cp_finish_decl):  If is_for_scope, check for duplicates so
22403         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
22404
22405         * lex.c (do_identifier):  Use global binding in preference of
22406         dead for local variable.
22407
22408 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
22409
22410         * init.c (initializing_context): Handle anon union changes, the
22411         context where fields of anon unions can be initialized now has to be
22412         found by walking up the TYPE_CONTEXT chain.
22413
22414 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
22415
22416         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
22417         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
22418         (obscure_complex_init): If bss is supported, always set
22419         DECL_INITIAL to error_mark_node.
22420
22421 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22422
22423         * init.c (is_friend): Make sure there's a context before we see if
22424         it's an aggr type.
22425
22426 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
22427
22428         * init.c (is_friend): Classes are not friendly with nested classes.
22429
22430 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
22431
22432         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
22433         and record its result.
22434
22435 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
22436
22437         * class.c (finish_struct_anon): Switch around code to not move anon
22438         union elements around, nor mess up their contexts, nor offsets,
22439         instead we now build up the right number of COMPONENT_REFs for all
22440         the anon unions that may be present at build_component_ref time.
22441         * typeck.c (lookup_anon_field): New routine to handle field lookup
22442         on fields without names.  We find them, based upon their unique type
22443         instead.
22444         * typeck.c (build_component_ref): Allow FIELD_DECL components.
22445         Handle finding components in anonymous unions, and ensure that a
22446         COMPONENT_REF is built for each level as necessary.
22447
22448 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
22449
22450         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
22451         code that ensures that copy ctors are used if appropriate.
22452
22453 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22454
22455         * init.c (build_vec_delete): Only give an error if base isn't an
22456         error_mark_node.
22457
22458 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
22459
22460         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
22461         (yylex): If we see `new', keep slurping.
22462
22463 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
22464
22465         * class.c (finish_struct_1): Move code for handling anon unions...
22466         (finish_struct_anon): to here.  Fixup so that we do the offset
22467         calculations right, and so that the fields are physically moved to
22468         the containers's chain.
22469
22470 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22471
22472         * decl.c (grokdeclarator): Avoid trying to get an operand off an
22473         identifier node.
22474
22475 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
22476
22477         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
22478         POINTER_SIZE to agree with expr.c.
22479
22480 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
22481
22482         * search.c (lookup_field): Don't report ambiguities if protect is 0,
22483         instead return NULL_TREE.
22484
22485 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
22486
22487         * class.c (finish_struct_1): Call warn_hidden if we want warnings
22488         about overloaded virtual functions.
22489         (warn_hidden): New routine to warn of virtual functions that are
22490         hidden by other virtual functions, that are not overridden.
22491         (get_basefndecls): New routine, used by warn_hidden.
22492         (mark_overriders): New routine, used by warn_hidden.
22493         * search.c (get_matching_virtual): Remove old warning that just
22494         isn't very useful.
22495
22496 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22497
22498         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
22499
22500         * typeck.c (null_ptr_cst_p): Delete unused fn.
22501         (build_function_call_maybe): Delete unused fn.
22502
22503         * expr.c (extract_init): #if 0 the code after unconditional return 0
22504         for now.
22505
22506         Delete old cadillac code.
22507         * edsel.c: Remove file.
22508         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
22509         * Makefile.in (CXX_OBJS): Delete edsel.o.
22510         (edsel.o): Delete rule.
22511         * cp-tree.h (flag_cadillac): Delete var decl.
22512         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
22513         * decl2.c (flag_cadillac): Delete var definition.
22514         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
22515         (grokfield): Delete code depending on flag_cadillac.
22516         (finish_anon_union): Likewise.
22517         * class.c (finish_struct_1): Likewise.
22518         (pushclass): Likewise.
22519         (popclass): Likewise.
22520         (push_lang_context): Likewise.
22521         (pop_lang_context): Likewise.
22522         * decl.c (init_decl_processing): Likewise.
22523         (start_decl): Likewise.
22524         (cp_finish_decl): Likewise.
22525         (xref_tag): Likewise.
22526         (finish_enum): Likewise.
22527         (start_function): Likewise.
22528         (finish_function): Likewise.
22529         (finish_stmt): Likewise.
22530         * lex.c (lang_init): Likewise.
22531         (check_newline): Likewise.
22532
22533         * lex.c (do_pending_inlines): Delete synthesized method kludge.
22534
22535         Delete defunct, ancient garbage collection implementation.
22536         * rtti.c: New file with the RTTI stuff from gc.c.
22537         * gc.c: Removed file (moved the remaining stuff into rtti.c).
22538         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
22539         (rtti.o): New rule, replacing gc.o.
22540         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
22541         * cp-tree.h: Delete gc-related fn decls.
22542         (DECL_GC_OFFSET): Delete macro.
22543         (flag_gc): Delete extern decl.
22544         * decl.c (current_function_obstack_index): Delete var decl.
22545         (current_function_obstack_usage): Delete var decl.
22546         (start_function): Delete clearing of current_function_obstack_index
22547         and current_function_obstack_usage.
22548         (init_decl_processing): Delete code relying on -fgc.
22549         Delete call to init_gc_processing.
22550         (cp_finish_decl): Delete calls to build_static_gc_entry and
22551         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
22552         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
22553         and to expand_expr of a __gc_main call.
22554         (maybe_gc_cleanup): Delete var decl.
22555         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
22556         * decl2.c (flag_gc): Delete var decl.
22557         (lang_f_options): Delete offering of -fgc.
22558         (lang_decode_option): Delete -fgc and -fno-gc handling.
22559         (get_temp_regvar): Delete gc code.
22560         * init.c (build_new): Delete gc code.
22561         * lex.c (init_lex): Delete checking of flag_gc.
22562
22563         * typeck.c (convert_arguments): Delete gc code.
22564         (build_component_addr): Delete -fgc warning.
22565         (build_modify_expr): Delete gc code.
22566
22567         * decl2.c (build_push_scope): Delete fn.
22568         * cp-tree.h (build_push_scope): Delete decl.
22569
22570         * search.c (clear_search_slots): Delete fn.
22571         * cp-tree.h (clear_search_slots): Delete decl.
22572
22573         * search.c (tree_needs_constructor_p): Delete fn.
22574         * cp-tree.h (tree_needs_constructor_p): Delete decl.
22575
22576         * tree.c (id_cmp): Delete fn.
22577
22578         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
22579         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
22580
22581         * tree.c (decl_value_member): Delete fn.
22582         * cp-tree.h (decl_value_member): Delete decl.
22583
22584         * tree.c (list_hash_lookup_or_cons): Delete fn.
22585         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
22586
22587         * method.c (cplus_exception_name): Delete fn.
22588         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
22589
22590         * spew.c (shift_tokens): Delete fn.
22591
22592 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
22593
22594         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
22595         to cp_finish_decl.
22596         * parse.y: Likewise.
22597
22598 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22599
22600         * tree.c (build_cplus_staticfn_type): Delete function definition;
22601         never used.
22602         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
22603
22604         * tree.c (virtual_member): Delete function definition; never used.
22605         * cp-tree.h (virtual_member): Delete decl.
22606
22607 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
22608
22609         * typeck.c (build_component_ref): Handle getting vbase pointers
22610         out of complex multiple inheritance better.
22611
22612 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
22613
22614         * typeck.c (build_object_ref): Make sure we use the real type, not
22615         any reference type.
22616
22617 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
22618
22619         * tree.c (build_exception_variant): Don't create new types if we
22620         don't have to, also build new types on the right obstack.
22621
22622 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
22623
22624         * decl.c (store_bindings): Split out from push_to_top_level.
22625         (push_to_top_level): Call it for b->type_shadowed on class binding
22626         levels.
22627
22628 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
22629
22630         * search.c (expand_upcast_fixups): Fix so that offsets stored in
22631         vbase_offsets are always right.  Fixes a problem where virtual base
22632         upcasting and downcasting could be wrong during conversions on this
22633         during virtual function dispatch at ctor/dtor time when dynamic
22634         vtable fixups for deltas are needed.  This only sounds easier than
22635         it is.  :-)
22636         (fixup_virtual_upcast_offsets): Change to reflect new calling
22637         convention for expand_upcast_fixups.
22638
22639 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22640
22641         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
22642         check that it's usable as the bitfield width.
22643
22644 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22645
22646         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
22647         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
22648         only ever used for functions in it.
22649
22650 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
22651
22652         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
22653         (nested_type): Likewise.
22654         (nested_name_specifier): Use lastiddecl.
22655
22656         * decl.c (grokdeclarator): Adjust accordingly.
22657         * init.c (expand_member_init): Likewise.
22658         * parse.y (base_class): Likewise.
22659         * typeck2.c (build_functional_cast): Likewise.
22660
22661         * typeck2.c (build_functional_cast): Fill in name after we've
22662         checked for non-aggr type.
22663
22664 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
22665
22666         * decl2.c (warn_pointer_arith): Default to on.
22667
22668 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
22669
22670         * lex.c (is_rid): New function.
22671         * decl.c (grokdeclarator): Diagnose reserved words used as
22672         declarator-ids.
22673
22674 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
22675
22676         * tree.c (get_decl_list): Don't lose cv-quals.
22677
22678         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
22679         typespecs used as declarator-ids.
22680
22681 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
22682
22683         * decl.c (poplevel): When poping a level, don't give a warning for
22684         any subblocks that already exist.
22685
22686 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
22687
22688         * typeck.c (build_object_ref): Finish what I started.
22689
22690         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
22691
22692         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
22693
22694         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
22695         scope.
22696
22697 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
22698
22699         * decl.c (xref_tag): Handle passing a type in directly.
22700
22701         * parse.y (qualified_type_name): Pull out the type.
22702         (nested_type): Likewise.
22703         Take types directly instead of as identifiers.
22704         * call.c (build_scoped_method_call): Take types directly instead of
22705         as identifiers.
22706         * decl.c (xref_basetypes): Likewise.
22707         * init.c (expand_member_init): Likewise.
22708         (build_member_call): Likewise.
22709         (build_offset_ref): Likewise.
22710         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
22711         * method.c (do_build_assign_ref): Likewise.
22712         * decl.c (grokdeclarator): Handle a type appearing as the
22713         declarator-id for constructors.
22714         * method.c (do_build_copy_constructor): current_base_init_list now
22715         uses the types directly, not their names.
22716         * init.c (sort_base_init): Likewise.
22717         (expand_member_init): Likewise.
22718         * init.c (is_aggr_type): New function, like is_aggr_typedef.
22719
22720 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
22721
22722         * tree.c (layout_basetypes): Call build_lang_field_decl instead
22723         of build_lang_decl if first arg is a FIELD_DECL.
22724
22725 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22726
22727         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
22728         non-empty.
22729         * except.c (expand_start_catch_block): Set TREE_USED to avoid
22730         warnings about the catch handler.
22731
22732 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
22733
22734         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
22735         expand_target_expr.
22736
22737 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22738
22739         Fix access control to use trees rather than integers.
22740         * class.c (access_{default, public, protected, private,
22741         default_virtual, public_virtual, private_virtual}_node): Add
22742         definitions.
22743         (init_class_processing): Do creation of those nodes.
22744         * cp-tree.h (access_type): Delete enum decl.
22745         (access_{default, public, protected, private, default_virtual,
22746         public_virtual, private_virtual}_node): Add decls.
22747         (compute_access): Change return type.
22748         * search.c (compute_access): Have tree return type, instead of enum.
22749         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
22750         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
22751         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
22752         * parse.y (VISSPEC): Make ttype rather than itype.
22753         (base_class_access_list): Likewise.
22754         * *.[cy]: Change all refs of `access_public' to `access_public_node',
22755         etc.
22756         * call.c (build_method_call): Make ACCESS be a tree.
22757         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
22758         * cvt.c (convert_to_aggr): Likewise.
22759         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
22760         Likewise.
22761         * method.c (hack_identifier): Likewise.
22762         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
22763
22764 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
22765
22766         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
22767         frontend, and make it more consistent with respect to
22768         warn_pointer_arith.
22769
22770 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
22771
22772         * decl.c (pushdecl): Check for duplicate parameter names.
22773
22774 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
22775
22776         * decl.c (expand_static_init): Call assemble_external for atexit.
22777
22778 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
22779
22780         * except.c (do_unwind): Remove some generated dead code.
22781         (eh_outer_context): New routine, factor out some common code from
22782         expand_builtin_throw and end_eh_unwinder.  Add code to do return
22783         address masking for the PA.
22784         (expand_builtin_throw): Use eh_outer_context instead of open coding
22785         it here.
22786         (end_eh_unwinder): Likewise.
22787
22788 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
22789
22790         * except.c (expand_throw): Call assemble_external for __empty, if we
22791         use it.
22792
22793 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
22794
22795         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
22796         NORMAL_RETURN_ADDR_OFFSET.
22797         (end_eh_unwinder): Likewise.
22798
22799 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
22800
22801         * gc.c (build_dynamic_cast): Make sure we don't cast away const
22802         when dealing with references, and make sure we handle dynamic
22803         casting to a cv qualified reference.
22804
22805 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
22806
22807         * except.c (struct eh_context): New structure top hold eh context
22808         information.
22809         (push_eh_context): New routine.
22810         (pop_eh_context): Likewise.
22811         * decl.c (push_cp_function_context): Use them.
22812         (pop_cp_function_context): Likewise.
22813
22814 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
22815
22816         * decl2.c (finish_file): Also prune uninteresting functions in the
22817         inline emission loop.
22818
22819 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
22820
22821         * sig.c (build_signature_table_constructor): Mark functions
22822         in the signature as referenced.
22823
22824 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
22825
22826         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
22827         the inline emission stuff.
22828
22829 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
22830
22831         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
22832         weak symbols.
22833         * lang-options.h: Add -f{no-,}weak.
22834         * decl.c (init_decl_processing): If the target does not support weak
22835         symbols, don't use them.
22836         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
22837
22838 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
22839
22840         * init.c (expand_member_init): warning for base init after members.
22841
22842 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
22843
22844         * cvt.c (build_expr_type_conversion): Don't convert to a reference
22845         type.
22846
22847 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
22848
22849         * method.c (report_type_mismatch): Improve wording for volatile
22850         mismatches.
22851
22852 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
22853
22854         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
22855         expand_assignment, as the later doesn't handle things that have
22856         copy constructors well.  The compiler would do bitwise copying,
22857         instead of ctor calling in some cases.
22858
22859 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
22860
22861         * g++.c (my_strerror): Return "cannot access" if errno is 0.
22862         (pfatal_with_name, perror_exec): Don't assume that
22863         the returned value from my_strerror contains no '%'s.
22864         (concat): Remove.
22865         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
22866
22867 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
22868
22869         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
22870         TYPE_METHODS/TREE_CHAIN mean what they used to.
22871         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
22872         instead of TYPE_METHODS.
22873         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
22874         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
22875         * cp-tree.h (CLASSTYPE_METHODS): Lose.
22876         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
22877         TYPE_METHODS.
22878         (struct lang_decl): Lose next_method field.
22879         (DECL_NEXT_METHOD): Lose.
22880         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
22881         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
22882         anymore.
22883         (finish_struct_methods): Don't mess with the TREE_CHAINs in
22884         fn_fields.
22885
22886         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
22887         vector.
22888
22889         * call.c (build_method_call): Synthesize here even when not inlining.
22890         * typeck.c (build_function_call_real): Likewise.
22891
22892 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
22893
22894         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
22895         == DBX_DEBUG, call dbxout_start_new_source_file and
22896         dbxout_resume_previous_source_file when appropriate.
22897
22898 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
22899
22900         * except.c (start_anon_func): Push to the top level.
22901         (end_anon_func): Pop from the top level.
22902
22903 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
22904
22905         * cp-tree.h (build_cleanup): New routine to build cleanups.
22906         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
22907         call at ctor time and use atexit to run it later.
22908         * decl2.c (build_cleanup): New routine, taken from finish_file.
22909         (finish_file): Use build_cleanup instead, and don't put function
22910         local statics in global dtor list.
22911
22912 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
22913
22914         * except.c (expand_throw): Ensure that we have cleanups, if we try
22915         and expand cleanups.
22916
22917 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
22918
22919         * except.c (expand_throw): Add logic to manage dynamic cleanups for
22920         the EH object.
22921         (expand_end_catch_block): Use the magic of expand_goto, instead of
22922         emit_jump so that we get the cleanup for any catch clause parameter
22923         and the cleanup for the exception object.  Update to reflect label
22924         changes.
22925         (push_eh_cleanup): New routine to register a cleanup for an
22926         exception object.
22927         (empty_fndecl): Used to default cleanup actions to
22928         nothing.
22929         (init_exception_processing): Setup empty_fndecl.  Setup
22930         saved_cleanup.
22931         (expand_start_catch_block): Update to reflect label changes.  Call
22932         push_eh_object to register the cleanup for the EH object.
22933         (start_anon_func): New routine to start building lambda expressions
22934         from trees.
22935         (end_anon_func): New routine to end them.
22936         (struct labelNode): Change so that we can use tree labels, or rtx
22937         labels.
22938         (saved_cleanup): Object to check for dynamic cleanups for the
22939         exception handling object.
22940         (push_label_entry): Change so that we can use tree labels, or rtx
22941         labels.
22942         (pop_label_entry): Likewise.
22943         (top_label_entry): Likewise.
22944         (expand_start_all_catch): Use tree label instead of rtx label, so
22945         that we can get the magic of expand_goto.
22946         (expand_end_all_catch): Update to reflect label changes.
22947
22948         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
22949         use UNSAVE_EXPRs.
22950         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
22951         building_cleanup logic, as we now use UNSAVE_EXPRs.
22952         * cp-tree.h (unsave_expr): Declare it.
22953         * decl.c (building_cleanup): Remove.
22954         (maybe_build_cleanup): Remove building_cleanup logic, and use
22955         UNSAVE_EXPR instead.
22956
22957 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
22958
22959         * gc.c (build_t_desc): Update error message to say <typeinfo>.
22960
22961 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22962
22963         * decl.c (pushdecl): Only warn about shadowing a local variable if
22964         warn_shadow is true.
22965
22966 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
22967
22968         * typeck.c (build_binary_op_nodefault): Added warning about
22969         comparisons between different enum types with -Wall, unless
22970         -fenum-int-equiv set.
22971
22972 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
22973
22974         * class.c (finish_struct_1): Skip down to the inner type in
22975         multidimensional arrays.  Ensures ctors will be made for types that
22976         need constructing.
22977
22978 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
22979
22980         * decl.c (last_dtor_insn): New to track the last compiler generated
22981         insn in a dtor.
22982         (store_parm_decls): Set it.
22983         (finish_function): Use it to see if the dtor is empty.  Avoid doing
22984         vtable setup all the time, if we can.
22985         (struct cp_function): Add last_dtor_insn.
22986         (push_cp_function_context): Save it.
22987         (pop_cp_function_context): Restore it.
22988
22989 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
22990
22991         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
22992         warnings.
22993
22994 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
22995
22996         * typeck.c (expand_target_expr): Make sure targets get put into the
22997         current temp_slot_level, so that the free_temp_slots call will reuse
22998         them.
22999
23000 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
23001
23002         * class.c (finish_struct_1): Delay delta fixups for virtual bases
23003         until after we have done the hard virtuals, to avoid a bogus `every
23004         virtual function must have a unique final overrider' for virtual
23005         functions that are only overridden by hard virtuals.
23006
23007 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
23008
23009         * pt.c (do_function_instantiation): Don't try to find a file-scope
23010         template for a member function.
23011
23012 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
23013
23014         * g++.c (main): Add handling of -nodefaultlibs.
23015
23016 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
23017
23018         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
23019         distinguish between direct bindings of reference variables, and
23020         indirect bindings of reference variables.
23021         * cvt.c (build_up_reference): Use it.
23022         * typeck.c (convert_arguments): Use it to indicate this is an
23023         indirect binding.
23024         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
23025         as they are unused.
23026         (expand_static_init): Likewise.
23027         (cplus_expand_expr_stmt): Likewise.
23028         * decl2.c (finish_file): Likewise.
23029         * init.c (perform_member_init): Likewise.
23030         (emit_base_init): Likewise.
23031         (expand_aggr_vbase_init_1): Likewise.
23032
23033 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
23034
23035         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
23036         get a DECL_LANG_SPECIFIC node.
23037         * cp-tree.h (lang_decl_flags): Add new member `level'.
23038         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
23039         decl_flags level member.
23040
23041 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
23042
23043         * call.c (build_method_call): Make sure instance has a
23044         TYPE_LANG_SPECIFIC node before we dive into it.
23045
23046 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
23047
23048         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
23049
23050 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
23051
23052         * decl.c (duplicate_decls): When smashing decls, smash staticness in
23053         the usual way.
23054
23055 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
23056
23057         * decl.c (poplevel): Handle the merging of subblocks of cleanups
23058         when finishing blocks that have already been created (usually due to
23059         the fixup goto code).  Fixes bad debugging information.
23060
23061 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
23062
23063         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
23064         that's not a list of overloaded functions.
23065
23066 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
23067
23068         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
23069         before trying to use DECL_ABSTRACT_VIRTUAL_P.
23070
23071 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
23072
23073         * decl2.c (mark_used): New function for hooking into setting of
23074         TREE_USED on decls.
23075         * call.c (build_method_call): Use it.
23076         * class.c (instantiate_type): Likewise.
23077         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
23078         for all like-named functions.
23079         * method.c (hack_identifier): Likewise.
23080         (emit_thunk): Don't call assemble_external.
23081         (make_thunk): Create thunk as a FUNCTION_DECL so that it
23082         gets the right mode and ENCODE_SECTION_INFO works.
23083
23084         * parse.y: Use mark_used.  Pass operator names to do_identifier.
23085         * lex.c (do_identifier): Handle operator names.
23086
23087         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
23088
23089 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
23090
23091         * errfn.c: Include stdio.h.
23092         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
23093
23094 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
23095
23096         * typeck2.c (digest_init): Always convert initializers to the
23097         right type.
23098
23099 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
23100
23101         * init.c (member_init_ok_or_else): Don't allow member initializers
23102         for indirect members, as it is invalid.
23103
23104 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
23105
23106         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
23107
23108 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
23109
23110         * parse.y (for.init.statement): Catch compound statements inside for
23111         initializations, if we're being pedantic.
23112
23113 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
23114
23115         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
23116         looking for.
23117
23118 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
23119
23120         * error.c (dump_expr): Don't core dump when a boolean expression is
23121         used as a default argument.
23122
23123 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
23124
23125         * class.c (finish_struct_bits): Check aggregate_value_p instead of
23126         RETURN_IN_MEMORY.
23127
23128 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
23129
23130         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
23131         BLKmode type that would otherwise be returned in registers.
23132
23133 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
23134
23135         * g++.c (WITHLIBC): New macro.
23136         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
23137         saw_libc and pass it at the end if it was set.
23138
23139 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
23140
23141         * parse.y (fn.def1): Call split_specs_attrs in
23142         declmods notype_declarator case.