OSDN Git Service

2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
2
3         * lex.c (DIR_SEPARATOR): Delete macro.
4
5 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
6  
7        * decl2.c (lang_decode_option): Handle automatic line wrapping
8        option.
9         
10 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
11
12         * friend.c (do_friend): Don't resolve scopes when processing
13         template declarations, even if the qualifying scope doesn't
14         involve template parameters.
15
16 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
17
18         * class.c (dfs_modify_vtables_queue_p): Remove.
19         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
20         and dfs_marked_real_bases_queue_p instead of
21         dfs_modify_vtables_queue_p.
22
23         * class.c (build_vbase_path): Simplify.
24         (dfs_propagate_binfo_offsets): New function.
25         (propagate_binfo_offsets): Use it.
26         (remove_base_field): Simplify.
27         (dfs_set_offset_for_vbases): Remove.
28         (dfs_set_offset_for_shared_vbases): New function.
29         (dfs_set_offset_for_unshared_vbases): Likewise.
30         (layout_virtual_bases): Use them.
31         (layout_basetypes): Don't call propagate_binfo_offsets.
32         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
33         for the vbases.
34         
35         * class.c (build_base_field): New function, split out from ...
36         (build_base_fields): ... here.  Use it.  Allocate primary bases
37         first, under the new ABI.
38         (get_vtable_entry): Remove.
39         (remove_base_field): New function, split out from ...
40         (remove_base_fields): ... here.  Adjust since primary bases come
41         first under the new ABI.
42         
43         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
44         (initialize_vtbl_ptrs): New function.
45         (expand_indirect_vtbls_init): Change prototype.
46         (convert_pointer_to_vbase): Declare.
47         * init.c (expand_direct_vtbls_init): Remove.
48         (dfs_initialize_vtbl_ptrs): New function.
49         (initialize_vtbl_ptrs): Likewise.
50         (emit_base_init): Use initialize_vtbl_ptrs.
51         * search.c (convert_pointer_to_vbase): Make it global.
52         (expand_indirect_vtbls_init): Remove vtable initialization code.
53         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
54         
55         * class.c (dfs_finish_vtbls): New function.
56         (finish_vtbls): Use it.
57         (dump_class_hierarchy): New function.
58         
59         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
60         (BINFO_VBASE_PRIMARY_P): New macro.
61         (BINFO_VIRTUALS): Add to documentation.
62         (SET_BINFO_PRIMARY_MARKED_P): Remove.
63         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
64         (dfs_mark_primary_bases_queue_p): Likewise.
65         (dfs_unmarked_real_bases_queue_p): New function.
66         (dfs_marked_real_bases_queue_p): Likewise.
67         * search.c (dfs_mark_primary_bases): Adjust.
68         (mark_primary_bases): Likewise.
69         (get_shared_vbase_if_not_primary): New function.
70         (dfs_unmarked_real_bases_queue_p): Likewise.
71         (dfs_marked_real_bases_queue_p): Likewise.
72         (dfs_get_pure_virtuals): Simplify.
73         (get_pure_virtuals): Likewise.
74         
75 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
76
77         * lex.c: Include tm_p.h.
78
79 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
80
81         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
82
83 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
84
85         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
86         * pt.c (instantiate_decl): Defer comdat templates that might not be
87         needed.
88         
89         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
90         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
91         (finish_file): Likewise.
92
93         * decl2.c (import_export_class): Undo 12/14 change.
94
95         * error.c (dump_decl): operator new, not operatornew.
96
97         * class.c (field_decl_cmp): A nontype is "greater" than a type.
98         * search.c (lookup_field_1): Look for the last field with the
99         desired name.
100
101 2000-01-05  Nathan Sidwell  <nathan@acm.org>
102
103         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
104         FUNCTION_DECL.
105
106 2000-01-05  Nathan Sidwell  <nathan@acm.org>
107
108         * typeck.c (build_static_cast): Don't strip target qualifiers
109         when casting from a class.
110
111 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
112
113         * class.c (warn_hidden): Initialize variable `fndecl'.
114
115 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
116
117         * decl.c (flag_isoc9x): New variable to be able to use code in
118         c-common.c.  For now always zero.
119
120 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
121
122         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
123         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
124         or unshare_base_binfos for virtual bases here.
125         * search.c (dfs_get_vbase_types): Do it here.
126         (get_vbase_types): Adjust.
127         
128 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
129
130         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
131         (BINFO_PRIMARY_MARKED_P): Use flag 5.
132         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
133         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
134         (unmark_primary_bases): Remove declaration.
135         (unmarkedp): Declare.
136         (dfs_vbase_unmark): Likewise.
137         * class.c (determine_primary_base): Return immediately if there
138         are no base classes.  Call mark_primary_bases here.
139         (modify_all_direct_vtables): Remove.
140         (modify_all_indirect_vtables): Remove.
141         (dfs_modify_vtables_queue_p): New function.     
142         (dfs_modify_vtables): New function.
143         (modify_all_vtables): Use them.
144         (build_base_fields): Build FIELD_DECLs for primary virtual base
145         classes.
146         (create_vtable_ptr): Don't call determine_primary_base here.
147         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
148         (dfs_set_offset_for_vbases): ... this.
149         (layout_virtual_bases): Use it.
150         (layout_class_type): Call determine_primary_base here.
151         * search.c (unmarkedp): Make it global.
152         (shared_marked_p): Simplify.
153         (shared_unmarked_p): Likewise.
154         (dfs_primary_bases_queue_p): Remove.
155         (dfs_unmark_primary_bases): Likewise.
156         (unmark_primary_bases): Likewise.
157         (mark_primary_bases): Simplify.
158         (get_pure_virtuals): Don't call mark_primary_bases here.
159         (dfs_vbase_unmark): New function.
160         (get_vbase_types): Simplify.
161
162         * class.c (struct base_info): Remove.
163         (determine_primary_base): Take has_virtual_p rather than a
164         base_info as input.  Don't calculate max_has_virtual.
165         (finish_struct_bits): Remove max_has_virtual argument.
166         (create_vtable_ptr): Remove max_has_virtual_p argument.
167         (layout_virtual_bases): Remove max argument.
168         (layout_basetypes): Likewise.
169         (layout_class_type): Remove max_has_virtual_p argument.
170         (finish_struct_1): Remove max_has_virtual.
171
172         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
173         (layout_basetypes): Remove.
174         * class.c (propagate_binfo_offsets): Moved here from tree.c.
175         Update to handle primary virtual bases.
176         (remove_base_fields): New function, split out from
177         layout_basetypes.
178         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
179         (layout_virtual_bases): New function, split out from
180         layout_basetypes.  Update to handle primary virtual bases.
181         (layout_basetypes): Moved here from tree.c.  Use
182         remove_base_fields and layout_virtual_bases.
183         * search.c (dfs_mark_primary_bases_queue_p): New function.
184         (mark_primary_bases): Use it.
185         * tree.c (CEIL): Remove.
186         (propagate_binfo_offsets): Remove.
187         (layout_basetypes): Remove.
188         
189 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
190
191         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
192         (BINFO_PRIMARY_MARKED_P): New macro.
193         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
194         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
195         (mark_primary_bases): New function.
196         (unmark_primary_bases): Likewise.
197         * search.c (get_abstract_virtuals_1): Remove.
198         (dfs_mark_primary_bases): New function.
199         (mark_primary_bases): Likewise.
200         (dfs_unmark_primary_bases): Likewise.
201         (unmark_primary_bases): Likewise.
202         (dfs_get_pure_virtuals): Likewise.
203         
204 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
205
206         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
207         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
208         (modify_one_vtable): Adjust.
209         (fixup_vtable_deltas1): Likewise.
210         (override_one_vtable): Likewise.
211         * search.c (get_abstract_virtuals_1): Likewise.
212         (get_pure_virtuals): Likewise.
213         (expand_upcast_fixups): Likewise.
214         * tree.c (debug_binfo): Likewise.
215         
216         * class.c (build_vtable): Don't return a value.  Don't rebuild
217         vtables for bases that have already been handled.
218         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
219         already been handled.
220         (modify_one_vtable): Adjust accordingly.
221         (fixup_vtable_deltas1): Likewise.
222         (finish_struct_1): Likewise.
223
224 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
225
226         * call.c (build_new_method_call): Also check destructors.
227
228 1999-12-31  Mark Mitchell  <mark@codesourcery.com>
229
230         * cp-tree.h (VF_NORMAL_VALUE): Remove.
231         * class.c (struct base_info): Remove vfield, vfields, and rtti.
232         (set_primary_base): New function, split out from ...
233         (finish_base_struct): ... here.  Rename to ...
234         (determine_primary_base): ... this.  Simplify.
235         (create_vtable_ptr): Tweak accordingly.
236         (finish_struct_1): Simplify.
237         
238         * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
239         (CLASSTYPE_N_BASECLASSES): Likewise.
240         (BINFO_FOR_VBASE): New macro.
241         (get_vbase_types): Change prototype.
242         * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
243         (prepare_fresh_vtable): Likewise.
244         (finish_vtbls): Likewise.
245         (get_class_offset_1): Likewise.
246         (modify_all_indirect_vtables): Likewise.
247         (build_vbase_pointer_fields): Likewise.
248         * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
249         * init.c (sort_base_init): Use BINFO_FOR_VBASE.
250         (expand_member_init): Likewise.
251         * search.c (get_base_distance): Likewise.
252         (lookup_field_queue_p): Likewise.
253         (virtual_context): Likewise.
254         (get_vbase_types): Don't return a value.  Set
255         CLASSTYPE_VBASECLASSES here.
256         * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
257         
258 1999-12-30  Mark Mitchell  <mark@codesourcery.com>
259
260         * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
261
262 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
263
264         * class.c (create_vtable_ptr): Put the vtable at the beginning of
265         the class, not the end, in the new ABI.
266         * tree.c (propagate_binfo_offsets): Do the right thing for the new
267         ABI.
268
269 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
270
271         * cp-tree.h (lang_type): Add nearly_empty_p.  Adjust dummy.
272         (CLASSTYPE_NEARLY_EMPTY_P): New macro.
273         * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
274         (check_field_decls): Likewise.
275         (check_bases_and_members): Likewise.
276
277 1999-12-28  Mark Mitchell  <mark@codesourcery.com>
278
279         * cp-tree.h (do_inline_function_hair): Remove.
280         * class.c (layout_class_type): New function, split out from
281         finish_struct_1.
282         (fixup_pending_inline): Likewise.
283         (fixup_inline_methods): New function.
284         * method.c (fixup_pending_inline): Remove.
285         (do_inline_function_hair): Likewise.
286         
287         * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
288         new ABI.
289         
290         * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
291         (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
292         (CLASSTYPE_PURE_VIRTUALS): ... this.
293         (lang_decl_flags): Replace abstract_virtual with pure_virtual.
294         (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
295         (DECL_PURE_VIRTUAL_P): ... this.
296         (get_abstract_virtuals): Rename to ...
297         (get_pure_virtuals): ... this.
298         * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
299         DECL_ABSTRACT_VIRTUAL_P.  Replace CLASSTYPE_ABSTRACT_VIRTUALS with
300         CLASSTYPE_PURE_VIRTUALS.
301         * class.c (build_vtable_entry): Likewise.
302         (finish_struct_bits): Likewise.  Call get_pure_virtuals, not
303         get_abstract_virtuals.
304         (build_vtbl_initializer): Likewise.
305         (override_one_vtable): Likewise.
306         (check_methods): Likewise.
307         * decl.c (duplicate_decls): Likewise.
308         (redeclaration_error_message): Likewise.
309         (lang_mark_tree): Likewise.
310         * decl2.c (grok_function_init): Likewise.
311         (import_export_vtable): Likewise.
312         (import_expor_class): Likewise.
313         * typeck2.c (abstract_virtuals_error): Likewise.
314         * xref.c (GNU_xref_member): Likewise.
315         * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
316         
317 1999-12-26  Zack Weinberg  <zack@wolery.cumb.org>
318
319         * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
320         throughout.
321
322 1999-12-26  Mark Mitchell  <mark@codesourcery.com>
323
324         * decl.c (store_return_init): Use mode of old RTL generated for
325         DECL_RESULT, not the mode of DECL_RESULT itself.
326         * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
327         for functions that used named return values.
328         
329 1999-12-24  Mark Mitchell  <mark@codesourcery.com>
330
331         * semantics.c (expand_body): Use
332         note_deferral_of_defined_inline_function.
333
334 1999-12-22  Mark Mitchell  <mark@codesourcery.com>
335
336         * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
337
338 1999-12-22  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
339
340         * error.c (dump_decl): Support named return values.
341
342 1999-12-20  Mark Mitchell  <mark@codesourcery.com>
343
344         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
345         (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
346         (CLASSTYPE_PRIMARY_BINFO): Likewise.
347         * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
348         TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
349         (check_bases_and_members): Set them here instead.
350         (create_vtable_ptr): New function, split out from ...
351         (finish_struct_1): ... here.  Use it.  Tidy.  Use
352         CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
353         * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
354         the first field in the class.
355         * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES.  Handle
356         seeing TYPE_VFIELD as the first field in the class.
357         
358         * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
359         (TYPE_POLYMORPHIC_P): ... this.
360         (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
361         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
362         (TREE_CALLS_NEW): Remove.
363         (TREE_MANGLED): Likewise.
364         * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
365         and TYPE_POLYMORPHIC_P.
366         * class.c (check_bases): Likewise.
367         (finish_base_struct): Likewise.
368         (finish_struct_bits): Likewise.
369         (check_for_override): Likewise.
370         (finish_struct_1): Likewise.
371         (get_vfield_name): Likewise.
372         * decl.c (xref_basetypes): Likewise.
373         * decl2.c (import_export_class): Likewise.
374         (import_export_decl): Likewise.
375         * error.c (dump_function_decl): Likewise.
376         * pt.c (instantiate_class_template): Likewise.
377         * repo.c (repo_inline_used): Likewise.
378         * rtti.c (build_headof): Likewise.
379         (get_tinfo_fn_dynamic): Likewise.
380         (build_x_typeid): Likewise.
381         (get_tinfo_var): Likewise.
382         (build_dynamic_cast_1): Likewise.
383         (synthesize_tinfo_fn): Likewise.
384         * search.c (lookup_field_1): Likewise.
385         (dfs_debug_mark): Likewise.
386         (maybe_suppress_debug_info): Likewise.
387         * typeck.c (build_component_ref): Likewise.
388         (build_component_addr): Likewise.
389         * typeck2.c (process_init_constructor): Likewise.
390         
391 1999-12-20  Nathan Sidwell  <nathan@acm.org>
392
393         * typeck.c (strip_all_pointer_quals): New static function.
394         (build_static_cast): Use it. Don't use at_least_as_qualified_p.
395
396 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
397
398         * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
399         (dso_handle_node): New macro.
400         (flag_use_cxa_atexit): New variable.
401         (declare_global_var): New function.
402         (start_anon_func): Remove declaration.
403         (end_anon_func): Likewise.
404         * decl.c (get_atexit_node): New function, split out from
405         destroy_local_static.  Handle flag_use_cxa_atexit.
406         (get_dso_handle_node): Likewise.
407         (start_cleanup_fn): Renamed from start_anon_func.  Moved here from
408         except.c.  Handle flag_use_cxa_atexit.
409         (end_cleanup_fn): Renamed from end_anon_func.  Moved here from
410         except.c.
411         (declare_global_var): New variable.
412         (destroy_local_static): Handle flag_use_cxa_atexit.
413         * decl2.c (flag_use_cxa_atexit): New variable.
414         (lang_f_options): Likewise.
415         * except.c (start_anon_func): Remove.
416         (end_anon_func): Liekwise.
417         * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
418         * rtti.c (get_tinfo_var): Use declare_global_var.
419
420 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
421
422         * class.c (check_field_decls): Don't return a value.
423         (avoid_overlap): Moved here from tree.c.
424         (build_base_fields): Likewise.
425         (check_bases): New function, split out from finish_base_struct.
426         (check_bases_and_members): New function, split out from 
427         finish_struct_1.
428         (struct base_info): Remove cant_have_default_ctor,
429         cant_have_const_ctor, cant_have_asn_ref.
430         (finish_base_struct): Split semantic analysis into check_bases.
431         (finish_struct_methods): Fix bogus assertion.
432         (check_field_decls): Call finish_struct_anon here.
433         (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
434         (finish_struct_1): Use check_bases_and_members.  Reorganize.
435         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
436         (build_base_fields): Don't declare.
437         * tree.c (avoid_overlap): Remove.
438         (build_base_fields): Likewise.
439         
440         * optimize.c (struct inline_data): Remove scope_stmt.
441         (remap_block): Don't use insert_block_after_note.  Don't update
442         scope_stmt.
443         (expand_call_inline): Don't update scope_stmt.
444         (optimize_function): Don't initialize scope_stmt.
445         * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
446         NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
447
448 1999-12-15  Mark Mitchell  <mark@codesourcery.com>
449
450         * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
451         out of the class, rather than taking them as parameters.
452         (build_vbase_pointer_fields): Move here from tree.c.
453         (build_vtbl_or_vbase_field): New function.
454         (check_methods): Likewise.
455         (remove_zero_width_bitfields): Likewise.
456         (add_virtual_function): Use tree_cons instead of temp_tree_cons.
457         (delete_duplicate_fields_1): Tidy.  Don't delete duplicate
458         USING_DECLs here.
459         (finish_struct_methods): Handle the case where there are no
460         methods here.
461         (get_basefndecls): Use tree_cons instead of temp_tree_cons.
462         (check_field_decls): Call delete_duplicate_fields here.
463         (finish_struct_1): Tidy.  Use check_methods and
464         remove_zero_width_bitfields.
465         * cp-tree.h (build_vbase_pointer_fields): Remove.
466         * decl.c (grokdeclarator): Use tree_cons instead of
467         temp_tree_cons.
468         * decl2.c (qualified_lookup_using_namespace): Use tree_cons
469         instead of temp_tree_cons.
470         * lex.c (cons_up_default_function): Remove dead code.
471         * method.c (fixup_pending_inline): New function, split out from ...
472         (do_inline_function_hair): ... here.
473         * tree.c (build_vbase_pointer_fields): Remove.
474         
475 1999-12-15  Jason Merrill  <jason@casey.cygnus.com>
476
477         * tree.c (walk_tree): Walk operand subtrees in forward order.
478         * optimize.c (expand_call_inline): Likewise.
479         (optimize_function): Initialize id->scope_stmt to something useful.
480         (remap_block): Assume id->scope_stmt has a useful value.
481
482 1999-12-15  Nathan Sidwell  <nathan@acm.org>
483
484         * typeck.c (build_c_cast): Expand warning message. Move pointer
485         alignment warning to after the cast. Don't warn about pointer
486         alignment when given a pointer to incomplete.
487
488 1999-12-15  Richard Henderson  <rth@cygnus.com>
489
490         * cp-tree.h (make_aggr_type): Declare.
491         * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
492         (make_aggr_type): New.
493
494         * decl.c (build_typename_type, init_decl_processing): Use it.
495         (build_ptrmemfunc_type, xref_tag): Likewise.
496         * except.c (call_eh_info): Likewise.
497         * init.c (init_init_processing): Likewise.
498         * pt.c (process_template_parm, lookup_template_class): Likewise.
499         * rtti.c (expand_class_desc): Likewise.
500         * semantics.c (begin_class_definition, finish_typeof): Likewise.
501         * tree.c (copy_template_template_parm): Likewise.
502
503 1999-12-15  Jason Merrill  <jason@yorick.cygnus.com>
504
505         * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
506         sizeof (struct tree_common).
507
508 1999-12-14  Jason Merrill  <jason@casey.cygnus.com>
509
510         * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
511         outermost block to point to the inlined function decl.
512
513         * error.c (dump_decl): operator==, not operator ==.
514         (op_to_string): Likewise.
515
516         * decl.c (compute_array_index_type): Handle null name.
517
518         * decl2.c (ambiguous_decl): Fix to match comment.
519         (lookup_using_namespace): Adjust.
520
521         * decl2.c (import_export_class): Don't ignore dllimport.
522
523 1999-12-14  Mark Mitchell  <mark@codesourcery.com>
524
525         * class.c (check_field_decls): Split out from ...
526         (finish_struct_1): ... here.  Use it.  Tidy.
527
528         * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
529         * optimize.c (copy_body_r): Pass it.
530         * tree.c (remap_save_expr): Clear walk_subtrees for an
531         already-handled SAVE_EXPR.
532         (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
533
534         * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
535         * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
536
537         * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
538
539 1999-12-14  Mumit Khan  <khan@xraylith.wisc.edu>
540
541         * class.c (finish_base_struct): Allow multiple COM base classes
542         as well as non-COM bases as long as it's not the leftmost.
543
544 1999-12-13  Mumit Khan  <khan@xraylith.wisc.edu>
545
546         * lex.c (saving_parse_to_obstack): New global.
547         (reinit_parse_for_block): Use.
548         (reinit_parse_for_expr): Use.
549         (check_newline): Use.
550
551 1999-12-13  Mark Mitchell  <mark@codesourcery.com>
552
553         * optimize.c (initialize_inlined_parameters): Take FN to which the
554         parameters belong as an argument.
555         (expand_call_inline): Expand calls into the parameter
556         initializations before pushing the function onto the list of
557         functions we are presently expanding.
558
559 1999-12-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
560
561         * class.c (get_vtable_name): Use a literal format string and
562         VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
563         (prepare_fresh_vtable): Likewise.
564
565         * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
566         VTABLE_NAME_FORMAT.
567
568         * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
569
570         * init.c (build_vec_init): Initialize variable `try_body'.
571
572         * lex.c (yyerror): Don't call a variadic function with a
573         non-literal format string.
574
575         * optimize.c (optimize_function): Call memset, not bzero.
576
577         * pt.c (for_each_template_parm_r): Add static prototype.
578
579 1999-12-09  Andreas Jaeger  <aj@suse.de>
580
581         * except.c (expand_throw): Add static attribute to match
582         prototype.
583
584         * Makefile.in (semantics.o): Add dependency on output.h.
585         * semantics.c: Include output.h for declaration of
586         make_function_rtl.
587
588 1999-12-09  Mark Mitchell  <mark@codesourcery.com>
589
590         * decl.c (init_decl_processing): Reenable inlining on trees.
591         (finish_function): Likewise.
592         * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
593         * semantics.c (simplify_aggr_init_exprs): New function.
594         (expand_body): Use it.
595         * tree.c (walk_tree): Special-case TARGET_EXPRs since they
596         sometimes present the same sub-tree twice.
597         
598         * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
599         `csl'.
600
601         * semantics.c (finish_switch_cond): Do conversions here, not ...
602         * typeck.c (c_expand_start_case): Here.
603
604         * semantics.c (do_poplevel): Remove unused variable.
605         
606 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
607
608         * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
609         unless we're declaring the variable in question.
610
611 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
612
613         * decl.c (init_decl_processing): #if 0 last patch.
614         (finish_function): Likewise.
615
616 1999-12-05  Mark Mitchell  <mark@codesourcery.com>
617
618         * decl.c (init_decl_processing): Set flag_inline_trees if
619         !flag_no_inline.
620
621         * cp-tree.h (calls_setjmp_p): Declare.
622         * decl.c (finish_function): Mark functions that call setjmp as
623         uninlinable.
624         * optimize.c (calls_setjmp_r): New function.
625         (calls_setjmp_p): Likewise.
626
627 1999-12-04  Mark Mitchell  <mark@codesourcery.com>
628
629         * optimize.c (expand_call_inline): Wrap the expanded call in an
630         EXPR_WITH_FILE_LOCATION node to get correct line numbers for
631         inlined functions.
632
633         * optimize.c (inline_data): Remove fns_top.  Add scope_stmt.  Add
634         in_target_cleanup_p.
635         (remap_decl): New function.
636         (remap_block): Likewise.
637         (copy_scope_stmt): Likewise.
638         (copy_body_r): Use remap_decl and copy_scope_stmt.
639         (copy_body): Use VARRAY_TOP_TREE.
640         (initialize_inlined_parameters): Likewise.
641         (declare_return_variable): Likewise.
642         (inlinable_function_p): Check flag_inline_trees.
643         (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
644         specially.  Use VARRAY_PUSH_TREE.  Create a BLOCK for the
645         parameters of the inlined function.
646         (optimize_function): Prevent recursion into partially complete
647         functions.
648         
649         * cp-tree.def (SCOPE_STMT): Take one operand.
650         * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
651         (SCOPE_NULLIFIED_P): Redefine.
652         (SCOPE_NO_CLEANUPS_P): New macro.
653         (add_scope_stmt): Change prototype.
654         * decl.c (poplevel): Tidy.  Warn about unused variables here.
655         Record SCOPE_STMT_BLOCKs.
656         (finish_function): Keep DECL_INITIAL for functions that might be
657         inlined.
658         * ir.texi: Document SCOPE_NO_CLEANUPS_P.
659         * semantics.c: Include rtl.h.
660         (add_scope_stmt): Return the new scope statement and, for an
661         end-of-scope statement, its matching begin statement.  Don't set
662         SCOPE_NULLIFIED_P.
663         (do_pushlevel): Simplify, now that we are always
664         function-at-a-time.
665         (do_poplevel): Likewise.  Record SCOPE_STMT_BLOCKs.
666         (expand_stmt): Don't call expand_start_bindings or
667         expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
668         * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
669         SCOPE_NULLIFIED_P.
670         * Makefile.in (semantics.o): Depend on RTL_H.
671         
672         * decl2.c (pending_statics_used): Make it a macro.
673         (saved_inlines_used): Likewise.
674         (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
675         (mark_inline_for_output): Likewise.
676         (ssdf_decls_used): Remove.
677         (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
678         (generate_ctor_or_dtor_function): Adjust accordingly.
679         
680 1999-11-24  Geoffrey Keating  <geoffk@cygnus.com>
681             Greg McGary  <gkm@gnu.org>
682
683         * decl.c (duplicate_decls): Merge
684         DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
685         DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
686
687 1999-12-02  Mike Stump  <mrs@wrs.com>
688
689         * init.c (perform_member_init): Handle parse errors better.
690
691 1999-12-01  Mark Mitchell  <mark@codesourcery.com>
692
693         * cp-tree.h (min_tree_cons): Remove.
694         (scratch_ovl_cons): Likewise.
695         * decl.c (saveable_obstack): Don't declare.
696         (duplicate_decls): Tweak error-message.
697         (initialize_local_var): Explicitly mark the definition as static.
698         (finish_function): Call permanent_allocation, just so
699         that the middle-end sees the obstacks it expects.
700         (mark_cp_function_context): Likewise.
701         * init.c (build_new): Don't use min_tree_cons.
702         * lex.c (permanent_obstack): Don't declare.
703         (current_obstack, saveable_obstack): Likewise.
704         * spew.c (current_obstack, saveable_obstack): Likewise.
705         * tree.c (current_obstack, saveable_obstack): Likewise.
706         (scratch_ovl_cons): Remove.
707         (build_min_nt): Don't mess with obstacks.
708         (build_min): Likewise.
709         (min_tree_cons): Remove
710         * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
711         (build_x_function_call): Likewise.
712         (build_c_cast): Don't use min_tree_cons.
713         
714 1999-11-29  Mark Mitchell  <mark@codesourcery.com>
715
716         * pt.c (tsubst_decl): Robustify.
717
718 1999-11-27  Mark Mitchell  <mark@codesourcery.com>
719
720         * decl2.c (finish_file): Call expand_body for inline functions
721         that will be written out but that do not yet have RTL.
722         * semantics.c (expand_body): Do not generate RTL For inline
723         functions that do not yet need to be written out.
724
725 1999-11-25  Mark Mitchell  <mark@codesourcery.com>
726
727         * Make-lang.in (CXX_SRCS): Add optimize.c.  
728         * Makefile.in (CXX_OBJS): Add optimize.o.
729         (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
730         (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
731         (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
732         (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
733         (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
734         (dump.o): Likewise.
735         (optimize.o): New target.  
736         * class.c: Don't include splay-tree.h.
737         * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.  
738         * cp-tree.h: Include splay-tree.h.
739         (DECL_UNINLINABLE): New macro.
740         (CTOR_BEGIN_P, CTOR_END_P): New macros.
741         (flag_inline_trees): New variable.
742         (local_variable_p): New function.
743         (nonstatic_local_decl_p): Likewise.
744         (optimize_function): Likewise.
745         (cplus_unsave_expr_now): Remove.
746         (copy_tree_r): Declare.
747         (remap_save_expr): Likewise.  
748         * decl.c (local_variable_p): Don't
749         make it static.
750         (local_variable_p_walkfn): New function.
751         (make_rtl_for_local_static): Remove code to try to avoid writing
752         out static constants.
753         (emit_local_var): Fix indentation.
754         (nonstatic_local_decl_p): New function.
755         (check_default_argument): Use local_variable_p_walkfn, not
756         local_variable_p, when walking the tree.
757         (start_function): Set the DECL_CONTEXT for automatically generated
758         labels.
759         (finish_constructor_body): Use CTOR_STMT to mark the end of a
760         constructor.  
761         * decl2.c: Don't include splay-tree.h.
762         (flag_inline_trees): Define.  
763         * dump.c: Don't include
764         splay-tree.h.  
765         * except.c (expand_end_catch_block): Fix comment formatting.
766         (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
767         (expand_throw): Tidy comment.  
768         * init.c (build_vec_delete_1): Use create_temporary_var.  
769         * lex.c (cplus_tree_code_type): Make it static.
770         (cplus_tree_code_length): Likewise.
771         (cplus_tree_code_name): Likewise.  
772         * optimize.c: New file.  
773         * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
774         with computed gotos.
775         (setup_vtbl_ptr): Mark the beginnings of constructors with
776         CTOR_STMT.
777         (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
778         (expand_body): Call optimize_function.  Save bodies if we're doing
779         inlining on trees.
780         * tree.c: Don't include splay-tree.h.  Include insn-config.h and
781         integrate.h.
782         (copy_tree_r): Make it public.
783         (statement_code_p): New function.
784         (mark_local_for_remap_r): Likewise.
785         (cp_usave_r): Likewise.
786         (cp_unsave): Likewise.
787         (build_cplus_new): Set DECL_CONTEXT for temporary variables.
788         (walk_tree): Walk into `s' class nodes.  Walk statement chains.
789         (copy_tree_r): Handle 's' class nodes.  Restore chains for
790         statements.  Nullify scopes.  Don't copy types.
791         (init_tree): Set lang_unsave to cp_unsave.
792         (remap_save_expr): Define.
793         * ir.texi: Document CTOR_STMT.
794         
795 1999-11-24  Jason Merrill  <jason@casey.cygnus.com>
796
797         * search.c (note_debug_info_needed): Do perform this optimization
798         for dwarf2.  
799         (maybe_suppress_debug_info): Likewise.  Start by clearing
800         TYPE_DECL_SUPPRESS_DEBUG.
801
802 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
803
804         * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
805
806         * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
807
808 1999-11-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
809
810         * decl.c (pushdecl, grokdeclarator): Don't call a variadic
811         function with a non-literal format string.
812
813         * lex.c (do_identifier): Likewise.
814
815         * typeck.c (build_unary_op): Likewise.
816
817 1999-11-23  Mark Mitchell  <mark@codesourcery.com>
818
819         * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
820
821 1999-11-22  Mark Mitchell  <mark@codesourcery.com>
822
823         * cp-tree.def (CTOR_COMPLETE): New tree node.
824         * decl.c (finish_constructor_body): Add it, to mark the end of the
825         constructor.
826         (finish_function): Don't call end_protect_partials here.
827         * ir.texi (CTOR_COMPLETE): Document it.
828         * semantics.c (expand_stmt): Handle it.
829         
830         * cp-tree.def (FUNCTION_NAME): New tree node.
831         * cp-tree.h (current_function_name_declared): Tweak documentation.
832         (lang_decl_flags): Add pretty_function_p, adjust dummy.
833         (DECL_PRETTY_FUNCTION_P): New macro.
834         * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
835         etc., in a template function.  Use at_function_scope_p instead of
836         expanding it inline.
837         * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
838         specially.
839         (tsubst): Handle FUNCTION_NAME.
840         (tsubst_copy): Likewise.
841         (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
842         etc. in instantiation.
843         * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
844         even in template functions.
845         (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
846         conditional scope at the top of a destructor.
847         
848         * error.c (dump_function_decl): Use `[ with ... ]' syntax for
849         specializations too.
850
851 1999-11-22  Nathan Sidwell  <nathan@acm.org>
852
853         * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
854         when actually negative.
855
856         * typeck.c (convert_for_assignment): Expand comment about
857         strange NULL check, moved from ...
858         (convert_for_initialization): ... here. Remove unneeded
859         code.
860
861 1999-11-21  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
862
863         * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
864         * init.c (build_vec_delete, build_vec_delete_1): Likewise.
865         Always destruct virtual bases of array components, but never
866         delete them.
867         (build_vec_init): Adjust invocations.
868         (build_delete): Likewise.
869         * decl2.c (delete_sanity): Likewise.
870
871 1999-11-19  Nathan Sidwell  <nathan@acm.org>
872
873         * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
874         * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
875         * decl2.c (grok_method_quals): Accept `restrict' as applying to
876         the object pointer. Return such qualifiers.
877         (grokclassfn): Apply this pointer qualifiers. Cleanup unused
878         variables.
879
880 1999-11-18  Mark Mitchell  <mark@codesourcery.com>
881
882         * except.c (expand_end_catch_block): Fix typo.
883         (expand_exception_blocks): Simplify.  Don't call
884         expand_leftover_cleanups.
885
886 1999-11-15  Jason Merrill  <jason@casey.cygnus.com>
887
888         * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
889         * pt.c (tsubst, case INTEGER_TYPE): Call it.  
890         Check uses_template_parms.
891
892         * class.c (finish_struct): If we're a local class in a template
893         function, add a TAG_DEFN.
894         * pt.c (lookup_template_class): If this is a local class in a
895         template function, call pushtag.
896         (tsubst_expr, case TAG_DEFN): Handle classes, too.
897
898         Emit debug info with the vtable.
899         * search.c (maybe_suppress_debug_info): New function...
900         * class.c (finish_struct_1): ...split out from here.
901         * cp-tree.h: Declare it.
902         * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
903         if we're writing out the vtable.
904         * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, 
905         note_debug_info_needed): #if 0 out.
906
907 1999-11-14  Mark Mitchell  <mark@codesourcery.com>
908
909         * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
910         * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
911         TREE_PERMANENT.
912         * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
913         * decl2.c (lookup_arg_dependent): Use it.
914         
915         * cp-tree.h (cp_finish_decl): Change prototype.
916         (finish_static_data_member_decl): Likewise.
917         (push_permanent_obstack): Remove declaration.
918         (push_expression_obstack): Likewise.
919         (push_scratch_obstack): Likewise.
920         (DECL_TEMPLATE_PARM_P): Robustify.
921         (SET_DECL_TEMPLATE_PARM_P): New macro.
922         * class.c (add_method): Don't manipulate obstacks.
923         (finish_vtbls): Likewise.
924         * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
925         * decl.c (binding_for_name): Don't manipulate obstacks.
926         (maybe_push_to_top_level): Likewise.
927         (pop_from_top_level): Likewise.
928         (duplicate_decls): Likewise.
929         (pushdecl): Likewise.
930         (implicitly_declare): Likewise.
931         (build_typename_type): Likewise.
932         (start_decl): Likewise.
933         (cp_finish_decl): Likewise.
934         (finish_decl): Likewise.
935         (destroy_local_static): Likewise.
936         (expand_static_init): Likewise.
937         (complete_array_type): Likewise.
938         (grokvardecl): Likewise.
939         (build_ptrmemfnc_type): Likewise.
940         (grokdeclarator): Likewise.
941         (xref_tag): Likewise.
942         (xref_basetypes): Likewise.
943         (start_enum): Likewise.
944         (finish_enum): Likewise.
945         (start_function): Likewise.
946         (finish_function): Likewise.
947         (start_method): Adjust call to cp_finish_decl.
948         * decl2.c (finish_static_data_member_decl): Don't manipulate
949         obstacks.
950         (grokfield): Likewise.
951         (grokbitfield): Likewise.
952         (get_temp_name): Likewise.
953         (get_sentry): Likewise.
954         (fnish_file): Likewise.
955         (lookup_arg_dependent): Likewise.
956         * except.c (call_eh_info): Likewise.
957         (push_eh_info): Likewise.
958         (do_pop_exception): Likewise.
959         (initialize_handler_parm): Likewise.
960         (expand_end_eh_spec): Likewise.
961         (alloc_eh_object): Likewise.
962         (expand_throw): Likewise.
963         * expr.c (extract_scalar_init): Likewise.
964         * init.c (build_java_class_ref): Likewise.
965         * lex.c (get_time_identifier): Likewise.
966         (snarf_defarg): Likewise.
967         (add_defarg_fn): Likewise.
968         (is_global): Simplify.
969         (do_identifier): Don't check TREE_PERMANENT.
970         * method.c (emit_thunk): Don't manipulate obstacks.
971         * parse.y (condition): Adjust call to cp_finish_decl.
972         (primary): Likewise.
973         (initdcl): Likewise.
974         (initdcl0_innards): Likewise.
975         (nomods_initdcl0): Likewise.
976         * pt.c (push_inline_template_parms_recursive): Use
977         SET_DECL_TEMPLATE_PARM_P.
978         (process_template_parm): Likewise.
979         (lookup_template_class): Don't manipulate obstacks.
980         (instantiate_class_template): Adjust call to
981         finish_static_data_member_decl.
982         (tsubst_decl): Don't manipulate obstacks.
983         (tsubst_expr): Likewise.
984         (instantiate_template): Likewise.
985         (instantiate_decl): Adjust calls to cp_finish_decl.
986         * rtti.c (call_void_fn): Don't manipulate obstacks.
987         (get_tinfo_var): Likewise.
988         (get_tinfo_fn_unused): Likewise.
989         (build_dynamic_cast_1): Likewise.
990         (expand_si_desc): Likewise.
991         (expand_class_desc): Likewise.
992         (expand_ptr_desc): Likewise.
993         (expand_attr_desc): Likewise.
994         (expand_generic_desc): Likewise.
995         (synthesize_tinfo_fn): Likewise.
996         * search.c (expand_upcast_fixups): Likewise.
997         * semantics.c (finish_asm_stmt): Likewise.
998         (finish_named_return_value): Likewise.
999         (begin_class_definition): Likewise.
1000         (finish_class_definition): Likewise.
1001         (finish_typeof): Likewise.
1002         * tree.c (build_cplus_method_type): Likewise.
1003         (reverse_path): Likewise.
1004         (copy_template_template_parm): Likewise.
1005         (build_expr_ptr_wrapper): Likewise.
1006         (push_expression_obstack): Remove.
1007         (push_permanent_obstack): Likewise.
1008         * typeck.c (mark_addressable): Likewise.
1009         
1010 1999-11-13  Mark Mitchell  <mark@codesourcery.com>
1011
1012         * call.c (build_conditional_expr): Use build_target_expr_with_type.
1013         (convert_like): Likewise.
1014         (build_over_call): Likewise.
1015         * cp-tree.h (build_target_expr): Remove.
1016         (build_target_expr_with_type): New function.
1017         * cvt.c (build_up_reference): Use get_target_expr.
1018         * decl.c (build_target_expr): Move to ...
1019         * tree.c (build_target_expr): Here.  Make it static.
1020         (build_target_expr_with_type): New function.  Set DECL_CONTEXT on
1021         the temporary VAR_DECLs.
1022         (get_target_expr): Use it.
1023
1024 1999-11-13  Jason Merrill  <jason@yorick.cygnus.com>
1025
1026         * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
1027         * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
1028         * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
1029         * class.c (set_rtti_entry): Use it.
1030
1031 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
1032
1033         * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
1034         here.
1035         * semantics.c (finish_expr_stmt): Call it here instead.  Move
1036         default_conversion logic to semantic-analysis time.
1037
1038 1999-11-12  Jason Merrill  <jason@yorick.cygnus.com>
1039
1040         * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
1041
1042 Fri Nov 12 12:56:32 MST 1999    Diego Novillo <dnovillo@cygnus.com>
1043
1044         * init.c (init_init_processing): Re-instated Nov 11 patch after
1045         approval.
1046
1047 Fri Nov 12 10:42:02 MST 1999    Diego Novillo <dnovillo@cygnus.com>
1048
1049         * init.c (init_init_processing): Undo patch from Nov 11, 1999.
1050         Patch had not been approved yet.
1051
1052 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
1053
1054         * decl.c (compute_array_index_type): New function, split out from
1055         grokdeclarator.
1056         (create_array_type_for_decl): Likewise.
1057         (grokdeclarator): Use them.
1058
1059         * semantics.c (expand_stmt): Don't suspend_momentary or
1060         resume_momentary.
1061
1062 Thu Nov 11 12:42:11 MST 1999    Diego Novillo <dnovillo@cygnus.com>
1063
1064         * init.c (init_init_processing): Header information for
1065         arrays allocated via `new' should have the same alignment used by
1066         malloc.
1067
1068 1999-11-10  Mark Mitchell  <mark@codesourcery.com>
1069
1070         * error.c (dump_function_name): Don't crash if given a friend
1071         pseudo-instantiation.
1072
1073         * cp-tree.h (build_enumerator): Change prototype.
1074         * decl.c (enum_next_value): Remove.
1075         (enum_overflow): Likewise.
1076         (init_decl_processing): Don't register enum_next_value as a root.
1077         (start_enum): Clear TYPE_VALUES for a redefined enum.
1078         (finish_enum): Reset the type of enumeration constants.
1079         (build_enumerator): Fix indentation.  Don't copy CONST_DECLs when
1080         we don't need to.  Maintain the TYPE_VALUES list and look there
1081         for the previously defined enumeration constant.  Let enumeration
1082         constants have the type of their values until the enumeration type
1083         is complete.
1084         * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
1085         (structsp): Adjust.
1086         * parse.c: Regenerated.
1087         * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
1088         
1089 Wed Nov 10 12:43:21 1999  Philippe De Muyter  <phdm@macqel.be>
1090                           Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1091
1092         * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
1093
1094 1999-11-09  Mark Mitchell  <mark@codesourcery.com>
1095
1096         * cp-tree.h (language_function): Remove x_last_dtor_insn and
1097         x_last_parm_cleanup_insn.
1098         * decl.c (last_dtor_insn): Remove.
1099         (last_parm_cleanup_insn): Likewise.
1100         (expand_start_early_try_stmts): Don't set them.
1101         (store_parm_decls): Likewise.
1102         (save_function_data): Or save them.
1103         (mark_lang_function): Or mark them.
1104
1105 1999-11-08  Mark Mitchell  <mark@codesourcery.com>
1106
1107         * decl.c (store_parm_decls): Generate cleanup code at
1108         semantic-analysis time.  Destroy objects in the correct order.
1109
1110 1999-11-07  Mark Mitchell  <mark@codesourcery.com>
1111
1112         * cp-tree.h (begin_new_placement): Remove.
1113         (finish_new_placement): Likewise.
1114         * class.c (finish_struct_1): Don't suspend_momentary or
1115         resume_momentary.
1116         * decl.c (grokdeclarator): Likewise.
1117         (maybe_build_cleanup_1): Likewise.
1118         * except.c (push_eh_cleanup): Likewise.
1119         (build_terminate_handler): Likewise.
1120         * init.c (build_new_1): Likewise.
1121         * parse.y (parse_decl): Change prototype.
1122         (initdecls, notype_initdecls, initdcl): Don't return int.
1123         (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
1124         (.begin_new_placement): Remove.
1125         (.finish_new_placement): Likewise.
1126         (nonmomentary_expr): Likewise.
1127         (suspend_mom): Likewise.
1128         (condition): Don't suspend_momentary, resume_momentary, or keep
1129         track of need to resume.
1130         (unary_expr): Likewise.
1131         (new_placement): Likewise.
1132         (decl): Likewise.
1133         (structsp): Likewise.
1134         (new_type_id): Likewise.
1135         (maybe_parmlist): Likewise.
1136         (direct_after_type_declaration): Likewise.
1137         (direct_new_declarator): Likewise.
1138         (direct_abstract_declaration): Likewise.
1139         * parse.c: Regenerated.
1140         * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
1141         * semantics.c (begin_new_placement): Remove.
1142         (finish_new_placement): Likewise.
1143         
1144 1999-11-05  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1145
1146         * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
1147         (DECL_TEMPLATE_INFO): Use it.
1148         * decl.c (warn_extern_redeclared_static): Do nothing for
1149         TEMPLATE_DECLs.
1150         * decl2.c (mark_used): Explicitly check for function or variable.
1151         * semantics.c (finish_unary_op_expr): Check whether result is also
1152         an INTEGER_CST.
1153
1154 1999-11-05  Mark Mitchell  <mark@codesourcery.com>
1155
1156         * Makefile.in (typeck2.o): Depend on output.h.
1157         * typeck2.c: Include output.h.
1158
1159         * decl.c (flag_ansi): Remove declaration.
1160
1161         * pt.c (tinst_level_tick): Make it static.
1162         (last_template_error_tick): Likewise.
1163         
1164         * cp-tree.h (mapcar): Remove declaration.
1165         (search_tree): Likewise.
1166         (walk_tree_fn): New typedef.
1167         (walk_tree): New function.
1168         * tree.c (bot_manip): Change prototype.  Adjust to be called via
1169         walk_tree.
1170         (bot_replace): Likewise.
1171         (no_linkage_helper): Likewise.
1172         (copy_tree_r): New function.
1173         (search_tree): Rename, and adjust, to become ...
1174         (walk_tree): New function.
1175         (mapcar): Remove.
1176         (target_remap): Remove.
1177         (target_remap_count): Likewise.
1178         (break_out_target_exprs): Use walk_tree.
1179         * decl.c (local_variable_p): Change prototype.
1180         (check_default_argument): Use walk_tree.
1181         * pt.c (for_each_template_parm_r): New function, split out from ...
1182         (for_each_template_parm): Here.  Use it, via walk_tree.
1183         
1184 1999-11-03  Mark Mitchell  <mark@codesourcery.com>
1185
1186         * class.c (check_bitfield_decl): New function, split out from
1187         finish_stuct_1.
1188         (check_field_decl): Likewise.  Recursively examine members of
1189         anonymous structs.
1190         (finish_struct_1): Use them.
1191         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
1192         
1193 1999-11-02  Mark Mitchell  <mark@codesourcery.com>
1194
1195         * decl.c (grokfndecl): Remove dead code.
1196
1197         * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
1198
1199 1999-11-02  Scott Snyder  <snyder@fnal.gov>
1200
1201         * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
1202         IMAGPART_EXPR.
1203         * pt.c (tsubst_copy): Likewise.
1204
1205 1999-11-01  Jason Merrill  <jason@yorick.cygnus.com>
1206
1207         * decl2.c (maybe_make_one_only): Always make things comdat on
1208         ELF targets, too.
1209
1210 1999-10-31  Mark Mitchell  <mark@codesourcery.com>
1211
1212         * decl.c (finish_function): Call free_after_parsing for functions
1213         we are not immediately turning into RTL.
1214
1215 1999-10-31  Brendan Kehoe  <brendan@cygnus.com>
1216
1217         * cp-tree.h (flag_dump_translation_unit): Add decl.
1218
1219 Sat Oct 30 22:42:50 1999  Stephen L Moshier <moshier@mediaone.net>
1220
1221         * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
1222
1223 1999-10-30  Mark Mitchell  <mark@codesourcery.com>
1224
1225         * decl.c (pop_cp_function_context): Don't call free on a NULL
1226         pointer.
1227         * semantics.c: Include ggc.h.
1228         (expand_body): Do garbage-collection after processing a template
1229         function.  Clear DECL_SAVED_TREE after generating RTL for a
1230         function.
1231         * Makefile.in (semantics.o): Depend on ggc.h.
1232         
1233 1999-10-29  Mark Mitchell  <mark@codesourcery.com>
1234
1235         * cp-tree.h (make_typename_type): Change prototype.
1236         * decl.c (make_typename_type): Only complain if so requested.
1237         * parse.y (nested_name_specifier): Adjust calls.
1238         (typename_sub0): Likewise.
1239         (typename_sub1): Likewise.
1240         * parse.c: Regenerated.
1241         * pt.c (convert_template_argument): Pass complain to
1242         make_typename_type.
1243         (tsubst): Likewise.
1244         
1245 1999-10-28  Mark Mitchell  <mark@codesourcery.com>
1246
1247         * semantics.c (finish_handler): End the scope of the handler
1248         before attaching it to the statement-tree.
1249
1250 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
1251
1252         * rtti.c (build_dynamic_cast_1): Give a better error message for
1253         an attempt to dynamic_cast from a non-polymorphic type.
1254
1255 1999-10-27  Mark Mitchell  <mark@codesourcery.com>
1256
1257         * cp-tree.h (make_temp_vec): Remove.
1258         (make_scratch_vec): Likewise.
1259         * call.c (add_function_candidate): Use make_tree_vec.
1260         (add_conv_candidate): Likewise.
1261         (build_builtin_candidate): Likewise.
1262         (add_template_candidate_real): Likewise.
1263         * class.c (resolve_address_of_overloaded_function): Likewise.
1264         * decl.c (start_function): Don't fool with the momentary obstack.
1265         (finish_function): Likewise.
1266         * init.c (expand_direct_vtbls_init): Likewise.
1267         (begin_init_stmts): Likewise.
1268         (finish_init_stmts): Likewise.
1269         * pt.c (add_to_template_args): Use make_tree_vec.
1270         (check_explicit_specialization): Likewise.
1271         (coerce_template_parms): Likewise.
1272         (lookup_template_class): Don't fool with the momentary obstack.
1273         (instantiate_class_template): Likewise.
1274         (tsubst_template_arg_vector): Use make_tree_vec.
1275         (tsubst_aggr_type): Don't fool with the momentary obstack.
1276         (tsubst_decl): Likewise.  Use make_tree_vec.
1277         (try_one_overload): Likewise.
1278         (try_class_unification):  Don't fool with the momentary obstack.
1279         (get_bindings_real): Use make_tree_vec.
1280         (set_mangled_name_for_template_decl): Likewise.
1281         * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
1282         * semantics.c (finish_expr_stmt): Likewise.
1283         (finish_do_stmt): Likewise.
1284         (finish_for_expr): Likewise.
1285         (finish_switch_cond): Likewise.
1286         (do_pushlevel): Likewise.
1287         (do_poplevel): Likewise.
1288         * tree.c (make_temp_vec): Remove.
1289         
1290         * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.  Dump
1291         CLEANUP_P for a TRY_BLOCK.
1292         * ir.texi: Document SAVE_EXPR.
1293
1294 Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
1295
1296         * call.c (build_over_call):  Check that the built-in function is
1297         of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
1298         * typeck.c (build_function_call_real): Similarly. 
1299
1300 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
1301
1302         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
1303         remember_end_note.
1304
1305 1999-10-24  Mark Mitchell  <mark@codesourcery.com>
1306
1307         * decl.c (push_overloaded_decl_1): Use pushdecl.
1308         
1309         * decl.c (auto_function): Replace #ifdef'd __inline with just
1310         plain inline.
1311         * lex.c (my_get_run_time): Likeise.
1312         (yyprint): Likewise.
1313         (identifier_type): Likewise.
1314         * method.c (start_squangling): Likewise.
1315         (end_squangling): Likewise.
1316         (icat): Likewise.
1317         (old_backref_index): Likewise.
1318         (flush_repeats): Likewise.
1319         (issue_ktype): Likewise.
1320         * parse.y (empty_parms): Likewise.
1321         * parse.c: Regenerated.
1322         
1323 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
1324
1325         * dump.c (dequeue_and_dump): Replace several uses of
1326         queue_and_dump_index with dump_child.
1327
1328 1999-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1329
1330         * expr.c: Include tm_p.h.
1331
1332 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
1333
1334         * cp-tree.h (SCOPE_PARTIAL_P): New macro.
1335         (pushlevel_temporary): Remove.
1336         (add_scope_stmt): New function.
1337         * decl.c (pushlevel_temporary): Remove.
1338         (poplevel): Use add_scope_stmt.
1339         (start_decl_1): Likewise.
1340         * semantics.c (add_scope_stmt): New function.
1341         (do_pushlevel): Use it.
1342         (do_poplevel): Use it.
1343         (expand_stmt): Check SCOPE_PARTIAL_P.
1344         
1345         * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
1346         * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
1347         * expr.c (cplus_expand_expr): Expand it.
1348         * ir.texi: Document EMPTY_CLASS_EXPR.
1349         
1350 1999-10-20  Mark Mitchell  <mark@codesourcery.com>
1351
1352         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
1353         parameters as having namespace scope.
1354
1355 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
1356
1357         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
1358         (mangling_flags): New type.
1359         (build_overload_int): Change prototype.
1360         (build_overload_value): Likewise.
1361         (numeric_output_need_bar): Improve comment.
1362         (mangle_expression): New function, broken out from ...
1363         (build_overload_int): Here.
1364         (build_overload_value): Adjust for use of mangling flags.  Don't
1365         warn about real-valued template parameters here.  Do handle
1366         complex expressions involving real-valued template parameters.
1367         (build_template_parm_names): Encase non-type template parameters
1368         in underscores, if necessary.
1369         (process_overload_item): Remove conditional on
1370         PARM_CAN_BE_ARRAY_TYPE.
1371
1372 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
1373
1374         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
1375
1376         * ir.texi: Clean up documentation of RETURN_INIT.
1377         
1378 1999-10-15  Greg McGary  <gkm@gnu.org>
1379
1380         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
1381         (lang_init): Set default for flag_bounds_check if still "unspecified".
1382
1383 1999-10-13  Andrew Haley  <aph@cygnus.com>
1384
1385         * class.c (finish_struct_1): Force alignment of non-bitfields to
1386         BITS_PER_UNIT.
1387
1388 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
1389
1390         * typeck2.c (process_init_constructor): Handle empty constructors.
1391
1392 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
1393
1394         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
1395
1396         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
1397         array error.
1398
1399 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
1400
1401         * decl.c (make_rtl_for_local_static): Don't create register RTL
1402         for addressable constants.
1403
1404 1999-10-13  Nathan Sidwell  <nathan@acm.org>
1405
1406         * cp-tree.h (build_x_va_arg): Prototype new function.
1407         * call.c (build_x_va_arg): Define it.
1408         * parse.y (unary_expr): Call build_x_va_arg.
1409         
1410         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
1411         * call.c (convert_type_from_ellipsis): Define it.
1412         * decl.c (init_decl_processing): Set lang_type_promotes_to.
1413
1414         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
1415
1416 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
1417
1418         * class.c (fixed_type_or_null): Always set *nonnull.
1419
1420 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1421
1422         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
1423         __GNUC__ and __GNUC_MINOR__.
1424
1425 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
1426
1427         * cp-tree.h (make_rtl_for_local_static): New function.  
1428         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
1429         local statics ...
1430         (make_rtl_for_local_static): Here.
1431         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
1432         
1433 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1434
1435         * method.c: Include tm_p.h.
1436
1437 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1438
1439         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
1440         * lex.c (cp_make_lake_type): Likewise.
1441         * tree.c (init_tree): Init make_lang_type_fn.
1442         
1443 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
1444
1445         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
1446         paramter.
1447         
1448         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
1449         local statics if we don't really have them.
1450
1451         * ir.texi: Improve documentation for STMT_EXPR.  Describe
1452         CLEANUP_POINT_EXPR.
1453
1454 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
1455
1456         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
1457
1458 1999-10-07  Greg McGary  <gkm@gnu.org>
1459
1460         * class.c (finish_struct_1): Use simpler method of
1461         removing elements of a singly-linked list which doesn't
1462         lose for classes without data members.
1463
1464 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
1465
1466         * friend.c (make_friend_class): Robustify.
1467
1468         * semantics.c (finish_object_call_expr): Reject calls to template
1469         types.
1470
1471 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
1472
1473         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
1474
1475         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
1476         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
1477         CLASSTYPE_VFIELD.
1478         * class.c (get_vfield_offset): Likewise.
1479         (finish_base_struct): Likewise.
1480         (modify_one_vtable): Likewise.
1481         (fixup_vtable_deltas): Likewise.
1482         (finish_struct_1): Likewise.
1483         * init.c (expand_virtual_init): Likewise.
1484         * search.c (lookup_field_1): Likewise.
1485         (expand_upcast_fixups): Likewise.
1486         * typeck.c (build_component_ref): Likewise.
1487         (build_binary_op_nodefault): Likewise.
1488         
1489         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
1490         * ir.texi: Document TYPE_VFIELD.
1491
1492 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
1493
1494         * decl.c (grokdeclarator): Only warn about non-zero arrays if
1495         !in_system_header (linux socketbits.h can give this for
1496         __cmsg_data, which is using a GNU extension).
1497
1498 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
1499
1500         * decl2.c (start_static_storage_duration_function): Push the
1501         function declaration so it ends up in namespace scope.
1502
1503         * dump.c (DUMP_CHILDREN): Remove.
1504         (DUMP_BINFO): Adjust.
1505         (struct dump_node_info): Remove dump_children_p.
1506         (queue_and_dump_type): Remove dump_children_p parameter.
1507         (queue): Don't set dump_children_p.
1508         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
1509         queue_and_dump_index.
1510         (dequeue_and_dump): Unconditionally print children.  Adjust calls
1511         to functions mentioned above.
1512         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
1513         
1514         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
1515         * dump.c (dequeue_and_dump): Dump them.
1516         
1517         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
1518
1519         * decl.c (start_function): Set current_in_charge_parm for
1520         constructors, too, where appropriate.
1521         * search.c (fixup_all_virtual_upcast_offsets): New function.
1522         (expand_indirect_vtbls_init): Use it.
1523         
1524 1999-10-04  Nathan Sidwell  <nathan@acm.org>
1525
1526         * decl2.c (grok_alignof): Don't decay lvalues.
1527         
1528         * init.c (build_new): Remove unused variable.
1529
1530 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
1531
1532         * cp-tree.h (struct language_function): Remove static_labelno.
1533         (static_labelno): Remove macro.
1534         * method.c (build_overload_nested_name): Make static_labelno
1535         static here.
1536         
1537         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
1538         to decide whether or not a function is defined.
1539
1540         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
1541         situations where make_node will do it automatically.
1542         * decl.c (grok_reference_init): Likewise.
1543         (expand_static_init): Likewise.
1544         (do_static_initialization): Likewise.
1545         * init.c (perform_member_init): Likewise.
1546         (expand_aggr_init_1): Likewise.
1547         (build_new_1): Likewise.
1548         * method.c (do_build_copy_constructor): Likewise.
1549         (do_build_assign_ref): Likewise.
1550         * search.c (expand_upcast_fixups): Likewise.
1551         * semantics.c (finish_stmt_expr): Likewise.
1552         * typeck.c (build_unary_op): Likewise.
1553         (check_return_expr): Likewise.
1554
1555 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
1556
1557         * init.c (build_vec_delete_1): Fold COND_EXPRs.
1558
1559 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
1560
1561         * cp-tree.def (VEC_INIT_EXPR): Remove.
1562         * cp-tree.h (struct stmt_tree): New type.
1563         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
1564         x_stmt_tree.
1565         (class_cache_firstobj): Remove.
1566         (struct language_function): Remove stmts_are_full_exprs_p,
1567         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
1568         (current_stmt_tree): New macro.
1569         (last_tree): Adjust.
1570         (last_expr_type): Likewise.
1571         (doing_semantic_analysis_p): Simplify.
1572         (stmts_are_full_exprs_p): Adjust.
1573         (begin_tree): Remove prototype.
1574         (end_tree): Likewise.
1575         (begin_stmt_tree): Change prototype.
1576         (finish_stmt_tree): Likewise.
1577         (building_stmt_tree): Simplify.
1578         * decl.c (mark_stmt_tree): New function.
1579         (mark_saved_scope): Use it.
1580         (start_function): Rearrange slightly to call begin_stmt_tree 
1581         earlier.
1582         (save_function_data): Tweak.
1583         (finish_function): Adjust call to finish_stmt_tree.
1584         (mark_lang_function): Use mark_stmt_tree.
1585         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
1586         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
1587         (build_vec_init): Remove creation of stand-in intializer.
1588         * pt.c (begin_tree): Remove.
1589         (end_tree): Likewise.
1590         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
1591         (begin_compound_stmt): Handle a compound-statement outside of a
1592         function.
1593         (begin_stmt_expr): Handle a statement-expression outsidef of a
1594         function.
1595         (finish_stmt_expr): Likewise.
1596         (begin_class_definition): Don't call begin_tree.
1597         (finish_inline_definitions): Don't call end_tree.
1598         (begin_stmt_tree): Take a pointer to tree, not a function as input.
1599         (finish_stmt_tree): Likewise.
1600         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
1601         (mapcar): Likewise.
1602         
1603         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
1604         * parse.c: Regenerated.
1605         
1606         * dump.c (dqueue_and_dump): Dump bitfieldness.
1607         
1608         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
1609         bitfields, rather than DECL_BIT_FIELD.
1610         * ir.texi: Document how to tell whether or not a field is a
1611         bitfield.
1612         
1613         * lex.c (make_lang_type): Fix typo in comment.
1614
1615 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
1616
1617         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
1618
1619 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
1620
1621         * pt.c (tsubst_decl): If the type of a template instantiation is
1622         bogus, so is the whole instantiation.
1623
1624 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
1625
1626         * decl.c (initialize_local_var): Handle static variables here.
1627         (cp_finish_decl): Tweak handling of function-scope static
1628         variables.
1629         * semantics.c (expand_stmt): Handle DECL_STMTs for static
1630         variables.
1631
1632         * method.c (emit_thunk): Don't crash when -fsyntax-only.
1633
1634         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
1635         global_dtor_p.  Add init_priority.
1636         (DECL_ACCESS): Adjust accordingly.
1637         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
1638         (GLOBAL_INIT_PRIORITY): Likewise.
1639         * decl.c (lang_mark_tree): Adjust accordingly.
1640         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
1641         and GLOBAL_INIT_PRIORITY.
1642         * dump.c (dequeue_and_dump): Print them.
1643         * ir.texi: Document them.
1644
1645         * decl2.c (struct priority_info_s): Remove initialization_sequence
1646         and destruction_sequence.
1647         (start_static_storage_duration_function): Return the body of the
1648         function.  Convert for function-at-a-time mode.
1649         (generate_inits_for_priority): Remove.
1650         (finish_static_storage_duration_function): Change prototype.
1651         Adjust for function-at-a-time mode.
1652         (do_static_initialization): Likewise.
1653         (do_static_destruction): Likewise.
1654         (do_static_initialization_and_destruction): Remove.
1655         (start_static_initialization_or_destruction): New function.
1656         (finish_static_initialization_or_destruction): Likewise.
1657         (get_priority_info): Don't manipulation initialization_sequence or
1658         destruction_sequence.
1659         (prune_vars_needing_no_initialization): New function.
1660         (write_out_vars): Likewise.
1661         (finish_file): Use the various new functions instead of the old.
1662         
1663 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
1664
1665         * cp-tree.h (warn_float_equal): Declare.
1666         * decl2.c (warn_float_equal): Define.
1667         (lang_decode_option): Recognize -W[no-]float-equal.
1668         * typeck.c (build_binary_op_nodefault): Conditionally warn
1669         about equality tests of floating point types.
1670
1671 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
1672
1673         Support normal type_info-based EH mechanisms with -fno-rtti.
1674         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
1675         (build_eh_type_type_ref): Likewise.
1676         (build_eh_type): Remove.
1677         (expand_throw): Call build_eh_type_type, not build_eh_type.
1678         * decl2.c (import_export_decl): Don't associate the tinfo fn with
1679         the vtable if -fno-rtti.
1680         * decl.c (init_decl_processing): Always init_rtti_processing.
1681
1682         * rtti.c (get_typeid): Don't complain about -fno-rtti.
1683
1684         * class.c (class_cache_obstack, class_obstack): Remove.
1685         (init_class_processing): Don't initialize class_obstack.
1686         (push_cache_obstack): Remove.
1687         (pushclass): Don't call it.
1688         * cp-tree.h: Remove prototype for push_cache_obstack.
1689         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
1690         (pushlevel_class): Don't push_decl_level.
1691         (poplevel_class): Don't pop_stack_level.
1692         (push_class_level_binding): Don't push_cache_obstack.
1693         (init_decl_processing): Don't intialize decl_obstack.
1694         * search.c (push_class_decls): Don't push_cache_obstack.
1695         * tree.c (list_hash_add): Put hash node on permanent_obstack.
1696         (hash_tree_cons): Don't mess with obstacks.
1697         (print_lang_statistics): Don't print stats for class_obstack and
1698         decl_obstack.
1699
1700 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
1701
1702         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
1703         * ir.texi: Document DECL_EXTERNAL.
1704
1705         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
1706         * ir.texi: Document THUNK_DECLs.
1707
1708         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
1709         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
1710         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
1711         * error.c (dump_template_bindings): Remove unused parameter.
1712         Handle multiple levels of template parameters.
1713         (dump_template_decl): Use `parms', not `args', for template
1714         parameters.  Fix thinko.
1715         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
1716         flags to dump_template_bindings.
1717         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
1718         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
1719         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
1720         (tsubst_copy): Clarify variable name.
1721         (most_general_template): Robustify.
1722         
1723 1999-09-29  Nathan Sidwell  <nathan@acm.org>
1724
1725         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
1726         to change primary template rendering.
1727
1728 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
1729
1730         * cp-tree.h (UPT_TEMPLATE): Remove.
1731         (UPT_PARMS): Likewise.
1732         (DECL_NEEDED_P): New macro.
1733         * decl2.c (finish_vtable_vardecl): Use it.
1734         (finish_objects): Don't crash with -fsyntax-only.
1735         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
1736         -fsyntax-only.
1737         * pt.c (tsubst_friend_function): Remove FIXME that talks about
1738         obstacks.
1739         (tsubst_expr): Correct handling of function try-blocks.
1740         * semantics.c: Include flags.h.
1741         (expand_body): Don't do RTL generation if -fsyntax-only.
1742         * Makefile.in (semantics.o): Depends on flags.h.
1743         
1744 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
1745
1746         * pt.c (most_general_template): Adjust declaration.
1747
1748         * cp-tree.h: (most_general_template): Declare.
1749
1750         * error.c (dump_template_value): Rename to ...
1751         (dump_template_argument): This.
1752         (dump_template_argument_list): New function.
1753         (dump_type): Use it.
1754         (dump_template_parameter): New function.
1755         (dump_template_decl): Use it.
1756         (dump_template_bindings): New function.
1757         (dump_function_decl): Use it. Pretty print function template
1758         instantiations.
1759
1760 1999-09-28  Nathan Sidwell  <nathan@acm.org>
1761
1762         * decl.c (grokdeclarator): Distinguish parameter context for
1763         diagnostics. Tidy up missing type diagnostic.
1764         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
1765
1766 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
1767
1768         * ir.texi: Improve documentation for TARGET_EXPR.
1769
1770 1999-09-27  Nathan Sidwell  <nathan@acm.org>
1771
1772         Augment stringification of trees.
1773         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
1774         (fndecl_as_string, type_as_string_real, args_as_string,
1775         code_as_string, language_as_string, parm_as_string,
1776         op_as_string, assop_as_string, cv_as_string): Remove.
1777         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
1778         (context_as_string): Declare new function.
1779         * error.c (cp_printers): Move definition.
1780         (OB_UNPUT): Remove.
1781         (OB_END_TEMPLATE_ID): Adjust.
1782         (interesting_scope_p): Remove.
1783         (dump_scope): New static function.
1784         (dump_qualifiers): Adjust prototype, reimplement.
1785         (dump_template_value): Use tree_string_flags.
1786         (dump_type_real): Move back to dump_type.
1787         (dump_type): Adjust prototype. Use tree_string_flags.
1788         (dump_aggr_type): Likewise. Use dump_template_parms.
1789         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
1790         Return pad flag.
1791         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
1792         (dump_simple_decl): Likewise.
1793         (dump_decl): Likewise. Use dump_template_decl.
1794         (dump_template_decl): New static function broken out of dump_decl.
1795         (dump_function_decl): Adjust prototype. Use tree_string_flags.
1796         (dump_parameters): Likewise. Prefix space.
1797         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
1798         (dump_function_name): Likewise. Use dump_template_parms.
1799         (dump_template_parms): New static function broken out of
1800         dump_function_name.
1801         (dump_expr_list): Adjust prototype. Use tree_string_flags.
1802         (dump_expr): Likewise.
1803         (fndecl_as_string): Removed
1804         (type_as_string_real): Removed
1805         (dump_binary_op): Adjust prototype. Use tree_string_flags.
1806         (dump_unary_op): Likewise.
1807         (type_as_string): Likewise.
1808         (expr_as_string): Likewise.
1809         (decl_as_string): Likewise.
1810         (context_as_string): New function.
1811         (lang_decl_name): Adjust.
1812         (decl_to_string): New static print callback.
1813         (expr_to_string): Likewise.
1814         (fndecl_to_string): Likewise.
1815         (code_as_string): Renamed to ...
1816         (code_to_string): ... here. Adjust.
1817         (language_as_string): Renamed to ...
1818         (language_to_string): ... here. Adjust.
1819         (parm_as_string): Renamed to ...
1820         (parm_to_string): ... here.
1821         (op_as_string): Renamed to ...
1822         (op_to_string): ... here.
1823         (assop_as_string): Renamed to ...
1824         (assop_to_string): ... here.
1825         (type_to_string): New static print callback.
1826         (args_as_string): Renamed to ...
1827         (args_to_string): ... here. Adjust.
1828         (cv_as_string): Renamed to ...
1829         (cv_to_string): ... here. Adjust.
1830         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
1831         (print_template_context): Likewise.
1832
1833 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
1834
1835         * cp-tree.h (expand_throw): Remove prototype.
1836         * except.c (expand_throw): Make it static.  Use tree-generation
1837         functions, rather than RTL-generation functions.
1838         (build_throw): Use it.
1839         * expr.c: Include except.h.
1840         (cplus_expand_expr): Don't call expand_throw here.
1841         * Makefile.in (expr.o): Depend on except.h.
1842         * ir.texi: Update documentation for THROW_EXPR.
1843         
1844         * decl.c (start_function): Set x_dont_save_pending_sizes rather
1845         than calling get_pending_sizes.
1846         * init.c (build_new): Don't save and restore
1847         immediate_size_expand; instead, assert that it has the expected
1848         value already.
1849
1850 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1851
1852         * lex.c (compiler_error): Add missing call to va_end().
1853
1854 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
1855
1856         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
1857         * ir.texi: Document RESULT_DECL and DECL_RESULT.
1858
1859         * cp-tree.h (check_return_expr): New function.
1860         * decl.c (finish_constructor_body): New function.
1861         (pushdecl): Put global friend functions in namespace binding
1862         level, not the class binding level.
1863         (finish_destructor_body): Make sure the dtor_label is always
1864         defined.  Fix typo in comment.
1865         (finish_function): Move generation of constructor-termination code
1866         to semantic-analysis time.  Move generation of implicit `main'
1867         return value to semantic-analysis time.
1868         * semantics.c (finish_return_stmt): Generate goto's to
1869         ctor_label/dtor_label here.  Use check_return_expr to do semantic
1870         analysis on the returned expression.
1871         * typeck.c (maybe_warn_about_returning_address_of_local): New
1872         function split out from c_expand_return.
1873         (check_return_expr): Likewise.
1874         (c_expand_return): Just generate the RTL for the return.
1875         
1876 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
1877
1878         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
1879         (cleanup_type): Likewise.
1880         (search_tree): Change prototype.
1881         * decl.c (local_variable_p): Adjust for new interface to
1882         search_tree.
1883         (check_default_argument): Likewise.
1884         * error.c (dump_expr): Handle INIT_EXPR.
1885         * except.c (expand_throw): Don't make cleanup_type a local static.
1886         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
1887         * init.c (build_new): Call build_new_1 directly, rather than
1888         building a NEW_EXPR.
1889         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
1890         processing file-scope initializers.
1891         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
1892         * tree.c: Include splay-tree.h
1893         (no_linkage_helper): Adjust for new interface to search_tree.
1894         (search_tree): Pass around pointers to tree nodes, rather than the
1895         nodes themselves.  Handle VEC_INIT_EXPR.
1896         (no_linkage_check): Adjust for new interface to search_tree.
1897         (mapcar): Handle VEC_INIT_EXPR.
1898         (target_remap): New variable.
1899         (bot_manip): Use it.
1900         (bot_replace): New function.
1901         (break_out_target_exprs): Use it to remap all variables used in a
1902         default argument expression.
1903         * typeck.c (build_modify_expr): Don't crash when outside a
1904         function and presented with an INIT_EXPR assignment
1905         * Makefile.in (tree.o): Depend on splay-tree.h.
1906
1907 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
1908
1909         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
1910         DECL_BUILT_IN.
1911         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
1912         callers changed.
1913         Set the builtin's DECL_BUILT_IN_CLASS.
1914
1915 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
1916
1917         * decl.c (pushdecl): Don't make local declarations of extern
1918         variables give the variable a DECL_CONTEXT for the function.
1919         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
1920         Don't accidentally make RTL for local declarations.
1921         (emit_local_var): Handle declarations with asm-specifiers here.
1922         
1923 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
1924
1925         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
1926         STMT_IS_FULL_EXPR_P.
1927
1928         * cp-tree.h (language_function): Add cannot_inline.
1929         * decl.c (start_function): Restore current_function_cannot_inline
1930         from the saved value.
1931         (save_function_data): Save current_function_cannot_inline.
1932         * decl2.c (start_objects): Change prototype.  Build the function
1933         in function-at-a-time mode.
1934         (finish_objects): Likewise.
1935         (generate_ctor_or_dtor_function): Adjust accordingly.
1936         
1937         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
1938         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
1939         Don't call expand_anon_union_decl here
1940         * semantics.c (exapnd_stmt): Call it here, instead.
1941         * typeck.c (mark_addressable): Addressed variables are implicitly
1942         used.
1943         
1944 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1945
1946         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
1947         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
1948         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
1949         * cp-tree.h: Add tree checking macros to various tree access
1950         macros. 
1951         * ptree.c (print_lang_decl): Test for function or variable
1952         before accessing template info.
1953
1954 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
1955
1956         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
1957         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
1958         * decl2.c (lang_f_options): Add -fshort-wchar.
1959         * cp-tree.h: Declare flag_short_wchar.
1960         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
1961         int' for wchar_t.
1962
1963 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1964
1965         * ir.texi: Fix formatting errors and typos.
1966
1967 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
1968
1969         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
1970
1971         * decl.c (pushdecl): Do create a binding for extern "C" functions,
1972         but not for their DECL_ASSEMBLER_NAMEs.
1973         (lookup_name_current_level): Fix formatting.
1974         (xref_tag): Likewise.
1975         * decl2.c (start_objects): Mark static constructors and
1976         destructors as used.
1977
1978 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
1979
1980         * decl.c (define_case_label): Don't crash if we're not in a switch.
1981
1982         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
1983         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
1984         for unsupported flags.
1985
1986 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
1987
1988         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
1989         Accept and warn about -fthis-is-variable.
1990
1991 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
1992
1993         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
1994         CLEANUP_STMT, and SCOPE_STMT.
1995
1996         * decl2.c (lang_decode_option): Adjust, in the wake of recent
1997         changes to option processing.
1998
1999 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2000
2001         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
2002         function pointer from pmfs with no object given.
2003         (convert_for_assignment): Do not return error when converting
2004         pmfs.
2005
2006 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
2007
2008         * lex.c (internal_filename): New variable.
2009         (INTERNAL_FILENAME): New macro.
2010         (init_parse): Allocate internal_filename and mark as root.  Use it
2011         instead of a string constant.
2012
2013 1999-09-21  Nathan Sidwell  <nathan@acm.org>
2014
2015         Reimplement dynamic cast and catch matching.
2016         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
2017         * search.c (dynamic_cast_base_recurse): New function.
2018         (get_dynamic_cast_base_type): New function for dynamic cast.
2019         * rtti.c (build_dynamic_cast_1): Determine source and target
2020         class relationship. Call __dynamic_cast_2.
2021         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
2022         (__user_type_info::dyncast): New dynamic cast dispatcher.
2023         (__user_type_info::sub_kind): New nested enumeration.
2024         (__user_type_info::contained_p): sub_kind predicate.
2025         (__user_type_info::contained_public_p): Likewise.
2026         (__user_type_info::contained_nonpublic_p): Likewise.
2027         (__user_type_info::contained_nonvirtual_p: Likewise.
2028         (__user_type_info::upcast_result): New nested struct.
2029         (__user_type_info::dyncast_result): New nested struct.
2030         (*::do_upcast): New catch function.
2031         (*::do_dyncast): New dynamic cast function.
2032         (__user_type_info::find_public_subobj): New dynamic cast
2033         helper dispatcher.
2034         (*::do_find_public_subobj): New dynamic cast helper function.
2035         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
2036         (__user_type_info::dyncast): Define dynamic cast dispatcher.
2037         (*::do_upcast): Define catch function.
2038         (*::do_dyncast): Define dynamic cast function.
2039         (*::do_find_public_subobj): Define dynamic cast helper function.
2040         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
2041         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
2042         (__dynamic_cast_2): New dynamic cast runtime.
2043
2044 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
2045
2046         * cp-tree.h (finish_stmt_expr): Change prototype.
2047         * expr.c (cplus_expand_expr): Adjust call accordingly.
2048         * init.c (finish_init_stmts): Likewise.
2049         * parse.y (primary): Likewise.
2050         * pt.c (tsubst_copy): Likewise.
2051         * semantics.c (finish_stmt_expr): Don't take two parameters.
2052         Don't remove generated BLOCKs from the block-tree.
2053
2054         Remove support for assigning to `this'.
2055         * NEWS: Note that fact.
2056         * class.c (build_vbase_path): Don't check flag_this_is_variable.
2057         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
2058         (language_function): Remove assigns_this, just_assigned_this, and
2059         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
2060         (base_init_expr): Remove.
2061         (current_vcalls_possible_p): New macro.
2062         (vtbls_set_up_p): Likewise.
2063         (emit_base_init): Change prototype.
2064         * decl.c (finish_destructor_body): New function, split out from
2065         finish_function.
2066         (current_function_assigns_this): Remove.
2067         (current_function_just_assigned_this): Likewise.
2068         (start_function): Don't set them.
2069         (finish_function): Don't check them.  Don't emit
2070         base-initialization code here.  Generate code for destructors when
2071         doing semantic analysis.
2072         (finish_stmt): Don't check current_function_just_assigned_this.
2073         * decl2.c (lang_f_options): Remove this-is-variable.
2074         (lang_decode_option): Likewise.
2075         (grokclassfn): Don't check flag_this_is_variable.
2076         * init.c (emit_base_init): Return the expression generated.
2077         (construct_virtual_bases): Don't push/pop obstacks.  Fix
2078         typo.
2079         (build_new_1): Don't check flag_this_is_variable.
2080         (get_temp_regvar): Don't set DECL_REGISTER.
2081         (build_vec_init): Don't call use_variable.
2082         * lang-options.h: Remove "-fthis-is-variable" and
2083         "-fno-this-is-variable".
2084         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
2085         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
2086         expand_expr_stmt.
2087         * semantics.c (finish_expr_stmt_real): Rename to ...
2088         (finish_expr_stmt): This.  Remove assigned_this parameter.
2089         (begin_if_stmt): Call do_pushlevel before starting the statement.
2090         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
2091         blocks.
2092         (setup_vtbl_ptr): Emit initialization code for bases and members
2093         at semantic-analysis time.  Emit code to initialize vtables in
2094         destructors here.
2095         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
2096         Don't handle CTOR_INITIALIZER any more.
2097         * typeck.c (build_modify_expr): Don't check for assignments to
2098         this.
2099         (c_expand_return): Don't suggest assigning to `this'.
2100         
2101         * Makefile.in (decl.o): Depend on RTL_H.
2102         (decl2.o): Likewise.
2103         (class.o): Likewise.
2104         (call.o): Likewise.
2105         (method.o): Likewise.
2106         (search.o): Likewise.
2107         (tree.o): Likewise.
2108         (pt.o): Likewise.
2109
2110         * decl.c (duplicate_decls): When a builtin function is redeclared
2111         as static, make sure it is mangled correctly.
2112
2113         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
2114         detail about the statement-tree.
2115         
2116 1999-09-20  Nathan Sidwell  <nathan@acm.org>
2117
2118         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
2119
2120 1999-09-20  Nick Clifton  <nickc@cygnus.com>
2121
2122         * decl2.c (lang_decode_option): Extend comment.
2123
2124 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
2125
2126         * typeck.c: Include "tm_p.h".
2127
2128 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
2129
2130         * ir.texi: New file.
2131
2132 1999-09-19  Paul Burchard <burchard@pobox.com>
2133
2134         * semantics.c (expand_stmt): Initialize return value.
2135
2136 1999-09-18  Paul Burchard <burchard@pobox.com>
2137
2138         * gxxint.texi: G++ now implements namespaces.
2139         
2140 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
2141
2142         * decl.c (pop_label): Don't warn about unused labels more than
2143         once.
2144         * semantics.c (finish_goto_stmt): Always marked used labels as
2145         used.
2146
2147         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
2148         even when the declaration is external.
2149         (cp_finish_decl): Adjust call to layout_var_decl.
2150         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
2151
2152 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
2153
2154         * typeck.c (get_member_function_from_ptrfunc): Always consider
2155         virtuality inside member pointer.
2156
2157 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
2158
2159         Turn on function-at-a-time processing.  
2160         * cp-tree.h (doing_semantic_analysis_p): New macro.
2161         (SF_DEFAULT): Define to zero, not SF_EXPAND.
2162         (start_handler_parms): Change prototype.
2163         (expand_start_catch_block): Likewise.
2164         (expand_end_catch_block): Likewise.
2165         (expand_start_eh_spec): Likewise.
2166         (expand_end_eh_spec): Declare.
2167         (finish_handler_parms): Change prototype.
2168         (begin_catch_block): Declare.
2169         (finish_handler): Change prototype.
2170         (do_pushlevel): Declare.
2171         (do_poplevel): Likewise.  
2172         * decl.c (pushlevel): Don't create
2173         binding levels when not doing semantic analysis.
2174         (poplevel): Don't pop them.
2175         (pushdecl): Assert that we are never called when not doing
2176         semantic analysis.
2177         (pushdecl_top_level): Use push_to_top_level.
2178         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
2179         label when expanding.
2180         (cp_finish_decl): Only inject for-scope variables when doing
2181         semantic analysis.  Add comments.
2182         (start_handler_parms): Return the handler parm.
2183         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
2184         already set.  Reinitialize from saved function data if available.
2185         Don't pushlevel when not doing semantic analysis.
2186         (store_parm_decls): Only generate RTL when expanding.  Only
2187         pushdecl when doing semantic analysis.  Set
2188         current_eh_spec_try_block if appropriate.
2189         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
2190         Combine common code.  Don't poplevel when not doing semantic
2191         analysis.
2192         (push_cp_function_context): Don't expand functions without an
2193         explicit call to expand_body.
2194         (mark_lang_function): Make eh_spec_try_block and
2195         x_scope_stmt_stack.  
2196         * except.c (expand_end_eh_spec): Don't
2197         declare.
2198         (process_start_catch_block): Likewise.
2199         (push_eh_cleanup): Use finish_decl_cleanup.
2200         (initialize_handler_parm): New function.
2201         (expand_start_catch_block): Use it.
2202         (expand_end_catch_block): Use tree-generation functions, not
2203         RTL-generation functions.
2204         (expand_start_eh_spec): Likewise.
2205         (expand_end_eh_spec): Likewise.
2206         (expand_exception_blocks): Simplify.
2207         (start_anon_func): Use do_pushlevel.
2208         (end_anon_func): Use do_poplvel.  Call expand_body for the
2209         function.  
2210         * expr.c (do_case): Don't call define_case_label.  
2211         * init.c (create_temporary_var): Set DECL_CONTEXT for local
2212         variables.  
2213         * method.c (emit_thunk): Call expand_body for the
2214         thunk.
2215         (sythesize_method): Likewise.  
2216         * parse.y (handler_args): Give it ttype.
2217         (eat_saved_input): Call expand_body.
2218         (base_init): Use do_pushlevel.
2219         (pending_inline): Call expand_body.
2220         (handler): Adjust calls to finish_handler_parms and
2221         finish_handler.
2222         (handler_args): Don't call expand_start_catch_block.  Return the
2223         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
2224         * parse.c: Regenerated.
2225         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
2226         * semantics.c (do_pushlevel): Give it external linkage.  Build
2227         SCOPE_STMTs.
2228         (do_poplevel): Likewise.
2229         (finish_case_label): Call define_case_label when doing semantic
2230         analysis.
2231         (finish_goto_stmt): Create RTL for labels.
2232         (finish_function_try_block): Set in_function_try_handler
2233         unconditionally.
2234         (finish_function_handler_sequence): Unset it.
2235         (finish_handler_parms): Use expand_start_catch_block even when
2236         building a statement-tree.
2237         (begin_catch_block): New function.
2238         (finish_handler): Move a little RTL-generation logic here.
2239         (finish_decl_cleanup): Allow cleanups for empty declarations.
2240         (finish_named_return_value): Don't pushdecl when not doing
2241         semantic analysis.
2242         (expand_stmt): Don't do semantic analysis for variable
2243         declarations.  Handle START_CATCH_STMT.  Call expand_label
2244         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
2245         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
2246         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
2247         RETURN_INIT and function try blocks.
2248         
2249         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
2250         x_scope_stmt_stack.  Add x_in_charge_parm.
2251         (current_eh_spec_try_block): New macro.
2252         (current_scope_stmt_stack): Likewise.
2253         (current_in_charge_parm): Likewise.
2254         * decl.c (start_function): Initialize current_in_charge_parm.
2255         (finish_function): Use current_in_charge_parm rather than looking
2256         up __in_chrg.
2257         * search.c (expand_indirect_vtbls_init): Likewise.
2258
2259         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
2260         (TRY_BLOCK): Likewise.
2261         (HANDLER): Likewise.
2262         (START_CATCH_STMT): New tree node.
2263         (SCOPE_STMT): Likewise.
2264         * cp-tree.h (SCOPE_BEGIN_P): New macro.
2265         (SCOPE_NULLIFIED_P): Likewise.
2266         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
2267         (struct lang_decl): Add saved_language_function.
2268         (DECL_PENDING_INLINE_INFO): Adjust documentation.
2269         (DECL_PENDING_INLINE_P): New macro.
2270         (TYPE_TI_ARGS): Fix typo in comment.
2271         (DECL_SAVED_TREE): Add to documentation.
2272         (DECL_SAVED_FUNCTION_DATA): New macro.
2273         (START_CATCH_TYPE): Likewise.
2274         (SCOPE_END_P): New macro.
2275         (declare_parm_level): Don't declare.
2276         * decl.c (mark_lang_function): New function, split out from
2277         mark_cp_function_context.
2278         (save_function_data): New function.
2279         (declare_parm_level): Remove.
2280         (finish_function): Use save_function_data to squirrel away
2281         important stuff for later use.
2282         (mark_cp_function_context): Use mark_function_data.
2283         (lang_mark_tree): Likewise.
2284         * lex.c (begin_definition_of_inclass_inline): Set
2285         DECL_PENDING_INLINE_P.
2286         (store_pending_inline): Clear it.
2287         * pt.c (tsubst_decl): Likewise.
2288
2289 1999-09-17  Nathan Sidwell  <nathan@acm.org>
2290
2291         * call.c (perform_implicit_conversion): Deal with error_mark_node.
2292
2293 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
2294
2295         * decl.c (warn_extern_redeclared_static): Don't get confused by
2296         static member functions.
2297         (duplicate_decls): Merge DECL_THIS_STATIC.
2298
2299         * decl.c (expand_static_init): Make sure assignments to local
2300         statics actually occur.
2301
2302 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
2303
2304         * cp-tree.h (poplevel_class): Declare.
2305         * class.c (popclass): Use poplevel_class, not poplevel.
2306         * decl.c (poplevel_class): Don't make it static.  Don't return a
2307         value.
2308         (poplevel): Don't call poplevel_class; abort in a class
2309         binding level is seen.
2310         * semantics.c (finish_translation_unit): Use pop_everything.
2311         * parse.y (member_init): Allow errors.
2312         (pending_inline): Call finish_function.
2313         * parse.c: Regenerated.
2314         * Makefile.in (CONFLICTS): Adjust.
2315
2316 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
2317         
2318         * error.c: Reduce code duplication.
2319         (dump_template_value): New function.
2320         (dump_type_real): Use it.
2321         (dump_decl): Likewise.
2322         (dump_function_name): Likewise.
2323         (dump_function_decl): Don't be too talkative about function return
2324         type variety.
2325
2326 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2327
2328         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
2329
2330         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
2331
2332 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
2333
2334         * decl2.c (finish_file): Also call check_global_declarations for
2335         the pending_statics list.
2336
2337 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
2338
2339         * lex.c (cp_pragma_implementation): Allow #pragma implementation
2340         in header files.
2341
2342 1999-09-15  Richard Henderson  <rth@cygnus.com>
2343
2344         * lex.c (mark_impl_file_chain): Follow the next chain.
2345
2346 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
2347
2348         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
2349         problems with extern "C" functions redeclared as static.
2350         (duplicate_decls): When a builtin is redeclared static, make the
2351         new function have internal linkage.
2352         
2353 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
2354
2355         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
2356         * pt.c (tsubst_copy): Likewise.
2357         * tree.c (search_tree): Likewise.
2358         (mapcar): Likewise.
2359
2360 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2361
2362         * typeck2.c (ack): Don't declare progname.
2363
2364 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
2365
2366         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
2367         filenames with ggc_alloc_string.
2368
2369 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
2370
2371         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
2372         TARGET_EXPR.
2373         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
2374         the TARGET_EXPR.
2375         * cvt.c (build_up_reference): Likewise.
2376         * tree.c (build_cplus_new): Likewise.
2377         (get_target_expr): Likewise.
2378         
2379 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
2380
2381         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
2382
2383 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
2384
2385         * cp-tree.h (build_target_expr): New function.
2386         * call.c (build_conditional_expr): Use build_target_expr.
2387         (convert_like): Likewise.
2388         (build_over_call): Likewise.
2389         * cvt.c (build_up_reference): Likewise.
2390         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
2391         (destroy_local_var): Here.
2392         (build_target_expr): New function.
2393         * tree.c (build_cplus_new): Use it.
2394         (get_target_expr): Likewise.
2395
2396 1999-09-13  Nathan Sidwell  <nathan@acm.org>
2397
2398         * typeck.c (expr_sizeof): Don't decay arrays and functions.
2399         Remove misleading comment.
2400         (build_compound_expr): Don't decay arrays.
2401
2402 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
2403
2404         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
2405         class rvalues again.
2406
2407 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2408
2409         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
2410
2411         * g++spec.c: Include gcc.h.
2412         (lang_specific_driver): Constify a char*.  Call xcalloc, not
2413         xmalloc/bzero.  All calls to the function pointer parameter now
2414         explicitly call `fatal'.
2415
2416 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
2417
2418         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
2419         * cvt.c (ocp_convert): Complete the from and destination types.
2420         Adjust warning about functions always being `true' in conditionals.
2421         * decl.c (duplicate_decls): Don't play funny games with abort.
2422         * error.c (dump_expr): Handle OVERLOADs.
2423         * spew.c (probe_obstack): Remove.
2424         * typeck.c (condition_conversion): Use perform_implicit_conversion.
2425         
2426 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
2427
2428         * cp-tree.h (auto_function, define_function): Adjust prototypes.
2429         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
2430         changed.
2431         (auto_function): Likewise, for CODE arg.
2432         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
2433         (builtin_function): ... here.
2434
2435 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
2436
2437         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
2438         (init_decl_processing): Don't set TREE_PERMANENT for the
2439         error_mark_node.
2440         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
2441         (grokdeclarator): Likewise.
2442         (grokparms): Don't check TREE_PERMANENT when building up lists.
2443         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
2444         (mark_inline_for_output): Likewise.
2445         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
2446         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
2447         * lex.c (check_newline): Don't check ggc_p; it is always one.
2448         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
2449         * spew.c (yylex): Don't copy_node or probe_obstacks for
2450         non-permanent CONSTANTs and STRINGs.
2451         * tree.c (build_cplus_array_type_1): Don't fuss with
2452         TREE_PERMANENT on ARRAY_TYPEs.
2453         
2454         * cp-tree.def (CLEANUP_STMT): New node.
2455         * cp-tree.h (language_function): Add name_declared.
2456         (current_function_name_declared): New macro.
2457         (CLEANUP_DECL): New macro.
2458         (CLEANUP_EXPR): Likewise.
2459         (emit_local_var): Likewise.
2460         (finish_decl_cleanup): New function.
2461         * cvt.c (build_up_reference): Simplify.
2462         (ocp_convert): Remove dead code.
2463         * decl.c (start_decl): Remove call to add_decl_stmt.
2464         (grok_reference_init): Adjust, to handle bindings temporaries to
2465         references.  Remove dead code.
2466         (initialize_local_var): Don't generate RTL for
2467         declarations here, or build cleanups here.  Don't fuss with
2468         obstacks.  Replace expand_start_target_temps calls with explicit
2469         setting of stms_are_full_exprs_p.
2470         (destroy_local_var): New function.
2471         (emit_local_var): Likewise.
2472         (cp_finish_decl): Use them, as appropriate.
2473         (start_function): Announce template functions.
2474         (store_parm_decls): Don't call declare_function_name here.
2475         (finish_stmt): Don't start emit base-initialization code when just
2476         building the statement-tree.
2477         * init.c (create_temporary_var): Move add_decl_stmt call ...
2478         (get_temp_regvar): Here.
2479         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
2480         cp_finish_decl would expect.  Don't call add_decl_stmt.
2481         * semantics.c (begin_compound_stmt): Call declare_function_name,
2482         if appropriate.
2483         (finish_decl_cleanup): New function.
2484         (expand_stmt): Use emit_local_var to output variables.          
2485         (expand_body): Set current_funtion_name_declared.
2486         
2487 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
2488
2489         * cp-tree.h (finish_cleanup_try_block): New function.
2490         * semantics.c (finish_cleanup_try_block): Add comment.
2491
2492 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
2493
2494         * cp-tree.h: Delete declarations for all tree nodes now moved to
2495         global_trees.
2496         * decl.c: Delete their definitions.
2497         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
2498         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
2499         provide defaults.
2500         (init_decl_processing): Call build_common_tree_nodes and
2501         build_common_tree_nodes_2 instead of building their nodes here.
2502         Don't add gc roots for them.
2503
2504 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
2505
2506         * cp-tree.h (language_function): Rename expanding_p to
2507         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
2508         (expanding_p): Adjust accordingly.
2509         (TREE_VIA_PRIVATE): Fix typo in comment.
2510         (DECL_REFERENCE_SLOT): Remove.
2511         (SET_DECL_REFERENCE_SLOT): Likewise.
2512         * decl.c (named_label_uses): Adjust. Remove chicken comment.
2513         (push_overloaded_decl): Don't truncate the chain of bindings when
2514         adding an overloaded function.
2515         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
2516         (initialize_local_var): Fix typo in comment.
2517         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
2518         * decl2.c (start_objects): Make the fact that we are expanding
2519         the generated function right away explicit.
2520         (start_static_storage_duration_function): Likewise.
2521         (finish_file): Fix typo in comment.
2522         * init.c (build_vec_init): Correct bugs in handling cleanups.
2523         * semantics.c (maybe_convert_cond): New function.
2524         (FINISH_COND): Always store the condition, even if there's
2525         a declaration.
2526         (finish_if_stmt_cond): Use maybe_convert_cond.
2527         (finish_while_stmt_cond): Likewise.
2528         (finish_do_stmt): Likewise.
2529         (finish_for_cond): Likewise.
2530         (expand_cond): Adjust.
2531         
2532         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
2533         * init.c (perform_member_init): Remove obstack machinations.
2534         (expand_cleanup_for_base): Likewise.
2535         (finish_init_stmts): Mark the statement-expression as used.
2536         * method.c (emit_thunk): Use tree-generating functions, not
2537         RTL.
2538         (do_build_copy_constructor): Likewise.
2539         (do_build_assign_ref): Likewise.
2540         (synthesize_method): Likewise.  Keep track of line numbers.
2541         * pt.c (tsubst_expr): Handle various kinds of try blocks.
2542         * semantics.c (expand_stmts): Remove.
2543         (begin_function_try_block): Set FN_TRY_BLOCK_P.
2544         (finish_function_try_block): Be careful rechaining 
2545         function try blocks.
2546         (expand_stmt): Loop through all the statements at a given level.
2547         (exapnd_body): Be careful with line-numbers here too.  Prepare for
2548         being called directly from the parser.
2549
2550         * cp-tree.h (finish_function): Adjust prototype.
2551         * decl.c (finish_function): Return the function compiled.
2552         * pt.c (instantiate_decl): Don't play games with obstacks.
2553         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
2554         (search_tree): Likewise.
2555         * typeck.c: Fix typo in comment.
2556         * typeck2.c (store_init_value): Add comment.
2557
2558         * cp-tree.h (CPTI_ATEXIT): New macro.
2559         (atexit_node): Likewise.
2560         * decl.c (destroy_local_static): New function, broken out from ...
2561         (expand_static_init): Here.
2562
2563         * rtti.c (get_tinfo_var): These should always be global
2564         (expand_si_desc): Use tree, not RTL, functions to generate code.
2565         (expand_class_desc): Likewise.
2566         (expand_ptr_desc): Likewise.
2567         (expand_attr_desc): Likewise.
2568         (expand_generic_desc): Likewise.
2569         (synthesize_tinfo_fn): Likewise.
2570
2571 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
2572
2573         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
2574         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
2575         RECHAIN_STMTS. 
2576         (RECHAIN_STMST_FROM_CHAIN): Likewise.
2577
2578         * parse.y (simple_stmt): Fix typo in last change.
2579
2580         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
2581         (STMT_IS_FULL_EXPR_P): Likewise.
2582         (STMT_LINENO_FOR_FN_P): Likewise.
2583         (prep_stmt): New function.
2584         (building_stmt_tree): Tweak for safety.
2585         * pt.c (tsubst_expr): Use prep_stmt throughout.
2586         (add_tree): Move it to semantics.c
2587         * semantics.c (add_tree): Move it here.
2588         (finish_expr_stmt_real): New function.
2589         (finish_expr_stmt): Use it.
2590         (finish_if_stmt_cond): Use FINISH_COND.
2591         (finish_while_stmt_cond): Likewise.
2592         (finish_for_cond): Likewise.
2593         (finish_stmt_tree): Tweak line-number handling.
2594         (prep_stmt): New function.
2595         (expand_stmt): Use it.
2596         
2597         * cp-tree.h (begin_switch_stmt): Adjust prototype.
2598         (finish_switch_cond): Likewise.
2599         * parse.y (simple_stmt): Adjust accordingly.
2600         * parse.c: Regenerated.
2601         * pt.c (tsubst_expr): Adjust accordingly.
2602         * semantics.c (expand_cond): New function.
2603         (FINISH_COND): New macro.
2604         (begin_switch_stmt): Build the SWITCH_STMT here.
2605         (finish_switch_stmt_cond): Not here.
2606         (expand_stmt): Adjust calls to begin_switch_stmt and
2607         finish_switch_cond.  Use expand_cond throughout.
2608
2609         * dump.c (dequeue_and_dump): Dump types for constants.
2610         Describe DECL_ARG_TYPE more intuitively.
2611         Handle ARRAY_REF.
2612
2613         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
2614         (lang_cleanup_tree): Remove.
2615         * lex.c (make_lang_type): Use ggc_alloc to allocate
2616         TYPE_LANG_SPECIFIC.
2617
2618         Reorganize per-function data.
2619         * cp-tree.h (saved_scope): Add function_decl, bindings.
2620         (language_function): Rename binding_level to bindings.
2621         (cp_function_chain): Use the current_function, not the
2622         outer_function_chain.
2623         (current_class_ptr): Make it work, even when there's no 
2624         current function.
2625         (current_class_ref): Likewise.
2626         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
2627         macros.
2628         (clear_temp_name): Remove.
2629         * decl.c (check_function_type): New function, broken out from
2630         start_function.
2631         (current_binding_level): Adjust definition.
2632         (pushlevel): Simplify.
2633         (poplevel): Don't use named_label_uses when we're outside
2634         a function scope.
2635         (mark_saved_scope): Mark function_decl and bindings.
2636         (maybe_push_to_top_level): Don't unconditionally push a new
2637         function context.  Save bindings and the current_function_decl.
2638         Don't clear named_labels.
2639         (pop_from_top_level): Pop function context if appropriate.
2640         (init_decl_processing): Set init_lang_status and free_lang_status,
2641         rather than save_lang_status and restore_lang_status.
2642         (start_function): Take SF_* flags.  Don't clear per-function data.
2643         Reorder and simplify to use new per-function data code.  Add
2644         asserts.
2645         (store_parm_decls): Don't call init_function_start here.
2646         (finish_function): Adjust for new handling of per-function data.
2647         (push_cp_function_context): Simplify.
2648         (mark_cp_function_context): Change binding_level to bindings.
2649         * decl2.c (clear_temp_name): Remove.
2650         (start_objects): Use SF flags to start_function.
2651         (start_static_storage_duration_function): Likewise.
2652         * except.c (start_anon_func): Remove redundant calls to 
2653         push_function_context_to.  Use SF flags to start function.
2654         (end_anon_func): Remove redundant call to pop_function_context
2655         from.
2656         * lex.c (reinit_parse_for_function): Don't initialize per-function 
2657         data.
2658         * method.c (emit_thunk): Clear current_function after calling
2659         assemble_end_function.  Use SF flags for start_function.
2660         (synthesize_method): Use SF flags for start_function.
2661         * parse.c: Regenerated.
2662         * parse.y (fn.defpen): Likewise.
2663         (pending_inline): Clear current_function, even if something goes
2664         wrong.
2665         * pt.c (instantiate_decl): Use SF flags to start_function.
2666         Don't save and restore expanding_p.
2667         (add_tree): Handle the case where we are outside any function.
2668         (end_tree): Likewise.
2669         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
2670         * semantics.c (begin_function_definition): Likewise.
2671         (expand_body): Likewise.
2672         
2673 1999-09-09  Nathan Sidwell  <nathan@acm.org>
2674
2675         * cp-tree.h (convert_to_void): Prototype new function.
2676         (require_complete_type_in_void): Remove prototype.
2677         * cvt.c (convert_to_void): New function.
2678         (ocp_convert): Use convert_to_void.
2679         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
2680         expressions.
2681         * typeck.c (require_complete_type_in_void): Remove function.
2682         (build_compound_expr): Use convert_to_void.
2683         (build_static_cast): Likewise.
2684         (build_c_cast): Likewise.
2685         * semantics.c (finish_expr_stmt): Do not decay full expressions.
2686         
2687         * typeck.c (build_x_compound_expr): Add FIXME.
2688
2689 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
2690
2691         * cp-tree.h (scratch_tree_cons): Remove.
2692         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
2693         and perm_tree_cons with plain tree_cons.
2694         * class.c: Likewise.
2695         * decl.c: Likewise.
2696         * decl2.c: Likewise.
2697         * except.c: Likewise.
2698         * expr.c: Likewise.
2699         * init.c: Likewise.
2700         * lex.c: Likewise.
2701         * method.c: Likewise.
2702         * parse.y: Likewise.
2703         * pt.c: Likewise.
2704         * repo.c: Likewise.
2705         * rtti.c: Likewise.
2706         * search.c: Likewise.
2707         * typeck.c: Likewise.
2708         * parse.c: Regenerated.
2709         * tree.c (build_srcloc): Simplify.
2710         
2711 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
2712
2713         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
2714         Remove next.
2715         (LANG_DECL_PERMANENT): Remove.
2716         * decl.c (duplicate_decls): Don't mess about with obstacks trying
2717         to free memory.
2718         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
2719         * lex.c (free_lang_decl_chain): Remove.
2720         (build_lang_decl): Don't use obstacks.
2721         (retrofit_lang_decl): Likewise.
2722         (copy_lang_decl): Likewise.
2723
2724         * cp-tree.h (saved_scope): Remove old_binding_level and 
2725         function_decl.  Tidy up.
2726         * decl.c (mark_saved_scope): Don't set them.
2727         (maybe_push_to_top_level): Clear memory.
2728
2729         * decl.c (layout_var_decl): Change prototype.  Don't complete
2730         types for external objects.
2731         (check_initializer): Likewise.  Tidy.
2732         (initialize_local_var): Complete types here.
2733         (cp_finish_decl): Not here.  Reorganize a little.
2734         (grokvardecl): Don't complete types here.
2735
2736         * decl.c (start_function): Clear last_dtor_insn and
2737         last_parm_cleanup_insn. 
2738         (push_cp_function_context): Just copy over a little of
2739         the old context, not all of it.
2740
2741         * cp-tree.h (copy_to_permanent): Remove.
2742         (permanent_p): Likewise.
2743         * decl.c (building_typename_type): Don't use copy_to_permanent.
2744         (start_decl): Likewise.
2745         (grok_reference_init): Likewise.
2746         (cp_finish_decl): Likewise.
2747         * init.c (build_new_1): Don't use mapcar.
2748         (build_vec_delete_1): Don't use copy_to_permanent.
2749         (build_vec_init): Likewise.
2750         * parse.y (primary): Likewise.
2751         * parse.c: Regenerated.
2752         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
2753         (lookup_template_class): Likewise.
2754         (tsubst_friend_function): Likewise.
2755         (instantiate_class_template): Likewise.
2756         (tsubst_decl): Likewise.
2757         (tsubst): Likewise.
2758         (instantiate_template): Likewise.
2759         (unify): Likewise.
2760         * rtti.c (get_tinfo_fn): Likewise.
2761         (build_dynamic_cast): Likewise.
2762         * semantics.c (finish_if_stmt_cond): Likewise.
2763         (finish_while_stmt_cond): Likewise.
2764         (finish_do_stmt): Likewise.
2765         (finish_for_cond): Likewise.
2766         (finish_for_expr): Likewise.
2767         (finish_cleanup): Likewise.
2768         (add_decl_stmt): Likewise.
2769         (finish_named_return_value): Likewise.
2770         (finish_qualified_call_expr): Likewise.
2771         * tree.c (perm_manip): Remove.
2772         (build_exception_variant): Don't use copy_to_permanent.
2773         (permanent_p): Remove.
2774         (copy_to_permament): Remove.
2775         (build_min_nt): Don't use copy_to_permanent.
2776         (build_min): Likewise.
2777         (min_tree_cons): Likewise.
2778         * typeckc.c (build_static_cast): Likewise.
2779         (build_reinterpret_cast): Likewise.
2780         (build_const_cast): Likewise.
2781         
2782 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
2783
2784         * decl.c (ggc_p): Set it to 1.
2785         (mark_saved_scope): Add prototype.
2786
2787 1999-09-07  Richard Henderson  <rth@cygnus.com>
2788
2789         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
2790         * typeck.c (self_promoting_args_p): Delete.
2791
2792 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
2793
2794         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
2795         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
2796
2797 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
2798
2799         * Makefile.in (tree.o): Depend on ggc.h.
2800         * class.c (make_method_vec): Remove.
2801         (free_method_vec): Likewise.
2802         (free_method_vecs): Remove.
2803         (add_method): Don't use them.
2804         * cp-tree.def (PTRMEM_CST): Make it longer.
2805         (TEMPLATE_PARM_INDEX): Make it shorter.
2806         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
2807         (template_parm_index): Remove RTL field.
2808         (ptrmem_cst): Add RTL field.
2809         (finish_function): Removed parameter.
2810         (process_next_inline): Change prototype.
2811         (init_cplus_unsave): Rename to init_tree.
2812         (binding_init): Remove.
2813         * decl.c (free_binding_nodes): Remove.
2814         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
2815         (pop_binding): Don't use free_binding_nodes.
2816         (free_binding_vecs): Remove.
2817         (store_bindings): Don't use them.
2818         (pop_from_top_level): Likewise.
2819         (lookup_namespace_name): Simplify.
2820         (build_typename_type): Don't use obstack_free.
2821         (unqualified_namespace_lookup): Simplify.
2822         (lookup_name_real): Simplify.
2823         (start_function): Remove comment about leaks.
2824         (finish_function): Removed nested parameter.  Call
2825         expand_end_bindings even when building_stmt_tree.
2826         Call ggc_push_context and ggc_pop_context around
2827         rest_of_compilation, if necessary.
2828         (mark_cp_function_context): Handle a NULL language-context.
2829         (lang_mark_false_label_stack): Fix typo.
2830         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
2831         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
2832         pointer to method types.
2833         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
2834         * decl2.c (finish_objects): Adjust call to finish_function.
2835         (finish_static_store_duration_function): Likewise.
2836         (do_nonmember_using_decl): Remove call to binding_init.
2837         * except.c (end_anon_func): Adjust call to finish_function.
2838         * lex.c (mark_impl_file_chain): New function.
2839         (init_parse): Call init_tree, not init_cplus_unsave.
2840         Add GC roots.
2841         (cp_pramga_interface): Use xmalloc, not permalloc.
2842         (cp_pragma_implementation): Likewise.
2843         (begin_definition_of_inclass_inline): Simplify.
2844         (process_next_inline): Adjust prototype.
2845         (do_scoped_id): Don't call binding_init.
2846         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
2847         * method.c (emit_thunk): Adjust call to finish_function.
2848         (synthesize_method): Likewise.
2849         * parse.y (%union): Add a new `pi' variant.
2850         (PRE_PARSED_FUNCTION_DECL): Use it.
2851         (fn.defpen): Likewise.
2852         (fndef): Adjust call to finish_function.
2853         * pt.c (instantiate_decl): Likewise.
2854         * rtti.c (syntheisze_tinfo_fn): Likewise.
2855         * semantics.c (expand_body): Likewise.
2856         * tree.c: Include ggc.h.
2857         (mark_list_hash): New function.
2858         (binding_init): Remove.
2859         (init_cplus_unsave): Rename to ...
2860         (init_tree): This.  Add GC roots.
2861         
2862 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
2863
2864         Get ready for garbage collection.
2865         * Makefile.in (CXX_TREE_H): Add varray.h
2866         (lex.o): Depend on ggc.h.
2867         (decl.o): Likewise.
2868         (decl2.o): Likewise.
2869         (method.o): Likewise.
2870         (search.o): Likewise.
2871         (pt.o): Likewise.
2872         (repo.o): Likewise.
2873         * class.c: Include ggc.h.
2874         (current_class_name): Remove.
2875         (current_class_type): Likewise.
2876         (current_access_specifier): Likewise.
2877         (previous_class_type): Likewise.
2878         (previous_class_values): Likewise.
2879         (class_cache_firstobj): Likewise.
2880         (current_lang_base): Likewise.
2881         (current_lang_stack): Likewise.
2882         (current_lang_stacksize): Likewise.
2883         (lang_name_c): Likewise.
2884         (lang_name_cplusplus): Likewise.
2885         (lang_name_java): Likewise.
2886         (current_lang_name): Likewise.
2887         (base_layout_decl): Likewise.
2888         (access_default_node): Likewise.
2889         (access_public_node): Likewise.
2890         (access_protected_node): Likewise.
2891         (access_private_node): Likewise.
2892         (access_default_virtual_node): Likewise.
2893         (access_public_virtual_node): Likewise.
2894         (access_protected_virtual_node): Likewise.
2895         (access_private_virtual_node): Likewise.
2896         (signed_zero_node): Likewise.
2897         (init_class_processing): Don't build base_layout_decl.
2898         (push_lang_context): Adjust now that current_lang_base is a varray.
2899         (pop_lang_context): Likewise.
2900         * cp-tree.h: Include varray.h.
2901         (cp_global_trees): Add access_default, access_public,
2902         access_protected, access_private, access_default_virtual,
2903         access_public_virtual, access_protected_virtual,
2904         access_private_virtual, ctor_identifier, delta2_identifier, 
2905         delta_identifier, dtor_identifier, in_charge_identifier,
2906         index_identifier, nelts_identifier, this_identifier,
2907         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
2908         lang_name_c, lang_name_cplusplus, lang_name_java,
2909         empty_except_spec, null, jclass, minus_one, terminate.
2910         (saved_scope): Move here from decl.c.  Define globals in terms of
2911         saved_scope: current_namespace, current_class_name,
2912         current_class_type, current_access_specifier, current_lang_stack,
2913         current_lang_base, current_lang_name, current_function_parms,
2914         current_template_parms, processing_template_decl,
2915         processing_specialization, processing_explicit_instantiation,
2916         previous_class_type, previous_class_values, class_cache_firstobj.
2917         (scope_chain): New variable.
2918         (init_pt): New function.
2919         * decl.c (current_namespace): Remove.
2920         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
2921         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
2922         (delta_identifier, delta2_identifier): Likewise.
2923         (pfn_or_delta2_identifier, tag_identifier): Likewise
2924         (vt_off_identifier, empty_except_spec, null_node): Likewise.
2925         (current_function_parms, current_lang_base): Remove.
2926         (current_lang_stack, previous_class_values): Remove.
2927         (class_binding_level): Macroize.
2928         (saved_scope): Remove.
2929         (current_saved_scope): Rename to scope_chain.
2930         (mark_saved_scope): Adjust for new scope structure.
2931         (maybe_push_to_top_level): Likewise.
2932         (pop_from_top_level): Likewise.
2933         (duplicate_decls): Adjust now that current_lang_base is a varray.
2934         (build_typename_type): Call ggc_add_tree_hash_table_root.
2935         (init_decl_processing): Call init_pt.  Call push_to_top_level to
2936         set up globals.  Add GC roots.
2937         (xref_basetypes): Adjust now that current_lang_base is a varray.
2938         * decl.h (this_identifier): Remove.
2939         (in_charge_identifier): Likewise.
2940         * decl2.c: Don't include varray.h.
2941         (current_namespace): Remove.
2942         (init_decl2): Add GC roots.
2943         * except.c (Terminate): Remove. 
2944         (init_exception_processing): Use terminate_node instead.
2945         (build_terminate_handler): Likewise.
2946         * init.c (nc_nelts_field_id): Remove.
2947         (minus_one): Likewise.
2948         (init_init_processing): Use minus_one_node and nelts_identifier
2949         instead.  Add GC roots.
2950         (jclass_node): Remove.
2951         (build_new_1): Use nelts_identifier.
2952         (build_vec_init): Likewise.
2953         (build_vec_delete): Likewise.
2954         * lex.c: Include ggc.h.
2955         (defarg_fn): Move declaration early.
2956         (defarg_parms): Likewise.
2957         (init_parse): Add GC roots.
2958         (handle_cp_pragma): Remove redundant declaration of
2959         pending_vtables.
2960         * method.c: Include ggc.h.
2961         (btypelist): Make it a varray.  All uses changed.
2962         (ktypelist): Likewise.
2963         (init_method): Add GC roots.
2964         * pt.c: Don't include varray.h.  Include ggc.h.
2965         (current_template_parms): Remove.
2966         (processing_template_decl): Likewise.
2967         (processing_specialization): Likewise.
2968         (processing_explicit_instantiation): Likewise.
2969         (init_pt): New function.
2970         * repo.c: Include ggc.h.
2971         (init_repo): Add GC roots.
2972         * search.c: Don't include varray.h.
2973         (_vptr_name): Remove.
2974         (lookup_field_1): Use vtpr_identifier instead.
2975         (expand_indirect_vtbls_init): Remove redundant declaration of
2976         in_charge_identifier.
2977         (init_search_processing): Use vptr_identifier.
2978         
2979 1999-09-05  Richard Henderson  <rth@cygnus.com>
2980             Bernd Schmidt <bernds@cygnus.co.uk>
2981             Mark Mitchell  <mark@codesourcery.com>
2982
2983         * Makefile.in (parse.o): Depend on ggc.h.
2984         (decl2.o): Depend on ggc.h.
2985         (init.o): Depend on ggc.h.
2986         * cp-tree.h (init_decl2): Declare.
2987         (cp_parse_init): Likewise.
2988         * decl.c (ggc_p): Define to zero.
2989         (mark_saved_scope): New function.
2990         (init_decl_processing): Call cp_parse_init, and cp_decl2.
2991         Register GC roots.
2992         (expand_static_init): Add GC roots.
2993         * decl2.c: Include ggc.h.
2994         (init_decl2): New function.
2995         * init.c: Include ggc.h.
2996         (init_init_processing): Add GC roots.
2997         * parse.y: Include ggc.h.
2998         (cp_parse_init): New function.
2999         
3000 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
3001
3002         * decl.c (init_decl_processing): Set mark_lang_status.
3003         (lang_mark_false_label_stack): Adjust prototype.
3004         * decl2.c (grok_function_init): Remove extraneous declaration of
3005         abort_fndecl.
3006
3007         * Make-lang.in (cc1plus): Remove dependency on GGC.
3008         * Makefile.in (OBJS): Don't mention ggc-simple.o.
3009         (OBJDEPS): Don't mention ggc-simple.o.
3010
3011         * Make-lang.in (cc1plus): Depend on $(GGC).
3012         * Makefile.in (OBJS): Add ggc-simple.o.
3013         (OBJDEPS): Likewise.
3014         * cp-tree.h (language_function): Rename members to `x_' versions;
3015         we now have x_named_labels, x_ctor_label, x_dtor_label,
3016         x_base_init_list, x_member_init_list, x_base_init_expr,
3017         x_current_class_ptr, x_current_class_ref, x_last_tree,
3018         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
3019         x_result_rtx. 
3020         (dtor_label, ctor_label, current_base_init_list,
3021         current_member_init_list, base_init_expr, current_class_ptr,
3022         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
3023         * decl.c: Include ggc.h.
3024         (last_dtor_insn): Adjust to use x_ names.
3025         (last_parm_cleanup_insn): Likewise.
3026         (original_result_rtx): Likewise.
3027         (named_labels): Likewise.
3028         (mark_binding_level): New function.
3029         (mark_cp_function_context): Likewise.
3030         (mark_false_label_stack): Likewise.
3031         (lang_mark_tree): Likewise.
3032         (lang_cleanup_tree): Likewise.
3033         
3034 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
3035
3036         * Makefile.in (CXX_TREE_H): Include function.h.
3037         (decl.o): Don't depend on function.h.
3038         (decl2.o): Likewise.
3039         (typeck.o): Likewise.
3040         (init.o): Likewise.
3041         (method.o): Likewise.
3042         * cp-tree.h: Include function.h.
3043         (cp_function): Rename to language_function.  Remove next.
3044         (cp_function_chain): Make it a macro, not a variable.
3045         (push_cp_function_context): Don't declare.
3046         (pop_cp_function_context): Likewise.
3047         * decl.c: Don't include function.h.
3048         (push_cp_function_context): Make it static.  Make it suitable for
3049         a save_lang_status callback.
3050         (pop_cp_function_context): Likewise.
3051         (maybe_push_to_top_level): Call push_function_context_to, not
3052         push_cp_function_context.
3053         (pop_from_top_level): Call pop_function_context_from, not
3054         pop_cp_function_context.
3055         (init_decl_processing):  Set save_lang_status and
3056         restore_lang_status.  Call push_function_context_to, not
3057         push_cp_function_context.
3058         (cp_function_chain): Remove.
3059         * decl2.c: Don't include function.h.
3060         * except.c: Don't include function.h.
3061         (start_anon_func): Call push_function_context_to, not
3062         push_cp_function_context.
3063         (end_anon_func):  Call pop_function_context_from, not
3064         pop_cp_function_context.
3065         * init.c: Don't include function.h.
3066         * lex.c (begin_definition_of_inclass_inline): Call
3067         push_function_context_to, not push_cp_function_context. 
3068         (process_next_inline):  Call pop_function_context_from, not
3069         pop_cp_function_context.
3070         * method.c: Don't include function.h.
3071         (synthesize_method): Call push_function_context_to, not
3072         push_cp_function_context.  Call pop_function_context_from, not
3073         pop_cp_function_context.
3074         * typeck.c: Don't include function.h.
3075         
3076         * decl.c (expand_static_init): Tweak handling of static
3077         initializations for objects without constructors.
3078
3079 1999-09-03  Nathan Sidwell  <nathan@acm.org>
3080
3081         * typeck.c (build_indirect_ref): Reject dereference of pointer to
3082         void.
3083
3084 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
3085
3086         * cp-tree.h (cp_function): Move here, from decl.c.
3087         (cp_function_chain): Declare.
3088         (dtor_label): New macro, instead of variable.
3089         (ctor_label): Likewise.
3090         (current_base_init_list): Likewise.
3091         (current_member_init_list): Likewise.
3092         (base_init_expr): Likewise.
3093         (current_class_ptr): Likewise.
3094         (current_class_ref): Likewise.
3095         (last_tree): Likewise.
3096         (last_expr_type): Likewise.
3097         (current_function_returns_value): Likewise.
3098         (current_function_returns_null): Likewise.
3099         (current_function_just_assigned_this): Likewise.
3100         (current_function_parms_stored): Likewise.
3101         (temp_name_counter): Likewise.
3102         (static_labelno): Likewise.
3103         (expanding_p): Likewise.
3104         (stmts_are_full_exprs_p): Likewise.
3105         (in_function_try_handler): Likewise.
3106         (lang_type): Remove nested type_flags.  All uses changed.
3107         * call.c (ctor_label): Remove.
3108         (dtor_label): Likewise.
3109         * class.c (current_class_ptr): Remove.
3110         (current_class_ref): Likewise.
3111         * decl.c (static_labelno): Remove.
3112         (dtor_label): Likewise.
3113         (last_dtor_insn): New macro, instead of variable.
3114         (last_parm_cleanup_insn): Likewise.
3115         (original_result_rtx): Likewise.
3116         (in_function_try_handler): Remove.
3117         (named_label_uses): New macro, instead of variable.
3118         (named_labels): Likewise.
3119         (current_function_returns_value): Remove.
3120         (current_function_returns_null): Likewise.
3121         (current_function_assigns_this): New macro, instead of variable.
3122         (current_function_just_assigned_this): Likewise.
3123         (current_binding_level): Likewise.
3124         (init_decl_processing): Call push_cp_function_context.
3125         (cp_function): Move to cp-tree.h
3126         (cp_function_chain): Make it global.
3127         (temp_name_counter): Remove.
3128         (push_cp_function_context): Simplify.
3129         (pop_cp_function_context): Likewise.
3130         * decl2.c (temp_name_counter): Remove.
3131         * init_c (current_base_init_list): Likewise.
3132         (current_member_init_list): Likewise.
3133         (base_init_expr): Likewise.
3134         * method.c (static_labelno): Likewise.
3135         * pt.c (last_tree): Likewise.
3136         * semantics.c (expanding_p): Likewise.
3137         (stmts_are_full_exprs_p): Likewise.
3138         (last_expr_type): Likewise.
3139         * typeck.c (dtor_label): Likewise.
3140         (ctor_label): Likewise.
3141         
3142 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
3143
3144         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
3145         (arg_assoc_class): Use arg_assoc_template_arg for template
3146         arguments. 
3147         (arg_assoc): Likewise.
3148         * pt.c (mangle_class_name_for_template): Allow member template
3149         template arguments.
3150
3151 1999-09-02  Nathan Sidwell  <nathan@acm.org>
3152
3153         * call.c (build_conditional_expr): Warn on enum mismatches.
3154         (convert_arg_to_ellipsis): Move non-pod check to after
3155         conversion.
3156
3157 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3158
3159         * gxx.gperf (hash, is_reserved_word): Add prototypes.
3160
3161         * init.c (build_vec_init): Initialize variable `try_block'.
3162
3163         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
3164         Likewise for bzero/memset.
3165         (token_getch, token_put_back): Add static prototypes.  Remove
3166         `inline' from the definitions.
3167         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
3168
3169 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
3170
3171         * cp-tree.h (lang_type): Move align into type_flags.
3172         (CLASSTYPE_ALIGN): Adjust accordingly.
3173         * call.c (direct_reference_binding): Remove misleading comment.
3174
3175 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3176
3177         * parse.y (language_string): Constify.
3178
3179 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3180
3181         * repo.c (getpwd): Don't prototype.
3182         * xref.c (getpwd): Likewise
3183
3184 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3185
3186         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
3187         Remove hacks for stuff which now comes from libiberty.
3188
3189 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
3190
3191         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
3192
3193 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
3194
3195         * cp-tree.h (begin_init_stmts): Declare.
3196         (finish_init_stmts): Likewise.
3197         * cvt.c (build_up_reference): Wrap the declaration of a temporary
3198         in a statement-expression so that we will see it when expanding
3199         tree structure later.
3200         * init.c (begin_init_stmts): Don't make it static.
3201         (finish_init_stmts): Likewise.
3202
3203         * cp-tree.h (start_handler_parms): New function.
3204         (expand_start_catch_block): Take only one parameter.
3205         (start_handler_parms): New function.
3206         * decl.c (start_handler_parms): Define it.
3207         * except.c (process_start_catch_block): Take only one parameter.
3208         Don't call grokdeclarator here.
3209         (expand_start_catch_block): Don't call grokdeclarator here,
3210         either.
3211         * parse.y (handler_args): Adjust call to
3212         expand_start_catch_block.  Use start_handler_parms.
3213         * pt.c (push_template_decl_real): Make permanent lists have
3214         permanent elements.
3215         (tsubst_expr): Adjust calls to expand_start_catch_block
3216         appropriately.
3217         * semantics.c (expand_stmt): Likewise.
3218         
3219 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
3220
3221         * pt.c (push_template_decl_real): Use template declaration from
3222         class type if it exists.
3223
3224 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
3225
3226         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
3227         (maybe_inject_for_scope_var): Declare it.
3228         (initialize_local_var): Likewise.
3229         * decl.c (maybe_inject_for_scope_var): Make it global.
3230         (initialize_local_var): Likewise.  Move cleanup handling here,
3231         from cp_finish_decl.
3232         (make_rtl_for_nonlocal_decl): Use
3233         push_obstacks_nochange/pop_obstacks, rather than
3234         end_temporary_allocation/resume_temporary_allocation.
3235         (cp_finish_decl): Try to complete the type of a variable when it
3236         is declared.  Move cleanup-handling to initialize_local_var.
3237         (expand_static_init): Use tree-building code, rather than
3238         RTL-building code.
3239         * decl2.c (get_temp_name): Assert non-initializedness of
3240         temporaries.
3241         * init.c (create_temporary_var): Move RTL-assigning code to ...
3242         (get_temp_regvar): Here.
3243         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
3244         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
3245         call initialize_local_var to generate initialization code.
3246         
3247 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3248
3249         * cp-tree.h (fndecl_as_string, type_as_string,
3250         type_as_string_real, args_as_string, decl_as_string,
3251         expr_as_string, code_as_string, language_as_string,
3252         parm_as_string, op_as_string, assop_as_string, cv_as_string,
3253         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
3254
3255         * errfn.c (cp_printer): Likewise.
3256
3257         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
3258         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
3259         cp_file_of, code_as_string, language_as_string, parm_as_string,
3260         op_as_string, assop_as_string, args_as_string, cv_as_string):
3261         Likewise.
3262
3263         * tree.c (lang_printable_name): Likewise.
3264
3265 1999-08-28  Richard Henderson  <rth@cygnus.com>
3266
3267         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
3268
3269 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
3270
3271         * cp-tree.h (strip_array_types): New function.
3272         * decl.c (maybe_deduce_size_from_array_init): New function, split
3273         out from cp_finish_decl.
3274         (layout_var_decl): Likewise.
3275         (maybe_commonize_var): Likewise.
3276         (maybe_inject_for_scope_var): Likewise.
3277         (initialize_local_var): Likewise.
3278         (build_cleanup_on_safe_obstack): Likewise.
3279         (check_initializer): Likewise.
3280         (make_rtl_for_nonlocal_decl): Likewise.
3281         (cp_finish_decl): Use them.
3282         * typeck.c (strip_array_types): New function.
3283         
3284         * cp-tree.def (LABEL_STMT): New tree node.
3285         * cp-tree.h (LABEL_STMT_LABEL): New macro.
3286         (shadow_label): Remove.
3287         (declare_local_label): New function.
3288         (finish_label_decl): Likewise.
3289         * decl.c (make_label_decl): New function, split out from
3290         lookup_label.
3291         (shadowed_labels): Remove.
3292         (binding_level): Add shadowed_labels.
3293         (clear_binding_level): Remove.
3294         (push_binding_level): Just bzero the new binding level.
3295         (pushlevel): Fix indentation.
3296         (pop_label): New function.
3297         (pop_labels): Likewise, split out from poplevel.
3298         (poplevel): Pop local labels.  Use pop_labels.
3299         (maybe_push_to_top_level): Don't clear shadowed_labels.
3300         (lookup_label): Use make_label_decl.
3301         (shadow_label): Remove.
3302         (declare_local_label): New function.
3303         (define_label): Simplify.
3304         (start_function): Don't clear shadowed_labels.
3305         (cp_function): Remove shadowed_labels.
3306         (push_cp_function_context): Don't save shadowed_labels.
3307         (pop_cp_function_context): Don't restore it.
3308         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
3309         * parse.y (label_decl): Use finish_label_decl.
3310         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
3311         declarations.
3312         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
3313         building_stmt_tree.
3314         (finish_label_decl): New function.
3315         (expand_stmt): Handle LABEL_STMTs and local label declarations.
3316         
3317 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
3318
3319         * decl.c (lookup_label): Build labels on the permanent obstack
3320         when building statement trees.  Don't build RTL for labels when
3321         building statement trees.
3322         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
3323         building statement trees.
3324         (finish_label_stmt): Likewise.
3325         (expand_stmt): Adjust accordingly.
3326         * pt.c (tsubst_expr); Likewise.
3327         (do_decl_instantiation): Robustify.
3328         
3329         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
3330         * tree.c (build_cplus_new): Set it.
3331         * expr.c (cplus_expand_expr): Use it.
3332         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
3333         
3334         * decl.c (store_parm_decls): Reset immediate_size_expand.
3335         (finish_function): Likewise.
3336         
3337         * tree.c (cplus_unsave_expr_now): Don't return a value.
3338
3339         * semantics.c (do_poplevel): Always initialize the return value.
3340
3341 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
3342
3343         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
3344         * tree.h (cplus_unsave_expr_now) : Same.
3345
3346 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
3347
3348         * decl.c (grokdeclarator): Amend comment.
3349         * except.c (expand_start_catch_block): Call push_template_decl for
3350         catch-block parameters.
3351         * method.c (synthesize_method): Build an empty compound statement
3352         for the body of a constructor.
3353
3354 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
3355
3356         * tree.c (cp_build_qualified_type_real): If we're asking for the
3357         same quals we already have, just return.
3358
3359 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
3360
3361         * cp-tree.def (SUBOBJECT): New tree node.
3362         * cp-tree.h (CLEANUP_P): New macro.
3363         (SUBOBJECT_CLEANUP): Likewise.
3364         (keep_next_level): Add parameter.
3365         (get_temp_regvar): Don't declare.
3366         (emit_base_init): Remove parameter.
3367         (expand_aggr_init): Rename to build_aggr_init.
3368         (expand_vec_init): Rename to build_vec_init.
3369         (do_pushlevel): Remove.
3370         (do_poplevel): Likewise.
3371         (finish_cleanup): New function.
3372         (finish_subobject): Likewise.
3373         (stmts_are_full_exprs_p): New variable.
3374         * decl.c (keep_next_level): Add parameter.
3375         (cp_finish_decl): Use build_aggr_init, not
3376         expand_aggr_init.  Use finish_expr_stmt to expand the code.
3377         (expand_static_init): Use tree-generating, not RTL-generating,
3378         functions to handle the initialization.
3379         (start_function): Remove dead code.  Always have a momentary
3380         obstack inside the function, even before hitting the first curly
3381         brace.
3382         (cplus_expand_expr_stmt): Move calls to
3383         expand_{start,end}_target_temps into semantics.c.
3384         (cp_function): Add stmts_are_full_exprs_p.
3385         (push_cp_function_context): Save it.
3386         (pop_cp_function_context): Restore it.
3387         * decl2.c (get_temp_regvar): Move to init.c.
3388         (do_static_initialization): Use build_{aggr,vec}_init.
3389         (do_static_destruction): Fix typo in comment.
3390         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
3391         * except.c (expand_throw): Use create_temporary_var.
3392         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
3393         * init.c (expand_vec_init_try_block): Remove.
3394         (expand_vec_init_catch_clause): Likewise.
3395         (get_temp_regvar): New function.
3396         (begin_init_stmts): Likewise.
3397         (finish_init_stmts): Likewise.
3398         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
3399         structure here.
3400         (emit_base_init): Likewise.  Remove unused parameter.
3401         (expand_virtual_init): Likewise.
3402         (expand_cleanup_for_base): Use finish_subobject.
3403         (expand_aggr_vbase_init_1): Simplify.
3404         (construct_virtual_bases): Use tree-generating functions to build
3405         up initialization.
3406         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
3407         (expand_default_init): Likewise.
3408         (expand_aggr_init_1): Likewise.
3409         (expand_vec_init): Rename to build_vec_init.
3410         * method.c (do_build_copy_constructor): Use tree-generating
3411         functions.  Don't call clear_last_expr.
3412         (do_build_assign_ref): Likewise.
3413         (synthesize_method): Call clear_last_expr here.
3414         * parse.y (base_init): Don't call clear_last_expr here.
3415         (nodecls): Likewise.
3416         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
3417         * semantics.c (do_pushlevel): Move to here.
3418         (do_poplevel): Likewise.
3419         (stmts_are_full_exprs_p): New variable.
3420         (finish_expr_stmt): Handle logic for temoprary cleanup here.
3421         (finish_for_stmt): Use finish_expr_stmt.
3422         (finish_cleanup): New function.
3423         (finish_function_try_block): Fix indentation.
3424         (finish_subobject): New function.
3425         (setup_vtbl_ptr): Call keep_next_level here.
3426         (finish_stmt_expr): Handle a block with no scope inside the
3427         statement-expression.
3428         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
3429         SUBOBJECT.
3430         * tree.c (search_tree): Handle INIT_EXPR.
3431         (mapcar): Likewise.
3432         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
3433         * typeck2.c (store_init_value): Change expand_aggr_init to
3434         build_aggr_init in comment.
3435         
3436 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
3437
3438         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
3439
3440 1999-08-25  Nathan Sidwell  <nathan@acm.org>
3441
3442         * decl2.c (handle_class_head): Be graceful about additional
3443         scope qualifiers. Adjust comments to reflect reality.
3444
3445 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
3446
3447         * call.c (build_conditional_expr): Fix typo.
3448         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
3449         lvalue before trying to mess with the sides.
3450
3451         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
3452
3453 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
3454
3455         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
3456
3457 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
3458
3459         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
3460         Return arbitrary pointer or NULL.
3461         (check_eh_spec): Call __throw_type_match_rtti_2.
3462         * tinfo.h (*::dcast): Return int.  Add valp parm.
3463         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
3464         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
3465         (__throw_type_match_rtti): Now just a wrapper.
3466
3467         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
3468         (init_exception_processing): Don't initialize them.
3469
3470 1999-08-23  Paul Burchard <burchard@pobox.com>
3471
3472         * decl.c (check_default_argument): Fix typo.
3473
3474 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
3475
3476         * cp-tree.def (STMT_EXPR): Fix typo in node name.
3477
3478         * dump.c (dump_next_stmt): New function.
3479         (dequeue_and_dump): Use it.
3480         
3481         * pt.c (tsubst_copy): Make sure to initialize return value for a
3482         STMT_EXPR, even when processing_template_decl.
3483         * semantics.c (finish_stmt_expr): A statement-expression whose
3484         last statement is not an expression-statement has type `void'.  
3485         
3486 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
3487
3488         * semantics.c (finish_stmt_expr): Fix typo in comment.
3489         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
3490         (mapcar): Likewise.
3491         * init.c (build_vec_delete_1): Make the children of a permanent
3492         BIND_EXPR permanent.
3493         * pt.c (register_specialization): Don't register a specialization
3494         more than once.
3495         
3496 1999-08-18  Andrew Haley  <aph@cygnus.com>
3497
3498         * method.c (process_overload_item): Call build_mangled_C9x_name ()
3499         for all integer parameter types larger than long long.
3500
3501 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
3502
3503         * pt.c (redeclare_class_template): Merge default template
3504         arguments in both directions.
3505
3506         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
3507         compiler_error message.
3508
3509 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
3510
3511         * cp-tree.h: Declare flag_use_repository.
3512         * pt.c (do_decl_instantiation): Don't complain about duplicate
3513         instantiation with -frepo.
3514         (do_type_instantiation): Likewise.
3515
3516         * pt.c (push_template_decl_real): Complain about everything
3517         that isn't a valid template.
3518
3519         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
3520         affect inlines.
3521
3522 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
3523
3524         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
3525         * decl2.c (build_expr_from_tree): Handle it.
3526         * error.c (dump_expr): Likewise.
3527         * pt.c (for_each_template_parm): Likewise.
3528         (tsubst_copy): Likewise.
3529         * tree.c (search_tree): Likewise.
3530         * semantics.c (finish_pseudo_destructor_call): Create it.
3531         
3532 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
3533
3534         * search.c (setup_class_bindings): Robustify.
3535         * typeck.c (common_type): Use same_type_p, not pointer equality,
3536         to compare types.
3537
3538         * cp-tree.h (build_lang_field_decl): Remove.
3539         * class.c (build_vtable): Replace calls to build_lang_field_decl
3540         with build_lang_decl.
3541         (prepare_fresh_vtable): Likewise.
3542         (finish_struct_1): Likewise.
3543         (init_class_processing): Likewise.
3544         * decl.c (push_using_decl): Likewise.
3545         (init_decl_processsing): Likewise.
3546         (grokvardecl): Likewise.
3547         (build_ptrmemfunc_type): Likewise.
3548         (grokdeclarator): Likewise.
3549         (build_enumerator): Likewise.
3550         * decl2.c (grok_x_components): Likewise.
3551         (do_class_using_decl): Likewise.
3552         * except.c (call_eh_info): Likewise.
3553         * init.c (init_init_processing): Likewise.
3554         * rtti.c (expand_class_decl): Likewise.
3555         * tree.c (build_base_fields): Likewise.
3556         (build_vbase_pointer_fields): Likewise.
3557         * lex.c (build_lang_decl): Build declarations on the permanent
3558         obstack if we're building statmeent trees.
3559         (retrofit_lang_decl): Handle both the full lang_decl and also the
3560         smaller lang_decl_flags here.
3561         (build_lang_field_decl): Remove.
3562         * pt.c (push_template_decl_real): Issue errors for variable
3563         declarations that are not static members.
3564
3565 1999-08-18  Richard Henderson  <rth@cygnus.com>
3566
3567         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
3568         (mapcar): Likewise.
3569
3570 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
3571
3572         * cp-tree.h (back_end_hook): New variable.
3573         * decl2.c (back_end_hook): Define it.
3574         (finish_file): If it's non-NULL, call it.
3575
3576         * decl.c (add_decl_to_level): New function.
3577         (push_local_binding): Use it.
3578         (find_binding): Fix typo in comment.
3579         (pushdecl): Use add_decl_to_level.  Put templates on the
3580         corresponding namespace-scope binding levels.
3581         * dump.c (dequeue_and_dump): Print the specializations of a
3582         template.
3583         * pt.c (push_template_decl_real): Don't push a template multiple
3584         times.
3585
3586 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
3587
3588         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
3589         (CALL_DECLARATOR_QUALS): Likewise.
3590         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
3591         * decl.c (grokdeclarator): Adjust to use them.
3592         * decl2.c (grokfield): Likewise.
3593         (reparse_absdcl_as_casts): Likewise.
3594         * lex.c (make_call_declarator): Likewise.
3595         (set_quals_and_spec): Likewise.
3596         * pt.c (tsubst): Likewise.
3597         * tree.c (mapcar): Remove special hack to handle third operand of
3598         a CALL_EXPR.
3599
3600 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
3601
3602         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
3603         * class.c (build_vtable): Use build_lang_field_decl to build the
3604         VAR_DECLs for vtables.
3605         (prepare_fresh_vtable): Likewise.
3606         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
3607         CAN_HAVE_FULL_LANG_DECL_P.
3608         (push_using_decl): Use build_lang_decl to build USING_DECLs.
3609         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
3610         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
3611         (build_lang_field_decl): Likewise.
3612         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
3613         to copy.
3614         
3615         * cp-tree.def (STMT_EXPR): New tree node.
3616         * cp-tree.h (STMT_EXPR_STMT): New macro.
3617         (store_return_init): Change prototype.
3618         (finish_named_return_value): New function.
3619         (expand_stmt): Likewise.
3620         (expand_body): Likewise.
3621         (begin_stmt_tree): Likewise.
3622         (finish_stmt_tree): Likewise.
3623         (expanding_p): New variable.
3624         (last_expr_type): Likewise.
3625         (building_stmt_tree): New macro.
3626         * decl.c (start_function): Use building_stmt_tree, not
3627         processing_template_decl, where appropriate.
3628         (store_parm_decls): Likewise.
3629         (store_return_init): Move most of the body to semantics.c.
3630         (finish_function): Use building_stmt_tree.
3631         (finish_stmt): Clear last_expr_type here.
3632         (cp_function): Add expanding_p, last_tree, last_expr_type.
3633         (push_cp_function_context): Save them.
3634         (pop_cp_function_context): Restore them.
3635         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
3636         * error.c (dump_expr): Handle STMT_EXPR.
3637         * except.c (expand_start_catch_block): Use building_stmt_tree.
3638         Use add_decl_stmt.
3639         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
3640         (do_case): Move add_tree call to semantics.c.
3641         * parse.y (return_init): Use finish_named_return_value.
3642         (for.init.statement): Use finish_expr_stmt.
3643         * parse.c: Regenerated.
3644         * pt.c (do_pushlevel): Move to semantics.c.
3645         (do_poplevel): Likewise.
3646         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
3647         (tsubst_expr): Don't expand all the way to RTL here.  Handle
3648         RETURN_INIT and CTOR_INITIALIZER.
3649         (instantiate_decl): Call expand_body after tsubst'ing into
3650         DECL_SAVED_TREE.
3651         * semantics.c (expand_stmts): New function.
3652         (expanding_p): New variable.
3653         (last_expr_type): Likewise.
3654         (finish_expr_stmt): Use building_stmt_tree.
3655         (begin_if_stmt): Likewise.
3656         (finish_if_stmt_cond): Likewise.
3657         (finish_then_clause): Likewise.
3658         (begin_else_clause): Likewise.
3659         (finish_else_clause): Likewise.
3660         (begin_while_stmt): Likewise.
3661         (finish_while_stmt_cond): Likewise.
3662         (finish_while_stmt): Likewise.
3663         (finish_do_body): Likewise.
3664         (finish_do_stmt): Likewise.
3665         (finish_return_stmt): Likewise.
3666         (begin_for_stmt): Likewise.
3667         (fnish_for_init_stmt): Likewise.
3668         (finish_for_cond): Likewise.
3669         (finish_for_expr): Likewise.
3670         (finish_for_stmt): Likewise.
3671         (finish_break_stmt): Likewise.
3672         (finish_continue_stmt): Likewise.
3673         (finish_switch_cond): Likewise.
3674         (finish_switch_stmt): Likewise.
3675         (finish_case_label): Call add_tree here if necessary.
3676         (finish_goto_statement): Use building_stmt_tree.
3677         (begin_try_block): Likewise.
3678         (begin_function_try_block): Likewise.
3679         (finish_try_block): Likewise.
3680         (finish_function_try_block): Likewise.
3681         (finish_handler_sequence): Likewise.
3682         (finish_function_handler_sequence): Likewise.
3683         (begin_handler): Likewise.
3684         (finish_handler_parms): Likewise.
3685         (finish_handler): Likewise.
3686         (begin_compound_stmt): Likewise.
3687         (finish_compound_stmt): Likewise.
3688         (finish_asm_stmt): Likewise.
3689         (finish_label_stmt): Likewise.
3690         (finish_named_return_value): New function.
3691         (setup_vtbl_ptr): Moved here from decl2.c.
3692         (do_pushlevel): Moved here from pt.c.
3693         (do_poplevel): Likewise.
3694         (begin_stmt_expr): Use building_stmt_tree.
3695         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
3696         when building_stmt_tree.
3697         (begin_stmt_tree): New function.
3698         (finish_stmt_tree): Likewise.
3699         (expand_stmt): Likewise.
3700         (expand_body): Likewise.
3701         * tree.c (build_cplus_method_type): Make sure the argument types
3702         end up on the same obstack as the METHOD_TYPE.
3703         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
3704         THROW_EXPR, STMT_EXPR.
3705         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
3706         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
3707         sorry, if an unsupported node is encountered.
3708         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
3709         (c_expand_return): Don't call add_tree here.
3710         
3711 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
3712
3713         * pt.c (check_default_tmpl_args): Don't check in local scopes.
3714         (tsubst_decl): Make sure the declaration is on a saveable
3715         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
3716         variable.
3717         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
3718         
3719 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
3720
3721         Speed up Koenig lookup.
3722         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
3723         to return namespaces we've looked at.
3724         * decl2.c (lookup_using_namespace): Likewise.
3725         (add_function): Don't call ovl_member.
3726         (lookup_arg_dependent): Initialize k.namespaces to the list of 
3727         namespaces seen in unqualified lookup.
3728         * call.c (equal_functions): Move here from tree.c.
3729         (joust): Use it to handle duplicate candidates.
3730         * tree.c (ovl_member): Use ==.
3731
3732 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
3733
3734         * cp-tree.def (DECL_STMT): Make it smaller.
3735         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
3736         (lang_decl): ... here.  Add next.
3737         (DECL_SAVED_TREE): Adjust accordingly.
3738         (DECL_IMPLICIT_TYPEDEF_P): New macro.
3739         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
3740         (DECL_STMT_DECL): Likewise.
3741         (create_implicit_typedef): New function.
3742         (maybe_push_decl): Likewise.
3743         (tsubst_default_argument): New function.
3744         (at_function_scope_p): Likewise.
3745         (add_decl_stmt): Likewise.
3746         (push_permanent_obstack): Likewise.
3747         * call.c (convert_default_arg): Use tsubst_default_argument.
3748         * class.c (add_method): Use push_permanent_obstack.
3749         (build_self_reference): Create a TEMPLATE_DECL for the
3750         self-reference, if necessary.
3751         * decl.c (pseudo_global_level_p): Only look at the current binding
3752         level.
3753         (push_binding): Use push_permanent_obstack.
3754         (create_implicit_typedef): New function.
3755         (pushtag): Use it.
3756         (duplicate_decls): Use push_permanent_obstack.
3757         (maybe_push_decl): New function.
3758         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
3759         (start_decl_1): Remove dead code.
3760         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
3761         pseudo_global_level_p.
3762         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
3763         template.
3764         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
3765         pseudo_global_level_p.
3766         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
3767         a template.
3768         (get_sentry): Use push_permanent_obstack.
3769         * dump.c (dequeue_and_dump): Enable DECL_STMT.
3770         * except.c (call_eh_info): Use push_permanent_obstack.
3771         (build_eh_type_ref): Likewise.
3772         (do_pop_exception): Likewise.
3773         (expand_eh_spec): Likewise.
3774         (alloc_eh_object): Likewise.
3775         (expand_throw): Likewise.
3776         * init.c (build_java_class_ref): Likewise.
3777         * lex.c (get_time_identifier): Likewise.
3778         (free_lang_decl_chain): Correct type.
3779         (retrofit_lang_decl): Adjust accordingly.
3780         (build_lang_field_decl): Likewise.
3781         * lex.h (free_lang_decl_chain): Likewise.
3782         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
3783         * parse.c: Regenerated.
3784         * pt.c (tsubst_default_arguments): New function.
3785         (retrieve_local_specialization): Likewise.
3786         (register_local_specialization): Likewise.
3787         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
3788         pseudo_global_level_p to determine whether or not a template is
3789         primary.
3790         (lookup_template_class): Likewise.  Use create_implicit_typedef.
3791         (instantiate_class_template): Call tsubst_default_arguments for
3792         member functions, if appropriate.
3793         (tsubst_default_argument): New function.
3794         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
3795         * search.c (at_function_scope_p): New function.
3796         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
3797         (finish_label_stmt): Likewise.
3798         (add_decl_stmt): New function.
3799         (begin_class_definition): Likewise.
3800         (finish_typeof): Likewise.
3801         * tree.c (copy_template_template_parm): Likewise.
3802         (copy_to_permanent): Likewise.
3803         (push_permanent_obstack): Define.
3804         (mark_addressable): Use it.
3805         * typeck.c (mark_addressable): Likewise.
3806         
3807 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
3808
3809         * cp-tree.h (init_cplus_unsave): New.
3810         (cplus_unsave_expr_now): New.
3811         * lex.c (init_parse): Call init_cplus_unsave.
3812         * tree.c (init_cplus_unsave): New.
3813         (cplus_unsave_expr_now): New.
3814
3815 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
3816
3817         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
3818         decl_constant_value to simplify array bounds.
3819
3820 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
3821
3822         * lang-options.h: Add -fms-extensions.
3823         * cp-tree.h: Declare flag_ms_extensions.
3824         * decl2.c: Define it.
3825         * class.c (instantiate_type): Don't complain about taking the address
3826         of a bound member function if -fms-extensions.
3827         * typeck.c (build_unary_op): Likewise.
3828         * decl.c (grokdeclarator): Or about implicit int.
3829         * init.c (resolve_offset_ref): Or about implicit '&'.
3830
3831 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
3832
3833         * cp-tree.h (minimal_parse_mode): Remove.
3834         (finish_label_stmt): New function.
3835         * decl.c (saved_scope): Remove minimal parse mode.
3836         (maybe_push_to_top_level): Don't save it.
3837         (pop_from_top_level): Don't restore it.
3838         (define_label): Split out template-handling code to semantics.c.
3839         (start_decl): Don't use minimal_parse_mode.
3840         (cp_finish_decl): Likewise.
3841         (start_function): Don't increment it.
3842         (store_return_init): Don't use it.
3843         (finish_function): Don't decrement it.
3844         * parse.y (label_colon): Use finish_label_stmt throughout.
3845         * parse.c: Regenerated.
3846         * pt.c (minimal_parse_mode): Don't define it.
3847         (tsubst_expr): Use finish_label_stmt.
3848         * semantics.c (finish_label_stmt): New function.
3849
3850         * dump.c (queue): Be careful when computing bitmasks.
3851         (dequeue_and_dump): Describe binfos as binfos, not as
3852         vectors.
3853         
3854         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
3855         throughout.     
3856         * parse.c: Regenerated.
3857         
3858         * Make-lang.in (CXX_SRCS): Remove sig.c.
3859         * Makefile.in (CXX_OBJS): Remove sig.o.
3860         (sig.o): Remove.
3861         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
3862         (CPTI_SIGNATURE_TYPE): Likewise.
3863         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
3864         (opaque_type_node): Likewise.
3865         (signature_type_node): Likewise.
3866         (sigtable_entry_type): Likewise.
3867         (flag_handle_signatures): Likewise.
3868         (lang_type): Remove is_signature, is_signature_pointer,
3869         is_signature_reference, has_opaque_typedecls,
3870         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
3871         signature_pointer_to, signature_reference_to.
3872         (IS_SIGNATURE): Remove.
3873         (SET_SIGNATURE): Remove.
3874         (CLEAR_SIGNATURE): Remove.
3875         (IS_SIGNATURE_POINTER): Remove.
3876         (IS_SIGNATURE_REFERENCE): Remove.
3877         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
3878         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
3879         (CLASSTYPE_SIGNATURE): Remove.
3880         (SIGNATURE_TYPE): Remove.
3881         (SIGNATURE_METHOD_VEC): Remove.
3882         (SIGNATURE_POINTER_TO): Remove.
3883         (SIGNATURE_REFERENCE_TO): Remove.
3884         (lang_decl_flags): Remove is_default_implementation.  Rename
3885         memfunc_pointer_to to saved_tree.
3886         (IS_DEFAULT_IMPLEMENTATION): Remove.
3887         (DECL_MEMFUNC_POINTER_TO): Remove.
3888         (DECL_MEMFUNC_POINTING_TO): Remove.
3889         (DECL_SAVED_TREE): Adjust definition.
3890         (tag_types): Remove signature_type_node.
3891         (SIGNATURE_FIELD_NAME): Remove.
3892         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
3893         (SIGNATURE_OPTR_NAME): Likewise.
3894         (SIGNATURE_SPTR_NAME): Likewise.
3895         (SIGNATURE_POINTER_NAME): Likewise.
3896         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
3897         (SIGNATURE_REFERENCE_NAME): Likewise.
3898         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
3899         (SIGTABLE_PTR_TYPE): Likewise.
3900         (SIGTABLE_NAME_FORMAT): Likewise.
3901         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
3902         (SIGTABLE_TAG_NAME): Likewise.
3903         (SIGTABLE_VB_OFF_NAME): Likewise.
3904         (SIGTABLE_VT_OFF_NAME): Likewise.
3905         (finish_base_specifiers): Change prototype.
3906         (build_signature_pointer_type): Remove.
3907         (build_signature_reference_type): Remove.
3908         (build_signature_pointer_constructor): Remove.
3909         (build_signature_method_call): Remove.
3910         (build_optr_ref): Likewise.
3911         (append_signature_fields): Likewise.
3912         (signature_error): Likewise.
3913         * call.c (build_this): Remove signature support.
3914         (build_over_call): Likewise.
3915         (build_new_method_call): Likewise.
3916         * class.c (add_implicitly_declared_members): Likewise.
3917         (finish_struct_1): Likewise.
3918         (finish_struct): Likewise.
3919         * cvt.c (cp_convert_to_pointer): Likewise.
3920         (convert_to_pointer_force): Likewise.
3921         (ocp_convert): Likewise.
3922         * decl.c (sigtable_decl_p): Remove.
3923         (init_decl_processing): Remove support for signatures.
3924         (cp_finish_decl): Likewise.
3925         (grokdeclarator): Likewise.
3926         (grokparms): Likewise.
3927         (xref_tag): Likewise.
3928         (start_function): Likewise.
3929         (start_method): Likewise.
3930         * decl2.c (finish_sigtable_vardecl): Remove.
3931         (flag_handle_signatures): Remove.
3932         (lang_f_options): Remove handle-signatures.
3933         (grokfield): Remove support for signatures.
3934         (grokbitfield): Likewise.
3935         (finish_file): Likewise.
3936         (reparse_absdcl_as_casts): Likewise.
3937         * error.c (dump_type_real): Likewise.
3938         (dump_function_decl): Likewise.
3939         * friend.c (make_friend_class): Likewise.
3940         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
3941         * hash.h: Regenerated.
3942         * init.c (build_new_1): Remove support for signatures.
3943         * lang-options.h: Remove -fhandle-signatures,
3944         -fno-handle-signatures. 
3945         * lex.c (init_parse): Remove support for signatures.
3946         (yyprint): Likewise.
3947         * lex.h (rid): Remove RID_SIGNATURE.
3948         * method.c (build_decl_overload_real): Remove support for
3949         signatures. 
3950         (hack_identifier): Likewise.
3951         * parse.y (base_class): Likewise.
3952         (base_class.1): Likewise.
3953         (access_specifier): Likewise.
3954         * search.c (lookup_member): Likewise.
3955         * semantics.c (finish_qualified_object_call_expr): Likewise.
3956         (finish_template_type_parm): Likewise.
3957         (begin_class_definition): Likewise.
3958         (finish_base_specifier): Likewise.
3959         * sig.c: Remove.
3960         * tree.c (build_cplus_method_type): Remove support for signatures.
3961         * typeck.c (require_complete_type): Likewise.
3962         (c_sizeof): Likewise.
3963         (c_alignof): Likewise.
3964         (build_object_ref): Likewise.
3965         (build_component_ref): Likewise.
3966         (build_indirect_ref): Likewise.
3967         (build_c_cast): Likewise.
3968         (build_modify_expr): Likewise.
3969         (convert_for_initialization): Likewise.
3970         * typeck2.c (signature_error): Remove.
3971         (store_init_value): Remove support for signatures.
3972         (digest_init): Likewise.
3973         (build_x_arrow): Likewise.
3974         (build_functional_cast): Likewise.
3975         * xref.c (GNU_xref_decl): Likewise.
3976         
3977 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
3978
3979         * lex.c (do_identifier): Remove unnecessary lookup of class field.
3980
3981 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
3982
3983         * decl2.c (set_decl_namespace): Do not complain about non-matching
3984         decls if processing a template.
3985
3986 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
3987
3988         * decl.c (build_ptrmemfunc_type): Handle qualified
3989         pointer-to-member types here.
3990         * tree.c (cp_build_qualified_type_real): Simplify handling here.
3991
3992 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3993
3994         * lex.c (lang_identify): Likewise.
3995
3996 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
3997
3998         * Makefile.in: Update dependencies.
3999         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
4000         NULL_RTX.
4001         * decl.c: Include "function.h"
4002         (cleanup_label, return_label): Delete declarations.
4003         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
4004         (finish_function): Rename last_parm_insn variable to
4005         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
4006         * decl2.c: Include "function.h".
4007         (rtl_expr_chain): Delete declaration.
4008         * method.c: Include "function.h"
4009         * tree.c (build_vbase_pointer_fields): Don't initialize
4010         DECL_SAVED_INSNS with NULL_RTX.
4011         * typeck.c: Include "function.h"
4012
4013 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
4014
4015         * semantics.c (begin_function_try_block, finish_function_try_block,
4016         finish_function_handler_sequence): New fns.
4017         * parse.y (function_try_block): Use them.
4018         * pt.c (instantiate_decl): Likewise.
4019
4020         * cp-tree.h: Declare in_function_try_handler.
4021         * decl.c: Define it.
4022         (start_function): Clear it.
4023         (struct cp_function, push_cp_function_context): Save it.
4024         (pop_cp_function_context): Restore it.
4025         * parse.y (function_try_block): Set and clear it.
4026         * except.c (expand_end_catch_block): Rethrow if we reach the end
4027         of a function-try-block handler in a ctor or dtor.
4028         * typeck.c (c_expand_return): Complain about returning from a
4029         function-try-block handler of a ctor.
4030
4031         * parse.y (function_try_block): Call end_protect_partials
4032         before expand_start_all_catch.
4033
4034 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
4035
4036         * decl.c (struct binding_level): Add eh_region field.
4037         (push_binding_level): Set it.
4038         (define_label): Complain about jumping into an EH block.
4039
4040         * ptree.c (print_lang_type): Print the real type of a PMF.
4041         Print what exceptions a fn type throws.
4042
4043 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4044
4045         * class.c (count_fields, add_fields_to_vec): Add static prototype.
4046
4047         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
4048         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
4049         char*.
4050
4051         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
4052         Constify a char*.
4053
4054         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
4055         char*.
4056
4057         * dump.c (queue_and_dump_index, dump_int, dump_string,
4058         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
4059         a char*.
4060         (dump_stmt): Add static prototype.
4061
4062         * errfn.c (cp_thing): Constify a char*.
4063
4064         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
4065         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
4066         dump_expr): Constify a char*.
4067
4068         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
4069         read_line_number): Add static prototype.
4070         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
4071         (real_yylex): Move label `letter' into the scope where it is used.
4072
4073         * method.c (build_mangled_template_parm_index, build_overload_int,
4074         build_decl_overload_real, get_id_2): Constify a char*.
4075
4076         * search.c (check_final_overrider): Make static.
4077
4078         * typeck.c (composite_pointer_type): Constify a char*.
4079
4080 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
4081
4082         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
4083         we're looking at a class.
4084
4085         * decl.c (lookup_name_real): Set the complain flag if we're
4086         looking for a namespace member.
4087
4088         * lex.c (real_yylex): We can have a number with no digits.
4089
4090         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
4091
4092         * search.c (binfo_from_vbase): New fn.
4093         * cp-tree.h: Declare it.
4094         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
4095         from pointer to member of virtual base.  
4096         * typeck.c (get_delta_difference): Likewise.
4097
4098 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
4099
4100         * pt.c (tsubst): Use build_index_type to build in-template array
4101         index type.  Fixes g++.oliva/dwarf1.C.
4102         * decl.c (grokdeclarator): Likewise, just for consistency, as it
4103         doesn't seem to trigger the bug without it.
4104
4105 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
4106
4107         * typeck2.c (add_exception_specifier): Use complete_type.
4108
4109 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
4110
4111         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
4112         (dump_binary_op): Bulletproof.
4113         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
4114         * tree.c (search_tree): Don't enumerate all the nodes of classes
4115         `1', `2', and `<'; handle them generically.  Don't be sorry about
4116         "unrecognized tree codes"; just abort.
4117         (no_linkage_check): Don't do linkage checks for templates.
4118         
4119         * tree.c (cp_build_qualified_type_real): Handle
4120         pointer-to-member-function types correctly.
4121
4122 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
4123
4124         * decl.c (pushdecl): Only give an error for shadowing a parm 
4125         from *this* function.
4126
4127 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
4128
4129         * typeck2.c: Update URLs and mail addresses.
4130
4131 1999-08-04  Nathan Sidwell  <nathan@acm.org>
4132
4133         * cp-tree.h (empty_except_spec): New global var.
4134         (compexcepttypes): Remove prototype.
4135         (comp_except_specs): Prototype new global function.
4136         (add_exception_specifier): Prototype new global function.
4137         * decl.c (empty_except_spec): Define new global var.
4138         (duplicate_decls): Use comp_except_specs, reword error message.
4139         (init_decl_processing): Initialize empty_except_spec.
4140         Adjust build_exception_variant calls.
4141         * parse.y (exception_specification_opt): Use empty_except_spec.
4142         (ansi_raise_identifier): Call check_for_new_type.
4143         (ansi_raise_identifiers): Use add_exception_specifier.
4144         * pt.c (tsubst): Use add_exception_specifier to build exception
4145         specifier.
4146         * search.c (check_final_overrider): New static function, broken
4147         out of get_matching_virtual. Check throw specifiers, reword
4148         diagnostics.
4149         (get_matching_virtual): Use check_final_overrider.
4150         * tree.c (build_exception_variant): Use comp_except_specs.
4151         * typeck.c (compexcepttypes): Remove.
4152         (comp_except_types): New static function, helper for
4153         comp_except_specs. Compare two types as exception specifiers.
4154         (comp_except_specs): New global function, compare two exception
4155         specifiers.
4156         (comptypes): Adjust for comp_except_specs.
4157         * typeck2.c (add_exception_specifier): New global function.
4158         
4159         * class.c (check_for_override): Reword error message.
4160
4161 1999-08-03  Nathan Sidwell  <nathan@acm.org>
4162
4163         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
4164         * cp-tree.h (struct lang_type): Added non_pod_class flag.
4165         (CLASSTYPE_NON_POD_P): New macro to access it.
4166         * class.c (finish_struct_1): Determine non-PODness.
4167         Check for arrays of pointers (-Weffc++).
4168         Remove array inspection duplicated code.
4169         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
4170         Use CLASSTYPE_NON_POD_P.
4171
4172 1999-08-03  Nathan Sidwell  <nathan@acm.org>
4173
4174         * class.c (duplicate_tag_error): Preserve template information.
4175
4176 1999-08-03  Nathan Sidwell  <nathan@acm.org>
4177
4178         * decl.c (start_enum): Show location of previous definition.
4179         * parse.y (enumlist_opt): New reduction.
4180         (structsp): Simplify enum rules to use enumlist_opt.
4181
4182 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
4183
4184         * lex.c (yyprint): Handle PFUNCNAME.
4185
4186         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
4187         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
4188
4189 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
4190
4191         * decl.c (start_decl): Set attributes before duplicate_decls call.
4192
4193 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
4194
4195         * Make-lang.in (CXX_SRCS): Add dump.c.
4196         * Makefile.in (CXX_OBJS): Add dump.o.
4197         (dump.o): New target.
4198         * cp-tree.h (DECL_CONV_FN_P): Document.
4199         (DECL_OVERLOADED_OPERATOR_P): New function.
4200         (TYPE_PTRMEM_CLASS_TYPE): New macro.
4201         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
4202         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
4203         (ASM_VOLATILE_P): New macro.
4204         (STMT_LINENO): Likewise.
4205         (cp_namespace_decls): New function.
4206         (dump_node_to_file): New function.
4207         * decl.c (cp_namespace_decls): New function.
4208         (walk_namespaces_r): Use it.
4209         (wrapup_globals_for_namespace): Likewise.
4210         * decl2.c (flag_dump_translation_unit): New variable.
4211         (lang_decode_option): Handle -fdump-translation-unit.
4212         (finish_file): If flag_dump_translation_unit is set, dump the
4213         translation unit.
4214         * dump.c: New file.
4215         * lang-options.h: Add -fdump-translation-unit.
4216         * pt.c (tsubst_template_parms): Robustify.
4217         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
4218         (tsubst_expr): Use STMT_LINENO.
4219         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
4220         for invalid cv-qualifiers even while building templates.
4221         
4222 1999-08-02  Richard Henderson  <rth@cygnus.com>
4223
4224         * call.c: Include defaults.h instead of expr.h.
4225         * decl.c: Likewise.
4226         * pt.c: Likewise.
4227         * typeck.c: Include defaults.h.
4228
4229 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
4230
4231         * lex.c (errorcount, sorrycount): Don't declare.
4232         * repo.c (errorcount, sorrycount): Likewise.
4233         * typeck2.c (errorcount, sorrycount): Likewise.
4234
4235 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
4236
4237         * call.c (convert_default_arg, build_over_call): Change all uses of
4238         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
4239         Ensure expr.h is included.
4240         * decl.c (grokparams): Ditto.
4241         * pt.c (tsubst_decl): Ditto.
4242         * typeck.c (convert_arguments): Ditto.
4243
4244 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
4245
4246         * class.c (mark_overriders): Fix order of args to overrides.
4247         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
4248         functions with the same name.
4249
4250 1999-08-02  Richard Henderson  <rth@cygnus.com>
4251
4252         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
4253
4254 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
4255
4256         * call.c (build_conditional_expr): Fix typo in comment.
4257
4258 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
4259
4260         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
4261         case_stack; use in_control_zone_p.
4262         * typeck.c (c_expand_return): Likewise.
4263
4264 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
4265
4266         * except.c (catch_clauses): Delete declaration.
4267
4268 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
4269
4270         * call.c (build_conditional_expr): Call convert_from_reference to
4271         avoid reference/non-reference type confusion.  Fix typo.
4272
4273 1999-07-30  Richard Henderson  <rth@cygnus.com>
4274
4275         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
4276         * cp-tree.h (initializer_constant_valid_p): Remove.
4277
4278 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
4279
4280         * call.c (conditional_conversion): Don't build BASE_CONVs for
4281         conversions between things that have the same type.
4282         (build_conditional_expr): Tweak.
4283         (convert_like): Some BASE_CONVs really do require the generation
4284         of code.
4285         
4286         * init.c (perform_member_init): Don't go through build_modify_expr
4287         for simple initializations.
4288
4289 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
4290
4291         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
4292         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
4293         virtual functions and MI.  Simplify.
4294
4295         * method.c: Remove prototype for largest_union_member.
4296         * pt.c (determine_specialization): Fix uninitialized warning.
4297         * lex.c (real_yylex): Likewise.
4298
4299 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
4300
4301         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
4302         here too.
4303
4304         * cp-tree.h (BINFO_VIRTUALS): Document new format.
4305         * class.c (modify_one_vtable): Change prototype accordingly.
4306         (modify_all_vtables): Likewise.
4307         (modify_all_direct_vtables): Likewise.
4308         (modify_all_indirect_vtables): Likewise.
4309         (build_vtable_entry_for_fn): New function.
4310         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
4311         (modify_vtable_entry): Likewise.
4312         (add_virtual_function): Likewise.
4313         (build_vtbl_initializer): New function.
4314         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
4315         (fixup_vtable_deltas1): Likewise.
4316         (fixup_vtable_deltas): Likewise.
4317         (override_one_vtable): Likewise.
4318         (finish_struct_1): Likewise.
4319
4320         * error.c (dump_expr): Likewise.
4321         * search.c (get_abstract_virtuals_1): Likewise.
4322         (get_abstract_virtuals): Likewise.
4323         (expand_upcast_fixups): Likewise.
4324         * tree.c (debug_binfo): Likewise.
4325         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
4326         __pure_virtual here.
4327         
4328 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
4329
4330         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
4331         as per 1999-07-26 change.
4332
4333         * typeck.c (c_sizeof): Don't allow non-static data members.
4334         (expr_sizeof): Likewise.
4335
4336 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
4337
4338         * input.c (feed_input): Only touch lineno and input_filename
4339         if !USE_CPPLIB.  Save the old values before setting the new ones.
4340
4341         * input.c (feed_input): Add file, line parms.
4342         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
4343         (real_yylex): Check linemode before input_redirected().
4344
4345         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
4346         from op new to warning.
4347
4348 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
4349
4350         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
4351         * call.c: All uses changed.
4352         * typeck.c: Likewise.
4353
4354 1999-07-26  Nathan Sidwell  <nathan@acm.org>
4355
4356         * exception.cc (__cplus_type_matcher): Match __eh_matcher
4357         prototype.
4358
4359 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
4360
4361         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
4362         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
4363         (strip_top_quals): Declare.
4364         (ncp_convert): Likewise.
4365         (type_after_usual_arithmetic_converions): Likewise.
4366         (composite_pointer_type): Likewise.
4367         * call.c (strip_top_quals): Don't make it static.
4368         (promoted_arithmetic_type_p): New function.
4369         (conditional_conversion): Likewise.
4370         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
4371         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
4372         for converting a type to itself.
4373         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
4374         (implicit_conversion): Make sure the from and to types are
4375         complete.
4376         (add_builtin_candidate): Correct handling of ?: operator.
4377         (add_builtin_candidates): Improve documentation.
4378         (build_conditional_expr): New function.
4379         (can_convert): Implement in terms of can_convert_arg.
4380         (ncp_convert): New function.
4381         * typeck.c (type_after_usual_arithmetic_conversions): New
4382         function, split out from common_type.
4383         (composite_pointer_type): New function, split out from
4384         build_conditional_expr.
4385         (common_type): Use type_after_usual_arithmetic_conversions.
4386         Remove redundant attribute merging.
4387         (comptypes): Tidy.  Handle COMPLEX_TYPE.
4388         (build_binary_op_nodefault): Use null_ptr_cst_p.
4389         (build_conditional_expr): Remove.
4390         (convert_for_assignment): Use new conversion functions.
4391         
4392         * cp-tree.h (abstract_virtuals_error): Change declaration.
4393         * typeck2.c (abstract_virtuals_error): Check to see if an error
4394         ocurred, and return a boolean value accordingly.
4395         (build_functional_cast): Adjust accordingly.
4396         * class.c (finish_struct_1): Likewise.
4397         * cvt.c (ocp_convert): Likewise.
4398         * decl.c (cp_finish_decl): Likewise.
4399         (grokparams): Likewise.
4400         (grok_op_properties): Likewise.
4401         (start_function): Likewise.
4402         * init.c (build_new_1): Likewise.
4403
4404         * pt.c (unify): Don't get confused by pointers-to-member functions.
4405
4406         * search.c (build_cplus_new): Robustify.
4407         
4408 1999-07-24  Richard Henderson  <rth@cygnus.com>
4409
4410         * gxx.gperf (__builtin_va_arg): New.
4411         * parse.y (VA_ARG): New token.
4412         (unary_expr): Recognize it.
4413
4414 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
4415
4416         * g++FAQ.texi: Deleted per Joe Buck's request.
4417         * Makefile.in: Corresponding changes.
4418
4419 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
4420
4421         * lex.c: Sync with C frontend.
4422         (whitespace_cr): New fn.
4423         (skip_white_space): Use it.
4424         (init_parse): Reorder.
4425         (yyprint): Support CONSTANT.
4426         (pragma_getc, pragma_ungetc): Bring back.
4427         (read_line_number): Change in_system_header directly.
4428         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
4429         (parse_float): Update to C version.
4430         (yylex): Handle '$' under the letter case.
4431         Remove looking_for_typename handling.
4432         Support hex floating point constants.
4433         Follow C's lead for choosing type of integer constants.
4434         Rearrange stuff to match C frontend.
4435         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
4436         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
4437
4438 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
4439
4440         * call.c (reference_binding): Tweak.
4441         (mayble_handle_implicit_object): Use direct_reference_binding to
4442         create the right implicit conversion sequence.
4443
4444 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
4445
4446         * pt.c (convert_nontype_argument): Don't call decl_constant_value
4447         if we're converting to a reference type.
4448
4449         * call.c (NEED_TEMPORARY_P): New macro.
4450         (standard_conversion): Set it, for derived-to-base conversions.
4451         (reference_related_p): New function.
4452         (reference_compatible_p): Likewise.
4453         (convert_class_to_reference): Likewise.
4454         (direct_reference_binding): Likewise.
4455         (reference_binding): Rework for standards-compliance.
4456         (convert_like): Adjust accordingly.
4457         (maybe_handle_ref_bind): Simplify; the right conversion sequences
4458         are now built up in reference_binding.
4459         (initialize_reference): New function.
4460         * cp-tree.h (ICS_USER_FLAG): Document.
4461         (ICS_THIS_FLAG): Likewise.
4462         (ICS_BAD_FLAG): Likewise.
4463         (NEED_TEMPORARY_P): Likewise.
4464         (cp_lvalue_kind): New type.
4465         (real_lvalue_p): Return it.
4466         * error.c (dump_expr): Provide more accurate representation for
4467         AGGR_INIT_EXPRs.
4468         * init.c (expand_default_init): Do not try to perform implicit
4469         conversions for a brace-enclosed initializer.
4470         * search.c (lookup_conversions): Document.
4471         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
4472         appropriately.
4473         (real_lvalue_p): Adjust accordingly.
4474         (lvalue_p): Likewise.
4475         (build_cplus_new): Don't allow the creation of an abstract class.
4476         * typeck.c (convert_for_initialization): Use initialize_reference.
4477         
4478 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
4479
4480         * lex.c (real_yylex) : Correct the test for overflow when lexing
4481         integer literals.
4482
4483 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
4484
4485         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
4486         not DECL_BUILT_IN, to determine if a function is internally declared.
4487         (duplicate_decls): Likewise.  Improve handling of builtins.
4488         (push_overloaded_decl): Remove special handling of builtins.
4489
4490         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
4491
4492         * decl.c (grokdeclarator): Pull out decl_constant_value in
4493         templates, too.
4494
4495         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
4496         * cp-tree.h, pt.c, semantics.c: Adjust.
4497         * method.c (largest_union_member): Remove.
4498
4499         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
4500
4501         * lex.c (token_getch, token_put_back): New fns.
4502         (real_yylex): Use them.
4503
4504         * lex.c (lang_init): Generalize.
4505         (lang_init_options): Tell cpplib this is C++.
4506         (nextchar): Remove.  Replace uses with put_back.
4507         (skip_white_space): Handle linemode here.  Optimize for cpplib.
4508         (extend_token_buffer_to): New fn.
4509         (extend_token_buffer): Use it.
4510         (read_line_number, check_newline): Just deal with tokens.
4511         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
4512         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
4513         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
4514         * parse.y (PAREN_STAR_PAREN): Remove.
4515         * input.c: Don't use the putback machinery with cpplib.
4516         (sub_getch): Fold back into getch.
4517         (getch): Don't handle linemode here.
4518         (feed_input): Unget any text in the token buffer.
4519
4520         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
4521         nextyychar, nextyylval): Remove.
4522
4523 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
4524             Jason Merrill  <jason@yorick.cygnus.com>
4525
4526         * lex.c (indent_level): New variable.
4527         (init_parse): Set cpp_token to CPP_DIRECTIVE.
4528         (consume_string): Make this smart about USE_CPPLIB.
4529         (yyungetc): Use put_back function.
4530         (pragma_getc, pragma_ungetc): Functions deleted.
4531         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
4532         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
4533         pragma_ungetc.
4534         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
4535         Also, clean up cases where we redundantly set token_buffer[0].
4536         (read_line_number): New fn.
4537         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
4538         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
4539         (sub_getch): Conditionalize out code that's not appropriate if
4540         USE_CPPLIB.
4541         (put_back): Rewrite in case USE_CPPLIB is defined.
4542         (input_redirected): Ditto.
4543
4544 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
4545
4546         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
4547         c_global_trees and accessor macros defined in c-common.h.
4548         (cp_tree_index): New enumeration.
4549         (cp_global_trees): Declare new array.  Add accessor macros for it, and
4550         delete declarations of tree nodes replaced by it.
4551         (builtin_function): Delete macro, add declaration for new function.
4552         Include c-common.h.
4553         * decl.c: Delete definitions for tree nodes that were replaced by
4554         cp_global_trees and c_global_trees.
4555         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
4556         to generate the common builtins here.
4557         (builtin_function): New function.
4558         * decl2.c (abort_fndecl): Delete declaration.
4559         * except.c (expand_builtin_return_address): Delete declaration.
4560         (builtin_return_address_fndecl): Delete variable.
4561         (const_ptr_type_node): Delete declaration.
4562         * lex.c (cons_up_default_function): Delete declaration of
4563         void_list_node.
4564         * parse.y (void_list_node): Delete declaration.
4565         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
4566         Delete variables.
4567         (const_string_type_node): Delete declaration.
4568         * search.c (abort_fndecl): Delete declaration.
4569         * Makefile.in: Update dependencies.
4570
4571 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
4572
4573         * pt.c (check_default_tmpl_args): Move test for missing default
4574         arguments here, from ...
4575         (end_template_parm_list): Here.
4576
4577 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
4578
4579         * decl.c (lookup_nested_type): Remove.
4580         (pushtag): Don't call it.
4581
4582 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
4583
4584         * Makefile.in (INTERFACE): Bump to 2.
4585
4586 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
4587         
4588         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
4589         instructions to gcc.gnu.org.  Removed e-mail address.
4590
4591 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
4592
4593         * pt.c (determine_specialization): Tighten error-checking.
4594         (end_template_parm_list): Likewise.
4595
4596 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
4597
4598         * pt.c (check_default_tmpl_args): Handle friends defined in the
4599         class just like member functions defined in the class.
4600
4601 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
4602             Jason Merrill  <jason@yorick.cygnus.com>
4603
4604         * cp-tree.h (struct lang_decl): Added field for storing sorted
4605         FIELD_DECLs (used in TYPE_DECLs).
4606         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
4607         (DECL_SORTED_FIELDS): New macro.
4608         * class.c (method_name_cmp): New function.
4609         (finish_struct_methods): Modified to support sorting and searching
4610         methods.
4611         (finish_struct_anon): Changed code in inner loop to use ELT rather 
4612         than UELT (which required an extra indirection for every reference).
4613         (field_decl_cmp): New function to support sorting FIELD_DECLs.
4614         (finish_struct_1): Sort fields.
4615         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
4616         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
4617         Also, switch to using array indexing rather than a changing pointer.
4618         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
4619         DECL_SORTED_FIELDS.
4620
4621 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
4622
4623         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
4624         casts in system headers or extern "C" blocks.
4625
4626         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
4627         errors to pedwarn.
4628
4629 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
4630
4631         * decl2.c (write_virtuals): Deleted declaration.
4632         * cp-tree.h (write_virtuals): Deleted extern declaration.
4633         * class.c (finish_struct_1): Removed #if 0'd code that mentions
4634         write_virtuals.
4635         * semantics.c (begin_class_definition): Rewrite code to not depend
4636         on write_virtuals.
4637
4638         * lex.c (cp_pragma_interface): New function.
4639         (cp_pragma_implementation): Likewise.
4640         (handle_cp_pragma): Call them.
4641
4642         * typeck.c (comptypes): Simplify C code in look_hard.
4643
4644         * xref.c (PALLOC): Use xcalloc, not calloc.
4645         (SALLOC): Use xmalloc, not malloc.
4646
4647         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
4648
4649         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
4650         is NO_DEBUG.
4651
4652         * decl.c (duplicate_decls): If a redeclaration doesn't match the
4653         initial declaration, then don't save the inline info and by all
4654         means don't mark the function as a builtin function.
4655
4656         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
4657         CURRENT_CLASS_TYPE is 0.
4658
4659         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
4660         NULL_TREE.
4661
4662         * ptree.c (print_lang_type): Added vtable-needs-writing.
4663
4664 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
4665
4666         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
4667
4668 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
4669
4670         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
4671         Merged into c-common.
4672
4673 1999-07-05  Dave Brolley  <brolley@cygnus.com>
4674
4675         * lex.c (errorcount): Declare it.
4676         (finish_parse): Update errorcount for when using CPPLIB.
4677
4678 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
4679
4680         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
4681         parameters.
4682         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
4683         * decl.c (push_class_binding): Use it.
4684         (lookup_name_real): Likewise.
4685
4686 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
4687
4688         * cp-tree.h (widest_integer_literal_type_node,
4689         widest_unsigned_literal_type) : New.
4690         * decl.c (widest_integer_literal_type_node,
4691         widest_unsigned_literal_type) : New.
4692         (init_decl_processing): Handle/use the two new types.
4693         * lex.c (real_yylex): Same.
4694         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
4695         Same. 
4696
4697 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
4698
4699         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
4700         to anonymous cv-qualified types.
4701
4702 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
4703
4704         * lex.c (real_yylex) : Change integer literal overflow handling to
4705         be like c-lex.c.
4706
4707         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
4708
4709 1999-06-28  Richard Henderson  <rth@cygnus.com>
4710
4711         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
4712
4713 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
4714
4715         * error.c (dump_type_real): Handle TREE_LIST again.
4716
4717         * typeck.c (comp_target_parms): Don't complain about 
4718         converting from () to (...) if !flag_strict_prototype.
4719
4720         * decl.c (grokdeclarator): Update the names of all variants when
4721         de-anonymizing.
4722
4723 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
4724
4725         * init.c (expand_aggr_vbase_init): Rename to
4726         construct_virtual_bases.  Conditionalize construction here, 
4727         rather than ...
4728         (emit_base_init): Here.
4729
4730 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
4731
4732         * semantics.c (finish_asm_statement): Apply decay conversions to
4733         input operands.
4734
4735         * decl.c (expand_static_init): When building an anonymous function
4736         for use with atexit, compute its body before and after entering
4737         the function.
4738
4739         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
4740         EXIT_EXPR.
4741         
4742 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
4743
4744         * init.c (expand_aggr_vbase_init): Add flag parameter.
4745         (build_partial_cleanup_for): Remove, inlining into ..
4746         (expand_cleanup_for_base): ... here.  Take flag parameter.
4747         (emit_base_init): Pass the in_chrg parameter to
4748         emit_aggr_vbase_init. 
4749         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
4750         
4751 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
4752
4753         * decl2.c (import_export_decl): Use same_type_p, rather than
4754         relying on pointer-equality for types.
4755
4756         * method.c (do_build_copy_constructor): Simplify.
4757
4758         * call.c (build_method_call): Remove bogus code for two-argument
4759         delete.
4760         * init.c (build_new_1): Expand on comment, and remove dead code.
4761
4762         * init.c (expand_cleanup_for_base): New function, split out
4763         from ...
4764         (emit_base_init): Here.
4765         (expand_aggr_vbase_init): Use it.
4766
4767 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
4768
4769         * cp-tree.h (class_cache_firstobj): Declare.
4770         (maybe_push_cache_obstack): Rename to push_cache_obstack.
4771         * class.c (permanent_obstack): Remove declaration.
4772         (class_cache_firstobj): Make it global.
4773         (add_method): Don't use permanent_obstack directly.
4774         (pushclass): Only free the class_cache_obstack if we know how far
4775         back to free it.
4776         (maybe_push_cache_obstack): Rename to push_cache_obstack.
4777         * decl.c: Remove dead comment.
4778         (saved_scope): Add class_cache_firstobj.
4779         (push_to_top_level): Save it.
4780         (pop_from_top_level): Restore it.
4781         (push_class_level_binding): Use push_cache_obstack, not
4782         maybe_push_cache_obstack.
4783         * search.c (push_class_decls): Likewise.
4784         
4785 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4786
4787         * pt.c (tsubst_friend_function): Push into namespace of friend
4788         function before pushdecl'ing it.
4789
4790 1999-06-14  Nathan Sidwell  <nathan@acm.org>
4791
4792         * call.c (build_new_op): Remove REF_BIND from all operands.
4793
4794 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
4795
4796         * init.c (build_new_1): Look up operator delete even if there was
4797         no explicit new placement.
4798
4799 1999-06-08  Nathan Sidwell  <nathan@acm.org>
4800
4801         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
4802         of ...
4803         (build_throw): ... here. Call it.
4804         (process_start_catch_block): Call it.
4805
4806 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
4807
4808         * search.c (convert_pointer_to_single_level): Reimplement without
4809         using get_binfo.
4810
4811 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
4812
4813         * method.c (is_back_referenceable_type): Back-reference bools when
4814         not squangling.
4815
4816 1999-06-07  Dave Brolley  <brolley@cygnus.com>
4817
4818         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
4819         * input.c (putback_buffer): New structure type.
4820         (putback): Replaces putback_char member.
4821         (putback): Replaces putback_char static variable.
4822         (feed_input): Use putback.
4823         (end_input): Use putback.
4824         (sub_getch): Use putback.
4825         (put_back): Use putback.
4826
4827 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
4828
4829         * decl.c (grokdeclarator): Fix typo in last change.
4830
4831 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
4832
4833         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
4834         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
4835
4836 1999-06-04  Nathan Sidwell  <nathan@acm.org>
4837
4838         * except.c (build_throw): Check throw expression validity.
4839
4840 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
4841
4842         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
4843         just because flag_signed_bitfields is false.
4844
4845 1999-06-03  Nathan Sidwell  <nathan@acm.org>
4846
4847         * semantics.c (begin_class_definition): Update the struct's
4848         location here ...
4849         * class.c (finish_struct): ... rather than here.
4850
4851         * decl.c (make_typename_type): Don't rely on uninitialized
4852         variable.
4853
4854 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4855
4856         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
4857
4858 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
4859
4860         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
4861         and friends rather than messing with current_obstack directly.
4862         (cp_build_qualified_type_real): Rework ARRAY_TYPE
4863         allocation to match practice throughout the rest of the 
4864         compiler.
4865
4866 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
4867
4868         * lex.c (make_lang_type): Create TYPE_BINFO for
4869         TEMPLATE_TYPE_PARMs just like for non-template types.
4870
4871         * decl.c (start_decl): Move checks on initialization to ...
4872         (cp_finish_decl): Here.  Tidy formatting slightly.
4873
4874 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
4875
4876         * decl.c (add_binding): Don't complain about a redeclaration of a
4877         semantically identical typedef in a local scope.
4878
4879 1999-05-28  Nathan Sidwell  <nathan@acm.org>
4880
4881         * decl.c (complete_array_type): Allocate off same obstack. Fix
4882         DO_DEFAULT comment to match reality.
4883
4884         * friend.c (make_friend_class): Fix diagnostic typo.
4885
4886 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
4887
4888         * decl.c (lookup_namespace_name): Handle getting a
4889         TEMPLATE_ID_EXPR.
4890         (expand_static_init): Don't call pushdecl for implicitly declared
4891         `atexit' used to register destructors.
4892
4893 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
4894
4895         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
4896         intialize a vtable.
4897
4898         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
4899         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
4900         by combining TEMPLATE_INFO and LEVEL into a single union.
4901         (DECL_TEMPLATE_INFO): Reformat.
4902         (DECL_SAVED_TREE): Document.
4903         (DECL_TEMPLATE_INJECT): Remove.
4904         * class.c (finish_struct): Remove code to deal with
4905         DECL_TEMPLATE_INJECT. 
4906
4907         * decl.c (maybe_process_template_type_declaration): Handle all new
4908         types in templates uniformly.
4909         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
4910         DECL_CONTEXT.
4911         * pt.c (lookup_template_class): Inject template instantiations of
4912         forward-declarations.
4913         (instantiate_class_template): Remove code processing
4914         DECL_TEMPLATE_INJECT.
4915         
4916         * pt.c (lookup_template_class): Tweak lookup to find member
4917         templates.
4918
4919         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
4920         ASM_CV_QUAL.
4921         * semantics.c (finish_asm_stmt): Make strings permanent if they're
4922         used in a template.
4923         
4924 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
4925
4926         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
4927         parts of pointer to data member types.
4928
4929 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
4930
4931         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
4932         and then make it look like `abort'.  Just use `abort' instead.
4933         
4934         * typeck.c (build_static_cast): Don't allow static_casts that cast
4935         away constness.
4936         (casts_away_constness_r): New function.
4937         (casts_away_constness): Likewise.
4938
4939         * decl.c (lookup_tag): Remove code no longer needed after
4940         name-lookup improvements.
4941         * decl2.c (handle_class_head): Make error-recovery more robust.
4942         * friend.c (make_friend_class): Reject templated typename types.
4943         * lex.c (is_global): A template parameter isn't global.
4944         * parse.y (class_head): Robustify.
4945         * parse.c: Regenerated.
4946         
4947 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
4948
4949         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
4950         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
4951         
4952         * cp-tree.h (push_nested_namespace): Declare.
4953         (pop_nested_namespace): Likewise.
4954         * decl.c (push_nested_namespace): New function.
4955         (pop_nested_namespace): Likewise.
4956         * pt.c (instantiate_class_template): Use them.
4957
4958         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
4959
4960         * cp-tree.h (cplus_expand_constant): Declare.
4961         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
4962         converted from one pointer-to-object type to another.
4963         * expr.c (cplus_expand_constant): Don't make it static.
4964         * typeck.c (build_component_ref): Don't crash when presented with
4965         a component which is a TEMPLATE_DECL.
4966         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
4967         cast from a pointer-to-member constant to its own type does not
4968         result in a valid non-type template argument.
4969
4970 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
4971             Nathan Sidwell  <nathan@acm.org>
4972         
4973         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
4974         * cp-tree.h: Fix typo in documentation on pointers-to-members.
4975         (cp_build_qualified_type): Make it a macro.
4976         (cp_build_qualified_type_real): Declare.
4977         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
4978         problem with template parameters and restrict-qualification.
4979         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
4980         * hash.h: Regenerated.
4981         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
4982         the enumeration.
4983         (NORID): Remove definition.
4984         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
4985         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
4986         (fn_type_unification): Check that the function type resulting from
4987         the deduction is legal.
4988         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
4989         (unify): Use cp_build_qualified_type_real.
4990         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
4991         (cp_build_qualified_type): Rename to ...
4992         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
4993         and modify appropriately.
4994         
4995         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
4996         reveal optimization opportunities.
4997
4998         * pt.c (tsubst): Don't issue error messages when we're not
4999         complaining, even if we see a qualified function type.
5000         (check_cv_quals_for_unify): Don't allow a qualified function
5001         type.
5002
5003 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
5004
5005         * class.c (instantiate_type): Downgrade errors for object-dependent
5006         memfn refs to pedwarn.
5007
5008 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
5009
5010         * decl.c (grokdeclarator): Don't treat [] as indicating a
5011         zero-sized array in a typedef.
5012
5013         * call.c (build_object_call): Don't look at DECL_NAME for a type.
5014         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
5015         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
5016
5017         * pt.c (for_each_template_parm): Rework to match documentation.
5018         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
5019
5020 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
5021
5022         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
5023
5024         * class.c (finish_base_struct): Allow non-COM bases for COM classes
5025         except at the leftmost position.
5026         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
5027         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
5028         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
5029
5030         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
5031         (build_cplus_new): Make sure that what we return is of the right type.
5032
5033 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
5034
5035         * cp-tree.h (make_ptrmem_cst): New function.
5036         * expr.c (cplus_expand_constant): Split out from ...
5037         (cplus_expand_expr): Here.  Use cplus_expand_constant.
5038         (init_cplus_expand): Set lang_expand_constant.
5039         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
5040
5041         * tree.c (make_ptrmem_cst): Define.
5042         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
5043         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
5044
5045 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
5046
5047         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
5048
5049         * decl2.c (start_static_storage_duration_function): Fix comment.
5050         (finish_file): Create static storage duration functions lazily.
5051
5052 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
5053
5054         Implement anonymous structs.
5055         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
5056         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
5057         * class.c (finish_struct_1): Remove redundant check for anon struct.
5058         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
5059         (check_tag_decl): Check for anonymous struct here.
5060         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
5061         * init.c (sort_member_init, emit_base_init): Handle getting fields
5062         as well as names in current_member_init_list.
5063         (perform_member_init): Handle getting an anon aggr.
5064         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
5065         (do_build_copy_constructor): Likewise.
5066
5067 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
5068
5069         * tree.c (cp_build_qualified_type): Don't allow qualified function
5070         types.
5071
5072 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
5073
5074         * gxxint.texi: Fix typo.
5075
5076 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
5077
5078         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
5079         * class.c (finish_struct_1): Use CLASS_TYPE_P.
5080         * ptree.c (print_lang_type): Likewise.
5081         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
5082         IS_AGGR_TYPE_CODE.
5083         * typeck2.c (digest_init): Likewise.
5084
5085 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
5086
5087         * call.c (joust): Compare the types of the conv ops, not the
5088         target types of the conversions.
5089
5090 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5091
5092         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
5093         was not given.
5094
5095 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
5096
5097         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
5098         * decl.c (grokfndecl): Don't allow inline declarations of friend
5099         template specializations, or friend template specializations with
5100         default arguments.
5101         * pt.c (tsubst): Handle substitution into array types that does
5102         not yield a fixed upper bound, even when not processing a
5103         template.
5104         (tsubst_copy): Deal with the fact that the second operand to a
5105         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
5106         * search.c (marked_pushdecls_p): Don't descend into
5107         TEMPLATE_TYPE_PARMs and the like.
5108         (unmarked_pushdecls_p): Likewise.
5109         
5110         * call.c (build_over_call): Don't throw away
5111         initializations/copies of empty classes; use MODIFY_EXPR and
5112         INIT_EXPR as for non-empty classes.
5113         * class.c (finish_struct_1): Put the padding byte for an empty
5114         class on the TYPE_NONCOPIED_PARTS list for the class.
5115
5116 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
5117
5118         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
5119         indicate a reference to a field that is a qualified name.
5120
5121 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
5122
5123         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
5124         ASM_OUTPUT_CONSTRUCTOR.
5125
5126         * friend.c (do_friend): Add attrlist arg.  Remove support for
5127         getting a non-decl as 'decl'.
5128         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
5129         rtl.
5130         (grokdeclarator): Adjust.
5131         * cp-tree.h: Adjust.
5132
5133 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
5134
5135         * cp-tree.h (permanent_p): New function.
5136         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
5137         possibly complex tree node.
5138         * tree.c (mapcar): Adjust comments, and follow coding standards in
5139         conditional.
5140         (permanent_p): New function.
5141
5142 1999-05-13  Per Bothner  <bothner@cygnus.com>
5143
5144         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
5145         primitive Java types, if we actually see `extern "Java"'.
5146
5147 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5148
5149         * lang-specs.h: Pass -$ to the preprocessor.
5150
5151 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
5152
5153         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
5154         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
5155         (resolve_offset_ref): Don't handle a raw baselink.
5156         * cvt.c (build_expr_type_conversion): Likewise.
5157         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
5158         convert_for_initialization): Likewise.
5159         * class.c (instantiate_type): Handle seeing a baselink under an
5160         OFFSET_REF.
5161         * error.c (dump_expr): Likewise.        
5162         * pt.c (for_each_template_parm): Likewise.
5163         (resolve_overloaded_unification): Likewise.
5164         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
5165         * typeck.c (expr_sizeof): Also complain about other permutations
5166         of overloaded functions.
5167
5168 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
5169
5170         * init.c (resolve_offset_ref): Don't return a raw method.
5171         Use BASELINK_P.
5172         * typeck.c (decay_conversion): Don't handle a raw method.
5173         Resolve all OFFSET_REFs.
5174         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
5175         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
5176         same_type_p for pmf bits.  Don't use build_binary_op to compare
5177         raw pointers to methods.
5178         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
5179         to decide when to call resolve_offset_ref.
5180         (build_c_cast, convert_for_initialization): Likewise.
5181         * cvt.c (build_expr_type_conversion): Likewise.
5182
5183 1999-05-06  Nathan Sidwell  <nathan@acm.org>
5184
5185         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
5186
5187 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
5188
5189         * decl2.c (start_objects): Don't let static constructors and
5190         destructors get inlined.
5191
5192         * parse.y (nested_name_specifier): Make sure ordinary types are
5193         complete, just like template types.
5194         * parse.c: Regenerated.
5195
5196         * pt.c (check_explicit_specialization): Improve error messages.
5197
5198 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5199
5200         * typeck.c (string_conv_p): Use same_type_p to check whether we
5201         try to convert between char and wchar_t.
5202
5203 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
5204
5205         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
5206         lookup to error_mark_node here.
5207         (lookup_member): Revise documentation.  Add comments.  Don't set
5208         the TREE_TYPE to error_mark_node here, and don't build up an extra
5209         TREE_LIST for ambiguous lookups.
5210         (setup_class_bindings): Adjust accordingly.
5211         (push_class_decls): Revise out-of-date comments.
5212         
5213         * typeck.c (build_const_cast): Tighten checks for legality.
5214
5215 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5216
5217         * init.c (build_member_call): Lookup names coming from
5218         namespace-scoped LOOKUP_EXPR.
5219
5220 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
5221
5222         * gxxint.texi: Add documentation for 'I'.
5223
5224 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5225
5226         * tinfo.cc (operator==): Qualify type_info with std::.
5227
5228 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
5229
5230         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
5231         (DECL_COMDAT): Remove definition.
5232
5233 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
5234
5235         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
5236         change.
5237
5238 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
5239
5240         * class.c (build_vtable): Use build_lang_decl when building
5241         vtables, not just build_decl.
5242         (prepare_fresh_vtable): Likewise.
5243         * decl.c (wrapup_globals_for_namespace): Mark vtables as
5244         DECL_EXTERNAL when calling wrapup_global_declarations.
5245         * decl2.c (priority_info_s): Add initializations_p and
5246         destructions_p members.
5247         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
5248         when deciding what vtables to write out.
5249         (ssdf_decls): New variable.
5250         (ssdf_decls_used): Likewise.
5251         (start_static_storage_duration_function): Deal with being called
5252         multiple times.  Avoid inlining this function.
5253         (generate_inits_for_priority): Deal with reuse of priority map.
5254         (get_priority_info): Clear initializations_p and destructions_p.
5255         (do_static_initialization): Tweak comment.
5256         (do_static_destruction): Likewise.  Fix condition on sentries for
5257         destruction.
5258         (generate_ctor_or_dtor_function): Call all of the static storage
5259         duration functions.
5260         (generate_ctor_or_dtor_function_for_priority): Check
5261         initializations_p and destructions_p to see what priorities need
5262         initialization functions.
5263         (finish_file): Rework to generate multiple static storage duration
5264         functions, rather than just one.
5265
5266         * typeck.c (build_const_cast): Tweak last change to handle
5267         templates correctly.
5268
5269         * typeck.c (build_const_cast): Disallow use of const_cast to
5270         anything but a pointer or reference type.
5271
5272 1999-04-30  Nathan Sidwell  <nathan@acm.org>
5273
5274         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
5275         signature type.
5276
5277 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
5278
5279         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
5280         (finish_file): Indent comments properly.
5281
5282 1999-04-29  Richard Henderson  <rth@cygnus.com>
5283
5284         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
5285         (do_static_destruction): Likewise.
5286
5287 1999-04-29  Nathan Sidwell  <nathan@acm.org>
5288
5289         * cp-tree.h (TYPE_NOTHROW_P): New macro.
5290         * decl2.c (delete_sanity): Warn on deleting void *.
5291         * init.c (build_new_1): Use TYPE_NOTHROW_P.
5292         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
5293         throwing operator new.
5294
5295 1999-04-28  Nathan Sidwell  <nathan@acm.org>
5296
5297         * cp-tree.h (build_component_addr): Remove prototype.
5298         * typeck.c (build_component_addr): Make static. Remove MSG
5299         argument.
5300         (build_component_addr): Remove MSG parameter, clean up
5301         comment.
5302         (build_x_function_call): Use cp_error.
5303         (build_unary_op): Adjust call of build_component_addr.
5304
5305 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
5306
5307         * pt.c (tsubst_friend_class): Check for NULL.
5308
5309 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5310
5311         * search.c (binfo_for_vtable): Initialize bfvi.var.
5312
5313 1999-04-27  Nathan Sidwell  <nathan@acm.org>
5314
5315         * rtti.c (build_x_typeid): Check rtti is enabled.
5316
5317 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
5318
5319         * search.c (is_subobject_of_p): Make sure we're looking at the
5320         right baseclasses.
5321
5322 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
5323
5324         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
5325
5326 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
5327
5328         * decl2.c (finish_file): Tweak handling of extern inlines so that
5329         they are not unnecessarily put out.
5330
5331         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
5332         such as base classes.
5333
5334 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
5335
5336         * tree.c (build_exception_variant): Fix typo: use the chain of U,
5337         not trying V, while cycling through U.
5338
5339 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
5340
5341         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
5342         preserves_first_arg.  Enlarge dummy accordingly.
5343         (DECL_TINFO_FN_P): New macro.
5344         (SET_DECL_TINFO_FN_P): Likeiwse.
5345         (DECL_RETURNS_FIRST_ARG): Remove.
5346         (DECL_PRESERVES_THIS): Likewise.
5347         (DECL_INIT_PRIORITY): New macro.
5348         (finish_struct_1): Change prototype.
5349         (cat_namespace_levels): Remove prototype.
5350         (vtable_decl_p): New prototype.
5351         (vtype_decl_p): Likewise.
5352         (sigtable_decl_p): Likewise.
5353         (walk_globals_pred): New typedef.
5354         (walk_globals_fn): Likewise.
5355         (walk_globals): New prototype.
5356         (walk_namespaces_fn): New typedef.
5357         (walk_namespaces): New prototype.
5358         (wrapup_globals_for_namespace): Likewise.
5359         (walk_vtables): Remove prototype.
5360         (walk_sigtables): Likewise.
5361         (instantiate_pending_templates): New prototype.
5362         * class.c (finish_struct_1): Don't return a value.
5363         * decl.h (pending_statics): Remove declaration.
5364         * decl.c (walk_namespaces_r): New function.
5365         (walk_globals_r): Likewise.
5366         (vtable_decl_p): Likewise.
5367         (vtype_decl_p): Likewise.
5368         (sigtable_decl_p): Likewise.
5369         (walk_namespaces): Likewise.
5370         (walk_globals_data): New type.
5371         (walk_globals): New function.
5372         (wrapup_globals_for_namespace): Likewise.
5373         (expand_static_init): Remove assertion.  Remove redundancy in
5374         conditional.  Don't put static data members in static_aggregates
5375         Tidy.
5376         (finish_function): Remove redundancy in conditional.  Don't set
5377         DECL_RETURNS_FIRST_ARG.
5378         (cat_namespace_levels): Remove.
5379         * decl2.c: Include splay-tree.h and varray.h.
5380         (priority_info_s): New structure.
5381         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
5382         conventions.
5383         (prune_vtable_vardecl): Likewise.
5384         (finish_sigtable_vardecl): Likewise.
5385         (setup_initp): Remove.
5386         (do_dtors): Remove.
5387         (do_ctors): Remove.
5388         (start_static_storage_duration_function): New function.
5389         (generate_inits_for_priority): Likewise.
5390         (finish_static_storage_duration_function): Likewise.
5391         (get_priority_info): Likewise.
5392         (do_static_initialization): Likewise.
5393         (do_static_destruction): Likewise.
5394         (do_static_initialization_and_destruction): Likewise.
5395         (generate_ctor_or_dtor_function): Likewise.
5396         (generate_ctor_and_dtor_functions_for_priority): Likewise.
5397         (pending_statics): Make it a varray.
5398         (pending_statics_used): New variable.
5399         (saved_inlines): Make it a varray.
5400         (saved_inlines_used): New variable.
5401         (finish_static_data_member): Change method of updating
5402         pending_statics.
5403         (mark_inline_for_output): Remove #if 0'd code.  Change method of
5404         updating saved_inlines.
5405         (walk_vtables): Remove.
5406         (walk_sigtables): Likewise.
5407         (import_export_decl): Use DECL_TINFO_FN_P.
5408         (pending_templates): Remove declaration.
5409         (maybe_templates): Likewise.
5410         (static_aggregates_initp): Likewise.
5411         (setup_initp): Likewise.
5412         (finish_objects): Simplify.
5413         (INITIALIZE_P_IDENTIFIER): New macro.
5414         (PRIORITY_IDENTIFIER): New macro.
5415         (SSDF_IDENTIFIER): New macro.
5416         (initialize_p_decl): New variable.
5417         (priority_decl): Likewise.
5418         (ssdf_decl): Likewise.
5419         (priority_info_map): Likewise.
5420         (finish_file): Recode output of static intializers and other
5421         file-scope finalization tasks.
5422         * error.c (OB_END_TEMPLATE_ID): New macro.
5423         (dump_type_real): Use it.
5424         (dump_decl): Likewise.
5425         (dump_function_name): Likewise.
5426         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
5427         interface.
5428         (check_newline): Use walk_globals, not walk_vtables.
5429         * pt.c (pending_tempalte_expansions): Remove.
5430         (set_vardecl_interface_info): Likewise.
5431         (pending_templates): Make static.
5432         (maybe_templates): Likewise.
5433         (instantiate_class_template): Adjust call to finish_struct_1.
5434         (instantiate_pending_templates): New function.
5435         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
5436         * tree.c (static_aggregates_initp): Remove.
5437         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
5438         instead.
5439         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
5440
5441         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
5442         with the RTL code RETURN.
5443         * hash.h: Regenerated.
5444         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
5445         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
5446         * parse.c: Regenerated.
5447         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
5448         it.
5449         (inline_parm_levels): New variable.
5450         (inline_parm_levels_used): Likewise.
5451         (maybe_begin_member_template_processing): Update them.
5452         (maybe_end_member_template_processing): Use them, rather than
5453         guessing how many levels to pop.
5454
5455         * decl.c (make_typename_type): Tighten error-checking.
5456
5457 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
5458
5459         * cp-tree.h (build_binary_op): Remove unneeded parameter.
5460         * class.c (build_vrable_entry_ref): Adjust call to
5461         build_binary_op.
5462         * decl.c (expand_static_init): Likewise.
5463         (grokdeclarator): Likewise.
5464         (finish_function): Likewise.
5465         * decl2.c (delete_sanity): Likewise.
5466         (do_dtors): Likewise.
5467         (do_ctors): Likewise.
5468         * error.c (dump_type_suffix): Likewise.
5469         * expr.c (cplus_expand_expr): Likewise.
5470         * init.c (resolve_offset_ref): Likewise.
5471         (build_new): Likewise.
5472         (build_new_1): Likewise.
5473         (build_vec_delete_1): Likewise.
5474         (expand_vec_init_catch_clause): Likewise.
5475         (build_delete): Likewise.
5476         * pt.c (tsubst): Likewise.
5477         * rtti.c (synthesize_tinfo_fn): Likewise.
5478         * search.c (expand_upcast_fixups): Likewise.
5479         (expand_direct_vtbls_init): Likewise.
5480         * typeck.c (get_member_function_from_ptrfunc): Likewise.
5481         (build_binary_op_nodefault): Likewise.
5482         (point_int_sum): Likewise.
5483         (pointer_diff): Likewise.
5484         (build_unary_op): Likewise.
5485         (build_modify_expr): Likewise.
5486         (get_delta_difference): Likewise.
5487         (build_ptrmemfunc): Likewise.
5488         (expand_ptrmemfunc_cst): Likewise.
5489
5490 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
5491
5492         * decl.c (grokfndecl): Always call cplus_decl_attributes.
5493         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
5494
5495 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
5496
5497         * cp-tree.h (finish_static_data_member_decl): New function.
5498         * decl2.c (finish_static_data_member_decl): Split out from ...
5499         (grokfield): Here.
5500         * pt.c (instantiate_class_template): Use it here instead of
5501         trying to fake it.
5502         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
5503         finish_static_data_member_decl will do that.  Explicit set
5504         DECL_EXTERNAL to match non-template processing.
5505
5506 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
5507
5508         * cp-tree.h (finish_class_definition): Add parameter.
5509         * parse.y (structsp): Use it.  Don't call pop_scope here.
5510         * parse.c: Regenerated.
5511         * semantics.c (finish_class_definition): Pop it here.
5512
5513 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
5514
5515         * decl.c (xref_tag): Revise handling of nested template
5516         declarations.
5517         * pt.c (check_explicit_specialization): Tweak handling of friend
5518         templates in template classes.
5519         (tsubst_friend_class): Handle friend declarations for nested
5520         member template classes.
5521
5522 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
5523
5524         * class.c (finish_struct): Remove unused variable.
5525         (pushclass): Likewise.
5526         (invalidate_class_lookup_cache): Likewise.
5527         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
5528         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
5529         doesn't get obliterated.
5530         (make_typename_type): Handle template classes correctly.
5531
5532         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
5533         (storetags): Declare.
5534         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
5535         (pushclass): Likewise.  Use storetags to install tag declarations,
5536         not pushtag.
5537         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
5538         * decl.c (storetags): Make it global.
5539         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
5540         implicit typename declaration.
5541         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
5542         * method.c (hack_identifier): Likewise.
5543         * search.c (lookup_member): Likewise.
5544
5545         * decl.c (warn_about_implicit_typename_lookup): New function.
5546         (lookup_name_real): Use it.  Rework handling of implicit typename
5547         extension.
5548
5549 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
5550
5551         * cp-tree.h (lookup_nested_field): Remove.
5552         * class.c (push_nested_class): Handle UNION_TYPEs.
5553         (pop_nested_class): Likewise.
5554         * decl.c (lookup_name_real): Don't call lookup_nested_field.
5555         (start_decl): Use push_nested_class, not just pushclass.
5556         (cp_finish_decl): Use pop_nested_class, not just popclass.
5557         * search.c (lookup_nested_field): Remove.
5558
5559         * cp-tree.h (lang_type): Add documentation.
5560         * decl2.c (handle_class_head): Create template declarations here,
5561         as appropriate.
5562         * parse.y (class_head): Return whether or not we entered a new
5563         scope, as well as the type named.
5564         (named_class_head): Likewise.
5565         (named_complex_class_head_sans_basetype): Likewise.
5566         (structsp): Adjust accordingly.  Pop scope when required.
5567         * parse.c: Regenerated.
5568         * pt.c (check_default_tmpl_args): Robustify.
5569         (redeclare_class_template): Likewise.
5570         (instantiate_class_template): An instantiation of an
5571         anonymous union is itself an anonymous union.
5572         * semantics.c (begin_class_definition): Don't create template
5573         declarations here.
5574
5575 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
5576
5577         * parse.y (after_type_declarator_intern): New nonterminal.
5578         (after_type_declarator): Use it.
5579         (direct_after_type_declarator): Likewise.  Move above
5580         nonnested_type to fix reduce/reduce conflict resolution.
5581         (declmods): Reducing from just 'attributes' has EMPTY precedence.
5582         * Makefile.in (CONFLICTS): Update.
5583
5584         * decl.c (define_label): Downgrade error for jumping over a
5585         non-POD decl to pedwarn.
5586
5587 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
5588
5589         * cp-tree.h (popclass): Change declaration.
5590         (pop_nested_class): Likewise.
5591         (poplevel_class): Remove declaration.
5592         * call.c (convert_default_argument): Pass no arguments to
5593         popclass.
5594         * class.c (finish_struct_1): Likewise.
5595         (finish_struct): Likewise.
5596         (popclass): Remove argument.  Simplify code accordingly.
5597         (pop_nested_class): Likewise.
5598         * decl.c (poplevel_class): Declare it here, and make it static.
5599         (poplevel): Handle class scopes.
5600         (poplevel_class): Don't take an rgument.  Simplify.
5601         (pop_everything): Pass no arguments to pop_nested_class.
5602         (cp_finish_decl): Pass no arguments to popclass.
5603         (grokdeclarator): Pass no arguments to pop_nested_class.
5604         (finish_function): Likewise.
5605         * decl2.c (grokfield): Likewise.
5606         (pop_scope): Pass no arguments to popclass.
5607         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
5608         * pt.c (instantiate_class_template): Move call to pushclass, and
5609         document.  Pass no arguments to popclass.
5610         (regenerate_decl_from_template): Likewise.
5611
5612 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
5613
5614         * typeck.c (build_unary_op): Handle taking the address of a unique
5615         bound non-static member function.
5616
5617 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5618
5619         * lang-options.h (-Wdeprecated): New flag.
5620         * decl2.c (warn_deprecated): New flag.
5621         (lang_decode_option): Deprecated this-is-variable,
5622         external-templates, alt-external-templates.
5623         Support -Wdeprecated.
5624         * errfn.c (cp_deprecated): New function.
5625
5626 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
5627
5628         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
5629         of the decls themselves.
5630
5631         * pt.c (tsubst_function_type): Copy attributes over.
5632
5633         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
5634         and com_interface.
5635         * cp-tree.h: Add prototype.
5636         * decl.c (init_decl_processing): Set valid_lang_attribute.
5637
5638 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
5639
5640         * class.c (finish_struct_1): Look at the const-ness of the field's
5641         type, not the TREE_READONLY-ness of the declaration.
5642         * method.c (synthesize_method): Likewise.
5643         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
5644         creating new declarations.
5645
5646 1999-04-13  Mike Stump  <mrs@wrs.com>
5647
5648         * decl2.c (import_export_decl): Because vtables always reference
5649         virtual functions, even if they are inlined, don't allow
5650         -fno-implement-inlines to not emit them, instead, emit them with
5651         the vtable.
5652         * decl.c (start_function): Likewise.
5653
5654 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
5655
5656         * cp-tree.h (struct lang_type): Add com_interface.
5657         (CLASSTYPE_COM_INTERFACE): New macro.
5658         * class.c (set_rtti_entry): COM interface classes have no RTTI
5659         entries in their vtables; adjust.
5660         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
5661         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
5662         finish_struct_1): Likewise.
5663         * decl2.c (mark_vtable_entries): Likewise.
5664         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
5665         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
5666         expand_upcast_fixups): Likewise.
5667         * tree.c (debug_binfo): Likewise.
5668
5669         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
5670         * typeck.c (comptypes): If we get it, ignore attributes.
5671         * class.c (instantiate_type): Use BASELINK_P.  Change complain
5672         parameter to flags; 2 means ignore attributes.
5673         * call.c (build_op_delete_call): Pass it.
5674
5675         * decl.c (xref_tag): Only complain once about using a typedef-name
5676         with 'struct'.  Downgrade to pedwarn.
5677
5678         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
5679
5680         * parse.y (absdcl_intern): New nonterminal.
5681         (absdcl, direct_abstract_declarator): Use it.
5682
5683         * pt.c (lookup_template_class): Look through implict typename.
5684
5685 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
5686
5687         * friend.c (add_friend): Deal gracefully with error_mark_node.
5688         * method.c (build_overload_value): Handle pointers-to-members as
5689         template parameters.
5690
5691         * decl.c (push_binding): Fix typo in comment.
5692
5693 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
5694
5695         * error.c (dump_type_real): If a typename is a template-id, put
5696         out the template arguments.
5697         (dump_expr): Handle TEMPLATE_ID_EXPR.
5698         * pt.c (lookup_template_class): Now that full arguments are
5699         available everywhere, remove code that tried to guess them.
5700
5701 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
5702
5703         * decl.c (make_typename_type): Complain if we don't find a type
5704         when trying to make a typename type for a non-template type.
5705
5706 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
5707
5708         * decl.c (start_decl): Pass attributes to grokdeclarator.
5709         (grokdeclarator): Handle attributes on constructor-syntax
5710         initializers.
5711
5712 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
5713
5714         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
5715         don't have types.
5716
5717         * search.c (template_self_reference_p): Tweak.
5718
5719 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
5720
5721         * init.c (build_offset_ref): Don't build yet another weird data
5722         structure to describe overloaded functions.
5723
5724 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
5725
5726         * cp-tree.h (BASELINK_P): New macro.
5727         (SET_BASELINK_P): Likewise.
5728         * init.c (build_member_call): Remove needless assignment in if
5729         statement.
5730         * search.c (lookup_field_r): Fix handling when we are looking
5731         specifically for a type; these are not hidden by functions and
5732         variables.
5733         (lookup_member): Use SET_BASELINK_P.
5734         * tree.c (is_overloaded_fn): Use BASELINK_P.
5735         (really_overloaed_fn): Likewise.
5736         (get_first_fn): Likewise.
5737
5738 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
5739
5740         * decl.c (lookup_name_current_level): Tweak, and improve
5741         documentation.
5742
5743         * class.c (maybe_fixup_vptrs): Remove declaration.
5744         (build_class_init_list): Likewise.
5745         * decl.c (pushdecl_class_level): Call check_template_shadow here
5746         ...
5747         (push_class_level_binding): ... not here.
5748         * search.c (dfs_push_type_decls): Only avoid
5749         template-self-reference TYPE_DECLs if they are from base classes.
5750
5751 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
5752
5753         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
5754         nodes.  Tidy.
5755
5756 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
5757
5758         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
5759         (finish_struct_1): Don't call build_class_init_list.
5760
5761 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
5762
5763         * tinfo.h (__class_type_info): Fix illegal declaration.
5764
5765         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
5766         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
5767         (IDENTIFIER_CLASS_VALUE): Improve documentation.
5768         (is_properly_derived_from): Declare.
5769         (invalidate_class_lookup_cache): Likewise.
5770         (maybe_maybe_note_name_used_in_class): Likewise.
5771         (note_name_declared_in_class): Likewise.
5772         (push_using_decl): Remove duplicate declaration.
5773         (id_in_current_class): Remove declaration.
5774         (push_class_binding): Change prototype.
5775         (clear_identitifer_class_values): Declare.
5776         * call.c (is_properly_derived_from): Make it global.
5777         (build_new_function_call): Be careful about updating candidates.
5778         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
5779         asked to make illegal calls.
5780         * class.c: Include splay-tree.h.
5781         (class_stack_node): Add names_used slot.
5782         (check_member_decl_is_same_in_complete_scope): Remove.
5783         (add_method): Fix comment.  Push the declaration into class
5784         scope.
5785         (finish_struct_1): When popping the class, pop the bindings too.
5786         Remove check for data member/function member conflict.
5787         (finish_struct): Remove calls to
5788         check_member_decl_is_same_in_complete_scope.  Change calls to
5789         popclass.
5790         (pushclass): Clear names_used in the class stack entry.
5791         Use invalidate_class_lookup_cache to remove cached entries, rather
5792         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
5793         before entering a new class.  Remove dead code.  Don't mess with
5794         current_function_decl when pushing declarations.
5795         (invalidate_class_lookup_cache): New function, split out from ...
5796         (popclass): Here.  Clean up names_used on our way out.
5797         (instantiate_type): Adjust.
5798         (build_self_reference): Don't push the declaration here.
5799         (maybe_note_name_used_in_class): New function.
5800         (note_name_declared_in_class): Likewise.
5801         * decl.c (add_binding): Change prototype.
5802         (find_class_binding_level): New function.
5803         (innermost_nonclass_level): Likewise.
5804         (current_binding_level): Update documentation.
5805         (inner_binding_level): Remove.  Replace with current_binding_level
5806         throughout.
5807         (push_binding_level): Remove special handling of
5808         class_binding_level.
5809         (pop_binding_level): Likewise.  Use find_class_binding_level.
5810         (suspend_binding_level): Likewise.
5811         (global_bindings_p): Use innermost_nonclass_level.
5812         (toplevel_bindings_p): Likewise.
5813         (namespace_bindings_p): Likewise.
5814         (pseudo_global_level_p): Likewise.
5815         (push_binding): Clear INHERITED_VALUE_BINDING_P.
5816         (add_binding): Check for illegal multiple declarations.  Return a
5817         value indicating whether or not the new binding was legal.
5818         (push_local_binding): Skip over class binding levels.  Check
5819         return value from add_binding.
5820         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
5821         note_name_declared_in_class.
5822         (pushlevel_class): Remove "fake out the rest of the compiler"
5823         code.
5824         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
5825         (clear_identifier_class_values): New function.
5826         (pop_from_top_level): Use it.
5827         (pop_everything): Tweak.
5828         (maybe_process_template_type_declaration): Don't push the
5829         declaration for the template here.
5830         (pushtag): Don't push tag declarations into class scope here.
5831         (pushdecl): Apply DeMorgan's law for readability.
5832         (pushdecl_class_level): Remove special-case code for
5833         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
5834         (push_class_level_bindng): Deal with inherited bindings.
5835         (lookup_name_real): Remove special-case code for
5836         TYPE_BEING_DEFINED, and some implicit typename magic.
5837         (grokdeclarator): Handle COMPONENT_REF for a template function.
5838         (build_enumerator): Don't call pushdecl_class_level here.
5839         (id_in_current_class): Remove.
5840         * decl2.c (grokfield): Don't call pushdecl_class_level or
5841         check_template_shadow.
5842         * errfn.c (cp_file_of): Don't declare.
5843         (cp_line_of): Likewise.
5844         * error.c (dump_decl): Handle an OVERLOAD.
5845         (cp_file_of): Likewise.
5846         (cp_line_of): Likewise.
5847         * init.c (build_member_call): Handle a COMPONENT_REF.
5848         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
5849         pushdecl_class_level.
5850         * method.c (hack_identifier): Build COMPONENT_REFs for references
5851         to member templates as well as member functions.  Remove dead
5852         code.
5853         * parse.y (left_curly): Remove.
5854         (nonnested_type): Call maybe_note_name_used_in_class, not
5855         pushdecl_class_level.
5856         * parse.c: Regenerated.
5857         (nested_name_specifier_1): Likewise.
5858         * pt.c (check_explicit_specialization): Adjust, for robustness.
5859         (check_template_shadow): Handle OVERLOADs.
5860         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
5861         TEMPLATE_DECL, if appropriate.
5862         * search.c (envelope_add_decl): Remove.
5863         (dfs_pushdecls): Likewise.
5864         (dfs_compress_decls): Likewise.
5865         (dfs_push_decls): New function.
5866         (dfs_push_type_decls): Likewise.
5867         (setup_class_bindings): Likewise.
5868         (template_self_reference_p): Likewise.
5869         (lookup_field_r): Use it.
5870         (looup_member): Remove old comment.  Deal with ambiguity.
5871         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
5872         and remove envelope processing.
5873         * semantics.c (begin_class_definition): Let pushclass push
5874         declarations for base classes.
5875         (finish_member_declaration): Push declarations into class scope.
5876         * typeck.c (build_component_ref): Just put an OVERLOAD into the
5877         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
5878         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
5879         * Makefile.in (class.o): Depend on splay-tree.h.
5880
5881 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
5882
5883         * cvt.c (convert_pointer_to_real): Use same_type_p.
5884         * typeck.c (comp_target_types): Use same_type_p.
5885
5886 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
5887
5888         * semantics.c (begin_inline_definitions,
5889         finish_inline_definitions): Rename from finish_default_args and
5890         begin_inline_definitions, respectively, to something that isn't a
5891         total lie.  :)
5892         * parse.y (structsp): Adjust.
5893
5894         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
5895         (list_hash_lookup): Likewise.
5896         (hash_tree_chain): Adjust.
5897         * pt.c (tsubst): Adjust.
5898         (tsubst_arg_types): Use plain hash_tree_cons.
5899         * cp-tree.h (hash_tree_cons_simple): Lose.
5900         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
5901
5902 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5903
5904         * Makefile.in (hash.h): Generate using gperf language 'C', not
5905         'KR-C', so gperf uses the `const' keyword on strings.
5906
5907         * gxx.gperf (resword): Const-ify a char*.
5908
5909 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
5910
5911         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
5912         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
5913         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
5914         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
5915         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
5916         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
5917         tree.c: Adjust.
5918
5919 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
5920
5921         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
5922
5923 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
5924
5925         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
5926
5927 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
5928
5929         * cp-tree.h (add_friend): Declare.
5930         (add_friends): Likewise.
5931         * friend.c (add_friend): Make it global.  Don't add to
5932         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
5933         (add_friends): Make it global.
5934         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
5935         befriending class is a template.
5936         * parse.y (component_decl_1): Fix typo in comment.
5937         * parse.c: Regenerated.
5938         * pt.c (instantiate_class_template): Use add_friend and
5939         add_friends rather that duplicating some of their functionality
5940         here.
5941
5942 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
5943
5944         * call.c (build_field_call): Unify 'this' and non-'this' cases.
5945
5946         * typeck.c (build_indirect_ref): Check for 'this' sooner.
5947
5948 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5949
5950         * call.c (op_error): Const-ify a char*.
5951         (add_candidate, source_type, add_warning): Add static prototype.
5952         (print_z_candidates): Const-ify a char*.
5953
5954         * class.c (resolve_address_of_overloaded_function,
5955         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
5956         (get_vtable_name, finish_struct_1): Const-ify a char*.
5957
5958         * cvt.c (convert_to_reference): Likewise.
5959
5960         * decl.c (redeclaration_error_message, record_builtin_type,
5961         record_unknown_type, member_function_or_else, bad_specifiers):
5962         Likewise.
5963         (find_binding, select_decl, unqualified_namespace_lookup,
5964         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
5965         Add static prototype.
5966         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
5967         implicitly_declare, record_builtin_java_type, define_function,
5968         grok_op_properties, tag_name): Const-ify a char*.
5969
5970         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
5971         (define_function, finish_builtin_type): Const-ify a char*.
5972         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
5973         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
5974         (file_name_nondirectory): Const-ify a char*.
5975         (init_filename_times): Don't prototype.
5976         (compiler_error): Prototype.
5977         (yyerror, init_repo): Const-ify a char*.
5978         (build_srcloc): Don't prototype.
5979         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
5980         Const-ify a char*.
5981         (warn_for_assignment): Don't prototype.
5982         (convert_for_initialization, readonly_error, check_for_new_type,
5983         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
5984         Const-ify a char*.
5985
5986         * decl2.c (acceptable_java_type, output_vtable_inherit,
5987         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
5988         merge_functions, decl_namespace, validate_nonmember_using_decl,
5989         do_nonmember_using_decl): Add static prototype.
5990         (lang_f_options): Const-ify a char*.
5991         (finish_builtin_type): Likewise.
5992         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
5993         prototype.
5994
5995         * errfn.c: Include cp-tree.h.
5996         (cp_thing): Add static prototype.
5997         (compiler_error): Don't protoptype.
5998         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
5999         passing it to `cp_thing'.
6000
6001         * error.c (interesting_scope_p): Add static prototype.
6002
6003         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
6004         a char*.
6005
6006         * init.c (compiler_error): Don't prototype.
6007         (member_init_ok_or_else): Const-ify a char*.
6008         (build_java_class_ref): Add static prototype.
6009
6010         * lex.c (compiler_error): Don't prototype.
6011         (get_time_identifier, interface_strcmp, extend_token_buffer,
6012         handle_cp_pragma): Const-ify a char*.
6013         (is_global, init_filename_times): Add static prototype.
6014         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
6015         (compiler_error): Change from fixed args to variable args.
6016         (yyerror): Const-ify a char*.
6017
6018         * parse.y (cond_stmt_keyword): Const-ify a char*.
6019         (parse_decl): Add static prototype.
6020
6021         * pt.c (template_args_equal, print_template_context): Likewise.
6022         (print_candidates, check_default_tmpl_args): Const-ify a char*.
6023         (instantiate_class_template): Likewise.
6024
6025         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
6026
6027         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
6028         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
6029
6030         * search.c (lookup_field_info, lookup_member): Likewise.
6031         (lookup_member): Cast the first argument of `bzero' to a PTR.
6032
6033         * sig.c (compiler_error): Don't prototype.
6034         (build_signature_pointer_or_reference_nam): Const-ify a char*.
6035         (get_sigtable_name, build_member_function_pointer): Likewise.
6036
6037         * tree.c (compiler_error): Don't prototype.
6038         (no_linkage_helper, build_srcloc): Add static prototype.
6039         (build_vbase_pointer_fields): Const-ify a char*.
6040         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
6041
6042         * typeck.c (compiler_error): Don't prototype.
6043         (convert_for_assignment): Const-ify a char*.
6044         (comp_cv_target_types): Add static prototype.
6045         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
6046         build_component_addr, build_unary_op, convert_for_initialization):
6047         Const-ify a char*.
6048
6049         * typeck2.c (ack): Add static prototype and change from fixed args
6050         to variable args.
6051         (readonly_error, check_for_new_type): Const-ify a char*.
6052
6053         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
6054         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
6055         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
6056         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
6057         gen_assign, GNU_xref_member): Const-ify a char*.
6058
6059 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6060
6061         * gxxint.texi: Remove old discussion on copying virtual bases.
6062
6063 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
6064
6065         * Make-lang.in: Remove all references to g++.o/g++.c.
6066         Link g++ from gcc.o.
6067
6068 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
6069
6070         * decl2.c (comdat_linkage): Treat vtables like functions.
6071
6072 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
6073
6074         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
6075
6076 1999-03-25  Nathan Sidwell  <nathan@acm.org>
6077
6078         * decl.c (init_decl_processing): Add `signed' type as a synonym
6079         for `int'.
6080
6081 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
6082
6083         * typeck.c (common_type): Handle cv-qual unification for pointers
6084         to members.
6085
6086         * decl.c (unqualified_namespace_lookup): Return error_mark_node
6087         on error.
6088         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
6089         * lex.c (do_identifier): If we got error_mark_node, call
6090         lookup_name again.
6091
6092 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6093
6094         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
6095         classes.
6096
6097 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
6098
6099         * decl.c (lookup_name_real): Do nested field lookup regardless of
6100         TYPE_BEING_DEFINED.
6101
6102 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
6103
6104         * cp-tree.h (lang_type): Remove has_assignment and
6105         has_real_assignment.  Add befriending_classes.
6106         (TYPE_HAS_ASSIGNMENT): Remove.
6107         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
6108         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
6109         (lang_decl): Document.
6110         (DECL_BEFRIENDING_CLASSES): New macro.
6111         (FRIEND_NAME): Move declaration to more obvious location.
6112         (FRIEND_DECLS): Likewise.
6113         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
6114         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
6115         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
6116         (grok_op_properties): Likewise.
6117         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
6118         (add_friend): Likewise.  Don't do weird things with assignment
6119         operators.  Update DECL_BEFRIENDING_CLASSES.
6120         (add_friends): Don't do weird things with assignment operators.
6121         (make_friend_class): Likewise.  Update
6122         CLASSTYPE_BEFRIENDING_CLASSES.
6123         * pt.c (instantiate_class_template): Don't set
6124         TYPE_HAS_ASSIGNMENT.
6125         (tsubst_copy): Substitute the TREE_TYPE for more unary
6126         expressions.
6127         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
6128         * search.c (protected_accessible_p): New function.
6129         (friend_accessible_p): Likewise.
6130         (accessible_p): Use them.
6131
6132 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
6133
6134         * pt.c (convert_nontype_argument): Don't create things that aren't
6135         PTRMEM_CSTs when applying a qualification conversion to a
6136         PTRMEM_CST.
6137
6138 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
6139
6140         * Makefile.in (OBJS): Don't mention hash.o.
6141         (OBJDEPS): Likewise.
6142
6143 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
6144
6145         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
6146         * decl.c (expand_static_init): Make sure we don't add any after
6147         then.
6148
6149         * decl.c (cp_finish_decl): Move intelligence about handling
6150         DECL_COMDAT for variables from here...
6151         * decl2.c (comdat_linkage): ...to here.
6152         (maybe_make_one_only): Tweak.
6153         (import_export_decl): Call comdat_linkage for variables, too.
6154         (finish_file): Handle template statics properly.
6155
6156 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
6157
6158         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
6159         Document internals of pointer-to-member-functions.
6160         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
6161         (PFN_FROM_PTRMEMFUNC): Likewise.
6162         (build_type_conversion): Remove unused parameter.
6163         (build_ptrmemfunc1): Declare.
6164         (expand_ptrmemfunc_cst): New function.
6165         (delta2_from_ptrmemfunc): Likewise.
6166         (pfn_from_ptrmemfunc): Likewise.
6167         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
6168         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
6169         (convert_to_reference): Remove unused parameter to
6170         build_type_conversion.
6171         (ocp_convert): Likewise.
6172         (build_user_type_conversion): Likewise.
6173         * error.c (dump_expr): Handle NULL pointer-to-member functions.
6174         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
6175         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
6176         open when handling pointer-to-member functions.
6177         * pt.c (convert_nontype_argument): Clean up error messages.  Be
6178         more stringent with pointers-to-members.
6179         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
6180         (build_unary_op): Tidy ever-so-slightly.
6181         (build_conditional_expr): Remove extra parameter to
6182         build_type_conversion.
6183         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
6184         we're using.
6185         (expand_ptrmemfunc_cst): Define.
6186         (delta2_from_ptrmemfunc): Likewise.
6187         (pfn_from_ptrmemfunc): Likewise.
6188
6189 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
6190
6191         * init.c (build_member_call): Handle template-id expressions
6192         correctly.
6193         * typeck.c (build_x_function_call): Likewise.
6194
6195 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
6196
6197         * friend.c (make_friend_class): Avoid core dump when
6198         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
6199
6200 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
6201
6202         * decl.c (start_function): Suppress normal linkage heuristics
6203         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
6204
6205 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
6206
6207         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
6208         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
6209
6210 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6211
6212         * parse.y (named_complex_class_head_sans_basetype):
6213         Do not push a scope for error_mark_node.
6214         (maybe_base_class_list): Likewise.
6215
6216         * decl.c (start_decl): Check for error_mark_node as a type.
6217         Detected by g++.brendan/array-refs.C.
6218         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
6219         (maybe_build_cleanup_1): Likewise.  Detected by
6220         g++.jason/incomplete1.C.
6221
6222         * tree.c (build_dummy_object): Use void_zero_node instead of the
6223         error_mark_node.
6224         (is_dummy_object): Check for such a node.
6225         Detected by g++.bob/inherit1.C
6226
6227 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
6228
6229         * method.c (old_backref_index): Split out...
6230         (flush_repeats): From here.  Rename back from try_old_backref.
6231         (build_mangled_name): Put back some old-style repeat handling.
6232
6233 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6234
6235         * lex.c: Don't include setjmp.h.
6236         (parse_float): New static function.
6237         (pf_args): New struct.
6238         (real_yylex): Use them in call to `do_float_handler'.
6239
6240 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
6241
6242         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
6243         * tree.c (layout_basetypes): Not here.
6244         * search.c (dfs_search): Remove; no longer used.
6245
6246 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
6247
6248         * decl2.c (validate_nonmember_using_decl): Issue sensible
6249         error-messages on bogus qualifiers.
6250
6251 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
6252
6253         * call.c (add_function_candidate): Fix uninitialized variable.
6254
6255         * Makefile.in (search.o): Add dependency on varray.h.
6256
6257 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
6258
6259         * decl.c (duplicate_decls): Use same_type_p.
6260         * method.c (try_old_backref): Renamed from flush_repeats.  Use
6261         same_type_p.  Don't try to handle repeats.  Return success.
6262         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
6263         calls from old-style code, too.
6264         (check_ktype): Use same_type_p.
6265         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
6266         (build_qualified_name): Simplify logic.
6267         (process_overload_item): Strip typedefs and quals at the top.
6268         (build_mangled_name_for_type_with_Gcode): Remove call to
6269         type_canonical_variant.
6270         (build_mangled_name): Likewise.  Remove support for old-style
6271         repeats, which have been disabled since 2.7.2.  Don't mess with
6272         TREE_USED.
6273         (build_decl_overload_real): Don't mess with TREE_USED.
6274
6275 1999-03-13  Nathan Sidwell  <nathan@acm.org>
6276
6277         * error.c (cp_printers): Add 'F' escape character.
6278         (dump_type_real): Remove TREE_LIST (fnargs) printing.
6279         Functionality moved to dump_parameters.
6280         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
6281         (dump_function_decl): Extend meaning of V parameter.  Use
6282         dump_parameters and dump_exception_spec.
6283         (dump_parameters): New static function.
6284         (dump_exception_spec): New static function.
6285         (fndecl_as_string): Change argument semantics.  Use
6286         dump_function_decl directly.
6287
6288         * sig.c (build_signature_table_constructor): Use cp_error.
6289
6290 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6291
6292         * semantics.c (finish_switch_cond): Handle error cases gracefully.
6293         Detected by g++.law/enum5.C.
6294
6295         * typeck.c (build_modify_expr): Check for errors after resolving
6296         offsets.  Detected by g++.brendan/static1.C.
6297
6298         * decl.c (complete_array_type): Ignore initial_value if it is an
6299         error.  Detected by g++.benjamin/17930.C.
6300
6301         * typeck2.c (process_init_constructor): Return error if one argument
6302         is in error.  Detected by g++.benjamin/13478.C.
6303
6304 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6305
6306         * decl.c (select_decl): Allow class templates when we need types.
6307         * decl2.c (ambiguous_decl): Likewise.
6308
6309 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
6310
6311         * lex.c (do_identifier): Correct call to enforce_access.
6312         * search.c (accessible_p): Tweak comment.
6313
6314 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
6315
6316         * semantics.c (begin_class_definition): Call build_self_reference.
6317         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
6318
6319         * search.c (assert_canonical_unmarked): Fix typo in prototype.
6320
6321         * search.c (dfs_canonical_queue): New function.
6322         (dfs_assert_unmarked_p): Likewise.
6323         (assert_canonical_unmarked): Likewise.
6324         (access_in_type): Use it.
6325         (accessible_p): Likewise.  Walk the whole tree when umarking.
6326
6327         * sig.c (build_signature_table_constructor): Use accessible_p
6328         instead of compute_access.
6329
6330 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
6331
6332         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
6333
6334 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
6335
6336         * cp-tree.h (flag_access_control): Declare.
6337         (TREE_VIA_PPUBLIC): Document.
6338         (DECL_NONSTATIC_MEMBER_P): New macro.
6339         (enforce_access): Return an indication of whether or not access
6340         was permitted.
6341         (build_self_reference): Change prototype.
6342         (compute_access): Replace with ...
6343         (accessible_p): New function.
6344         (dfs_walk): Change prototype.
6345         (dfs_unmark): Likewise.
6346         (markedp): Likewise.
6347         * call.c (enforce_access): Use accessible_p.
6348         * class.c (build_self_reference): Insert the declaration into the
6349         list of members for this type, and make it public.
6350         * decl.c (xref_basetypes): Avoid ill-timed recursion.
6351         * init.c (build_offset_ref): Use lookup_member, not three separate
6352         name-lookups.  Call enforce_access rather than checking for
6353         illegal accesses here.
6354         (resolve_offset_ref): Likewise.
6355         * lex.c (do_identifier): Likewise.
6356         * method.c (hack_identifier): Likewise.
6357         * parse.y (self_reference): Remove.
6358         (opt_component_decl_list): Don't use it.
6359         * parse.c: Regenerated.
6360         * pt.c (print_candidates): Generalize to handle lists of
6361         overloaded functions.
6362         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
6363         not set.
6364         (get_template_base): Use new calling convention for dfs_walk.
6365         * search.c: Include varray.h.  Add prototypes.
6366         (dfs_walk): Accept a data pointer to pass to the work functions.
6367         All callers changed.  All work functions changed.
6368         (breadth_first_search): Rename to bfs_walk, and make consistent
6369         with dfs_walk.
6370         (dfs_walk_real): New function.
6371         (canonical_binfo): New function.
6372         (context_for_name_lookup): Likewise.
6373         (shared_marked_p): Likewise.
6374         (shared_unmarked_p): Likewise.
6375         (lokup_field_queue_p): Likewise.
6376         (lookup_field_r): Generalize to handle both functions and fields.
6377         (lookup_field): Just call lookup_member.
6378         (lookup_fnfields): Likewise.
6379         (lookup_member): Move body of lookup_field here and generalize.
6380         (dfs_accessible_queue_p): Likewise.
6381         (dfs_accessible_p): Likewise.
6382         (dfs_access_in_type): Likewise.
6383         (access_in_type): Likewise.
6384         (compute_access): Remove, and replace with ...
6385         (accessible_p): New function.
6386         (vbase_types): Remove.
6387         (vbase_decl_ptr_intermediate): Likewise.
6388         (vbase_decl_ptr): Likewise.
6389         (vbase_init_result): Likewise.
6390         (closed_envelopes): Likewise.
6391         (bvtable): Likewise.
6392
6393 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
6394
6395         * call.c (add_function_candidate): Check for proper number of args
6396         before checking the validity of those args.
6397
6398 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
6399
6400         * cp-tree.h (struct lang_type): Add anon_union field.
6401         (ANON_UNION_TYPE_P): Use it instead of examining type.
6402         (SET_ANON_UNION_TYPE_P): New macro.
6403         * decl.c (check_tag_decl): Use it.
6404
6405         * search.c (compute_access): Handle non-type contexts earlier, and
6406         handle NULL_TREE.
6407
6408         * tree.c (build_exception_variant): Use copy_to_permanent.
6409
6410         * decl2.c (setup_initp): Give statics with no priority the default
6411         priority here.
6412         (do_dtors, do_ctors, finish_file): Remove special handling of
6413         non-prioritized statics.
6414
6415 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
6416
6417         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
6418         * decl.c (make_typename_type): Don't issue an error if an
6419         immediate lookup fails; it migt be resolved later.
6420         * friend.c (is_friend): Add comment.
6421         * search.c (breadth_first_search): Add POSTFN and DATA
6422         parameters.  Tidy.  All callers changed.
6423         (lookup_field_queue_p): New function.
6424         (lookup_field_r): Likewise.
6425         (lookup_field_post): Likewise.
6426         (lookup_field): Use them, via breadth_first_search, instead of
6427         duplicating logic.
6428         (compute_access): Robustify.
6429         (lookup_fnfield_info): New structure.
6430
6431 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
6432
6433         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
6434
6435 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
6436
6437         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
6438         cc happy.
6439
6440         * decl2.c (import_export_class): Also return if
6441         CLASSTYPE_INTERFACE_ONLY is set.
6442
6443 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6444
6445         * decl.c (push_overloaded_decl): Only overwrite the old binding if
6446         there was one.
6447         * decl2.c (do_local_using_decl): Fix loop termination.
6448
6449 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
6450
6451         * cp-tree.h (determine_specialization): Don't declare.
6452         * pt.c (determine_specialization): Make it static.  Eliminate
6453         complain parameter.  Note that decl is always non-NULL now, and
6454         simplify accordingly.
6455
6456         * decl.c (maybe_push_to_top_level): Always call
6457         push_cp_function_context.
6458         (pop_from_top_level): Always call pop_cp_function_context.
6459
6460 1999-02-26  Nathan Sidwell  <nathan@acm.org>
6461
6462         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
6463         diagnostics.
6464         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
6465         * init.c (build_new_1): Extra arg to complete_type_or_else.
6466         (build_delete): Likewise.
6467         * typeck.c (require_complete_type): Likewise.
6468         (pointer_int_sum): Likewise.
6469         (pointer_diff): Likewise.
6470         (build_component_ref): Likewise.
6471
6472         * typeck2.c (incomplete_type_error): Always use cp_error.
6473         Show declaration of undefined type, if appropriate.
6474         Deal with UNKNOWN_TYPE nodes.
6475
6476         * typeck.c (require_complete_type): Use TYPE_SIZE as
6477         size_zero_node to mean incomplete type.
6478         (require_complete_type_in_void): New function.
6479         (build_compound_expr): Call complete_type_in_void for LHS.
6480         (build_c_cast): Call complete_type_in_void for void cast.
6481         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
6482         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
6483         require_complete_type_in_void.  Call it.
6484         * cp-tree.h (require_complete_type_in_void): Prototype new function.
6485
6486         * typeck.c (convert_arguments): Use alternative format for
6487         function decls.  Don't require_complete_type here.  Simplify
6488         diagnostic printing.
6489         (convert_for_initialization): Don't require_complete_type on RHS yet.
6490         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
6491
6492         * call.c (build_over_call): Cope with qualified void return type.
6493         * semantics.c (finish_call_expr): Likewise.
6494         * typeck.c (build_function_call_real): Likewise.
6495         (c_expand_return): Likewise.
6496         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
6497
6498         * call.c (print_z_candidates): Use alternate print format, to be
6499         consistent with (pt.c) print_candidates.
6500         * method.c (hack_identifier): List candidate members.
6501         * search.c (lookup_field): Build ambiguous list, and show it, if
6502         ambiguous.
6503
6504 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
6505
6506         * typeck.c (decay_conversion): Don't confuse constant array
6507         variables with their initializers.
6508
6509         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
6510         merging decls.
6511         * pt.c (regenerate_decl_from_template): Tweak for clarity.
6512         (instantiate_decl): Mark a decl instantiated before regenerating
6513         it to avoid recursion.
6514         * tree.c (mapcar): Don't call decl_constant_value unless we know
6515         something is TREE_READONLY_DECL_P.
6516
6517         * class.c (check_for_override): Don't stop checking when we find
6518         the first overridden function.  Delete #if 0'd code.
6519         * search.c (get_matching_virtual): Likewise.
6520
6521 1999-02-25  Richard Henderson  <rth@cygnus.com>
6522
6523         * lang-specs.h: Define __FAST_MATH__ when appropriate.
6524
6525 1999-02-24  Mike Stump  <mrs@wrs.com>
6526
6527         * typeck.c (convert_for_assignment): Allow boolean integral constant
6528         expressions to convert to null pointer.
6529
6530 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6531
6532         * decl.c (lookup_namespace_name): Resolve namespace aliases.
6533
6534         * class.c (push_nested_class): Allow namespaces.
6535
6536         * decl2.c (set_decl_namespace): Add friendp parameter.
6537         * decl.c (grokfndecl): Pass it.
6538         (grokvardecl): Likewise.
6539         * cp-tree.h: Change declaration.
6540
6541 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
6542
6543         * pt.c (tsubst): Allow an array of explicit size zero.
6544
6545 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
6546
6547         * errfn.c: Change varargs code to look like toplev.c.
6548
6549         * method.c (process_modifiers): Don't prepend 'U' for char or
6550         wchar_t.
6551
6552 1999-02-20  Craig Burley  <craig@jcb-sc.com>
6553
6554         * Make-lang.in (cplib2.ready): Don't consider updating
6555         cplib2 stuff if the current directory isn't writable, as
6556         it won't work (such as during a `make install').
6557
6558 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
6559
6560         * decl2.c (start_objects): Make file scope constructors and
6561         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
6562         ASM_OUTPUT_DESTRUCTOR are defined.
6563
6564 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
6565
6566         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
6567         (fn_type_unification): Adjust prototype.
6568         (lookup_fnfields_1): Declare.
6569         * call.c (add_template_candidate_real): Adjust call to
6570         fn_type_unification.
6571         * class.c (add_method): Don't allow duplicate declarations of
6572         constructors or destructors.
6573         (resolve_address_of_overloaded_function): Remove unused variable.
6574         Adjust call to fn_type_unification.
6575         * decl.c (grokfndecl): Be more robust in the face of illegal
6576         specializations.
6577         * decl2.c (check_classfn): Remove hokey handling of member
6578         templates.
6579         * pt.c (determine_specialization): Improve comments.  Adjust to
6580         handle template argument deduction as per the standard.
6581         (check_explicit_specialization): Fix comment spacing.  Handle
6582         type-conversion operators correctly.  Improve error-recovery.
6583         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
6584         (get_bindings_real): Simplify handling of static members.
6585         * search.c (lookup_fnfields_1): Make it have external linkage.
6586         * typeck.c (compparms): Fix comment.
6587         (build_unary_op): Don't try to figure out which template
6588         specialization is being referred to when when the address-of
6589         operator is used with a template function.
6590
6591 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6592
6593         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
6594         keyword to match an analogous change at the top level.
6595
6596         * tree.c (lvalue_or_else): Likewise.
6597
6598 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
6599
6600         * decl.c (xref_basetypes): Comment.
6601         * pt.c (instantiate_class_template): Use xref_basetypes.
6602
6603 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
6604
6605         * cp-tree.h (tsubst): Change prototype.
6606         (tsubst_expr): Likewise.
6607         (tsubst_copy): Likewise.
6608         (type_unification): Remove prototype.
6609         * call.c (convert_default_arg): Adjust call to tsubst_expr.
6610         * class.c (resolve_address_of_overloaded_function): Just use
6611         fn_type_unification.
6612         * decl.c (grokdeclarator): Adjust call to tsubst.
6613         * method.c (build_template_parm_names): Likewise.
6614         * pt.c (GTB_VIA_VIRTUAL): New macro.
6615         (GTB_IGNORE_TYPE): Likewise.
6616         (resolve_overloaded_unification): Add `complain' parameter.
6617         (try_one_overload): Likewise.
6618         (tsubst_template_arg_vector): Likewise.
6619         (tsubst_template_parms): Likewise.
6620         (tsubst_aggr_type): Likewise.
6621         (tsubst_arg_types): Likewise.
6622         (tsubst_call_declarator_parms): Likewise.
6623         (unify): Remove explicit_mask.
6624         (type_unification_real): Likewise.
6625         (get_template_base_recursive): Likewise.
6626         (coerce_template_template_parms): Provide prototype.
6627         (tsubst_function_type): Likewise.
6628         (try_class_unification): New function.
6629         All callers changed to use new complain parameter.
6630         (get_template_base): Use try_class_unification.
6631         (unify): Adjust handling of classes derived from template types.
6632         (fn_type_unification): Substitute explicit arguments before
6633         unification.
6634
6635 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6636
6637         * decl.c (pushdecl): Remove dead code.
6638
6639 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
6640
6641         * decl2.c (finish_objects): Fix code I missed in previous change.
6642
6643 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
6644
6645         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
6646         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
6647
6648         * pt.c (maybe_process_partial_specialization): Complain about
6649         'template <>' on non-specialization.
6650
6651 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
6652
6653         * decl.c (grokdeclarator): Catch wierd declarators.
6654         * decl2.c (finish_file): Don't abort because of namespace parsing
6655         failure.
6656         (check_decl_namespace): Remove.
6657
6658 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
6659
6660         * cp-tree.h (get_template_base): Don't declare.
6661         (dfs_walk): Declare.
6662         (dfs_unmark): Likewise.
6663         (markedp): Likewise.
6664         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
6665         targs to get_template_base.
6666         (get_template_base_recursive): Move here from search.c.  Check to
6667         see that the base found can be instantiated to form the desired
6668         type.
6669         (get_template_base): Likewise.
6670         (get_class_bindings): Simplify.
6671         * search.c (get_template_base_recursive): Move to pt.c.
6672         (get_template_base): Likewise.
6673         (markedp): Make it global.
6674         (dfs_walk): Likewise.
6675         (dfs_unmark): Likewise.
6676
6677 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
6678
6679         * pt.c (maybe_process_partial_specialization): Complain about
6680         specialization in wrong namespace.
6681         * tree.c (decl_namespace_context): New fn.
6682
6683 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6684
6685         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
6686         * pt.c (coerce_template_template_parms): Handle nested
6687         template template parameters.
6688
6689 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
6690
6691         * typeck2.c: Update email addresses.
6692
6693 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6694
6695         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
6696         turned off.
6697
6698 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
6699
6700         * lex.c (retrofit_lang_decl): Split out...
6701         (build_lang_decl): From here.
6702         * decl.c (pushdecl): Call it for functions generated by the middle
6703         end that don't have DECL_LANG_SPECIFIC.
6704         * cp-tree.h: Declare it.
6705
6706         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
6707         (start_objects, finish_objects): Only use special
6708         init_priority code if the user specified a priority.
6709         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
6710         objects.
6711
6712 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
6713
6714         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
6715         mkstemp.o.  Get them from libiberty now.
6716         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
6717
6718 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
6719
6720         * decl2.c (lang_decode_option): Use read_integral_parameter.
6721
6722 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
6723
6724         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
6725         before calling complete_type_or_else.
6726
6727 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6728
6729         * input.c (inline): Don't define, its handled by system.h.
6730
6731 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
6732
6733         * decl2.c: Don't define flag_no_ident here.  Don't process
6734         -f(no-)ident here.
6735         * cp-tree.h: Don't declare flag_no_ident here.
6736         * lang-specs.h: Map -Qn to -fno-ident.
6737
6738 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
6739
6740         * cp-tree.h (struct tree_binding): Replace scope field with a union.
6741         (BINDING_SCOPE): Adjust.
6742         * decl.c (BINDING_LEVEL): Adjust.
6743
6744 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
6745
6746         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
6747         member constants.
6748
6749         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
6750         a ctor initializer.
6751
6752         * tree.c (equal_functions): Fix name in prototype.
6753
6754         * decl.c (push_local_binding): Add FLAGS argument.
6755         (pushdecl, push_overloaded_decl): Pass it.
6756         * decl2.c (do_local_using_decl): Likewise.
6757         * cp-tree.h: Adjust prototype.
6758         * decl.c (poplevel): Fix logic.
6759
6760         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
6761         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
6762         (cat_namespace_levels): Don't loop forever.
6763
6764 1999-01-25  Richard Henderson  <rth@cygnus.com>
6765
6766         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
6767
6768 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
6769
6770         * class.c (resolve_address_of_overloaded_function): Mark the
6771         chosen function used.
6772
6773         * call.c (build_call): Make sure that a function coming in has
6774         been marked used already.
6775         * decl.c (expand_static_init): Call mark_used instead of
6776         assemble_external.
6777         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
6778         alloc_eh_object, expand_throw): Likewise.
6779         * init.c (build_builtin_delete_call): Likewise.
6780         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
6781         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
6782         expand_generic_desc): Likewise.
6783
6784 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6785
6786         * tree.c (equal_functions): New function.
6787         (ovl_member): Call it.
6788
6789 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
6790
6791         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
6792
6793 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6794
6795         * decl.c (decls_match): Return 1 if old and new are identical.
6796         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
6797
6798 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
6799
6800         * decl.c (start_function): Make member functions one_only on windows.
6801         * decl2.c (import_export_decl): Likewise.
6802
6803         * decl.c (grokdeclarator): Don't complain about implicit int in
6804         a system header.  Change same-name field check to not complain in
6805         a system header instead of within extern "C".
6806
6807 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
6808
6809         * cp-tree.h (PUSH_GLOBAL): New macro.
6810         (PUSH_LOCAL): Likewise.
6811         (PUSH_USING): Likewise.
6812         (namespace_bindings_p): Declare.
6813         (push_overloaded_decl): Likewise.
6814         * decl.c (push_overloaded_decl): Don't make it static.  Check for
6815         illegal declarations after using declarations here.
6816         (namespace_bindings_p): Likewise.
6817         (duplicate_decls): Don't consider declarations from different
6818         namespaces to be the same.
6819         (pushdecl): Use symbolic PUSH_ constants in calls to
6820         push_overloaded_decl.
6821         (push_overloaded_decl_1): Likewise.
6822         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
6823         (do_nonmember_using_decl): Check for illegal using declarations
6824         after ordinary declarations here.
6825         (do_local_using_decl): Call pushdecl to insert declarations.
6826
6827 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
6828
6829         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
6830
6831 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
6832
6833         * tree.c (build_cplus_array_type_1): Don't call build_array_type
6834         for types involving template parameters.
6835
6836         * cp-tree.h (PARM_DECL_EXPR): Delete.
6837         (convert_default_arg): Change prototype.
6838         (check_default_argument): Declare.
6839         (search_tree): Likewise.
6840         * call.c (convert_default_arg): Take the function to which the
6841         default argument belongs as a parameter, and do any necessary
6842         instantiation here, instead of ...
6843         (build_over_call): Here.
6844         * decl.c (local_variable_p): New function.
6845         (check_default_argument): Likewise, split out and tidied from ...
6846         (grokparms): Here.
6847         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
6848         * pt.c (tsubst_call_declarator_parms): New function.
6849         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
6850         with CALL_EXPRs, rather than trying to be clever.
6851         (tsubst): Use tsubst_call_declarator_parms.
6852         * tree.c (search_tree): Don't make it static.
6853         * typeck.c (convert_arguments): Use new interface to
6854         convert_default_arg.
6855
6856 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
6857
6858         * error.c (dump_function_decl): Don't print the argument types for
6859         a function when the verbosity level is negative.
6860
6861         * call.c (build_over_call): Check format attributes at call-time.
6862
6863         * pt.c (tsubst_copy): Fix comment.
6864         (unify): Don't allow unification with variable-sized arrays.
6865
6866         * semantics.c (finish_stmt_expr): When processing a template make
6867         the BIND_EXPR long-lived.
6868
6869 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
6870
6871         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
6872         (import_export_vtable): Not here.
6873
6874 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
6875
6876         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
6877         non-static member function.
6878
6879 1999-01-18  Nathan Sidwell  <nathan@acm.org>
6880
6881         * class.c (instantiate_type): Only diagnose illegal address of member
6882         function if complaining.
6883
6884         * decl.c (lookup_name_real): Remove duplicate code.
6885
6886 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
6887
6888         * tree.c (copy_template_template_parm): Use permanent_obstack.
6889
6890 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6891
6892         * pt.c (unify): Remove restrictions on deduction of argument
6893         of template template parameters.
6894
6895 1999-01-18  Nathan Sidwell  <nathan@acm.org>
6896
6897         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
6898
6899         * class.c (resolve_address_of_overloaded_function): Show list of
6900         all candidates, when none of them match.
6901
6902 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
6903
6904         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
6905         definition of 'casting away const' in reinterpret_cast<>.
6906
6907 1999-01-18  Graham  <grahams@rcp.co.uk>
6908
6909         * cvt.c: Add include for decl.h, remove extern for
6910         static_aggregates which is now provided by decl.h.
6911
6912         * Makefile.in (cvt.o): Add dependency for decl.h and missing
6913         dependencies for convert.h and flags.h.
6914
6915 1999-01-18  Nathan Sidwell  <nathan@acm.org>
6916
6917         * decl2.c (do_dtors): Set current location to that of the
6918         decl, for sensible diagnostics and debugging.
6919         (check_classfn): Issue `incomplete type' error, if
6920         class is not defined.
6921
6922 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
6923
6924         * cp-tree.h: Add prototype for bound_pmf_p.
6925
6926 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
6927             Manfred Hollstein <manfred@s-direktnet.de>
6928
6929         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
6930         -Wreturn-type.
6931
6932 1999-01-16  Nathan Sidwell  <nathan@acm.org>
6933
6934         * cp-tree.h (struct lang_type): Added has_mutable flag.
6935         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
6936         (TYPE_HAS_MUTABLE_P): New macro to read it.
6937         (cp_has_mutable_p): Prototype for new function.
6938         * class.c (finish_struct_1): Set has_mutable from members.
6939         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
6940         it contains a mutable.
6941         * typeck.c (cp_has_mutable_p): New function.
6942
6943 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
6944
6945         * pt.c (process_template_parm): Ignore top-level qualifiers on
6946         non-type parameters.
6947
6948         * decl.c (start_function): Use current_function_parms in the call
6949         to require_complete_type_for_parms, not the probably empty
6950         DECL_ARGUMENTS.
6951
6952 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
6953
6954         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
6955
6956         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
6957         that we don't suppress the other copies.
6958         * lex.c (handle_cp_pragma): Likewise.
6959
6960 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
6961
6962         * decl.c (grokdeclarator): Undo 1998-12-14 change.
6963         * tree.c (build_cplus_array_type_1): Likewise.
6964         * pt.c (instantiate_class_template): Remove misleading comment.
6965         (tsubst_aggr_type): Substitute if there are template parameters,
6966         regardless of whether or not they use template arguments.
6967         (unify): Likewise, but for unification.
6968
6969 1999-01-12  Richard Henderson  <rth@cygnus.com>
6970
6971         * cp-tree.h (flag_permissive): Declare extern.
6972
6973 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
6974
6975         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
6976         here.
6977         (lang_type): Add is_partial_instantiation.  Decrease width of
6978         dummy.
6979         (PARTIAL_INSTANTIATION_P): New macro.
6980         (OPERATOR_TYPENAME_P): Remove.
6981         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
6982         OPERATOR_TYPENAME_P.
6983         (grok_op_properties): Likewise.
6984         * friend.c (do_friend): Handle friends that are member functions
6985         correctly.
6986         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
6987         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
6988         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
6989         any more partial instantiation than is absolutely necessary for
6990         implicit typename.  Set PARTIAL_INSTANTIATION_P.
6991         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
6992         * semantics.c (begin_class_definition): Handle partial
6993         specializations of a type that was previously partially
6994         instantiated.
6995
6996 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
6997
6998         * g++spec.c (LIBSTDCXX): Provide default definition.
6999         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
7000
7001 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7002
7003         * Make-lang.in (g++.o): Depend on prefix.h.
7004
7005 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
7006
7007         * tree.c (bound_pmf_p): New fn.
7008         * typeck.c (build_c_cast): Use it.
7009
7010         * decl.c (grok_op_properties): Use same_type_p.
7011
7012 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7013
7014         * Makefile.in (cvt.o): Depend on toplev.h.
7015
7016         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
7017
7018         * cvt.c: Include toplev.h.
7019
7020         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
7021         definitions.
7022
7023         * init.c (expand_vec_init): Initialize variable `itype'.
7024
7025         * lex.c (yyerror): Cast the argument passed to a ctype function to
7026         an unsigned char.
7027
7028         * method.c (build_mangled_C9x_name): Wrap prototype and definition
7029         in "HOST_BITS_PER_WIDE_INT >= 64".
7030
7031         * typeck.c (build_binary_op): Mark parameter `convert_p' with
7032         ATTRIBUTE_UNUSED.
7033
7034 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
7035
7036         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
7037         * tree.c (build_exception_variant): Don't crash on empty throw
7038         specs.
7039
7040 1998-12-18  DJ Delorie  <dj@cygnus.com>
7041
7042         * cvt.c (convert_to_reference): Check for both error_mark_node
7043         and NULL_NODE after call to convert_for_initialization.
7044
7045 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
7046
7047         * error.c (interesting_scope_p): New fn.
7048         (dump_simple_decl): Use it.
7049         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
7050         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
7051
7052 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
7053
7054         * class.c (resolve_address_of_overloaded_function): Do conversion
7055         to correct type here, rather than ...
7056         (instantiate_type): Here.
7057
7058         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
7059         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
7060         (decl_template_parm_p): Remove.
7061         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
7062         parameter.
7063         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
7064         * pt.c (push_inline_template_parms_recursive): Set it.
7065         (decl_template_parm_p): Remove.
7066         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
7067         (process_template_parm): Set it.
7068
7069 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
7070
7071         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
7072         if configured with cpplib.
7073
7074 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
7075
7076         * decl.c (poplevel): Make sure ns_binding is initialized.
7077
7078         * decl.c (finish_function): Undo inadvertent change in previous
7079         patch.
7080
7081 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
7082
7083         * class.c (pushclass): Tweak handling of class-level bindings.
7084         (resolve_address_of_overloaded_function): Update pointer-to-member
7085         handling.
7086         (instantiate_type): Likewise.
7087         * cvt.c (cp_convert_to_pointer): Likewise.
7088         * decl.c (pop_binding): Take the DECL to pop, not just the name.
7089         Deal with `struct stat' hack.
7090         (binding_level): Add to documentation.
7091         (push_binding): Clear BINDING_TYPE.
7092         (add_binding): New function.
7093         (push_local_binding): Use it.
7094         (push_class_binding): Likewise.
7095         (poplevel): Adjust calls to pop_binding.
7096         (poplevel_class): Likewise.
7097         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
7098         declarations to current binding level.
7099         (push_class_level_binding): Likewise.
7100         (push_overloaded_decl): Adjust handling of OVERLOADs in local
7101         bindings.
7102         (lookup_namespace_name): Don't crash when confronted with a
7103         TEMPLATE_DECL.
7104         (lookup_name_real): Do `struct stat' hack in local binding
7105         contexts.
7106         (build_ptrmemfunc_type): Adjust documentation.
7107         (grokdeclarator): Don't avoid building real array types when
7108         processing templates unless really necessary.
7109         (finish_method): Adjust calls to pop_binding.
7110         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
7111         not reparse_decl_as_expr.
7112         (build_expr_from_tree): Deal with a template-id as the function to
7113         call in a METHOD_CALL_EXPR.
7114         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
7115         (maybe_adjust_types_For_deduction): Don't do peculiar things with
7116         METHOD_TYPEs here.
7117         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
7118         pointer-to-member types where necessary.
7119         * tree.c (build_cplus_array_type_1): Don't avoid building real
7120         array types when processing templates unless really necessary.
7121         (build_exception_variant): Compare the exception lists correctly.
7122
7123 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
7124
7125         * cp-tree.def (CPLUS_BINDING): Update documentation.
7126         * cp-tree.h (LOCAL_BINDING_P): New macro.
7127         (lang_identifier): Rename local_value to bindings.
7128         (tree_binding): Make `scope' of type `void*', not `tree'.
7129         (BINDING_SCOPE): Update documentation.
7130         (IDENTIFIER_LOCAL_VALUE): Remove.
7131         (IDENTIFIER_CLASS_VALUE): Document.
7132         (IDENTIFIER_BINDING): New macro.
7133         (IDENTIFIER_VALUE): Likewise.
7134         (TIME_IDENTIFIER_TIME): Likewise.
7135         (TIME_IDENTIFIER_FILEINFO): Likewise.
7136         (IMPLICIT_TYPENAME_P): Likewise.
7137         (set_identifier_local_value): Remove.
7138         (push_local_binding): New function.
7139         (push_class_binding): Likewise.
7140         * class.c (pushclass): Update comments; use push_class_binding.
7141         * decl.c (set_identifier_local_value_with_scope): Remove.
7142         (set_identifier_local_value): Likewise.
7143         (push_binding): New function.
7144         (pop_binding): Likewise.
7145         (binding_level): Update documentation.  Remove shadowed.
7146         (BINDING_LEVEL): New macro.
7147         (free_binding_nodes): New variable.
7148         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
7149         BLOCK_VARs when doing for-scope extension.  Remove effectively
7150         dead code.
7151         (pushlevel_class): Tweak formatting.
7152         (poplevel_class): Adjust for new name-lookup scheme.
7153         (print_binding_level): Likewise.
7154         (store_bindings): Likewise.
7155         (pushdecl): Likewise.
7156         (pushdecl_class_level): Likewise.
7157         (push_class_level_binding): Likewise.
7158         (push_overloaded_decl): Update comments.  Adjust for new
7159         name-lookup scheme.
7160         (lookup_name_real): Likewise.
7161         (lookup_name_current_level): Likewise.
7162         (cp_finish_decl): Likewise.
7163         (require_complete_types_for_parms): Likewise.  Remove misleading
7164         #if 0'd code.
7165         (grok_parms): Likewise.  Don't call
7166         require_complete_types_for_parms here.
7167         (grok_ctor_properties): Don't treat templates as copy
7168         constructors.
7169         (grop_op_properties): Or as assignment operators.
7170         (start_function): Document.  Adjust for new name-lookup scheme.
7171         (finish_function): Likewise.
7172         * decl2.c (do_local_using_decl): Use push_local_binding.
7173         * lex.c (begin_definition_of_inclass_inline): New function, split
7174         out from ...
7175         (do_pending_inlines): Here, and ...
7176         (process_next_inline): Here.
7177         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
7178         (init_filename_times): Likewise.
7179         (extract_interface_info): Likewise.
7180         (ste_typedecl_interface_info): Likewise.
7181         (check_newline): Likewise.
7182         (dump_time_statistics): Likewise.
7183         (handle_cp_pragma): Likewise.
7184         (do_identifier): Adjust for new name-lookup scheme.
7185         * parse.y (function_try_block): Return ctor_initializer_opt value.
7186         (fndef): Use it.
7187         (fn.defpen): Pass appropriate values to start_function.
7188         (pending_inline): Use functor_try_block value, and pass
7189         appropriate values to finish_function.
7190         * pt.c (is_member_template): Update documentation; remove handling
7191         of FUNCTION_DECLs.  As per name, this function should deal only in
7192         TEMPLATE_DECLs.
7193         (decl_template_parm_p): Change name of olddecl parameter to decl.
7194         (check_template_shadow): Adjust for new name-lookup scheme.
7195         (lookup_template_class): Likewise.
7196         (tsubst_decl): Tweak so as not to confuse member templates with
7197         copy constructors and assignment operators.
7198         (unify): Handle UNION_TYPEs.
7199         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
7200         (lang_print_xnode): Adjust for new name-lookup scheme.
7201         * typeck.c (mark_addressable): Likewise.
7202         (c_expand_return): Likewise.
7203
7204 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
7205
7206         * decl.c (grokdeclarator): Allow field with same name as class
7207         in extern "C".
7208
7209         * decl.c (lookup_name_real): Don't limit field lookup to types.
7210         * class.c (check_member_decl_is_same_in_complete_scope): No error
7211         if icv and x are the same.
7212         * lex.c (do_identifier): Tweak error message.
7213
7214 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
7215
7216         * decl.c (start_enum): Use push_obstacks, not
7217         end_temporary_allocation.
7218         (finish_enum): Call pop_obstacks.
7219
7220 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
7221
7222         * class.c (instantiate_type): Return error_mark_node rather than
7223         junk.
7224
7225 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
7226
7227         * cp-tree.h (most_specialized_instantiation): New function.
7228         (print_candidates): Likewise.
7229         * class.c (validate_lhs): Remove.
7230         (resolve_address_of_overloaded_function): New function, split out
7231         and then substantially reworked, from ...
7232         (instantiate_type): Use it.  Simplify.
7233         * cvt.c (convert_to_reference): Complain when caller has indicated
7234         that's the right thing to do.  Don't crash if instantiate_type
7235         fails.
7236         * pt.c: Substitute `parameters' for `paramters' throughout.
7237         (print_candidates): Don't make it static.
7238         (most_specialized_instantiation): Split out from ...
7239         (most_specialized): Here.
7240
7241 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
7242
7243         * lex.c (lang_init_options): Initialize cpplib.
7244         * decl2.c (parse_options,cpp_initialized): Removed.
7245         (lang_decode_option): Move initialization of cpplib to
7246         lang_init_options.
7247
7248 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
7249
7250         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
7251         well as the TYPE_DECL, when a typedef name is assigned to a
7252         previously anonymous type.
7253
7254 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
7255
7256         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
7257         __cp_eh_info for getting the eh info pointer.  Add table_index to
7258         field list.
7259         (push_eh_cleanup): Don't increment 'handlers' data field.
7260         (process_start_catch_block): Don't set the 'caught' field.
7261
7262         * cp/exception.cc (CP_EH_INFO): New macro for getting the
7263         exception info pointer within library routines.
7264         (__cp_eh_info): Use CP_EH_INFO.
7265         (__start_cp_handler): Get exception info pointer, set caught field,
7266         and increment the handlers field.  Avoids this being done by handlers.
7267         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
7268         (uncaught_exception): Use CP_EH_INFO macro.
7269
7270 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
7271
7272         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
7273
7274 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
7275
7276         * lex.c (check_newline): Add support for \ as `natural'
7277         characters in file names in #line to be consistent with #include
7278         handling.  We support escape processing in the # 1 "..." version of
7279         the command.  See also support in cp/lex.c.
7280
7281 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
7282
7283         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
7284         structure.
7285
7286 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
7287
7288         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
7289
7290         * error.c (dump_simple_decl): Also print namespace context.
7291         (dump_function_decl): Likewise.
7292
7293         * decl2.c (ambiguous_decl): Don't print old value if it's
7294         error_mark_node.
7295
7296         * decl.c (lookup_name_real): Fix handling of local types shadowed
7297         by a non-type decl.  Remove obsolete code.
7298         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
7299
7300         * lang-options.h: Add -fpermissive.
7301         * decl2.c: Likewise.
7302         * cp-tree.h: Add flag_permissive.
7303         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
7304         were specified, set flag_pedantic_errors.
7305         * call.c (build_over_call): Turn dropped qualifier messages
7306         back into pedwarns.
7307         * cvt.c (convert_to_reference): Likewise.
7308         * typeck.c (convert_for_assignment): Likewise.
7309
7310 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
7311
7312         * decl2.c (coerce_new_type): Use same_type_p.
7313         (coerce_delete_type): Likewise.
7314
7315         * call.c (check_dtor_name): Return 1, not error_mark_node.
7316
7317 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
7318
7319         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
7320         if MULTIPLE_SYMBOL_SPACES.
7321
7322         * pt.c (check_template_shadow): New fn.
7323         * decl2.c (grokfield): Use it.
7324         * decl.c (pushdecl): Likewise.
7325         (pushdecl_class_level): Likewise.
7326         (start_method): Likewise.
7327         (xref_tag): Don't try to use 't' if we're defining.
7328
7329         * call.c (check_dtor_name): Just return an error_mark_node.
7330         * pt.c (lookup_template_class): Complain about using non-template here.
7331         * parse.y (apparent_template_type): Not here.
7332
7333         * pt.c (check_explicit_specialization): Complain about specialization
7334         with C linkage.
7335
7336         * lang-options.h: Add -f{no-,}implicit-inline-templates.
7337
7338         * pt.c (convert_nontype_argument): Don't assume that any integer
7339         argument is intended to be a constant-expression.
7340
7341 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
7342
7343         * class.c (handle_using_decl): Fix comment.  Don't lookup
7344         constructors in base classes.
7345         (validate_lhs): Fix typo in comment.
7346         * search.c (lookup_field_1): Don't return a USING_DECL.
7347
7348         * cp-tree.h (DECL_ACCESS): Improve documentation.
7349
7350         * decl.c (expand_static_init): Don't set the initialization-done
7351         flag until the initialization is done.
7352
7353 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
7354
7355         * decl2.c (validate_nonmember_using_decl): Complain about using
7356         declarations for class members.
7357
7358 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
7359
7360         * typeck2.c (process_init_constructor): Use same_type_p.
7361
7362         * decl.c (check_tag_decl): Don't warn about null decl inside a
7363         class.
7364
7365         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
7366         UNIFY_ALLOW_NONE.
7367         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
7368         (resolve_overloaded_unification): Strip baselinks.
7369
7370 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7371
7372         * g++spec.c: Don't prototype xmalloc.
7373
7374 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
7375
7376         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
7377
7378         * decl.c (check_tag_decl): Do complain about null friend decl at
7379         file scope.
7380
7381 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
7382
7383         * lex.c (make_lang_type): Clear the whole struct lang_type, not
7384         only the first multiple of sizeof (int).
7385
7386 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
7387
7388         * decl.c (start_decl): An explicit specialization of a static data
7389         member is only a definition if it has an initializer.
7390
7391         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
7392         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
7393         cp_finish_decl.
7394         * init.c (expand_default_init): Check for DIRECT_BIND instead of
7395         DECL_ARTIFICIAL.
7396
7397         * call.c (build_over_call): Use build_decl.
7398
7399         * except.c (expand_throw): Just use convert, not
7400         build_reinterpret_cast.
7401
7402         * lex.c (handle_generic_pragma): Use token_buffer.
7403
7404         * decl.c (check_tag_decl): Don't complain about null friend decl.
7405
7406 1998-11-24  Dave Pitts  <dpitts@cozx.com>
7407
7408         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
7409         first position.
7410         * lex.c (check_newline): Use ISALPHA.
7411         (readescape): Use ISGRAPH.
7412         (yyerror): Use ISGRAPH.
7413
7414 1998-11-24  Nathan Sidwell  <nathan@acm.org>
7415
7416         * search.c (get_abstract_virtuals): Do not use initial
7417         CLASSTYPE_ABSTRACT_VIRTUALS.
7418         * typeck2.c (abstract_virtuals_error): Show location of abstract
7419         declaration.
7420         * call.c (build_new_method_call): Use
7421         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
7422         * class.c (finish_struct_bits): Don't bother working out whether
7423         get_abstract_virtuals will do anything, just do it.
7424
7425 1998-11-24  Graham  <grahams@rcp.co.uk>
7426
7427         * typeck.c (build_component_ref): Remove unused statement.
7428
7429 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
7430
7431         * class.c (add_method): Catch invalid overloads.
7432
7433         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
7434         * search.c (lookup_conversions): Handle getting real OVERLOADs.
7435         (add_conversions): Likewise.  Revert last change.
7436         * call.c (add_conv_candidate): Pass totype to add_candidate instead
7437         of fn.  Don't add a new candidate if the last one was for the same
7438         type.
7439         (print_z_candidates): Handle getting a type as a function.
7440         (joust): If we got two conversion candidates to the same type,
7441         just pick one.
7442         (build_object_call): Lose 'templates'.
7443         (build_user_type_conversion_1): Handle getting real OVERLOADs.
7444
7445 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
7446
7447         * typeck2.c (process_init_constructor): If there are elements
7448         that don't have initializers and they need to have constructors
7449         run, supply them with initializers.
7450
7451         * class.c (finish_struct_1): A class with a 0-width bitfield is
7452         still empty.
7453
7454 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
7455
7456         * pt.c (instantiate_class_template): Don't try to figure out what
7457         specialization to use for a partial instantiation.  Correct
7458         typos in a couple of comments.  Avoid calling uses_template_parms
7459         multiple times.
7460
7461 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
7462
7463         * method.c (process_overload_item): Add call to
7464         build_mangled_C9x_name for intTI_type_nodes.
7465         (build_mangled_C9x_name): Add prototype, define.
7466         * decl.c (init_decl_processing): Add names for
7467         TImode_type_node.
7468
7469 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
7470
7471         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
7472
7473         * class.c (finish_struct_1): Set things up for 0-width bitfields
7474         like we do for others.
7475
7476         * decl.c (check_tag_decl): New fn.
7477         (shadow_tag): Split out from here.
7478         * decl2.c (grok_x_components): Call it.
7479
7480 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
7481
7482         * decl.c: Lose warn_about_return_type.
7483         (grokdeclarator): Always complain about implicit int, except for
7484         `main () { ... }'.
7485
7486         * decl.c (tag_name): New fn.
7487         (xref_tag): Complain about using typedef-name after class-key.
7488
7489         * init.c (expand_vec_init): Also keep going if from_array.
7490
7491         * tree.c (is_overloaded_fn): Also handle the output of
7492         build_offset_ref.
7493
7494         * decl.c (grokdeclarator): Use constructor_name when comparing
7495         field name against enclosing class.
7496         * class.c (finish_struct_anon): Likewise.
7497
7498 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
7499
7500         * decl.c (poplevel): Remove code to handle KEEP == 2.
7501         (finish_function): Don't confuse BLOCK-order when
7502         processing a destructor.
7503
7504 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
7505
7506         * decl.c (require_complete_types_for_parms): Call layout_decl
7507         after we've completed the type.
7508
7509 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7510
7511         * decl2.c (validate_nonmember_using_decl): Allow using templates
7512         from the global namespace.
7513
7514 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
7515
7516         Handle specifying template args to member function templates.
7517         * tree.c (build_overload): Always create an OVERLOAD for a template.
7518         * search.c (add_conversions): Handle finding an OVERLOAD.
7519         * decl2.c (check_classfn): Likewise.
7520         * lex.c (identifier_type): See through a baselink.
7521         * parse.y (do_id): Don't call do_identifier if we got a baselink.
7522         * class.c (instantiate_type, case TREE_LIST): Recurse.
7523
7524         * decl.c (grokdeclarator): Allow a boolean constant for array
7525         bounds, odd as that sounds.
7526
7527         * pt.c (unify): Be more strict about non-type parms, except for
7528         array bounds.
7529         (UNIFY_ALLOW_INTEGER): New macro.
7530
7531 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
7532
7533         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
7534
7535 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
7536
7537         * semantics.c (begin_class_definition): Call
7538         maybe_process_partial_specialization before push_template_decl.
7539         Don't call push_template_decl for a specialization.
7540         * search.c (lookup_field): Do return a member template class.
7541         * decl2.c (handle_class_head): Handle member template classes.
7542
7543         * decl.c (grokdeclarator): A parm type need not be complete.
7544
7545         * pt.c (convert_nontype_argument): Fix thinko.
7546
7547 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
7548
7549         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
7550         (global_delete_fndecl): New variable.
7551         * decl.c (global_delete_fndecl): Define it.
7552         (init_decl_processing): Set it.
7553         * init.c (build_builtin_delete_call): Use it.
7554         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
7555         nodes.
7556
7557 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
7558
7559         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
7560         type.
7561
7562         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
7563         * call.c (build_object_call): Also support references to functions.
7564         * typeck.c (convert_for_initialization): Don't decay a function
7565         if the target is a reference to function.
7566
7567         * search.c (add_conversions): Get all the overloads from a class.
7568
7569         * decl.c (grok_ctor_properties): Complain about any constructor
7570         that will take a single arg of the class type by value.
7571
7572         * typeck2.c (build_functional_cast): Can't create objects of
7573         abstract classes this way.
7574         * cvt.c (ocp_convert): Likewise.
7575
7576         * decl.c (grokfndecl): Member functions of local classes are not
7577         public.
7578
7579 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
7580
7581         * Make-lang.in (cc1plus): Add dependency on hash.o.
7582
7583 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
7584
7585         * search.c (get_abstract_virtuals): Complain about virtuals with
7586         no final overrider.
7587         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
7588         with no final overrider.
7589         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
7590         on virtuals with no final overrider.
7591
7592         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
7593
7594         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
7595         after layout_type.
7596
7597         * friend.c (do_friend): Don't set_mangled_name_for_decl.
7598
7599         * class.c (finish_struct_anon): Complain about non-fields.
7600         * decl2.c (build_anon_union_vars): Likewise.
7601
7602         * decl.c (grokdeclarator): Normal data members can't have the same
7603         name as the class, either.
7604         * class.c (finish_struct_anon): Neither can members of an
7605         anonymous union.
7606
7607 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
7608
7609         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
7610         (TYPE_BINFO): Likewise.
7611         (IS_AGGR_TYPE): Tweak.
7612         (SET_IS_AGGR_TYPE): New macro.
7613         (CLASS_TYPE_P): Tweak.
7614         (lang_type): Group mark bitfields together.  Remove linenum.
7615         (CLASSTYPE_SOURCE_LINE): Remove macro.
7616         (CLASSTYPE_MARKED_N): New macro.
7617         (SET_CLASSTYPE_MARKED_N): Likewise.
7618         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
7619         (CLASS_TYPE_MARKED_*): Use them.
7620         (SET_CLASSTYPE_MARKED_*): Likewise.
7621         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
7622         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
7623         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
7624         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
7625         * class.c (class_cache_obstack): New variable.
7626         (class_cache_firstobj): Likewise.
7627         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
7628         (pushclass): Free the cache, when appropriate.
7629         (popclass): Tidy.
7630         (maybe_push_cache_obstack): Use class_cache_obstack.
7631         * decl.c (include hash.h).
7632         (typename_hash): New function.
7633         (typename_compare): Likewise.
7634         (build_typename_type): Check the hash table to avoid creating
7635         duplicates.
7636         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
7637         (grokdeclarator): Use CLASS_TYPE_P.
7638         (xref_basetypes): Likewise.
7639         (start_function): Likewise.  Don't put current_class_ref on the
7640         permanent obstack.
7641         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
7642         and TYPE_TI_ARGS.
7643         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
7644         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
7645         fields for types other than class types.  Do clear TYPE_ALIAS_SET
7646         for types other than class types, though.
7647         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
7648         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7649         * pt.c (process_template_parm): Don't set
7650         CLASSTYPE_GOT_SEMICOLON.
7651         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7652         Coerce arguments on the momentary obstack.
7653         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7654         (instantiate_class_template): Calculate template arguments on the
7655         momentary obstack.  Tidy.
7656         (tsubst_template_arg_vector): Use make_temp_vec.
7657         (tsubst_aggr_type): Put template arguments on the momentary
7658         obstack.
7659         (tsubst_decl): Likewise.
7660         (tsubst): Copy the array bounds index to the permanent obstack
7661         before building index types.  Use new macros.
7662         (unify): Use new macros.
7663         (do_type_instantiation): Likewise.
7664         * search.c (lookup_fnfields_1): Use new macros.
7665         (dfs_pushdecls): Build envelopes on the cache obstack.
7666         (dfs_compress_decls): Use new macros.
7667         (push_class_decls): Build on the cache obstack.
7668         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
7669         * sign.c (build_signature_pointer_or_reference_type): Use
7670         SET_IS_AGGR_TYPE.
7671         * tree.c (make_binfo): Check CLASS_TYPE_P.
7672         (copy_template_template_parm): Adjust.
7673         (make_temp_vec): Use push_expression_obstack.
7674         * typeck.c (complete_type): Use new macros.
7675         (comptypes): Likewise.
7676
7677 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
7678
7679         * pt.c (tsubst): Add diagnostics for invalid array, reference
7680         and pointer to member types.
7681
7682 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
7683
7684         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
7685
7686         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
7687         Simplify.
7688
7689         * parse.y (structsp): Fix cut-and-paste error.
7690
7691         * init.c (build_new): Complain about non-integral size.
7692
7693         * parse.y (unary_expr): Complain about defining types in sizeof.
7694
7695         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
7696
7697         * rtti.c (build_x_typeid): Complain about typeid without
7698         including <typeinfo>.
7699         (get_typeid): Likewise.  Complain about typeid of incomplete type.
7700         (get_tinfo_fn_dynamic): Likewise.
7701         (get_typeid_1): Not static anymore.
7702         * except.c (build_eh_type_type): Use get_typeid_1.
7703
7704         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
7705         ambiguous or private bases.  Fix warning for reference cast.
7706
7707 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
7708
7709         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
7710         * decl.c (duplicate_decls): Remove special-case code to deal with
7711         template friends, and just do the obvious thing.
7712         * pt.c (register_specialization): Tweak for clarity, and also to
7713         clear DECL_INITIAL for an instantiation before it is merged with a
7714         specialization.
7715         (check_explicit_specialization): Fix indentation.
7716         (tsubst_friend_function): Handle both definitions in friend
7717         declaration and outside friend declarations.
7718         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
7719         (regenerate_decl_from_template): Tweak accordingly.
7720         (instantiate_decl): Likewise.
7721
7722 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
7723
7724         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
7725         member function reference to error.
7726         * cvt.c (ocp_convert): Complain about converting an overloaded
7727         function to void.
7728
7729         * init.c (build_offset_ref): Just return a lone static member
7730         function.
7731
7732         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
7733         not internal ones.
7734
7735         * typeck.c (build_binary_op_nodefault): Improve error handling.
7736
7737         * decl.c (grokfndecl): Complain about making 'main' a template.
7738
7739         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
7740
7741         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
7742         TYPE_DECL in a template.
7743
7744 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
7745
7746         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
7747
7748         * decl.c (struct cp_function): Add named_label_uses.
7749         (push_cp_function_context): Save it.
7750         (pop_cp_function_context): Restore it.
7751         (define_label): Also complain about jumping into the scope of
7752         non-POD objects that don't have constructors.
7753         * tree.c (pod_type_p): New fn.
7754
7755         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
7756         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
7757         (get_tinfo_fn): Not here.
7758         * repo.c (repo_get_id): Abort if we get called for an incomplete
7759         type.
7760
7761 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
7762
7763         * except.c (expand_throw): Make sure first argument to
7764         __cp_push_exception is of type `void*' to avoid spurious error
7765         messages.
7766
7767 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
7768
7769         * pt.c (try_one_overload): Take orig_targs again.  Only check for
7770         mismatches against them; we don't care what a previous call found.
7771         (resolve_overloaded_unification): Adjust.
7772
7773         * search.c (lookup_field): Don't return anything for a non-type
7774         field from a dependent type.
7775         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
7776         in an array declarator.
7777         (start_decl): Push into the class before looking for the field.
7778
7779 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
7780
7781         * method.c (build_overload_value): Handle REFERENCE_TYPE.
7782
7783 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7784
7785         * decl.c (grokdeclarator): Allow namespace-scoped members if they
7786         are friends.
7787
7788 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
7789
7790         * pt.c (tsubst_decl): Don't mess with the global value of an
7791         un-mangled DECL_ASSEMBLER_NAME.
7792
7793 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
7794
7795         * decl.c (init_decl_processing): Remove CYGWIN conditional
7796         since CYGWIN is now able to deal with trapping signals.
7797
7798 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7799
7800         * cp-tree.h: Don't include gansidecl.h.
7801         * exception.cc: Include gansidecl.h (since we don't include config.h)
7802         * g++spec.c: Don't include gansidecl.h.
7803
7804 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
7805
7806         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
7807         size of dummy.
7808         (DECL_DEFINED_IN_CLASS_P): New macro.
7809         (TEMPLATE_PARMS_FOR_INLINE): Document.
7810         (check_static_variable_definition): New function.
7811         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
7812         appropriate.
7813         (check_static_variable_definition): Split out from ...
7814         (grokdeclarator): Here.
7815         * pt.c (check_default_tmpl_args): New function, split out from ...
7816         (push_template_decl_real): Here.
7817         (instantiate_template): Fix comment.
7818
7819 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
7820
7821         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
7822         (CP_TYPE_VOLATILE_P): Likewise.
7823         (CP_TYPE_RESTRICT_P): Likewise.
7824
7825 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
7826
7827         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
7828
7829 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
7830
7831         * class.c (instantiate_type): Be more helpful.
7832
7833         * decl2.c (import_export_decl): Call import_export_class.
7834
7835         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
7836         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
7837         * pt.c (tsubst_copy): Likewise.
7838
7839 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
7840
7841         * init.c (expand_vec_init): Fix off-by-one error.
7842
7843 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
7844
7845         * parse.y (apparent_template_type): New type.
7846         (named_complex_class_head_sans_basetype): Use it.
7847         * Makefile.in (CONFLICTS): One new conflict.
7848         * parse.c: Regenerated.
7849
7850 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
7851
7852         * cp-tree.h (COMPARE_STRICT): New macro.
7853         (COMPARE_BASE): Likewise.
7854         (COMPARE_RELAXED): Likewise.
7855         (COMPARE_REDECLARATION): Likewise.
7856         (same_type_p): Likewise.
7857         (same_or_base_type_p): Likewise.
7858         * call.c (standard_conversion): Use them, in place of comptypes
7859         with numeric arguments.
7860         (reference_binding): Likewise.
7861         (convert_like): Likewise.
7862         (build_over_call): Likewise.
7863         (is_subseq): Likewise.
7864         (is_properly_derived_from): Likewise.
7865         (compare_ics): Likewise.
7866         (joust): Likewise.
7867         * class.c (delete_duplicate_fields_1): Likewise.
7868         (resolves_to_fixed_type_p): Likewise.
7869         (instantiate_type): Likewise.  Remove #if 0'd code.
7870         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
7871         (pushdecl): Likewise.
7872         (lookup_name_real): Likewise.
7873         (grokdeclarator): Likewise.  Check for illegal array declarations.
7874         (grokparms): Likewise.
7875         (grok_op_properties): Likewise.
7876         * decl2.c (check_classfn): Likewise.
7877         * friend.c (is_friend): Likewise.
7878         (make_friend_class): Likewise.
7879         * init.c (expand_aggr_init): Likewise.
7880         (expand_vec_init): Likewise.
7881         * pt.c (is_member_template_class): Remove declaration.
7882         (is_specialization_of): Use COMPARE_* and new macros.
7883         (comp_template_parms): Likewise.
7884         (convert_nontype_argument): Likewise.
7885         (coerce_template_template_parms): Likewise.
7886         (template_args_equal): Likewise.
7887         (lookup_template_class): Likewise.
7888         (type_unification_real): Likewise.
7889         (unify): Likewise.
7890         (get_bindings_real): Likewise.
7891         * search.c (covariant_return_p): Likewise.
7892         (get_matching_virtual): Likewise.
7893         * sig.c (match_method_types): Likewise.
7894         * tree.c (vec_binfo_member): Likewise.
7895         (cp_tree_equal): Likewise.
7896         * typeck.c (common_type): Likewise.
7897         (comp_array_types): Likewise.  Get issues involving unknown array
7898         bounds right.
7899         (comptypes): Update comments.  Use new flags.
7900         (comp_target_types): Use new macros.
7901         (compparms): Likewise.
7902         (comp_target_parms): Likewise.
7903         (string_conv_p): Likewise.
7904         (build_component_ref): Likewise.
7905         (build_indirect_ref): Likewise.
7906         (build_conditional_expr): Likewise.
7907         (build_static_cast): Likewise.
7908         (build_reinterpret_cast): Likewise.
7909         (build_const_cast): Likewise.
7910         (build_modify_expr): Likewise.
7911         (convert_for_assignment): Likewise.
7912         (comp_ptr_ttypes_real): Likewise.
7913         (ptr_reasonably_similar): Likewise.
7914         (comp_ptr_ttypes_const): Likewise.
7915
7916 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
7917
7918         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
7919
7920 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
7921
7922         * decl2.c (delete_sanity): Pass integer_zero_node, not
7923         integer_two_node, to build_vec_delete.
7924         * init.c (build_array_eh_cleanup): Remove.
7925         (expand_vec_init_try_block): New function.
7926         (expand_vec_init_catch_clause): Likewise.
7927         (build_vec_delete_1): Don't deal with case that auto_delete_vec
7928         might be integer_two_node anymore.
7929         (expand_vec_init): Rework for initialization-correctness and
7930         exception-correctness.
7931         * typeck2.c (process_init_constructor): Make mutual exclusivity
7932         of cases more obvious.
7933
7934 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
7935
7936         * decl.c (lookup_name_real): OK, only warn if not lexing.
7937         Simplify suggested fix.
7938
7939         * cp-tree.h (IDENTIFIER_MARKED): New macro.
7940         * search.c (lookup_conversions): Use breadth_first_search.
7941         (add_conversions): Avoid adding two conversions to the same type.
7942         (breadth_first_search): Work with base binfos, rather
7943         than binfos and base indices.
7944         (get_virtual_destructor): Adjust.
7945         (tree_has_any_destructor_p): Adjust.
7946         (get_matching_virtual): Adjust.
7947
7948         * pt.c (push_template_decl_real): Generalize check for incorrect
7949         number of template parms.
7950         (is_member_template_class): #if 0.
7951
7952 1998-10-29  Richard Henderson  <rth@cygnus.com>
7953
7954         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
7955         last.
7956
7957 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
7958
7959         * lex.c: Call check_newline from lang_init always.  After
7960         calling cpp_start_read, set yy_cur and yy_lim to read from the
7961         cpplib token buffer.
7962
7963 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
7964
7965         * class.c (instantiate_type): Don't consider templates for a normal
7966         match.
7967
7968         * class.c (finish_struct_1): Don't complain about non-copy
7969         assignment ops in union members.
7970
7971         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
7972         (prepare_fresh_vtable): Likewise.
7973         (finish_struct_1): Don't call import_export_class.
7974         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
7975         (finish_prevtable_vardecl): Lose.
7976         (finish_file): Don't call it.
7977         * pt.c (instantiate_class_template): Likewise.
7978         * cp-tree.h: Remove it.
7979
7980         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
7981         * decl.c (finish_function): Not here.
7982         (start_function): Do set DECL_INITIAL.
7983
7984         * pt.c (push_template_decl_real): Complain about default template
7985         args for enclosing classes.
7986
7987         * call.c (add_function_candidate): Treat conversion functions
7988         as coming from the argument's class.
7989         * cp-tree.h (DECL_CONV_FN_P): New fn.
7990         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
7991         * class.c (add_method): Use DECL_CONV_FN_P.
7992         * decl2.c (check_classfn): Likewise.
7993         * error.c (dump_function_name): Likewise.
7994         (dump_function_decl): Likewise.
7995         * pt.c (fn_type_unification): Likewise.
7996         * search.c (add_conversions): Likewise.
7997
7998 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
7999
8000         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
8001         * method.c (hack_identifier): Also check for using RESULT_DECL
8002         from outer context.
8003
8004 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
8005
8006         * decl.c (grokdeclarator): Use type_quals, rather than constp,
8007         consistently.
8008
8009 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
8010
8011         * call.c (standard_conversion): instantiate_type here.
8012         (reference_binding): And here.
8013         (implicit_conversion): Not here.
8014         (build_op_delete_call): No need to cons up an OVERLOAD.
8015         * cvt.c (cp_convert_to_pointer): instantiate_type here.
8016         (convert_to_reference): And here.
8017         * decl.c (grok_reference_init): Not here.
8018         (grokparms): Or here.
8019         * typeck2.c (digest_init): Or here.
8020         * typeck.c (decay_conversion): Take the address of overloaded
8021         functions, too.
8022         (require_instantiated_type): Lose.
8023         (convert_arguments): Don't handle unknown types here.
8024         (build_c_cast): Likewise.
8025         (build_binary_op): Gut.
8026         (build_conditional_expr): Don't require_instantiated_type.
8027         (build_modify_expr): Likewise.
8028         (build_static_cast): Don't instantiate_type.
8029         (build_reinterpret_cast): Likewise.
8030         (build_const_cast): Likewise.
8031         (convert_for_initialization): Likewise.
8032         (build_ptrmemfunc): Use type_unknown_p.
8033         (convert_for_assignment): Also do default_conversion on overloaded
8034         functions.  Hand them off to ocp_convert.
8035
8036 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
8037
8038         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
8039         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
8040
8041         * class.c (finish_struct_1): Use build_cplus_array_type to build
8042         array types.
8043         * decl.c (init_decl_processing): Likewise.
8044         * except.c (expand_end_eh_spec): Likewise.
8045         * search.c (expand_upcast_fixups): Simplify very slightly.
8046
8047 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
8048
8049         * decl.c (grokdeclarator): Complain about a variable using
8050         constructor syntax coming back null from start_decl.
8051
8052         * friend.c (make_friend_class): Complain about trying to make
8053         a non-class type a friend.
8054
8055         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
8056         (start_function): Not here.
8057
8058 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
8059
8060         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
8061
8062 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
8063
8064         * typeck2.c (process_init_constructor): Only skip anonymous fields
8065         if they are bitfields.
8066
8067         * cp-tree.def (TYPEOF_TYPE): New code.
8068         * error.c (dump_type_real): Handle it.
8069         * pt.c (tsubst): Likewise.
8070         * tree.c (search_tree): Likewise.
8071         * semantics.c (finish_typeof): New fn.
8072         * parse.y (typespec): Use it.
8073         * cp-tree.h: Declare it.
8074
8075 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
8076
8077         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
8078
8079 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
8080
8081         * typeck.c (convert_arguments): Don't handle pmf references
8082         specially.
8083
8084         * init.c (build_member_call): Don't try to convert to the base type
8085         if it's ambiguous or pedantic.
8086
8087         * typeck2.c (check_for_new_type): Only depend on pedantic for
8088         C-style casts.
8089
8090 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
8091
8092         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
8093         non-converting constructors.
8094
8095 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8096
8097         * gxxint.texi: Correct documentation for n, N, Q, and B.
8098
8099 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8100
8101         * parse.y (condition): Convert VAR_DECL from reference to indirect
8102         reference.
8103
8104 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
8105
8106         * exception.cc (__cp_pop_exception): Free the original exception
8107         value, not the potentially coerced one.
8108
8109 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
8110
8111         * Makefile.in (hash.h): Run gperf when necessary.
8112
8113         * cp-tree.h (CP_TYPE_READONLY): Remove.
8114         (CP_TYPE_VOLATILE): Likewise.
8115         (CP_TYPE_QUALS): New macro.
8116         (CP_TYPE_CONST_P): Likewise.
8117         (CP_TYPE_VOLATILE_P): Likewise.
8118         (CP_TYPE_RESTRICT_P): Likewise.
8119         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
8120         (cp_build_type_variant): Rename to ...
8121         (cp_build_qualified_type): New function.
8122         (c_apply_type_quals_to_decl): Declare.
8123         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
8124         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
8125         (cp_type_qual_from_rid): New function.
8126         (compparms): Remove unused parameter.  All callers changed.
8127         (cp_type_quals): New function.
8128         (at_least_as_qualified_p): Likewise.
8129         (more_qualified_p): Likewise.
8130
8131         * call.c (standard_conversion): Replace calls to
8132         cp_build_type_variant with cp_build_qualified_type.  Use
8133         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
8134         compare them.  Use CP_TYPE_* macros to check qualifiers.
8135         (reference_binding): Likewise.
8136         (implicit_conversion): Likewise.
8137         (add_builtin_candidates): Likewise.
8138         (build_over_call): Likewise.
8139         * class.c (overrides): Compare all qualifiers, not just `const',
8140         on method declarations.
8141         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
8142         (convert_pointer_to_real): Likewise.
8143         (type_promotes_to): Likewise.
8144         * decl.c (check_for_uninitialized_const_var): New function.
8145         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
8146         (cp_finish_decl): Use check_for_uninitialized_const_var.
8147         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
8148         handle `restrict'.
8149         (grok_ctor_properties): Likewise.
8150         (grok_op_properties): Likewise.
8151         (start_function): Likewise.
8152         (rever_static_member_fn): Likewise.
8153         * decl2.c (grok_method_quals): Likewise.
8154         (grokfield): Likewise.
8155         * error.c (dump_readonly_or_volatile): Rename to ...
8156         (dump_qualifiers): New function.  Handle `restrict'.
8157         (dump_type_real): Use it.
8158         (dump_aggr_type): Likewise.
8159         (dump_type_prefix): Likewise.
8160         (dump_type_suffix): Likewise.
8161         (dump_function_decl): Likewise.
8162         (cv_as_string): Likewise.
8163         * gxx.gperf: Add __restrict and __restrict__.
8164         * gxxint.texi: Document `u' as used for `__restrict', and a few
8165         other previously undocumented codes.
8166         * hash.h: Regenerated.
8167         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
8168         (build_member_call): Likewise.
8169         (build_new_1): Likewise.
8170         * lex.c (init_parse): Add entry for RID_RESTRICT.
8171         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
8172         (cp_type_qual_from_rid): Define.
8173         * lex.h (enum rid): Add RID_RESTRICT.
8174         * method.c (process_modifiers): Deal with `restrict'.
8175         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
8176         * parse.c: Regenerated.
8177         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
8178         (tsubst_aggr_type): Likewise.
8179         (tsubst): Likewise.
8180         (check_cv_quals_for_unify): Likewise.
8181         (unify): Likewise.
8182         * rtti.c (init_rtti_processing): Likewise.
8183         (build_headof): Likewise.
8184         (get_tinfo_var): Likewise.
8185         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
8186         (expand_class_desc): Likewise.
8187         (expand_attr_desc): Likewise.
8188         (synthesize_tinfo_fn): Likewise.
8189         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
8190         (get_matching_virtual): Likewise.
8191         (expand_upcast_fixups): Likewise.
8192         * sig.c (build_signature_pointer_or_reference_name): Take
8193         type_quals, not constp and volatilep.
8194         (build_signature_pointer_or_reference_type): Likewise.
8195         (match_method_types): More CP_TYPE_QUALS conversion, etc.
8196         (build_signature_pointer_constructor): Likewise.
8197         (build_signature_method_call): Likewise.
8198         * tree.c (build_cplus_array_type): Likewise.
8199         (cp_build_type_variant): Rename to ...
8200         (cp_build_qualified_type): New function.  Deal with `__restrict'.
8201         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
8202         (build_exception_variant): Likewise.
8203         (mapcar): Likewise.
8204         * typeck.c (qualif_type): Likewise.
8205         (common_type): Likewise.
8206         (comptypes): Likewise.
8207         (comp_cv_target_types): Likewise.
8208         (at_least_as_qualified_p): Define.
8209         (more_qualified_p): Likewise.
8210         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
8211         (compparms): Likewise.
8212         (inline_conversion): Likewise.
8213         (string_conv_p): Likewise.
8214         (build_component_ref): Likewise.
8215         (build_indirect_ref): Likewise.
8216         (build_array_ref): Likewise.
8217         (build_unary_op): Likewise.
8218         (build_conditional_expr): Likewise.
8219         (build_static_cast): Likewise.
8220         (build_c_cast): Likewise.
8221         (build_modify_expr): Likewise.
8222         (convert_For_assignment): Likewise.
8223         (comp_ptr_ttypes_real): Likewise.
8224         (cp_type_quals): New function.
8225
8226 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
8227
8228         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
8229         (CP_TYPE_VOLATILE): Likewise.
8230         * decl.c (grokdeclarator): Use them.
8231         * tree.c (canonical_type_variant): Likewise.
8232
8233 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8234
8235         * parse.y (named_class_head): Push into class while parsing the
8236         base class list.
8237         * decl2.c (push_scope, pop_scope): New functions.
8238         * cp-tree.h: Declare them.
8239         * init.c (build_new_1): Delay cleanup until end of full expression.
8240
8241 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
8242
8243         * typeck.c (build_component_ref): Use of a type here is an error.
8244
8245 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
8246
8247         Revamp references to member functions.
8248         * method.c (hack_identifier): Call build_component_ref for a
8249         reference to a member function.
8250         * typeck.c (build_component_ref): Only return a single function
8251         if it's static.  Otherwise, return a COMPONENT_REF.
8252         (build_x_function_call): Handle a COMPONENT_REF.
8253         (build_unary_op): Handle all unknown-type things.
8254         * decl2.c (arg_assoc): Handle COMPONENT_REF.
8255         * class.c (instantiate_type): Complain if the function we get is a
8256         nonstatic member function.  Remove code for finding "compatible"
8257         functions.
8258         * pt.c (tsubst_copy): Handle NOP_EXPR.
8259         * tree.c (build_dummy_object): New fn.
8260         (maybe_dummy_object): New fn.
8261         (is_dummy_object): New fn.
8262         * cp-tree.h: Declare them.
8263         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
8264         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
8265         * init.c (build_member_call): Use maybe_dummy_object and
8266         is_dummy_object.
8267         (build_offset_ref): Use maybe_dummy_object.
8268         (resolve_offset_ref): Use is_dummy_object.
8269         * typeck.c (build_x_function_call): Call build_dummy_object.
8270         (unary_complex_lvalue): Call is_dummy_object.
8271
8272         * typeck.c (build_component_addr): Make sure field is a field.
8273
8274         * call.c (build_new_op): Delete obsolete code.
8275
8276         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
8277
8278 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8279
8280         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
8281         std if std is ignored.
8282
8283 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
8284
8285         * decl.c (grokvardecl): Fix thinko.
8286
8287         * decl.c (grokdeclarator): Embedded attrs bind to the right,
8288         not the left.
8289
8290         * parse.y (fn.def2): Fix 'attrs' format.
8291
8292 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
8293
8294         * Makefile.in (CONFLICTS): Update.
8295         * parse.y (expr_or_declarator_intern): New rule.
8296         (expr_or_declarator, direct_notype_declarator, primary,
8297         functional_cast): Use it.
8298         (notype_declarator_intern): New rule.
8299         (notype_declarator, complex_notype_declarator): Use it.
8300
8301 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
8302
8303         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
8304         (grokvardecl): Likewise.
8305
8306 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8307
8308         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
8309         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
8310
8311         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
8312
8313         * pt.c (process_partial_specialization): Cast 1st argument of
8314         `bzero' to (PTR).
8315
8316         * tree.c (build_base_fields): Cast `base_align' to (int) when
8317         comparing against one.
8318
8319 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
8320
8321         * decl.c (lookup_name_real): Handle template parameters for member
8322         templates where said parameters have the same name as the
8323         surrounding class.
8324
8325         * decl.c (expand_static_init): Build cleanups before entering the
8326         anonymous function used to do them to avoid access-checking
8327         confusion.
8328
8329         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
8330         accidentally removed by previous change, and make DECL_RTL here.
8331         * class.c (add_method): Don't make DECL_RTL here.
8332
8333         * pt.c (for_each_template_parm): Don't examine uninstantiated
8334         default arguments.
8335
8336 1998-10-16  Dave Brolley  <brolley@cygnus.com>
8337
8338         * lex.c (real_yylex): Fix unaligned access of wchar_t.
8339
8340 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
8341
8342         * class.c (add_method): Fix documentation to reflect previous
8343         changes.  Check for duplicate method declarations here.
8344         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
8345         correctly; such things never match.
8346         (grokfndecl): Don't look for duplicate methods here.
8347         * decl2.c (check_classfn): Don't assume names are mangled.
8348         Don't add bogus member function declarations to a class before the
8349         class type is complete.
8350         (grokfield): Reformat error message.
8351         * method.c (set_mangled_name_for_decl): Don't mangle names while
8352         processing_template_decl.
8353
8354 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
8355
8356         * typeck.c (build_indirect_ref): Complain about a pointer to data
8357         member, too.
8358         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
8359         data member.
8360         * init.c (resolve_offset_ref): Don't undo the above.
8361
8362         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
8363         (struct lang_decl_flags): Add `bitfield'.
8364         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
8365         DECL_BIT_FIELD.
8366         * decl2.c (grokbitfield, grok_alignof): Likewise.
8367         * init.c (build_offset_ref): Likewise.
8368         * typeck.c (build_component_addr, expr_sizeof): Likewise.
8369         * cvt.c (build_up_reference): Don't crash if taking the address
8370         returns error_mark_node.
8371
8372         * decl.c (grokfndecl): Also check ctype when checking for ::main().
8373
8374 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
8375
8376         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
8377         Do mangling here.
8378         (grokdeclarator): Instead of here.
8379         * friend.c (do_friend): Lose special handling of ::main and
8380         __builtin_*.
8381         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
8382
8383         * spew.c (yylex): Clear looking_for_typename if we got
8384         'enum { ... };'.
8385
8386 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
8387
8388         * class.c (maybe_warn_about_overly_private_class): Improve error
8389         messages for class with only private constructors.
8390
8391         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
8392         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
8393         (build_typename_type): New function.
8394         * decl.c (build_typename_type): Broken out from ...
8395         (make_typename_type): Use it.
8396         * search.c (lookup_field): Likewise.
8397
8398 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
8399
8400         * pt.c (convert_nontype_argument): Check against type_referred_to.
8401         * decl.c (grokvardecl): Check for declarator name before building
8402         DECL_ASSEMBLER_NAME.
8403
8404 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
8405
8406         * pt.c (lookup_template_class): Add comment.
8407         (instantiate_class_template): Don't mark the _TYPE node for
8408         member class templates as an instantiation.
8409
8410 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
8411
8412         * decl.c (grokfndecl): Fix my thinko.
8413
8414 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
8415
8416         * tinfo2.cc (fast_compare): Remove.
8417         (before): Just use strcmp.
8418         * tinfo.cc (operator==): Just use strcmp.
8419
8420 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
8421
8422         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
8423         declarations.
8424
8425 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
8426
8427         * cp-tree.h (specializations_of_same_template_p): Remove.
8428         * search.c (get_template_base): Don't use it.
8429         (get_template_base_recursive): Likewise.
8430         * pt.c (specializations_of_same_template_p): Remove.
8431         (unify): Don't use it.
8432         (lookup_template_class): Find the correct parent when setting
8433         CLASSTYPE_TI_TEMPLATE.
8434
8435 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
8436
8437         * tinfo.cc (operator==): Always compare names.
8438
8439 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
8440
8441         * decl.c (start_function): Fix cut-and-paste error.
8442
8443 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
8444
8445         * inc/typeinfo: Add #pragma interface.
8446         (operator!=): Just call operator==.
8447         * tinfo.cc: Add #pragma implementation.
8448         (operator==): Move from inc/typeinfo and tinfo2.cc.
8449         Check __COMMON_UNRELIABLE instead of _WIN32.
8450
8451         * typeck2.c (my_friendly_abort): Add URL.
8452
8453 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
8454
8455         * decl.c (start_method): Added extra parameter for attributes.
8456         * cp-tree.h (start_method): Update prototype.
8457         * parse.y (fn.def2): Update start_method parameter list.
8458
8459 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
8460
8461         * cp-tree.h (specializations_of_same_template_p): Declare.
8462         * pt.c (specializations_of_same_template_p): New function.
8463         (unify): Use it.
8464         * search.c (get_template_base): Use it.
8465         (get_template_base_recursive): Likewise.
8466
8467 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
8468
8469         * decl2.c (start_objects): Add new variable `joiner' and
8470         initialize it properly.
8471
8472 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
8473
8474         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
8475         change to vtable types.
8476
8477         * cvt.c (ocp_convert): Avoid infinite recursion caused by
8478         1998-10-03 change.
8479
8480 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
8481
8482         * pt.c (resolve_overloaded_unification): New fn.
8483         (try_one_overload): Likewise.
8484         (unify): Don't fail on unknown type.
8485         (type_unification_real): Likewise.  Use resolve_overloaded_unification
8486         to handle an overloaded argument.
8487         (template_args_equal): Split out...
8488         (comp_template_args): From here.
8489         (determine_specialization): Also allow a template with more
8490         parms than were explicitly specified.
8491         * cp-tree.h: Add template_args_equal.
8492         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
8493
8494 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
8495
8496         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
8497         change.
8498
8499 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
8500
8501         * typeck.c (unsigned_type): Only return TItype nodes when
8502         HOST_BITS_PER_WIDE_INT is >= 64 bits.
8503         (signed_type): Likewise.
8504         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
8505         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
8506         (init_decl_processing): Only create TItype nodes when
8507         HOST_BITS_PER_WIDE_INT is >= 64 bits.
8508         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
8509         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
8510
8511 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8512
8513         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
8514         (gxx.gperf): Update comments describing invocation flags.
8515         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
8516
8517 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
8518
8519         * class.c (finish_struct_1): Add commentary on previous change.
8520
8521         * cp-tree.h (vtbl_ptr_type_node): New variable.
8522         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
8523         already of the right type.
8524         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
8525         Simplify code to grow vtable.
8526         * decl.c (vtbl_ptr_type_node): Define.
8527         (init_decl_processing): Initialize it.
8528
8529 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
8530
8531         * cp-tree.def (PTRMEM_CST): New tree node.
8532         * cp-tree.h (ptrmem_cst): New type.
8533         (lang_type): Remove local_typedecls.
8534         (dummy): Increase to 12 bits from 11.
8535         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
8536         (PTRMEM_CST_CLASS): New macro.
8537         (PTRMEM_CST_MEMBER): Likewise.
8538         (current_access_specifier): New variable.
8539         (current_class_type): Remove duplicate declaration.
8540         (finish_struct): Change prototype.
8541         (unreverse_member_declarations): New function.
8542         (pushdecl_class_level): Change prototype.
8543         (grok_enum_decls): Remove.
8544         (fixup_anonymous_union): New function.
8545         (grok_x_components): Change prototype.
8546         (tsubst_chain): Remove.
8547         (finish_member_template_decl): Likewise.
8548         (check_explicit_specialization): Fix indentation.
8549         (finish_class_definition): Change prototype.
8550         (finish_member_class_template): Likewise.
8551         (finish_member_declaration): New function.
8552         (check_multiple_declarators): Likewise.
8553         * class.c (class_stack_node_t): New type.
8554         (current_class_base): Remove.
8555         (current_class_stack): Change type.
8556         (current_access_specifier): New variable.
8557         (grow_method): Remove.
8558         (check_member_decl_is_same_in_complete_scope): Break out from
8559         finish_struct.
8560         (make_method_vec): New function.
8561         (free_method_vec): Likewise.
8562         (add_implicitly_declared_members): Break out from finish_struct_1.
8563         (free_method_vecs): New variable.
8564         (add_method): Rework for direct use from parser.
8565         (handle_using_decl): Watch for NULL_TREE while iterating through
8566         CLASSTYPE_METHOD_VEC.
8567         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
8568         just do some error-checking.
8569         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
8570         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
8571         (finish_struct): Change prototype.  Simplify; fields and methods
8572         are already set up at this point.
8573         (init_class_processing): Set up current_class_stack.
8574         (pushclass): Save current_access_specifier.
8575         (popclass): Restore it.
8576         (currently_open_class): Simplify.
8577         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
8578         * decl.c (saved_scope): Add access_specifier.
8579         (maybe_push_to_top_level): Save it.
8580         (pop_from_top_level): Restore it.
8581         (maybe_process_template_type_declaration): Use
8582         finish_member_declaration.
8583         (pushtag): Likewise.
8584         (pushdecl_class_level): Don't return a value.
8585         (fixup_anonymous_union): Break out from grok_x_components.
8586         (shadow_tag): Use it.
8587         (xref_tag): Complain about using an elaborated type specifier to
8588         reference a template type parameter or typedef name.
8589         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
8590         (current_local_enum): Remove.
8591         (build_enumerator): Call finish_member_declaration.
8592         (grok_enum_decls): Remove.
8593         * decl2.c (grok_x_components): Simplify.
8594         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
8595         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
8596         (merge_functions): Add to comment.
8597         (arg_assoc_type): Prototype.
8598         (arg_assoc): Pass as many arguments as there are parameters.
8599         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
8600         OFFSET_REF.
8601         * expr.c (cpls_expand_expr): Remove dead code.  Handle
8602         PTRMEM_CST.
8603         * friend.c (do_friend): Lookup friends when in nested classes.
8604         Change comments.
8605         * init.c (build_offset_ref): Do lookup even for classes that are
8606         only partially defined.
8607         (decl_constant_value): Remove dead code.
8608         * method.c (build_overload_value): Remove hack where by TYPE was
8609         not a TYPE.  Handle PTRMEM_CST.
8610         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
8611         should go.
8612         * parse.y (components, notype_components, component_decl,
8613         component_decl_1, component_declarator, component_declarator0):
8614         Now all are itype rather than ttype.  Rework to add members to
8615         classes on the fly.
8616         (typesqpecqual_reserved): Use check_multiple_declarators.
8617         (structsp): Update class to finish_class_definition.
8618         (do_xref_defn): Unsplit into named_class_head.
8619         (access_specifier): Set current_access_specifier.
8620         * pt.c (set_current_access_from_decl): New function.
8621         (finish_member_template_decl): Don't take the parameters.
8622         (comp_template_args): Make more robust.
8623         (lookup_template_class): Don't use current_local_enum.
8624         (for_each_template_parm): Handle PTRMEM_CST.
8625         (instantiate_class_template): Use set_current_access_from_decl,
8626         finish_member_declaration and unreverse_member_declarations.  Set
8627         lineno/input_filename before generating implicit member functions.
8628         (type_unification_real): Don't assume back-unification happens
8629         only for the last argument.
8630         (regenerate_decl_from_template): Call pushclass a bit earlier.
8631         (tsubst_chain): Remove.
8632         (tsubst_enum): Use set_current_access_from_decl.
8633         (set_mangled_name_for_template_decl): Fix indentation.
8634         * search.c (lookup_fnfields_1): Change iteration through
8635         CLASSTYPE_METHOD_VEC.
8636         (dfs_pushdecls): Likewise.
8637         (dfs_compress_decls): Likewise.
8638         (add_conversions): Likewise.
8639         * semantics.c (finish_class_definition): Don't take components.
8640         Change call to finish_struct.
8641         (finish_member_declaration): New function.
8642         (finish_member_class_template): Don't take template parameters.
8643         Change call to grok_x_components.  Call finish_member_template_decl.
8644         (check_multiple_declarators): New function.
8645         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
8646         a passed in fieldlist.
8647         * tree.c (search_tree): Handle PTRMEM_CST.
8648         (mapcar): Likewise.
8649         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
8650         INTEGER_CSTs, for pointer-to-data members.
8651
8652         * call.c (resolve_args): Resolve template specializations, if
8653         possible.
8654
8655 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8656
8657         * Makefile.in (spew.o): Depend on toplev.h.
8658
8659         * call.c (compare_ics): Initialize variables `deref_from_type2',
8660         `deref_to_type1' and `deref_to_type2'.
8661
8662         * except.c (get_eh_type): Hide prototype and definition.
8663         (process_start_catch_block_old): Remove unused static prototype.
8664
8665         * pt.c (tsubst_decl): Initialize variable `argvec'.
8666
8667         * spew.c: Include toplev.h.
8668
8669 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
8670
8671         * pt.c (instantiate_decl): Do save and restore file position.
8672
8673 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8674
8675         * method.c (build_decl_overload_real): Clear
8676         numeric_output_need_bar after __.
8677
8678 1998-10-05  Nathan Sidwell  <nathan@acm.org>
8679
8680         * call.c (build_new_method_call): Issue 'incomplete type' error,
8681         if class is not defined.
8682
8683 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8684
8685         * call.c (build_object_call): Move declaration of variable
8686         `fn' into the scope where it is used.  Don't access variable
8687         `fn' when it is uninitialized, instead use `fns'.
8688
8689 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
8690
8691         * errfn.c (cp_thing): Print buf as a string not as a printf format
8692         to avoid problems with the operator%.  Consequently, `%%' sequences
8693         in format are copied as `%' in buf.
8694
8695 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
8696
8697         * pt.c (pop_tinst_level): Call extract_interface_info.
8698         (instantiate_decl): Don't save and restore file position.
8699
8700         * decl.c (cp_finish_decl): Make statics in extern inlines and
8701         templates common, if possible and the target doesn't support weak
8702         symbols.
8703
8704         * decl.c (grokdeclarator): Remove redundant calls to
8705         build_type_variant and some duplicated code.
8706         * sig.c (build_signature_reference_type): Only take the type parm.
8707         (build_signature_pointer_type): Likewise.
8708         * tree.c (build_cplus_method_type): Adjust.
8709         * cp-tree.h: Update.
8710
8711 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
8712
8713         * call.c (build_over_call): Make pedwarns about dropped qualifiers
8714         into full-fledged errors.
8715         * cvt.c (convert_to_reference): Likewise.
8716         * typeck.c (convert_for_assignment): Likewise.
8717
8718         * search.c (expand_upcast_vtables): In addition to unsetting
8719         TREE_READONLY, remove top-level const type qualifier.
8720
8721 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
8722
8723         * class.c (current_class_ptr, current_class_ref): Clarify
8724         documentation.
8725         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
8726         NOP type conversions.
8727         * decl.c (decls_match): Use comptypes directly; ignore
8728         qualifiers on the DECL.
8729         (duplicate_decls): Remove qualifier checks on DECL.
8730         (grokdeclarator): Make the type built up include top-level
8731         qualifiers.
8732         * decl2.c (do_dtors): Fix spelling error.
8733         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
8734         when printing type information.
8735         * init.c (build_new_1): Add documentation.  Deal with the fact
8736         that type of allocated memory now contains qualifiers.
8737         * lex.c (is_global): Improve error-recovery.
8738         * sig.c (build_member_function_pointer): Don't cast away const
8739         on fields of sigtable_entry_type.
8740         * tree.c (lvalue_type): Don't look at top-level qualifiers on
8741         expressions.
8742         * typeck.c (decay_conversion): Likewise.
8743         (build_component_ref): Make sure the type of the COMPONENT_REF
8744         contains top-level qualifiers, as appropriate.  Improve
8745         error-handling.
8746         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
8747         (build_array_ref): Likewise.
8748         (build_unary_op): Improve error-recovery.
8749         (unary_complex_lvalue): Make taking the address a bound member
8750         function an error, not a sorry.
8751         (build_conditional_expr): Look at the type qualifiers, not the
8752         qualifiers on the expression itself.
8753
8754 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
8755
8756         * decl2.c (merge_functions): Remove duplicates.
8757
8758         * decl2.c: Add -f{no-,}implicit-inline-templates.
8759         (import_export_decl): Check it.
8760
8761         * decl.c (lookup_name_real): Template parms also take precedence
8762         over implicit typename.  Only warn if yylex.
8763
8764         * typeck.c (build_conditional_expr): Only fold if ifexp is an
8765         INTEGER_CST.
8766
8767         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
8768         instead of linkage.
8769
8770 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
8771
8772         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
8773         * class.c (build_vbase_pointer): Use it.
8774         * rtti.c (expand_class_desc): Likewise.
8775         * tree.c (build_vbase_pointer_fields): Likewise.
8776
8777 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
8778
8779         * decl.c (start_decl): Add invocation of
8780         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
8781         (start_function): Add invocation of
8782         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
8783
8784         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
8785         HANDLE_GENERIC_PRAGMAS.
8786
8787 1998-09-28  Anthony Green  <green@cygnus.com>
8788
8789         * semantics.c (finish_asm_stmt): Always permit volatile asms.
8790
8791 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
8792
8793         * decl.c (grokdeclarator): Tighten checks for invalid
8794         destructors.  Improve error-messages and error-recovery.
8795         * decl2.c (check_classfn): Don't assume that mangled destructor
8796         names contain type information.
8797
8798 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
8799
8800         * search.c (get_base_distance): Remove assert.
8801
8802         * decl2.c (build_anon_union_vars): Don't process a field with no
8803         name.
8804         (finish_anon_union): Also complain about local anon unions with no
8805         members.
8806
8807 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8808
8809         * decl.c (lookup_namespace_name): If the name is a namespace,
8810         return it immediately.
8811
8812 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8813
8814         * cp-tree.h (define_case_label): Remove unused parameter.
8815         (check_java_method): Likewise.
8816         (grokclassfn): Likewise.
8817         (expand_aggr_init): Likewise.
8818         (build_x_delete): Likewise.
8819         (maybe_end_member_template_processing): Likewise.
8820         (unshare_base_binfos): Add prototype.
8821         (string_conv_p): Likewise.
8822         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
8823
8824         * cvt.c (build_up_reference): Remove unused parameter
8825         `checkconst', all callers changed.
8826         (build_type_conversion): Mark parameter `code' with
8827         ATTRIBUTE_UNUSED.
8828         (build_expr_type_conversion): Initialize variable `conv'.
8829
8830         * decl.c (push_namespace): Initialize variable `d'.
8831         (define_case_label): Remove unused parameter `decl', all callers
8832         changed.
8833
8834         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
8835         `argc' with ATTRIBUTE_UNUSED.
8836         (grokclassfn): Remove unused parameter `cname', all callers
8837         changed.
8838         (check_java_method): Likewise for parameter `ctype'.
8839         (copy_assignment_arg_p): Mark parameter `virtualp' with
8840         ATTRIBUTE_UNUSED.
8841         (finish_prevtable_vardecl): Likewise for parameter `prev'.
8842
8843         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
8844
8845         * init.c (expand_aggr_init_1): Remove unused parameter
8846         `alias_this', all callers changed.
8847         (expand_aggr_init): Likewise.
8848         (expand_default_init): Likewise.
8849         (build_new_1): Initialize variable `susp'.
8850         (build_x_delete): Remove unused parameter `type', all callers
8851         changed.
8852
8853         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
8854         ATTRIBUTE_UNUSED.
8855         (readescape): Use (unsigned) value in shift.
8856         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
8857         comparing to a signed quantity.
8858
8859         * pt.c (maybe_end_member_template_processing): Remove unused
8860         parameter `decl', all callers changed.
8861         (check_explicit_specialization): Add braces around empty body in
8862         an else-statement.
8863         (current_template_args): Initialize variable `args'.
8864         (lookup_template_class): Likewise for variable `prev_local_enum'.
8865         (tsubst_decl): Likewise for variable `r'.
8866         (set_mangled_name_for_template_decl): Initialize variable
8867         `context'.
8868
8869         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
8870         Likewise for variable `i'.
8871         (yylex): Initialize variable `trrr'.
8872
8873         * typeck.c (compparms): Mark variable `strict' with
8874         ATTRIBUTE_UNUSED.
8875
8876         * xref.c (simplify_type): Cast argument of ctype function to
8877         `unsigned char'.
8878
8879 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
8880
8881         * cp-tree.h (language_lvalue_valid): Remove.
8882         * decl.c (grokdeclarator): Don't disallow references to functions.
8883         * tree.c (lvalue_p_1): New function, combining duplicated
8884         code from ...
8885         (lvalue_p): Use it.
8886         (real_lvalue_p): Likewise.
8887         * typeck.c (language_lvalue_valid): Remove.
8888         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
8889         they don't have TREE_READONLY set.
8890         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
8891
8892 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8893
8894         * spew.c (yylex): Give diagnostic.
8895         * hash.h (is_reserved_word): Add export.
8896         * gxx.gperf: Likewise.
8897         * lex.h (rid): Add RID_EXPORT.
8898         * lex.c (init_parse): Likewise.
8899
8900 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8901
8902         * friend.c (do_friend): Make warning a full sentence.
8903
8904 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
8905
8906         * parse.y (component_decl_list): Improve error-recovery.
8907
8908 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8909
8910         * decl.c (make_typename_type): Move error to point where name
8911         variable can be used by dump_type.
8912
8913 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
8914
8915         * decl.c (grokfndecl): Improve error-recovery.
8916         * decl2.c (grokfield): Likewise.
8917         * pt.c (finish_member_template_decl): Likewise.
8918
8919 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8920
8921         * method.c (hack_identifier): Finding multiple members is always
8922         an error.
8923
8924 1998-09-21  Per Bothner  <bothner@cygnus.com>
8925
8926         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
8927
8928 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
8929
8930         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
8931
8932 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
8933
8934         * class.c (maybe_warn_about_overly_private_class): Reformat.
8935
8936 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
8937
8938         * exception.cc (__cplus_type_matcher): Realign some code.
8939
8940 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
8941
8942         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
8943         (tinfo2.o): Likewise.
8944         (exception.o): Likewise.
8945         (new.o): Likewise.
8946         (opnew.o): Likewise.
8947         (opnewnt.o): Likewise.
8948         (opvnew.o): Likewise.
8949         (opvnewnt.o): Likewise.
8950         (opdel.o): Likewise.
8951         (opdelnt.o): Likewise.
8952         (opvdel.o): Likewise.
8953         (opvdelnt.o): Likewise.
8954
8955 1998-09-16  Richard Henderson  <rth@cygnus.com>
8956
8957         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
8958
8959 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
8960
8961         * call.c (build_field_call): Handle static data members too.
8962
8963         * typeck.c (comptypes): When comparing pointer types, check
8964         whether referred types match even in strictest modes.
8965
8966 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
8967
8968         * cp-tree.h: Revert previous change.
8969         (finish_struct_methods): Remove declaration.
8970         * class.c: Revert previous change.
8971         (maybe_warn_about_overly_private_class): New function.
8972         (finish_struct_methods): Declare here, and make static.  Remove
8973         unnecessary parameters.  Tidy slightly.  Use
8974         maybe_warn_about_overly_private_class.
8975         (finish_struct_1): Adjust.  Remove check for private constructors,
8976         now done elsewhere.
8977         (finish_struct): Adjust.
8978
8979 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
8980
8981         * except.c (expand_start_catch_block): No need to check for new
8982         exception model.
8983         (process_start_catch_block_old): Deleted.
8984         (process_start_catch_block): Add call to start_decl_1().
8985         (expand_end_catch_block): Add call to end_catch_handler().
8986         * exception.cc (__cplus_type_matcher): Only check the exception
8987         language if there is an exception table.
8988
8989 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
8990
8991         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
8992         as used to prevent conflicts with virtual function tables.
8993
8994 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
8995
8996         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
8997         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
8998         * class.c (maybe_class_too_private_p): New function.
8999         (finish_struct_methods): Use it.
9000         (finish_struct_1): Likewise.
9001         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
9002         appropriate.
9003
9004         * pt.c (check_specialization_scope): Fix spelling error.
9005         (check_explicit_specialization): Remove code to handle explicit
9006         specializations in class scope; they are now correctly diagnosed
9007         as errors.
9008
9009 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
9010
9011         * decl.c (pushdecl): Don't copy types if the
9012         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
9013         type.
9014
9015 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
9016
9017         * class.c (get_enclosing_class): New function.
9018         (is_base_of_enclosing_class): Likewise.
9019         * cp-tree.h (get_enclosing_class): Declare.
9020         (is_base_of_enclosing_class): Likewise.
9021         * pt.c (coerce_template_parms): Use them.
9022
9023 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
9024
9025         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
9026         null to decide whether to use it.
9027
9028         * error.c (dump_type_real): Handle NAMESPACE_DECL.
9029         * parse.y (base_class.1): Avoid crash on error.
9030
9031 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9032
9033         * decl.c (make_typename_type): If context is a namespace, the code
9034         is in error.
9035
9036 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
9037
9038         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
9039
9040 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
9041
9042         * cp-tree.h (anonymous_namespace_name): Declare.
9043         * decl.c: Define it.
9044         (push_namespace): Use anonymous_namespace_name, rather than local
9045         static anon_name.
9046         * error.c (dump_decl): If a namespace is named
9047         anonymous_namespace_name, call it {anonymous}.
9048
9049         * decl.c (grokparms): Distinguish between references and pointers
9050         in error message.
9051
9052 1998-09-08  Richard Henderson  <rth@cygnus.com>
9053             Mark Mitchell  <mark@markmitchell.com>
9054
9055         * pt.c (process_partial_specialization): Consistently allocate
9056         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
9057         tpd.parms, where appropriate.
9058
9059 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
9060
9061         * Makefile.in (INCLUDES): Update after recent toplevel gcc
9062         reorganizations.
9063
9064 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
9065
9066         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
9067         * class.c (finish_struct): Remove hackery to deal with explicit
9068         specializations in class scope.
9069         * decl.c (grokfndecl): Improve error-recovery.
9070         * decl2.c (grokfield): Likewise.
9071         * pt.c (check_specialization_scope): New function.
9072         (begin_specialization): Call it.
9073         (process_partial_specialization): New function, split out from
9074         push_template_decl.  Check partial specializations more
9075         stringently.
9076         (push_template_decl): Call it.
9077         (check_explicit_specialization): Don't attempt to handle explicit
9078         specializations in class scope.
9079         (template_parm_data): Document.  Add current_arg and
9080         arg_uses_template_parms.
9081         (mark_template_parm): Set it.
9082         (tsubst_arg_types): Remove unused variable.
9083         * semantics.c (begin_class_definition): Tweak.
9084
9085 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
9086
9087         * inc/typeinfo (type_info::type_info(const char*)): Make
9088         `explicit'.
9089
9090         * cp-tree.h (hash_tree_cons_simple): New macro.
9091         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
9092         (coerce_template_parms): Use make_temp_vec, instead of
9093         make_tree_vec.  Document this behavior.
9094         (lookup_template_class): Likewise.
9095         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
9096         Remove dead code (and add assertion to check its deadness).  Fix
9097         bug w.r.t. exception specifications.
9098
9099 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
9100
9101         * decl2.c (import_export_vtable): Always make artificials comdat.
9102         (import_export_decl): Likewise.
9103         * pt.c (mark_decl_instantiated): Likewise.
9104
9105 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
9106
9107         * cp-tree.h (finish_globally_qualified_member_call_expr):
9108         Rename to ...
9109         (finish_qualified_call_expr).
9110         * semantics.c: Likewise.
9111         * parse.y (primary): Use it.
9112         * method.c (hack_identifier): Remove redundant code.
9113
9114         * init.c (resolve_offset_ref): Call convert_from_reference to
9115         handle members of reference type.  Improve error recovery.
9116
9117 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
9118
9119         * cp-tree.h: Declare warn_nontemplate_friend.
9120         * decl2.c (lang_decode_option): Set.
9121         * lang-options.h: Add -Wnon-template-friend.
9122         * friend.c (do_friend): Use to toggle non-template function warning.
9123
9124 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
9125
9126         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
9127         corresponding INTEGER_CSTs when processing_template_decl.
9128         * pt.c (tsubst_enum): Tweak accordingly.
9129
9130 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
9131
9132         * decl.c (pushdecl_class_level): Add warning here.
9133         (pushdecl): Tweak.
9134
9135 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
9136
9137         * cvt.c (convert_pointer_to_real): Tidy.
9138         * search.c (get_base_distance_recursive): Simplify.
9139         (get_base_distance): Likewise.
9140
9141         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
9142         parms.
9143
9144 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
9145
9146         * lex.c (check_newline):  Call HANDLE_PRAGMA before
9147         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
9148         if unknown pragmas are encountered.
9149         (handle_sysv_pragma): Interpret return code from
9150         handle_pragma_token ().  Return success/failure indication rather
9151         than next unprocessed character.
9152         (pragma_getc): New function: retrieves characters from the
9153         input stream.  Defined when HANDLE_PRAGMA is defined.
9154         (pragma_ungetc): New function: replaces characters back into the
9155         input stream.  Defined when HANDLE_PRAGMA is defined.
9156
9157 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
9158
9159         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
9160         * class.c (build_vtable_entry_ref): Likewise.
9161
9162 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
9163
9164         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
9165         * decl2.c (import_export_decl): Likewise.
9166         * pt.c (instantiate_decl): Use it.
9167
9168 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
9169
9170         * decl.c (lookup_name_real): Also do implicit typename thing for
9171         artificial TYPE_DECLs.
9172         * search.c (lookup_field): Likewise.
9173         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
9174         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
9175         (enter_scope_of): Extract type from implicit typename.
9176         (begin_class_definition): Likewise.
9177         * lex.c (identifier_type): Handle implicit typename when checking
9178         for SELFNAME.
9179
9180         * cp-tree.h: Declare flag_strict_prototype.
9181         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
9182         -fstrict-prototype.
9183         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
9184         specified, set it to the value of pedantic.
9185
9186 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
9187
9188         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
9189
9190 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
9191
9192         * decl.c (finish_enum): Handle member enums of classes declared in
9193         template functions.
9194
9195         * decl2.c (grok_x_components): Strip attributes before calling
9196         groktypename.
9197
9198 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
9199
9200         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
9201         -fenum-int-equivalence and -fno-nonnull-objects.
9202         * class.c (check_for_override): Remove support for -fall-virtual.
9203         (finish_struct_1): Likewise.
9204         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
9205         * typeck.c (build_binary_op_nodefault): Likewise.
9206         * cvt.c (ocp_convert): Likewise.
9207         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
9208         * class.c (build_vbase_path): Likewise.
9209
9210 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
9211
9212         * Makefile.in (INTERFACE): New, set to 1.
9213
9214 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
9215
9216         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
9217         comparing with global_namespace.
9218         (dump_aggr_type): Likewise.
9219
9220         * decl.c (grokfndecl): Issue error on declaration of friend
9221         templates with explicit template arguments.
9222
9223         * pt.c (convert_template_argument): New function, split out
9224         from...
9225         (coerce_template_parms): Here.
9226         (tsubst): Attempt better error-recovery.
9227
9228 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9229
9230         * pt.c (decl_template_parm_p): Add checks for
9231         TEMPLATE_TEMPLATE_PARM.
9232
9233 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
9234
9235         * lex.c (do_identifier): Fix thinko in previous change.
9236
9237 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
9238
9239         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
9240         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
9241
9242 1998-08-28  Richard Henderson  <rth@cygnus.com>
9243
9244         Add support for discarding unused virtual functions.
9245         * lang-options.h: Add -fvtable-gc.
9246         * cp-tree.h: Add flag_vtable_gc.
9247         * decl2.c (output_vtable_inherit): New fn.
9248         (finish_vtable_vardecl): Call it.
9249         * class.c (build_vtable_entry_ref): New fn.
9250         (build_vtbl_ref): Call it.
9251
9252 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
9253
9254         * cp-tree.h (build_enumerator): Take the enumeration type as a
9255         parameter.
9256         * decl.c (finish_enum): Don't set the TREE_TYPE for the
9257         enumeration constant values if we're processing_template_decls.
9258         Don't set the type for the CONST_DECLs either; that's done in
9259         build_enumerator.
9260         (build_enumerator): Take the enumeration type as a
9261         parameter.
9262         * lex.c (do_identifier): Don't resolve enumeration constants while
9263         processing template declarations, even if they happen to be
9264         TEMPLATE_PARM_INDEXs.
9265
9266         * parse.y (current_enum_type): New variable.
9267         (primary): Don't allow statement-expression in local classes just
9268         as we don't in global classes.
9269         (structsp): Use current_enum_type.
9270         (enum_list): Likewise.
9271         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
9272         finish_enum; they no longer occur.
9273
9274         * cp-tree.h (finish_base_specifier): New function.
9275         * parse.y (base_class): Use it.
9276         * semantics.c (finish_base_specifier): Define it.
9277
9278         * parse.y (structsp): Warn on use of typename outside of template
9279         declarations.
9280
9281 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
9282
9283         * lex.c (handle_cp_pragma): Remove #pragma vtable.
9284         * lang-options.h: Remove +e options.
9285         * decl2.c (lang_decode_option): Likewise.
9286         (import_export_vtable): Don't check write_virtuals.
9287         (finish_vtable_vardecl, finish_file): Likewise.
9288         * search.c (dfs_debug_mark): Likewise.
9289         * semantics.c (begin_class_definition): Likewise.
9290         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
9291
9292         * call.c (build_over_call): Check flag_elide_constructors.
9293         * decl2.c: flag_elide_constructors defaults to 1.
9294         * typeck.c (convert_arguments): Remove return_loc parm.
9295         (build_function_call_real): Adjust.
9296
9297         * search.c: Tear out all mi_matrix and memoize code.
9298         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
9299         * lang-options.h: Remove documentation for -fhandle-exceptions,
9300         -fmemoize-lookups and -fsave-memoized.
9301         * cp-tree.h: Lose mi_matrix and memoize support.
9302         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
9303         * class.c: Lose struct class_level.
9304         (pushclass, popclass): Lose memoize support.
9305         * init.c (build_offset_ref): Likewise.
9306
9307         Never change BINFO_INHERITANCE_CHAIN.
9308         * init.c (emit_base_init): Change modification of
9309         BINFO_INHERITANCE_CHAIN to an assert.
9310         * search.c (get_base_distance_recursive): Likewise.
9311         (get_base_distance): Likewise.
9312         (lookup_member): Likewise.
9313         (convert_pointer_to_single_level): Likewise.
9314         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
9315         (lookup_fnfields): Likewise.
9316         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
9317         (unshare_base_binfos): Don't call propagate_binfo_offsets.
9318         (layout_basetypes): Call propagate_binfo_offsets instead of
9319         unshare_base_binfos.
9320         * decl.c (xref_basetypes): Call unshare_base_binfos.
9321         * pt.c (instantiate_class_template): Likewise.
9322         * tree.c (reverse_path): Remove 'copy' parm; always make a
9323         temporary copy.
9324         * class.c (build_vbase_path): Just call it.
9325         * search.c (compute_access): Likewise.  Don't re-reverse.
9326
9327 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
9328
9329         * class.c (build_vbase_path): Use reverse_path.
9330         (finish_base_struct): Move warnings for inaccessible bases to
9331         layout_basetypes.
9332         (modify_one_vtable): Remove check of TREE_USED (binfo).
9333         (fixup_vtable_deltas1): Likewise.
9334         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
9335         (xref_tag): Remove binfos parameter.
9336         (make_binfo): Remove chain parameter.
9337         (reverse_path): Add copy parameter.
9338         * decl.c (init_decl_processing): Change calls to xref_tag.
9339         (xref_tag): Remove binfos parameter.
9340         (xref_basetypes): Change calls to make_binfo.
9341         * decl2.c (grok_x_components): Change calls to xref_tag.
9342         (handle_class_head): Likewise.
9343         * friend.c (do_friend): Likewise.
9344         * lex.c (make_lang_type): Change calls to make_binfo.
9345         * parse.y (structsp): Change calls to xref_tag.
9346         (named_complex_class_head_sans_basetype): Likewise.
9347         (named_class_head): Likewise.
9348         * rtti.c (init_rtti_processing): Likewise.
9349         * search.c (compute_access): Change calls to reverse_path.
9350         (dfs_get_vbase_types): Change calls to make_binfo.
9351         (get_vbase_types): Remove dead code.
9352         * tree.c (unshare_base_binfos): Change calls to make_binfo.
9353         (layout_basetypes): Warn here about inaccessible bases.
9354         (make_binfo): Remove chain parameter.
9355         (reverse_path): Add copy parameter.
9356
9357 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
9358
9359         * class.c: #if 0 complete_type_p.
9360         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
9361         * method.c (process_overload_item): Likewise.
9362         * typeck.c (comp_target_types): Likewise.
9363
9364         Stop sharing binfos for indirect virtual bases.
9365         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
9366         (layout_basetypes): Likewise.
9367         (unshare_base_binfos): Copy vbases, too.
9368         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
9369         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
9370         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
9371         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
9372         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
9373         reference to BINFO_VIA_PUBLIC.
9374         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
9375         (push_class_decls): Use them.
9376         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
9377         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
9378
9379 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
9380
9381         * decl.c (build_enumerator): Set DECL_CONTEXT for the
9382         CONST_DECLs.
9383
9384 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
9385
9386         * cp-tree.h (finish_enum): Change prototype.
9387         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
9388         VALUES parameter.  Don't try to compute mins/maxs if
9389         processing_template_decl.
9390         * parse.y (structsp): Use new calling sequence for finish_enum.
9391         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
9392         (lookup_template_class): Remove unused variables.  Tweak.
9393         Register enums on instantiation list before substituting
9394         enumeration constants.
9395         (tsubst_decl): Remove unused variables.
9396         (regenerate_decl_from_template): Likewise.
9397
9398         * decl.c (duplicate_decls): Don't obliterate the
9399         DECL_TEMPLATE_INFO for a template if we're not replacing it with
9400         anything.
9401
9402         * lex.c (do_identifier): Fix typo in comment.
9403
9404 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9405
9406         * errfn.c: Remove stdarg.h/varargs.h.
9407         * tree.c: Likewise.
9408
9409 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
9410
9411         * pt.c (tsubst_copy): Only do typename overloading on an
9412         IDENTIFIER_NODE that happens to look like a typename if it actually
9413         has a type for us to use.
9414
9415 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
9416
9417         * typeck.c (comp_cv_target_types): Split out...
9418         (comp_target_types): From here.  Don't allow cv-qual changes under
9419         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
9420         (build_ptrmemfunc): Pass 1 to nptrs.
9421         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
9422
9423 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
9424
9425         * search.c (dependent_base_p): Don't compare a binfo to
9426         current_class_type; use the TREE_TYPE of the binfo instead.
9427
9428         * cp-tree.h (CLASS_TYPE_P): Revise definition.
9429
9430 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
9431
9432         * decl.c (duplicate_decls): Don't complain about different
9433         exceptions from an internal decl even if pedantic.
9434
9435         * typeck.c (convert_for_assignment): Converting from pm of vbase
9436         to derived is an error, not a sorry.
9437
9438         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
9439         * class.c (fixed_type_or_null): Rename from
9440         resolves_to_fixed_type_p.  Return the dynamic type of the
9441         expression, if fixed, or null.
9442         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
9443         does not match the static type.
9444         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
9445         resolves_to_fixed_type_p again.
9446
9447 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
9448
9449         * pt.c (tsubst_decl): Move special case code for dealing with
9450         tricky friend templates here from ...
9451         (regenerate_decl_from_template): Here.
9452
9453 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
9454
9455         * decl.c (start_decl): Remove redundant linkage check.
9456
9457 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
9458
9459         * typeck.c (c_expand_return): Handle the case that valtype
9460         is wider than the functions return type.
9461
9462 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
9463
9464         * cp-tree.h (CLASS_TYPE_P): New macro.
9465         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
9466         * pt.c (process_template_parm): Undo previous change.
9467
9468 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
9469
9470         * cp-tree.h: Declare.
9471         * pt.c (decl_template_parm_p): New function.
9472         * decl.c (pushdecl): Check decls for redeclaring template parms.
9473         (xref_tag): Make redeclaration an error, print decl.
9474         * decl2.c (grokfield): Check field_decls for redeclaration as well.
9475
9476 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
9477
9478         * parse.y (primary): Fix up the type of string constants.
9479
9480 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
9481
9482         * typeck.c (convert_for_initialization): Move check for odd uses
9483         of NULL to avoid duplicate warnings.
9484
9485 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
9486
9487         * tree.c (lvalue_type): Fix for arrays.
9488         * typeck.c (string_conv_p): New fn.
9489         (convert_for_assignment): Use it.
9490         (build_unary_op): Use lvalue_type.
9491         * call.c (standard_conversion, convert_like): Use string_conv_p.
9492         (add_function_candidate): Use lvalue_type.
9493         * cvt.c (convert_to_reference): Likewise.
9494         * decl2.c (lang_decode_option): Ignore -traditional.
9495         * decl.c (init_decl_processing): flag_writable_strings inhibits
9496         flag_const_strings.
9497
9498 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
9499
9500         * lang-options.h (lang_options): Add fconst-strings to the list
9501         of valid options.
9502         * decl2.c (lang_f_options, lang_decode_option): Likewise.
9503
9504 1998-08-24  Nathan Sidwell  <nathan@acm.org>
9505
9506         * lex.c (real_yylex): Don't warn about long long constants if
9507         we're allowing long long.
9508
9509 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9510
9511         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
9512         accessing bindings directly.
9513
9514         * search.c (my_tree_cons): Reimplement.
9515
9516         * lang-specs.h: Remove __HONOR_STD.
9517         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
9518
9519 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
9520
9521         * decl.c (grokdeclarator): Complain about in-class initialization
9522         of aggregates and/or references.
9523         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
9524         TEMPLATE_TYPE_PARMs.
9525
9526         * decl2.c (grok_array_decl): Add comment.
9527         (mark_used): Don't instantiate an explicit instantiation.
9528         * friend.c (make_friend_class): Remove bogus comment.  Fix check
9529         for partial specializations.
9530         * pt.c (check_explicit_specialization): Don't
9531         SET_DECL_EXPLICIT_INSTANTIATION here.
9532         (mark_decl_instantiated): Or here.
9533         (do_decl_instantiation): Do it here, instead.  Add checks for
9534         duplicate explicit instantiations, etc.  Tidy.
9535         (do_type_instantiation): Likewise.
9536         (instantiate_decl): Improve comments.  Complain about explicit
9537         instantiations where no definition is available.
9538
9539         * cp-tree.h (ansi_null_node): Remove.
9540         * call.c (build_over_call): Warn about converting NULL to an
9541         arithmetic type.
9542         * cvt.c (build_expr_type_conversion): Likewise.  Use
9543         null_ptr_cst_p instead of expanding it inline.
9544         * decl.c (ansi_null_node): Remove.
9545         (init_decl_processing): Make null_node always have integral type.
9546         * except.c (build_throw): Warn about converting NULL to an
9547         arithmetic type.
9548         * lex.c (init_parse): Remove handling of ansi_null_node.
9549         * pt.c (type_unification_real): Don't convert NULL to void* type.
9550         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
9551         (convert_for_assignment): Warn about converting NULL to an
9552         arithmetic type.
9553         (convert_for_initialization): Likewise.
9554
9555 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
9556
9557         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
9558         * pt.c (coerce_template_parms): Use no_linkage_check.
9559         * decl.c (grokvardecl): Likewise.
9560         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
9561
9562         * method.c (process_overload_item): Remove useless code.
9563
9564 1998-08-20  Per Bothner  <bothner@cygnus.com>
9565
9566         Handle new'ing of Java classes.
9567         * init.c (build_class_classref):  New function.
9568         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
9569         constructor does not return this;  don't need to exception-protect.
9570
9571         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
9572         * decl2.c (acceptable_java_type):  Handle template-derived types.
9573
9574 1998-08-20  Per Bothner  <bothner@cygnus.com>
9575
9576         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
9577
9578 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
9579
9580         * decl.c (duplicate_decls): Always merge the old and new patterns
9581         for templates, regardless of whether or not the new one has
9582         DECL_INITIAL.  Don't throw away specializations.  Merge
9583         DECL_SAVED_TREE.
9584         * pt.c (tsubst_decl): Use the right pattern when calculating the
9585         complete args for a new template instance.
9586         (do_decl_instantiation): Fix typo in comment.
9587         (regenerate_decl_from_template): Deal with tricky friend template
9588         case.
9589         (instantiate_decl): Likewise.
9590
9591 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
9592
9593         * init.c (build_builtin_delete_call): Add missing assemble_external
9594         call.
9595
9596 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
9597
9598         * parse.y (notype_unqualified_id): Also accept ~A<int>.
9599
9600 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
9601
9602         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
9603         arithmetic.
9604         * except.c (build_throw): Warn when NULL is thrown, even with
9605         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
9606         thrown expression.
9607
9608         * cp-tree.h (ansi_null_node): New variable.
9609         * decl.c (ansi_null_node): New variable.
9610         (init_decl_processing): Initialize its type.
9611         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
9612         for null_node in non-ANSI mode.
9613         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
9614         place of null_node to avoid spurious errors.
9615
9616 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
9617
9618         * cp-tree.h (enter_scope_of): New function.
9619         * parse.y (complex_direct_notype_declarator): Use it.
9620         * semantics.c (enter_scope_of): New function.
9621
9622 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
9623
9624         * decl.c (grokparms): No, here.
9625
9626         * decl.c (grokdeclarator): Catch parm with pointer to array of
9627         unknown bound here...
9628         * method.c (process_overload_item): ...not here.
9629
9630         * gxxint.texi: Remove obsolete documentation of overloading code.
9631
9632         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
9633         * class.c (finish_struct_bits): Likewise.
9634
9635         * tree.c (lvalue_type): Fix for arrays.
9636         * typeck.c (build_unary_op): Use lvalue_type.
9637         * call.c (add_function_candidate): Likewise.
9638         * cvt.c (convert_to_reference): Likewise.
9639
9640         * decl2.c (lang_decode_option): Ignore -traditional.
9641
9642         * init.c (build_offset_ref): Don't mess with error_mark_node.
9643         * lex.c (do_scoped_id): Use cp_error.
9644
9645         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
9646
9647 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9648
9649         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
9650
9651 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
9652
9653         * cp-tree.h (set_identifier_local_value): Provide prototype.
9654
9655         * decl2.c (do_namespace_alias): Remove unused variables `binding'
9656         and `old'.
9657
9658 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
9659
9660         * Makefile.in: Rename BBISON to BISON so that it can be properly
9661         inherited from the parent makefile.
9662
9663 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
9664
9665         * lang-options.h: Add -finit-priority.
9666         * decl2.c: Likewise.  Check flag_init_priority instead of
9667         USE_INIT_PRIORITY.
9668
9669         * decl2.c (setup_initp): New fn.
9670         (start_objects, finish_objects, do_ctors): Handle init_priority.
9671         (do_dtors, finish_file): Likewise.
9672
9673 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
9674
9675         * pt.c (tsubst_copy): Hush warning.
9676
9677         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
9678
9679 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
9680
9681         * pt.c (print_template_context): Don't abort when instantiating a
9682         synthesized method.
9683
9684         * decl.c (grokdeclarator): Issue errors on namespace qualified
9685         declarators in parameter lists or in class scope.
9686
9687 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
9688
9689         * pt.c (check_explicit_specialization): Don't abort on bogus
9690         explicit instantiations.
9691
9692 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
9693
9694         * typeck.c (require_complete_type): Use complete_type_or_else.
9695         (complete_type_or_else): Always return NULL_TREE on failure, as
9696         documented.
9697
9698         * pt.c (tsubst_aggr_type): Prototype.
9699         (tsubst_decl): New function, split out from tsubst.  Set
9700         input_filename and lineno as appropriate.
9701         (pop_tinst_level): Restore the file and line number saved in
9702         push_tinst_level.
9703         (instantiate_class_template): Set input_filename and lineno as
9704         appropriate.
9705         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
9706         context for a TYPENAME_TYPE is complete.
9707
9708         * decl2.c (grokbitfield): Issue errors on bitfields declared with
9709         function type.
9710         (do_dtors): As in do_ctors, pretend to be a member of the same
9711         class as a static data member while generating a call to its
9712         destructor.
9713
9714         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
9715         conversions, even in complex virtual base class hierarchies.
9716
9717 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
9718
9719         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
9720         (TYPE_TEMPLATE_INFO): Likewise.
9721         (SET_TYPE_TEMPLATE_INFO): Likewise.
9722         (ENUM_TI_TEMPLATE): Likewise.
9723         (ENUM_TI_ARGS): Likewise.
9724         (lookup_nested_type_by_name): Remove.
9725         * decl.c (maybe_process_template_type_declaration): Handle enums.
9726         (start_enum): Don't check for primary-template enum declarations
9727         here.
9728         (finish_enum): Clean up, document.  Make sure template enum
9729         constants get the correct type.
9730         (build_enumerator): Copy initializers for template enumerations,
9731         too.
9732         (grok_enum_decls): Document.
9733         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
9734         better.  Build LOOKUP_EXPRs for local variables, even if they are
9735         TREE_PERMANENT.
9736         * pt.c (tsubst_enum): Remove field_chain parameter.
9737         (template_class_depth): Include the depth of surrounding function
9738         contexts.
9739         (push_template_decl): Check for primary-template enum declarations
9740         here.  Deal with enumeration templates.
9741         (lookup_template_class): Likewise.
9742         (for_each_template_parm): Likewise.
9743         (instantiate_class_template): Don't call tsubst_enum directly,
9744         call tsubst instead, to instantiate enums.  Deal with all
9745         field_chain issues here, not in tsubst_enum.
9746         (lookup_nested_type_by_name): Remove.
9747         (tsubst_aggr_type): Revise handling of enumeration types.
9748         (tsubst): Likewise.
9749         (tsubst_copy): Likewise.
9750         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
9751
9752 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
9753
9754         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
9755         uses template parameters.
9756         * method.c (build_template_parm_names): Use the full set of
9757         template arguments for tsubst'ing.
9758         (build_overload_identifier): Pass the full set of template
9759         arguments to build_template_parm_names, not just the
9760         innermost_args.
9761         * pt.c (TMPL_ARGS_DEPTH): Define using
9762         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
9763         (NUM_TMPL_ARGS): New macro.
9764         (add_outermost_template_args): Deal with the case where the outer
9765         args will be completely discarded.
9766         (coerce_template_parms): Use the full set of template arguments
9767         for tsubst'ing.  Simplify.  Add some asserts.  Improve
9768         error messages.
9769         (lookup_template_class): Pass the full set of template arguments
9770         to coerce_template_parms.
9771         (tsubst): Add assertion.
9772         (do_type_instantiation): Don't instantiate member template
9773         classes.
9774
9775         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
9776         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
9777
9778 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
9779
9780         * method.c (set_mangled_name_for_decl): Change return type to void.
9781
9782         * decl.c (lookup_name_real): A namespace-level decl takes priority
9783         over implicit typename.  Avoid doing the same lookup twice.
9784
9785         * search.c (dependent_base_p): New fn.
9786         (dfs_pushdecls, dfs_compress_decls): Use it.
9787
9788         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
9789         virtual functions if the type doesn't have any.
9790
9791 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
9792
9793         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
9794         uses template parameters.
9795
9796 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
9797
9798         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
9799         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
9800         * lex.c (do_identifier): Don't use a second argument, or a type,
9801         when building LOOKUP_EXPRs.
9802         (do_identifier): Likewise.
9803         (do_scoped_id): Likewise.
9804         * method.c (hack_identifier): Improve error message.
9805         * pt.c (lookup_template_function): Don't needlessly call
9806         copy_to_permanent or build_min.
9807         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
9808         necessary.
9809         (do_decl_instantiation): Improve error message.
9810         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
9811         (build_min): Copy the type to the permanent obstack, too.
9812
9813 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
9814
9815         * init.c (init_init_processing): Remove BI* handling.
9816         (build_builtin_call): Remove.
9817         (build_builtin_delete_call): New fn.
9818         (build_delete): Use it.
9819
9820 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
9821
9822         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
9823         (maybe_check_template_type): New function.
9824         * decl.c (maybe_process_template_type_declaration): New function,
9825         split out from pushtag  Call maybe_check_template_type.
9826         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
9827         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
9828         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
9829         * pt.c (template_class_depth_real): Generalization of ...
9830         (template_class_depth): Use it.
9831         (register_specialization): Use duplicate_decls for duplicate
9832         declarations of specializations.
9833         (maybe_check_template_type): New function.
9834         (push_template_decl_real): Fix comment.
9835         (convert_nontype_argument): Likewise.
9836         (lookup_template_class): Likewise.  Avoid an infinite loop on
9837         erroneous code.
9838         (tsubst_friend_function): Fix comment.
9839         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
9840         an IDENTIFIER_NODE.
9841         * semantics.c (begin_function_definition): Use
9842         reset_specialization to note that template headers don't apply
9843         directly to declarations after the opening curly for a function.
9844
9845 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
9846
9847         * decl.c (push_overloaded_decl): Use current_namespace instead of
9848         DECL_CONTEXT (decl) to determine where we go.
9849
9850         * decl.c (lookup_name_real): Fix typo.
9851
9852 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
9853
9854         * friend.c (is_friend): Be lenient with member functions to deal
9855         with nested friends.
9856
9857 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
9858
9859         * class.c (finish_struct_1): Convert integer_zero_node to
9860         ssizetype before passing it to set_rtti_entry.
9861         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
9862         of any size to a pointer.
9863
9864 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
9865
9866         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
9867         (build_template_decl_overload): Remove.
9868         (set_mangled_name_for_decl): New function.
9869         (innermost_args): Remove is_spec parameter.
9870         (most_specialized, most_specialized_class): Remove declarations.
9871         (lookup_template_class): Add entering_scope parameter.
9872         (maybe_process_partial_specialization): New function.
9873         (finish_template_decl): Likewise.
9874         (finish_template_type): Likewise.
9875         * class.c (finish_struct): Clean up processing of member template
9876         specializations.
9877         * decl.c (pushtag): Fix formatting.
9878         (lookup_tag): Improve handling of pseudo-global levels.
9879         (make_typename_type): Adjust call to lookup_template_class.
9880         (shadow_tag): Use maybe_process_partial_specialization.
9881         (xref_tag): Improve handling of member friends.
9882         (start_function): Call push_nested_class before
9883         push_template_decl.  Don't call push_template_decl for
9884         specializations.
9885         * decl2.c (grok_x_components): Don't call xref_tag for
9886         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
9887         (grokclassfn): Use set_mangled_name_for_decl.
9888         (arg_assoc_class): Adjust call to innermost_args.
9889         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
9890         * error.c (dump_function_name): Improve printing of template
9891         function names.
9892         * friend.c (is_friend): Don't compare types of decls to determine
9893         friendship, unless flag_guiding_decls.
9894         (make_friend_class): Partial specializations cannot be friends.
9895         (do_friend): Use set_mangled_name_for_decl.  Call
9896         push_template_decl_real instead of push_template_decl.
9897         * method.c (build_decl_overload_real): Remove prototype.  Give it
9898         external linkage.
9899         (build_overload_identififer): Adjust call to innermost_args.
9900         (build_template_decl_overload): Remove.
9901         (set_mangled_name_for_decl): New function.
9902         * parse.y (.finish_template_type): New non-terminal.
9903         (template_def): Use finish_template_decl.  Use template_extdef
9904         instead of extdef.
9905         (template_extdef, template_datadef): New non-terminals, containing
9906         only those rules for things which can be templates.
9907         (datadef): Tidy.
9908         (template_type, self_template_type): Use .finish_template_type.
9909         (named_class_head): Use maybe_process_partial_specialization.
9910         * pt.c (mangle_class_name_for_template): Remove context parameter.
9911         (get_class_bindings): Remove outer_args parameter.
9912         (complete_template_args): Remove.
9913         (add_outermost_template_args): New function.
9914         (register_specialization): Return the specialization.
9915         (unregister_specialization): New function.
9916         (tsubst_template_parms): Likewise.
9917         (most_specialized, most_specialized_class): Prototype here as
9918         static.
9919         (original_template): Rename to most_general_template.
9920         (tsubst_template_parms): New function.
9921         (set_mangled_name_for_template_decl): Likewise.
9922         (TMPL_ARGS_DEPTH): New macro.
9923         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
9924         (TMPL_ARGS_LEVEL): New macro.
9925         (SET_TMPL_ARGS_LEVEL): Likewise.
9926         (TMPL_ARG): Likewise.
9927         (SET_TMPL_ARG): Likewise.
9928         (TMPL_ARGS_DEPTH): Likewise.
9929         (finish_member_template_decl): Use finish_template_decl.
9930         (maybe_process_partial_specialization): New function, split out
9931         from tsubst.
9932         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
9933         (maybe_begin_member_template_processing): Use new macros.
9934         (is_member_template): Likewise.
9935         (is_member_template_class): Likewise.
9936         (add_to_template_args): Likewise.  Deal with multiple levels of
9937         args.
9938         (maybe_process_partial_specialization): New function.
9939         (retrieve_specialization): Add consistency check.
9940         (determine_specialization): Return full argument list.
9941         (check_explicit_specialization): Tweak friend handling.  Use full
9942         argument lists.  Simplify.
9943         (current_template_args): Use new macros.
9944         (push_template_decl_real): Change ill-named mainargs to specargs.
9945         Check that a partial specialization actually specializes at least
9946         one parameter.   Improve friend handling.  Modify for full
9947         template arguments.
9948         (classtype_mangled_name): Don't mangle the names of
9949         specializations.
9950         (lookup_template_class): Add entering_scope parameter.  Use it to
9951         avoid finding a template type when an instantiation is required.
9952         Simplify.  Use full template arguments.
9953         (tsubst_friend_function): Use unregister_specialization.  Use new
9954         macros.  Use full template arguments.
9955         (tsubst_friend_class): Substitute, using tsubst_template_parms,
9956         into the template parameters before passing them to
9957         redeclare_class_template.
9958         (instantiate_class_template): Simplify.  Use full template
9959         arguments.  Adjust calls to get_class_bindings.  Use
9960         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
9961         (innermost_args): Use new macros.
9962         (tsubst_aggr_type): New function, split out from tsubst.
9963         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
9964         conventions for lookup_template_class.  Refine handling of partial
9965         instantiations.   Remove calls to complete_template_args.
9966         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
9967         and set_mangled_name_for_template_decl.
9968         (tsubst_copy): Use tsubst_aggr_type.
9969         (instantiate_template): Use full template arguments.
9970         (more_specialized): Improve formatting.
9971         (more_specialized_class): Adjust calls to get_class_bindings.
9972         (get_bindings_real): Don't call complete_template_args.
9973         (most_specialized): Don't overwrite input; create a new list.
9974         (most_specialized_class): Use most_general_template.
9975         (regenerate_decl_from_template): Use unregister_specialization.
9976         Use full template arguments.
9977         (instantiate_decl): Use full template arguments.
9978         (set_mangled_name_for_template_decl): New function.
9979         * semantics.c (begin_class_definition): Use
9980         maybe_process_partial_specialization.
9981         (finish_member_class_template): New function.
9982         (finish_template_decl): Likewise.
9983         (finish_template_type): Likewise.
9984         (typeck.c): Don't crash after issuing a compiler_error.
9985         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
9986
9987 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
9988
9989         * typeck2.c (build_functional_cast): Handle default-initialization.
9990
9991         * call.c (build_over_call): Pass 1 to popclass.
9992
9993         * parse.y (direct_notype_declarator): Add precedence declaration
9994         to notype_unqualified_id case.
9995         * Makefile.in (EXPECT): Adjust.
9996
9997         * tree.c (ovl_member): Fix for single function in OVL.
9998
9999 1998-07-27  Dave Brolley  <brolley@cygnus.com>
10000
10001         * c-lex.c (yylex): Fix boundary conditions in character literal and
10002         string literal loops.
10003
10004 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
10005
10006         * decl.c (lookup_name_real): OK, do return the from_obj value
10007         unless got_object depends on template parms.
10008
10009         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
10010
10011         * pt.c (coerce_template_parms): Also complain about local enums.
10012
10013         * cp-tree.h: Add prototype for set_identifier_local_value.
10014         * decl.c (set_identifier_local_value_with_scope): Make static,
10015         prototype.
10016         * search.c (covariant_return_p): Likewise.
10017         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
10018
10019         * call.c (build_method_call): Only pull out the type of a destructor
10020         if it's a template type parm.
10021         * decl.c (lookup_name_real): Never return the from_obj value.
10022
10023 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
10024
10025         * except.c (process_start_catch_block_old): Call start_decl_1 for
10026         catch parm.
10027         * decl.c (start_decl_1): Avoid duplicate error.
10028
10029         * init.c (expand_default_init): Only perform the initialization if
10030         it will do something.
10031
10032 1998-07-23  H.J. Lu  (hjl@gnu.org)
10033
10034         * parse.y (base_class): Check for invalid base class.
10035
10036 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
10037
10038         * decl2.c (import_export_template): Fold in...
10039         (import_export_class): ...to here.  Handle dllimport/export.
10040
10041         * class.c (build_vtable): Pass at_eof to import_export_vtable.
10042         (prepare_fresh_vtable): Likewise.
10043         * decl2.c (import_export_class): Split out...
10044         (finish_prevtable_vardecl): From here.
10045         * class.c (finish_struct_1): Call import_export_class if at_eof.
10046
10047         * decl.c (start_function): #if 0 mysterious code I wrote and have
10048         forgotten why.
10049         * rtti.c (get_tinfo_fn): If this is for a class type, set
10050         DECL_CONTEXT.
10051
10052 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
10053
10054         * inc/exception: Change terminate and unexpected to ().
10055
10056         * parse.y (named_class_head_sans_basetype_defn): A
10057         named_class_head_sans_basetype followed by '{' or ':' is a defn.
10058
10059 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
10060
10061         * tree.c (canonical_type_variant): New fn to handle arrays.
10062         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
10063         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
10064         * method.c (process_overload_item): Use build_overload_value for
10065         arrays.
10066
10067 1998-07-20  Dave Brolley  <brolley@cygnus.com>
10068
10069         * lex.c (mbchar.h): #include it.
10070         (GET_ENVIRONMENT): New macro.
10071         (init_parse): Set character set based on LANG environment variable.
10072         (real_yylex): Handle multibyte characters in character literals.
10073         (real_yylex): Handle multibyte characters in string literals.
10074
10075 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
10076
10077         * lex.c (do_identifier): Look for class value even if we don't
10078         have a global value.  Do implicit declaration if parsing is 2.
10079         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
10080         lookup.
10081
10082 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
10083
10084         * decl.c (pushtag): Revert previous change.
10085         * pt.c (lookup_template_class): Don't put out debugging
10086         information for types that use template parameters.
10087
10088         * decl.c (pushtag): Don't put out debugging information for
10089         compiler-generated typedefs.
10090
10091         * error.c (dump_type_real): Don't crash when presented with
10092         intQI_type_node or the like.
10093
10094         * semantics.c (finish_translation_unit): Fix spelling error in
10095         comment.
10096
10097 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
10098
10099         * decl.c (lookup_name_real): Pull out single function here.
10100         (select_decl): Not here.
10101         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
10102
10103         * decl.c (qualify_lookup): Tweak again.
10104
10105         * pt.c (lookup_template_class): Don't mess with the context of the
10106         instantiation.
10107         * decl2.c (current_decl_namespace): Remove special handling for
10108         templates.
10109
10110         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
10111         a member template specialization.
10112
10113         * tree.c (ovl_member): Use decls_match to compare functions.
10114         * decl.c (decls_match): Check the context of a function.
10115
10116         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
10117         in Koenig lookup support rules.
10118         * semantics.c (finish_call_expr): Handle the new cases.
10119
10120         * typeck.c (build_x_function_call): Handle overloaded methods.
10121
10122         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
10123
10124 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
10125
10126         * semantics.c (finish_object_call_expr): Revert previous change.
10127         * call.c (build_new_method_call): Likewise.  Instead, convert
10128         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
10129
10130 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
10131
10132         * decl.c (qualify_lookup): Handle templates.
10133
10134         * decl2.c (do_using_directive): Don't pass ancestor.
10135         * decl.c (push_using_directive): Calculate ancestor.
10136
10137         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
10138         * decl.c (pushdecl): Move type shadowing handling from here...
10139         (duplicate_decls): ...to here.
10140         * decl.c (set_identifier_local_value_with_scope): New fn.
10141         (pushdecl): Use it.
10142         (set_identifier_local_value, lookup_type_current_level): New fns.
10143         * decl2.c (do_local_using_decl): Handle types and binding level
10144         stuff properly.
10145
10146         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
10147         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
10148         (lookup_namespace_name): Likewise.
10149         * typeck.c (build_unary_op): Not here anymore.
10150
10151         * decl2.c (do_class_using_decl): Make sure we get an identifier.
10152         * class.c (handle_using_decl): Ignore TYPE_DECLs.
10153
10154         * decl.c (qualify_lookup): New fn.
10155         (lookup_name_real): Use it.
10156
10157 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
10158
10159         * decl2.c (add_using_namespace): When directly using a namespace
10160         that was indirect before, promote it.
10161
10162         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
10163         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
10164         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
10165         * decl.c (select_decl): Replace two flag parameters by one.
10166         (unqualified_namespace_lookup): Likewise, pass flag.
10167         (lookup_flags): New function.
10168         (lookup_name_real): Compute flags, pass them.
10169         (lookup_namespace_name): Call with zero-flag.
10170         * decl2.c (ambiguous_decl): Add flag parameter, complain only
10171         according to flags.
10172         (lookup_using_namespace, qualified_lookup_using_namespace):
10173         Add flag parameter, pass them through.
10174         * lex.c (do_scoped_id): Call with zero-flag.
10175
10176 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
10177
10178         * typeck.c (convert_for_assignment): Use comptypes.
10179
10180 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
10181
10182         * semantics.c (finish_object_call_expr): Move test for the
10183         function called being a TYPE_DECL to ...
10184         * call.c (build_new_method_call): Here.
10185
10186 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
10187
10188         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
10189         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
10190
10191         * lex.c (looking_for_typename): Don't initialize.
10192
10193         * decl2.c (ambiguous_decl): Clarify error message.
10194
10195         * decl.c (push_using_directive): Iterate over namespaces used
10196         indirectly.
10197
10198 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10199
10200         * decl2.c (add_using_namespace): Iterate over namespaces used
10201         indirectly.
10202
10203         * decl.c (lookup_name_real): Accept namespace aliases as locals.
10204         (cat_namespace_levels): Ignore aliases.
10205         (duplicate_decls): Ignore duplicate aliases.
10206         * decl2.c (do_namespace_alias): Process block level namespace
10207         aliases.  Store alias with pushdecl.  Remove odr errors.
10208         * parse.y (namespace_alias): New non-terminal.
10209         (extdef): Use it.
10210
10211 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
10212
10213         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
10214         Handle TEMPLATE_TYPE_PARM.
10215         (arg_assoc): Rewrite.
10216
10217         * pt.c (complete_template_args): Don't look at the context unless
10218         we have to.
10219
10220         * method.c (build_decl_overload_real): Fix namespace handling.
10221
10222         * typeck.c (build_unary_op): Extract a lone function from an
10223         OVERLOAD.
10224
10225         * call.c (build_scoped_method_call): Handle getting a namespace
10226         for basetype in a destructor call.
10227         (check_dtor_name): Handle enums.
10228
10229         * parse.y (using_directive): New nonterminal.
10230         (extdef, simple_stmt): Use it.
10231
10232 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10233
10234         * decl2.c (add_function): Move error message ...
10235         (arg_assoc_namespace): ... from here.
10236
10237 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
10238
10239         * parse.y (namespace_qualifier): Fix multiple level handling.
10240         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
10241         (arg_assoc): Don't skip the first argument of a function.
10242
10243 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
10244
10245         * search.c (my_tree_cons): Clean up.
10246
10247 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
10248
10249         * call.c (joust): Don't warn about "confusing" conversions to the
10250         same type.
10251
10252 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10253
10254         * class.c (push_nested_class): Complain about namespaces.
10255         * decl.c (start_decl): Enter the object's namespace.
10256         (cp_finish_decl): Leave it.
10257         (grokdeclarator): Likewise.
10258         * decl2.c (check_decl_namespace): New function.
10259         (finish_file): Call it.
10260         * parse.y (complex_direct_notype_declarator): Set complexity
10261         of namespace-qualified ids to -1, enter the namespace.
10262
10263         * method.c (build_template_decl_overload): Expect _DECL as first
10264         parameter.  Put context temporarily into current_namespace.
10265         * pt.c (check_explicit_specialization): Change caller.
10266         (tsubst): Likewise.
10267
10268         * init.c (build_offset_ref): Call mark_used and
10269         convert_from_reference for namespace members.
10270
10271 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10272
10273         * search.c (my_tree_cons): The bitfield is at index 2.
10274
10275 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
10276
10277         * lang-options.h: Format changed to work with new --help support
10278         in gcc/toplev.c
10279
10280 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10281
10282         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
10283         Do Koenig lookup in CALL_EXPR.
10284         (arg_assoc): Handle error_mark.
10285         * lex.c (is_global): New function.
10286         (do_identifier): Expect arguments for Koenig lookup.
10287         * parse.y (primary): Add rules for calls of unqualified function calls.
10288         (do_id): Change call of do_identifier.
10289         * pt.c (finish_stmt_expr): Likewise.
10290         * semantics.c (finish_id_expr): Likewise.
10291         (finish_call_expr): Add integer parameter to indicate
10292         argument-dependent lookup.
10293
10294         * decl.c (struct binding_level): New field using_directives.
10295         (push_using_decl): Not sorry anymore.
10296         (push_using_directive): New function.
10297         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
10298         (unqualified_namespace_lookup): New function, code from ...
10299         (lookup_name_real): ... here.
10300         * decl2.c (lookup_using_namespace): Pass using list instead of
10301         initial scope.
10302         (validate_nonmember_using_decl): New function.
10303         (do_nonmember_using_decl): New function.
10304         (do_toplevel_using_decl): Use them.
10305         (do_local_using_decl): New function.
10306         (do_using_directive): Support block-level directives.
10307         * parse.y (simple_stmt): Support using declarations and
10308         directives.
10309         (namespace_qualifier, namespace_using_decl): New non-terminals.
10310
10311         * xref.c (classname): New function.
10312         (GNU_xref_hier): Change class and base parameters to tree.
10313         * decl.c (xref_baseypes): Change caller.
10314         * friend.c (make_friend_class): Likewise.
10315
10316 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
10317
10318         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
10319         comparison.
10320
10321         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
10322         template template parameter, record its use.
10323         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
10324         its template arguments if exists.
10325
10326         * pt.c (coerce_template_template_parms): New function equivalent
10327         to coerce_template_parms when IS_TMPL_PARM is true.
10328         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
10329         all callers changed.
10330
10331         (coerce_template_parms): Access ARGLIST properly when creating a
10332         new vector.  Only accept implicit TYPE_DECL as valid argument for
10333         a template template parameter when it is a base class of
10334         current_class_type.  Don't display error message when COMPLAIN is
10335         false.
10336
10337 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
10338
10339         * repo.c (get_base_filename): Use file_name_nondirectory.
10340         (open_repo_file): Likewise.
10341         * cp-tree.h (file_name_nondirectory): Add prototype.
10342
10343 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
10344
10345         * friend.c (do_friend): Pull the identifier out of declarator.
10346         Use cp_error and friends.
10347         * decl2.c (qualified_lookup_using_namespace): Fix call to
10348         purpose_member.
10349         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
10350         (grokvardecl): Use DECL_CLASS_SCOPE_P.
10351         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
10352         * class.c (warn_hidden): Fix for OVERLOAD.
10353         From grahams@rcp.co.uk:
10354         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
10355         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
10356
10357 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
10358
10359         * g++.1 (-traditional): Remove duplicated documentation.
10360
10361 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
10362
10363         * method.c (flush_repeats): Add nrepeats parameter.
10364         (issue_nrepeats): Likewise.
10365         (is_back_referenceable_type): New function.  Don't back-reference
10366         TEMPLATE_TYPE_PARMs as well as simple types like integers.
10367         (build_mangled_name_for_type): Likewise.
10368         (build_mangled_name_for_type_with_Gcode): Likewise.
10369         (lasttype): Remove.
10370         (nrepeats): Likewise.
10371         (Nrepeats): Likewise.
10372         (start_squangling): Don't clear the variables removed above.
10373         (end_squangling): Likewise.
10374         (flush_repeats): Tidy.  Use nrepeats parameter rather than
10375         Nrepeats global.
10376         (issue_nrepeats): Likewise, but with nrepeats global.  Use
10377         is_backreferenceable_type.
10378         (build_overload_nested_name): Tidy.  Add comment.  Use
10379         build_mangled_name_for_type.
10380         (build_underscore_int): Comment.
10381         (build_overload_scope_ref): Use build_mangled_name_for_type.
10382         (build_overload_int): Likewise.
10383         (build_template_template_parm_names): Tidy.
10384         (build_template_parm_names): Use build_mangled_name_for_type.
10385         (build_overload_identifier): Add comments.
10386         (build_mangled_name_for_type_with_Gcode): Split out from
10387         build_mangled_name.
10388         (build_mangled_name_for_type): Use it.
10389         (build_mangled_name): Rework to use build_mangled_name_for_type
10390         and to not use global nrepeats/Nrepeats.  Tidy.
10391         (process_modifiers): Tidy.
10392         (check_btype): Use is_backreferenceable_type.  Add comment.
10393         Rename `node' to `type'.
10394         (process_overload_item): Set numeric_output_need_bar here.
10395         Use build_mangled_name_for_type.  Tidy.
10396         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
10397         build_mangled_name_for_type.
10398
10399         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
10400         for TYPE_DECLs.
10401
10402 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
10403
10404         * cp-tree.h (warn_long_long): Define.
10405         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
10406         warning "ANSI C++ does not support `long long'".
10407         * decl2.c (warn_long_long): Define.
10408         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
10409
10410 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
10411
10412         * decl.c (xref_tag): Handle attributes between 'class' and name.
10413         * parse.y (aggr): Likewise.
10414         * semantics.c (finish_class_definition): Likewise.
10415         * Makefile.in (EXPECTED): Adjust.
10416
10417         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
10418         * decl2.c: Define them.
10419         (lang_decode_option): Handle them.
10420         * lang-options.h: Add -foptional-diags.
10421         * class.c (finish_struct): Don't complain about multiple meanings of
10422         name if -fno-optional-diags.
10423         * decl.c (pushdecl_class_level): Likewise.
10424         * lex.c (real_yylex): Check warn_multichar.
10425
10426 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
10427
10428         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
10429
10430         * tree.c (make_binfo): Fix length.
10431
10432 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
10433
10434         * decl2.c (lang_decode_option): Remove warn_template_debugging.
10435         * lang-options.h: Likewise.
10436
10437 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10438
10439         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
10440         (process_start_catch_block): Likewise for variables
10441         `false_label_rtx', `call_rtx' and `return_value_rtx'.
10442
10443 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
10444
10445         * tree.c (build_srcloc): Make sure we allocate this node on the
10446         permanent obstack.
10447
10448 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
10449
10450         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
10451         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
10452         (lang_specific_driver): Only add -lm automatically if need_math is
10453         nonzero.
10454
10455 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
10456
10457         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
10458
10459 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10460
10461         * Makefile.in (EXPR_H): New dependency variable.
10462         (decl2.o): Depend on $(EXPR_H).
10463         (typeck.o): Likewise.
10464         (init.o): Likewise.
10465         (expr.o): Likewise.
10466
10467 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
10468
10469         * decl.c (start_enum): Put local enums on permanent_obstack.
10470
10471 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
10472
10473         * cp-tree.h (c_get_alias_set): Declare.
10474         * decl.c (init_decl_processing): Set lang_get_alias_set.
10475
10476 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
10477
10478         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
10479         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
10480         flag for all function decls which are in the exception table.
10481         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
10482         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
10483         code is emitted for any referenced rtti function.
10484
10485 1998-06-25  Dave Brolley  <brolley@cygnus.com>
10486
10487         * lang-specs.h: Use new | syntax to eliminate
10488         string concatenation.
10489
10490 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
10491
10492         * cp-tree.h (CP_DECL_CONTEXT): New macro.
10493         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
10494         * method.c (build_overload_nested_name): Likewise.
10495         * sig.c (build_signature_pointer_or_reference_type): Don't set
10496         DECL_CONTEXT.
10497
10498 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10499
10500         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
10501         * cp-tree.h (FROB_CONTEXT): New macro.
10502         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
10503         * decl.c (namespace_binding): Replace NULL_TREE with
10504         global_namespace.
10505         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
10506         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
10507         Likewise.
10508         * decl.c (pushtag): Use FROB_CONTEXT.
10509         (pushdecl, make_typename_type, define_function, grokdeclarator):
10510         Likewise.
10511         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
10512         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
10513         Likewise.
10514         * decl2.c (decl_namespace): Return global_namespace if no context.
10515         * method.c (build_overload_nested_name): Expect null as context.
10516         * pt.c (mangle_class_name_for_template): Do nothing for null
10517         contexts.
10518         (lookup_template_class): Allow for null id_context.
10519
10520 1998-06-25  Richard Henderson  <rth@cygnus.com>
10521
10522         * method.c (emit_thunk): Set current_function_is_thunk for the
10523         ASM_OUTPUT_MI_THUNK case as well.
10524
10525 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
10526
10527         * exception.cc (__cplus_type_matcher): Get a match_info pointer
10528         instead of an exception table entry as a parameter.
10529
10530 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
10531
10532         * parse.y (function_try_block): Don't call start_catch_handler.
10533         * except.c (call_eh_info): Remove coerced field from declaration.
10534         (build_eh_type_type_ref): New function to create an address of a
10535         rtti function for the new style exception tables.
10536         (expand_start_catch_block): Split function, this contains the
10537         common part.
10538         (process_start_catch_block_old): New function to perform the rest
10539         of expand_start_catch_block under old style exceptions.
10540         (process_start_catch_block_old): New function to perform the rest
10541         of expand_start_catch_block under new style exceptions.
10542         (expand_end_catch_block): Only pop the false label off the stack under
10543         the old style of exceptions.
10544         * semantics.c (finish_try_block): Don't call start_catch_handler.
10545         * exception.cc (struct cp_eh_info): Add original_value field.
10546         (__cplus_type_matcher): Perform type matching on the original exception
10547         value, and if we have a match, set the current value.
10548         (__cp_push_exception): Set the original exception value.
10549
10550 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
10551
10552         * call.c (joust): Fix confusing conversion warning.
10553
10554         * call.c (build_op_delete_call): Add placement parm.  Check
10555         LOOKUP_SPECULATIVELY.
10556         * cp-tree.h, decl2.c, init.c: Adjust.
10557         * decl.c (finish_function): Use it.
10558
10559         * pt.c (tsubst): Diagnose creating void fields or variables.
10560
10561 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10562
10563         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
10564
10565         * cp-tree.h (check_dtor_name): Add prototype.
10566
10567         * init.c (expand_member_init): Remove unused variables
10568         `ptr_type_node', `parm' and `rval'.
10569
10570         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
10571         in call to fprintf.
10572         (lang_print_xnode): Likewise.
10573
10574         * typeck2.c (enum_name_string): Cast argument to sprintf to long
10575         and use %ld specifier.
10576
10577         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
10578         specifier in call to fprintf.
10579         (GNU_xref_member): Cast argument to sprintf to int.
10580
10581 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
10582
10583         * typeck2.c (pop_init_level): Warn about implicit zero initialization
10584         of struct members.
10585
10586 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10587
10588         * cp-tree.h: Prototype function `check_java_method'.
10589
10590 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
10591
10592         * class.c (finish_struct): Make conflicting use of id a pedwarn.
10593         * decl.c (pushdecl_class_level): Likewise.
10594
10595 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
10596
10597         * pt.c (convert_nontype_argument): Issue an error when presented
10598         with an integer (real) constant that cannot be simplified to an
10599         INT_CST (REAL_CST).
10600
10601         * cp-tree.h (c_get_alias_set): Remove declaration added in
10602         1998-06-13 change that should never have been checked in.
10603
10604 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
10605
10606         * typeck.c (build_binary_op_nodefault): Change % in format strings
10607         to %%.
10608
10609         * decl.c (grokvardecl): Don't build_static_name for decls that
10610         aren't at namespace scope.
10611
10612         * init.c (perform_member_init): Catch default-initialization of
10613         references.
10614
10615 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
10616
10617         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
10618
10619 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
10620
10621         * method.c (hack_identifier): Complain about getting a namespace
10622         or class template.
10623         * typeck.c (decay_conversion): Remove check for namespaces.
10624         * typeck2.c (incomplete_type_error): Likewise.
10625         * parse.y (template_arg): Add PTYPENAME expansion.
10626
10627 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
10628
10629         * decl.c (grokvardecl): Don't build external assembler names for
10630         TYPENAMEs in other namespaces as there is no declarator.
10631         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
10632         info from DECL_CONTEXT if it is NULL.
10633
10634 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
10635
10636         * call.c (check_dtor_name): Split out.
10637         (build_scoped_method_call): Use it.
10638         (build_method_call): Use it.
10639         * init.c (build_offset_ref): Use it.
10640
10641         * typeck.c (build_static_cast): Fix handling of pointers to members.
10642
10643         * decl.c (finish_function): Just return nothing from a constructor.
10644         * typeck.c (c_expand_return): Complain about returning a void
10645         expression from a destructor.
10646
10647 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
10648
10649         * class.c (alter_access): Accept a BINFO explaining how to get
10650         from the entity whose accessed is being altered to the type doing
10651         the altering.
10652         (handle_using_decl): New function containing code split out from ...
10653         (finish_struct_1): Here.
10654
10655         * cp-tree.h (complete_type_or_else): Declare.
10656         * init.c (build_new_1, build_delete): Use it.
10657         * typeck.c (require_complete_type): Use complete_type, rather than
10658         expanding it inline.
10659         (complete_type_or_else): New function.
10660         (build_component_ref): Use it.
10661         (pointer_int_sum): Make sure the type pointed to is complete.
10662         (pointer_diff): Likewise.
10663
10664         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
10665         types.
10666
10667         * search.c (get_matching_virtual): Note that member templates
10668         cannot override virtual functions.
10669
10670 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
10671
10672         * pt.c (check_explicit_specialization): If DECLARATOR turned into
10673         an error_mark_node from lookup_template_function, return the same.
10674         (determine_specialization): Also make sure TEMPLATE_ID isn't an
10675         error_mark_node, before we try to read its operands.
10676         * decl.c (grokdeclarator): If we got an error_mark_node from
10677         check_explicit_specialization, just return it right back.
10678
10679 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
10680
10681         * class.c (instantiate_type): Don't treat template-ids that don't
10682         specify any template arguments as equivalent to ordinary
10683         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
10684         pointer-to-members for member templates.  Tidy slightly.
10685         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
10686         * init.c (build_offset_ref): Handle template-ids like ordinary
10687         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
10688         offset part of the OFFSET_REF.
10689         * typeck.c (build_unary_op): Change check for unknown types to
10690         look for OFFSET_REFs, not SCOPE_REFs.
10691
10692 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
10693
10694         * pt.c (is_member_template_class): New function.
10695         (push_template_decl_real): Use it.
10696
10697 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
10698
10699         * friend.c (do_friend): Add support for nested classes using
10700         member functions of the enclosing class as friends.
10701
10702 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
10703
10704         * call.c (convert_default_arg): Make global, not static.
10705         (convert_arg_for_ellipsis): Split out from ...
10706         (build_over_call): Here.
10707         * cp-tree.h (convert_default_arg); Declare.
10708         (convert_arg_to_ellipsis): Likewise.
10709         (do_member_init): Remove.
10710         * init.c (do_member_init): Remove; this code is dead.
10711         (expand_member_init): Remove much of this code; it is dead.
10712         * typeck.c (convert_arguments): Use convert_default_arg and
10713         convert_arg_for_ellipsis, rather than duplicating here.
10714
10715         * call.c (convert_like): Don't fail silently if
10716         build_user_type_conversion fails.  Always return error_mark_node
10717         for failure.
10718
10719 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
10720
10721         * search.c (covariant_return_p): Complain about ambiguous base.
10722
10723         * typeck.c (build_component_ref): Diagnose ref to nested type.
10724
10725 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
10726
10727         * decl.c (grokparms): Check that INIT isn't an error_mark_node
10728         before giving error about invalid type for default arg.
10729
10730 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
10731
10732         * call.c (build_method_call): Fix thinko.
10733
10734 1998-06-10  Dave Brolley  <brolley@cygnus.com>
10735
10736         * decl2.c (lang_decode_option): New argc/argv interface.
10737         * cp-tree.h (lang_decode_option): New argc/argv interface.
10738         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
10739         specified for cpplib-enabled compilers.
10740         * lex.c (lang_init): Don't check_newline for cpplib.
10741         (init_parse): Don't initialize cpplib here.
10742
10743 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
10744
10745         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
10746         piece before checking DECL_MUTABLE_P.
10747
10748 1998-06-10  John Carr  <jfc@mit.edu>
10749
10750         * tree.c (debug_binfo): Make printf format match arguments.
10751
10752         * error.c (OB_PUTI): Make printf format match arguments.
10753
10754 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
10755
10756         * init.c (perform_member_init): Handle default-initialization.
10757
10758         * except.c (build_throw): Handle throwing NULL.
10759
10760         * typeck.c (build_x_function_call): Use resolve_offset_ref.
10761
10762         * search.c (compute_access): Only strip an anonymous union
10763         for a FIELD_DECL.
10764
10765         * call.c (add_builtin_candidates): Tweak.
10766
10767         * cvt.c (build_expr_type_conversion): Restore code for conversion
10768         from class types.
10769         * decl2.c (delete_sanity): Use it.  Clean up.
10770
10771         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
10772
10773 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
10774
10775         * typeck.c (c_expand_return): Don't warn about void expressions on
10776         return statements in functions returning void.
10777
10778 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
10779
10780         * pt.c (fn_type_unification): Revise documentation.  Tidy.
10781         (type_unification): Likewise.
10782
10783 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
10784
10785         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
10786         expand_end_catch.
10787         * parse.y (function_try_block): Rename expand_start_catch, and delete
10788         expand_end_catch.
10789         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
10790         expand_end_catch.
10791
10792 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
10793
10794         * search.c (lookup_member): New fn.
10795         * class.c (finish_struct_1): Use it.
10796         * decl.c (lookup_name_real): Use it.
10797
10798 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10799
10800         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
10801
10802         * cp-tree.h: Add prototype for `maybe_print_template_context' and
10803         `maybe_make_one_only'.
10804
10805         * decl.c (auto_function): Remove unused variable `decl'.
10806
10807         * decl2.c: Include dwarf2out.h and dwarfout.h.
10808
10809         * lex.c: Remove redundant declarations of `set_float_handler' and
10810         `asm_out_file'.
10811
10812 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
10813
10814         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
10815         time flag.  Call __cp_eh_info instead of __cp_exception_info.
10816         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
10817         (__cp_exception_info): Return offset into cp_eh_info structure to
10818         match what use to be the start of this structure.
10819         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
10820         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
10821         compile time flag.
10822         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
10823         __cp_eh_info instead of __cp_exception_info.
10824
10825 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
10826
10827         * decl.c (cp_finish_decl): Disable inlining of extern inlines
10828         with static variables.
10829
10830 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
10831
10832         * init.c (build_offset_ref): Correct previous change to use build,
10833         not build_min.
10834
10835 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
10836
10837         * class.c (instantiate_type): Handle pointer-to-members where the
10838         member is a template.
10839         * init.c (build_offset_ref): Likewise.
10840         * typeck.c (build_unary_op): Likewise.
10841
10842 1998-06-07  Richard Henderson  <rth@cygnus.com>
10843
10844         * lex.c (lang_init_options): New function.
10845         (lang_init): Remove flag_exceptions == 2 hack.
10846
10847 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
10848
10849         * search.c (envelope_add_decl): Tweak for implicit typename.
10850
10851         * call.c (joust): Also warn about confusing conversion op/constructor
10852         overload resolution.
10853
10854         * spew.c (yylex): Also return the TYPE_DECL if got_object.
10855         Don't clear got_object after '~'.
10856         * call.c (build_scoped_method_call): Tweak destructor handling.
10857         (build_method_call): Likewise.
10858         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
10859         TYPE_MAIN_VARIANT for destructors.
10860         * semantics.c (finish_object_call_expr): Complain about calling a
10861         TYPE_DECL.
10862
10863 1998-06-05  Per Bothner  <bothner@cygnus.com>
10864
10865         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
10866         Define - update needed by gcc.c change.
10867
10868 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
10869
10870         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
10871
10872 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
10873
10874         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
10875         * decl.c (lookup_name_real): Add namespaces_only parameter.
10876         If set, return only NAMESPACE_DECLs.
10877         (select_decl): Likewise.
10878         (identifier_type_value): Give additional parameter.
10879         (lookup_name_nonclass): Likewise.
10880         (lookup_name): Likewise.
10881         (find_binding): Skip namespace aliases.
10882         (binding_for_name): Likewise.
10883         (push_namespace): Check for namespace aliases.
10884         (lookup_name_namespace_only): New function.
10885         (begin_only_namespace_names, end_only_namespace_names): New functions.
10886         * decl2.c (set_decl_namespace): Skip namespace aliases.
10887         (do_using_directive): Likewise.
10888         (do_namespace_alias): Produce namespace aliases, fix alias
10889         redeclaration.
10890         * error.c (dump_decl): Support SCOPE_REF.
10891         * parse.y (extdef): Wrap lookup with namespace_only for namespace
10892         aliases and using declarations.
10893
10894 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
10895
10896         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
10897
10898         * error.c (dump_expr): Clean up NEW_EXPR case.
10899
10900 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10901
10902         Suggested by Brendan Kehoe
10903         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
10904         treat it as using ::decl.
10905
10906         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
10907
10908         * tree.c (mapcar): Support NEW_EXPR.
10909
10910         * error.c (dump_expr): Support NEW_EXPR.
10911
10912 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
10913
10914         * method.c (make_thunk): Use overload machinery to make name.
10915         * search.c (covariant_return_p): New fn.
10916         (get_matching_virtual): Use it.
10917
10918         * init.c (build_new_1): Fix check for void.
10919
10920 1998-06-01  Per Bothner  <bothner@cygnus.com>
10921
10922         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
10923         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
10924         java_int_type_node, java_long_type_node, java_float_type_node,
10925         java_double_type_node, java_char_type_node, java_boolean_type_node):
10926         New "primitive" types, with predefined names __java_byte etc.
10927         (record_builtin_java_type):  New function.
10928         (init_decl_processing):  Make Java types with record_builtin_java_type.
10929         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
10930         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
10931         (grokfndecl):  Call check_java_method for Java classes.
10932         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
10933         (process_overload_item):  Match types against specific
10934         java_XX_type_node types, rather than using is_java_type.
10935         * class.c (finish_struct_1):  Don't add default copy constructor
10936         or operator= if TYPE_FOR_JAVA.
10937         (pop_lang_conext):  Restore strict_prototyp proper if Java.
10938         * decl2.c (acceptable_java_type, check_java_method):  New functions.
10939         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
10940         (tsubst):  Move common statement after if statement.
10941         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
10942
10943 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
10944
10945         * pt.c (for_each_template_parm): Use first_rtl_op.
10946
10947         * tree.c (build_cplus_array_type_1): Also check index_type for
10948         template parms.
10949
10950 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
10951
10952         * pt.c (tsubst): Always copy BINFO_BASETYPES.
10953
10954 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
10955
10956         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
10957         TYPE_SIZE_UNIT too.
10958
10959 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
10960
10961         * decl.c (grokdeclarator): Don't complain about in-class
10962         initialization of static consts if we don't really know the type
10963         of the variable.
10964
10965 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
10966
10967         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
10968         * method.c (build_destructor_name): New fn.
10969         * decl2.c (maybe_retrofit_in_chrg): Split out...
10970         (grokclassfn): From here.  Reorganize.
10971         * decl.c (grok_ctor_properties): Make sure ctors for types with
10972         vbases have the in_chrg parm.
10973         * pt.c (instantiate_class_template): Update
10974         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
10975         grok_*_properties.
10976         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
10977
10978 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
10979
10980         * pt.c (instantiate_decl): Make test for whether or not static
10981         variables should be instantiated early match its comment.
10982
10983 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
10984
10985         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
10986         a member.
10987         (start_function): Call check_default_args.
10988         * decl2.c (grokfield): Don't call check_default_args.
10989         (check_default_args): Use cp_error_at.
10990         * lex.c (do_pending_defargs): Call check_default_args.
10991
10992 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
10993
10994         * call.c (build_method_call): Make sure get_type_value returns
10995         something before we try to use its TYPE_MAIN_VARIANT.
10996         (build_scoped_method_call): Likewise.
10997
10998 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
10999
11000         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
11001         initialize an array.
11002
11003         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
11004         DECL_VIRTUAL_P.
11005
11006         * friend.c (do_friend): Clarify template warning.
11007
11008 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
11009
11010         * decl.c (shadow_label): Don't treat decls as identifiers.
11011         (maybe_push_to_top_level): Clear shadowed_labels.
11012
11013         * pt.c (instantiate_decl): Reset lineno and filename after calling
11014         regenerate_decl_from_template.
11015
11016         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
11017         error_mark_node.
11018
11019 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
11020
11021         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
11022
11023 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11024
11025         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
11026         (convert_nontype_argument): Handle cases when nontype template
11027         parameters become classes after substitution.
11028
11029 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
11030
11031         * friend.c (is_friend): Use comptypes, rather than == to compare
11032         types.  Modify for new representation of template friends.
11033         (make_friend_class): Likewise.
11034         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
11035         (instantiate_class_template): Deal with template friends.
11036
11037         * decl.c (store_parm_decls): Remove redundant call to
11038         expand_main_function.
11039
11040 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11041
11042         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
11043         DECL_USE_TEMPLATE.
11044
11045 1998-05-26  Per Bothner  <bothner@cygnus.com>
11046
11047         * language_as_string:  Handle lang_java.
11048
11049 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
11050
11051         * decl.c (pushdecl): Don't copy the type_decl.
11052
11053 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11054
11055         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
11056         current_class_type.
11057         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
11058
11059         * parse.y (complex_direct_notype_declarator): Use $1 to access
11060         scope of notype_qualified_id.
11061
11062 1998-05-26  Dave Brolley  <brolley@cygnus.com>
11063
11064         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
11065         (init_parse): Initialize cpplib interface.
11066
11067         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
11068         empty continuation.
11069
11070 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
11071
11072         * decl.c (pushtag): Avoid crashing on erroneous input.
11073
11074 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11075
11076         * decl.c (push_namespace): Only produce one unique name for
11077         anonymous namespaces.
11078         (get_unique_name): Remove.
11079
11080 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
11081
11082         * call.c (tourney): Don't do any extra comparisons.
11083
11084         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
11085
11086         * cp-tree.h (processing_template_parmlist): Declare.
11087         * decl.c (pushtag): Don't call push_template_decl when we
11088         shouldn't.
11089         * pt.c (processing_template_parmlist): New variable.
11090         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
11091         (complete_template_args): Use it.
11092         (add_to_template_args): Likewise.
11093         (innermost_args): Likewise.
11094         (tsubst): Likewise.
11095         (begin_template_parm_list): Use processing_template_parmlist.
11096         (end_template_parm_list): Likewise.
11097
11098         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
11099         * decl.c (grokdeclarator): Use it.
11100         * decl2.c (grok_x_components): Likewise.
11101         * init.c (initializing_context): Likewise.
11102         * method.c (do_build_copy_constructor): Likewise.
11103         (do_build_assign_ref): Likewise.
11104         * search.c (compute_access): Likewise.
11105         * typeck.c (build_component_ref): Likewise.
11106
11107         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
11108         unnamed type a typedef name "for linkage purposes".
11109
11110         * pt.c (lookup_template_class): Don't look at
11111         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
11112
11113         * method.c (build_overload_int): Handle error cases gracefully.
11114
11115         * pt.c (instantiate_decl): Handle static member variables
11116         correctly.
11117
11118         * pt.c (tsubst): Use the tsubst'd type when producing new
11119         TEMPLATE_PARM_INDEX nodes.
11120
11121 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
11122
11123         * tree.c (cp_tree_equal): Handle pointers to member functions.
11124
11125         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
11126         sure the type of the REF_BIND is a reference type.
11127         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
11128         target_type for clarity.
11129
11130         * parse.y (xcond): Move call to condition_conversion ...
11131         * semantics.c (finish_for_cond): Here.
11132         * parse.c: Regenerated.
11133
11134 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
11135
11136         * decl.c (push_namespace): Namespaces have type void.
11137         * typeck2.c (incomplete_type_error): Complain about namespace
11138         used as expression.
11139         * typeck.c (decay_conversion): Likewise.
11140
11141 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11142
11143         * error.c (dump_expr): Support namespaces.
11144
11145 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
11146
11147         * cp-tree.def: Add SRCLOC.
11148         * cp-tree.h: Add struct tree_srcloc and accessor macros.
11149         * tree.c (build_srcloc, build_srcloc_here): New fns.
11150         * pt.c (add_pending_template): Use build_srcloc_here.
11151         (push_tinst_level): Update last_template_error_tick before erroring.
11152         (instantiate_decl): Restore lineno and input_filename before
11153         calling add_pending_template.
11154         * decl2.c (finish_file): Set up lineno and input_filename for
11155         pending templates.
11156
11157 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
11158
11159         * decl.c (lang_print_error_function): New fn.
11160         (init_decl_processing): Set print_error_function to use it.
11161         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
11162
11163         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
11164         ICS_BAD_FLAG.
11165
11166         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
11167         copy-initialization.
11168
11169         * class.c (build_vtable_entry): Use int_fits_type_p.
11170         (build_vtable): Pass a signed offset to build_vtable_entry.
11171         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
11172         set_rtti_entry): Likewise.
11173
11174 1998-05-22  Per Bothner  <bothner@cygnus.com>
11175
11176         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
11177         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
11178
11179 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
11180
11181         * pt.c (print_template_context): Use fprintf instead of cp_error.
11182
11183         * pt.c (determine_specialization): Just return an error_mark_node.
11184         Also print the decl we want in error messages.  If we complain,
11185         return error_mark_node.
11186         (tsubst_friend_function): Set lineno and input_filename so
11187         error messages will be useful.
11188         (instantiate_template): Just return an error_mark_node.
11189         (check_explicit_specialization): Don't mess with a returned
11190         error_mark_node.
11191
11192         * pt.c (print_template_context): Add new argument.
11193         (maybe_print_template_context): New fn.
11194         (push_tinst_level): Increment tinst_level_tick.
11195         (pop_tinst_level): Likewise.
11196         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
11197         xrealloc instead of xmalloc.
11198
11199         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
11200
11201 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
11202
11203         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
11204         if the template we looked up is the same as the one we already
11205         have.
11206
11207 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
11208
11209         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
11210         (cpp_reader,parse_in): Add for cpplib.
11211         (check_newline): Call handle_sysv_pragma with new interface.
11212         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
11213
11214         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
11215         (sub_getch): Call GETC for cpplib.
11216
11217         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
11218         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
11219
11220         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
11221
11222 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
11223
11224         * decl2.c (maybe_make_one_only): New fn.
11225         (import_export_vtable): Use it.
11226         (import_export_decl): Likewise.
11227         * pt.c (mark_decl_instantiated): Likewise.
11228
11229 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
11230
11231         * decl2.c (find_representative_member): Rename to ...
11232         (build_anon_union_vars): New function.
11233         (finish_anon_union): Fix stupidity of previous change.
11234
11235 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
11236
11237         * decl.c (grokfndecl): Handle definition of specialization in
11238         friend declaration.
11239
11240         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
11241
11242 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
11243
11244         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
11245         to look for type declarations.
11246         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
11247         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
11248         (finish_member_class_template): Declare.
11249         * decl.c (pushtag): Put member class templates on the
11250         CLASSTYPE_TAGS list, just as for ordinary member classes.
11251         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
11252         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
11253         IDENTIFIER_NAMESPACE_VALUEs.
11254         * parse.y (component_decl): Move code to ...
11255         * semantics.c (finish_member_class_template): New function.
11256         Don't put member class templates on the list of components for a
11257         class.
11258         * parse.c: Regenerated.
11259         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
11260         In fact, don't use DECL_CONTEXT at all here.
11261
11262 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11263
11264         * decl.c (record_unknown_type): New function.
11265         (init_decl_processing): Call it for the unknown and global type
11266         nodes.
11267
11268 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
11269
11270         * decl2.c (find_representative_member): New function.
11271         (finish_anon_union): Use it.
11272
11273         * cp-tree.h (MAIN_NAME_P): New macro.
11274         (DECL_MAIN_P): Likwise.
11275         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
11276         (grokfndecl): Use the new macros.
11277         (grokdeclarator): Likewise.
11278         (start_function): Likewise.
11279         (store_parm_decls): Likewise.
11280         (finsh_function): Likewise.
11281         * friend.c (do_friend): Likewise.
11282         * typeck.c (build_function_call_real): Likewise.
11283         (build_unary_op): Likewise.
11284
11285 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
11286
11287         * decl2.c (start_objects, finish_objects, do_dtors,
11288         do_ctors): Split out from...
11289         (finish_file): ...here.
11290
11291 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
11292
11293         * tree.c (is_overloaded_fn): Don't abort on placeholders from
11294         push_class_decls.
11295
11296 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
11297
11298         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
11299
11300         * error.c (dump_expr): Handle an ARROW_EXPR.
11301
11302 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
11303
11304         * decl.c (saveable_obstack): Declare.
11305         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
11306         declare, if necessary.
11307
11308 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
11309
11310         * call.c (compare_qual): Remove.
11311         (is_subseq): Tweak.
11312         (is_properly_derived_from): New function.
11313         (maybe_handle_ref_bind): Likewise.
11314         (maybe_handle_implicit_object): Likewise.
11315         (compare_ics): Modify substantially to bring into conformance with
11316         the standard.
11317         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
11318         (comp_cv_qualification): Declare.
11319         (comp_cv_qual_signature): Likewise.
11320         * typeck.c (comp_cv_qualification): Likewise.
11321         (comp_cv_qual_signature): Likewise.
11322
11323 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11324
11325         * Makefile.in (parse.o): Depend on toplev.h.
11326
11327         * class.c (typecode_p): Remove prototype and definition.
11328
11329         * cp-tree.h (currently_open_class, is_empty_class, member_p):
11330         Add prototype.
11331
11332         * decl.c (push_overloaded_decl_top_level): Remove prototype and
11333         definition.
11334
11335         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
11336         in call to `cp_thing'.
11337         (cp_warning): Likewise for function pointer `warning'.
11338
11339         * except.c (do_function_call): Remove prototype and definition.
11340         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
11341
11342         * method.c (is_java_type): Add prototype and make it static.
11343
11344         * parse.y: Include toplev.h.
11345
11346         * pt.c (type_unification): Remove unused variable `arg'.
11347         (instantiate_decl): Likewise for `save_ti'.
11348
11349         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
11350
11351 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
11352
11353         * init.c (build_member_call): Handle template_ids.
11354         * parse.y (primary): Add global_scope template_id.
11355
11356 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
11357
11358         * decl2.c (get_sentry): Use end_temporary_allocation.
11359         Don't declare permanent_obstack.
11360
11361 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
11362
11363         * parse.y (.finish_new_placement): New non-terminal.
11364         (unary_expr, new_type_id): Use it.
11365         * parse.c: Regenerated.
11366
11367 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
11368
11369         * pt.c (redeclare_class_template): Say where the original definition
11370         of the template-parameter's default argument appeared.
11371
11372 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
11373
11374         * call.c (build_over_call): Tweak empty class handling.
11375
11376         * decl.c (make_typename_type): Use currently_open_class.
11377
11378         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
11379
11380 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
11381
11382         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
11383         for a type unless it is one.
11384
11385         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
11386
11387 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
11388
11389         * Makefile.in (program_transform_name, objdir): Define.
11390
11391         * Makefile.in (BISON): Use bison from the build tree if it exists.
11392         (FLEX): Likewise.
11393
11394 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
11395
11396         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
11397
11398         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
11399
11400 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
11401
11402         * call.c (build_scoped_method_call): Likewise.
11403
11404 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
11405
11406         * init.c (build_new_1): Call suspend_momentary around the creation
11407         of values that must be saved for exception handling.
11408         * parse.y (.build_new_placement): New non-terminal.
11409         (unary_expr, new_placement): Use it.
11410         * parse.c: Regenerated.
11411
11412 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
11413
11414         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
11415         old and new types.
11416
11417         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
11418         canonical type.
11419
11420         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
11421
11422 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
11423
11424         * decl.c (start_decl): Revert problem change.
11425
11426         * Makefile.in (CONFLICTS): Fix.
11427
11428 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11429
11430         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
11431
11432 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
11433
11434         * class.c (finish_struct_1): Use BINFO_SIZE.
11435
11436         * decl.c (start_decl): Use 'tem'.
11437
11438 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
11439
11440         * exception.cc: Include eh-common.h.
11441         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
11442         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
11443         (__cp_push_exception): Initialize eh_info struct as well.
11444         * except.c: Remove local structs and include eh-common.h.
11445         (init_exception_processing): Set language and version codes.
11446         (call_eh_info): Add presence of eh_info to runtime description of
11447         struct cp_eh_info.
11448         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
11449         * semantics.c (finish_try_block): Call start_catch_block() and
11450         end_catch_block().
11451         * parse.y (function_try_block): Call start_catch_block() and
11452         end_catch_block().
11453
11454 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
11455
11456         * typeck.c (original_type): New function.
11457         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
11458         to see if they're actually the same.
11459         * cp-tree.h (original_type): Declare.
11460
11461 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11462
11463         * Makefile.in (lex.o): Depend on output.h.
11464
11465         * call.c (add_function_candidate): Remove unused variable `cand'.
11466         (add_conv_candidate): Likewise.
11467         (build_builtin_candidate): Likewise.
11468
11469         * cp-tree.h: Add prototype for `types_overlap_p'.
11470
11471         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
11472
11473         * decl2.c (merge_functions): Remove unused variables `tmp' and
11474         `tempn'.
11475
11476         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
11477         (code_as_string): Likewise.
11478         (language_as_string): Likewise.
11479         (parm_as_string): Likewise.
11480         (op_as_string): Likewise.
11481         (assop_as_string): Likewise.
11482         (cv_as_string): Likewise.
11483
11484         * lex.c: Include output.h.
11485
11486         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
11487
11488         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
11489         ATTRIBUTE_UNUSED.
11490
11491         * tinfo.cc (__class_type_info::dcast): Change the type of variable
11492         `i' from int to size_t.
11493
11494         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
11495         ATTRIBUTE_UNUSED.
11496
11497 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
11498
11499         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
11500         DECL_NAMESPACE_SCOPE_P.
11501         (lang_decl_name): Likewise.
11502         * pt.c (tsubst_friend_function, tsubst): Likewise.
11503         * decl.c (pushdecl, redeclaration_error_message, start_decl,
11504         cp_finish_decl, start_function): Likewise.
11505         * class.c (finish_struct_1): Likewise.
11506         * call.c (build_over_call): Likewise.
11507         (compare_ics): Use DERIVED_FROM_P.
11508
11509 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
11510
11511         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
11512         * method.c (build_mangled_name): Use it.
11513         (build_decl_overload_real): Likewise.
11514
11515         * error.c (dump_simple_decl): New function, broken out from ...
11516         (dump_decl): Use it.
11517
11518 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
11519
11520         * ptree.c (lang_print_xnode): Add missing `break'.
11521
11522         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
11523
11524         * call.c (add_template_candidate): Adjust for changes to
11525         fn_type_unification.
11526         (add_template_candidate_real): Likewise.
11527         (add_template_conv_candidate): Likewise.
11528         (build_user_type_conversion_1): Likewise.
11529         (build_new_function_call): Likewise.
11530         (build_object_call): Likewise.
11531         (build_new_op): Likewise.
11532         (build_new_method_call): Likewise.
11533         * class.c (instantiate_type): Likewise.
11534         * cp-tree.h (unification_kind_t): New type.
11535         (fn_type_unification): Adjust prototype.
11536         (type_unificaiton): Likewise.
11537         * pt.c (UNIFY_ALLOW_NONE): New macro.
11538         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
11539         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
11540         (UNIFY_ALLOW_DERIVED): Likewise.
11541         (unify): Change prototype.
11542         (maybe_adjust_types_for_deduction): New function.
11543         (check_cv_quals_for_unify): Likewise.
11544         (determine_specialization): Adjust.
11545         (fn_type_unification): Likewise.
11546         (type_unification): Likewise.
11547         (type_unification_real): Likewise.  Use
11548         maybe_adjust_types_for_deduction.  Fix mishandling of
11549         back-unification of template functions passed as arguments.  Pass
11550         appropriate combination of UNIFY_ALLOW_* to unify.
11551         (unify): Remove unused NTPARMS parameter.  Use
11552         check_cv_quals_for_unify.  Remove bogus code that allowed
11553         too-generous unification in order to adhere more closely to standard.
11554         (get_bindings_real): Adjust.
11555         (get_class_bindings): Likewise.
11556
11557         * method.c (build_overload_identifier): Only use the innermost
11558         template arguments when mangling.
11559         * pt.c (tsubst_template_argument_vector): New function.
11560         (complete_template_args): Deal with the situation where the
11561         extra_args contain more than one level of arguments.
11562         (lookup_template_class): Deal with member template classes, which
11563         may have more than one level of arguments.
11564         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
11565         Improve handling of member template classes.  Use
11566         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
11567         tsubst_template_argument_vector where appropriate.
11568         (regenerate_decl_from_template): Break out from ...
11569         (instantiate_decl): Here.
11570
11571         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
11572         * parse.h: Regenerated.
11573         * parse.c: Really regenerated.
11574
11575         * cp-tree.h (finish_unary_op_expr): New function.
11576         (finish_id_expr): Likewise.
11577         (begin_new_placement): Likewise.
11578         (finish_new_placement): Likewise.
11579         (finish_declarator): Likewise.
11580         (finish_translation_unit): Likewise.
11581         (finish_parmlist): Likewise.
11582         (begin_class_definition): Likewise.
11583         (finish_class_definition): Likewise.
11584         (finish_default_args): Likewise.
11585         (finish_inline_definitions): Likewise.
11586         * parse.y (GCC_ASM_KEYWORD): Remove.
11587         (TYPENAME_ELLIPSIS): Likewise.
11588         * parse.c: Regenerated.
11589         Use new functions in semantics.c in the actions for many rules.
11590         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
11591         * hash.h: Regenerated.
11592         * semantics.c (finish_expr_stmt): Allow NULL expr.
11593         (finish_unary_op_expr): New function, containing
11594         code previously in parse.y.
11595         (finish_id_expr): Likewise.
11596         (begin_new_placement): Likewise.
11597         (finish_new_placement): Likewise.
11598         (finish_declarator): Likewise.
11599         (finish_translation_unit): Likewise.
11600         (finish_parmlist): Likewise.
11601         (begin_class_definition): Likewise.
11602         (finish_class_definition): Likewise.
11603         (finish_default_args): Likewise.
11604         (finish_inline_definitions): Likewise.
11605
11606 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
11607
11608         * typeck.c (build_c_cast): Don't decay arrays and functions to
11609         pointer type when converting to a class type.
11610
11611 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
11612
11613         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
11614         (DECL_CLASS_SCOPE_P): Likewise.
11615
11616 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
11617
11618         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
11619         * decl2.c (constructor_name_full): Likewise.
11620
11621 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
11622
11623         * tree.c (mapcar): Add OVERLOAD support.
11624
11625         * init.c (resolve_offset_ref): We must use basetype_path before we
11626         destroy it with a call to convert_pointer_to.
11627
11628 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11629
11630         * class.c (currently_open_class): New fn.
11631         * decl.c (lookup_name_real): Use it.
11632         * search.c (lookup_field): Likewise.
11633
11634 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11635
11636         * cp-tree.def (OVERLOAD): New node.
11637         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
11638         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
11639         (NAMESPACE_BINDING): Remove.
11640         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
11641         namespace_binding.
11642         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
11643         Define.
11644         (tree_overload): New struct.
11645         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
11646         (REAL_IDENTIFIER_TYPE_VALUE): Define.
11647         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
11648         (lang_decl_flags): Remove in_namespace.
11649         (lang_decl): Remove chain.
11650         (DECL_CHAIN, DECL_NAMESPACE): Remove.
11651         (flag_honor_std): Declare extern.
11652         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
11653         namespace_binding, set_namespace_binding,
11654         lookup_function_nonclass, cat_namespace_levels,
11655         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
11656         scratch_ovl_cons, ovl_member, build_overload): Declare.
11657         (decl_list_length, get_namespace_id, current_namespace_id,
11658         overloaded_globals_p): Remove.
11659         (lookup_using_namespace, qualified_lookup_using_namespace): Change
11660         return type.
11661         (push_scratch_obstack): New macro.
11662         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
11663         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
11664         convs, fns.
11665         (build_new_function_call): Iterate using OVL_CHAIN.
11666         Print DECL_NAME in when reporting ambiguities.
11667         (build_object_call): Iterate using OVL_NEXT for fns, convs.
11668         (build_new_op): Call lookup_function_nonclass.
11669         Iterate using OVL_NEXT.
11670         (build_op_delete_call): Change detection of members.
11671         Do not wrap TREE_LIST around fields and single global functions.
11672         (build_over_call): Don't push a class level if the context is a
11673         namespace.
11674         (build_new_method_call): Iterate using OVL_NEXT.
11675         * class.c (add_method): Chain overloaded members using
11676         build_overload.  Remove copying of method.
11677         (grow_method): When iterating through the obstack, expect OVERLOAD
11678         nodes.  Chain overload members.
11679         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
11680         nodes in call to get_baselinks.
11681         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
11682         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
11683         fdecls that are OVERLOAD nodes.
11684         (validate_lhs): New function.
11685         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
11686         code.  Use DECL_NAME in error messages.  Split code between global
11687         and member function processing.
11688         * decl.c (global_type_node): New static variable.
11689         (in_std): New global.
11690         (struct binding_level): New field usings.
11691         (resume_binding_level): Assert that we are not in a class.
11692         (toplevel_bindings_p): Just check for namespace_p or
11693         pseudo_global.
11694         (resume_level): Remove.
11695         (find_binding): New function.
11696         (binding_for_name): Call it.
11697         (namespace_binding, set_namespace_binding): New functions.
11698         (push_namespace): Associate binding level with new namespace,
11699         resume_binding_level for existing namespace.  Remove old code.
11700         Fake std by counting.
11701         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
11702         (maybe_push_to_top_level): Save current namespace.
11703         (pop_from_top_level): Restore saved namespace.
11704         (pop_namespace): Call suspend_binding_level.  Remove old code.
11705         (cat_namespace_levels): New function.
11706         (set_identifier_type_value_with_scope): For namespace bindings,
11707         set BINDING_TYPE, and use global_type_node.
11708         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
11709         (identifier_type_value): New function.
11710         (pushtag): If no context, use current_namespace.
11711         (duplicate_decls): Don't process DECL_CHAIN.
11712         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
11713         already set.  Never reset it to NULL_TREE.  Lookup global variables
11714         in their namespace.  Push overloaded templates if they are on
11715         namespace level.
11716         (pushdecl_namespace_level): New function.
11717         (pushdecl_top_level): Implement using pushdecl_namespace_level.
11718         (pushdecl_using_decl): New function.
11719         (overloaded_globals_p): Remove.
11720         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
11721         them.  Use namespace_binding and set_namespace_value.
11722         (redeclaration_error_message): Complain if the declarations come
11723         from different namespaces.
11724         (lookup_tag): On namespace level, look in the BINDING_TYPE.
11725         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
11726         old code.
11727         (select_decl): New function.
11728         (lookup_name_real): Call it for qualified and unqualified lookup.
11729         Pass tree_bindings from the stack.
11730         If prefer_type is 1, also accept namespaces.
11731         (lookup_function_nonclass): New function.
11732         (init_decl_processing): Set the binding level of the global
11733         namespace to global_binding_level.
11734         Build a proper type list for __builtin_apply.
11735         Initialize std_node to "fake std" if flag_honor_std is set.
11736         Initialize global_type_node.
11737         Allocated bad_alloc in namespace std if flag_honor_std.
11738         (define_function): Set the DECL_CONTEXT to the current_namespace.
11739         (start_decl): A namespace is not considered as a context here.  If
11740         the DECL_CONTEXT is a namespace, push the decl.
11741         (cp_finish_decl): Check for namespaces used as initializers.
11742         (grokfndecl): Add namespace parameter.  Remove processing of
11743         DECL_CHAIN.
11744         (grokvardecl): Add namespace parameter.
11745         (grokdeclarator): Process SCOPEs that are namespaces.  For
11746         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
11747         (start_function): Check for contexts that are namespaces.
11748         Set context for declarations that have not been pushed.
11749         (store_parm_decls): Check for ::main only.
11750         (finish_function): Likewise.
11751         (start_method): Check for contexts that are namespaces.
11752         (start_method): Remove DECL_CHAIN processing.
11753         * decl2.c (flag_honor_std): Declare.
11754         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
11755         (decl_namespace_list): New static global.
11756         (grok_x_components): Ignore namespaces as type contexts.
11757         (check_classfn): Expect OVERLOAD nodes.
11758         (grokfield): Remove DECL_CHAIN processing.
11759         (finish_file): Call cat_namespace_levels.
11760         (merge_functions): New function.
11761         (ambiguous_decl): Rewrite.
11762         (lookup_using_namespace): Produce tree_bindings.
11763         (qualified_lookup_using_namespace): Likewise.
11764         (set_decl_namespace, decl_namespace, current_decl_namespace,
11765         push_decl_namespace, pop_decl_namespace): New functions.
11766         (arg_lookup): New struct.
11767         (add_function, arg_assoc_namespace, arg_assoc_class,
11768         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
11769         New functions.
11770         (get_namespace_id, current_namespace_id): Remove.
11771         (do_toplevel_using_decl): Rewrite.
11772         (do_class_using_decl): Complain about namespace qualifiers.
11773         (do_using_directive): Sorry if not on namespace level.  Complain
11774         about unknown namespaces.
11775         * error.c (dump_aggr_type): Check for namespace contexts.
11776         * except.c (init_exception_processing): Push terminate into std.
11777         * friend.c (is_friend): A namespace is not a context, here.
11778         * init.c (expand_member_init): Remove DECL_CHAIN processing.
11779         (build_offset_ref): Process OVERLOAD nodes.
11780         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
11781         * lex.c (identifier_type): Loop using OVL_CHAIN.
11782         (see_typename): Set looking_for_typename to 2.
11783         (real_yylex): Likewise.
11784         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
11785         (do_scoped_id): Expect OVERLOAD nodes.
11786         Change calling convention for qualified_lookup_using_namespace.
11787         (build_lang_decl): Don't set in_namespace anymore.
11788         * method.c (typevec_size): New global.
11789         (build_overload_nested_name): Return if global_namespace.
11790         Otherwise, always expect a declaration context.
11791         (build_qualified_name): Likewise.
11792         Make sure we don't write beyond typevec_size.
11793         (build_decl_overload_real): Likewise.
11794         Allocate one extra slot for the namespace.
11795         (hack_identifier): Mark code dead.
11796         Process OVERLOAD and NAMESPACE_DECL nodes.
11797         * parse.y (program): Pop namespaces until in global namespace.
11798         (extdef): In a using-declaration, don't discard the identifier if
11799         there is no declaration.
11800         (left_curly): Ignore type contexts which are namespaces.
11801         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
11802         used as scope.
11803         * pt.c (template_class_depth): Expect types to be namespaces.
11804         (determine_specialization): Simplify by expecting OVERLOAD nodes.
11805         (push_template_decl): Push into namespace level.
11806         Reset ctx if it is a namespace.
11807         Set DECL_CONTEXT to current_namespace if not set already.
11808         Ignore real contexts that are namespaces.
11809         (mangle_class_name_for_template): Skip global_namespace.
11810         Mangle other namespaces as declarations.
11811         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
11812         (lookup_template_class): Push into namespace of context.
11813         If the context is a namespace, set it to global_namespace.
11814         Use id_context for mangling.
11815         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
11816         (tsubst_friend_function): Ignore namespace contexts.
11817         Push into namespace level.
11818         (tsubst): Handle NAMESPACE_DECL nodes.
11819         Remove DECL_CHAIN processing.
11820         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
11821         * ptree.c (print_lang_identifier): Print bindings.
11822         (lang_print_xnode): Print OVERLOAD nodes.
11823         * rtti.c (init_rtti_processing): Push type_info into std.
11824         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
11825         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
11826         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
11827         lookup_fnfields_here): Likewise.
11828         Process all nodes, instead of going through TREE_CHAIN.
11829         * sig.c (build_signature_pointer_or_reference_type): Set context
11830         to global_namespace.
11831         (build_signature_table_constructor): Expect OVERLOAD nodes.
11832         * spew.c (yylex): Save old setting of looking_for_typename.
11833         * tree.c (decl_list_length): Remove.
11834         (binding_init): New function.
11835         (count_functions): Rewrite.
11836         (is_overloaded_fn): Expect OVERLOAD nodes.
11837         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
11838         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
11839         ovl_member): New functions.
11840         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
11841         (type_unknown_p): Likewise.
11842         (require_instantiated_type): Likewise.
11843         (build_component_ref): Declare code dead.
11844         (build_x_function_call): Create and expect OVERLOAD nodes.
11845         (build_function_call_real): Check for ::main only.
11846         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
11847         (convert_for_assignment): Check for TREE_LIST before accessing
11848         TREE_VALUE.
11849         * decl.c (duplicate_decls): Check for namespace bindings instead
11850         of global bindings.
11851         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
11852         lookup_name_current_level, start_decl, xref_tag,
11853         finish_enum): Likewise.
11854         * init.c (build_offset_ref): Likewise.
11855         * search.c (lookup_field): Likewise.
11856         (lookup_fnfields): Likewise.
11857         (dfs_debug_mark): Likewise.
11858         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
11859         (poplevel_class, pop_from_top_level): Likewise.
11860         * decl2.c (finish_method): Likewise.
11861         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
11862         * decl.c (record_builtin_type): Likewise.
11863         (init_decl_processing, grokfndecl): Likewise.
11864         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
11865         (make_lang_type): Likewise.
11866         * parse.y (make_thunk): Likewise.
11867         * pt.c (tsubst): Likewise.
11868         * tree.c (debug_binfo): Likewise.
11869         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
11870         tinfo2.cc, inc/new.h: Add std qualifications.
11871         * inc/new: Wrap with namespace std if __HONOR_STD.
11872         * inc/typeinfo: Likewise.
11873
11874 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
11875
11876         * call.c (build_user_type_conversion_1): Handle second_conv
11877         properly for templates.
11878
11879 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
11880
11881         * method.c (build_decl_overload_real): Set TREE_USED flag to
11882         zero for build_type_variants nodes as well.
11883
11884 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
11885
11886         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
11887
11888 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
11889
11890         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
11891         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
11892         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
11893         xref.o): Add toplev.h dependencies.
11894
11895 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
11896
11897         * errfn.c (cp_error, cp_warning): Remove declarations for
11898         error and warning respectively.
11899
11900 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11901
11902         * error.c: Convert to using ctype macros defined in system.h.
11903         * method.c: Likewise.
11904         * xref.c: Likewise.
11905         * lex.c: Likewise.  Also remove redundant system header stuff.
11906
11907 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
11908
11909         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
11910         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
11911         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
11912         xref.c: Add include of toplev.h.
11913
11914 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
11915
11916         * tree.c (perm_manip): Also regenerate the RTL of an extern.
11917         (copy_to_permanent): Use end_temporary_allocation.
11918
11919 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
11920
11921         * init.c (expand_vec_init): The initialization of each array
11922         element is a full-expression.
11923
11924 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
11925
11926         * method.c (build_mangled_name): Add a call to build_type_variant
11927         to get the right type.
11928
11929 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
11930
11931         * Makefile.in: Add .SUFFIXES.
11932
11933         * cp-tree.def: Remove NAMESPACE_DECL.
11934
11935 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
11936
11937         * call.c (build_over_call): Do evaluate arg even if it has empty
11938         class type.
11939         * decl.c (start_function): Don't push a member function.
11940
11941 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
11942
11943         * Makefile.in (g++FAQ.info): Put -o option before input file.
11944
11945 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
11946
11947         * gxxint.texi: Add info for squangling codes K and B.
11948
11949 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
11950
11951         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
11952         the expression in templates.
11953         (finish_stmt_expr): Likewise.
11954
11955 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
11956
11957         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
11958
11959 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
11960
11961         * decl.c (maybe_push_to_top_level): Always clear
11962         current_template_parms and processing_template_decl.
11963         (pushtag): Remove check of current_class_type and some comments,
11964         since maybe_push_to_top_level no longer creates confusion.
11965
11966 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
11967
11968         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
11969         (DECL_CLASS_TEMPLATE_P): Likewise.
11970         (DECL_PRIMARY_TEMPLATE): Likewise.
11971         (PRIMARY_TEMPLATE_P): Use it.
11972         (push_template_decl_real): New function.
11973         (redeclare_class_template): Take new template parameters as
11974         input.
11975         (is_specialization_of): New function.
11976         (comp_template_args): Declare.
11977         * decl.c (pushtag): Handle friend template classes.
11978         (xref_tag): Likewise.  Use new calling convention for
11979         redeclare_class_template.
11980         * decl2.c (grok_x_components): Handle friend templates.
11981         * friend.c (is_friend): Use is_specialization_of where
11982         appropriate.  Deal with friend class templates.
11983         (make_friend_class): Let a class template be friends with itself.
11984         * pt.c (comp_template_args): Remove declaration.
11985         (tsubst_friend_class): New function.
11986         (push_template_decl_real): New function.
11987         (push_template_decl): Use it.
11988         (redeclare_class_template): Adjust for new calling convention.
11989         (comp_template_args): Give it external linkage.
11990         (instantiate_class_type): Use tsubst_friend_class to deal
11991         with friend templates.
11992         * typeck.c (comptypes): Use comp_template_args, rather than
11993         expanding it inline.
11994         * parse.y (component_decl): Handle a nested template type
11995         like other component type declarations.
11996
11997         * pt.c (check_explicit_specialization): Handle overloaded
11998         constructors correctly.
11999
12000         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
12001         (lookup_template_class): Use it.
12002
12003 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
12004
12005         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
12006         * cp-tree.h: Add WRAPPER support.
12007         * call.c (add_candidate): Split out from add_*_candidate fns.
12008         (build_over_call): Take the candidate instead of function and args.
12009         Enforce access control here.  Emit overload warnings here.
12010         (add_warning): New fn.
12011         (joust): Add WARN parm.  If not set, call add_warning instead of
12012         printing a warning.  Re-enable some warnings.
12013         (tourney): Pass it.
12014         (convert_like): Adjust.
12015         (build_new_op): Adjust.
12016         (build_new_function_call): Adjust.
12017         (build_user_type_conversion_1): Adjust.
12018         (USER_CONV_FN): Adjust.
12019         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
12020         build_int_wrapper): New fns.
12021
12022 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
12023
12024         * pt.c (unify): Fix typo in previous change.
12025
12026 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
12027
12028         * error.c (dump_type_real): Declare canonical_name.
12029
12030         * typeck.c (comp_target_types): Fix PMFs.
12031
12032 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
12033
12034         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
12035         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
12036         TEMPLATE_DECL.
12037
12038         * pt.c (tsubst): Decrease the template-level of
12039         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
12040         TEMPLATE_PARM_INDEX.
12041         (template_decl_level): New function.
12042         (unify): Make sure to record unifications for template
12043         parameters, even when the parameters exactly match the arguments.
12044         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
12045         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
12046         aren't from the level we're currently working on.
12047
12048 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
12049
12050         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
12051
12052         * decl2.c (check_member_template): Set DECL_IGNORED for member
12053         class templates, too.
12054
12055         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
12056
12057 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12058
12059         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
12060
12061 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
12062
12063         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
12064         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
12065         (init_decl_processing): Handle TI types.
12066         * typeck.c (unsigned_type, signed_type): Handle TI types.
12067
12068 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
12069
12070         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
12071         New local added_libraries.  Increment count when add library to
12072         arglist.
12073
12074 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
12075
12076         * cp-tree.h (type_as_string_real): New function.
12077         * pt.c (mangle_class_name_for_template): Use it.
12078         * error.c (dump_aggr_type): Change prototype.
12079         (dump_type_prefix): Likewise.
12080         (dump_type_suffix): Likewise.
12081         (dump_type_real): Convert from dump_type.  If desired, the
12082         "canonica" name of a typedef, i.e., the name of the underlying
12083         type, can be printed.
12084         (dump_type): Call dump_type_real.
12085
12086 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
12087
12088         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
12089
12090         * typeck.c (comp_target_types): Tweak pedantic case.
12091         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
12092         Return -1 or 1 instead of 1 or 2.
12093         (compparms): Remove STRICT handling.
12094         (convert_for_assignment): Fix handling of pmfs.
12095
12096 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
12097
12098         * typeck.c (comp_target_types): Handle references like pointers.
12099         (comp_target_parms): Note that return code from comp_target_types
12100         can be negative to indicate failure.
12101
12102 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
12103
12104         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
12105         which requires a working target compiler to build.
12106
12107 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
12108
12109         * tree.c (avoid_overlap): Add prototype.
12110
12111         * spew.c (num_tokens): Add prototype.
12112         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
12113
12114         * search.c (dfs_check_overlap): Add prototype.
12115         (dfs_no_overlap_yet): Likewise.
12116
12117         * pt.c (original_template): Add prototype.
12118         (inline_needs_template_parms): Likewise.
12119         (push_inline_template_parms_recursive): Likewise.
12120         (retrieve_specialization, register_specialization): Likewise.
12121         (print_candidates, reduce_template_parm_level): Likewise.
12122         (build_template_decl, mark_template_parm): Likewise.
12123         (tsubst_friend_function, get_bindings_real): Likewise.
12124
12125         * method.c (start_squangling): Add prototype.
12126         (end_squangling, check_ktype, issue_ktype): Likewise.
12127         (build_overloaded_scope_ref, check_btype): Likewise.
12128         (build_mangled_template_parm_index): Likewise.
12129
12130         * lex.c (init_cpp_parse): Add prototype.
12131         (handle_cp_pragma, handle_sysv_pragma): Likewise.
12132         (reduce_cmp, token_cmp): Likewise.
12133
12134         * except.c (call_eh_info): Add prototype.
12135         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
12136         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
12137
12138         * decl2.c (is_namespace_ancestor): Add prototype.
12139         (namespace_ancestor, add_using_namespace): Likewise.
12140         (ambiguous_decl): Likewise.
12141
12142         * decl.c (indent): Add prototype.
12143
12144         * call.c (add_template_candidate_real): Add prototype.
12145
12146 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
12147
12148         * decl2.c (build_expr_from_tree): Just return a PMF.
12149
12150 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
12151
12152         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
12153         when doing initializations.
12154
12155         * pt.c (unify): Use comptypes to compare type args.
12156
12157 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
12158
12159         * decl.c (duplicate_decls): Fix check for when it's safe to free
12160         the new decl.
12161
12162         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
12163         to type_as_string.
12164
12165 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
12166
12167         * pt.c (build_template_parm_index): Add prototype.
12168
12169         * search.c (my_tree_cons): Don't clear words outside the
12170         newly allocated node.
12171
12172 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
12173
12174         * lex.c (init_parse): Now returns char* containing the filename.
12175
12176 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
12177                           Jeff Law   <law@cygnus.com>
12178
12179         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
12180         than a pointer.
12181
12182 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12183
12184         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
12185
12186 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
12187
12188         * decl.c (duplicate_decls): Don't warn for redundant decls if
12189         friend: let add_friend take care of it.
12190
12191 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
12192
12193         * sig.c (build_signature_pointer_constructor): Don't set
12194         TREE_HAS_CONSTRUCTOR for a signature pointer.
12195         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
12196         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
12197         here, too.
12198         * typeck.c (build_unary_op): Only allow taking the address of a
12199         real constructor.
12200         * typeck2.c (digest_init): Simplify.
12201         (store_init_value): Don't pedwarn about using { } for pmfs.
12202
12203 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
12204
12205         * cp-tree.h (start_decl):  Update prototype.
12206         * decl.c (start_decl):  Like the C version, new parameters
12207         for the attributes.  Call cplus_decl_attributes here,
12208         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
12209         (grokdeclarator):  Pass NULL for new start_decl arguments.
12210         * pt.c (tsubst_expr):  Likewise.
12211         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
12212         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
12213         * lex.c (build_lang_decl): Add lang_name_java.
12214         * class.c (push_lang_context): Add lang_name_java.
12215         * method.c (build_mangled_name): Check for is_java_type.
12216
12217 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
12218
12219         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
12220         * call.c (build_scoped_method_call): Check for TREE_CODE for
12221         VOID_TYPE instead of type ==  void_type_node.
12222         (build_method_call): Likewise.
12223         * decl.c (lookup_name_real): Likewise.
12224         (grokdeclarator): Likewise.
12225         (start_decl): Likewise.
12226         (grokparms): Likewise.
12227         (start_function): Likewise.
12228         (finish_function): Likewise.
12229         (start_method): Likewise.
12230
12231 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
12232
12233         * lex.c (finput): New variable.
12234         (init_cpp_parse):  Renamed from init_parse.
12235         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
12236         (finish_parse): New function.
12237         * cp-tree.h (init_lex, init_parse): Remove declarations.
12238
12239 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
12240
12241         * call.c (build_call): Still evaluate the actual argument.
12242         * class.c (is_empty_class): Update for -fnew-abi.
12243
12244         * decl2.c: -fnew-abi implies -fsquangle.
12245
12246         * method.c (do_build_assign_ref): Don't do anything to copy
12247         an empty class.
12248         (do_build_copy_constructor): Likewise.
12249         * call.c (build_over_call): Likewise.
12250
12251 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
12252
12253         * tree.c (avoid_overlap): Return a value.
12254
12255 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
12256
12257         * method.c (check_btype): Add missing argument to xrealloc.
12258         (check_ktype): Likewise.
12259
12260 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
12261
12262         Implement empty base optimization.
12263         * class.c (finish_struct_1): Add vbase fields earlier.  Set
12264         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
12265         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
12266         (types_overlap_p): New fn.
12267         * tree.c (avoid_overlap): New fn.
12268         (build_base_fields): Use it to avoid overlapping empty bases.
12269         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
12270
12271         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
12272
12273         Re-implement allocation of base class subobjects.
12274         * tree.c (unshare_base_binfos): New fn.
12275         (layout_basetypes): Use it.  Now handles offsets of both virtual and
12276         non-virtual bases, after layout_type.
12277         (layout_vbasetypes): Remove.
12278         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
12279         (build_vbase_pointer_fields): Split out from old layout_basetypes.
12280         * class.c (finish_base_struct): Lose offset handling code.
12281         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
12282         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
12283         * cp-tree.h: Adjust.
12284
12285 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
12286
12287         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
12288         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
12289         * class.c (duplicate_tag_error): Likewise.
12290         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
12291         * tree.c (layout_vbasetypes): Update from layout_record, remove
12292         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
12293         (layout_basetypes): Likewise.
12294
12295 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
12296
12297         * class.c, Make sure system.h is included just after config.h.
12298         Delete lingering stdio and errno references too.
12299         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
12300
12301 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
12302
12303         * friend.c (is_friend): Fix access control for local classes.
12304
12305         * class.c (is_empty_class): New fn.
12306         * call.c (build_call): Don't pass empty class objects to a function.
12307
12308 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
12309
12310         * call.c (build_over_call): Do name resolution for default
12311         arguments of function templates in the scope of the templates.
12312
12313 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
12314
12315         * call.c: Include system.h.  Remove includes, declarations and
12316         defines provided by system.h.
12317         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
12318         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
12319         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
12320         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
12321         * typeck2.c, xref.c: Likewise.
12322         * Makefile.in: Dependencies updated as appropriate.
12323         * Make-lang.in: Likewise.
12324
12325 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
12326
12327         * pt.c (fn_type_unification): Allow incomplete unification without
12328         an immediate error message.
12329
12330 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
12331
12332         * tree.c (member_p): New fn.
12333         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
12334         initializing class members.
12335
12336         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
12337         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
12338
12339         * call.c (build_method_call): Handle non-scoped destructors, too.
12340         * pt.c (tsubst_copy): Likewise.
12341
12342         * pt.c (print_template_context): Split out...
12343         (push_tinst_level): ...from here.
12344
12345         * friend.c (is_friend): Don't pass a type to decl_function_context.
12346
12347         * typeck.c (convert_for_initialization): Always hand off
12348         conversions to class type.
12349
12350 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
12351
12352         * friend.c (is_friend): Local classes have the same access as the
12353         enclosing function.
12354
12355 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
12356
12357         * typeck.c (expand_target_expr): Delete dead function.
12358
12359         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
12360
12361         * repo.c (save_string): Delete dead function.
12362
12363         * method.c (thunk_printable_name): Delete dead function.
12364
12365         * lex.c (yynextch): Delete dead function.
12366
12367         * expr.c (tree_extract_aggr_init): #if 0 out.
12368
12369         * except.c (do_unwind): Delete dead function.
12370         (easy_expand_asm): Likewise.
12371
12372         * cvt.c (build_conversion_type_1): Delete dead function.
12373
12374         * cp-tree.h (push_expression_obstack): Declare.
12375
12376         * call.c (source_type): #if 0 out.
12377
12378         * class.c (alter_access): Remove unused label.  Add braces
12379         around empty else clause.
12380
12381         * lex.c (yyprint): Fix argument to printf.
12382
12383 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
12384
12385         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
12386
12387         * pt.c (instantiate_class_template): Make sure template
12388         arguments are permanent.
12389         * init.c (resolve_offset_ref): Don't go looking around in
12390         template types.
12391
12392         * semantics.c: Add routines to handle expressions, and some
12393         declaration processing.
12394         * parse.y: Use them.
12395         (current_class_depth): Move declaration to cp-tree.h.
12396         * parse.c: Regenerated.
12397         * cp-tree.h: Use them.
12398         (current_class_depth): Declare.
12399         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
12400
12401 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
12402
12403         * error.c (dump_decl): Be a bit more explicit with template
12404         type arguments, when verbose.
12405
12406 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
12407
12408         * inc/exception: Reorder closing braces.
12409
12410 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
12411
12412         * pt.c (redeclare_class_template): New function.
12413         * cp_tree.h (redeclare_class_template): Declare it.
12414         * decl.c (xref_tag): Use it.
12415
12416 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
12417
12418         * call.c (build_over_call): Check IS_AGGR_TYPE, not
12419         TYPE_LANG_SPECIFIC.
12420         * typeck.c (convert_arguments): Likewise.
12421
12422         * decl.c (grokdeclarator): Remove const and volatile from type after
12423         setting constp and volatilep.
12424
12425         * class.c (finish_struct_1): Don't warn about bool bitfield larger
12426         than one bit.
12427
12428 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
12429
12430         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
12431
12432 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
12433
12434         * call.c (build_object_call): Complain about ambiguous operator(),
12435         rather that crashing.
12436         (build_new_op): Likewise.
12437         (build_op_delete_call): Likewise.
12438
12439 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
12440
12441         * cvt.c (perform_qualification_conversions): Use comp_target_types
12442         instead of comp_ptr_ttypes.
12443
12444 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
12445
12446         * cp-tree.h (enforce_access): Declare.
12447         * call.c (enforce_access): Make it extern, not static.
12448         * class.c (alter_access): Use enforce_access; modify code for ISO
12449         compliance, rather than ARM rules.
12450
12451 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12452
12453         * cp-tree.h: Fix typo.
12454
12455 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
12456
12457         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
12458         if (aggregate_value_p (type)).
12459
12460         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
12461
12462 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
12463
12464         * tree.c (mapcar): When dealing with a DECL, use it's constant
12465         value, if any.
12466         * pt.c (lookup_template_class): Don't mangle the names of template
12467         classes whose arguments are unknown.
12468
12469         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
12470
12471 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
12472
12473         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
12474
12475 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
12476
12477         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
12478         boolean_type_node to 1.
12479
12480 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
12481
12482         * error.c (dump_expr): Remove unused variable `l'.
12483
12484         * pt.c (for_each_template_parm): New function, created by
12485         converting uses_template_parms.
12486         (tree_fn_t): New typedef.
12487         (uses_template_parms): Use it.
12488         (mark_template_parm): New function.
12489         (push_template_decl): Check that the argument list of a partial
12490         specialization uses all the template parameters.
12491
12492         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
12493         with it; we might want it for debugging.
12494         * cp-tree.h (type_unification): Change interface.
12495         * class.c (finish_struct_1): Skip nested template types, just like
12496         ordinary nested types.
12497         (instantiate_type): Use new interface to type_unification.
12498         * lex.c (init_lex): Add __sz as opname for sizeof.
12499         * method.c (build_overload_scope_ref): New function.
12500         (build_overload_int): Handle complex expressions.  Set
12501         numeric_output_need_bar if necessary.
12502         (build_overload_value): Handle non-PARM_DECL nodes; this
12503         routine is now used by build_overload_int.  Remove some
12504         assignments to numeric_output_need_bar.  Use
12505         build_overload_scope_ref.
12506         (build_qualified_name): Note that some template mangled names end
12507         with digits, and set numeric_output_need_bar appropriately.  Use
12508         build_underscore_int.
12509         * pt.c (unify): Change interface.
12510         (type_unification_real): Likewise.
12511         (determine_specialization): Use new interfaces.
12512         (tsubst): Deal gracefully with situations in which the argument
12513         vector is not fully filled.
12514         (fn_type_unification): Use new interfaces.
12515         (type_unification): Likewise.  Remove NOP_EXPR hack.
12516         (type_unification_real): Likewise.
12517         (unify): Likewise.  Deal with unification of complex expressions.
12518
12519 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
12520
12521         * pt.c (complete_template_args): Initialize skip properly.
12522
12523         * decl.c (make_typename_type): Revert.
12524         (make_implicit_typename): Remove.
12525         (lookup_name_real): Don't call it.  Call lookup_field if we see a
12526         TYPE_DECL from a template base.
12527         * search.c (lookup_field): Do implicit typename stuff.
12528
12529 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
12530                           Geoff Noer    <noer@cygnus.com>
12531
12532         * Makefile.in: Various fixes for building cygwin32 native toolchains.
12533         * Make-lang.in: Likewise.
12534
12535 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12536
12537         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
12538
12539 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
12540
12541         * decl.c (make_implicit_typename): Rewrite removed code.
12542         (make_typename_type): Call it if the type we look up comes from
12543         a base that uses template parms.
12544
12545         * pt.c (complete_template_args): Rewrite.
12546         (tsubst, FUNCTION_DECL): Use it.
12547
12548 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
12549
12550         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
12551         c_expand_asm_operands () if output_operands, input_operands or
12552         clobbers is not NULL_TREE.
12553
12554 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12555
12556         * pt.c (complete_template_args): New function.
12557         (get_bindings): Deal with specializations of function templates
12558         with return type containing parameters from outer class
12559         templates.
12560         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
12561         substitute arguments and compose a new type.
12562
12563 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
12564
12565         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
12566         FUNCTION_DECLs.
12567
12568 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
12569
12570         * decl.c (make_implicit_typename): Lose useless code.
12571
12572         * call.c (standard_conversion): Handle A* -> const A* properly.
12573
12574         * pt.c (get_bindings_real): Rename from get_bindings.  Add
12575         check_rettype parm.
12576         (get_bindings): Pass 1.
12577         (get_bindings_overload): Pass 0.
12578
12579 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
12580
12581         * pt.c (check_explicit_specialization): When reverting a static
12582         member function, also remove the `this' parameter from
12583         last_function_parms.
12584
12585 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
12586
12587         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
12588         a function context.
12589
12590         * decl.c (store_bindings): Use free_binding_vecs.
12591         (pop_from_top_level): Likewise.
12592
12593 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
12594
12595         * decl.c (make_implicit_typename): Only change the type of a
12596         TYPENAME_TYPE.
12597
12598 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
12599
12600         * semantics.c: New file, containing routines to perform the
12601         semantic phase of parsing.
12602         * parse.y: Use it.
12603         * pt.c (tsubst_expr): Likewise.
12604         * cp-tree.h: Declare the various functions in semantics.c.
12605         Provide macros to access _STMT tree nodes.
12606         * cp-tree.def: Add ASM_STMT tree node.
12607         * Makefile.in, Make-lang.in: Add dependencies on and for
12608         semantics.c.
12609
12610 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
12611
12612         * pt.c (push_template_decl): Only check primary templates.
12613
12614         * pt.c (check_explicit_specialization): Complain about default args
12615         in explicit specialization.
12616
12617         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
12618         constructor_declarator.
12619
12620 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
12621
12622         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
12623         has no overloaded operator ->.
12624
12625         * call.c (build_field_call): Don't crash when presented with a
12626         field that is actually a nested type.
12627
12628         * decl.c (pushtag): Deal with friend class injection in local
12629         classes.
12630
12631         * call.c (build_object_call): Don't crash if OBJ is a
12632         pointer-to-member-function.
12633
12634 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
12635
12636         * pt.c (push_template_decl): Complain about template with C linkage,
12637         anonymous template class.
12638
12639 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
12640
12641         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
12642         * search.c: Likewise.
12643
12644         * lex.c (do_pending_defargs): Only call
12645         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
12646
12647         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
12648
12649 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
12650
12651         * parse.y: Deal with CONSTRUCTORS in new_initializers.
12652
12653 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
12654
12655         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
12656         closely mimics the behavior in parse.y.
12657         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
12658         into a compound statement.
12659
12660 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
12661
12662         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
12663         * pt.c (inline_needs_template_parms): New fn.
12664         (original_template): New fn.
12665         (push_inline_template_parms_recursive): New fn.
12666         (maybe_begin_member_template_processing): Use them.
12667         (maybe_end_member_template_processing): Likewise.
12668         (is_member_or_friend_template): Rename to is_member_template.
12669         Member functions of local classes are never member templates.
12670
12671 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12672
12673         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
12674         added in the class scope to catch redefinition error.
12675
12676         * pt.c (reduce_template_parm_level): Also copy
12677         the DECL_TEMPLATE_PARMS field.
12678
12679 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
12680
12681         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
12682         reduced-level template type parameter.
12683
12684 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12685
12686         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
12687         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
12688         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
12689         * decl.c (duplicate_decls): Propagate it.
12690         * typeck2.c (abstract_virtuals_error): Use two loops to emit
12691         abstract virtual functions and virtual functions which need a
12692         final overrider separately.
12693
12694 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12695
12696         * lang-specs.h: Properly put brackets around array elements in
12697         initializer.
12698
12699         * typeck.c (build_binary_op_nodefault): Correctly place parens around
12700         && and || in expression.
12701
12702 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12703
12704         * call.c (default_parm_conversions): Remove prototype definition.
12705         (build_method_call): Remove unused variable result.
12706
12707         * cvt.c (ocp_convert): Remove unused variable conversion.
12708
12709         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
12710
12711         * except.c (do_unwind): #if 0 definition of unused variables fcall
12712         and next_pc.
12713
12714         * expr.c (extract_scalar_init): #if 0 prototype and function
12715         definition.
12716
12717         * init.c (expand_aggr_init_1): Remove unused variable init_type.
12718         (build_new_1): Remove unused variable t.
12719
12720         * pt.c (instantiate_class_template): Remove unused variable newtag;
12721         cast called function return value to void.
12722         (do_decl_instantiation): Remove unused variables name and fn.
12723
12724         * tree.c (get_type_decl): Add default return to shut up compiler from
12725         complaining control reaches end of non-void function.
12726
12727         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
12728
12729 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12730
12731         * call.c (default_parm_conversions): Remove prototype definition.
12732         (build_method_call): Remove unused variable result.
12733         (build_over_call): Add default case in enumeration switch.
12734
12735 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12736
12737         * decl2.c (lang_decode_option): Change j's type to size_t.
12738
12739         * tree.c (layout_vbasetypes): record_align and desired_align are of
12740         type unsigned int; const_size and nonvirtual_const_size likewise.
12741
12742 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
12743
12744         * parse.y (new_initializer): Make sure all initializers are
12745         lists.
12746
12747 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
12748
12749         * decl2.c (import_export_decl): Mark tinfo functions for
12750         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
12751
12752 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
12753
12754         * method.c: Fix typo.
12755
12756 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12757
12758         * method.c: Include "system.h" to get stdlib.h, stdio.h,
12759         ctype.h, string.h, etc.
12760         (issue_nrepeats): Add default case in enumeration switch.
12761         (check_btype): Likewise.
12762         (process_overload_item): Likewise.
12763
12764         * Makefile.in (method.o): Depend on system.h.
12765
12766 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
12767
12768         * lex.c (do_scoped_id): Fix parenthesizing.
12769
12770 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
12771
12772         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
12773         FLAG_RTTI is unset, initialize type info machinery and continue
12774         with FLAG_RTTI enabled.
12775         (get_typeid): Likewise.
12776
12777 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
12778
12779         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
12780         from B.
12781
12782 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
12783
12784         * pt.c (finish_member_template_decl): Deal more gracefully with
12785         invalid declarations.
12786
12787 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
12788
12789         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
12790         cp-tree.h: Clean up more old overloading code, old RTTI code, and
12791         some formatting quirks.
12792
12793         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
12794         method.c, pt.c, ptree.c, typeck.c: Remove support for
12795         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
12796         * class.h: Remove.
12797         * Makefile.in: Adjust.
12798
12799         * pt.c (unify): Don't allow reduced cv-quals when strict.
12800
12801         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
12802         *type_unification* and unify.
12803
12804 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
12805
12806         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
12807         (nested_name_specifier): And add it before this use.
12808         (typename_sub0): And this use.  Also add use without the keyword.
12809         (typename_sub1): Likewise.
12810         * pt.c (instantiate_class_template): Don't actually instantiate
12811         anything if our type uses template parms.
12812
12813 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
12814
12815         * decl.c (start_function): Don't call temporary_allocation for a
12816         nested function.
12817
12818 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
12819
12820         * pt.c (instantiate_class_template): Don't mess with friends if
12821         our type uses template parms.
12822
12823 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
12824
12825         * parse.y (nested_name_specifier): Use explicit_template_type.
12826         (typename_sub): Allow a template_type, an explicit_template_type,
12827         or an implicit template type at the end.
12828         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
12829         * decl.c (make_typename_type): Handle template-id where the name
12830         is a TEMPLATE_DECL.
12831         * call.c (build_scoped_method_call): Handle member template
12832         destructor call.
12833         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
12834         destructor is represented by the type.
12835
12836         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
12837         * parse.y (nested_name_specifier): Add 'template' case.
12838         (explicit_template_type): New rule.
12839         (typename_sub): Use it.
12840         * decl.c (make_typename_type): Handle getting a template-id for NAME.
12841         * pt.c (tsubst): Likewise.
12842
12843 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
12844
12845         * pt.c (add_to_template_args): Fix thinko.
12846         (instantiate_class_template): Call it later.
12847
12848         * pt.c (get_class_bindings): Add outer_args parm.
12849         (most_specialized_class): Likewise.
12850         (instantiate_class_template): Pass it.
12851         (more_specialized_class): Likewise.
12852         (lookup_template_class): Get context from template if none
12853         was specified.
12854         (finish_member_template_decl): Don't do anything with a
12855         partial specialization.
12856         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
12857         AGGREGATE_TYPE_P.
12858         * class.c (finish_struct): Member class templates have already been
12859         checked for name clashes.
12860         * decl.c (pushdecl_with_scope): Handle pushing at class level.
12861
12862 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
12863
12864         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
12865         (tsubst, *_PARM): Support multiple levels of template classes.
12866         (instantiate_class_template): Look up the pattern from the
12867         original template.
12868         (lookup_template_class): Handle getting a template for d1.
12869         (push_template_decl): Correct setting of 'primary'.
12870         (reduce_template_parm_level): Add 'levels' parm.
12871         (finish_member_template_decl): Support member class templates.
12872         (template_class_depth): Handle multiple levels.
12873         * parse.y (component_decl_1, fn.def2): Remove member template case.
12874         (component_decl): Add member template cases.
12875         * decl2.c (check_member_template): We now handle member template
12876         classes.
12877         * decl.c (pushtag): Handle member templates.
12878         * method.c (do_inline_function_hair): Don't touch
12879         IDENTIFIER_GLOBAL_VALUE.
12880         * init.c (build_offset_ref): If name isn't an identifier, just
12881         return it.
12882         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
12883
12884         * typeck.c (get_delta_difference): Do adjust for conversions to
12885         and from virtual base.
12886
12887 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
12888
12889         * typeck.c (get_delta_difference): Give hard error for conversion
12890         from virtual base.
12891
12892         * cp-tree.h: Tweak formatting.
12893
12894 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
12895
12896         * decl.c (push_namespace): Handle redeclaration error.
12897
12898         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
12899         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
12900         (NAMESPACE_BINDING): New macro.
12901         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
12902         * *.c: Use them.
12903
12904         * pt.c (push_template_decl): Use innermost_args.
12905
12906         * decl.c (get_unique_name): Tweak from earlier in the name.
12907
12908 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12909
12910         * cp-tree.def: Add CPLUS_BINDING node.
12911         * cp-tree.h (tree_binding): New struct.
12912         (BINDING_SCOPE, BINDING_VALUE): New macros.
12913         (current_namespace, global_namespace): Declare extern.
12914         (struct lang_decl_flags): New field in_namespace.
12915         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
12916         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
12917         (TREE_INDIRECT_USING): New macro.
12918         * decl2.c (current_namespace, global_namespace): Declare.  The
12919         value is a NAMESPACE_DECL now, not a TREE_LIST.
12920         (is_namespace_ancestor, namespace_ancestor): New static functions.
12921         (add_using_namespace, ambiguous_decl): Likewise.
12922         (lookup_using_namespace): New support function for lookup_name.
12923         (qualified_lookup_using_namespace): New support function for
12924         do_scoped_id and lookup_namespace_name.
12925         (get_namespace_id): Mark as obsolete.
12926         (current_namespace_id): Likewise.
12927         (do_namespace_alias): Implement.
12928         (do_using_directive): Implement as call to add_using_namespace.
12929         * decl.c (binding_for_name): New function.
12930         (push_namespace, pop_namespace): Implement.
12931         (push_decl): Don't install a FUNCTION_DECL in the global branch.
12932         (lookup_namespace_name): Implement using qualified lookup.
12933         (lookup_name_real): For global scoping, lookup in
12934         global_namespace.  For namespace scoping, lookup in given
12935         namespace.  For unscoped lookup, iterate over namespace,
12936         considering using directives.
12937         (init_decl_processing): Initialize global_namespace.
12938         (grokvardecl): Build assembler name as static name for globals.
12939         (grokdeclarator): Remove old namespace mangling.
12940         (xref_tag): When installing a global binding for the
12941         tag, make sure we have an identifier.
12942         * method.c (build_overload_nested_name): Mangle namespaces.
12943         (build_qualified_name): Likewise.
12944         (build_decl_overload_real): Likewise.
12945         * lex.c (build_lang_decl): Set namespace for new declaration to
12946         current_namespace.
12947         (do_scoped_id): Find global names in global or current
12948         namespace, or using qualified namespace lookup, depending on
12949         context.
12950         * init.c (build_member_call): When scope is namespace, use
12951         build_x_function_call instead.
12952         (build_offset_ref): When scope is namespace, collapse processing
12953         to lookup_namespace_name instead.
12954         * error.c (dump_decl): Support NAMESPACE_DECL.
12955         * decl.c (pushdecl): Bind globals to current namespace.
12956         (push_overloaded_decl): Likewise.
12957         (lookup_tag): Likewise.
12958         (lookup_name_current_level): Likewise.
12959         (xref_tag): Likewise.
12960         (start_function): Likewise.
12961         * lex.c (do_identifier): Likewise.
12962         (identifier_typedecl_value): Likewise.
12963         (real_yylex): Likewise.
12964         * method.c (do_inline_function_hair): Likewise.
12965         * parse.y (unscoped): Likewise.
12966         * pt.c (check_explicit_specialization): Likewise.
12967         (lookup_template_class): Likewise.
12968         * rtti.c (call_void_fn): Likewise.
12969         * sig.c (build_sigtable): Likewise.
12970         * ptree.c (lang_print_xnode): New function.
12971
12972 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
12973
12974         * pt.c (instantiate_class_template): Don't instantiate if pedantic
12975         and the args use template parms.
12976
12977         * pt.c (push_tinst_level): If the instantiation uses template parms,
12978         fail silently.
12979         * decl.c (xref_basetypes): Do call complete_type for basetypes
12980         that involve template parameters.
12981
12982 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
12983
12984         * typeck2.c (process_init_constructor): Fix labeled init check.
12985
12986 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
12987
12988         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
12989         argument to tsubst and friends.
12990
12991         * pt.c (tsubst, FUNCTION_DECL): Tidy.
12992
12993         * typeck.c (build_x_function_call): Handle static member function
12994         templates like non-templates.  Handle friend templates like normal
12995         function templates.
12996         * pt.c (tsubst, *_PARM): Don't use orig_level.
12997         (get_bindings): Don't call add_to_template_args.
12998         (instantiate_template): Likewise.
12999         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
13000         * ptree.c (print_lang_type): Print index/level for template parms.
13001
13002 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
13003
13004         * Make-lang.in (cc1plus): Note that cc1plus depends on
13005         cp/cp-tree.h and cp/cp-tree.def.
13006
13007         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
13008         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
13009         position in a template parameter list.
13010         * cp-tree.h (template_parm_index): New structure, used as the tree
13011         structure for a TEMPLATE_PARM_INDEX.
13012         (TEMPLATE_PARM_IDX): New macro.
13013         (TEMPLATE_PARM_LEVEL): Likewise.
13014         (TEMPLATE_PARM_DESCENDANTS): Likewise.
13015         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
13016         (TEMPLATE_PARM_DECL): Likewise.
13017         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
13018         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
13019         (TEMPLATE_TYPE_DECL): Likewise.
13020         (TEMPLATE_CONST_IDX): Remove.
13021         (TEMPLATE_CONST_LEVEL): Likewise.
13022         (TEMPLATE_CONST_SET_INFO): Likewise.
13023         (TEMPLATE_TYPE_SET_INFO): Likewise.
13024         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
13025         node.
13026         (TEMPLATE_TYPE_LEVEL): Likewise.
13027         * decl.c (decls_match): Call comp_template_parms, rather than
13028         expanding it inline.
13029         (duplicate_decls): If two template declarations are being merged,
13030         then their TEMPLATE_INFOs should be merged as well.
13031         (grokfndecl): Save template-id information when declaring a friend
13032         with explicit template arguments.  Pass arguments to
13033         check_explicit_specialization via correct convention; at some
13034         point check_explicit_specialization changed, but these call-sites
13035         did not.
13036         (grokdeclarator): Tidy up slightly.
13037         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
13038         two template functions with the same DECL_ASSEMBLER_NAME the same,
13039         since the names are not yet mangled.
13040         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
13041         TEMPLATE_CONST_PARM.
13042         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
13043         decl for a non-type parameter, rather than printing `<tparm ...>'.
13044         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
13045         (do_friend): Deal with template friends.
13046         * lex.c (do_pending_inlines): Call
13047         maybe_begin_member_template_processing, rather than
13048         conditionally calling begin_member_template_processing.
13049         (process_next_inline): Likewise.  Call
13050         maybe_end_member_template_processing, rather than
13051         conditionally calling end_member_template_processing.
13052         (do_pending_defargs): Likewise.
13053         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
13054         TEMPLATE_CONST_PARM.
13055         * method.c (build_mangled_template_parm_index): New function.
13056         (build_overload_value): Use it.
13057         (build_overload_name): Likewise.
13058         * pt.c (finish_member_template_decl): Allow friend declarations.
13059         (template_class_depth): New function.
13060         (is_member_template): Rename, and modify, to become...
13061         (is_member_or_friend_template): New function.
13062         (end_member_template_processing): Rename, and modify, to become...
13063         (maybe_end_member_template_processing).
13064         (build_template_parm_index): New function.
13065         (reduce_template_parm_level): New function.
13066         (process_template_parm): Modify to use build_template_parm_index.
13067         (push_template_decl): Deal with friend templates.
13068         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
13069         TEMPLATE_CONST_PARM.
13070         (tsubst_friend_function): New function.
13071         (instantiate_class_template): Generate the DECL_FRIENDLIST
13072         for a new instantiation by using tsubst_friend_function rather
13073         than just tsubst.
13074         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
13075         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
13076         appropriate new macros.  Use reduce_template_parm_level to
13077         generate lower-level template parameters.  Handle tsubst'ing into
13078         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
13079         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
13080         templates.  Similarly for the template parameters for a new
13081         template.
13082         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
13083         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
13084         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
13085         (get_bindings): Call add_to_template_args if necessary.
13086         (instantiate_decl): Handle instantiations of friend templates.
13087         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
13088         TEMPLATE_TYPE_PARM as a list of fields; it's not!
13089         * spew.c (yylex): Do a little manual constant propagation to
13090         clarify the code.
13091
13092 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
13093
13094         * error.c: Include sys/types.h.
13095
13096 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
13097
13098         * method.c (build_mangled_name): Start CPP directives in column zero.
13099
13100 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
13101
13102         * typeck2.c (process_init_constructor): Sorry about non-trivial
13103         labeled initializers.
13104         * parse.y (initlist): Re-enable labeled initializers.
13105
13106 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13107
13108         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
13109         all callers changed.  Rely on the new parameter instead of arg
13110         being a TREE_LIST when determine whether we are working inside
13111         template template parameter.  Clean up is_type test.
13112
13113 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
13114
13115         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
13116         * typeck2.c (initializer_constant_valid_p): Allow conversions
13117         between pointers and references.
13118
13119 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
13120
13121         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
13122         if pedantic || warn_pointer_arith.
13123
13124 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13125
13126         * pt.c (unify): Handle TEMPLATE_DECL.
13127
13128 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
13129
13130         * cp-tree.h (strip_attrs): Remove decl.
13131
13132 1998-02-18  Doug Evans  <devans@cygnus.com>
13133
13134         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
13135         Update olddecl's attributes too.
13136         (strip_attrs): Remove function.
13137         * typeck.c (common_type): Call merge_machine_type_attributes.
13138
13139 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
13140
13141         * parse.y (initdcl0_innards): New grammar symbol.
13142         (nomods_initdecls, nomods_initdcl0): Change type from itype to
13143         none, since the resulting value is never used.
13144         (parse_decl): New function.
13145         (datadef): Remove redundant actions.
13146         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
13147         * parse.c: Regenerated.
13148
13149 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
13150
13151         * parse.y (simple_stmt): Use getdecls() to check for decl.
13152
13153 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
13154
13155         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
13156         macros.
13157         (c++.install-common): Install c++filt properly as native or as cross
13158         variant.
13159         (c++.uninstall): Add c++filt.
13160
13161 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
13162
13163         * call.c (standard_conversion): Fix multi-level ptr conversions.
13164
13165 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
13166
13167         * init.c (build_new): Propagate error_mark_node up.
13168
13169 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
13170
13171         * parse.y (simple_stmt): If the condition isn't a declaration,
13172         start the controlled block after the test.
13173
13174 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13175
13176         * call.c (build_over_call): Convert builtin abs, labs and fabs to
13177         tree-codes.
13178         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
13179         builtins.
13180
13181 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
13182
13183         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
13184
13185 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
13186
13187         * cp-tree.h: Add access_protected_virtual_node.
13188         * class.c (init_class_processing): Initialize it.
13189         * decl.c (xref_basetypes): Use it.
13190         * parse.y (base_class_access_list): Likewise.
13191
13192         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
13193         (c++.install-common): Install c++filt.
13194
13195 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13196
13197         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
13198
13199 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
13200
13201         * call.c (reference_binding): Use comptypes when comparing
13202         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
13203
13204 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
13205
13206         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
13207         (really_overloaded_fn): Move check here from is_overloaded_fn.
13208         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
13209
13210 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
13211
13212         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
13213         conversions.
13214
13215 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
13216
13217         * cp-tree.h (push_template_decl): Return the decl passed in, or an
13218         equivalent duplicate.
13219         * decl.c (pushtag): Use the return value from push_template_decl.
13220         (duplicate_decls): When duplicating a template declaration, merge
13221         the DECL_TEMPLATE_RESULTs as well.
13222         (make_implicit_typename): Don't try to dive into typename types to
13223         find a context for making a new implicit typename.
13224         (start_decl): Use the return value from push_template_decl.
13225         (grokdeclarator): Complain about declarations list `const operator
13226         int'.  Since we don't correctly handle in-class initializations of
13227         non-static data members, complain about this (now illegal)
13228         practice.  Issue an error for initializations of non-const statics
13229         since that is illegal as well, and since we don't handle that case
13230         correctly either.
13231         (start_function): Use the return value from push_template_decl.
13232         (start_method): Likewise.
13233         * decl2.c (grokfield): Likewise.  Since the change to
13234         grokdeclarator ensures that all initialized fields are in fact
13235         static, remove a redundant test for TREE_PUBLIC.
13236         * parse.y (initlist): Disable labeled initializers since they do
13237         not work as per the documentation, and since they do not use the
13238         same syntax as the C front end.
13239         * pt.c (push_template_decl): Return the decl passed in, or an
13240         equivalent duplicate.
13241         (lookup_template_class): When searching in a nested context,
13242         use the right arguments.
13243         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
13244         * typeck.c (build_component_ref): Assign the correct type to the
13245         result of build_vfn_ref.
13246
13247 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
13248
13249         * pt.c (convert_nontype_argument): Fix typo.
13250         (check_explicit_specialization): Allow old-style specialization
13251         of class template members.
13252
13253 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
13254                           Manfred Hollstein  <manfred@s-direktnet.de>
13255
13256         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
13257         when deciding to override DECL_ASSEMBLER_NAME.
13258
13259 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
13260
13261         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
13262         * cp-tree.h (flag_do_squangling): Add declaration.
13263         * lang-options.h: Add -fsquangle and -fno-squangle.
13264         * method.c: Add macros and static variables for squangling.
13265         (build_overload_name): Rename to build_mangled_name, add logic for B
13266         compression, and split into process_modifiers and
13267         process_overload_item.
13268         (process_modifiers): New function, to handle constant, reference,
13269         and pointer types.
13270         (process_overload_item): New function, handles issue of type codes.
13271         (build_overload_name): New function, start squangling and call
13272         build_mangled_name.
13273         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
13274         (start_squangling): New function to initialize squangling structs.
13275         (end_squangling): New function to destroy squangling structs.
13276         (nrepeats): Rename variable to Nrepeats.
13277         (issue_nrepeats): New function for issuing 'n' type repeats.
13278         (check_ktype): New function to check for type K name compression.
13279         (build_overload_nested_name): Add a check for K name compression.
13280         (build_qualified_name): Add a check for K name compression and don't
13281         use DECL_ASSEMBLER_NAME when squangling is on.
13282         (check_btype): New function, checks for B type compression.
13283         (build_static_name, build_decl_overload_real): Initiate squangling.
13284         (build_typename_overload, build_overload_with_type): Initiate
13285         squangling
13286
13287 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
13288
13289         * method.c (make_thunk): Avoid name buffer overflow.
13290
13291 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
13292
13293         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
13294         don't define them yet.
13295
13296         * parse.y (nomods_initdcl0): Add constructor_declarator case.
13297
13298 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13299
13300         * config-lang.in (diff_excludes): Use basename only.
13301
13302 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
13303
13304         * tinfo2.cc: Add tinfo for signed char.
13305
13306 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
13307
13308         * search.c (compute_access): Handle protected constructors in derived
13309         classes as accessible.
13310
13311 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
13312
13313         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
13314         Call convert_from_reference sooner.
13315
13316 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
13317
13318         * cvt.c (ocp_convert): Obtain the constant values from constant
13319         decls even if the destination type is the same as the type of the
13320         decl.
13321
13322         * decl2.c (finish_file): Make sure that static inlines with
13323         definitions are not marked DECL_EXTERNAL before returning.
13324
13325 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
13326
13327         * decl.c: Lose arg_looking_for_template.
13328         (lookup_name_real): Likewise.
13329         * parse.y: Lose processing_template_arg, template_arg1.
13330         (primary): Likewise.
13331         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
13332
13333 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13334
13335         * error.c (dump_decl): Fix type of default arguments for template
13336         template parameters and nontype template parameters.
13337         * parse.y (template_parm): Handle invalid default template
13338         template arguments here.
13339
13340         * parse.y (template_parm): Use template_arg instead of PTYPENAME
13341         for default template template argument.
13342         * pt.c (coerce_template_parms): Merge default template argument
13343         codes.  Can treat RECORD_TYPE as template name if it is implicitly
13344         created.  Fix argument index in error message.
13345         * typeck.c (comptypes): Merge template argument comparison codes in
13346         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
13347
13348 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
13349
13350         * lex.c (file_name_nondirectory): Also check for '/'.
13351
13352 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
13353
13354         * parse.y (primary): Deal with statement-expressions in
13355         templates.
13356         * pt.c (tsubst_copy): Handle BIND_EXPR.
13357         * tree.c (mapcar): Likewise.
13358
13359         * call.c (add_template_candidate_real): Pass extra parameter to
13360         fn_type_unification.
13361         * cp-tree.h (fn_type_unification): Add parameter.
13362         * pt.c (fn_type_unification): Add additional parameter to deal with
13363         static member functions.
13364         (get_bindings): Deal with static member functions.
13365
13366         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
13367         (revert_static_member_fn): Declare.
13368         * decl.c (revert_static_member_fn): Remove declaration.  Change
13369         linkage from internal to external.
13370         (cp_finish_decl): Deal with virtual functions in classes local to
13371         template functions.
13372         * decl2.c (finish_file): Don't forget to emit increment/decrement
13373         expressions in initializers for file-scope variables.
13374         * parse.y (typename_sub2): If the typename doesn't names a
13375         template, rather than a type, issue an error message.
13376         * pt.c (check_explicit_specialization): Handle specializations of
13377         static member functions.
13378         (coerce_template_parms): Handle offset references to lists of
13379         member functions.
13380         * search.c (note_debug_info_needed): Don't crash when handed a
13381         type which is being defined.
13382         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
13383         that can happen with some illegal code.
13384
13385 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13386
13387         * call.c (user_harshness): Initialize `code' to 0.
13388         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
13389         (null_ptr_cst_p): Add parentheses around && within ||.
13390         (standard_conversion): Likewise.
13391         (z_candidate): Likewise.
13392         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
13393         (build_object_call): Likewise for `mem_args'.
13394         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
13395         default case in enumeration switch.
13396
13397         * class.c (build_vtable_entry): Add explicit braces to avoid
13398         ambiguous `else'.
13399         (build_class_init_list): Likewise.
13400         (finish_struct_1): Initialize `width' to 0.
13401         (instantiate_type): Initialize `name' to NULL_TREE.  Add
13402         explicit braces to avoid ambiguous `else'.
13403
13404         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
13405         `else'.
13406
13407         * decl.c (grok_reference_init): Eliminate unused parameter, all
13408         callers changed.
13409         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
13410         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
13411         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
13412         (grokdeclarator): Add parentheses around && within ||.  Add
13413         explicit braces to avoid ambiguous `else'.
13414         (grokparms): Initialize `type' to NULL_TREE.
13415         (xref_tag): Remove unused label `just_return'.
13416         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
13417         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
13418         (hack_incomplete_structures): Add parentheses around assignment
13419         used as truth value.
13420
13421         * decl2.c (coerce_delete_type): Hide definition of `e3'.
13422
13423         * error.c: Include <stdlib.h>.
13424         (dump_expr): Change the type of `i' to size_t.  Remove unused
13425         label `error'.
13426
13427         * except.c (init_exception_processing): Remove unused variable `d'.
13428         (expand_throw): Likewise for `label'.
13429
13430         * friend.c (add_friends): Add explicit braces to avoid ambiguous
13431         `else'.
13432
13433         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
13434         (sort_base_init): Likewise for `binfo'.
13435         (expand_member_init): Likewise for `rval'.
13436         (build_member_call): Add parentheses around assignment used as
13437         truth value.
13438         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
13439         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
13440         `old_immediate_size_expand' to 0.
13441         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
13442         (build_vec_delete_1): Remove unused variable `block'.
13443         (expand_vec_init): Initialize `itype' to NULL_TREE.
13444
13445         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
13446         declaration of `index' and `rindex' with autoconf macros.
13447         (reinit_parse_for_expr): Remove unused variables
13448         `look_for_semicolon' and `look_for_lbrac'.
13449         (cons_up_default_function): Initialize `args' to NULL_TREE.
13450         (readescape): Initialize `firstdig' to 0.
13451         (real_yylex): Add parentheses around assignment used as truth value.
13452
13453         * method.c: Include <strings.h> if we don't have <string.h>.
13454         Protect declaration of `index' with autoconf macro.
13455
13456         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
13457         Initialize `type' to NULL_TREE.
13458         (structsp): Remove unused variable `id'.
13459
13460         * pt.c (coerce_template_parms): Add explicit braces to avoid
13461         ambiguous `else'.
13462         (lookup_template_class): Initialize `template' to NULL_TREE.
13463         (instantiate_class_template): Remove unused variable `name' and `e'.
13464         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
13465         (do_poplevel): Initialize `saved_warn_unused' to 0.
13466         (type_unification): Remove unused varable `parm'.
13467         (unify): Likewise for `j'.
13468
13469         * repo.c (init_repo): Add parentheses around assignment used as
13470         truth value.
13471         (finish_repo): Remove unused varable `p'.
13472
13473         * search.c (get_binfo): Initialize `type' to NULL_TREE.
13474         (get_base_distance): Likewise.
13475         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
13476         and `new_v' to NULL_TREE.
13477         (lookup_fnfields): Likewise for `rval_binfo_h'.
13478         (breadth_first_search): Add parentheses around assignment used as
13479         truth value.
13480         (get_template_base): Initialize `type' to NULL_TREE.
13481
13482         * sig.c (append_signature_fields): Initialize `last_mfptr' to
13483         NULL_TREE.
13484         (build_signature_table_constructor): Likewise for
13485         `last_rhs_field', `pfn' and `vt_off'.
13486         (build_sigtable): Likewise for `init'.
13487
13488         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
13489         (propagate_binfo_offsets): Likewise for `delta'.
13490         (hash_tree_cons): Initialize hashcode to 0.
13491         (can_free): Likewise for `size'.
13492         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
13493
13494         * typeck.c (convert_sequence): Hide prototype.
13495         (common_type): Add explicit braces to avoid ambiguous `else'.
13496         (comp_target_types): Likewise.
13497         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
13498         (build_function_call_real): Add explicit braces to avoid ambiguous
13499         `else'.
13500         (convert_arguments): Initialize `called_thing' to 0.
13501         (convert_for_initialization): Initialize `savew' and `savee' to 0.
13502
13503         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
13504         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
13505         (build_x_arrow): Likewise for `last_rval'.
13506
13507         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
13508
13509 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
13510
13511         * decl.c (init_decl_processing): Use set_sizetype.
13512         * decl2.c (sizetype): Don't declare.
13513         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
13514         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
13515         (build_component_addr, unary_complex_lvalue): Likewise.
13516         * rtti.c (expand_class_desc): Likewise.
13517         * class.c (get_vfield_offset): Likewise.
13518
13519 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
13520
13521         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
13522         early to avoid bogus error.  Handle overloaded function
13523         names provided as template arguments correctly.
13524         (coerce_template_parms): Don't mishandle overloaded functions when
13525         dealing with template template parameters.
13526         (lookup_template_class): Issue an error message, rather than
13527         crashing, when the TYPE_DECL provided is not a template type.
13528
13529 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
13530
13531         * class.c (instantiate_type): Don't just return a known type if
13532         it's wrong.
13533
13534 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
13535
13536         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
13537         since that code could never be reached.
13538
13539         * error.c (dump_decl): Avoid aborting in the midst of printing an
13540         error message about an illegal template declaration.
13541
13542         * parse.y (structsp): Print an error message, rather than crashing,
13543         when a class-head does not name a class.
13544
13545         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
13546         template arguments as a g++ extension.
13547
13548         * cp-tree.def (ALIGNOF_EXPR): New tree code.
13549         * decl2.c (grok_alignof): If processing_template_decl, just store
13550         the expression.
13551         * typeck.c (c_alignof): Likewise.
13552         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
13553         * error.c (dump_expr): Likewise.
13554         * pt.c (tsubst_copy): Likewise.
13555         * tree.c (cp_tree_equal): Likewise.
13556         * pt.c (uses_template_parms): Correctly determine whether or not a
13557         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
13558         folding can be done.
13559
13560         * cp-tree.h (grok_enum_decls): Remove type parameter.
13561         * decl.c (grok_enum_decls): Likewise.
13562         * decl2.c (grok_x_components): Call grok_enum_decls
13563         unconditionally, since it will do nothing if there is no
13564         current_local_enum.  Use the new calling sequence.
13565         * pt.c (tsubst_enum): Use the new calling sequence for
13566         grok_enum_decls.
13567
13568         * decl.c (start_function): Make member functions of local classes
13569         in extern inline functions have comdat linkage here...
13570         (grokdeclarator): Rather than here.
13571
13572 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
13573
13574         * pt.c (convert_nontype_argument): Use decl_constant_value.
13575
13576 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
13577
13578         * call.c (add_template_candidate_real): New function.
13579         (add_template_candidate): Use it.
13580         (add_template_conv_candidate): Likewise.
13581         (joust): Pass extra argument to more_specialized.
13582         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
13583         (is_local_class): Remove.
13584         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
13585         * cp-tree.h (is_local_class): Remove.
13586         (perform_array_to_pointer_conversion): Likewise.
13587         (finish_member_template_decl): Add.
13588         (check_explicit_specialization): Return a tree, not an int.
13589         (more_specialized): Take additional argument.
13590         (get_bindings): Likewise.
13591         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
13592         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
13593         (perform_array_to_pointer_conversion): Remove.
13594         * decl.c (saved_scope): Add processing_specialization,
13595         processing_explicit_instantiation fields.
13596         (maybe_push_to_top_level): Save them.
13597         (pop_from_top_level): Restore them.
13598         (grokfndecl): Use new return value from
13599         check_explicit_specialization.
13600         (start_decl): Don't check flag_guiding_decls before pushing
13601         decls.
13602         (cp_finish_decl): Remove previous (bogus) change.
13603         (grok_declarator): Use decl_function_context rather than
13604         is_local_class.
13605         * decl2.c (finish_file): Pass extra argument to get_bindings.
13606         (build_expr_from_tree): Let build_x_component_ref check
13607         validity of arguments rather than doing it here.
13608         * lex.c (cons_up_default_function): Remove code fooling with
13609         processing_specialization, processing_explicit_instantiation
13610         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
13611         * method.c (build_overload_identifier): Mangle local classes in
13612         template functions correctly.
13613         * parse.y (finish_member_template_decl): Move to pt.c.
13614         * pt.c (finish_member_template_decl): Moved here from parse.y.
13615         (print_candidates): New function.
13616         (determine_specialization): Change interface.  Properly look for
13617         most specialized versions of template candidates.
13618         (check_explicit_specialization): Fully process explicit
13619         instantiations.
13620         (push_template_decl): Avoid looking at CLASSTYPE fields in
13621         FUNCTION_DECLS.
13622         (determine_overloaded_function): Remove.
13623         (convert_nontype_argument): Change name from
13624         convert_nontype_parameter.  Use determine_overloaded_function
13625         instead of instantiate_type.
13626         (mangle_class_name_for_template): Handle type contexts as well as
13627         function contexts.
13628         (classtype_mangled_name): Likewise.
13629         (lookup_template_class): Likewise.
13630         (tsubst): Likewise.
13631         (more_specialized): Take explict template arguments as a
13632         parameter.
13633         (most_specialized): Likewise.
13634         (get_bindings): Likewise.  Check that return types match before
13635         proclaiming a function a match.
13636         (do_decl_instantiation): Remove code searching for function to
13637         instantiate; that is now done in check_explicit_specialization.
13638         (add_maybe_template): Pass extra argument to get_bindings.
13639         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
13640         implementation.
13641         * typeck.c (build_component_ref): Check for invalid arguments.
13642
13643 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
13644
13645         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
13646         return_target and call_target are equivalent.
13647
13648         * pt.c (type_unification_real): Just accept function parms that
13649         don't use any template parms.
13650
13651 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
13652
13653         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
13654         unset DECL_NOT_REALLY_EXTERN.
13655
13656         * parse.y (typename_sub*): Fix std::.
13657
13658 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
13659
13660         * error.c (dump_decl): Fix type default template args.
13661         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
13662
13663 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
13664
13665         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
13666         (file_name_nondirectory): Use.
13667
13668 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13669
13670         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
13671         that are not really present.  Substitute default arguments in
13672         template template arguments.  Correctly convert TEMPLATE_DECL to
13673         TEMPLATE_TEMPLATE_PARM.
13674         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
13675         are no longer treated specially here.
13676         * parse.y (template_template_parm): Fix copy error.
13677         * decl.c (grokdeclarator): Warn about missing `typename' for nested
13678         type created from template template parameters.
13679         * parse.y (bad_parm): Likewise
13680
13681         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
13682         (push_nested_class): Likewise.
13683         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
13684         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
13685         (copy_template_template_parm): Declare.
13686         * decl.c (arg_looking_for_template): New variable.
13687         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
13688         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
13689         node if arg_looking_for_template is nonzero.
13690         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
13691         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
13692         (grokdeclarator): Handle TEMPLATE_DECL.
13693         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
13694         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
13695         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
13696         (dump_decl): Handle unnamed template type parameters.
13697         Handle template template parameters.
13698         (dump_function_name): Handle template template parameters.
13699         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
13700         Handle TEMPLATE_TEMPLATE_PARM.
13701         * method.c (build_template_template_parm_names): New function.
13702         (build_template_parm_names): Handle TEMPLATE_DECL.
13703         (build_overload_nested_name, build_overload_name):
13704         Handle TEMPLATE_TEMPLATE_PARM.
13705         * parse.y (maybe_identifier): New nonterminal.
13706         (template_type_parm): Use it.
13707         (template_template_parm, template_arg1): New nonterminal.
13708         (template_parm): Add template_template_parm rules.
13709         (template_arg): Set processing_template_arg.
13710         (template_arg1): Rules moved from template_arg.
13711         (primary, nonnested_type): Set arg_looking_for_template if we are
13712         processing template arguments.
13713         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
13714         (process_template_parm): Handle template template parameters.
13715         (coerce_template_parms, comp_template_args): Likewise.
13716         (mangle_class_name_for_template, lookup_template_class): Likewise.
13717         (uses_template_parms): Handle TEMPLATE_DECL and
13718         TEMPLATE_TEMPLATE_PARM.
13719         (current_template_args): Handle TEMPLATE_DECL.
13720         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
13721         * search.c (dfs_walk, dfs_record_inheritance):
13722         Handle TEMPLATE_TEMPLATE_PARM.
13723         * tree.c (copy_template_template_parm): New function.
13724         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
13725         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
13726
13727 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
13728
13729         * decl.c (start_decl): Don't allow duplicate definitions of static
13730         data members.
13731
13732         * call.c (build_user_type_conversion_1): Handle user-defined
13733         template conversion operators correctly.
13734
13735         * decl2.c (build_expr_from_tree): Issue an error message if the
13736         object in a COMPONENT_REF is a TEMPLATE_DECL.
13737
13738         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
13739
13740         * class.c (is_local_class): New function.
13741         * cp-tree.h (is_local_class): Declare it.
13742         (last_tree): Likewise.
13743         (begin_tree): Likewise.
13744         (end_tree): Likewise.
13745         (lookup_template_class): Change prototype.
13746         * decl.c (cp_finish_decl): Check for NULL where necessary.
13747         Consider FUNCTION_DECLS to declare objects with top-level binding,
13748         when calling make_decl_rtl.
13749         (grokdeclarator): Give members of local classes internal linkage.
13750         (start_function): Remove declaration of last_tree.
13751         (finish_function): Set flag_keep_inline_functions around call to
13752         rest_of_compilation if we are processing a member function in a
13753         local class.
13754         (start_method): Call push_template_decl for member functions of
13755         local classes in template functions.
13756         * decl2.c (import_export_decl): Don't give external linkage to
13757         instantiations of templates with internal linkage.
13758         * parse.y (last_tree): Remove declaration.
13759         (template_type): Pass extra parameter to lookup_template_class.
13760         (self_template_type): Likewise.
13761         (structsp): Move call to reset_specialization into left_curly.
13762         (left_curly): Call reset_specialization, and begin_tree.
13763         * pt.c (saved_trees): New variable.
13764         (mangle_class_name_for_template): Change prototype.  Use
13765         additional function context to name local classes in templates
13766         correctly.
13767         (classtype_mangled_name): Pass the context.
13768         (push_template_decl): Handle local classes and templates, and
13769         member functions for such classes.
13770         (convert_nontype_parameter): Fix handling of pointer-to-member
13771         constants.
13772         (lookup_template_class): Handle local classes in templates.
13773         (tsubst): Likewise.  Don't assume that template instantiations
13774         have external linkage; pay attention to the template declaration.
13775         (mark_decl_instantiated): Likewise.
13776         (begin_tree): New function.
13777         (end_tree): Likewise.
13778
13779         * decl.c (xref_basetypes): Don't call complete_type for basetypes
13780         that involve template parameters; that can lead to infinite
13781         recursion unnecessarily.
13782
13783         * pt.c (register_specialization): Do not register specializations
13784         that aren't ready to be registered yet.
13785         (check_explicit_specialization): Handle explicit specialization of
13786         constructors and destructors.
13787         (build_template_decl): New function.
13788         (push_template_delc): Handle out-of-class specializations of
13789         member templates.
13790
13791         * pt.c (check_explicit_specialization): Set up the template
13792         information before registering the specialization.
13793         (coerce_template_parms): Fix thinko.
13794         (tsubst): Handle specializations of member templates correctly.
13795
13796         * class.c (finish_struct_methods): Remove calls to
13797         check_explicit_specialization from here.
13798         (finish_struct): And insert them here.
13799         * cp-tree.h (perform_qualification_conversions): New function.
13800         (perform_array_to_pointer_conversion): Likewise.
13801         (begin_explicit_instantiation): Likewise.
13802         (end_explicit_instantiation): Likewise.
13803         (determine_specialization): Renamed from
13804         determine_explicit_specialization.
13805         (comp_template_parms): New function.
13806         (processing_explicit_instantiation): New variable.
13807         * cvt.c (perform_qualification_conversions): New function.
13808         (perform_array_to_pointer_conversion): Likewise.
13809         * decl.c (duplicate_decls): Don't consider template functions
13810         alike unless they have the same parameters.  Refine handling of
13811         instantiation/specialization mismatches.
13812         (start_decl): Don't call pushdecl for template specializations,
13813         since they don't affect overloading.
13814         (start_function): Likewise.
13815         (grokfndecl): Call check_explicit_specialization a little later.
13816         Don't call duplicate_decls for memberm template specializations.
13817         (grokdeclarator): Don't update template_count for classes that are
13818         themselves specializations.  Remove use of `2' as parameter to
13819         grokfndecl since that value isn't used.
13820         * lex.c (cons_up_default_function): Save and restore
13821         processing_explicit_instantiation around calls to grokfield.
13822         * parse.y (finish_member_template_decl): New function.
13823         (component_decl_1): Use it.
13824         (fn.def2): Likewise.
13825         (template_arg_list_opt): New nonterminal.
13826         (template_type): Use it.
13827         (self_template_type): Likewise.
13828         (template_id): Likewise.
13829         (object_template_id): Likewise.
13830         (notype_template_declarator): Likwise.
13831         (begin_explicit_instantiation): Likewise.
13832         (end_explicit_instantiation): Likewise.
13833         (explicit_instantiation): Use them.
13834         * pt.c (coerce_template_parms): Add parameters.
13835         (processing_explicit_instantiation): New variable.
13836         (convert_nontype_parameter): New function.
13837         (determine_overloaded_function): Likewise.
13838         (begin_explicit_instantiation): Likewise.
13839         (end_explicit_instantiation): Likewise.
13840         (retrieve_specialization): Likewise.
13841         (register_specialization): Likewise.
13842         (processing_explicit_specialization): Removed.
13843         (determine_specialization): Handle specializations of member
13844         functions of template class instantiations.
13845         (check_explicit_specialization): Refine to conform to standard.
13846         (comp_template_parms): New function.
13847         (coerce_template_parms): Call convert_nontype_parameter.
13848         (tsubst): Refine handling of member templates.  Use
13849         register_specialization.
13850         (instantiate_template): Use retrieve_specialization.
13851         (do_decl_instantiation): Likewise.
13852         (instantiate_decl): Likewise.
13853         (type_unification): Improve handling of explict template
13854         arguments.
13855         * tree.c (mapcar): Return error_mark_node, rather than aborting,
13856         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
13857         * typeck.c (build_unary_op): Call determine_specialization, rather
13858         than determine_explicit_specialization.
13859
13860 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
13861
13862         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
13863
13864 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13865
13866         * error.c (dump_decl): For enum tags, output the tag, not its value.
13867
13868 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
13869
13870         * decl.c (init_decl_processing): Only call init_rtti_processing
13871         FLAG_RTTI is set.
13872
13873 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
13874
13875         * init.c (build_new_1): Split out from build_new.
13876         (build_new): Just return a NEW_EXPR.
13877         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
13878
13879         * decl2.c (get_temp_regvar): Tweak.
13880
13881         * cp-tree.h (TREE_CALLS_NEW): Comment out.
13882         * class.c (resolves_to_fixed_type_p): Remove use.
13883         * method.c (build_opfncall): Likewise.
13884         * call.c (build_new_op): Likewise.
13885
13886 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
13887
13888         * exception.cc (__eh_alloc, __eh_free): New fns.
13889         (__cp_push_exception, __cp_pop_exception): Use them.
13890         (__uncatch_exception): Call terminate here if no exception.
13891         * except.c (build_terminate_handler): New fn.
13892         (expand_start_catch_block): Use it.
13893         (expand_exception_blocks): Likewise.
13894         (alloc_eh_object): New fn.
13895         (expand_throw): Use it.  Protect exception init with terminate.
13896         * typeck.c (build_modify_expr): Remove code that ignores trivial
13897         methods.
13898
13899 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13900
13901         * call.c (add_builtin_candidate): Add default case in enumeration
13902         switch.
13903         (build_new_op): Likewise.
13904         (convert_like): Likewise.
13905         * cvt.c (build_expr_type_conversion): Likewise.
13906         * tree.c (real_lvalue_p): Likewise.
13907         (lvalue_p): Likewise.
13908         (cp_tree_equal): Likewise.
13909         * typeck.c (comptypes): Likewise.
13910         (build_component_ref): Likewise.
13911         (build_function_call_real): Likewise.
13912         (build_binary_op_nodefault): Likewise.
13913         (build_unary_op): Likewise.
13914         (build_modify_expr): Likewise.
13915         * typeck2.c (initializer_constant_valid_p): Likewise.
13916
13917 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
13918
13919         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
13920
13921 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
13922
13923         * pt.c (coerce_template_parms): Make sure to digest_init if
13924         possible.
13925
13926         * decl.c (duplicate_decls): Make the newdecl virtual if the
13927         olddecl was, just as is done with other attributes of olddecl.
13928
13929 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
13930
13931         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
13932         address of an OFFSET_REF.
13933
13934         * cp-tree.def: Add AGGR_INIT_EXPR.
13935         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
13936         AGGR_INIT_EXPR where appropriate.
13937         * expr.c (cplus_expand_expr): Likewise.  Simplify.
13938
13939         * decl2.c (finish_file): Remove call to register_exception_table.
13940
13941 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13942
13943         * pt.c (instantiate_class_template): Don't do injection when
13944         processing_template_decl is true, as pollutes current_binding_level
13945         for base classes.
13946
13947 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
13948
13949         * pt.c (maybe_fold_nontype_arg): Add prototype.
13950
13951 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13952
13953         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
13954         * error.c (dump_expr): Likewise.
13955
13956 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
13957
13958         * typeck.c (build_function_call_real): Remove "inline called before
13959         definition" pedwarn.
13960
13961         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
13962
13963 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13964
13965         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
13966
13967         * pt.c (type_unification_real): Change __null to type void* with
13968         a warning.
13969
13970 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
13971
13972         * call.c (implicit_conversion): Don't call
13973         build_user_type_conversion_1 with a NULL expr, since it will
13974         crash.
13975
13976         * pt.c (unify): Don't try to unify array bounds if either array is
13977         unbounded.
13978
13979 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13980
13981         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
13982         Replace extern decls with casts.
13983
13984         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
13985         Update last_parm_cleanup_insn.
13986         (store_after_parms): Remove.
13987         * cp-tree.h: Adjust.
13988
13989 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
13990
13991         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
13992         (finish_file): Check DECL_COMDAT instead of weak|one_only.
13993         (import_export_vtable): Use make_decl_one_only instead of
13994         comdat_linkage for win32 tweak.
13995         (import_export_decl): Likewise.
13996         * pt.c (mark_decl_instantiated): Likewise.
13997
13998         * decl2.c (finish_file): Lose handling of templates in pending_statics.
13999
14000 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
14001
14002         * decl2.c (finish_file): Lose call to expand_builtin_throw.
14003         * except.c (expand_builtin_throw): Remove.
14004         * cp-tree.h: Remove ptr_ptr_type_node.
14005         * decl.c: Likewise.
14006
14007 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
14008
14009         * decl.c (ptr_ptr_type_node): Define.
14010         (init_decl_processing): Initialize it.
14011         * cp-tree.h: Declare it.
14012         * exception.cc (__cp_exception_info): Use __get_eh_info.
14013         (__cp_push_exception): Likewise.
14014         (__cp_pop_exception): Likewise.
14015
14016         From Scott Snyder <snyder@d0sgif.fnal.gov>:
14017         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
14018         saved_pc.
14019         (init_exception_processing): Removed saved_pc initialization.
14020
14021 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
14022
14023         * pt.c (instantiate_decl): Defer all templates but inline functions.
14024
14025 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
14026
14027         * init.c (expand_vec_init): Don't fold a list of parameters.
14028
14029         * decl.c (copy_args_p): Handle copy elision for types with virtual
14030         bases.
14031         * call.c (build_over_call): Likewise.
14032
14033 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
14034
14035         * pt.c (lookup_template_function): Copy the template arguments,
14036         not just the list containing them, to the permanent obstack.
14037
14038 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14039
14040         * except.c (expand_start_catch_block): suspend_momentary for the
14041         terminate handler.
14042
14043         * error.c (dump_decl): Handle LOOKUP_EXPR.
14044
14045 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
14046
14047         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
14048         permanent obstack if we are processing a template decl.
14049         * typeck.c (build_static_cast): Likewise.
14050         (build_const_cast): Likewise.
14051         (build_reinterpret_cast): Likewise.
14052
14053         * pt.c (coerce_template_parms): Coerce some expressions, even
14054         when processing_template_decl.
14055
14056 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14057
14058         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
14059         handling of pointer difference expressions.
14060
14061         * typeck.c (comp_target_types): Comparison of function/method types
14062         is independent of nptrs.
14063
14064 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
14065
14066         * pt.c (tsubst): Avoid creating pointer to reference and
14067         reference to reference types.
14068
14069 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
14070
14071         * parse.y (do_id): New nonterminal.
14072         (template_id): Use it.
14073
14074 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
14075
14076         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
14077         * spew.c (yylex): Don't do_identifier here.
14078         * decl2.c (build_expr_from_tree): Revert last change.
14079
14080         * decl2.c (build_expr_from_tree): Expand the name for a method call.
14081         * parse.y (object_template_id): Don't try to take the DECL_NAME.
14082
14083 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
14084
14085         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
14086         alloc_expr.
14087         * call.c (build_op_delete_call): Adjust.
14088
14089         * except.c (expand_end_catch_block): Lose rethrow region.
14090         (expand_start_catch_block): Likewise.
14091         (expand_end_catch_block): Don't expand_leftover_cleanups.
14092
14093 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14094
14095         * pt.c (tsubst): Remove tree_cons call (places redundant info into
14096         DECL_TEMPLATE_INSTANTIATION).
14097
14098 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
14099
14100         * tree.c (is_overloaded_fn): Handle getting a fn template.
14101         (really_overloaded_fn): Likewise.
14102         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
14103         * pt.c (check_explicit_specialization): Tweak.
14104         (determine_explicit_specialization): Tweak.
14105
14106         * tree.c, cp-tree.h (get_target_expr): New fn.
14107
14108 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
14109
14110         * pt.c (check_explicit_specialization): Fix misspelling in
14111         diagnostic: `preceeded'.
14112         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
14113         `conversiona'.
14114
14115 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
14116
14117         * pt.c (determine_explicit_specialization): Avoid an internal
14118         error for bad specializations.
14119
14120         * method.c (build_overload_value): Handle SCOPE_REF.
14121
14122 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
14123
14124         * class.c (prepare_fresh_vtable): Enable even more complex MI
14125         vtable names.
14126
14127 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
14128
14129         * exception.cc (__check_eh_spec): Optimize a bit.
14130
14131         * exception.cc (__cp_pop_exception): Lose handler arg.
14132         * except.c (do_pop_exception): Likewise.
14133         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
14134         (expand_end_catch_block): Likewise.
14135
14136 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14137
14138         * pt.c (check_explicit_specialization): Complain about using a
14139         template-id for a non-specialization.
14140
14141 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
14142
14143         * repo.c: Prototype rindex only if needed.
14144         * xref.c: Likewise.
14145
14146 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14147
14148         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
14149
14150 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
14151
14152         * typeck.c (build_const_cast): Handle references here instead of
14153         handing off to convert_to_reference.
14154
14155         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
14156         TerminateFunctionCall.
14157         (init_exception_processing): Likewise.  Terminate et al are now
14158         the fns, not ADDR_EXPRs.
14159         (various): Lose redundant assemble_external calls.
14160         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
14161
14162         * cp-tree.h (struct lang_decl_flags): Add comdat.
14163         (DECL_COMDAT): New macro.
14164         * decl.c (duplicate_decls): Propagate it.
14165         (cp_finish_decl): Handle it.
14166         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
14167
14168         * class.c: Remove static pending_hard_virtuals.
14169         (add_virtual_function): Take pointers to pending_virtuals
14170         and pending_hard_virtuals.
14171         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
14172
14173 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
14174
14175         * decl2.c (import_export_vtable): If we support one_only but not
14176         weak symbols, mark instantiated template vtables one_only.
14177         (import_export_decl): Likewise for tinfo functions.
14178         (finish_vtable_vardecl): Also write out vtables from explicitly
14179         instantiated template classes.
14180         * pt.c (mark_class_instantiated): Revert last change.
14181
14182         * except.c (expand_throw): Call mark_used on the destructor.
14183
14184 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
14185
14186         * lex.c (lang_init): Enable flag_exceptions by default if no
14187         command line switch was specified.
14188
14189 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
14190
14191         * pt.c (unify): Handle `void' template parameters in
14192         specializations.
14193
14194 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
14195
14196         * rtti.c (build_dynamic_cast): Handle template case here.
14197         (build_dynamic_cast_1): Not here.
14198
14199         * typeck2.c (digest_init): Make copies where appropriate.
14200
14201         * decl2.c (delete_sanity): resolve_offset_ref.
14202
14203         * except.c: Call terminate without caching so many bits.
14204
14205         * except.c (expand_start_catch_block): Fix catching a reference
14206         to pointer.
14207
14208 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
14209
14210         * init.c (build_new): Copy size to the saveable obstack.
14211
14212         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
14213         TRY_CATCH_EXPR for now.
14214
14215 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
14216
14217         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
14218         has DECL_LANG_SPECIFIC.
14219
14220         * exception.cc (struct cp_eh_info): Add handlers field.
14221         (__cp_push_exception): Initialize it.
14222         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
14223         (__throw_bad_exception): Remove.
14224         * except.c (call_eh_info): Add handlers field.
14225         (get_eh_handlers): New fn.
14226         (push_eh_cleanup): Increment handlers.
14227
14228 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
14229
14230         * except.c (expand_start_eh_spec): Use the try/catch code.
14231         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
14232         doing everything inline.
14233         (init_exception_processing): throw_type_match now takes
14234         const void pointers.
14235         * exception.cc (__check_eh_spec): New fn.
14236         * inc/exception: Neither terminate nor unexpected return.
14237         * decl.c: Make const_ptr_type_node public.
14238         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
14239
14240         * except.c (expand_start_catch_block): We only need the rethrow
14241         region for non-sjlj exceptions.
14242         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
14243
14244 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
14245
14246         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
14247         (various.o): Likewise.
14248         * inc/new: Add placement deletes.  Add throw specs for default new.
14249         * new.cc (set_new_handler): Move here from libgcc2.
14250         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
14251         (new): Move from libgcc2.  Throw bad_alloc.
14252         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
14253         * decl.c (init_decl_processing): Update exception specs on new and
14254         delete.
14255
14256         * method.c (build_decl_overload_real): Don't mess with global
14257         placement delete.
14258
14259         * init.c (build_new): Check for null throw spec, not nothrow_t.
14260
14261         * decl.c (duplicate_decls): Don't complain about different exceptions
14262         from an internal declaration.
14263
14264         * call.c (build_op_delete_call): Fix check for member fns again.
14265
14266         * decl2.c (import_export_decl): Interface hackery affects
14267         virtual synthesized methods.
14268
14269 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14270
14271         * decl.c (start_decl): Don't just complain about a mismatched
14272         scope, fix it.
14273
14274         * decl.c (make_implicit_typename): Handle case where t is not
14275         actually from context.
14276         * tree.c (get_type_decl): Lose identifier case.
14277         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
14278         * parse.y (nonnested_type): Just use lookup_name.
14279         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
14280
14281 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
14282
14283         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
14284         T was built in C language context (for example, by
14285         output_func_start_profiler).
14286
14287 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
14288
14289         * decl.c (make_implicit_typename): New fn.
14290         (lookup_name_real): Use it.  Use current_class_type as the context.
14291
14292 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
14293
14294         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
14295
14296 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14297
14298         * friend.c (do_friend): Warn about non-template friends in templates.
14299
14300         * call.c (build_op_delete_call): Fix handling of inherited delete.
14301
14302         * search.c (dfs_record_inheritance): Ignore template type parms.
14303
14304 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
14305
14306         * call.c (build_new_op): Fix copy error.
14307         (build_op_new_call): New fn.
14308         (build_op_delete_call): New fn.
14309         * cp-tree.h: Declare them.
14310         * init.c (build_new): Use them.  Support placement delete.
14311         (build_x_delete): Use build_op_delete_call.
14312         (build_delete): Likewise.
14313         * decl2.c (delete_sanity): Likewise.
14314         (coerce_delete_type): Don't complain about placement delete.
14315
14316 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14317
14318         * call.c (build_new_function_call): Remove unused 'obj' parm.
14319         * cp-tree.h, typeck.c: Adjust.
14320
14321         * init.c (build_new): Make the cleanup last longer.
14322         (expand_vec_init): Call do_pending_stack_adjust.
14323
14324 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
14325
14326         * pt.c (do_type_instantiation): Fix typo.
14327         (mark_class_instantiated): If we support one_only but not weak
14328         symbols, don't mark this as known.
14329
14330         * init.c (build_new): Handle vec delete in EH cleanup.
14331
14332 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14333
14334         * call.c (build_method_call): Call complete_type before checking
14335         for destructor.
14336
14337 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
14338
14339         * decl.c (add_block_current_level): Delete.
14340         * init.c (build_vec_delete_1): Delete build_block and
14341         add_block_current_level calls.
14342
14343 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
14344
14345         * init.c (build_new): Handle freeing allocated memory when the
14346         constructor throws.
14347
14348         * call.c (build_new_method_call): Fix flags arg.
14349
14350         * pt.c (do_type_instantiation): Don't try to instantiate
14351         member templates.
14352         (mark_decl_instantiated): If we support one_only but not
14353         weak symbols, mark this one_only.
14354         * decl2.c (import_export_vtable): Don't defer handling of vtables
14355         if MULTIPLE_SYMBOL_SPACES.
14356
14357 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14358
14359         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
14360
14361 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
14362
14363         * except.c (do_pop_exception): Return a value.
14364
14365 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
14366
14367         * call.c (build_new_method_call): Handle getting a
14368         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
14369         if we got template parms.
14370         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
14371         not just the args.
14372         * decl2.c (build_expr_from_tree): Tweak last change.
14373         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
14374         (maybe_fold_nontype_arg): Split out from tsubst_copy.
14375         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
14376
14377 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
14378
14379         * pt.c (tsubst_copy): Handle explicit template arguments in
14380         function calls.
14381         * typeck.c (build_x_function_call): Likewise.
14382         * decl2.c (build_expr_from_tree): Lookup function name if it
14383         hasn't been done.
14384
14385         * pt.c (tsubst): Instantiate template functions properly when
14386         template parameter does not appear in function arguments and return
14387         type.
14388         (comp_template_args): Handle member templates required by tsubst.
14389
14390 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
14391
14392         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
14393         previous change.
14394
14395 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14396
14397         * pt.c (coerce_template_parms): Tweak error message.
14398
14399         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
14400         return type defaults to `int', even if there are storage-class
14401         specifiers.
14402
14403 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
14404
14405         Complete nested exception support.
14406         * except.c (do_pop_exception): Split out...
14407         (push_eh_cleanup): From here.  Handle the EH region by hand.
14408         (expand_start_catch_block): Add a new level for the catch parm.
14409         Move the rethrow region outside the two cleanup regions.
14410         Protect the initializer for the catch parm with terminate.
14411         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
14412         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
14413         popping off the middle of the stack.
14414         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
14415         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
14416         (build_cplus_new): Only wrap CALL_EXPRs.
14417         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
14418         the constructor call.
14419
14420 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14421
14422         * Make-lang.in (c++.distdir): Make inc subdirectory.
14423
14424 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14425
14426         * decl2.c (finish_file): Put back some code.
14427
14428 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14429
14430         * decl2.c (finish_file): Remove redundant code.
14431         * method.c (emit_thunk): Don't let the backend defer generic thunks.
14432
14433 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
14434
14435         * except.c (call_eh_info): Split out...
14436         (push_eh_info): From here.
14437         (expand_builtin_throw): Use it.
14438         (expand_start_catch_block): Move region start back.
14439
14440 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
14441
14442         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
14443         (real_yylex): Record wide strings using target endianness, not host.
14444
14445 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
14446
14447         * repo.c (rindex): Add decl unconditionally.
14448         (get_base_filename, open_repo_file): Don't cast rindex.
14449         * xref.c (rindex): Add decl unconditionally.
14450         (index): Remove unused decl.
14451         (open_xref_file): Don't cast rindex.
14452
14453 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14454
14455         * class.c (build_vbase_path): Propagate the result type properly.
14456
14457 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
14458
14459         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
14460         remaining use of saved_throw_type with a call to get_eh_type.
14461
14462 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
14463
14464         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
14465         (file_name_nondirectory): New function, doing the same as the macro.
14466         (set_typedecl_interface_info): Use it instead of the macro.
14467         (check_newline): Likewise.
14468         (handle_cp_pragma): Likewise.
14469
14470         * repo.c (get_base_filename): Cast result of rindex to char*.
14471         (open_repo_file): Likewise.
14472         * xref.c (open_xref_file): Likewise.
14473         * error.c (dump_char): Make its arg int, not char.
14474
14475         * except.c (push_eh_info): Pass the number of fields - 1 down, not
14476         the exact number of fields.
14477
14478 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14479
14480         Support for nested exceptions.
14481         * tinfo2.cc (__is_pointer): New fn.
14482         * exception.cc (struct cp_eh_info): Define.
14483         (__cp_exception_info, __uncatch_exception): New fns.
14484         (__cp_push_exception, __cp_pop_exception): New fns.
14485         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
14486         Lose empty_fndecl.
14487         (init_exception_processing): Likewise.  __eh_pc is now external.
14488         (push_eh_info): New fn.
14489         (get_eh_{info,value,type,caught}): New fns.
14490         (push_eh_cleanup): Just call __cp_pop_exception.
14491         (expand_start_catch_block): Use push_eh_info.  Start the eh region
14492         sooner.
14493         (expand_end_eh_spec): Use push_eh_info.
14494         (expand_throw): Call __cp_push_exception to set up the exception info.
14495         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
14496         when we rethrow.
14497         (expand_builtin_throw): Don't refer to empty_fndecl.
14498
14499 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
14500
14501         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
14502
14503 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
14504
14505         * method.c (build_template_parm_names, build_decl_overload_real):
14506         Add static to definitions.
14507         * pt.c (add_to_template_args, note_template_header,
14508         processing_explicit_specialization, type_unification_real): Likewise.
14509         ({determine,check}_explicit_specialization): Use a single string for
14510         error messages.
14511
14512 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
14513
14514         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
14515         (expand_end_catch_block): Likewise.
14516         (expand_end_eh_spec): Likewise.
14517
14518 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
14519
14520         * decl.c (duplicate_decls): Handle template specializations
14521         correctly.
14522         * error.c (dump_function_name): Fix printing of specializations of
14523         member functions that are not member templates.
14524         * cp-tree.h (processing_specialization): Make global.
14525         * pt.c (processing_specialization): Likewise.
14526         * lex.c (cons_up_default_function): Save and restore
14527         processing_specialization to avoid confusion.
14528
14529 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
14530
14531         * decl.c (init_decl_processing): Give null_node unknown* type.
14532         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
14533         (common_type): Likewise.
14534         * error.c (args_as_string): Recognize null_node.
14535
14536 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14537
14538         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
14539         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
14540
14541         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
14542
14543         * Make-lang.in (g++): Include prefix.o.
14544
14545 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
14546
14547         * pt.c (determine_explicit_specialization): Initialize "dummy"
14548         to keep Purify quiet.
14549
14550 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14551
14552         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
14553         (build_overload_int): Not here.
14554
14555 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
14556
14557         * class.c (build_type_pathname): Remove.
14558         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
14559
14560 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
14561
14562         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
14563         &&label GNU extension.
14564
14565 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
14566
14567         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
14568         so as to avoid incorrect manglings.
14569         * method.c (build_decl_overload_real): Don't mangle return types
14570         for constructors.
14571
14572 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14573
14574         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
14575         scratch_tree_cons): Define as macros for now.
14576         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
14577         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
14578         typeck2.c: Use them and the expression_obstack variants.
14579
14580 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14581
14582         * decl.c (store_return_init): Allow classes with explicit ctors to
14583         be used with the named return values extension.
14584
14585 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
14586
14587         * pt.c (instantiate_decl): Fix previous change.
14588
14589 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
14590
14591         * pt.c (tsubst): Fix thinko.
14592         (instantiate_decl): Really use the original template.
14593
14594         * call.c (build_new_method_call): Use simple constructor_name for
14595         error messages.
14596
14597 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
14598
14599         * method.c (build_underscore_int): Don't use ANSI specific
14600         features.
14601
14602 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
14603
14604         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
14605         for our key method; it might have been inlined by -O3.
14606
14607 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
14608
14609         * decl.c (make_typename_type): Do not try to call lookup_field for
14610         non-aggregate types.
14611
14612 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
14613
14614         * typeck.c (build_reinterpret_cast): Tweak.
14615
14616 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
14617
14618         * typeck.c (build_reinterpret_cast): Converting a void pointer
14619         to function pointer with a reinterpret_cast produces a warning
14620         if -pedantic is issued.
14621
14622 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14623
14624         * typeck.c (c_expand_return): Don't warn about returning a
14625         reference-type variable as a reference.
14626
14627 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
14628
14629         * method.c (build_static_name): Fix typo.
14630
14631 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
14632
14633         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
14634         OLDDECL before we try to do DECL_USE_TEMPLATE.
14635
14636 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14637
14638         * decl.c (duplicate_decls): Don't warn about template instances.
14639
14640         * typeck.c (mark_addressable): Lose ancient code that unsets
14641         DECL_EXTERNAL.
14642
14643         * pt.c (do_decl_instantiation): Lose support for instantiating
14644         non-templates.
14645
14646         * call.c (build_new_function_call): Fix handling of null explicit
14647         template args.
14648         (build_new_method_call): Likewise.
14649
14650 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
14651
14652         * method.c (build_underscore_int): Fix typo.
14653
14654 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
14655
14656         * tree.c (print_lang_statistics): #if 0 call to
14657         print_inline_obstack_statistics until its definition is checked in.
14658
14659 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
14660
14661         * decl2.c (finish_file): Move dump_tree_statistics to end.
14662
14663         * pt.c (instantiate_decl): Look for the original template.
14664         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
14665         of member templates.
14666
14667 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
14668
14669         * Makefile.in (g++FAQ.*): New rules.
14670         (CONFLICTS): Update.
14671         * g++FAQ.texi: Moved from libg++.
14672
14673         * parse.y (PFUNCNAME): Only specify the type once.
14674
14675 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
14676
14677         * lex.c (real_yylex): Clean up the code to fully behave the way
14678         the c-lex.c parser does for complex and real numbers.
14679
14680 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14681
14682         * method.c (build_decl_overload_real): Reformat.
14683
14684 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
14685
14686         * method.c (synthesize_method): If at_eof, determine our linkage.
14687
14688 1997-09-29  Paul Eggert  <eggert@twinsun.com>
14689
14690         * lex.c (real_yylex): Treat `$' just like `_', except issue a
14691         diagnostic if !dollars_in_ident or if pedantic.
14692
14693         * lang-specs.h (@c++): -ansi no longer implies -$.
14694
14695         * decl2.c (lang_decode_option):
14696         -traditional and -ansi now do not mess with
14697         dollars_in_ident.
14698
14699 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
14700
14701         * Makefile.in (parse.o, decl.o): Also depend on
14702         $(srcdir)/../except.h $(srcdir)/../output.h.
14703         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
14704         $(srcdir)/../except.h $(srcdir)/../output.h.
14705         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
14706         ../insn-codes.h.
14707
14708         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
14709
14710         * expr.c (cplus_expand_expr): Make it static.
14711
14712         * decl2.c, init.c, typeck.c: Include "expr.h".
14713         (expand_expr): Use proper values when calling the function.
14714
14715 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
14716
14717         * lang-options.h: New -Wold-style-cast flag.
14718         * cp-tree.h (warn_old_style_cast): New variable.
14719         * decl2.c (warn_old_style_cast): Likewise.
14720         (lang_decode_option): Support -Wold-style-cast.
14721         (reparse_absdcl_as_casts): Produce old-style-cast warning.
14722
14723 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14724
14725         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
14726         TREE_USED, reset value based on already_used.
14727
14728         * init.c (expand_member_init): Revert change.
14729
14730 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
14731
14732         * cp-tree.h, decl.c, decl2.c, pt.c:
14733         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
14734
14735         * decl2.c (lang_decode_option): Add missing ;.
14736
14737 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14738
14739         * friend.c (do_friend): Disable injection for all template-derived
14740         decls.
14741         * decl2.c (lang_decode_option): Handle -fguiding-decls.
14742         * parse.y (notype_template_declarator): New nonterminal.
14743         (direct_notype_declarator): Use it.
14744         (complex_direct_notype_declarator): Likewise.
14745         (object_template_id): Accept any kind of identifier after TEMPLATE.
14746         (notype_qualified_id): Don't add template declarators here.
14747
14748 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
14749
14750         * call.c (add_template_candidate): Add explicit_targs parameter.
14751         (build_scoped_method_call): Use it.
14752         (build_overload_call_real): Likewise.
14753         (build_user_type_conversion_1): Likewise.
14754         (build_new_function_call): Likewise.
14755         (build_object_call): Likewise.
14756         (build_new_op): Likewise.
14757         (build_new_method_call): Likewise.
14758         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
14759         (build_new_method_call): Likewise.
14760
14761         * class.c (finish_struct_methods): Add specialization pass to
14762         determine which methods were specializing which other methods.
14763         (instantiate_type): Handle TEMPLATE_ID_EXPR.
14764
14765         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
14766
14767         * cp-tree.h (name_mangling_version): New variable.
14768         (flag_guiding_decls): Likewise.
14769         (build_template_decl_overload): New function.
14770         (begin_specialization): Likewise.
14771         (reset_specialization): Likewise.
14772         (end_specialization): Likewise.
14773         (determine_explicit_specialization): Likewise.
14774         (check_explicit_specialization): Likewise.
14775         (lookup_template_function): Likewise.
14776         (fn_type_unification): Add explicit_targs parameter.
14777         (type_unification): Likewise.
14778
14779         * decl.c (duplicate_decls): Add smarts for explicit
14780         specializations.
14781         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
14782         specializations.
14783         (grokfndecl): Call check_explicit_specialization.
14784
14785         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
14786         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
14787         (check_classfn): Handle specializations.
14788
14789         * error.c (dump_function_name): Print specialization arguments.
14790
14791         * friend.c (do_friend): Don't call pushdecl for template
14792         instantiations.
14793
14794         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
14795
14796         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
14797         and -fno-guiding-decls.
14798
14799         * lex.c (identifier_type): Return PFUNCNAME for template function
14800         names.
14801
14802         * method.c (build_decl_overload_real): New function.
14803         (build_template_parm_names): New function.
14804         (build_overload_identifier): Use it.
14805         (build_underscore_int): New function.
14806         (build_overload_int): Use it.  Add levels for template
14807         parameters.
14808         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
14809         (build_overload_nested_names): Handle template type parameters.
14810         (build_template_decl_overload): New function.
14811
14812         * parse.y (YYSTYPE): New ntype member.
14813         (nested_name_specifier): Use it.
14814         (nested_name_specifier_1): Likewise.
14815         (PFUNCNAME): New token.
14816         (template_id, object_template_id): New non-terminals.
14817         (template_parm_list): Note specializations.
14818         (template_def): Likewise.
14819         (structsp): Likewise.
14820         (fn.def2): Handle member template specializations.
14821         (component_decl_1): Likewise.
14822         (direct_notype_declarator): Handle template-ids.
14823         (component_decl_1): Likewise.
14824         (direct_notype_declarator): Handle template-ids.
14825         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
14826
14827         * pt.c (processing_specializations): New variable.
14828         (template_header_count): Likewise.
14829         (type_unification_real): New function.
14830         (processing_explicit_specialization): Likewise.
14831         (note_template_header): Likewise.
14832         (is_member_template): Handle specializations.
14833         (end_template_decl): Call reset_specialization.
14834         (push_template_decl): Handle member template specializations.
14835         (tsubst): Likewise.
14836         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
14837         (instantiate_template): Handle specializations.
14838         (instantiate_decl): Likewise.
14839         (fn_type_unification): Handle explicit_targs.
14840         (type_unification): Likewise.  Allow incomplete unification
14841         without an error message, if allow_incomplete.
14842         (get_bindings): Use new calling sequence for fn_type_unification.
14843
14844         * spew.c (yylex): Handle PFUNCNAME.
14845
14846         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
14847         (really_overloaded_fn): Likewise.
14848         (get_first_fn): Handle function templates.
14849
14850         * typeck.c (build_x_function_call): Use really_overloaded_fn.
14851         Handle TEMPLATE_ID_EXPR.
14852         (build_x_unary_op): Likewise.
14853         (build_unary_op): Likewise.
14854         (mark_addressable): Templates whose address is taken are marked
14855         as used.
14856
14857 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14858
14859         * decl.c (init_decl_processing): Declare __builtin_constant_p as
14860         accepting any kind of type, not only int.
14861
14862 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
14863
14864         * search.c (get_matching_virtual): Notice virtual bases when sorrying
14865         about covariant returns.
14866
14867         * parse.y (member_init): Also imply typename here.  Remove ancient
14868         extension for initializing base members.
14869
14870 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
14871
14872         Handle multi-level typenames and implicit typename in base list.
14873         * parse.y (typename_sub{,[0-2]}): New rules.
14874         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
14875         (nonnested_type): New rule.
14876         (complete_type_name): Use it.
14877         (base_class.1): Use typename_sub and nonnested_type.
14878         (nested_name_specifier): Don't elide std:: here.
14879         * decl.c (make_typename_type): Handle getting a type for NAME.
14880         (lookup_name_real): Turn std:: into :: here.
14881
14882         Rvalue conversions were removed in London.
14883         * call.c (is_subseq): Don't consider lvalue transformations.
14884         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
14885         (joust): Re-enable ?: kludge.
14886
14887 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
14888
14889         * decl.c (start_function): Up warning of no return type to be a
14890         pedwarn.
14891
14892 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14893
14894         * init.c (expand_member_init): Don't set TREE_USED.
14895         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
14896         set,don't clear TREE_USED wholesale.
14897
14898 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
14899
14900         * call.c (build_over_call): Do require_complete_type before
14901         build_cplus_new.
14902
14903 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
14904
14905         * search.c (lookup_field): Call complete_type in all cases.
14906
14907         * decl.c (finish_function): Just warn about flowing off the end.
14908
14909 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
14910
14911         * decl.c (grokparms): Don't bash a permanent list node if we're
14912         in a function.
14913
14914 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
14915
14916         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
14917
14918 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
14919
14920         * call.c (build_new_op): Give better error for syntactically
14921         correct, but semantically invalid, use of undeclared template.
14922
14923         * call.c (compare_qual): Handle pmfs.
14924
14925         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
14926         after the exception spec.
14927
14928 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
14929
14930         * call.c (null_ptr_cst_p): Integer type, not integral type.
14931
14932         * call.c (joust): Disable warnings until they can be moved to the
14933         right place.
14934
14935 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
14936
14937         * Makefile.in, config-lang.in:  Convert to autoconf.
14938
14939 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
14940
14941         * decl.c (lookup_name_real): Add implicit 'typename' to types from
14942         base classes.
14943
14944         * pt.c (most_specialized_class): Fix typo.
14945         (tsubst): Move constant folding to TREE_VEC case.
14946
14947 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
14948
14949         * pt.c (do_poplevel): Don't warn about unused local variables
14950         while processing_template_decl since we don't always know whether
14951         or not they will need constructing/destructing.
14952
14953         * pt.c (uses_template_parms): Check the values of an enumeration
14954         type to make sure they don't depend on template parms.
14955
14956         * decl.c (make_typename_type): Don't lookup the field if the
14957         context uses template parms, even if we're not
14958         processing_template_decl at the moment.
14959
14960         * pt.c (coerce_template_parms): Avoid looking at the
14961         TYPE_LANG_DECL portion of a typename type, since there won't be
14962         one.
14963         (tsubst): Do constant folding as necessary to make sure that
14964         arguments passed to lookup_template_class really are constants.
14965
14966 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
14967
14968         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
14969         * decl2.c (finish_file): Only register exception tables if we
14970         need to.
14971
14972         * decl.c (init_decl_processing): Add __builtin_[fs]p.
14973
14974 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
14975
14976         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
14977
14978 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
14979
14980         * error.c (dump_decl): Avoid crashing when presented with a
14981         uninitialized constant, as can occur with a template parameter.
14982         (dump_expr): Make sure that there are enough levels of
14983         current_template_parms before we start diving through them.
14984
14985 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
14986
14987         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
14988         c-typeck.c.
14989
14990 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14991
14992         * except.c (expand_throw): Call build_delete for all
14993         exception types, not just objects with destructors.
14994
14995 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
14996
14997         * decl.c (current_local_enum): Remove static.
14998         * pt.c (tsubst_enum): Save and restore value of current_local_enum
14999         in case template is expanded in enum decl.
15000         (instantiate_class_template): Use new tsubst_enum signature.
15001         (tsubst_expr): Likewise.
15002
15003 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
15004
15005         * pt.c (begin_member_template_processing): Take a function as
15006         argument, not a set of template arguments.  Use the template
15007         parameters, rather than the arguments.  Handle non-type parameters
15008         correctly.  Push a binding level for the parameters so that multiple
15009         member templates using the same parameter names can be declared.
15010         (end_member_template_processing): Pop the binding level.
15011         (push_template_decl): Mark member templates as static when
15012         appropriate.
15013
15014         * lex.c (do_pending_inlines): Pass the function, not its template
15015         arguments, to begin_member_template_processing.
15016         (process_next_inline): Likewise.
15017         (do_pending_defargs): Likewise.
15018
15019         * error.c (dump_expr): Obtain the correct declaration for a
15020         TEMPLATE_CONST_PARM.
15021
15022         * call.c (add_template_conv_candidate): New function.
15023         (build_object_call): Handle member templates, as done in the other
15024         build_ functions.
15025
15026 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
15027
15028         * decl.c (replace_defag): Undo previous change.
15029         * lex.c (do_pending_defargs): Deal with member templates.
15030
15031         * pt.c (is_member_template): Avoid crashing when passed a
15032         non-function argument.
15033
15034 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
15035
15036         * class.c (grow_method): Remove check for redeclaration.
15037
15038 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
15039
15040         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
15041         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
15042         (PRIMARY_TEMPLATE_P): Use it.
15043         * call.c (build_overload_call_real): Use it.
15044         * class.c (instantiate_type): Likewise.
15045         * decl.c (decls_match): Likewise.
15046         * method.c (build_overload_identifier): Likewise.
15047         * pt.c (push_template_decl): Likewise.
15048         (classtype_mangled_name): Likewise.
15049         (lookup_template_class): Likewise.
15050
15051         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
15052         DECL_NTPARMS to conform to usage elsewhere.
15053         * call.c (add_template_candidate): Likewise.
15054         * class.c (instantiate_type): Likewise.
15055         * pt.c (instantiate_template): Likewise.
15056         (get_bindings): Likewise.
15057
15058         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
15059         is_member_template.
15060
15061         * pt.c (unify): Undo changes to allow multiple levels of template
15062         parameters.
15063         (type_unification): Likewise.
15064         (fn_type_unification): Likewise.
15065         (get_class_bindings): Likewise.
15066         * cp-tree.h (Likewise).
15067
15068         * decl.c (replace_defarg): Check that the type of the default
15069         parameter does not invlove a template type before complaining
15070         about the initialization.
15071
15072         * error.c (dump_expr): Deal with template constant parameters in
15073         member templates correctly.
15074
15075         * pt.c (is_member_template): Deal with class specializations
15076         correctly.
15077         (tsubst): Handle "partial instantiation" of member templates
15078         correctly.
15079
15080 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
15081
15082         * pt.c (type_unification): Change calling sequence to allow for
15083         multiple levels of template parameters.
15084         (tsubst_expr): Likewise.
15085         (tsubst): Likewise.
15086         (tsubst_copy): Likewise.
15087         (instantiate_template): Likewise.
15088         (unify): Likewise.
15089         * call.c (build_overload_call_real): Use it.
15090         (add_builtin_candidate): Use it.
15091         (build_new_method_call): Use it.
15092         * class.c (instantiate_type): Use it.
15093         * decl.c (grokdeclarator): Use it.
15094         * decl2.c (finish_file): Use it.
15095         * method.c (build_overload_identifier): Use it.
15096
15097         * call.c (add_template_candidate):  Add additional parameter for
15098         the function return type.  Call fn_type_unification istead of
15099         type_unification.
15100         (build_user_type_conversion_1): Handle member templates.
15101         (build_new_function_call): Likewise.
15102         (build_new_op): Likewise.
15103         (build_new_method_call): Likewise.
15104
15105         * class.c (grow_method): Don't give an error message indicating
15106         that two member templates with the same name are ambiguous.
15107         (finish_struct): Treat member template functions just like member
15108         functions.
15109
15110         * cp-tree.h (check_member_template): Add declaration.
15111         (begin_member_template_processing): Likewise.
15112         (end_member_template_processing): Likewise.
15113         (fn_type_unification): Likewise.
15114         (is_member_template): Likewise.
15115         (tsubst): Change prototype.
15116         (tsubst_expr): Likewise.
15117         (tsubst_copy): Likewise.
15118         (instantiate_template): Likewise.
15119         (get_bindings): Likewise.
15120
15121         * decl.c (decls_match): Handle multiple levels of template
15122         parameters.
15123         (pushdecl): Handle template type params just like other type
15124         declarations.
15125         (push_class_level_binding): Return immediately if the
15126         class_binding_level is NULL.
15127         (grokfndecl): If check_classfn() returns a member_template, use
15128         the result of the template, not the template itself.
15129
15130         * decl2.c (check_member_template): New function.  Check to see
15131         that the entity declared to be a member template can be one.
15132         (check_classfn): Allow redeclaration of member template functions
15133         with different types; the new functions can be specializations or
15134         explicit instantiations.
15135
15136         * error.c (dump_decl): Handle multiple levels of template
15137         parameters.
15138         (dump_function_decl): Update to handle function templates.
15139
15140         * lex.c (do_pending_inlines): Set up template parameter context
15141         for member templates.
15142         (process_next_inline): Likewise.
15143
15144         * method.c (build_overload_identifier): Adjust for multiple levels
15145         of template parameters.
15146
15147         * parse.y (fn.def2): Add member templates.
15148         (component_decl_1): Likewise.
15149
15150         * pt.c (begin_member_template_processing): New function.
15151         (end_member_template_processing): Likewise.
15152         (is_member_template): Likewise.
15153         (fn_type_unification): Likewise.
15154         (current_template_parms): Return a vector of all the template
15155         parms, not just the innermost level of parms.
15156         (push_template_decl): Deal with the possibility of member
15157         templates.
15158         (lookup_template_class): Likewise.
15159         (uses_template_parms): Likewise.
15160         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
15161         TEMPLATE_CONST_PARM to deal with multiple levels of template
15162         arguments.   Add processing of TEMPLATE_DECL to produce new
15163         TEMPLATE_DECLs from old ones.
15164         (do_decl_instantiation): Handle member templates.
15165
15166         * search.c (lookup_fnfields_1): Handle member template conversion
15167         operators.
15168
15169         * tree.c (cp_tree_equal): Check the levels, as well as the
15170         indices, of TEMPLATE_CONST_PARMs.
15171
15172         * typeck.c (comptypes): Check the levels, as well as the indices,
15173         fo TEMPLATE_TYPE_PARMs.
15174         (build_x_function_call): Treat member templates like member
15175         functions.
15176
15177 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
15178
15179         * typeck.c (c_expand_return): Always convert_for_initialization
15180         before checking for returning a pointer to local.
15181
15182         * pt.c (type_unification): If strict and the function parm doesn't
15183         use template parms, just compare types.
15184
15185 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
15186
15187         * method.c (build_overloaded_value): Replace direct call
15188         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
15189
15190 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
15191
15192         * typeck.c (convert_arguments): Don't arbitrarily choose the first
15193         of a set of overloaded functions.
15194
15195 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
15196
15197         * lex.c (real_yylex): Don't elide __FUNCTION__.
15198
15199         * method.c (build_overload_value): Add in_template parm.
15200         (build_overload_int): Likewise.
15201         (build_overload_identifier): Pass it.
15202
15203         * decl.c (duplicate_decls): Don't bash a previous template
15204         definition with a redeclaration.
15205
15206         * pt.c (unify): float doesn't match double.
15207
15208         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
15209         TYPE_DECL.  Handle getting non-template types.
15210         * parse.y (explicit_instantiation): Use typespec instead of
15211         aggr template_type.
15212
15213 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
15214
15215         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
15216
15217 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
15218
15219         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
15220         (compare_ics): Likewise.
15221
15222 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
15223
15224         * call.c (joust): Warn about choosing one conversion op over
15225         another because of 'this' argument when the other return type is
15226         better.
15227         (source_type): New fn.
15228
15229         * call.c (build_new_op): Strip leading REF_BIND from first operand
15230         to builtin operator.
15231
15232         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
15233         use its RTL.
15234
15235 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
15236
15237         * call.c (null_ptr_cst_p): Remove support for (void*)0.
15238
15239 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
15240
15241         * typeck.c (expand_target_expr): Make definition match declaration.
15242
15243         * class.c (get_basefndecls): Make definition match declaration.
15244
15245 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
15246
15247         * input.c (sub_getch): Eventually give up and release the input file.
15248
15249         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
15250         right place.
15251
15252         * call.c (joust): Tweak message.
15253
15254 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
15255
15256         * error.c (type_as_string): Put const/volatile on template type
15257         parameters where appropriate.
15258
15259 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
15260
15261         * call.c (strictly_better): Make arguments unsigned ints.
15262
15263 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
15264
15265         * lex.c (real_yylex): Refer to __complex instead of complex.
15266
15267 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
15268
15269         * lex.c (real_yylex): Don't use getc directly.
15270
15271 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
15272
15273         * call.c (is_subseq): Don't try to be clever.
15274
15275 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
15276
15277         * parse.y, pt.c: Include "except.h".
15278         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
15279         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
15280         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
15281         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
15282         prototyping.
15283
15284 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
15285
15286         * decl2.c (mark_vtable_entries): Instead of replacing pure
15287         virtuals with a reference to __pure_virtual, copy the decl and
15288         change the RTL.
15289
15290 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
15291
15292         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
15293
15294         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
15295
15296         * pt.c (instantiate_class_template): Call repo_template_used
15297         before finish_prevtable_vardecl.
15298
15299         * call.c (is_subseq): New fn.
15300         (compare_ics): Use it.
15301
15302         * repo.c (finish_repo): Don't crash on no args.
15303
15304         * parse.y (named_complex_class_head_sans_basetype): Handle
15305         explicit global scope.
15306         * decl2.c (handle_class_head): New fn.
15307
15308         * pt.c (unify): Add CONST_DECL case.
15309
15310 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15311
15312         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
15313
15314         * cp-tree.h (report_type_mismatch): Add prototype.
15315         * call.c (build_overload_call_real): Remove erroneous fourth
15316         argument to report_type_mismatch.
15317         (build_user_type_conversion_1): Remove erroneous second arg to
15318         tourney.
15319         (build_new_function_call): Likewise.
15320         (build_object_call): Likewise.
15321         (build_new_op): Likewise.
15322         (build_new_method_call): Likewise.
15323
15324 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
15325
15326         * error.c (dump_decl): Don't bother processing a function with no
15327         DECL_LANG_SPECIFIC.
15328
15329         * method.c (emit_thunk): Call init_function_start in the macro case.
15330
15331 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
15332
15333         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
15334         defined and used to set flag_vtable_thunks.
15335
15336 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
15337
15338         * parse.y: Don't clear the inlines from their obstack until they've
15339         all been processed.
15340
15341         * decl.c (duplicate_decls): Don't complain about exception
15342         specification mismatch if flag_exceptions is off.
15343
15344 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
15345
15346         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
15347
15348 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
15349
15350         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
15351         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
15352         Include <stdio.h> before include files that formerly used STDIO_PROTO.
15353
15354         * decl.c, g++spec.c, lex.c, method.c, repo.c:
15355         Include "config.h" first, as per autoconf manual.
15356
15357 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
15358
15359         * decl.c (duplicate_decls): Tweak wording.
15360         * lex.c (do_pending_defargs): Don't die if we see a default arg
15361         that isn't a DEFAULT_ARG.
15362         * error.c (dump_expr): Handle DEFAULT_ARG.
15363
15364         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
15365         * lang-options.h: Add -fhandle-exceptions.
15366
15367         * class.c (build_vtable): Vtables are artificial.
15368         (prepare_fresh_vtable): Likewise.
15369
15370 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
15371
15372         * cvt.c (ocp_convert): After converting to the target type, set
15373         LOOKUP_NO_CONVERSION.
15374
15375         * call.c (joust): Warn about potentially confusing promotion rules
15376         with -Wsign-promo.
15377         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
15378
15379 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
15380
15381         * exception.cc: Declare __terminate_func with noreturn attribute.
15382
15383 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
15384
15385         * parse.y: Break out eat_saved_input, handle errors.
15386         (function_try_block): Use compstmt instead of compstmt_or_error.
15387
15388 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
15389
15390         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
15391
15392 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
15393
15394         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
15395         existence of cc1plus check whether $(LANGUAGES) contains C++.
15396
15397 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
15398
15399         * method.c (do_build_copy_constructor): When copying an anonymous
15400         union member loop around to handle nested anonymous unions.  Use
15401         the offset of the member relative to the outer structure, not the
15402         union.
15403
15404 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
15405
15406         * call.c (resolve_args): New fn.
15407         (build_new_function_call): Use it.
15408         (build_object_call): Likewise.
15409         (build_new_method_call): Likewise.
15410
15411 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
15412
15413         * call.c (build_over_call): tsubst all default parms from templates.
15414
15415 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
15416
15417         * decl.c (struct cp_function): Add static_labelno.
15418         (push_cp_function_context): Save it.
15419         (pop_cp_function_context): Restore it.
15420
15421 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
15422
15423         * typeck.c (build_component_ref_1): Convert from reference.
15424
15425 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15426
15427         * parse.y (current_declspecs, prefix_attributes): Initialize to
15428         NULL_TREE.
15429
15430         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
15431         before we try to force it to be a TREE_LIST.
15432         (decl): Make sure $1.t is non-nil.
15433
15434 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
15435
15436         * pt.c (uses_template_parms): Handle template first-parse codes.
15437
15438         * decl.c (cp_finish_decl): Only warn about user-defined statics.
15439
15440 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
15441
15442         * pt.c (unify): Handle BOOLEAN_TYPE.
15443
15444         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
15445         * pt.c (tsubst): Don't set it.
15446         * call.c (build_over_call): Use uses_template_parms.
15447
15448 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
15449
15450         * method.c (build_overload_nested_name): Use static_labelno
15451         instead of var_labelno.
15452         (build_qualified_name): New fn.
15453         (build_overload_name): Split out from here.
15454         (build_static_name): Use build_qualified_name.
15455         * decl.c (cp_finish_decl): Statics in extern inline functions
15456         have comdat linkage.
15457         (start_function): Initialize static_labelno.
15458
15459 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15460
15461         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
15462         before "all member functions in class [] are private".
15463
15464 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
15465
15466         * lex.c (do_scoped_id): convert_from_reference.
15467         * init.c (build_offset_ref): Likewise.
15468
15469 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
15470
15471         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
15472
15473 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
15474
15475         * typeck.c (get_member_function_from_ptrfunc): Promote index
15476         before saving it.
15477
15478 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
15479
15480         * tree.c (layout_basetypes): Move non-virtual destructor warning.
15481         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
15482
15483 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
15484
15485         * decl.c (grokdeclarator): Call add_defarg_fn for the function
15486         type, too.
15487         * lex.c (add_defarg_fn): Adjust.
15488         (do_pending_defargs): Adjust.  Don't skip the first parm.
15489
15490 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
15491
15492         * decl.c (build_enumerator): Global enumerators are also readonly.
15493
15494         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
15495         (build_dynamic_cast): Call it and convert_from_reference.
15496
15497         * lex.c (add_defarg_fn): New fn.
15498         (snarf_defarg): Don't add to defarg_types.
15499         (do_pending_defargs): Lose defarg_types.  All fns we process now
15500         have defargs.
15501         * decl.c (grokfndecl): Call add_defarg_fn.
15502
15503         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
15504         * cp-tree.def: Add DEFAULT_ARG.
15505         * spew.c (yylex): Call snarf_defarg as appropriate.
15506         * parse.y: New tokens DEFARG and DEFARG_MARKER.
15507         (defarg_again, pending_defargs, defarg, defarg1): New rules.
15508         (structsp): Use pending_defargs.
15509         (parms, full_parm): Use defarg.
15510         * lex.c (init_lex): Initialize inline_text_firstobj.
15511         (do_pending_inlines): Never pass the obstack to feed_input.
15512         (process_next_inline): Call end_input instead of restore_pending_input.
15513         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
15514         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
15515         * input.c (end_input): New fn.
15516         (sub_getch): At the end of some fed input, just keep returning EOF
15517         until someone calls end_input.
15518         Remove 'obstack' field from struct input_source.
15519         * decl.c (grokparms): Handle DEFAULT_ARG.
15520         (replace_defarg): New fn.
15521         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
15522
15523 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
15524
15525         * call.c (implicit_conversion): If nothing else works, try binding
15526         an rvalue to a reference.
15527
15528 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
15529
15530         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
15531         ifndef for Cygwin32 to include SIGSEGV.
15532
15533 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
15534
15535         * class.c (finish_struct_1): Only complain about pointers without
15536         copy stuff if there are any constructors.
15537
15538         * rtti.c (build_dynamic_cast): Call complete_type on the types.
15539
15540         * decl.c (grokfndecl): If the function we chose doesn't actually
15541         match, die.
15542
15543         * decl2.c (grokclassfn): Don't specify 'const int' for the
15544         artificial destructor parm.
15545
15546         * pt.c (type_unification): If we are called recursively, nothing
15547         decays.
15548
15549 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
15550
15551         * decl.c (init_decl_processing): Stop trying to catch signals
15552         other than SIGABRT since the Cygwin32 library doesn't support
15553         them correctly yet.  This fixes a situation in which g++ causes
15554         a hang on SIGSEGVs and other such signals in our Win32-hosted
15555         tools.
15556
15557 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
15558
15559         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
15560
15561 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
15562
15563         * typeck2.c (store_init_value): Always return the value if our
15564         type needs constructing.
15565
15566         * method.c (hack_identifier): Convert class statics from
15567         reference, too.
15568
15569 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
15570
15571         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
15572
15573 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
15574
15575         * typeck.c (c_expand_return): Make sure we clean up temporaries at
15576         the end of return x;
15577
15578 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15579
15580         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
15581
15582 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
15583
15584         * except.c (expand_builtin_throw): Add support
15585         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
15586
15587 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
15588
15589         * repo.c (extract_string): Null-terminate.
15590
15591         * cp-tree.h (TI_SPEC_INFO): New macro.
15592         (CLASSTYPE_TI_SPEC_INFO): New macro.
15593         * pt.c (push_template_decl): Correctly determine # of template parms
15594         for partial specs.
15595
15596         * call.c (compare_ics): Really fix 'this' conversions.
15597
15598         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
15599         non-template fn.
15600
15601         * pt.c (push_template_decl): Complain about mismatch in # of
15602         template parms between a class template and a member template.
15603
15604 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
15605
15606         * method.c (synthesize_method): You can't call
15607         function_cannot_inline_p after finish_function.
15608         * decl.c (finish_function): Turn on flag_inline_functions and turn
15609         off DECL_INLINE before handing a synthesized method to the
15610         backend.
15611
15612 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15613
15614         * method.c (synthesize_method): Remove July 30 change to never set
15615         DECL_INLINE if at_eof.
15616
15617 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
15618
15619         * xref.c (GNU_xref_member): Ensure that the node has a
15620         decl_lang_specific part before checking DECL_FRIEND_P.
15621
15622 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
15623
15624         * pt.c (instantiate_class_template): Diagnose non-class types used
15625         as bases.
15626
15627 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
15628
15629         * typeck.c (build_conditional_expr): Use convert_for_initialization
15630         instead of convert_and_check.
15631
15632 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15633
15634         * parse.y (typespec): Don't pedwarn for typeof.
15635
15636 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
15637
15638         * repo.c (finish_repo): Only check changes if we would write a
15639         repo file.
15640
15641         * call.c (compare_ics): Fix handling of 'this' conversions.
15642
15643         * pt.c (do_decl_instantiation): Support static data too.  Rename
15644         from do_function_instantiation.
15645         * cp-tree.h: Adjust.
15646         * parse.y: Adjust.
15647
15648         * repo.c (extract_string): New fn.
15649         (get_base_filename): Use it.
15650         (init_repo): Compare old args with current args.
15651
15652 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
15653
15654         * Makefile.in, Make-lang.in: Protect C-ls with a comment
15655         character, idea from Paul Eggert <eggert@twinsun.com>.
15656
15657 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
15658
15659         * typeck.c (c_expand_return): Be more persistent in looking for
15660         returned temps.
15661
15662         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
15663         pointer to reference.
15664
15665         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
15666
15667 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
15668
15669         * init.c (build_member_call, build_offset_ref):
15670         Use do_scoped_id instead of do_identifier.
15671
15672         * cvt.c (convert): Remove bogosity.
15673
15674 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15675
15676         * cvt.c (build_up_reference): Do checks of ARGTYPE and
15677         TARGET_TYPE before trying to use get_binfo.
15678
15679 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
15680
15681         * cvt.c (build_up_reference): Call get_binfo to get access control.
15682
15683         * decl2.c (import_export_decl): If we don't support weaks, leave
15684         statics undefined.
15685
15686 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
15687
15688         * except.c (expand_builtin_throw): Add support for machines that
15689         cannot access globals after throw's epilogue when
15690         -fno-sjlj-exceptions is used.
15691
15692 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
15693
15694         * parse.y: 'std::' becomes '::'.
15695         * lex.c (real_yylex): Remove 'namespace' warning.
15696         * init.c (build_member_call): Ignore 'std::'.
15697         (build_offset_ref): Likewise.
15698         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
15699         (do_toplevel_using_decl): Ignore 'using std::whatever'.
15700         * decl.c (push_namespace): Just sorry.
15701         (pop_namespace): Nop.
15702         (init_decl_processing): Declare std namespace.
15703
15704 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
15705
15706         * search.c (push_class_decls): A name which ambiguously refers to
15707         several instantiations of the same template just refers to the
15708         template.
15709
15710 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
15711
15712         * decl.c (build_enumerator): Fix problem with unsigned long
15713         enumerated values being smashed to ints, causing overflow
15714         when computing next enumerated value (for enum values around
15715         MAX_VAL).
15716
15717 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
15718
15719         * typeck.c (build_component_ref): Only call mark_used on a decl.
15720
15721 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15722
15723         * typeck.c (build_c_cast): Make the check for a ptr to function
15724         more specific before possible default_conversion call.
15725
15726 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
15727
15728         * except.c (expand_exception_blocks): Simplify and fix and make
15729         sure we don't end a region in a sequence, as expand_end_bindings
15730         doesn't like it.
15731
15732 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
15733
15734         * except.c (init_exception_processing): Mark terminate as not
15735         returning so that the optimizer can optimize better.
15736
15737 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
15738
15739         * cvt.c (convert): Don't do any extra work, if we can avoid it
15740         easily.
15741
15742 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
15743
15744         * *.[chy]: Change cp_convert to ocp_convert, change convert to
15745         cp_convert.  convert is now reserved for the backend, and doesn't
15746         have the semantics a frontend person should ever want.
15747
15748 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
15749
15750         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
15751         Lose -traditional support.
15752
15753 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15754
15755         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
15756
15757         * parse.y (self_reference): Do it for templates, too.
15758         * class.c (pushclass): Don't overload_template_name; the alias
15759         generated by build_self_reference serves the same purpose.
15760
15761         * tree.c (list_hash): Make static, take more args.
15762         (list_hash_lookup): Likewise.
15763         (list_hash_add): Make static.
15764         (list_hash_canon): Lose.
15765         (hash_tree_cons): Only build a new node if one isn't already in the
15766         hashtable.
15767         (hash_tree_chain): Use hash_tree_cons.
15768         * cp-tree.h: Adjust.
15769         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
15770         of calling lookup_name.
15771
15772 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
15773
15774         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
15775         doesn't refer to the CONST_DECLs.
15776
15777 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
15778
15779         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
15780         is bigger.
15781         (expand_class_desc): Convert the last argument to a sizetype.
15782
15783 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15784
15785         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
15786         __real__): Add reswords.
15787         * hash.h: Regenerate.
15788         * lex.h (rid): Add RID_COMPLEX.
15789         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
15790         * lex.c (init_lex): Add building of RID_COMPLEX.
15791         (real_yylex): General cleanup in line with what c-lex.c also has,
15792         sans the cruft for traditional; add handling of SPEC_IMAG, complex
15793         types, and imaginary numeric constants.
15794         * parse.y (REALPART, IMAGPART): Add tokens.
15795         (unary_expr): Add REALPART and IMAGPART rules.
15796         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
15797         * decl.c (complex_{integer,float,double,long}_type_node): Define
15798         types.
15799         (init_decl_processing): Set up the types.
15800         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
15801         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
15802         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
15803         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
15804         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
15805         COMPLEX_TYPE case.
15806         * method.c (build_overload_name): Add handling of the different
15807         COMPLEX_TYPEs, prefixing them with `J'.
15808         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
15809         as a template parm.
15810         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
15811         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
15812         (mapcar): Handle COMPLEX_CST.
15813         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
15814         (common_type): Add code for complex types.
15815         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
15816         (convert_for_assignment): Likewise.
15817         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
15818
15819 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
15820
15821         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
15822         tsubst_expr, as it might try to do overload resolution.
15823
15824 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
15825
15826         * pt.c (instantiate_class_template): Oops.
15827
15828 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
15829
15830         * cp-tree.def: Add TAG_DEFN.
15831         * pt.c (tsubst_enum): New fn.
15832         (instantiate_class_template): Use it.
15833         (tsubst_expr): Support TAG_DEFN.
15834         (tsubst): Support local enums.
15835         (tsubst_copy): Likewise.
15836         * decl.c (finish_enum): Likewise.
15837         (start_enum): If this is a local enum, switch to permanent_obstack.
15838
15839 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
15840
15841         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
15842         (finish_function): Put the base init code for constructors just
15843         after the parm cleanup insns.
15844         (struct cp_function): Add last_parm_cleanup_insn.
15845         (pu