OSDN Git Service

* cp-tree.h (finish_function): Adjust prototype.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
2
3         * cp-tree.h (finish_function): Adjust prototype.
4         * decl.c (finish_function): Return the function compiled.
5         * pt.c (instantiate_decl): Don't play games with obstacks.
6         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
7         (search_tree): Likewise.
8         * typeck.c: Fix typo in comment.
9         * typeck2.c (store_init_value): Add comment.
10
11         * cp-tree.h (CPTI_ATEXIT): New macro.
12         (atexit_node): Likewise.
13         * decl.c (destroy_local_static): New function, broken out from ...
14         (expand_static_init): Here.
15
16         * rtti.c (get_tinfo_var): These should always be global
17         (expand_si_desc): Use tree, not RTL, functions to generate code.
18         (expand_class_desc): Likewise.
19         (expand_ptr_desc): Likewise.
20         (expand_attr_desc): Likewise.
21         (expand_generic_desc): Likewise.
22         (synthesize_tinfo_fn): Likewise.
23
24 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
25
26         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
27         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
28         RECHAIN_STMTS. 
29         (RECHAIN_STMST_FROM_CHAIN): Likewise.
30
31         * parse.y (simple_stmt): Fix typo in last change.
32
33         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
34         (STMT_IS_FULL_EXPR_P): Likewise.
35         (STMT_LINENO_FOR_FN_P): Likewise.
36         (prep_stmt): New function.
37         (building_stmt_tree): Tweak for safety.
38         * pt.c (tsubst_expr): Use prep_stmt throughout.
39         (add_tree): Move it to semantics.c
40         * semantics.c (add_tree): Move it here.
41         (finish_expr_stmt_real): New function.
42         (finish_expr_stmt): Use it.
43         (finish_if_stmt_cond): Use FINISH_COND.
44         (finish_while_stmt_cond): Likewise.
45         (finish_for_cond): Likewise.
46         (finish_stmt_tree): Tweak line-number handling.
47         (prep_stmt): New function.
48         (expand_stmt): Use it.
49         
50         * cp-tree.h (begin_switch_stmt): Adjust prototype.
51         (finish_switch_cond): Likewise.
52         * parse.y (simple_stmt): Adjust accordingly.
53         * parse.c: Regenerated.
54         * pt.c (tsubst_expr): Adjust accordingly.
55         * semantics.c (expand_cond): New function.
56         (FINISH_COND): New macro.
57         (begin_switch_stmt): Build the SWITCH_STMT here.
58         (finish_switch_stmt_cond): Not here.
59         (expand_stmt): Adjust calls to begin_switch_stmt and
60         finish_switch_cond.  Use expand_cond throughout.
61
62         * dump.c (dequeue_and_dump): Dump types for constants.
63         Describe DECL_ARG_TYPE more intuitively.
64         Handle ARRAY_REF.
65
66         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
67         (lang_cleanup_tree): Remove.
68         * lex.c (make_lang_type): Use ggc_alloc to allocate
69         TYPE_LANG_SPECIFIC.
70
71         Reorganize per-function data.
72         * cp-tree.h (saved_scope): Add function_decl, bindings.
73         (language_function): Rename binding_level to bindings.
74         (cp_function_chain): Use the current_function, not the
75         outer_function_chain.
76         (current_class_ptr): Make it work, even when there's no 
77         current function.
78         (current_class_ref): Likewise.
79         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
80         macros.
81         (clear_temp_name): Remove.
82         * decl.c (check_function_type): New function, broken out from
83         start_function.
84         (current_binding_level): Adjust definition.
85         (pushlevel): Simplify.
86         (poplevel): Don't use named_label_uses when we're outside
87         a function scope.
88         (mark_saved_scope): Mark function_decl and bindings.
89         (maybe_push_to_top_level): Don't unconditionally push a new
90         function context.  Save bindings and the current_function_decl.
91         Don't clear named_labels.
92         (pop_from_top_level): Pop function context if appropriate.
93         (init_decl_processing): Set init_lang_status and free_lang_status,
94         rather than save_lang_status and restore_lang_status.
95         (start_function): Take SF_* flags.  Don't clear per-function data.
96         Reorder and simplify to use new per-function data code.  Add
97         asserts.
98         (store_parm_decls): Don't call init_function_start here.
99         (finish_function): Adjust for new handling of per-function data.
100         (push_cp_function_context): Simplify.
101         (mark_cp_function_context): Change binding_level to bindings.
102         * decl2.c (clear_temp_name): Remove.
103         (start_objects): Use SF flags to start_function.
104         (start_static_storage_duration_function): Likewise.
105         * except.c (start_anon_func): Remove redundant calls to 
106         push_function_context_to.  Use SF flags to start function.
107         (end_anon_func): Remove redundant call to pop_function_context
108         from.
109         * lex.c (reinit_parse_for_function): Don't initialize per-function 
110         data.
111         * method.c (emit_thunk): Clear current_function after calling
112         assemble_end_function.  Use SF flags for start_function.
113         (synthesize_method): Use SF flags for start_function.
114         * parse.c: Regenerated.
115         * parse.y (fn.defpen): Likewise.
116         (pending_inline): Clear current_function, even if something goes
117         wrong.
118         * pt.c (instantiate_decl): Use SF flags to start_function.
119         Don't save and restore expanding_p.
120         (add_tree): Handle the case where we are outside any function.
121         (end_tree): Likewise.
122         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
123         * semantics.c (begin_function_definition): Likewise.
124         (expand_body): Likewise.
125         
126 1999-09-09  Nathan Sidwell  <nathan@acm.org>
127
128         * cp-tree.h (convert_to_void): Prototype new function.
129         (require_complete_type_in_void): Remove prototype.
130         * cvt.c (convert_to_void): New function.
131         (ocp_convert): Use convert_to_void.
132         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
133         expressions.
134         * typeck.c (require_complete_type_in_void): Remove function.
135         (build_compound_expr): Use convert_to_void.
136         (build_static_cast): Likewise.
137         (build_c_cast): Likewise.
138         * semantics.c (finish_expr_stmt): Do not decay full expressions.
139         
140         * typeck.c (build_x_compound_expr): Add FIXME.
141
142 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
143
144         * cp-tree.h (scratch_tree_cons): Remove.
145         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
146         and perm_tree_cons with plain tree_cons.
147         * class.c: Likewise.
148         * decl.c: Likewise.
149         * decl2.c: Likewise.
150         * except.c: Likewise.
151         * expr.c: Likewise.
152         * init.c: Likewise.
153         * lex.c: Likewise.
154         * method.c: Likewise.
155         * parse.y: Likewise.
156         * pt.c: Likewise.
157         * repo.c: Likewise.
158         * rtti.c: Likewise.
159         * search.c: Likewise.
160         * typeck.c: Likewise.
161         * parse.c: Regenerated.
162         * tree.c (build_srcloc): Simplify.
163         
164 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
165
166         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
167         Remove next.
168         (LANG_DECL_PERMANENT): Remove.
169         * decl.c (duplicate_decls): Don't mess about with obstacks trying
170         to free memory.
171         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
172         * lex.c (free_lang_decl_chain): Remove.
173         (build_lang_decl): Don't use obstacks.
174         (retrofit_lang_decl): Likewise.
175         (copy_lang_decl): Likewise.
176
177         * cp-tree.h (saved_scope): Remove old_binding_level and 
178         function_decl.  Tidy up.
179         * decl.c (mark_saved_scope): Don't set them.
180         (maybe_push_to_top_level): Clear memory.
181
182         * decl.c (layout_var_decl): Change prototype.  Don't complete
183         types for external objects.
184         (check_initializer): Likewise.  Tidy.
185         (initialize_local_var): Complete types here.
186         (cp_finish_decl): Not here.  Reorganize a little.
187         (grokvardecl): Don't complete types here.
188
189         * decl.c (start_function): Clear last_dtor_insn and
190         last_parm_cleanup_insn. 
191         (push_cp_function_context): Just copy over a little of
192         the old context, not all of it.
193
194         * cp-tree.h (copy_to_permanent): Remove.
195         (permanent_p): Likewise.
196         * decl.c (building_typename_type): Don't use copy_to_permanent.
197         (start_decl): Likewise.
198         (grok_reference_init): Likewise.
199         (cp_finish_decl): Likewise.
200         * init.c (build_new_1): Don't use mapcar.
201         (build_vec_delete_1): Don't use copy_to_permanent.
202         (build_vec_init): Likewise.
203         * parse.y (primary): Likewise.
204         * parse.c: Regenerated.
205         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
206         (lookup_template_class): Likewise.
207         (tsubst_friend_function): Likewise.
208         (instantiate_class_template): Likewise.
209         (tsubst_decl): Likewise.
210         (tsubst): Likewise.
211         (instantiate_template): Likewise.
212         (unify): Likewise.
213         * rtti.c (get_tinfo_fn): Likewise.
214         (build_dynamic_cast): Likewise.
215         * semantics.c (finish_if_stmt_cond): Likewise.
216         (finish_while_stmt_cond): Likewise.
217         (finish_do_stmt): Likewise.
218         (finish_for_cond): Likewise.
219         (finish_for_expr): Likewise.
220         (finish_cleanup): Likewise.
221         (add_decl_stmt): Likewise.
222         (finish_named_return_value): Likewise.
223         (finish_qualified_call_expr): Likewise.
224         * tree.c (perm_manip): Remove.
225         (build_exception_variant): Don't use copy_to_permanent.
226         (permanent_p): Remove.
227         (copy_to_permament): Remove.
228         (build_min_nt): Don't use copy_to_permanent.
229         (build_min): Likewise.
230         (min_tree_cons): Likewise.
231         * typeckc.c (build_static_cast): Likewise.
232         (build_reinterpret_cast): Likewise.
233         (build_const_cast): Likewise.
234         
235 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
236
237         * decl.c (ggc_p): Set it to 1.
238         (mark_saved_scope): Add prototype.
239
240 1999-09-07  Richard Henderson  <rth@cygnus.com>
241
242         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
243         * typeck.c (self_promoting_args_p): Delete.
244
245 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
246
247         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
248         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
249
250 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
251
252         * Makefile.in (tree.o): Depend on ggc.h.
253         * class.c (make_method_vec): Remove.
254         (free_method_vec): Likewise.
255         (free_method_vecs): Remove.
256         (add_method): Don't use them.
257         * cp-tree.def (PTRMEM_CST): Make it longer.
258         (TEMPLATE_PARM_INDEX): Make it shorter.
259         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
260         (template_parm_index): Remove RTL field.
261         (ptrmem_cst): Add RTL field.
262         (finish_function): Removed parameter.
263         (process_next_inline): Change prototype.
264         (init_cplus_unsave): Rename to init_tree.
265         (binding_init): Remove.
266         * decl.c (free_binding_nodes): Remove.
267         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
268         (pop_binding): Don't use free_binding_nodes.
269         (free_binding_vecs): Remove.
270         (store_bindings): Don't use them.
271         (pop_from_top_level): Likewise.
272         (lookup_namespace_name): Simplify.
273         (build_typename_type): Don't use obstack_free.
274         (unqualified_namespace_lookup): Simplify.
275         (lookup_name_real): Simplify.
276         (start_function): Remove comment about leaks.
277         (finish_function): Removed nested parameter.  Call
278         expand_end_bindings even when building_stmt_tree.
279         Call ggc_push_context and ggc_pop_context around
280         rest_of_compilation, if necessary.
281         (mark_cp_function_context): Handle a NULL language-context.
282         (lang_mark_false_label_stack): Fix typo.
283         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
284         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
285         pointer to method types.
286         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
287         * decl2.c (finish_objects): Adjust call to finish_function.
288         (finish_static_store_duration_function): Likewise.
289         (do_nonmember_using_decl): Remove call to binding_init.
290         * except.c (end_anon_func): Adjust call to finish_function.
291         * lex.c (mark_impl_file_chain): New function.
292         (init_parse): Call init_tree, not init_cplus_unsave.
293         Add GC roots.
294         (cp_pramga_interface): Use xmalloc, not permalloc.
295         (cp_pragma_implementation): Likewise.
296         (begin_definition_of_inclass_inline): Simplify.
297         (process_next_inline): Adjust prototype.
298         (do_scoped_id): Don't call binding_init.
299         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
300         * method.c (emit_thunk): Adjust call to finish_function.
301         (synthesize_method): Likewise.
302         * parse.y (%union): Add a new `pi' variant.
303         (PRE_PARSED_FUNCTION_DECL): Use it.
304         (fn.defpen): Likewise.
305         (fndef): Adjust call to finish_function.
306         * pt.c (instantiate_decl): Likewise.
307         * rtti.c (syntheisze_tinfo_fn): Likewise.
308         * semantics.c (expand_body): Likewise.
309         * tree.c: Include ggc.h.
310         (mark_list_hash): New function.
311         (binding_init): Remove.
312         (init_cplus_unsave): Rename to ...
313         (init_tree): This.  Add GC roots.
314         
315 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
316
317         Get ready for garbage collection.
318         * Makefile.in (CXX_TREE_H): Add varray.h
319         (lex.o): Depend on ggc.h.
320         (decl.o): Likewise.
321         (decl2.o): Likewise.
322         (method.o): Likewise.
323         (search.o): Likewise.
324         (pt.o): Likewise.
325         (repo.o): Likewise.
326         * class.c: Include ggc.h.
327         (current_class_name): Remove.
328         (current_class_type): Likewise.
329         (current_access_specifier): Likewise.
330         (previous_class_type): Likewise.
331         (previous_class_values): Likewise.
332         (class_cache_firstobj): Likewise.
333         (current_lang_base): Likewise.
334         (current_lang_stack): Likewise.
335         (current_lang_stacksize): Likewise.
336         (lang_name_c): Likewise.
337         (lang_name_cplusplus): Likewise.
338         (lang_name_java): Likewise.
339         (current_lang_name): Likewise.
340         (base_layout_decl): Likewise.
341         (access_default_node): Likewise.
342         (access_public_node): Likewise.
343         (access_protected_node): Likewise.
344         (access_private_node): Likewise.
345         (access_default_virtual_node): Likewise.
346         (access_public_virtual_node): Likewise.
347         (access_protected_virtual_node): Likewise.
348         (access_private_virtual_node): Likewise.
349         (signed_zero_node): Likewise.
350         (init_class_processing): Don't build base_layout_decl.
351         (push_lang_context): Adjust now that current_lang_base is a varray.
352         (pop_lang_context): Likewise.
353         * cp-tree.h: Include varray.h.
354         (cp_global_trees): Add access_default, access_public,
355         access_protected, access_private, access_default_virtual,
356         access_public_virtual, access_protected_virtual,
357         access_private_virtual, ctor_identifier, delta2_identifier, 
358         delta_identifier, dtor_identifier, in_charge_identifier,
359         index_identifier, nelts_identifier, this_identifier,
360         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
361         lang_name_c, lang_name_cplusplus, lang_name_java,
362         empty_except_spec, null, jclass, minus_one, terminate.
363         (saved_scope): Move here from decl.c.  Define globals in terms of
364         saved_scope: current_namespace, current_class_name,
365         current_class_type, current_access_specifier, current_lang_stack,
366         current_lang_base, current_lang_name, current_function_parms,
367         current_template_parms, processing_template_decl,
368         processing_specialization, processing_explicit_instantiation,
369         previous_class_type, previous_class_values, class_cache_firstobj.
370         (scope_chain): New variable.
371         (init_pt): New function.
372         * decl.c (current_namespace): Remove.
373         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
374         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
375         (delta_identifier, delta2_identifier): Likewise.
376         (pfn_or_delta2_identifier, tag_identifier): Likewise
377         (vt_off_identifier, empty_except_spec, null_node): Likewise.
378         (current_function_parms, current_lang_base): Remove.
379         (current_lang_stack, previous_class_values): Remove.
380         (class_binding_level): Macroize.
381         (saved_scope): Remove.
382         (current_saved_scope): Rename to scope_chain.
383         (mark_saved_scope): Adjust for new scope structure.
384         (maybe_push_to_top_level): Likewise.
385         (pop_from_top_level): Likewise.
386         (duplicate_decls): Adjust now that current_lang_base is a varray.
387         (build_typename_type): Call ggc_add_tree_hash_table_root.
388         (init_decl_processing): Call init_pt.  Call push_to_top_level to
389         set up globals.  Add GC roots.
390         (xref_basetypes): Adjust now that current_lang_base is a varray.
391         * decl.h (this_identifier): Remove.
392         (in_charge_identifier): Likewise.
393         * decl2.c: Don't include varray.h.
394         (current_namespace): Remove.
395         (init_decl2): Add GC roots.
396         * except.c (Terminate): Remove. 
397         (init_exception_processing): Use terminate_node instead.
398         (build_terminate_handler): Likewise.
399         * init.c (nc_nelts_field_id): Remove.
400         (minus_one): Likewise.
401         (init_init_processing): Use minus_one_node and nelts_identifier
402         instead.  Add GC roots.
403         (jclass_node): Remove.
404         (build_new_1): Use nelts_identifier.
405         (build_vec_init): Likewise.
406         (build_vec_delete): Likewise.
407         * lex.c: Include ggc.h.
408         (defarg_fn): Move declaration early.
409         (defarg_parms): Likewise.
410         (init_parse): Add GC roots.
411         (handle_cp_pragma): Remove redundant declaration of
412         pending_vtables.
413         * method.c: Include ggc.h.
414         (btypelist): Make it a varray.  All uses changed.
415         (ktypelist): Likewise.
416         (init_method): Add GC roots.
417         * pt.c: Don't include varray.h.  Include ggc.h.
418         (current_template_parms): Remove.
419         (processing_template_decl): Likewise.
420         (processing_specialization): Likewise.
421         (processing_explicit_instantiation): Likewise.
422         (init_pt): New function.
423         * repo.c: Include ggc.h.
424         (init_repo): Add GC roots.
425         * search.c: Don't include varray.h.
426         (_vptr_name): Remove.
427         (lookup_field_1): Use vtpr_identifier instead.
428         (expand_indirect_vtbls_init): Remove redundant declaration of
429         in_charge_identifier.
430         (init_search_processing): Use vptr_identifier.
431         
432 1999-09-05  Richard Henderson  <rth@cygnus.com>
433             Bernd Schmidt <bernds@cygnus.co.uk>
434             Mark Mitchell  <mark@codesourcery.com>
435
436         * Makefile.in (parse.o): Depend on ggc.h.
437         (decl2.o): Depend on ggc.h.
438         (init.o): Depend on ggc.h.
439         * cp-tree.h (init_decl2): Declare.
440         (cp_parse_init): Likewise.
441         * decl.c (ggc_p): Define to zero.
442         (mark_saved_scope): New function.
443         (init_decl_processing): Call cp_parse_init, and cp_decl2.
444         Register GC roots.
445         (expand_static_init): Add GC roots.
446         * decl2.c: Include ggc.h.
447         (init_decl2): New function.
448         * init.c: Include ggc.h.
449         (init_init_processing): Add GC roots.
450         * parse.y: Include ggc.h.
451         (cp_parse_init): New function.
452         
453 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
454
455         * decl.c (init_decl_processing): Set mark_lang_status.
456         (lang_mark_false_label_stack): Adjust prototype.
457         * decl2.c (grok_function_init): Remove extraneous declaration of
458         abort_fndecl.
459
460         * Make-lang.in (cc1plus): Remove dependency on GGC.
461         * Makefile.in (OBJS): Don't mention ggc-simple.o.
462         (OBJDEPS): Don't mention ggc-simple.o.
463
464         * Make-lang.in (cc1plus): Depend on $(GGC).
465         * Makefile.in (OBJS): Add ggc-simple.o.
466         (OBJDEPS): Likewise.
467         * cp-tree.h (language_function): Rename members to `x_' versions;
468         we now have x_named_labels, x_ctor_label, x_dtor_label,
469         x_base_init_list, x_member_init_list, x_base_init_expr,
470         x_current_class_ptr, x_current_class_ref, x_last_tree,
471         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
472         x_result_rtx. 
473         (dtor_label, ctor_label, current_base_init_list,
474         current_member_init_list, base_init_expr, current_class_ptr,
475         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
476         * decl.c: Include ggc.h.
477         (last_dtor_insn): Adjust to use x_ names.
478         (last_parm_cleanup_insn): Likewise.
479         (original_result_rtx): Likewise.
480         (named_labels): Likewise.
481         (mark_binding_level): New function.
482         (mark_cp_function_context): Likewise.
483         (mark_false_label_stack): Likewise.
484         (lang_mark_tree): Likewise.
485         (lang_cleanup_tree): Likewise.
486         
487 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
488
489         * Makefile.in (CXX_TREE_H): Include function.h.
490         (decl.o): Don't depend on function.h.
491         (decl2.o): Likewise.
492         (typeck.o): Likewise.
493         (init.o): Likewise.
494         (method.o): Likewise.
495         * cp-tree.h: Include function.h.
496         (cp_function): Rename to language_function.  Remove next.
497         (cp_function_chain): Make it a macro, not a variable.
498         (push_cp_function_context): Don't declare.
499         (pop_cp_function_context): Likewise.
500         * decl.c: Don't include function.h.
501         (push_cp_function_context): Make it static.  Make it suitable for
502         a save_lang_status callback.
503         (pop_cp_function_context): Likewise.
504         (maybe_push_to_top_level): Call push_function_context_to, not
505         push_cp_function_context.
506         (pop_from_top_level): Call pop_function_context_from, not
507         pop_cp_function_context.
508         (init_decl_processing):  Set save_lang_status and
509         restore_lang_status.  Call push_function_context_to, not
510         push_cp_function_context.
511         (cp_function_chain): Remove.
512         * decl2.c: Don't include function.h.
513         * except.c: Don't include function.h.
514         (start_anon_func): Call push_function_context_to, not
515         push_cp_function_context.
516         (end_anon_func):  Call pop_function_context_from, not
517         pop_cp_function_context.
518         * init.c: Don't include function.h.
519         * lex.c (begin_definition_of_inclass_inline): Call
520         push_function_context_to, not push_cp_function_context. 
521         (process_next_inline):  Call pop_function_context_from, not
522         pop_cp_function_context.
523         * method.c: Don't include function.h.
524         (synthesize_method): Call push_function_context_to, not
525         push_cp_function_context.  Call pop_function_context_from, not
526         pop_cp_function_context.
527         * typeck.c: Don't include function.h.
528         
529         * decl.c (expand_static_init): Tweak handling of static
530         initializations for objects without constructors.
531
532 1999-09-03  Nathan Sidwell  <nathan@acm.org>
533
534         * typeck.c (build_indirect_ref): Reject dereference of pointer to
535         void.
536
537 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
538
539         * cp-tree.h (cp_function): Move here, from decl.c.
540         (cp_function_chain): Declare.
541         (dtor_label): New macro, instead of variable.
542         (ctor_label): Likewise.
543         (current_base_init_list): Likewise.
544         (current_member_init_list): Likewise.
545         (base_init_expr): Likewise.
546         (current_class_ptr): Likewise.
547         (current_class_ref): Likewise.
548         (last_tree): Likewise.
549         (last_expr_type): Likewise.
550         (current_function_returns_value): Likewise.
551         (current_function_returns_null): Likewise.
552         (current_function_just_assigned_this): Likewise.
553         (current_function_parms_stored): Likewise.
554         (temp_name_counter): Likewise.
555         (static_labelno): Likewise.
556         (expanding_p): Likewise.
557         (stmts_are_full_exprs_p): Likewise.
558         (in_function_try_handler): Likewise.
559         (lang_type): Remove nested type_flags.  All uses changed.
560         * call.c (ctor_label): Remove.
561         (dtor_label): Likewise.
562         * class.c (current_class_ptr): Remove.
563         (current_class_ref): Likewise.
564         * decl.c (static_labelno): Remove.
565         (dtor_label): Likewise.
566         (last_dtor_insn): New macro, instead of variable.
567         (last_parm_cleanup_insn): Likewise.
568         (original_result_rtx): Likewise.
569         (in_function_try_handler): Remove.
570         (named_label_uses): New macro, instead of variable.
571         (named_labels): Likewise.
572         (current_function_returns_value): Remove.
573         (current_function_returns_null): Likewise.
574         (current_function_assigns_this): New macro, instead of variable.
575         (current_function_just_assigned_this): Likewise.
576         (current_binding_level): Likewise.
577         (init_decl_processing): Call push_cp_function_context.
578         (cp_function): Move to cp-tree.h
579         (cp_function_chain): Make it global.
580         (temp_name_counter): Remove.
581         (push_cp_function_context): Simplify.
582         (pop_cp_function_context): Likewise.
583         * decl2.c (temp_name_counter): Remove.
584         * init_c (current_base_init_list): Likewise.
585         (current_member_init_list): Likewise.
586         (base_init_expr): Likewise.
587         * method.c (static_labelno): Likewise.
588         * pt.c (last_tree): Likewise.
589         * semantics.c (expanding_p): Likewise.
590         (stmts_are_full_exprs_p): Likewise.
591         (last_expr_type): Likewise.
592         * typeck.c (dtor_label): Likewise.
593         (ctor_label): Likewise.
594         
595 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
596
597         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
598         (arg_assoc_class): Use arg_assoc_template_arg for template
599         arguments. 
600         (arg_assoc): Likewise.
601         * pt.c (mangle_class_name_for_template): Allow member template
602         template arguments.
603
604 1999-09-02  Nathan Sidwell  <nathan@acm.org>
605
606         * call.c (build_conditional_expr): Warn on enum mismatches.
607         (convert_arg_to_ellipsis): Move non-pod check to after
608         conversion.
609
610 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
611
612         * gxx.gperf (hash, is_reserved_word): Add prototypes.
613
614         * init.c (build_vec_init): Initialize variable `try_block'.
615
616         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
617         Likewise for bzero/memset.
618         (token_getch, token_put_back): Add static prototypes.  Remove
619         `inline' from the definitions.
620         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
621
622 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
623
624         * cp-tree.h (lang_type): Move align into type_flags.
625         (CLASSTYPE_ALIGN): Adjust accordingly.
626         * call.c (direct_reference_binding): Remove misleading comment.
627
628 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
629
630         * parse.y (language_string): Constify.
631
632 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
633
634         * repo.c (getpwd): Don't prototype.
635         * xref.c (getpwd): Likewise
636
637 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
638
639         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
640         Remove hacks for stuff which now comes from libiberty.
641
642 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
643
644         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
645
646 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
647
648         * cp-tree.h (begin_init_stmts): Declare.
649         (finish_init_stmts): Likewise.
650         * cvt.c (build_up_reference): Wrap the declaration of a temporary
651         in a statement-expression so that we will see it when expanding
652         tree structure later.
653         * init.c (begin_init_stmts): Don't make it static.
654         (finish_init_stmts): Likewise.
655
656         * cp-tree.h (start_handler_parms): New function.
657         (expand_start_catch_block): Take only one parameter.
658         (start_handler_parms): New function.
659         * decl.c (start_handler_parms): Define it.
660         * except.c (process_start_catch_block): Take only one parameter.
661         Don't call grokdeclarator here.
662         (expand_start_catch_block): Don't call grokdeclarator here,
663         either.
664         * parse.y (handler_args): Adjust call to
665         expand_start_catch_block.  Use start_handler_parms.
666         * pt.c (push_template_decl_real): Make permanent lists have
667         permanent elements.
668         (tsubst_expr): Adjust calls to expand_start_catch_block
669         appropriately.
670         * semantics.c (expand_stmt): Likewise.
671         
672 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
673
674         * pt.c (push_template_decl_real): Use template declaration from
675         class type if it exists.
676
677 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
678
679         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
680         (maybe_inject_for_scope_var): Declare it.
681         (initialize_local_var): Likewise.
682         * decl.c (maybe_inject_for_scope_var): Make it global.
683         (initialize_local_var): Likewise.  Move cleanup handling here,
684         from cp_finish_decl.
685         (make_rtl_for_nonlocal_decl): Use
686         push_obstacks_nochange/pop_obstacks, rather than
687         end_temporary_allocation/resume_temporary_allocation.
688         (cp_finish_decl): Try to complete the type of a variable when it
689         is declared.  Move cleanup-handling to initialize_local_var.
690         (expand_static_init): Use tree-building code, rather than
691         RTL-building code.
692         * decl2.c (get_temp_name): Assert non-initializedness of
693         temporaries.
694         * init.c (create_temporary_var): Move RTL-assigning code to ...
695         (get_temp_regvar): Here.
696         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
697         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
698         call initialize_local_var to generate initialization code.
699         
700 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
701
702         * cp-tree.h (fndecl_as_string, type_as_string,
703         type_as_string_real, args_as_string, decl_as_string,
704         expr_as_string, code_as_string, language_as_string,
705         parm_as_string, op_as_string, assop_as_string, cv_as_string,
706         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
707
708         * errfn.c (cp_printer): Likewise.
709
710         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
711         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
712         cp_file_of, code_as_string, language_as_string, parm_as_string,
713         op_as_string, assop_as_string, args_as_string, cv_as_string):
714         Likewise.
715
716         * tree.c (lang_printable_name): Likewise.
717
718 1999-08-28  Richard Henderson  <rth@cygnus.com>
719
720         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
721
722 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
723
724         * cp-tree.h (strip_array_types): New function.
725         * decl.c (maybe_deduce_size_from_array_init): New function, split
726         out from cp_finish_decl.
727         (layout_var_decl): Likewise.
728         (maybe_commonize_var): Likewise.
729         (maybe_inject_for_scope_var): Likewise.
730         (initialize_local_var): Likewise.
731         (build_cleanup_on_safe_obstack): Likewise.
732         (check_initializer): Likewise.
733         (make_rtl_for_nonlocal_decl): Likewise.
734         (cp_finish_decl): Use them.
735         * typeck.c (strip_array_types): New function.
736         
737         * cp-tree.def (LABEL_STMT): New tree node.
738         * cp-tree.h (LABEL_STMT_LABEL): New macro.
739         (shadow_label): Remove.
740         (declare_local_label): New function.
741         (finish_label_decl): Likewise.
742         * decl.c (make_label_decl): New function, split out from
743         lookup_label.
744         (shadowed_labels): Remove.
745         (binding_level): Add shadowed_labels.
746         (clear_binding_level): Remove.
747         (push_binding_level): Just bzero the new binding level.
748         (pushlevel): Fix indentation.
749         (pop_label): New function.
750         (pop_labels): Likewise, split out from poplevel.
751         (poplevel): Pop local labels.  Use pop_labels.
752         (maybe_push_to_top_level): Don't clear shadowed_labels.
753         (lookup_label): Use make_label_decl.
754         (shadow_label): Remove.
755         (declare_local_label): New function.
756         (define_label): Simplify.
757         (start_function): Don't clear shadowed_labels.
758         (cp_function): Remove shadowed_labels.
759         (push_cp_function_context): Don't save shadowed_labels.
760         (pop_cp_function_context): Don't restore it.
761         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
762         * parse.y (label_decl): Use finish_label_decl.
763         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
764         declarations.
765         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
766         building_stmt_tree.
767         (finish_label_decl): New function.
768         (expand_stmt): Handle LABEL_STMTs and local label declarations.
769         
770 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
771
772         * decl.c (lookup_label): Build labels on the permanent obstack
773         when building statement trees.  Don't build RTL for labels when
774         building statement trees.
775         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
776         building statement trees.
777         (finish_label_stmt): Likewise.
778         (expand_stmt): Adjust accordingly.
779         * pt.c (tsubst_expr); Likewise.
780         (do_decl_instantiation): Robustify.
781         
782         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
783         * tree.c (build_cplus_new): Set it.
784         * expr.c (cplus_expand_expr): Use it.
785         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
786         
787         * decl.c (store_parm_decls): Reset immediate_size_expand.
788         (finish_function): Likewise.
789         
790         * tree.c (cplus_unsave_expr_now): Don't return a value.
791
792         * semantics.c (do_poplevel): Always initialize the return value.
793
794 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
795
796         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
797         * tree.h (cplus_unsave_expr_now) : Same.
798
799 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
800
801         * decl.c (grokdeclarator): Amend comment.
802         * except.c (expand_start_catch_block): Call push_template_decl for
803         catch-block parameters.
804         * method.c (synthesize_method): Build an empty compound statement
805         for the body of a constructor.
806
807 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
808
809         * tree.c (cp_build_qualified_type_real): If we're asking for the
810         same quals we already have, just return.
811
812 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
813
814         * cp-tree.def (SUBOBJECT): New tree node.
815         * cp-tree.h (CLEANUP_P): New macro.
816         (SUBOBJECT_CLEANUP): Likewise.
817         (keep_next_level): Add parameter.
818         (get_temp_regvar): Don't declare.
819         (emit_base_init): Remove parameter.
820         (expand_aggr_init): Rename to build_aggr_init.
821         (expand_vec_init): Rename to build_vec_init.
822         (do_pushlevel): Remove.
823         (do_poplevel): Likewise.
824         (finish_cleanup): New function.
825         (finish_subobject): Likewise.
826         (stmts_are_full_exprs_p): New variable.
827         * decl.c (keep_next_level): Add parameter.
828         (cp_finish_decl): Use build_aggr_init, not
829         expand_aggr_init.  Use finish_expr_stmt to expand the code.
830         (expand_static_init): Use tree-generating, not RTL-generating,
831         functions to handle the initialization.
832         (start_function): Remove dead code.  Always have a momentary
833         obstack inside the function, even before hitting the first curly
834         brace.
835         (cplus_expand_expr_stmt): Move calls to
836         expand_{start,end}_target_temps into semantics.c.
837         (cp_function): Add stmts_are_full_exprs_p.
838         (push_cp_function_context): Save it.
839         (pop_cp_function_context): Restore it.
840         * decl2.c (get_temp_regvar): Move to init.c.
841         (do_static_initialization): Use build_{aggr,vec}_init.
842         (do_static_destruction): Fix typo in comment.
843         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
844         * except.c (expand_throw): Use create_temporary_var.
845         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
846         * init.c (expand_vec_init_try_block): Remove.
847         (expand_vec_init_catch_clause): Likewise.
848         (get_temp_regvar): New function.
849         (begin_init_stmts): Likewise.
850         (finish_init_stmts): Likewise.
851         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
852         structure here.
853         (emit_base_init): Likewise.  Remove unused parameter.
854         (expand_virtual_init): Likewise.
855         (expand_cleanup_for_base): Use finish_subobject.
856         (expand_aggr_vbase_init_1): Simplify.
857         (construct_virtual_bases): Use tree-generating functions to build
858         up initialization.
859         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
860         (expand_default_init): Likewise.
861         (expand_aggr_init_1): Likewise.
862         (expand_vec_init): Rename to build_vec_init.
863         * method.c (do_build_copy_constructor): Use tree-generating
864         functions.  Don't call clear_last_expr.
865         (do_build_assign_ref): Likewise.
866         (synthesize_method): Call clear_last_expr here.
867         * parse.y (base_init): Don't call clear_last_expr here.
868         (nodecls): Likewise.
869         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
870         * semantics.c (do_pushlevel): Move to here.
871         (do_poplevel): Likewise.
872         (stmts_are_full_exprs_p): New variable.
873         (finish_expr_stmt): Handle logic for temoprary cleanup here.
874         (finish_for_stmt): Use finish_expr_stmt.
875         (finish_cleanup): New function.
876         (finish_function_try_block): Fix indentation.
877         (finish_subobject): New function.
878         (setup_vtbl_ptr): Call keep_next_level here.
879         (finish_stmt_expr): Handle a block with no scope inside the
880         statement-expression.
881         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
882         SUBOBJECT.
883         * tree.c (search_tree): Handle INIT_EXPR.
884         (mapcar): Likewise.
885         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
886         * typeck2.c (store_init_value): Change expand_aggr_init to
887         build_aggr_init in comment.
888         
889 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
890
891         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
892
893 1999-08-25  Nathan Sidwell  <nathan@acm.org>
894
895         * decl2.c (handle_class_head): Be graceful about additional
896         scope qualifiers. Adjust comments to reflect reality.
897
898 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
899
900         * call.c (build_conditional_expr): Fix typo.
901         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
902         lvalue before trying to mess with the sides.
903
904         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
905
906 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
907
908         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
909
910 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
911
912         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
913         Return arbitrary pointer or NULL.
914         (check_eh_spec): Call __throw_type_match_rtti_2.
915         * tinfo.h (*::dcast): Return int.  Add valp parm.
916         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
917         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
918         (__throw_type_match_rtti): Now just a wrapper.
919
920         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
921         (init_exception_processing): Don't initialize them.
922
923 1999-08-23  Paul Burchard <burchard@pobox.com>
924
925         * decl.c (check_default_argument): Fix typo.
926
927 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
928
929         * cp-tree.def (STMT_EXPR): Fix typo in node name.
930
931         * dump.c (dump_next_stmt): New function.
932         (dequeue_and_dump): Use it.
933         
934         * pt.c (tsubst_copy): Make sure to initialize return value for a
935         STMT_EXPR, even when processing_template_decl.
936         * semantics.c (finish_stmt_expr): A statement-expression whose
937         last statement is not an expression-statement has type `void'.  
938         
939 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
940
941         * semantics.c (finish_stmt_expr): Fix typo in comment.
942         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
943         (mapcar): Likewise.
944         * init.c (build_vec_delete_1): Make the children of a permanent
945         BIND_EXPR permanent.
946         * pt.c (register_specialization): Don't register a specialization
947         more than once.
948         
949 1999-08-18  Andrew Haley  <aph@cygnus.com>
950
951         * method.c (process_overload_item): Call build_mangled_C9x_name ()
952         for all integer parameter types larger than long long.
953
954 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
955
956         * pt.c (redeclare_class_template): Merge default template
957         arguments in both directions.
958
959         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
960         compiler_error message.
961
962 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
963
964         * cp-tree.h: Declare flag_use_repository.
965         * pt.c (do_decl_instantiation): Don't complain about duplicate
966         instantiation with -frepo.
967         (do_type_instantiation): Likewise.
968
969         * pt.c (push_template_decl_real): Complain about everything
970         that isn't a valid template.
971
972         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
973         affect inlines.
974
975 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
976
977         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
978         * decl2.c (build_expr_from_tree): Handle it.
979         * error.c (dump_expr): Likewise.
980         * pt.c (for_each_template_parm): Likewise.
981         (tsubst_copy): Likewise.
982         * tree.c (search_tree): Likewise.
983         * semantics.c (finish_pseudo_destructor_call): Create it.
984         
985 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
986
987         * search.c (setup_class_bindings): Robustify.
988         * typeck.c (common_type): Use same_type_p, not pointer equality,
989         to compare types.
990
991         * cp-tree.h (build_lang_field_decl): Remove.
992         * class.c (build_vtable): Replace calls to build_lang_field_decl
993         with build_lang_decl.
994         (prepare_fresh_vtable): Likewise.
995         (finish_struct_1): Likewise.
996         (init_class_processing): Likewise.
997         * decl.c (push_using_decl): Likewise.
998         (init_decl_processsing): Likewise.
999         (grokvardecl): Likewise.
1000         (build_ptrmemfunc_type): Likewise.
1001         (grokdeclarator): Likewise.
1002         (build_enumerator): Likewise.
1003         * decl2.c (grok_x_components): Likewise.
1004         (do_class_using_decl): Likewise.
1005         * except.c (call_eh_info): Likewise.
1006         * init.c (init_init_processing): Likewise.
1007         * rtti.c (expand_class_decl): Likewise.
1008         * tree.c (build_base_fields): Likewise.
1009         (build_vbase_pointer_fields): Likewise.
1010         * lex.c (build_lang_decl): Build declarations on the permanent
1011         obstack if we're building statmeent trees.
1012         (retrofit_lang_decl): Handle both the full lang_decl and also the
1013         smaller lang_decl_flags here.
1014         (build_lang_field_decl): Remove.
1015         * pt.c (push_template_decl_real): Issue errors for variable
1016         declarations that are not static members.
1017
1018 1999-08-18  Richard Henderson  <rth@cygnus.com>
1019
1020         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
1021         (mapcar): Likewise.
1022
1023 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
1024
1025         * cp-tree.h (back_end_hook): New variable.
1026         * decl2.c (back_end_hook): Define it.
1027         (finish_file): If it's non-NULL, call it.
1028
1029         * decl.c (add_decl_to_level): New function.
1030         (push_local_binding): Use it.
1031         (find_binding): Fix typo in comment.
1032         (pushdecl): Use add_decl_to_level.  Put templates on the
1033         corresponding namespace-scope binding levels.
1034         * dump.c (dequeue_and_dump): Print the specializations of a
1035         template.
1036         * pt.c (push_template_decl_real): Don't push a template multiple
1037         times.
1038
1039 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
1040
1041         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
1042         (CALL_DECLARATOR_QUALS): Likewise.
1043         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
1044         * decl.c (grokdeclarator): Adjust to use them.
1045         * decl2.c (grokfield): Likewise.
1046         (reparse_absdcl_as_casts): Likewise.
1047         * lex.c (make_call_declarator): Likewise.
1048         (set_quals_and_spec): Likewise.
1049         * pt.c (tsubst): Likewise.
1050         * tree.c (mapcar): Remove special hack to handle third operand of
1051         a CALL_EXPR.
1052
1053 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
1054
1055         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
1056         * class.c (build_vtable): Use build_lang_field_decl to build the
1057         VAR_DECLs for vtables.
1058         (prepare_fresh_vtable): Likewise.
1059         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
1060         CAN_HAVE_FULL_LANG_DECL_P.
1061         (push_using_decl): Use build_lang_decl to build USING_DECLs.
1062         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
1063         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
1064         (build_lang_field_decl): Likewise.
1065         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
1066         to copy.
1067         
1068         * cp-tree.def (STMT_EXPR): New tree node.
1069         * cp-tree.h (STMT_EXPR_STMT): New macro.
1070         (store_return_init): Change prototype.
1071         (finish_named_return_value): New function.
1072         (expand_stmt): Likewise.
1073         (expand_body): Likewise.
1074         (begin_stmt_tree): Likewise.
1075         (finish_stmt_tree): Likewise.
1076         (expanding_p): New variable.
1077         (last_expr_type): Likewise.
1078         (building_stmt_tree): New macro.
1079         * decl.c (start_function): Use building_stmt_tree, not
1080         processing_template_decl, where appropriate.
1081         (store_parm_decls): Likewise.
1082         (store_return_init): Move most of the body to semantics.c.
1083         (finish_function): Use building_stmt_tree.
1084         (finish_stmt): Clear last_expr_type here.
1085         (cp_function): Add expanding_p, last_tree, last_expr_type.
1086         (push_cp_function_context): Save them.
1087         (pop_cp_function_context): Restore them.
1088         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
1089         * error.c (dump_expr): Handle STMT_EXPR.
1090         * except.c (expand_start_catch_block): Use building_stmt_tree.
1091         Use add_decl_stmt.
1092         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
1093         (do_case): Move add_tree call to semantics.c.
1094         * parse.y (return_init): Use finish_named_return_value.
1095         (for.init.statement): Use finish_expr_stmt.
1096         * parse.c: Regenerated.
1097         * pt.c (do_pushlevel): Move to semantics.c.
1098         (do_poplevel): Likewise.
1099         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
1100         (tsubst_expr): Don't expand all the way to RTL here.  Handle
1101         RETURN_INIT and CTOR_INITIALIZER.
1102         (instantiate_decl): Call expand_body after tsubst'ing into
1103         DECL_SAVED_TREE.
1104         * semantics.c (expand_stmts): New function.
1105         (expanding_p): New variable.
1106         (last_expr_type): Likewise.
1107         (finish_expr_stmt): Use building_stmt_tree.
1108         (begin_if_stmt): Likewise.
1109         (finish_if_stmt_cond): Likewise.
1110         (finish_then_clause): Likewise.
1111         (begin_else_clause): Likewise.
1112         (finish_else_clause): Likewise.
1113         (begin_while_stmt): Likewise.
1114         (finish_while_stmt_cond): Likewise.
1115         (finish_while_stmt): Likewise.
1116         (finish_do_body): Likewise.
1117         (finish_do_stmt): Likewise.
1118         (finish_return_stmt): Likewise.
1119         (begin_for_stmt): Likewise.
1120         (fnish_for_init_stmt): Likewise.
1121         (finish_for_cond): Likewise.
1122         (finish_for_expr): Likewise.
1123         (finish_for_stmt): Likewise.
1124         (finish_break_stmt): Likewise.
1125         (finish_continue_stmt): Likewise.
1126         (finish_switch_cond): Likewise.
1127         (finish_switch_stmt): Likewise.
1128         (finish_case_label): Call add_tree here if necessary.
1129         (finish_goto_statement): Use building_stmt_tree.
1130         (begin_try_block): Likewise.
1131         (begin_function_try_block): Likewise.
1132         (finish_try_block): Likewise.
1133         (finish_function_try_block): Likewise.
1134         (finish_handler_sequence): Likewise.
1135         (finish_function_handler_sequence): Likewise.
1136         (begin_handler): Likewise.
1137         (finish_handler_parms): Likewise.
1138         (finish_handler): Likewise.
1139         (begin_compound_stmt): Likewise.
1140         (finish_compound_stmt): Likewise.
1141         (finish_asm_stmt): Likewise.
1142         (finish_label_stmt): Likewise.
1143         (finish_named_return_value): New function.
1144         (setup_vtbl_ptr): Moved here from decl2.c.
1145         (do_pushlevel): Moved here from pt.c.
1146         (do_poplevel): Likewise.
1147         (begin_stmt_expr): Use building_stmt_tree.
1148         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
1149         when building_stmt_tree.
1150         (begin_stmt_tree): New function.
1151         (finish_stmt_tree): Likewise.
1152         (expand_stmt): Likewise.
1153         (expand_body): Likewise.
1154         * tree.c (build_cplus_method_type): Make sure the argument types
1155         end up on the same obstack as the METHOD_TYPE.
1156         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
1157         THROW_EXPR, STMT_EXPR.
1158         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
1159         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
1160         sorry, if an unsupported node is encountered.
1161         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
1162         (c_expand_return): Don't call add_tree here.
1163         
1164 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
1165
1166         * pt.c (check_default_tmpl_args): Don't check in local scopes.
1167         (tsubst_decl): Make sure the declaration is on a saveable
1168         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
1169         variable.
1170         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
1171         
1172 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
1173
1174         Speed up Koenig lookup.
1175         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
1176         to return namespaces we've looked at.
1177         * decl2.c (lookup_using_namespace): Likewise.
1178         (add_function): Don't call ovl_member.
1179         (lookup_arg_dependent): Initialize k.namespaces to the list of 
1180         namespaces seen in unqualified lookup.
1181         * call.c (equal_functions): Move here from tree.c.
1182         (joust): Use it to handle duplicate candidates.
1183         * tree.c (ovl_member): Use ==.
1184
1185 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
1186
1187         * cp-tree.def (DECL_STMT): Make it smaller.
1188         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
1189         (lang_decl): ... here.  Add next.
1190         (DECL_SAVED_TREE): Adjust accordingly.
1191         (DECL_IMPLICIT_TYPEDEF_P): New macro.
1192         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
1193         (DECL_STMT_DECL): Likewise.
1194         (create_implicit_typedef): New function.
1195         (maybe_push_decl): Likewise.
1196         (tsubst_default_argument): New function.
1197         (at_function_scope_p): Likewise.
1198         (add_decl_stmt): Likewise.
1199         (push_permanent_obstack): Likewise.
1200         * call.c (convert_default_arg): Use tsubst_default_argument.
1201         * class.c (add_method): Use push_permanent_obstack.
1202         (build_self_reference): Create a TEMPLATE_DECL for the
1203         self-reference, if necessary.
1204         * decl.c (pseudo_global_level_p): Only look at the current binding
1205         level.
1206         (push_binding): Use push_permanent_obstack.
1207         (create_implicit_typedef): New function.
1208         (pushtag): Use it.
1209         (duplicate_decls): Use push_permanent_obstack.
1210         (maybe_push_decl): New function.
1211         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
1212         (start_decl_1): Remove dead code.
1213         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
1214         pseudo_global_level_p.
1215         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
1216         template.
1217         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
1218         pseudo_global_level_p.
1219         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
1220         a template.
1221         (get_sentry): Use push_permanent_obstack.
1222         * dump.c (dequeue_and_dump): Enable DECL_STMT.
1223         * except.c (call_eh_info): Use push_permanent_obstack.
1224         (build_eh_type_ref): Likewise.
1225         (do_pop_exception): Likewise.
1226         (expand_eh_spec): Likewise.
1227         (alloc_eh_object): Likewise.
1228         (expand_throw): Likewise.
1229         * init.c (build_java_class_ref): Likewise.
1230         * lex.c (get_time_identifier): Likewise.
1231         (free_lang_decl_chain): Correct type.
1232         (retrofit_lang_decl): Adjust accordingly.
1233         (build_lang_field_decl): Likewise.
1234         * lex.h (free_lang_decl_chain): Likewise.
1235         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
1236         * parse.c: Regenerated.
1237         * pt.c (tsubst_default_arguments): New function.
1238         (retrieve_local_specialization): Likewise.
1239         (register_local_specialization): Likewise.
1240         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
1241         pseudo_global_level_p to determine whether or not a template is
1242         primary.
1243         (lookup_template_class): Likewise.  Use create_implicit_typedef.
1244         (instantiate_class_template): Call tsubst_default_arguments for
1245         member functions, if appropriate.
1246         (tsubst_default_argument): New function.
1247         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
1248         * search.c (at_function_scope_p): New function.
1249         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
1250         (finish_label_stmt): Likewise.
1251         (add_decl_stmt): New function.
1252         (begin_class_definition): Likewise.
1253         (finish_typeof): Likewise.
1254         * tree.c (copy_template_template_parm): Likewise.
1255         (copy_to_permanent): Likewise.
1256         (push_permanent_obstack): Define.
1257         (mark_addressable): Use it.
1258         * typeck.c (mark_addressable): Likewise.
1259         
1260 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
1261
1262         * cp-tree.h (init_cplus_unsave): New.
1263         (cplus_unsave_expr_now): New.
1264         * lex.c (init_parse): Call init_cplus_unsave.
1265         * tree.c (init_cplus_unsave): New.
1266         (cplus_unsave_expr_now): New.
1267
1268 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
1269
1270         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
1271         decl_constant_value to simplify array bounds.
1272
1273 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
1274
1275         * lang-options.h: Add -fms-extensions.
1276         * cp-tree.h: Declare flag_ms_extensions.
1277         * decl2.c: Define it.
1278         * class.c (instantiate_type): Don't complain about taking the address
1279         of a bound member function if -fms-extensions.
1280         * typeck.c (build_unary_op): Likewise.
1281         * decl.c (grokdeclarator): Or about implicit int.
1282         * init.c (resolve_offset_ref): Or about implicit '&'.
1283
1284 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
1285
1286         * cp-tree.h (minimal_parse_mode): Remove.
1287         (finish_label_stmt): New function.
1288         * decl.c (saved_scope): Remove minimal parse mode.
1289         (maybe_push_to_top_level): Don't save it.
1290         (pop_from_top_level): Don't restore it.
1291         (define_label): Split out template-handling code to semantics.c.
1292         (start_decl): Don't use minimal_parse_mode.
1293         (cp_finish_decl): Likewise.
1294         (start_function): Don't increment it.
1295         (store_return_init): Don't use it.
1296         (finish_function): Don't decrement it.
1297         * parse.y (label_colon): Use finish_label_stmt throughout.
1298         * parse.c: Regenerated.
1299         * pt.c (minimal_parse_mode): Don't define it.
1300         (tsubst_expr): Use finish_label_stmt.
1301         * semantics.c (finish_label_stmt): New function.
1302
1303         * dump.c (queue): Be careful when computing bitmasks.
1304         (dequeue_and_dump): Describe binfos as binfos, not as
1305         vectors.
1306         
1307         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
1308         throughout.     
1309         * parse.c: Regenerated.
1310         
1311         * Make-lang.in (CXX_SRCS): Remove sig.c.
1312         * Makefile.in (CXX_OBJS): Remove sig.o.
1313         (sig.o): Remove.
1314         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
1315         (CPTI_SIGNATURE_TYPE): Likewise.
1316         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
1317         (opaque_type_node): Likewise.
1318         (signature_type_node): Likewise.
1319         (sigtable_entry_type): Likewise.
1320         (flag_handle_signatures): Likewise.
1321         (lang_type): Remove is_signature, is_signature_pointer,
1322         is_signature_reference, has_opaque_typedecls,
1323         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
1324         signature_pointer_to, signature_reference_to.
1325         (IS_SIGNATURE): Remove.
1326         (SET_SIGNATURE): Remove.
1327         (CLEAR_SIGNATURE): Remove.
1328         (IS_SIGNATURE_POINTER): Remove.
1329         (IS_SIGNATURE_REFERENCE): Remove.
1330         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
1331         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
1332         (CLASSTYPE_SIGNATURE): Remove.
1333         (SIGNATURE_TYPE): Remove.
1334         (SIGNATURE_METHOD_VEC): Remove.
1335         (SIGNATURE_POINTER_TO): Remove.
1336         (SIGNATURE_REFERENCE_TO): Remove.
1337         (lang_decl_flags): Remove is_default_implementation.  Rename
1338         memfunc_pointer_to to saved_tree.
1339         (IS_DEFAULT_IMPLEMENTATION): Remove.
1340         (DECL_MEMFUNC_POINTER_TO): Remove.
1341         (DECL_MEMFUNC_POINTING_TO): Remove.
1342         (DECL_SAVED_TREE): Adjust definition.
1343         (tag_types): Remove signature_type_node.
1344         (SIGNATURE_FIELD_NAME): Remove.
1345         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
1346         (SIGNATURE_OPTR_NAME): Likewise.
1347         (SIGNATURE_SPTR_NAME): Likewise.
1348         (SIGNATURE_POINTER_NAME): Likewise.
1349         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
1350         (SIGNATURE_REFERENCE_NAME): Likewise.
1351         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
1352         (SIGTABLE_PTR_TYPE): Likewise.
1353         (SIGTABLE_NAME_FORMAT): Likewise.
1354         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
1355         (SIGTABLE_TAG_NAME): Likewise.
1356         (SIGTABLE_VB_OFF_NAME): Likewise.
1357         (SIGTABLE_VT_OFF_NAME): Likewise.
1358         (finish_base_specifiers): Change prototype.
1359         (build_signature_pointer_type): Remove.
1360         (build_signature_reference_type): Remove.
1361         (build_signature_pointer_constructor): Remove.
1362         (build_signature_method_call): Remove.
1363         (build_optr_ref): Likewise.
1364         (append_signature_fields): Likewise.
1365         (signature_error): Likewise.
1366         * call.c (build_this): Remove signature support.
1367         (build_over_call): Likewise.
1368         (build_new_method_call): Likewise.
1369         * class.c (add_implicitly_declared_members): Likewise.
1370         (finish_struct_1): Likewise.
1371         (finish_struct): Likewise.
1372         * cvt.c (cp_convert_to_pointer): Likewise.
1373         (convert_to_pointer_force): Likewise.
1374         (ocp_convert): Likewise.
1375         * decl.c (sigtable_decl_p): Remove.
1376         (init_decl_processing): Remove support for signatures.
1377         (cp_finish_decl): Likewise.
1378         (grokdeclarator): Likewise.
1379         (grokparms): Likewise.
1380         (xref_tag): Likewise.
1381         (start_function): Likewise.
1382         (start_method): Likewise.
1383         * decl2.c (finish_sigtable_vardecl): Remove.
1384         (flag_handle_signatures): Remove.
1385         (lang_f_options): Remove handle-signatures.
1386         (grokfield): Remove support for signatures.
1387         (grokbitfield): Likewise.
1388         (finish_file): Likewise.
1389         (reparse_absdcl_as_casts): Likewise.
1390         * error.c (dump_type_real): Likewise.
1391         (dump_function_decl): Likewise.
1392         * friend.c (make_friend_class): Likewise.
1393         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
1394         * hash.h: Regenerated.
1395         * init.c (build_new_1): Remove support for signatures.
1396         * lang-options.h: Remove -fhandle-signatures,
1397         -fno-handle-signatures. 
1398         * lex.c (init_parse): Remove support for signatures.
1399         (yyprint): Likewise.
1400         * lex.h (rid): Remove RID_SIGNATURE.
1401         * method.c (build_decl_overload_real): Remove support for
1402         signatures. 
1403         (hack_identifier): Likewise.
1404         * parse.y (base_class): Likewise.
1405         (base_class.1): Likewise.
1406         (access_specifier): Likewise.
1407         * search.c (lookup_member): Likewise.
1408         * semantics.c (finish_qualified_object_call_expr): Likewise.
1409         (finish_template_type_parm): Likewise.
1410         (begin_class_definition): Likewise.
1411         (finish_base_specifier): Likewise.
1412         * sig.c: Remove.
1413         * tree.c (build_cplus_method_type): Remove support for signatures.
1414         * typeck.c (require_complete_type): Likewise.
1415         (c_sizeof): Likewise.
1416         (c_alignof): Likewise.
1417         (build_object_ref): Likewise.
1418         (build_component_ref): Likewise.
1419         (build_indirect_ref): Likewise.
1420         (build_c_cast): Likewise.
1421         (build_modify_expr): Likewise.
1422         (convert_for_initialization): Likewise.
1423         * typeck2.c (signature_error): Remove.
1424         (store_init_value): Remove support for signatures.
1425         (digest_init): Likewise.
1426         (build_x_arrow): Likewise.
1427         (build_functional_cast): Likewise.
1428         * xref.c (GNU_xref_decl): Likewise.
1429         
1430 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
1431
1432         * lex.c (do_identifier): Remove unnecessary lookup of class field.
1433
1434 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
1435
1436         * decl2.c (set_decl_namespace): Do not complain about non-matching
1437         decls if processing a template.
1438
1439 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
1440
1441         * decl.c (build_ptrmemfunc_type): Handle qualified
1442         pointer-to-member types here.
1443         * tree.c (cp_build_qualified_type_real): Simplify handling here.
1444
1445 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1446
1447         * lex.c (lang_identify): Likewise.
1448
1449 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
1450
1451         * Makefile.in: Update dependencies.
1452         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
1453         NULL_RTX.
1454         * decl.c: Include "function.h"
1455         (cleanup_label, return_label): Delete declarations.
1456         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
1457         (finish_function): Rename last_parm_insn variable to
1458         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
1459         * decl2.c: Include "function.h".
1460         (rtl_expr_chain): Delete declaration.
1461         * method.c: Include "function.h"
1462         * tree.c (build_vbase_pointer_fields): Don't initialize
1463         DECL_SAVED_INSNS with NULL_RTX.
1464         * typeck.c: Include "function.h"
1465
1466 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
1467
1468         * semantics.c (begin_function_try_block, finish_function_try_block,
1469         finish_function_handler_sequence): New fns.
1470         * parse.y (function_try_block): Use them.
1471         * pt.c (instantiate_decl): Likewise.
1472
1473         * cp-tree.h: Declare in_function_try_handler.
1474         * decl.c: Define it.
1475         (start_function): Clear it.
1476         (struct cp_function, push_cp_function_context): Save it.
1477         (pop_cp_function_context): Restore it.
1478         * parse.y (function_try_block): Set and clear it.
1479         * except.c (expand_end_catch_block): Rethrow if we reach the end
1480         of a function-try-block handler in a ctor or dtor.
1481         * typeck.c (c_expand_return): Complain about returning from a
1482         function-try-block handler of a ctor.
1483
1484         * parse.y (function_try_block): Call end_protect_partials
1485         before expand_start_all_catch.
1486
1487 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
1488
1489         * decl.c (struct binding_level): Add eh_region field.
1490         (push_binding_level): Set it.
1491         (define_label): Complain about jumping into an EH block.
1492
1493         * ptree.c (print_lang_type): Print the real type of a PMF.
1494         Print what exceptions a fn type throws.
1495
1496 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1497
1498         * class.c (count_fields, add_fields_to_vec): Add static prototype.
1499
1500         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
1501         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
1502         char*.
1503
1504         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
1505         Constify a char*.
1506
1507         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
1508         char*.
1509
1510         * dump.c (queue_and_dump_index, dump_int, dump_string,
1511         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
1512         a char*.
1513         (dump_stmt): Add static prototype.
1514
1515         * errfn.c (cp_thing): Constify a char*.
1516
1517         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
1518         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
1519         dump_expr): Constify a char*.
1520
1521         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
1522         read_line_number): Add static prototype.
1523         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
1524         (real_yylex): Move label `letter' into the scope where it is used.
1525
1526         * method.c (build_mangled_template_parm_index, build_overload_int,
1527         build_decl_overload_real, get_id_2): Constify a char*.
1528
1529         * search.c (check_final_overrider): Make static.
1530
1531         * typeck.c (composite_pointer_type): Constify a char*.
1532
1533 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
1534
1535         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
1536         we're looking at a class.
1537
1538         * decl.c (lookup_name_real): Set the complain flag if we're
1539         looking for a namespace member.
1540
1541         * lex.c (real_yylex): We can have a number with no digits.
1542
1543         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
1544
1545         * search.c (binfo_from_vbase): New fn.
1546         * cp-tree.h: Declare it.
1547         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
1548         from pointer to member of virtual base.  
1549         * typeck.c (get_delta_difference): Likewise.
1550
1551 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
1552
1553         * pt.c (tsubst): Use build_index_type to build in-template array
1554         index type.  Fixes g++.oliva/dwarf1.C.
1555         * decl.c (grokdeclarator): Likewise, just for consistency, as it
1556         doesn't seem to trigger the bug without it.
1557
1558 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
1559
1560         * typeck2.c (add_exception_specifier): Use complete_type.
1561
1562 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
1563
1564         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
1565         (dump_binary_op): Bulletproof.
1566         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
1567         * tree.c (search_tree): Don't enumerate all the nodes of classes
1568         `1', `2', and `<'; handle them generically.  Don't be sorry about
1569         "unrecognized tree codes"; just abort.
1570         (no_linkage_check): Don't do linkage checks for templates.
1571         
1572         * tree.c (cp_build_qualified_type_real): Handle
1573         pointer-to-member-function types correctly.
1574
1575 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
1576
1577         * decl.c (pushdecl): Only give an error for shadowing a parm 
1578         from *this* function.
1579
1580 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
1581
1582         * typeck2.c: Update URLs and mail addresses.
1583
1584 1999-08-04  Nathan Sidwell  <nathan@acm.org>
1585
1586         * cp-tree.h (empty_except_spec): New global var.
1587         (compexcepttypes): Remove prototype.
1588         (comp_except_specs): Prototype new global function.
1589         (add_exception_specifier): Prototype new global function.
1590         * decl.c (empty_except_spec): Define new global var.
1591         (duplicate_decls): Use comp_except_specs, reword error message.
1592         (init_decl_processing): Initialize empty_except_spec.
1593         Adjust build_exception_variant calls.
1594         * parse.y (exception_specification_opt): Use empty_except_spec.
1595         (ansi_raise_identifier): Call check_for_new_type.
1596         (ansi_raise_identifiers): Use add_exception_specifier.
1597         * pt.c (tsubst): Use add_exception_specifier to build exception
1598         specifier.
1599         * search.c (check_final_overrider): New static function, broken
1600         out of get_matching_virtual. Check throw specifiers, reword
1601         diagnostics.
1602         (get_matching_virtual): Use check_final_overrider.
1603         * tree.c (build_exception_variant): Use comp_except_specs.
1604         * typeck.c (compexcepttypes): Remove.
1605         (comp_except_types): New static function, helper for
1606         comp_except_specs. Compare two types as exception specifiers.
1607         (comp_except_specs): New global function, compare two exception
1608         specifiers.
1609         (comptypes): Adjust for comp_except_specs.
1610         * typeck2.c (add_exception_specifier): New global function.
1611         
1612         * class.c (check_for_override): Reword error message.
1613
1614 1999-08-03  Nathan Sidwell  <nathan@acm.org>
1615
1616         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
1617         * cp-tree.h (struct lang_type): Added non_pod_class flag.
1618         (CLASSTYPE_NON_POD_P): New macro to access it.
1619         * class.c (finish_struct_1): Determine non-PODness.
1620         Check for arrays of pointers (-Weffc++).
1621         Remove array inspection duplicated code.
1622         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
1623         Use CLASSTYPE_NON_POD_P.
1624
1625 1999-08-03  Nathan Sidwell  <nathan@acm.org>
1626
1627         * class.c (duplicate_tag_error): Preserve template information.
1628
1629 1999-08-03  Nathan Sidwell  <nathan@acm.org>
1630
1631         * decl.c (start_enum): Show location of previous definition.
1632         * parse.y (enumlist_opt): New reduction.
1633         (structsp): Simplify enum rules to use enumlist_opt.
1634
1635 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
1636
1637         * lex.c (yyprint): Handle PFUNCNAME.
1638
1639         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
1640         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
1641
1642 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
1643
1644         * decl.c (start_decl): Set attributes before duplicate_decls call.
1645
1646 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
1647
1648         * Make-lang.in (CXX_SRCS): Add dump.c.
1649         * Makefile.in (CXX_OBJS): Add dump.o.
1650         (dump.o): New target.
1651         * cp-tree.h (DECL_CONV_FN_P): Document.
1652         (DECL_OVERLOADED_OPERATOR_P): New function.
1653         (TYPE_PTRMEM_CLASS_TYPE): New macro.
1654         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1655         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
1656         (ASM_VOLATILE_P): New macro.
1657         (STMT_LINENO): Likewise.
1658         (cp_namespace_decls): New function.
1659         (dump_node_to_file): New function.
1660         * decl.c (cp_namespace_decls): New function.
1661         (walk_namespaces_r): Use it.
1662         (wrapup_globals_for_namespace): Likewise.
1663         * decl2.c (flag_dump_translation_unit): New variable.
1664         (lang_decode_option): Handle -fdump-translation-unit.
1665         (finish_file): If flag_dump_translation_unit is set, dump the
1666         translation unit.
1667         * dump.c: New file.
1668         * lang-options.h: Add -fdump-translation-unit.
1669         * pt.c (tsubst_template_parms): Robustify.
1670         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
1671         (tsubst_expr): Use STMT_LINENO.
1672         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
1673         for invalid cv-qualifiers even while building templates.
1674         
1675 1999-08-02  Richard Henderson  <rth@cygnus.com>
1676
1677         * call.c: Include defaults.h instead of expr.h.
1678         * decl.c: Likewise.
1679         * pt.c: Likewise.
1680         * typeck.c: Include defaults.h.
1681
1682 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
1683
1684         * lex.c (errorcount, sorrycount): Don't declare.
1685         * repo.c (errorcount, sorrycount): Likewise.
1686         * typeck2.c (errorcount, sorrycount): Likewise.
1687
1688 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
1689
1690         * call.c (convert_default_arg, build_over_call): Change all uses of
1691         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
1692         Ensure expr.h is included.
1693         * decl.c (grokparams): Ditto.
1694         * pt.c (tsubst_decl): Ditto.
1695         * typeck.c (convert_arguments): Ditto.
1696
1697 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
1698
1699         * class.c (mark_overriders): Fix order of args to overrides.
1700         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
1701         functions with the same name.
1702
1703 1999-08-02  Richard Henderson  <rth@cygnus.com>
1704
1705         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
1706
1707 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
1708
1709         * call.c (build_conditional_expr): Fix typo in comment.
1710
1711 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
1712
1713         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
1714         case_stack; use in_control_zone_p.
1715         * typeck.c (c_expand_return): Likewise.
1716
1717 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
1718
1719         * except.c (catch_clauses): Delete declaration.
1720
1721 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
1722
1723         * call.c (build_conditional_expr): Call convert_from_reference to
1724         avoid reference/non-reference type confusion.  Fix typo.
1725
1726 1999-07-30  Richard Henderson  <rth@cygnus.com>
1727
1728         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
1729         * cp-tree.h (initializer_constant_valid_p): Remove.
1730
1731 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
1732
1733         * call.c (conditional_conversion): Don't build BASE_CONVs for
1734         conversions between things that have the same type.
1735         (build_conditional_expr): Tweak.
1736         (convert_like): Some BASE_CONVs really do require the generation
1737         of code.
1738         
1739         * init.c (perform_member_init): Don't go through build_modify_expr
1740         for simple initializations.
1741
1742 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
1743
1744         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
1745         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
1746         virtual functions and MI.  Simplify.
1747
1748         * method.c: Remove prototype for largest_union_member.
1749         * pt.c (determine_specialization): Fix uninitialized warning.
1750         * lex.c (real_yylex): Likewise.
1751
1752 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
1753
1754         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
1755         here too.
1756
1757         * cp-tree.h (BINFO_VIRTUALS): Document new format.
1758         * class.c (modify_one_vtable): Change prototype accordingly.
1759         (modify_all_vtables): Likewise.
1760         (modify_all_direct_vtables): Likewise.
1761         (modify_all_indirect_vtables): Likewise.
1762         (build_vtable_entry_for_fn): New function.
1763         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
1764         (modify_vtable_entry): Likewise.
1765         (add_virtual_function): Likewise.
1766         (build_vtbl_initializer): New function.
1767         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
1768         (fixup_vtable_deltas1): Likewise.
1769         (fixup_vtable_deltas): Likewise.
1770         (override_one_vtable): Likewise.
1771         (finish_struct_1): Likewise.
1772
1773         * error.c (dump_expr): Likewise.
1774         * search.c (get_abstract_virtuals_1): Likewise.
1775         (get_abstract_virtuals): Likewise.
1776         (expand_upcast_fixups): Likewise.
1777         * tree.c (debug_binfo): Likewise.
1778         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
1779         __pure_virtual here.
1780         
1781 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
1782
1783         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
1784         as per 1999-07-26 change.
1785
1786         * typeck.c (c_sizeof): Don't allow non-static data members.
1787         (expr_sizeof): Likewise.
1788
1789 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
1790
1791         * input.c (feed_input): Only touch lineno and input_filename
1792         if !USE_CPPLIB.  Save the old values before setting the new ones.
1793
1794         * input.c (feed_input): Add file, line parms.
1795         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
1796         (real_yylex): Check linemode before input_redirected().
1797
1798         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
1799         from op new to warning.
1800
1801 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
1802
1803         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
1804         * call.c: All uses changed.
1805         * typeck.c: Likewise.
1806
1807 1999-07-26  Nathan Sidwell  <nathan@acm.org>
1808
1809         * exception.cc (__cplus_type_matcher): Match __eh_matcher
1810         prototype.
1811
1812 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
1813
1814         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
1815         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
1816         (strip_top_quals): Declare.
1817         (ncp_convert): Likewise.
1818         (type_after_usual_arithmetic_converions): Likewise.
1819         (composite_pointer_type): Likewise.
1820         * call.c (strip_top_quals): Don't make it static.
1821         (promoted_arithmetic_type_p): New function.
1822         (conditional_conversion): Likewise.
1823         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
1824         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
1825         for converting a type to itself.
1826         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
1827         (implicit_conversion): Make sure the from and to types are
1828         complete.
1829         (add_builtin_candidate): Correct handling of ?: operator.
1830         (add_builtin_candidates): Improve documentation.
1831         (build_conditional_expr): New function.
1832         (can_convert): Implement in terms of can_convert_arg.
1833         (ncp_convert): New function.
1834         * typeck.c (type_after_usual_arithmetic_conversions): New
1835         function, split out from common_type.
1836         (composite_pointer_type): New function, split out from
1837         build_conditional_expr.
1838         (common_type): Use type_after_usual_arithmetic_conversions.
1839         Remove redundant attribute merging.
1840         (comptypes): Tidy.  Handle COMPLEX_TYPE.
1841         (build_binary_op_nodefault): Use null_ptr_cst_p.
1842         (build_conditional_expr): Remove.
1843         (convert_for_assignment): Use new conversion functions.
1844         
1845         * cp-tree.h (abstract_virtuals_error): Change declaration.
1846         * typeck2.c (abstract_virtuals_error): Check to see if an error
1847         ocurred, and return a boolean value accordingly.
1848         (build_functional_cast): Adjust accordingly.
1849         * class.c (finish_struct_1): Likewise.
1850         * cvt.c (ocp_convert): Likewise.
1851         * decl.c (cp_finish_decl): Likewise.
1852         (grokparams): Likewise.
1853         (grok_op_properties): Likewise.
1854         (start_function): Likewise.
1855         * init.c (build_new_1): Likewise.
1856
1857         * pt.c (unify): Don't get confused by pointers-to-member functions.
1858
1859         * search.c (build_cplus_new): Robustify.
1860         
1861 1999-07-24  Richard Henderson  <rth@cygnus.com>
1862
1863         * gxx.gperf (__builtin_va_arg): New.
1864         * parse.y (VA_ARG): New token.
1865         (unary_expr): Recognize it.
1866
1867 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
1868
1869         * g++FAQ.texi: Deleted per Joe Buck's request.
1870         * Makefile.in: Corresponding changes.
1871
1872 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
1873
1874         * lex.c: Sync with C frontend.
1875         (whitespace_cr): New fn.
1876         (skip_white_space): Use it.
1877         (init_parse): Reorder.
1878         (yyprint): Support CONSTANT.
1879         (pragma_getc, pragma_ungetc): Bring back.
1880         (read_line_number): Change in_system_header directly.
1881         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
1882         (parse_float): Update to C version.
1883         (yylex): Handle '$' under the letter case.
1884         Remove looking_for_typename handling.
1885         Support hex floating point constants.
1886         Follow C's lead for choosing type of integer constants.
1887         Rearrange stuff to match C frontend.
1888         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
1889         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
1890
1891 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
1892
1893         * call.c (reference_binding): Tweak.
1894         (mayble_handle_implicit_object): Use direct_reference_binding to
1895         create the right implicit conversion sequence.
1896
1897 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
1898
1899         * pt.c (convert_nontype_argument): Don't call decl_constant_value
1900         if we're converting to a reference type.
1901
1902         * call.c (NEED_TEMPORARY_P): New macro.
1903         (standard_conversion): Set it, for derived-to-base conversions.
1904         (reference_related_p): New function.
1905         (reference_compatible_p): Likewise.
1906         (convert_class_to_reference): Likewise.
1907         (direct_reference_binding): Likewise.
1908         (reference_binding): Rework for standards-compliance.
1909         (convert_like): Adjust accordingly.
1910         (maybe_handle_ref_bind): Simplify; the right conversion sequences
1911         are now built up in reference_binding.
1912         (initialize_reference): New function.
1913         * cp-tree.h (ICS_USER_FLAG): Document.
1914         (ICS_THIS_FLAG): Likewise.
1915         (ICS_BAD_FLAG): Likewise.
1916         (NEED_TEMPORARY_P): Likewise.
1917         (cp_lvalue_kind): New type.
1918         (real_lvalue_p): Return it.
1919         * error.c (dump_expr): Provide more accurate representation for
1920         AGGR_INIT_EXPRs.
1921         * init.c (expand_default_init): Do not try to perform implicit
1922         conversions for a brace-enclosed initializer.
1923         * search.c (lookup_conversions): Document.
1924         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
1925         appropriately.
1926         (real_lvalue_p): Adjust accordingly.
1927         (lvalue_p): Likewise.
1928         (build_cplus_new): Don't allow the creation of an abstract class.
1929         * typeck.c (convert_for_initialization): Use initialize_reference.
1930         
1931 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
1932
1933         * lex.c (real_yylex) : Correct the test for overflow when lexing
1934         integer literals.
1935
1936 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
1937
1938         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
1939         not DECL_BUILT_IN, to determine if a function is internally declared.
1940         (duplicate_decls): Likewise.  Improve handling of builtins.
1941         (push_overloaded_decl): Remove special handling of builtins.
1942
1943         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
1944
1945         * decl.c (grokdeclarator): Pull out decl_constant_value in
1946         templates, too.
1947
1948         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
1949         * cp-tree.h, pt.c, semantics.c: Adjust.
1950         * method.c (largest_union_member): Remove.
1951
1952         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
1953
1954         * lex.c (token_getch, token_put_back): New fns.
1955         (real_yylex): Use them.
1956
1957         * lex.c (lang_init): Generalize.
1958         (lang_init_options): Tell cpplib this is C++.
1959         (nextchar): Remove.  Replace uses with put_back.
1960         (skip_white_space): Handle linemode here.  Optimize for cpplib.
1961         (extend_token_buffer_to): New fn.
1962         (extend_token_buffer): Use it.
1963         (read_line_number, check_newline): Just deal with tokens.
1964         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
1965         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
1966         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
1967         * parse.y (PAREN_STAR_PAREN): Remove.
1968         * input.c: Don't use the putback machinery with cpplib.
1969         (sub_getch): Fold back into getch.
1970         (getch): Don't handle linemode here.
1971         (feed_input): Unget any text in the token buffer.
1972
1973         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
1974         nextyychar, nextyylval): Remove.
1975
1976 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
1977             Jason Merrill  <jason@yorick.cygnus.com>
1978
1979         * lex.c (indent_level): New variable.
1980         (init_parse): Set cpp_token to CPP_DIRECTIVE.
1981         (consume_string): Make this smart about USE_CPPLIB.
1982         (yyungetc): Use put_back function.
1983         (pragma_getc, pragma_ungetc): Functions deleted.
1984         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
1985         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
1986         pragma_ungetc.
1987         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
1988         Also, clean up cases where we redundantly set token_buffer[0].
1989         (read_line_number): New fn.
1990         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
1991         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
1992         (sub_getch): Conditionalize out code that's not appropriate if
1993         USE_CPPLIB.
1994         (put_back): Rewrite in case USE_CPPLIB is defined.
1995         (input_redirected): Ditto.
1996
1997 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
1998
1999         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
2000         c_global_trees and accessor macros defined in c-common.h.
2001         (cp_tree_index): New enumeration.
2002         (cp_global_trees): Declare new array.  Add accessor macros for it, and
2003         delete declarations of tree nodes replaced by it.
2004         (builtin_function): Delete macro, add declaration for new function.
2005         Include c-common.h.
2006         * decl.c: Delete definitions for tree nodes that were replaced by
2007         cp_global_trees and c_global_trees.
2008         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
2009         to generate the common builtins here.
2010         (builtin_function): New function.
2011         * decl2.c (abort_fndecl): Delete declaration.
2012         * except.c (expand_builtin_return_address): Delete declaration.
2013         (builtin_return_address_fndecl): Delete variable.
2014         (const_ptr_type_node): Delete declaration.
2015         * lex.c (cons_up_default_function): Delete declaration of
2016         void_list_node.
2017         * parse.y (void_list_node): Delete declaration.
2018         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
2019         Delete variables.
2020         (const_string_type_node): Delete declaration.
2021         * search.c (abort_fndecl): Delete declaration.
2022         * Makefile.in: Update dependencies.
2023
2024 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
2025
2026         * pt.c (check_default_tmpl_args): Move test for missing default
2027         arguments here, from ...
2028         (end_template_parm_list): Here.
2029
2030 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
2031
2032         * decl.c (lookup_nested_type): Remove.
2033         (pushtag): Don't call it.
2034
2035 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
2036
2037         * Makefile.in (INTERFACE): Bump to 2.
2038
2039 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
2040         
2041         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
2042         instructions to gcc.gnu.org.  Removed e-mail address.
2043
2044 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
2045
2046         * pt.c (determine_specialization): Tighten error-checking.
2047         (end_template_parm_list): Likewise.
2048
2049 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
2050
2051         * pt.c (check_default_tmpl_args): Handle friends defined in the
2052         class just like member functions defined in the class.
2053
2054 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
2055             Jason Merrill  <jason@yorick.cygnus.com>
2056
2057         * cp-tree.h (struct lang_decl): Added field for storing sorted
2058         FIELD_DECLs (used in TYPE_DECLs).
2059         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
2060         (DECL_SORTED_FIELDS): New macro.
2061         * class.c (method_name_cmp): New function.
2062         (finish_struct_methods): Modified to support sorting and searching
2063         methods.
2064         (finish_struct_anon): Changed code in inner loop to use ELT rather 
2065         than UELT (which required an extra indirection for every reference).
2066         (field_decl_cmp): New function to support sorting FIELD_DECLs.
2067         (finish_struct_1): Sort fields.
2068         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
2069         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
2070         Also, switch to using array indexing rather than a changing pointer.
2071         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
2072         DECL_SORTED_FIELDS.
2073
2074 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
2075
2076         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
2077         casts in system headers or extern "C" blocks.
2078
2079         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
2080         errors to pedwarn.
2081
2082 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
2083
2084         * decl2.c (write_virtuals): Deleted declaration.
2085         * cp-tree.h (write_virtuals): Deleted extern declaration.
2086         * class.c (finish_struct_1): Removed #if 0'd code that mentions
2087         write_virtuals.
2088         * semantics.c (begin_class_definition): Rewrite code to not depend
2089         on write_virtuals.
2090
2091         * lex.c (cp_pragma_interface): New function.
2092         (cp_pragma_implementation): Likewise.
2093         (handle_cp_pragma): Call them.
2094
2095         * typeck.c (comptypes): Simplify C code in look_hard.
2096
2097         * xref.c (PALLOC): Use xcalloc, not calloc.
2098         (SALLOC): Use xmalloc, not malloc.
2099
2100         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
2101
2102         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
2103         is NO_DEBUG.
2104
2105         * decl.c (duplicate_decls): If a redeclaration doesn't match the
2106         initial declaration, then don't save the inline info and by all
2107         means don't mark the function as a builtin function.
2108
2109         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
2110         CURRENT_CLASS_TYPE is 0.
2111
2112         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
2113         NULL_TREE.
2114
2115         * ptree.c (print_lang_type): Added vtable-needs-writing.
2116
2117 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
2118
2119         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
2120
2121 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
2122
2123         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
2124         Merged into c-common.
2125
2126 1999-07-05  Dave Brolley  <brolley@cygnus.com>
2127
2128         * lex.c (errorcount): Declare it.
2129         (finish_parse): Update errorcount for when using CPPLIB.
2130
2131 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
2132
2133         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
2134         parameters.
2135         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
2136         * decl.c (push_class_binding): Use it.
2137         (lookup_name_real): Likewise.
2138
2139 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
2140
2141         * cp-tree.h (widest_integer_literal_type_node,
2142         widest_unsigned_literal_type) : New.
2143         * decl.c (widest_integer_literal_type_node,
2144         widest_unsigned_literal_type) : New.
2145         (init_decl_processing): Handle/use the two new types.
2146         * lex.c (real_yylex): Same.
2147         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
2148         Same. 
2149
2150 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
2151
2152         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
2153         to anonymous cv-qualified types.
2154
2155 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
2156
2157         * lex.c (real_yylex) : Change integer literal overflow handling to
2158         be like c-lex.c.
2159
2160         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
2161
2162 1999-06-28  Richard Henderson  <rth@cygnus.com>
2163
2164         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
2165
2166 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
2167
2168         * error.c (dump_type_real): Handle TREE_LIST again.
2169
2170         * typeck.c (comp_target_parms): Don't complain about 
2171         converting from () to (...) if !flag_strict_prototype.
2172
2173         * decl.c (grokdeclarator): Update the names of all variants when
2174         de-anonymizing.
2175
2176 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
2177
2178         * init.c (expand_aggr_vbase_init): Rename to
2179         construct_virtual_bases.  Conditionalize construction here, 
2180         rather than ...
2181         (emit_base_init): Here.
2182
2183 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
2184
2185         * semantics.c (finish_asm_statement): Apply decay conversions to
2186         input operands.
2187
2188         * decl.c (expand_static_init): When building an anonymous function
2189         for use with atexit, compute its body before and after entering
2190         the function.
2191
2192         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
2193         EXIT_EXPR.
2194         
2195 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
2196
2197         * init.c (expand_aggr_vbase_init): Add flag parameter.
2198         (build_partial_cleanup_for): Remove, inlining into ..
2199         (expand_cleanup_for_base): ... here.  Take flag parameter.
2200         (emit_base_init): Pass the in_chrg parameter to
2201         emit_aggr_vbase_init. 
2202         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
2203         
2204 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
2205
2206         * decl2.c (import_export_decl): Use same_type_p, rather than
2207         relying on pointer-equality for types.
2208
2209         * method.c (do_build_copy_constructor): Simplify.
2210
2211         * call.c (build_method_call): Remove bogus code for two-argument
2212         delete.
2213         * init.c (build_new_1): Expand on comment, and remove dead code.
2214
2215         * init.c (expand_cleanup_for_base): New function, split out
2216         from ...
2217         (emit_base_init): Here.
2218         (expand_aggr_vbase_init): Use it.
2219
2220 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
2221
2222         * cp-tree.h (class_cache_firstobj): Declare.
2223         (maybe_push_cache_obstack): Rename to push_cache_obstack.
2224         * class.c (permanent_obstack): Remove declaration.
2225         (class_cache_firstobj): Make it global.
2226         (add_method): Don't use permanent_obstack directly.
2227         (pushclass): Only free the class_cache_obstack if we know how far
2228         back to free it.
2229         (maybe_push_cache_obstack): Rename to push_cache_obstack.
2230         * decl.c: Remove dead comment.
2231         (saved_scope): Add class_cache_firstobj.
2232         (push_to_top_level): Save it.
2233         (pop_from_top_level): Restore it.
2234         (push_class_level_binding): Use push_cache_obstack, not
2235         maybe_push_cache_obstack.
2236         * search.c (push_class_decls): Likewise.
2237         
2238 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
2239
2240         * pt.c (tsubst_friend_function): Push into namespace of friend
2241         function before pushdecl'ing it.
2242
2243 1999-06-14  Nathan Sidwell  <nathan@acm.org>
2244
2245         * call.c (build_new_op): Remove REF_BIND from all operands.
2246
2247 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
2248
2249         * init.c (build_new_1): Look up operator delete even if there was
2250         no explicit new placement.
2251
2252 1999-06-08  Nathan Sidwell  <nathan@acm.org>
2253
2254         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
2255         of ...
2256         (build_throw): ... here. Call it.
2257         (process_start_catch_block): Call it.
2258
2259 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
2260
2261         * search.c (convert_pointer_to_single_level): Reimplement without
2262         using get_binfo.
2263
2264 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
2265
2266         * method.c (is_back_referenceable_type): Back-reference bools when
2267         not squangling.
2268
2269 1999-06-07  Dave Brolley  <brolley@cygnus.com>
2270
2271         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
2272         * input.c (putback_buffer): New structure type.
2273         (putback): Replaces putback_char member.
2274         (putback): Replaces putback_char static variable.
2275         (feed_input): Use putback.
2276         (end_input): Use putback.
2277         (sub_getch): Use putback.
2278         (put_back): Use putback.
2279
2280 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
2281
2282         * decl.c (grokdeclarator): Fix typo in last change.
2283
2284 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
2285
2286         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
2287         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
2288
2289 1999-06-04  Nathan Sidwell  <nathan@acm.org>
2290
2291         * except.c (build_throw): Check throw expression validity.
2292
2293 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
2294
2295         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
2296         just because flag_signed_bitfields is false.
2297
2298 1999-06-03  Nathan Sidwell  <nathan@acm.org>
2299
2300         * semantics.c (begin_class_definition): Update the struct's
2301         location here ...
2302         * class.c (finish_struct): ... rather than here.
2303
2304         * decl.c (make_typename_type): Don't rely on uninitialized
2305         variable.
2306
2307 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2308
2309         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
2310
2311 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
2312
2313         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
2314         and friends rather than messing with current_obstack directly.
2315         (cp_build_qualified_type_real): Rework ARRAY_TYPE
2316         allocation to match practice throughout the rest of the 
2317         compiler.
2318
2319 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
2320
2321         * lex.c (make_lang_type): Create TYPE_BINFO for
2322         TEMPLATE_TYPE_PARMs just like for non-template types.
2323
2324         * decl.c (start_decl): Move checks on initialization to ...
2325         (cp_finish_decl): Here.  Tidy formatting slightly.
2326
2327 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
2328
2329         * decl.c (add_binding): Don't complain about a redeclaration of a
2330         semantically identical typedef in a local scope.
2331
2332 1999-05-28  Nathan Sidwell  <nathan@acm.org>
2333
2334         * decl.c (complete_array_type): Allocate off same obstack. Fix
2335         DO_DEFAULT comment to match reality.
2336
2337         * friend.c (make_friend_class): Fix diagnostic typo.
2338
2339 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
2340
2341         * decl.c (lookup_namespace_name): Handle getting a
2342         TEMPLATE_ID_EXPR.
2343         (expand_static_init): Don't call pushdecl for implicitly declared
2344         `atexit' used to register destructors.
2345
2346 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
2347
2348         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
2349         intialize a vtable.
2350
2351         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
2352         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
2353         by combining TEMPLATE_INFO and LEVEL into a single union.
2354         (DECL_TEMPLATE_INFO): Reformat.
2355         (DECL_SAVED_TREE): Document.
2356         (DECL_TEMPLATE_INJECT): Remove.
2357         * class.c (finish_struct): Remove code to deal with
2358         DECL_TEMPLATE_INJECT. 
2359
2360         * decl.c (maybe_process_template_type_declaration): Handle all new
2361         types in templates uniformly.
2362         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
2363         DECL_CONTEXT.
2364         * pt.c (lookup_template_class): Inject template instantiations of
2365         forward-declarations.
2366         (instantiate_class_template): Remove code processing
2367         DECL_TEMPLATE_INJECT.
2368         
2369         * pt.c (lookup_template_class): Tweak lookup to find member
2370         templates.
2371
2372         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
2373         ASM_CV_QUAL.
2374         * semantics.c (finish_asm_stmt): Make strings permanent if they're
2375         used in a template.
2376         
2377 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
2378
2379         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
2380         parts of pointer to data member types.
2381
2382 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
2383
2384         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
2385         and then make it look like `abort'.  Just use `abort' instead.
2386         
2387         * typeck.c (build_static_cast): Don't allow static_casts that cast
2388         away constness.
2389         (casts_away_constness_r): New function.
2390         (casts_away_constness): Likewise.
2391
2392         * decl.c (lookup_tag): Remove code no longer needed after
2393         name-lookup improvements.
2394         * decl2.c (handle_class_head): Make error-recovery more robust.
2395         * friend.c (make_friend_class): Reject templated typename types.
2396         * lex.c (is_global): A template parameter isn't global.
2397         * parse.y (class_head): Robustify.
2398         * parse.c: Regenerated.
2399         
2400 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
2401
2402         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
2403         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
2404         
2405         * cp-tree.h (push_nested_namespace): Declare.
2406         (pop_nested_namespace): Likewise.
2407         * decl.c (push_nested_namespace): New function.
2408         (pop_nested_namespace): Likewise.
2409         * pt.c (instantiate_class_template): Use them.
2410
2411         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
2412
2413         * cp-tree.h (cplus_expand_constant): Declare.
2414         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
2415         converted from one pointer-to-object type to another.
2416         * expr.c (cplus_expand_constant): Don't make it static.
2417         * typeck.c (build_component_ref): Don't crash when presented with
2418         a component which is a TEMPLATE_DECL.
2419         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
2420         cast from a pointer-to-member constant to its own type does not
2421         result in a valid non-type template argument.
2422
2423 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
2424             Nathan Sidwell  <nathan@acm.org>
2425         
2426         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
2427         * cp-tree.h: Fix typo in documentation on pointers-to-members.
2428         (cp_build_qualified_type): Make it a macro.
2429         (cp_build_qualified_type_real): Declare.
2430         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
2431         problem with template parameters and restrict-qualification.
2432         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
2433         * hash.h: Regenerated.
2434         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
2435         the enumeration.
2436         (NORID): Remove definition.
2437         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
2438         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
2439         (fn_type_unification): Check that the function type resulting from
2440         the deduction is legal.
2441         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
2442         (unify): Use cp_build_qualified_type_real.
2443         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
2444         (cp_build_qualified_type): Rename to ...
2445         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
2446         and modify appropriately.
2447         
2448         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
2449         reveal optimization opportunities.
2450
2451         * pt.c (tsubst): Don't issue error messages when we're not
2452         complaining, even if we see a qualified function type.
2453         (check_cv_quals_for_unify): Don't allow a qualified function
2454         type.
2455
2456 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
2457
2458         * class.c (instantiate_type): Downgrade errors for object-dependent
2459         memfn refs to pedwarn.
2460
2461 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
2462
2463         * decl.c (grokdeclarator): Don't treat [] as indicating a
2464         zero-sized array in a typedef.
2465
2466         * call.c (build_object_call): Don't look at DECL_NAME for a type.
2467         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
2468         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
2469
2470         * pt.c (for_each_template_parm): Rework to match documentation.
2471         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
2472
2473 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
2474
2475         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
2476
2477         * class.c (finish_base_struct): Allow non-COM bases for COM classes
2478         except at the leftmost position.
2479         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
2480         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
2481         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
2482
2483         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
2484         (build_cplus_new): Make sure that what we return is of the right type.
2485
2486 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
2487
2488         * cp-tree.h (make_ptrmem_cst): New function.
2489         * expr.c (cplus_expand_constant): Split out from ...
2490         (cplus_expand_expr): Here.  Use cplus_expand_constant.
2491         (init_cplus_expand): Set lang_expand_constant.
2492         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
2493
2494         * tree.c (make_ptrmem_cst): Define.
2495         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
2496         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
2497
2498 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
2499
2500         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
2501
2502         * decl2.c (start_static_storage_duration_function): Fix comment.
2503         (finish_file): Create static storage duration functions lazily.
2504
2505 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
2506
2507         Implement anonymous structs.
2508         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
2509         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
2510         * class.c (finish_struct_1): Remove redundant check for anon struct.
2511         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
2512         (check_tag_decl): Check for anonymous struct here.
2513         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
2514         * init.c (sort_member_init, emit_base_init): Handle getting fields
2515         as well as names in current_member_init_list.
2516         (perform_member_init): Handle getting an anon aggr.
2517         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
2518         (do_build_copy_constructor): Likewise.
2519
2520 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
2521
2522         * tree.c (cp_build_qualified_type): Don't allow qualified function
2523         types.
2524
2525 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
2526
2527         * gxxint.texi: Fix typo.
2528
2529 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
2530
2531         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
2532         * class.c (finish_struct_1): Use CLASS_TYPE_P.
2533         * ptree.c (print_lang_type): Likewise.
2534         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
2535         IS_AGGR_TYPE_CODE.
2536         * typeck2.c (digest_init): Likewise.
2537
2538 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
2539
2540         * call.c (joust): Compare the types of the conv ops, not the
2541         target types of the conversions.
2542
2543 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
2544
2545         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
2546         was not given.
2547
2548 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
2549
2550         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
2551         * decl.c (grokfndecl): Don't allow inline declarations of friend
2552         template specializations, or friend template specializations with
2553         default arguments.
2554         * pt.c (tsubst): Handle substitution into array types that does
2555         not yield a fixed upper bound, even when not processing a
2556         template.
2557         (tsubst_copy): Deal with the fact that the second operand to a
2558         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
2559         * search.c (marked_pushdecls_p): Don't descend into
2560         TEMPLATE_TYPE_PARMs and the like.
2561         (unmarked_pushdecls_p): Likewise.
2562         
2563         * call.c (build_over_call): Don't throw away
2564         initializations/copies of empty classes; use MODIFY_EXPR and
2565         INIT_EXPR as for non-empty classes.
2566         * class.c (finish_struct_1): Put the padding byte for an empty
2567         class on the TYPE_NONCOPIED_PARTS list for the class.
2568
2569 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
2570
2571         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
2572         indicate a reference to a field that is a qualified name.
2573
2574 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
2575
2576         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
2577         ASM_OUTPUT_CONSTRUCTOR.
2578
2579         * friend.c (do_friend): Add attrlist arg.  Remove support for
2580         getting a non-decl as 'decl'.
2581         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
2582         rtl.
2583         (grokdeclarator): Adjust.
2584         * cp-tree.h: Adjust.
2585
2586 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
2587
2588         * cp-tree.h (permanent_p): New function.
2589         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
2590         possibly complex tree node.
2591         * tree.c (mapcar): Adjust comments, and follow coding standards in
2592         conditional.
2593         (permanent_p): New function.
2594
2595 1999-05-13  Per Bothner  <bothner@cygnus.com>
2596
2597         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
2598         primitive Java types, if we actually see `extern "Java"'.
2599
2600 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
2601
2602         * lang-specs.h: Pass -$ to the preprocessor.
2603
2604 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
2605
2606         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
2607         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
2608         (resolve_offset_ref): Don't handle a raw baselink.
2609         * cvt.c (build_expr_type_conversion): Likewise.
2610         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
2611         convert_for_initialization): Likewise.
2612         * class.c (instantiate_type): Handle seeing a baselink under an
2613         OFFSET_REF.
2614         * error.c (dump_expr): Likewise.        
2615         * pt.c (for_each_template_parm): Likewise.
2616         (resolve_overloaded_unification): Likewise.
2617         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
2618         * typeck.c (expr_sizeof): Also complain about other permutations
2619         of overloaded functions.
2620
2621 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
2622
2623         * init.c (resolve_offset_ref): Don't return a raw method.
2624         Use BASELINK_P.
2625         * typeck.c (decay_conversion): Don't handle a raw method.
2626         Resolve all OFFSET_REFs.
2627         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
2628         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
2629         same_type_p for pmf bits.  Don't use build_binary_op to compare
2630         raw pointers to methods.
2631         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
2632         to decide when to call resolve_offset_ref.
2633         (build_c_cast, convert_for_initialization): Likewise.
2634         * cvt.c (build_expr_type_conversion): Likewise.
2635
2636 1999-05-06  Nathan Sidwell  <nathan@acm.org>
2637
2638         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
2639
2640 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
2641
2642         * decl2.c (start_objects): Don't let static constructors and
2643         destructors get inlined.
2644
2645         * parse.y (nested_name_specifier): Make sure ordinary types are
2646         complete, just like template types.
2647         * parse.c: Regenerated.
2648
2649         * pt.c (check_explicit_specialization): Improve error messages.
2650
2651 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
2652
2653         * typeck.c (string_conv_p): Use same_type_p to check whether we
2654         try to convert between char and wchar_t.
2655
2656 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
2657
2658         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
2659         lookup to error_mark_node here.
2660         (lookup_member): Revise documentation.  Add comments.  Don't set
2661         the TREE_TYPE to error_mark_node here, and don't build up an extra
2662         TREE_LIST for ambiguous lookups.
2663         (setup_class_bindings): Adjust accordingly.
2664         (push_class_decls): Revise out-of-date comments.
2665         
2666         * typeck.c (build_const_cast): Tighten checks for legality.
2667
2668 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
2669
2670         * init.c (build_member_call): Lookup names coming from
2671         namespace-scoped LOOKUP_EXPR.
2672
2673 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
2674
2675         * gxxint.texi: Add documentation for 'I'.
2676
2677 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
2678
2679         * tinfo.cc (operator==): Qualify type_info with std::.
2680
2681 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
2682
2683         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
2684         (DECL_COMDAT): Remove definition.
2685
2686 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
2687
2688         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
2689         change.
2690
2691 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
2692
2693         * class.c (build_vtable): Use build_lang_decl when building
2694         vtables, not just build_decl.
2695         (prepare_fresh_vtable): Likewise.
2696         * decl.c (wrapup_globals_for_namespace): Mark vtables as
2697         DECL_EXTERNAL when calling wrapup_global_declarations.
2698         * decl2.c (priority_info_s): Add initializations_p and
2699         destructions_p members.
2700         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
2701         when deciding what vtables to write out.
2702         (ssdf_decls): New variable.
2703         (ssdf_decls_used): Likewise.
2704         (start_static_storage_duration_function): Deal with being called
2705         multiple times.  Avoid inlining this function.
2706         (generate_inits_for_priority): Deal with reuse of priority map.
2707         (get_priority_info): Clear initializations_p and destructions_p.
2708         (do_static_initialization): Tweak comment.
2709         (do_static_destruction): Likewise.  Fix condition on sentries for
2710         destruction.
2711         (generate_ctor_or_dtor_function): Call all of the static storage
2712         duration functions.
2713         (generate_ctor_or_dtor_function_for_priority): Check
2714         initializations_p and destructions_p to see what priorities need
2715         initialization functions.
2716         (finish_file): Rework to generate multiple static storage duration
2717         functions, rather than just one.
2718
2719         * typeck.c (build_const_cast): Tweak last change to handle
2720         templates correctly.
2721
2722         * typeck.c (build_const_cast): Disallow use of const_cast to
2723         anything but a pointer or reference type.
2724
2725 1999-04-30  Nathan Sidwell  <nathan@acm.org>
2726
2727         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
2728         signature type.
2729
2730 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
2731
2732         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
2733         (finish_file): Indent comments properly.
2734
2735 1999-04-29  Richard Henderson  <rth@cygnus.com>
2736
2737         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
2738         (do_static_destruction): Likewise.
2739
2740 1999-04-29  Nathan Sidwell  <nathan@acm.org>
2741
2742         * cp-tree.h (TYPE_NOTHROW_P): New macro.
2743         * decl2.c (delete_sanity): Warn on deleting void *.
2744         * init.c (build_new_1): Use TYPE_NOTHROW_P.
2745         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
2746         throwing operator new.
2747
2748 1999-04-28  Nathan Sidwell  <nathan@acm.org>
2749
2750         * cp-tree.h (build_component_addr): Remove prototype.
2751         * typeck.c (build_component_addr): Make static. Remove MSG
2752         argument.
2753         (build_component_addr): Remove MSG parameter, clean up
2754         comment.
2755         (build_x_function_call): Use cp_error.
2756         (build_unary_op): Adjust call of build_component_addr.
2757
2758 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
2759
2760         * pt.c (tsubst_friend_class): Check for NULL.
2761
2762 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
2763
2764         * search.c (binfo_for_vtable): Initialize bfvi.var.
2765
2766 1999-04-27  Nathan Sidwell  <nathan@acm.org>
2767
2768         * rtti.c (build_x_typeid): Check rtti is enabled.
2769
2770 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
2771
2772         * search.c (is_subobject_of_p): Make sure we're looking at the
2773         right baseclasses.
2774
2775 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
2776
2777         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
2778
2779 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
2780
2781         * decl2.c (finish_file): Tweak handling of extern inlines so that
2782         they are not unnecessarily put out.
2783
2784         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
2785         such as base classes.
2786
2787 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
2788
2789         * tree.c (build_exception_variant): Fix typo: use the chain of U,
2790         not trying V, while cycling through U.
2791
2792 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
2793
2794         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
2795         preserves_first_arg.  Enlarge dummy accordingly.
2796         (DECL_TINFO_FN_P): New macro.
2797         (SET_DECL_TINFO_FN_P): Likeiwse.
2798         (DECL_RETURNS_FIRST_ARG): Remove.
2799         (DECL_PRESERVES_THIS): Likewise.
2800         (DECL_INIT_PRIORITY): New macro.
2801         (finish_struct_1): Change prototype.
2802         (cat_namespace_levels): Remove prototype.
2803         (vtable_decl_p): New prototype.
2804         (vtype_decl_p): Likewise.
2805         (sigtable_decl_p): Likewise.
2806         (walk_globals_pred): New typedef.
2807         (walk_globals_fn): Likewise.
2808         (walk_globals): New prototype.
2809         (walk_namespaces_fn): New typedef.
2810         (walk_namespaces): New prototype.
2811         (wrapup_globals_for_namespace): Likewise.
2812         (walk_vtables): Remove prototype.
2813         (walk_sigtables): Likewise.
2814         (instantiate_pending_templates): New prototype.
2815         * class.c (finish_struct_1): Don't return a value.
2816         * decl.h (pending_statics): Remove declaration.
2817         * decl.c (walk_namespaces_r): New function.
2818         (walk_globals_r): Likewise.
2819         (vtable_decl_p): Likewise.
2820         (vtype_decl_p): Likewise.
2821         (sigtable_decl_p): Likewise.
2822         (walk_namespaces): Likewise.
2823         (walk_globals_data): New type.
2824         (walk_globals): New function.
2825         (wrapup_globals_for_namespace): Likewise.
2826         (expand_static_init): Remove assertion.  Remove redundancy in
2827         conditional.  Don't put static data members in static_aggregates
2828         Tidy.
2829         (finish_function): Remove redundancy in conditional.  Don't set
2830         DECL_RETURNS_FIRST_ARG.
2831         (cat_namespace_levels): Remove.
2832         * decl2.c: Include splay-tree.h and varray.h.
2833         (priority_info_s): New structure.
2834         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
2835         conventions.
2836         (prune_vtable_vardecl): Likewise.
2837         (finish_sigtable_vardecl): Likewise.
2838         (setup_initp): Remove.
2839         (do_dtors): Remove.
2840         (do_ctors): Remove.
2841         (start_static_storage_duration_function): New function.
2842         (generate_inits_for_priority): Likewise.
2843         (finish_static_storage_duration_function): Likewise.
2844         (get_priority_info): Likewise.
2845         (do_static_initialization): Likewise.
2846         (do_static_destruction): Likewise.
2847         (do_static_initialization_and_destruction): Likewise.
2848         (generate_ctor_or_dtor_function): Likewise.
2849         (generate_ctor_and_dtor_functions_for_priority): Likewise.
2850         (pending_statics): Make it a varray.
2851         (pending_statics_used): New variable.
2852         (saved_inlines): Make it a varray.
2853         (saved_inlines_used): New variable.
2854         (finish_static_data_member): Change method of updating
2855         pending_statics.
2856         (mark_inline_for_output): Remove #if 0'd code.  Change method of
2857         updating saved_inlines.
2858         (walk_vtables): Remove.
2859         (walk_sigtables): Likewise.
2860         (import_export_decl): Use DECL_TINFO_FN_P.
2861         (pending_templates): Remove declaration.
2862         (maybe_templates): Likewise.
2863         (static_aggregates_initp): Likewise.
2864         (setup_initp): Likewise.
2865         (finish_objects): Simplify.
2866         (INITIALIZE_P_IDENTIFIER): New macro.
2867         (PRIORITY_IDENTIFIER): New macro.
2868         (SSDF_IDENTIFIER): New macro.
2869         (initialize_p_decl): New variable.
2870         (priority_decl): Likewise.
2871         (ssdf_decl): Likewise.
2872         (priority_info_map): Likewise.
2873         (finish_file): Recode output of static intializers and other
2874         file-scope finalization tasks.
2875         * error.c (OB_END_TEMPLATE_ID): New macro.
2876         (dump_type_real): Use it.
2877         (dump_decl): Likewise.
2878         (dump_function_name): Likewise.
2879         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
2880         interface.
2881         (check_newline): Use walk_globals, not walk_vtables.
2882         * pt.c (pending_tempalte_expansions): Remove.
2883         (set_vardecl_interface_info): Likewise.
2884         (pending_templates): Make static.
2885         (maybe_templates): Likewise.
2886         (instantiate_class_template): Adjust call to finish_struct_1.
2887         (instantiate_pending_templates): New function.
2888         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
2889         * tree.c (static_aggregates_initp): Remove.
2890         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
2891         instead.
2892         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
2893
2894         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
2895         with the RTL code RETURN.
2896         * hash.h: Regenerated.
2897         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
2898         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
2899         * parse.c: Regenerated.
2900         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
2901         it.
2902         (inline_parm_levels): New variable.
2903         (inline_parm_levels_used): Likewise.
2904         (maybe_begin_member_template_processing): Update them.
2905         (maybe_end_member_template_processing): Use them, rather than
2906         guessing how many levels to pop.
2907
2908         * decl.c (make_typename_type): Tighten error-checking.
2909
2910 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
2911
2912         * cp-tree.h (build_binary_op): Remove unneeded parameter.
2913         * class.c (build_vrable_entry_ref): Adjust call to
2914         build_binary_op.
2915         * decl.c (expand_static_init): Likewise.
2916         (grokdeclarator): Likewise.
2917         (finish_function): Likewise.
2918         * decl2.c (delete_sanity): Likewise.
2919         (do_dtors): Likewise.
2920         (do_ctors): Likewise.
2921         * error.c (dump_type_suffix): Likewise.
2922         * expr.c (cplus_expand_expr): Likewise.
2923         * init.c (resolve_offset_ref): Likewise.
2924         (build_new): Likewise.
2925         (build_new_1): Likewise.
2926         (build_vec_delete_1): Likewise.
2927         (expand_vec_init_catch_clause): Likewise.
2928         (build_delete): Likewise.
2929         * pt.c (tsubst): Likewise.
2930         * rtti.c (synthesize_tinfo_fn): Likewise.
2931         * search.c (expand_upcast_fixups): Likewise.
2932         (expand_direct_vtbls_init): Likewise.
2933         * typeck.c (get_member_function_from_ptrfunc): Likewise.
2934         (build_binary_op_nodefault): Likewise.
2935         (point_int_sum): Likewise.
2936         (pointer_diff): Likewise.
2937         (build_unary_op): Likewise.
2938         (build_modify_expr): Likewise.
2939         (get_delta_difference): Likewise.
2940         (build_ptrmemfunc): Likewise.
2941         (expand_ptrmemfunc_cst): Likewise.
2942
2943 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
2944
2945         * decl.c (grokfndecl): Always call cplus_decl_attributes.
2946         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
2947
2948 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
2949
2950         * cp-tree.h (finish_static_data_member_decl): New function.
2951         * decl2.c (finish_static_data_member_decl): Split out from ...
2952         (grokfield): Here.
2953         * pt.c (instantiate_class_template): Use it here instead of
2954         trying to fake it.
2955         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
2956         finish_static_data_member_decl will do that.  Explicit set
2957         DECL_EXTERNAL to match non-template processing.
2958
2959 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
2960
2961         * cp-tree.h (finish_class_definition): Add parameter.
2962         * parse.y (structsp): Use it.  Don't call pop_scope here.
2963         * parse.c: Regenerated.
2964         * semantics.c (finish_class_definition): Pop it here.
2965
2966 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
2967
2968         * decl.c (xref_tag): Revise handling of nested template
2969         declarations.
2970         * pt.c (check_explicit_specialization): Tweak handling of friend
2971         templates in template classes.
2972         (tsubst_friend_class): Handle friend declarations for nested
2973         member template classes.
2974
2975 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
2976
2977         * class.c (finish_struct): Remove unused variable.
2978         (pushclass): Likewise.
2979         (invalidate_class_lookup_cache): Likewise.
2980         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
2981         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
2982         doesn't get obliterated.
2983         (make_typename_type): Handle template classes correctly.
2984
2985         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
2986         (storetags): Declare.
2987         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
2988         (pushclass): Likewise.  Use storetags to install tag declarations,
2989         not pushtag.
2990         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
2991         * decl.c (storetags): Make it global.
2992         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
2993         implicit typename declaration.
2994         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
2995         * method.c (hack_identifier): Likewise.
2996         * search.c (lookup_member): Likewise.
2997
2998         * decl.c (warn_about_implicit_typename_lookup): New function.
2999         (lookup_name_real): Use it.  Rework handling of implicit typename
3000         extension.
3001
3002 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
3003
3004         * cp-tree.h (lookup_nested_field): Remove.
3005         * class.c (push_nested_class): Handle UNION_TYPEs.
3006         (pop_nested_class): Likewise.
3007         * decl.c (lookup_name_real): Don't call lookup_nested_field.
3008         (start_decl): Use push_nested_class, not just pushclass.
3009         (cp_finish_decl): Use pop_nested_class, not just popclass.
3010         * search.c (lookup_nested_field): Remove.
3011
3012         * cp-tree.h (lang_type): Add documentation.
3013         * decl2.c (handle_class_head): Create template declarations here,
3014         as appropriate.
3015         * parse.y (class_head): Return whether or not we entered a new
3016         scope, as well as the type named.
3017         (named_class_head): Likewise.
3018         (named_complex_class_head_sans_basetype): Likewise.
3019         (structsp): Adjust accordingly.  Pop scope when required.
3020         * parse.c: Regenerated.
3021         * pt.c (check_default_tmpl_args): Robustify.
3022         (redeclare_class_template): Likewise.
3023         (instantiate_class_template): An instantiation of an
3024         anonymous union is itself an anonymous union.
3025         * semantics.c (begin_class_definition): Don't create template
3026         declarations here.
3027
3028 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
3029
3030         * parse.y (after_type_declarator_intern): New nonterminal.
3031         (after_type_declarator): Use it.
3032         (direct_after_type_declarator): Likewise.  Move above
3033         nonnested_type to fix reduce/reduce conflict resolution.
3034         (declmods): Reducing from just 'attributes' has EMPTY precedence.
3035         * Makefile.in (CONFLICTS): Update.
3036
3037         * decl.c (define_label): Downgrade error for jumping over a
3038         non-POD decl to pedwarn.
3039
3040 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
3041
3042         * cp-tree.h (popclass): Change declaration.
3043         (pop_nested_class): Likewise.
3044         (poplevel_class): Remove declaration.
3045         * call.c (convert_default_argument): Pass no arguments to
3046         popclass.
3047         * class.c (finish_struct_1): Likewise.
3048         (finish_struct): Likewise.
3049         (popclass): Remove argument.  Simplify code accordingly.
3050         (pop_nested_class): Likewise.
3051         * decl.c (poplevel_class): Declare it here, and make it static.
3052         (poplevel): Handle class scopes.
3053         (poplevel_class): Don't take an rgument.  Simplify.
3054         (pop_everything): Pass no arguments to pop_nested_class.
3055         (cp_finish_decl): Pass no arguments to popclass.
3056         (grokdeclarator): Pass no arguments to pop_nested_class.
3057         (finish_function): Likewise.
3058         * decl2.c (grokfield): Likewise.
3059         (pop_scope): Pass no arguments to popclass.
3060         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
3061         * pt.c (instantiate_class_template): Move call to pushclass, and
3062         document.  Pass no arguments to popclass.
3063         (regenerate_decl_from_template): Likewise.
3064
3065 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
3066
3067         * typeck.c (build_unary_op): Handle taking the address of a unique
3068         bound non-static member function.
3069
3070 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
3071
3072         * lang-options.h (-Wdeprecated): New flag.
3073         * decl2.c (warn_deprecated): New flag.
3074         (lang_decode_option): Deprecated this-is-variable,
3075         external-templates, alt-external-templates.
3076         Support -Wdeprecated.
3077         * errfn.c (cp_deprecated): New function.
3078
3079 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
3080
3081         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
3082         of the decls themselves.
3083
3084         * pt.c (tsubst_function_type): Copy attributes over.
3085
3086         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
3087         and com_interface.
3088         * cp-tree.h: Add prototype.
3089         * decl.c (init_decl_processing): Set valid_lang_attribute.
3090
3091 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
3092
3093         * class.c (finish_struct_1): Look at the const-ness of the field's
3094         type, not the TREE_READONLY-ness of the declaration.
3095         * method.c (synthesize_method): Likewise.
3096         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
3097         creating new declarations.
3098
3099 1999-04-13  Mike Stump  <mrs@wrs.com>
3100
3101         * decl2.c (import_export_decl): Because vtables always reference
3102         virtual functions, even if they are inlined, don't allow
3103         -fno-implement-inlines to not emit them, instead, emit them with
3104         the vtable.
3105         * decl.c (start_function): Likewise.
3106
3107 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
3108
3109         * cp-tree.h (struct lang_type): Add com_interface.
3110         (CLASSTYPE_COM_INTERFACE): New macro.
3111         * class.c (set_rtti_entry): COM interface classes have no RTTI
3112         entries in their vtables; adjust.
3113         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
3114         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
3115         finish_struct_1): Likewise.
3116         * decl2.c (mark_vtable_entries): Likewise.
3117         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
3118         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
3119         expand_upcast_fixups): Likewise.
3120         * tree.c (debug_binfo): Likewise.
3121
3122         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
3123         * typeck.c (comptypes): If we get it, ignore attributes.
3124         * class.c (instantiate_type): Use BASELINK_P.  Change complain
3125         parameter to flags; 2 means ignore attributes.
3126         * call.c (build_op_delete_call): Pass it.
3127
3128         * decl.c (xref_tag): Only complain once about using a typedef-name
3129         with 'struct'.  Downgrade to pedwarn.
3130
3131         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
3132
3133         * parse.y (absdcl_intern): New nonterminal.
3134         (absdcl, direct_abstract_declarator): Use it.
3135
3136         * pt.c (lookup_template_class): Look through implict typename.
3137
3138 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
3139
3140         * friend.c (add_friend): Deal gracefully with error_mark_node.
3141         * method.c (build_overload_value): Handle pointers-to-members as
3142         template parameters.
3143
3144         * decl.c (push_binding): Fix typo in comment.
3145
3146 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
3147
3148         * error.c (dump_type_real): If a typename is a template-id, put
3149         out the template arguments.
3150         (dump_expr): Handle TEMPLATE_ID_EXPR.
3151         * pt.c (lookup_template_class): Now that full arguments are
3152         available everywhere, remove code that tried to guess them.
3153
3154 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
3155
3156         * decl.c (make_typename_type): Complain if we don't find a type
3157         when trying to make a typename type for a non-template type.
3158
3159 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
3160
3161         * decl.c (start_decl): Pass attributes to grokdeclarator.
3162         (grokdeclarator): Handle attributes on constructor-syntax
3163         initializers.
3164
3165 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
3166
3167         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
3168         don't have types.
3169
3170         * search.c (template_self_reference_p): Tweak.
3171
3172 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
3173
3174         * init.c (build_offset_ref): Don't build yet another weird data
3175         structure to describe overloaded functions.
3176
3177 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
3178
3179         * cp-tree.h (BASELINK_P): New macro.
3180         (SET_BASELINK_P): Likewise.
3181         * init.c (build_member_call): Remove needless assignment in if
3182         statement.
3183         * search.c (lookup_field_r): Fix handling when we are looking
3184         specifically for a type; these are not hidden by functions and
3185         variables.
3186         (lookup_member): Use SET_BASELINK_P.
3187         * tree.c (is_overloaded_fn): Use BASELINK_P.
3188         (really_overloaed_fn): Likewise.
3189         (get_first_fn): Likewise.
3190
3191 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
3192
3193         * decl.c (lookup_name_current_level): Tweak, and improve
3194         documentation.
3195
3196         * class.c (maybe_fixup_vptrs): Remove declaration.
3197         (build_class_init_list): Likewise.
3198         * decl.c (pushdecl_class_level): Call check_template_shadow here
3199         ...
3200         (push_class_level_binding): ... not here.
3201         * search.c (dfs_push_type_decls): Only avoid
3202         template-self-reference TYPE_DECLs if they are from base classes.
3203
3204 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
3205
3206         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
3207         nodes.  Tidy.
3208
3209 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
3210
3211         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
3212         (finish_struct_1): Don't call build_class_init_list.
3213
3214 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
3215
3216         * tinfo.h (__class_type_info): Fix illegal declaration.
3217
3218         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
3219         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
3220         (IDENTIFIER_CLASS_VALUE): Improve documentation.
3221         (is_properly_derived_from): Declare.
3222         (invalidate_class_lookup_cache): Likewise.
3223         (maybe_maybe_note_name_used_in_class): Likewise.
3224         (note_name_declared_in_class): Likewise.
3225         (push_using_decl): Remove duplicate declaration.
3226         (id_in_current_class): Remove declaration.
3227         (push_class_binding): Change prototype.
3228         (clear_identitifer_class_values): Declare.
3229         * call.c (is_properly_derived_from): Make it global.
3230         (build_new_function_call): Be careful about updating candidates.
3231         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
3232         asked to make illegal calls.
3233         * class.c: Include splay-tree.h.
3234         (class_stack_node): Add names_used slot.
3235         (check_member_decl_is_same_in_complete_scope): Remove.
3236         (add_method): Fix comment.  Push the declaration into class
3237         scope.
3238         (finish_struct_1): When popping the class, pop the bindings too.
3239         Remove check for data member/function member conflict.
3240         (finish_struct): Remove calls to
3241         check_member_decl_is_same_in_complete_scope.  Change calls to
3242         popclass.
3243         (pushclass): Clear names_used in the class stack entry.
3244         Use invalidate_class_lookup_cache to remove cached entries, rather
3245         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
3246         before entering a new class.  Remove dead code.  Don't mess with
3247         current_function_decl when pushing declarations.
3248         (invalidate_class_lookup_cache): New function, split out from ...
3249         (popclass): Here.  Clean up names_used on our way out.
3250         (instantiate_type): Adjust.
3251         (build_self_reference): Don't push the declaration here.
3252         (maybe_note_name_used_in_class): New function.
3253         (note_name_declared_in_class): Likewise.
3254         * decl.c (add_binding): Change prototype.
3255         (find_class_binding_level): New function.
3256         (innermost_nonclass_level): Likewise.
3257         (current_binding_level): Update documentation.
3258         (inner_binding_level): Remove.  Replace with current_binding_level
3259         throughout.
3260         (push_binding_level): Remove special handling of
3261         class_binding_level.
3262         (pop_binding_level): Likewise.  Use find_class_binding_level.
3263         (suspend_binding_level): Likewise.
3264         (global_bindings_p): Use innermost_nonclass_level.
3265         (toplevel_bindings_p): Likewise.
3266         (namespace_bindings_p): Likewise.
3267         (pseudo_global_level_p): Likewise.
3268         (push_binding): Clear INHERITED_VALUE_BINDING_P.
3269         (add_binding): Check for illegal multiple declarations.  Return a
3270         value indicating whether or not the new binding was legal.
3271         (push_local_binding): Skip over class binding levels.  Check
3272         return value from add_binding.
3273         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
3274         note_name_declared_in_class.
3275         (pushlevel_class): Remove "fake out the rest of the compiler"
3276         code.
3277         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
3278         (clear_identifier_class_values): New function.
3279         (pop_from_top_level): Use it.
3280         (pop_everything): Tweak.
3281         (maybe_process_template_type_declaration): Don't push the
3282         declaration for the template here.
3283         (pushtag): Don't push tag declarations into class scope here.
3284         (pushdecl): Apply DeMorgan's law for readability.
3285         (pushdecl_class_level): Remove special-case code for
3286         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
3287         (push_class_level_bindng): Deal with inherited bindings.
3288         (lookup_name_real): Remove special-case code for
3289         TYPE_BEING_DEFINED, and some implicit typename magic.
3290         (grokdeclarator): Handle COMPONENT_REF for a template function.
3291         (build_enumerator): Don't call pushdecl_class_level here.
3292         (id_in_current_class): Remove.
3293         * decl2.c (grokfield): Don't call pushdecl_class_level or
3294         check_template_shadow.
3295         * errfn.c (cp_file_of): Don't declare.
3296         (cp_line_of): Likewise.
3297         * error.c (dump_decl): Handle an OVERLOAD.
3298         (cp_file_of): Likewise.
3299         (cp_line_of): Likewise.
3300         * init.c (build_member_call): Handle a COMPONENT_REF.
3301         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
3302         pushdecl_class_level.
3303         * method.c (hack_identifier): Build COMPONENT_REFs for references
3304         to member templates as well as member functions.  Remove dead
3305         code.
3306         * parse.y (left_curly): Remove.
3307         (nonnested_type): Call maybe_note_name_used_in_class, not
3308         pushdecl_class_level.
3309         * parse.c: Regenerated.
3310         (nested_name_specifier_1): Likewise.
3311         * pt.c (check_explicit_specialization): Adjust, for robustness.
3312         (check_template_shadow): Handle OVERLOADs.
3313         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
3314         TEMPLATE_DECL, if appropriate.
3315         * search.c (envelope_add_decl): Remove.
3316         (dfs_pushdecls): Likewise.
3317         (dfs_compress_decls): Likewise.
3318         (dfs_push_decls): New function.
3319         (dfs_push_type_decls): Likewise.
3320         (setup_class_bindings): Likewise.
3321         (template_self_reference_p): Likewise.
3322         (lookup_field_r): Use it.
3323         (looup_member): Remove old comment.  Deal with ambiguity.
3324         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
3325         and remove envelope processing.
3326         * semantics.c (begin_class_definition): Let pushclass push
3327         declarations for base classes.
3328         (finish_member_declaration): Push declarations into class scope.
3329         * typeck.c (build_component_ref): Just put an OVERLOAD into the
3330         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
3331         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
3332         * Makefile.in (class.o): Depend on splay-tree.h.
3333
3334 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
3335
3336         * cvt.c (convert_pointer_to_real): Use same_type_p.
3337         * typeck.c (comp_target_types): Use same_type_p.
3338
3339 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
3340
3341         * semantics.c (begin_inline_definitions,
3342         finish_inline_definitions): Rename from finish_default_args and
3343         begin_inline_definitions, respectively, to something that isn't a
3344         total lie.  :)
3345         * parse.y (structsp): Adjust.
3346
3347         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
3348         (list_hash_lookup): Likewise.
3349         (hash_tree_chain): Adjust.
3350         * pt.c (tsubst): Adjust.
3351         (tsubst_arg_types): Use plain hash_tree_cons.
3352         * cp-tree.h (hash_tree_cons_simple): Lose.
3353         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
3354
3355 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3356
3357         * Makefile.in (hash.h): Generate using gperf language 'C', not
3358         'KR-C', so gperf uses the `const' keyword on strings.
3359
3360         * gxx.gperf (resword): Const-ify a char*.
3361
3362 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
3363
3364         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
3365         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
3366         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
3367         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
3368         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
3369         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
3370         tree.c: Adjust.
3371
3372 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
3373
3374         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
3375
3376 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
3377
3378         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
3379
3380 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
3381
3382         * cp-tree.h (add_friend): Declare.
3383         (add_friends): Likewise.
3384         * friend.c (add_friend): Make it global.  Don't add to
3385         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
3386         (add_friends): Make it global.
3387         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
3388         befriending class is a template.
3389         * parse.y (component_decl_1): Fix typo in comment.
3390         * parse.c: Regenerated.
3391         * pt.c (instantiate_class_template): Use add_friend and
3392         add_friends rather that duplicating some of their functionality
3393         here.
3394
3395 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
3396
3397         * call.c (build_field_call): Unify 'this' and non-'this' cases.
3398
3399         * typeck.c (build_indirect_ref): Check for 'this' sooner.
3400
3401 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3402
3403         * call.c (op_error): Const-ify a char*.
3404         (add_candidate, source_type, add_warning): Add static prototype.
3405         (print_z_candidates): Const-ify a char*.
3406
3407         * class.c (resolve_address_of_overloaded_function,
3408         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
3409         (get_vtable_name, finish_struct_1): Const-ify a char*.
3410
3411         * cvt.c (convert_to_reference): Likewise.
3412
3413         * decl.c (redeclaration_error_message, record_builtin_type,
3414         record_unknown_type, member_function_or_else, bad_specifiers):
3415         Likewise.
3416         (find_binding, select_decl, unqualified_namespace_lookup,
3417         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
3418         Add static prototype.
3419         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
3420         implicitly_declare, record_builtin_java_type, define_function,
3421         grok_op_properties, tag_name): Const-ify a char*.
3422
3423         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
3424         (define_function, finish_builtin_type): Const-ify a char*.
3425         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
3426         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
3427         (file_name_nondirectory): Const-ify a char*.
3428         (init_filename_times): Don't prototype.
3429         (compiler_error): Prototype.
3430         (yyerror, init_repo): Const-ify a char*.
3431         (build_srcloc): Don't prototype.
3432         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
3433         Const-ify a char*.
3434         (warn_for_assignment): Don't prototype.
3435         (convert_for_initialization, readonly_error, check_for_new_type,
3436         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
3437         Const-ify a char*.
3438
3439         * decl2.c (acceptable_java_type, output_vtable_inherit,
3440         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
3441         merge_functions, decl_namespace, validate_nonmember_using_decl,
3442         do_nonmember_using_decl): Add static prototype.
3443         (lang_f_options): Const-ify a char*.
3444         (finish_builtin_type): Likewise.
3445         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
3446         prototype.
3447
3448         * errfn.c: Include cp-tree.h.
3449         (cp_thing): Add static prototype.
3450         (compiler_error): Don't protoptype.
3451         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
3452         passing it to `cp_thing'.
3453
3454         * error.c (interesting_scope_p): Add static prototype.
3455
3456         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
3457         a char*.
3458
3459         * init.c (compiler_error): Don't prototype.
3460         (member_init_ok_or_else): Const-ify a char*.
3461         (build_java_class_ref): Add static prototype.
3462
3463         * lex.c (compiler_error): Don't prototype.
3464         (get_time_identifier, interface_strcmp, extend_token_buffer,
3465         handle_cp_pragma): Const-ify a char*.
3466         (is_global, init_filename_times): Add static prototype.
3467         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
3468         (compiler_error): Change from fixed args to variable args.
3469         (yyerror): Const-ify a char*.
3470
3471         * parse.y (cond_stmt_keyword): Const-ify a char*.
3472         (parse_decl): Add static prototype.
3473
3474         * pt.c (template_args_equal, print_template_context): Likewise.
3475         (print_candidates, check_default_tmpl_args): Const-ify a char*.
3476         (instantiate_class_template): Likewise.
3477
3478         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
3479
3480         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
3481         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
3482
3483         * search.c (lookup_field_info, lookup_member): Likewise.
3484         (lookup_member): Cast the first argument of `bzero' to a PTR.
3485
3486         * sig.c (compiler_error): Don't prototype.
3487         (build_signature_pointer_or_reference_nam): Const-ify a char*.
3488         (get_sigtable_name, build_member_function_pointer): Likewise.
3489
3490         * tree.c (compiler_error): Don't prototype.
3491         (no_linkage_helper, build_srcloc): Add static prototype.
3492         (build_vbase_pointer_fields): Const-ify a char*.
3493         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
3494
3495         * typeck.c (compiler_error): Don't prototype.
3496         (convert_for_assignment): Const-ify a char*.
3497         (comp_cv_target_types): Add static prototype.
3498         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
3499         build_component_addr, build_unary_op, convert_for_initialization):
3500         Const-ify a char*.
3501
3502         * typeck2.c (ack): Add static prototype and change from fixed args
3503         to variable args.
3504         (readonly_error, check_for_new_type): Const-ify a char*.
3505
3506         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
3507         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
3508         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
3509         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
3510         gen_assign, GNU_xref_member): Const-ify a char*.
3511
3512 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3513
3514         * gxxint.texi: Remove old discussion on copying virtual bases.
3515
3516 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
3517
3518         * Make-lang.in: Remove all references to g++.o/g++.c.
3519         Link g++ from gcc.o.
3520
3521 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
3522
3523         * decl2.c (comdat_linkage): Treat vtables like functions.
3524
3525 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
3526
3527         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
3528
3529 1999-03-25  Nathan Sidwell  <nathan@acm.org>
3530
3531         * decl.c (init_decl_processing): Add `signed' type as a synonym
3532         for `int'.
3533
3534 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
3535
3536         * typeck.c (common_type): Handle cv-qual unification for pointers
3537         to members.
3538
3539         * decl.c (unqualified_namespace_lookup): Return error_mark_node
3540         on error.
3541         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
3542         * lex.c (do_identifier): If we got error_mark_node, call
3543         lookup_name again.
3544
3545 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3546
3547         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
3548         classes.
3549
3550 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
3551
3552         * decl.c (lookup_name_real): Do nested field lookup regardless of
3553         TYPE_BEING_DEFINED.
3554
3555 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
3556
3557         * cp-tree.h (lang_type): Remove has_assignment and
3558         has_real_assignment.  Add befriending_classes.
3559         (TYPE_HAS_ASSIGNMENT): Remove.
3560         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
3561         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
3562         (lang_decl): Document.
3563         (DECL_BEFRIENDING_CLASSES): New macro.
3564         (FRIEND_NAME): Move declaration to more obvious location.
3565         (FRIEND_DECLS): Likewise.
3566         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
3567         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
3568         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
3569         (grok_op_properties): Likewise.
3570         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
3571         (add_friend): Likewise.  Don't do weird things with assignment
3572         operators.  Update DECL_BEFRIENDING_CLASSES.
3573         (add_friends): Don't do weird things with assignment operators.
3574         (make_friend_class): Likewise.  Update
3575         CLASSTYPE_BEFRIENDING_CLASSES.
3576         * pt.c (instantiate_class_template): Don't set
3577         TYPE_HAS_ASSIGNMENT.
3578         (tsubst_copy): Substitute the TREE_TYPE for more unary
3579         expressions.
3580         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
3581         * search.c (protected_accessible_p): New function.
3582         (friend_accessible_p): Likewise.
3583         (accessible_p): Use them.
3584
3585 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
3586
3587         * pt.c (convert_nontype_argument): Don't create things that aren't
3588         PTRMEM_CSTs when applying a qualification conversion to a
3589         PTRMEM_CST.
3590
3591 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
3592
3593         * Makefile.in (OBJS): Don't mention hash.o.
3594         (OBJDEPS): Likewise.
3595
3596 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
3597
3598         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
3599         * decl.c (expand_static_init): Make sure we don't add any after
3600         then.
3601
3602         * decl.c (cp_finish_decl): Move intelligence about handling
3603         DECL_COMDAT for variables from here...
3604         * decl2.c (comdat_linkage): ...to here.
3605         (maybe_make_one_only): Tweak.
3606         (import_export_decl): Call comdat_linkage for variables, too.
3607         (finish_file): Handle template statics properly.
3608
3609 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
3610
3611         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
3612         Document internals of pointer-to-member-functions.
3613         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
3614         (PFN_FROM_PTRMEMFUNC): Likewise.
3615         (build_type_conversion): Remove unused parameter.
3616         (build_ptrmemfunc1): Declare.
3617         (expand_ptrmemfunc_cst): New function.
3618         (delta2_from_ptrmemfunc): Likewise.
3619         (pfn_from_ptrmemfunc): Likewise.
3620         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
3621         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
3622         (convert_to_reference): Remove unused parameter to
3623         build_type_conversion.
3624         (ocp_convert): Likewise.
3625         (build_user_type_conversion): Likewise.
3626         * error.c (dump_expr): Handle NULL pointer-to-member functions.
3627         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
3628         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
3629         open when handling pointer-to-member functions.
3630         * pt.c (convert_nontype_argument): Clean up error messages.  Be
3631         more stringent with pointers-to-members.
3632         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
3633         (build_unary_op): Tidy ever-so-slightly.
3634         (build_conditional_expr): Remove extra parameter to
3635         build_type_conversion.
3636         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
3637         we're using.
3638         (expand_ptrmemfunc_cst): Define.
3639         (delta2_from_ptrmemfunc): Likewise.
3640         (pfn_from_ptrmemfunc): Likewise.
3641
3642 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
3643
3644         * init.c (build_member_call): Handle template-id expressions
3645         correctly.
3646         * typeck.c (build_x_function_call): Likewise.
3647
3648 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
3649
3650         * friend.c (make_friend_class): Avoid core dump when
3651         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
3652
3653 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
3654
3655         * decl.c (start_function): Suppress normal linkage heuristics
3656         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
3657
3658 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
3659
3660         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
3661         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
3662
3663 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3664
3665         * parse.y (named_complex_class_head_sans_basetype):
3666         Do not push a scope for error_mark_node.
3667         (maybe_base_class_list): Likewise.
3668
3669         * decl.c (start_decl): Check for error_mark_node as a type.
3670         Detected by g++.brendan/array-refs.C.
3671         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
3672         (maybe_build_cleanup_1): Likewise.  Detected by
3673         g++.jason/incomplete1.C.
3674
3675         * tree.c (build_dummy_object): Use void_zero_node instead of the
3676         error_mark_node.
3677         (is_dummy_object): Check for such a node.
3678         Detected by g++.bob/inherit1.C
3679
3680 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
3681
3682         * method.c (old_backref_index): Split out...
3683         (flush_repeats): From here.  Rename back from try_old_backref.
3684         (build_mangled_name): Put back some old-style repeat handling.
3685
3686 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3687
3688         * lex.c: Don't include setjmp.h.
3689         (parse_float): New static function.
3690         (pf_args): New struct.
3691         (real_yylex): Use them in call to `do_float_handler'.
3692
3693 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
3694
3695         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
3696         * tree.c (layout_basetypes): Not here.
3697         * search.c (dfs_search): Remove; no longer used.
3698
3699 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
3700
3701         * decl2.c (validate_nonmember_using_decl): Issue sensible
3702         error-messages on bogus qualifiers.
3703
3704 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
3705
3706         * call.c (add_function_candidate): Fix uninitialized variable.
3707
3708         * Makefile.in (search.o): Add dependency on varray.h.
3709
3710 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
3711
3712         * decl.c (duplicate_decls): Use same_type_p.
3713         * method.c (try_old_backref): Renamed from flush_repeats.  Use
3714         same_type_p.  Don't try to handle repeats.  Return success.
3715         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
3716         calls from old-style code, too.
3717         (check_ktype): Use same_type_p.
3718         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
3719         (build_qualified_name): Simplify logic.
3720         (process_overload_item): Strip typedefs and quals at the top.
3721         (build_mangled_name_for_type_with_Gcode): Remove call to
3722         type_canonical_variant.
3723         (build_mangled_name): Likewise.  Remove support for old-style
3724         repeats, which have been disabled since 2.7.2.  Don't mess with
3725         TREE_USED.
3726         (build_decl_overload_real): Don't mess with TREE_USED.
3727
3728 1999-03-13  Nathan Sidwell  <nathan@acm.org>
3729
3730         * error.c (cp_printers): Add 'F' escape character.
3731         (dump_type_real): Remove TREE_LIST (fnargs) printing.
3732         Functionality moved to dump_parameters.
3733         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
3734         (dump_function_decl): Extend meaning of V parameter.  Use
3735         dump_parameters and dump_exception_spec.
3736         (dump_parameters): New static function.
3737         (dump_exception_spec): New static function.
3738         (fndecl_as_string): Change argument semantics.  Use
3739         dump_function_decl directly.
3740
3741         * sig.c (build_signature_table_constructor): Use cp_error.
3742
3743 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3744
3745         * semantics.c (finish_switch_cond): Handle error cases gracefully.
3746         Detected by g++.law/enum5.C.
3747
3748         * typeck.c (build_modify_expr): Check for errors after resolving
3749         offsets.  Detected by g++.brendan/static1.C.
3750
3751         * decl.c (complete_array_type): Ignore initial_value if it is an
3752         error.  Detected by g++.benjamin/17930.C.
3753
3754         * typeck2.c (process_init_constructor): Return error if one argument
3755         is in error.  Detected by g++.benjamin/13478.C.
3756
3757 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3758
3759         * decl.c (select_decl): Allow class templates when we need types.
3760         * decl2.c (ambiguous_decl): Likewise.
3761
3762 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
3763
3764         * lex.c (do_identifier): Correct call to enforce_access.
3765         * search.c (accessible_p): Tweak comment.
3766
3767 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
3768
3769         * semantics.c (begin_class_definition): Call build_self_reference.
3770         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
3771
3772         * search.c (assert_canonical_unmarked): Fix typo in prototype.
3773
3774         * search.c (dfs_canonical_queue): New function.
3775         (dfs_assert_unmarked_p): Likewise.
3776         (assert_canonical_unmarked): Likewise.
3777         (access_in_type): Use it.
3778         (accessible_p): Likewise.  Walk the whole tree when umarking.
3779
3780         * sig.c (build_signature_table_constructor): Use accessible_p
3781         instead of compute_access.
3782
3783 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
3784
3785         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
3786
3787 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
3788
3789         * cp-tree.h (flag_access_control): Declare.
3790         (TREE_VIA_PPUBLIC): Document.
3791         (DECL_NONSTATIC_MEMBER_P): New macro.
3792         (enforce_access): Return an indication of whether or not access
3793         was permitted.
3794         (build_self_reference): Change prototype.
3795         (compute_access): Replace with ...
3796         (accessible_p): New function.
3797         (dfs_walk): Change prototype.
3798         (dfs_unmark): Likewise.
3799         (markedp): Likewise.
3800         * call.c (enforce_access): Use accessible_p.
3801         * class.c (build_self_reference): Insert the declaration into the
3802         list of members for this type, and make it public.
3803         * decl.c (xref_basetypes): Avoid ill-timed recursion.
3804         * init.c (build_offset_ref): Use lookup_member, not three separate
3805         name-lookups.  Call enforce_access rather than checking for
3806         illegal accesses here.
3807         (resolve_offset_ref): Likewise.
3808         * lex.c (do_identifier): Likewise.
3809         * method.c (hack_identifier): Likewise.
3810         * parse.y (self_reference): Remove.
3811         (opt_component_decl_list): Don't use it.
3812         * parse.c: Regenerated.
3813         * pt.c (print_candidates): Generalize to handle lists of
3814         overloaded functions.
3815         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
3816         not set.
3817         (get_template_base): Use new calling convention for dfs_walk.
3818         * search.c: Include varray.h.  Add prototypes.
3819         (dfs_walk): Accept a data pointer to pass to the work functions.
3820         All callers changed.  All work functions changed.
3821         (breadth_first_search): Rename to bfs_walk, and make consistent
3822         with dfs_walk.
3823         (dfs_walk_real): New function.
3824         (canonical_binfo): New function.
3825         (context_for_name_lookup): Likewise.
3826         (shared_marked_p): Likewise.
3827         (shared_unmarked_p): Likewise.
3828         (lokup_field_queue_p): Likewise.
3829         (lookup_field_r): Generalize to handle both functions and fields.
3830         (lookup_field): Just call lookup_member.
3831         (lookup_fnfields): Likewise.
3832         (lookup_member): Move body of lookup_field here and generalize.
3833         (dfs_accessible_queue_p): Likewise.
3834         (dfs_accessible_p): Likewise.
3835         (dfs_access_in_type): Likewise.
3836         (access_in_type): Likewise.
3837         (compute_access): Remove, and replace with ...
3838         (accessible_p): New function.
3839         (vbase_types): Remove.
3840         (vbase_decl_ptr_intermediate): Likewise.
3841         (vbase_decl_ptr): Likewise.
3842         (vbase_init_result): Likewise.
3843         (closed_envelopes): Likewise.
3844         (bvtable): Likewise.
3845
3846 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
3847
3848         * call.c (add_function_candidate): Check for proper number of args
3849         before checking the validity of those args.
3850
3851 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
3852
3853         * cp-tree.h (struct lang_type): Add anon_union field.
3854         (ANON_UNION_TYPE_P): Use it instead of examining type.
3855         (SET_ANON_UNION_TYPE_P): New macro.
3856         * decl.c (check_tag_decl): Use it.
3857
3858         * search.c (compute_access): Handle non-type contexts earlier, and
3859         handle NULL_TREE.
3860
3861         * tree.c (build_exception_variant): Use copy_to_permanent.
3862
3863         * decl2.c (setup_initp): Give statics with no priority the default
3864         priority here.
3865         (do_dtors, do_ctors, finish_file): Remove special handling of
3866         non-prioritized statics.
3867
3868 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
3869
3870         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
3871         * decl.c (make_typename_type): Don't issue an error if an
3872         immediate lookup fails; it migt be resolved later.
3873         * friend.c (is_friend): Add comment.
3874         * search.c (breadth_first_search): Add POSTFN and DATA
3875         parameters.  Tidy.  All callers changed.
3876         (lookup_field_queue_p): New function.
3877         (lookup_field_r): Likewise.
3878         (lookup_field_post): Likewise.
3879         (lookup_field): Use them, via breadth_first_search, instead of
3880         duplicating logic.
3881         (compute_access): Robustify.
3882         (lookup_fnfield_info): New structure.
3883
3884 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
3885
3886         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
3887
3888 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
3889
3890         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
3891         cc happy.
3892
3893         * decl2.c (import_export_class): Also return if
3894         CLASSTYPE_INTERFACE_ONLY is set.
3895
3896 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3897
3898         * decl.c (push_overloaded_decl): Only overwrite the old binding if
3899         there was one.
3900         * decl2.c (do_local_using_decl): Fix loop termination.
3901
3902 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
3903
3904         * cp-tree.h (determine_specialization): Don't declare.
3905         * pt.c (determine_specialization): Make it static.  Eliminate
3906         complain parameter.  Note that decl is always non-NULL now, and
3907         simplify accordingly.
3908
3909         * decl.c (maybe_push_to_top_level): Always call
3910         push_cp_function_context.
3911         (pop_from_top_level): Always call pop_cp_function_context.
3912
3913 1999-02-26  Nathan Sidwell  <nathan@acm.org>
3914
3915         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
3916         diagnostics.
3917         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
3918         * init.c (build_new_1): Extra arg to complete_type_or_else.
3919         (build_delete): Likewise.
3920         * typeck.c (require_complete_type): Likewise.
3921         (pointer_int_sum): Likewise.
3922         (pointer_diff): Likewise.
3923         (build_component_ref): Likewise.
3924
3925         * typeck2.c (incomplete_type_error): Always use cp_error.
3926         Show declaration of undefined type, if appropriate.
3927         Deal with UNKNOWN_TYPE nodes.
3928
3929         * typeck.c (require_complete_type): Use TYPE_SIZE as
3930         size_zero_node to mean incomplete type.
3931         (require_complete_type_in_void): New function.
3932         (build_compound_expr): Call complete_type_in_void for LHS.
3933         (build_c_cast): Call complete_type_in_void for void cast.
3934         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
3935         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
3936         require_complete_type_in_void.  Call it.
3937         * cp-tree.h (require_complete_type_in_void): Prototype new function.
3938
3939         * typeck.c (convert_arguments): Use alternative format for
3940         function decls.  Don't require_complete_type here.  Simplify
3941         diagnostic printing.
3942         (convert_for_initialization): Don't require_complete_type on RHS yet.
3943         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
3944
3945         * call.c (build_over_call): Cope with qualified void return type.
3946         * semantics.c (finish_call_expr): Likewise.
3947         * typeck.c (build_function_call_real): Likewise.
3948         (c_expand_return): Likewise.
3949         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
3950
3951         * call.c (print_z_candidates): Use alternate print format, to be
3952         consistent with (pt.c) print_candidates.
3953         * method.c (hack_identifier): List candidate members.
3954         * search.c (lookup_field): Build ambiguous list, and show it, if
3955         ambiguous.
3956
3957 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
3958
3959         * typeck.c (decay_conversion): Don't confuse constant array
3960         variables with their initializers.
3961
3962         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
3963         merging decls.
3964         * pt.c (regenerate_decl_from_template): Tweak for clarity.
3965         (instantiate_decl): Mark a decl instantiated before regenerating
3966         it to avoid recursion.
3967         * tree.c (mapcar): Don't call decl_constant_value unless we know
3968         something is TREE_READONLY_DECL_P.
3969
3970         * class.c (check_for_override): Don't stop checking when we find
3971         the first overridden function.  Delete #if 0'd code.
3972         * search.c (get_matching_virtual): Likewise.
3973
3974 1999-02-25  Richard Henderson  <rth@cygnus.com>
3975
3976         * lang-specs.h: Define __FAST_MATH__ when appropriate.
3977
3978 1999-02-24  Mike Stump  <mrs@wrs.com>
3979
3980         * typeck.c (convert_for_assignment): Allow boolean integral constant
3981         expressions to convert to null pointer.
3982
3983 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
3984
3985         * decl.c (lookup_namespace_name): Resolve namespace aliases.
3986
3987         * class.c (push_nested_class): Allow namespaces.
3988
3989         * decl2.c (set_decl_namespace): Add friendp parameter.
3990         * decl.c (grokfndecl): Pass it.
3991         (grokvardecl): Likewise.
3992         * cp-tree.h: Change declaration.
3993
3994 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
3995
3996         * pt.c (tsubst): Allow an array of explicit size zero.
3997
3998 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
3999
4000         * errfn.c: Change varargs code to look like toplev.c.
4001
4002         * method.c (process_modifiers): Don't prepend 'U' for char or
4003         wchar_t.
4004
4005 1999-02-20  Craig Burley  <craig@jcb-sc.com>
4006
4007         * Make-lang.in (cplib2.ready): Don't consider updating
4008         cplib2 stuff if the current directory isn't writable, as
4009         it won't work (such as during a `make install').
4010
4011 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
4012
4013         * decl2.c (start_objects): Make file scope constructors and
4014         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
4015         ASM_OUTPUT_DESTRUCTOR are defined.
4016
4017 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
4018
4019         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
4020         (fn_type_unification): Adjust prototype.
4021         (lookup_fnfields_1): Declare.
4022         * call.c (add_template_candidate_real): Adjust call to
4023         fn_type_unification.
4024         * class.c (add_method): Don't allow duplicate declarations of
4025         constructors or destructors.
4026         (resolve_address_of_overloaded_function): Remove unused variable.
4027         Adjust call to fn_type_unification.
4028         * decl.c (grokfndecl): Be more robust in the face of illegal
4029         specializations.
4030         * decl2.c (check_classfn): Remove hokey handling of member
4031         templates.
4032         * pt.c (determine_specialization): Improve comments.  Adjust to
4033         handle template argument deduction as per the standard.
4034         (check_explicit_specialization): Fix comment spacing.  Handle
4035         type-conversion operators correctly.  Improve error-recovery.
4036         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
4037         (get_bindings_real): Simplify handling of static members.
4038         * search.c (lookup_fnfields_1): Make it have external linkage.
4039         * typeck.c (compparms): Fix comment.
4040         (build_unary_op): Don't try to figure out which template
4041         specialization is being referred to when when the address-of
4042         operator is used with a template function.
4043
4044 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4045
4046         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
4047         keyword to match an analogous change at the top level.
4048
4049         * tree.c (lvalue_or_else): Likewise.
4050
4051 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
4052
4053         * decl.c (xref_basetypes): Comment.
4054         * pt.c (instantiate_class_template): Use xref_basetypes.
4055
4056 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
4057
4058         * cp-tree.h (tsubst): Change prototype.
4059         (tsubst_expr): Likewise.
4060         (tsubst_copy): Likewise.
4061         (type_unification): Remove prototype.
4062         * call.c (convert_default_arg): Adjust call to tsubst_expr.
4063         * class.c (resolve_address_of_overloaded_function): Just use
4064         fn_type_unification.
4065         * decl.c (grokdeclarator): Adjust call to tsubst.
4066         * method.c (build_template_parm_names): Likewise.
4067         * pt.c (GTB_VIA_VIRTUAL): New macro.
4068         (GTB_IGNORE_TYPE): Likewise.
4069         (resolve_overloaded_unification): Add `complain' parameter.
4070         (try_one_overload): Likewise.
4071         (tsubst_template_arg_vector): Likewise.
4072         (tsubst_template_parms): Likewise.
4073         (tsubst_aggr_type): Likewise.
4074         (tsubst_arg_types): Likewise.
4075         (tsubst_call_declarator_parms): Likewise.
4076         (unify): Remove explicit_mask.
4077         (type_unification_real): Likewise.
4078         (get_template_base_recursive): Likewise.
4079         (coerce_template_template_parms): Provide prototype.
4080         (tsubst_function_type): Likewise.
4081         (try_class_unification): New function.
4082         All callers changed to use new complain parameter.
4083         (get_template_base): Use try_class_unification.
4084         (unify): Adjust handling of classes derived from template types.
4085         (fn_type_unification): Substitute explicit arguments before
4086         unification.
4087
4088 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
4089
4090         * decl.c (pushdecl): Remove dead code.
4091
4092 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
4093
4094         * decl2.c (finish_objects): Fix code I missed in previous change.
4095
4096 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
4097
4098         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
4099         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
4100
4101         * pt.c (maybe_process_partial_specialization): Complain about
4102         'template <>' on non-specialization.
4103
4104 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
4105
4106         * decl.c (grokdeclarator): Catch wierd declarators.
4107         * decl2.c (finish_file): Don't abort because of namespace parsing
4108         failure.
4109         (check_decl_namespace): Remove.
4110
4111 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
4112
4113         * cp-tree.h (get_template_base): Don't declare.
4114         (dfs_walk): Declare.
4115         (dfs_unmark): Likewise.
4116         (markedp): Likewise.
4117         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
4118         targs to get_template_base.
4119         (get_template_base_recursive): Move here from search.c.  Check to
4120         see that the base found can be instantiated to form the desired
4121         type.
4122         (get_template_base): Likewise.
4123         (get_class_bindings): Simplify.
4124         * search.c (get_template_base_recursive): Move to pt.c.
4125         (get_template_base): Likewise.
4126         (markedp): Make it global.
4127         (dfs_walk): Likewise.
4128         (dfs_unmark): Likewise.
4129
4130 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
4131
4132         * pt.c (maybe_process_partial_specialization): Complain about
4133         specialization in wrong namespace.
4134         * tree.c (decl_namespace_context): New fn.
4135
4136 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
4137
4138         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
4139         * pt.c (coerce_template_template_parms): Handle nested
4140         template template parameters.
4141
4142 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
4143
4144         * typeck2.c: Update email addresses.
4145
4146 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
4147
4148         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
4149         turned off.
4150
4151 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
4152
4153         * lex.c (retrofit_lang_decl): Split out...
4154         (build_lang_decl): From here.
4155         * decl.c (pushdecl): Call it for functions generated by the middle
4156         end that don't have DECL_LANG_SPECIFIC.
4157         * cp-tree.h: Declare it.
4158
4159         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
4160         (start_objects, finish_objects): Only use special
4161         init_priority code if the user specified a priority.
4162         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
4163         objects.
4164
4165 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
4166
4167         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
4168         mkstemp.o.  Get them from libiberty now.
4169         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
4170
4171 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
4172
4173         * decl2.c (lang_decode_option): Use read_integral_parameter.
4174
4175 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
4176
4177         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
4178         before calling complete_type_or_else.
4179
4180 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4181
4182         * input.c (inline): Don't define, its handled by system.h.
4183
4184 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
4185
4186         * decl2.c: Don't define flag_no_ident here.  Don't process
4187         -f(no-)ident here.
4188         * cp-tree.h: Don't declare flag_no_ident here.
4189         * lang-specs.h: Map -Qn to -fno-ident.
4190
4191 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
4192
4193         * cp-tree.h (struct tree_binding): Replace scope field with a union.
4194         (BINDING_SCOPE): Adjust.
4195         * decl.c (BINDING_LEVEL): Adjust.
4196
4197 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
4198
4199         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
4200         member constants.
4201
4202         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
4203         a ctor initializer.
4204
4205         * tree.c (equal_functions): Fix name in prototype.
4206
4207         * decl.c (push_local_binding): Add FLAGS argument.
4208         (pushdecl, push_overloaded_decl): Pass it.
4209         * decl2.c (do_local_using_decl): Likewise.
4210         * cp-tree.h: Adjust prototype.
4211         * decl.c (poplevel): Fix logic.
4212
4213         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
4214         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
4215         (cat_namespace_levels): Don't loop forever.
4216
4217 1999-01-25  Richard Henderson  <rth@cygnus.com>
4218
4219         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
4220
4221 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
4222
4223         * class.c (resolve_address_of_overloaded_function): Mark the
4224         chosen function used.
4225
4226         * call.c (build_call): Make sure that a function coming in has
4227         been marked used already.
4228         * decl.c (expand_static_init): Call mark_used instead of
4229         assemble_external.
4230         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
4231         alloc_eh_object, expand_throw): Likewise.
4232         * init.c (build_builtin_delete_call): Likewise.
4233         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
4234         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
4235         expand_generic_desc): Likewise.
4236
4237 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4238
4239         * tree.c (equal_functions): New function.
4240         (ovl_member): Call it.
4241
4242 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
4243
4244         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
4245
4246 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4247
4248         * decl.c (decls_match): Return 1 if old and new are identical.
4249         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
4250
4251 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
4252
4253         * decl.c (start_function): Make member functions one_only on windows.
4254         * decl2.c (import_export_decl): Likewise.
4255
4256         * decl.c (grokdeclarator): Don't complain about implicit int in
4257         a system header.  Change same-name field check to not complain in
4258         a system header instead of within extern "C".
4259
4260 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
4261
4262         * cp-tree.h (PUSH_GLOBAL): New macro.
4263         (PUSH_LOCAL): Likewise.
4264         (PUSH_USING): Likewise.
4265         (namespace_bindings_p): Declare.
4266         (push_overloaded_decl): Likewise.
4267         * decl.c (push_overloaded_decl): Don't make it static.  Check for
4268         illegal declarations after using declarations here.
4269         (namespace_bindings_p): Likewise.
4270         (duplicate_decls): Don't consider declarations from different
4271         namespaces to be the same.
4272         (pushdecl): Use symbolic PUSH_ constants in calls to
4273         push_overloaded_decl.
4274         (push_overloaded_decl_1): Likewise.
4275         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
4276         (do_nonmember_using_decl): Check for illegal using declarations
4277         after ordinary declarations here.
4278         (do_local_using_decl): Call pushdecl to insert declarations.
4279
4280 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
4281
4282         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
4283
4284 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
4285
4286         * tree.c (build_cplus_array_type_1): Don't call build_array_type
4287         for types involving template parameters.
4288
4289         * cp-tree.h (PARM_DECL_EXPR): Delete.
4290         (convert_default_arg): Change prototype.
4291         (check_default_argument): Declare.
4292         (search_tree): Likewise.
4293         * call.c (convert_default_arg): Take the function to which the
4294         default argument belongs as a parameter, and do any necessary
4295         instantiation here, instead of ...
4296         (build_over_call): Here.
4297         * decl.c (local_variable_p): New function.
4298         (check_default_argument): Likewise, split out and tidied from ...
4299         (grokparms): Here.
4300         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
4301         * pt.c (tsubst_call_declarator_parms): New function.
4302         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
4303         with CALL_EXPRs, rather than trying to be clever.
4304         (tsubst): Use tsubst_call_declarator_parms.
4305         * tree.c (search_tree): Don't make it static.
4306         * typeck.c (convert_arguments): Use new interface to
4307         convert_default_arg.
4308
4309 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
4310
4311         * error.c (dump_function_decl): Don't print the argument types for
4312         a function when the verbosity level is negative.
4313
4314         * call.c (build_over_call): Check format attributes at call-time.
4315
4316         * pt.c (tsubst_copy): Fix comment.
4317         (unify): Don't allow unification with variable-sized arrays.
4318
4319         * semantics.c (finish_stmt_expr): When processing a template make
4320         the BIND_EXPR long-lived.
4321
4322 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
4323
4324         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
4325         (import_export_vtable): Not here.
4326
4327 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
4328
4329         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
4330         non-static member function.
4331
4332 1999-01-18  Nathan Sidwell  <nathan@acm.org>
4333
4334         * class.c (instantiate_type): Only diagnose illegal address of member
4335         function if complaining.
4336
4337         * decl.c (lookup_name_real): Remove duplicate code.
4338
4339 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
4340
4341         * tree.c (copy_template_template_parm): Use permanent_obstack.
4342
4343 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
4344
4345         * pt.c (unify): Remove restrictions on deduction of argument
4346         of template template parameters.
4347
4348 1999-01-18  Nathan Sidwell  <nathan@acm.org>
4349
4350         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
4351
4352         * class.c (resolve_address_of_overloaded_function): Show list of
4353         all candidates, when none of them match.
4354
4355 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
4356
4357         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
4358         definition of 'casting away const' in reinterpret_cast<>.
4359
4360 1999-01-18  Graham  <grahams@rcp.co.uk>
4361
4362         * cvt.c: Add include for decl.h, remove extern for
4363         static_aggregates which is now provided by decl.h.
4364
4365         * Makefile.in (cvt.o): Add dependency for decl.h and missing
4366         dependencies for convert.h and flags.h.
4367
4368 1999-01-18  Nathan Sidwell  <nathan@acm.org>
4369
4370         * decl2.c (do_dtors): Set current location to that of the
4371         decl, for sensible diagnostics and debugging.
4372         (check_classfn): Issue `incomplete type' error, if
4373         class is not defined.
4374
4375 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
4376
4377         * cp-tree.h: Add prototype for bound_pmf_p.
4378
4379 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
4380             Manfred Hollstein <manfred@s-direktnet.de>
4381
4382         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
4383         -Wreturn-type.
4384
4385 1999-01-16  Nathan Sidwell  <nathan@acm.org>
4386
4387         * cp-tree.h (struct lang_type): Added has_mutable flag.
4388         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
4389         (TYPE_HAS_MUTABLE_P): New macro to read it.
4390         (cp_has_mutable_p): Prototype for new function.
4391         * class.c (finish_struct_1): Set has_mutable from members.
4392         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
4393         it contains a mutable.
4394         * typeck.c (cp_has_mutable_p): New function.
4395
4396 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
4397
4398         * pt.c (process_template_parm): Ignore top-level qualifiers on
4399         non-type parameters.
4400
4401         * decl.c (start_function): Use current_function_parms in the call
4402         to require_complete_type_for_parms, not the probably empty
4403         DECL_ARGUMENTS.
4404
4405 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
4406
4407         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
4408
4409         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
4410         that we don't suppress the other copies.
4411         * lex.c (handle_cp_pragma): Likewise.
4412
4413 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
4414
4415         * decl.c (grokdeclarator): Undo 1998-12-14 change.
4416         * tree.c (build_cplus_array_type_1): Likewise.
4417         * pt.c (instantiate_class_template): Remove misleading comment.
4418         (tsubst_aggr_type): Substitute if there are template parameters,
4419         regardless of whether or not they use template arguments.
4420         (unify): Likewise, but for unification.
4421
4422 1999-01-12  Richard Henderson  <rth@cygnus.com>
4423
4424         * cp-tree.h (flag_permissive): Declare extern.
4425
4426 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
4427
4428         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
4429         here.
4430         (lang_type): Add is_partial_instantiation.  Decrease width of
4431         dummy.
4432         (PARTIAL_INSTANTIATION_P): New macro.
4433         (OPERATOR_TYPENAME_P): Remove.
4434         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
4435         OPERATOR_TYPENAME_P.
4436         (grok_op_properties): Likewise.
4437         * friend.c (do_friend): Handle friends that are member functions
4438         correctly.
4439         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
4440         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
4441         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
4442         any more partial instantiation than is absolutely necessary for
4443         implicit typename.  Set PARTIAL_INSTANTIATION_P.
4444         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
4445         * semantics.c (begin_class_definition): Handle partial
4446         specializations of a type that was previously partially
4447         instantiated.
4448
4449 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
4450
4451         * g++spec.c (LIBSTDCXX): Provide default definition.
4452         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
4453
4454 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4455
4456         * Make-lang.in (g++.o): Depend on prefix.h.
4457
4458 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
4459
4460         * tree.c (bound_pmf_p): New fn.
4461         * typeck.c (build_c_cast): Use it.
4462
4463         * decl.c (grok_op_properties): Use same_type_p.
4464
4465 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4466
4467         * Makefile.in (cvt.o): Depend on toplev.h.
4468
4469         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
4470
4471         * cvt.c: Include toplev.h.
4472
4473         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
4474         definitions.
4475
4476         * init.c (expand_vec_init): Initialize variable `itype'.
4477
4478         * lex.c (yyerror): Cast the argument passed to a ctype function to
4479         an unsigned char.
4480
4481         * method.c (build_mangled_C9x_name): Wrap prototype and definition
4482         in "HOST_BITS_PER_WIDE_INT >= 64".
4483
4484         * typeck.c (build_binary_op): Mark parameter `convert_p' with
4485         ATTRIBUTE_UNUSED.
4486
4487 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
4488
4489         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
4490         * tree.c (build_exception_variant): Don't crash on empty throw
4491         specs.
4492
4493 1998-12-18  DJ Delorie  <dj@cygnus.com>
4494
4495         * cvt.c (convert_to_reference): Check for both error_mark_node
4496         and NULL_NODE after call to convert_for_initialization.
4497
4498 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
4499
4500         * error.c (interesting_scope_p): New fn.
4501         (dump_simple_decl): Use it.
4502         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
4503         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
4504
4505 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
4506
4507         * class.c (resolve_address_of_overloaded_function): Do conversion
4508         to correct type here, rather than ...
4509         (instantiate_type): Here.
4510
4511         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
4512         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
4513         (decl_template_parm_p): Remove.
4514         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
4515         parameter.
4516         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
4517         * pt.c (push_inline_template_parms_recursive): Set it.
4518         (decl_template_parm_p): Remove.
4519         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
4520         (process_template_parm): Set it.
4521
4522 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
4523
4524         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
4525         if configured with cpplib.
4526
4527 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
4528
4529         * decl.c (poplevel): Make sure ns_binding is initialized.
4530
4531         * decl.c (finish_function): Undo inadvertent change in previous
4532         patch.
4533
4534 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
4535
4536         * class.c (pushclass): Tweak handling of class-level bindings.
4537         (resolve_address_of_overloaded_function): Update pointer-to-member
4538         handling.
4539         (instantiate_type): Likewise.
4540         * cvt.c (cp_convert_to_pointer): Likewise.
4541         * decl.c (pop_binding): Take the DECL to pop, not just the name.
4542         Deal with `struct stat' hack.
4543         (binding_level): Add to documentation.
4544         (push_binding): Clear BINDING_TYPE.
4545         (add_binding): New function.
4546         (push_local_binding): Use it.
4547         (push_class_binding): Likewise.
4548         (poplevel): Adjust calls to pop_binding.
4549         (poplevel_class): Likewise.
4550         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
4551         declarations to current binding level.
4552         (push_class_level_binding): Likewise.
4553         (push_overloaded_decl): Adjust handling of OVERLOADs in local
4554         bindings.
4555         (lookup_namespace_name): Don't crash when confronted with a
4556         TEMPLATE_DECL.
4557         (lookup_name_real): Do `struct stat' hack in local binding
4558         contexts.
4559         (build_ptrmemfunc_type): Adjust documentation.
4560         (grokdeclarator): Don't avoid building real array types when
4561         processing templates unless really necessary.
4562         (finish_method): Adjust calls to pop_binding.
4563         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
4564         not reparse_decl_as_expr.
4565         (build_expr_from_tree): Deal with a template-id as the function to
4566         call in a METHOD_CALL_EXPR.
4567         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
4568         (maybe_adjust_types_For_deduction): Don't do peculiar things with
4569         METHOD_TYPEs here.
4570         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
4571         pointer-to-member types where necessary.
4572         * tree.c (build_cplus_array_type_1): Don't avoid building real
4573         array types when processing templates unless really necessary.
4574         (build_exception_variant): Compare the exception lists correctly.
4575
4576 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
4577
4578         * cp-tree.def (CPLUS_BINDING): Update documentation.
4579         * cp-tree.h (LOCAL_BINDING_P): New macro.
4580         (lang_identifier): Rename local_value to bindings.
4581         (tree_binding): Make `scope' of type `void*', not `tree'.
4582         (BINDING_SCOPE): Update documentation.
4583         (IDENTIFIER_LOCAL_VALUE): Remove.
4584         (IDENTIFIER_CLASS_VALUE): Document.
4585         (IDENTIFIER_BINDING): New macro.
4586         (IDENTIFIER_VALUE): Likewise.
4587         (TIME_IDENTIFIER_TIME): Likewise.
4588         (TIME_IDENTIFIER_FILEINFO): Likewise.
4589         (IMPLICIT_TYPENAME_P): Likewise.
4590         (set_identifier_local_value): Remove.
4591         (push_local_binding): New function.
4592         (push_class_binding): Likewise.
4593         * class.c (pushclass): Update comments; use push_class_binding.
4594         * decl.c (set_identifier_local_value_with_scope): Remove.
4595         (set_identifier_local_value): Likewise.
4596         (push_binding): New function.
4597         (pop_binding): Likewise.
4598         (binding_level): Update documentation.  Remove shadowed.
4599         (BINDING_LEVEL): New macro.
4600         (free_binding_nodes): New variable.
4601         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
4602         BLOCK_VARs when doing for-scope extension.  Remove effectively
4603         dead code.
4604         (pushlevel_class): Tweak formatting.
4605         (poplevel_class): Adjust for new name-lookup scheme.
4606         (print_binding_level): Likewise.
4607         (store_bindings): Likewise.
4608         (pushdecl): Likewise.
4609         (pushdecl_class_level): Likewise.
4610         (push_class_level_binding): Likewise.
4611         (push_overloaded_decl): Update comments.  Adjust for new
4612         name-lookup scheme.
4613         (lookup_name_real): Likewise.
4614         (lookup_name_current_level): Likewise.
4615         (cp_finish_decl): Likewise.
4616         (require_complete_types_for_parms): Likewise.  Remove misleading
4617         #if 0'd code.
4618         (grok_parms): Likewise.  Don't call
4619         require_complete_types_for_parms here.
4620         (grok_ctor_properties): Don't treat templates as copy
4621         constructors.
4622         (grop_op_properties): Or as assignment operators.
4623         (start_function): Document.  Adjust for new name-lookup scheme.
4624         (finish_function): Likewise.
4625         * decl2.c (do_local_using_decl): Use push_local_binding.
4626         * lex.c (begin_definition_of_inclass_inline): New function, split
4627         out from ...
4628         (do_pending_inlines): Here, and ...
4629         (process_next_inline): Here.
4630         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
4631         (init_filename_times): Likewise.
4632         (extract_interface_info): Likewise.
4633         (ste_typedecl_interface_info): Likewise.
4634         (check_newline): Likewise.
4635         (dump_time_statistics): Likewise.
4636         (handle_cp_pragma): Likewise.
4637         (do_identifier): Adjust for new name-lookup scheme.
4638         * parse.y (function_try_block): Return ctor_initializer_opt value.
4639         (fndef): Use it.
4640         (fn.defpen): Pass appropriate values to start_function.
4641         (pending_inline): Use functor_try_block value, and pass
4642         appropriate values to finish_function.
4643         * pt.c (is_member_template): Update documentation; remove handling
4644         of FUNCTION_DECLs.  As per name, this function should deal only in
4645         TEMPLATE_DECLs.
4646         (decl_template_parm_p): Change name of olddecl parameter to decl.
4647         (check_template_shadow): Adjust for new name-lookup scheme.
4648         (lookup_template_class): Likewise.
4649         (tsubst_decl): Tweak so as not to confuse member templates with
4650         copy constructors and assignment operators.
4651         (unify): Handle UNION_TYPEs.
4652         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
4653         (lang_print_xnode): Adjust for new name-lookup scheme.
4654         * typeck.c (mark_addressable): Likewise.
4655         (c_expand_return): Likewise.
4656
4657 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
4658
4659         * decl.c (grokdeclarator): Allow field with same name as class
4660         in extern "C".
4661
4662         * decl.c (lookup_name_real): Don't limit field lookup to types.
4663         * class.c (check_member_decl_is_same_in_complete_scope): No error
4664         if icv and x are the same.
4665         * lex.c (do_identifier): Tweak error message.
4666
4667 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
4668
4669         * decl.c (start_enum): Use push_obstacks, not
4670         end_temporary_allocation.
4671         (finish_enum): Call pop_obstacks.
4672
4673 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
4674
4675         * class.c (instantiate_type): Return error_mark_node rather than
4676         junk.
4677
4678 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
4679
4680         * cp-tree.h (most_specialized_instantiation): New function.
4681         (print_candidates): Likewise.
4682         * class.c (validate_lhs): Remove.
4683         (resolve_address_of_overloaded_function): New function, split out
4684         and then substantially reworked, from ...
4685         (instantiate_type): Use it.  Simplify.
4686         * cvt.c (convert_to_reference): Complain when caller has indicated
4687         that's the right thing to do.  Don't crash if instantiate_type
4688         fails.
4689         * pt.c: Substitute `parameters' for `paramters' throughout.
4690         (print_candidates): Don't make it static.
4691         (most_specialized_instantiation): Split out from ...
4692         (most_specialized): Here.
4693
4694 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
4695
4696         * lex.c (lang_init_options): Initialize cpplib.
4697         * decl2.c (parse_options,cpp_initialized): Removed.
4698         (lang_decode_option): Move initialization of cpplib to
4699         lang_init_options.
4700
4701 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
4702
4703         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
4704         well as the TYPE_DECL, when a typedef name is assigned to a
4705         previously anonymous type.
4706
4707 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
4708
4709         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
4710         __cp_eh_info for getting the eh info pointer.  Add table_index to
4711         field list.
4712         (push_eh_cleanup): Don't increment 'handlers' data field.
4713         (process_start_catch_block): Don't set the 'caught' field.
4714
4715         * cp/exception.cc (CP_EH_INFO): New macro for getting the
4716         exception info pointer within library routines.
4717         (__cp_eh_info): Use CP_EH_INFO.
4718         (__start_cp_handler): Get exception info pointer, set caught field,
4719         and increment the handlers field.  Avoids this being done by handlers.
4720         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
4721         (uncaught_exception): Use CP_EH_INFO macro.
4722
4723 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
4724
4725         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
4726
4727 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
4728
4729         * lex.c (check_newline): Add support for \ as `natural'
4730         characters in file names in #line to be consistent with #include
4731         handling.  We support escape processing in the # 1 "..." version of
4732         the command.  See also support in cp/lex.c.
4733
4734 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
4735
4736         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
4737         structure.
4738
4739 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
4740
4741         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
4742
4743         * error.c (dump_simple_decl): Also print namespace context.
4744         (dump_function_decl): Likewise.
4745
4746         * decl2.c (ambiguous_decl): Don't print old value if it's
4747         error_mark_node.
4748
4749         * decl.c (lookup_name_real): Fix handling of local types shadowed
4750         by a non-type decl.  Remove obsolete code.
4751         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
4752
4753         * lang-options.h: Add -fpermissive.
4754         * decl2.c: Likewise.
4755         * cp-tree.h: Add flag_permissive.
4756         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
4757         were specified, set flag_pedantic_errors.
4758         * call.c (build_over_call): Turn dropped qualifier messages
4759         back into pedwarns.
4760         * cvt.c (convert_to_reference): Likewise.
4761         * typeck.c (convert_for_assignment): Likewise.
4762
4763 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
4764
4765         * decl2.c (coerce_new_type): Use same_type_p.
4766         (coerce_delete_type): Likewise.
4767
4768         * call.c (check_dtor_name): Return 1, not error_mark_node.
4769
4770 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
4771
4772         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
4773         if MULTIPLE_SYMBOL_SPACES.
4774
4775         * pt.c (check_template_shadow): New fn.
4776         * decl2.c (grokfield): Use it.
4777         * decl.c (pushdecl): Likewise.
4778         (pushdecl_class_level): Likewise.
4779         (start_method): Likewise.
4780         (xref_tag): Don't try to use 't' if we're defining.
4781
4782         * call.c (check_dtor_name): Just return an error_mark_node.
4783         * pt.c (lookup_template_class): Complain about using non-template here.
4784         * parse.y (apparent_template_type): Not here.
4785
4786         * pt.c (check_explicit_specialization): Complain about specialization
4787         with C linkage.
4788
4789         * lang-options.h: Add -f{no-,}implicit-inline-templates.
4790
4791         * pt.c (convert_nontype_argument): Don't assume that any integer
4792         argument is intended to be a constant-expression.
4793
4794 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
4795
4796         * class.c (handle_using_decl): Fix comment.  Don't lookup
4797         constructors in base classes.
4798         (validate_lhs): Fix typo in comment.
4799         * search.c (lookup_field_1): Don't return a USING_DECL.
4800
4801         * cp-tree.h (DECL_ACCESS): Improve documentation.
4802
4803         * decl.c (expand_static_init): Don't set the initialization-done
4804         flag until the initialization is done.
4805
4806 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
4807
4808         * decl2.c (validate_nonmember_using_decl): Complain about using
4809         declarations for class members.
4810
4811 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
4812
4813         * typeck2.c (process_init_constructor): Use same_type_p.
4814
4815         * decl.c (check_tag_decl): Don't warn about null decl inside a
4816         class.
4817
4818         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
4819         UNIFY_ALLOW_NONE.
4820         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
4821         (resolve_overloaded_unification): Strip baselinks.
4822
4823 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4824
4825         * g++spec.c: Don't prototype xmalloc.
4826
4827 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
4828
4829         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
4830
4831         * decl.c (check_tag_decl): Do complain about null friend decl at
4832         file scope.
4833
4834 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
4835
4836         * lex.c (make_lang_type): Clear the whole struct lang_type, not
4837         only the first multiple of sizeof (int).
4838
4839 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
4840
4841         * decl.c (start_decl): An explicit specialization of a static data
4842         member is only a definition if it has an initializer.
4843
4844         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
4845         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
4846         cp_finish_decl.
4847         * init.c (expand_default_init): Check for DIRECT_BIND instead of
4848         DECL_ARTIFICIAL.
4849
4850         * call.c (build_over_call): Use build_decl.
4851
4852         * except.c (expand_throw): Just use convert, not
4853         build_reinterpret_cast.
4854
4855         * lex.c (handle_generic_pragma): Use token_buffer.
4856
4857         * decl.c (check_tag_decl): Don't complain about null friend decl.
4858
4859 1998-11-24  Dave Pitts  <dpitts@cozx.com>
4860
4861         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
4862         first position.
4863         * lex.c (check_newline): Use ISALPHA.
4864         (readescape): Use ISGRAPH.
4865         (yyerror): Use ISGRAPH.
4866
4867 1998-11-24  Nathan Sidwell  <nathan@acm.org>
4868
4869         * search.c (get_abstract_virtuals): Do not use initial
4870         CLASSTYPE_ABSTRACT_VIRTUALS.
4871         * typeck2.c (abstract_virtuals_error): Show location of abstract
4872         declaration.
4873         * call.c (build_new_method_call): Use
4874         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
4875         * class.c (finish_struct_bits): Don't bother working out whether
4876         get_abstract_virtuals will do anything, just do it.
4877
4878 1998-11-24  Graham  <grahams@rcp.co.uk>
4879
4880         * typeck.c (build_component_ref): Remove unused statement.
4881
4882 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
4883
4884         * class.c (add_method): Catch invalid overloads.
4885
4886         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
4887         * search.c (lookup_conversions): Handle getting real OVERLOADs.
4888         (add_conversions): Likewise.  Revert last change.
4889         * call.c (add_conv_candidate): Pass totype to add_candidate instead
4890         of fn.  Don't add a new candidate if the last one was for the same
4891         type.
4892         (print_z_candidates): Handle getting a type as a function.
4893         (joust): If we got two conversion candidates to the same type,
4894         just pick one.
4895         (build_object_call): Lose 'templates'.
4896         (build_user_type_conversion_1): Handle getting real OVERLOADs.
4897
4898 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
4899
4900         * typeck2.c (process_init_constructor): If there are elements
4901         that don't have initializers and they need to have constructors
4902         run, supply them with initializers.
4903
4904         * class.c (finish_struct_1): A class with a 0-width bitfield is
4905         still empty.
4906
4907 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
4908
4909         * pt.c (instantiate_class_template): Don't try to figure out what
4910         specialization to use for a partial instantiation.  Correct
4911         typos in a couple of comments.  Avoid calling uses_template_parms
4912         multiple times.
4913
4914 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
4915
4916         * method.c (process_overload_item): Add call to
4917         build_mangled_C9x_name for intTI_type_nodes.
4918         (build_mangled_C9x_name): Add prototype, define.
4919         * decl.c (init_decl_processing): Add names for
4920         TImode_type_node.
4921
4922 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
4923
4924         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
4925
4926         * class.c (finish_struct_1): Set things up for 0-width bitfields
4927         like we do for others.
4928
4929         * decl.c (check_tag_decl): New fn.
4930         (shadow_tag): Split out from here.
4931         * decl2.c (grok_x_components): Call it.
4932
4933 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
4934
4935         * decl.c: Lose warn_about_return_type.
4936         (grokdeclarator): Always complain about implicit int, except for
4937         `main () { ... }'.
4938
4939         * decl.c (tag_name): New fn.
4940         (xref_tag): Complain about using typedef-name after class-key.
4941
4942         * init.c (expand_vec_init): Also keep going if from_array.
4943
4944         * tree.c (is_overloaded_fn): Also handle the output of
4945         build_offset_ref.
4946
4947         * decl.c (grokdeclarator): Use constructor_name when comparing
4948         field name against enclosing class.
4949         * class.c (finish_struct_anon): Likewise.
4950
4951 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
4952
4953         * decl.c (poplevel): Remove code to handle KEEP == 2.
4954         (finish_function): Don't confuse BLOCK-order when
4955         processing a destructor.
4956
4957 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
4958
4959         * decl.c (require_complete_types_for_parms): Call layout_decl
4960         after we've completed the type.
4961
4962 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4963
4964         * decl2.c (validate_nonmember_using_decl): Allow using templates
4965         from the global namespace.
4966
4967 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
4968
4969         Handle specifying template args to member function templates.
4970         * tree.c (build_overload): Always create an OVERLOAD for a template.
4971         * search.c (add_conversions): Handle finding an OVERLOAD.
4972         * decl2.c (check_classfn): Likewise.
4973         * lex.c (identifier_type): See through a baselink.
4974         * parse.y (do_id): Don't call do_identifier if we got a baselink.
4975         * class.c (instantiate_type, case TREE_LIST): Recurse.
4976
4977         * decl.c (grokdeclarator): Allow a boolean constant for array
4978         bounds, odd as that sounds.
4979
4980         * pt.c (unify): Be more strict about non-type parms, except for
4981         array bounds.
4982         (UNIFY_ALLOW_INTEGER): New macro.
4983
4984 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
4985
4986         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
4987
4988 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
4989
4990         * semantics.c (begin_class_definition): Call
4991         maybe_process_partial_specialization before push_template_decl.
4992         Don't call push_template_decl for a specialization.
4993         * search.c (lookup_field): Do return a member template class.
4994         * decl2.c (handle_class_head): Handle member template classes.
4995
4996         * decl.c (grokdeclarator): A parm type need not be complete.
4997
4998         * pt.c (convert_nontype_argument): Fix thinko.
4999
5000 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
5001
5002         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
5003         (global_delete_fndecl): New variable.
5004         * decl.c (global_delete_fndecl): Define it.
5005         (init_decl_processing): Set it.
5006         * init.c (build_builtin_delete_call): Use it.
5007         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
5008         nodes.
5009
5010 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
5011
5012         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
5013         type.
5014
5015         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
5016         * call.c (build_object_call): Also support references to functions.
5017         * typeck.c (convert_for_initialization): Don't decay a function
5018         if the target is a reference to function.
5019
5020         * search.c (add_conversions): Get all the overloads from a class.
5021
5022         * decl.c (grok_ctor_properties): Complain about any constructor
5023         that will take a single arg of the class type by value.
5024
5025         * typeck2.c (build_functional_cast): Can't create objects of
5026         abstract classes this way.
5027         * cvt.c (ocp_convert): Likewise.
5028
5029         * decl.c (grokfndecl): Member functions of local classes are not
5030         public.
5031
5032 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
5033
5034         * Make-lang.in (cc1plus): Add dependency on hash.o.
5035
5036 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
5037
5038         * search.c (get_abstract_virtuals): Complain about virtuals with
5039         no final overrider.
5040         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
5041         with no final overrider.
5042         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
5043         on virtuals with no final overrider.
5044
5045         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
5046
5047         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
5048         after layout_type.
5049
5050         * friend.c (do_friend): Don't set_mangled_name_for_decl.
5051
5052         * class.c (finish_struct_anon): Complain about non-fields.
5053         * decl2.c (build_anon_union_vars): Likewise.
5054
5055         * decl.c (grokdeclarator): Normal data members can't have the same
5056         name as the class, either.
5057         * class.c (finish_struct_anon): Neither can members of an
5058         anonymous union.
5059
5060 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
5061
5062         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
5063         (TYPE_BINFO): Likewise.
5064         (IS_AGGR_TYPE): Tweak.
5065         (SET_IS_AGGR_TYPE): New macro.
5066         (CLASS_TYPE_P): Tweak.
5067         (lang_type): Group mark bitfields together.  Remove linenum.
5068         (CLASSTYPE_SOURCE_LINE): Remove macro.
5069         (CLASSTYPE_MARKED_N): New macro.
5070         (SET_CLASSTYPE_MARKED_N): Likewise.
5071         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
5072         (CLASS_TYPE_MARKED_*): Use them.
5073         (SET_CLASSTYPE_MARKED_*): Likewise.
5074         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
5075         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
5076         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
5077         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
5078         * class.c (class_cache_obstack): New variable.
5079         (class_cache_firstobj): Likewise.
5080         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
5081         (pushclass): Free the cache, when appropriate.
5082         (popclass): Tidy.
5083         (maybe_push_cache_obstack): Use class_cache_obstack.
5084         * decl.c (include hash.h).
5085         (typename_hash): New function.
5086         (typename_compare): Likewise.
5087         (build_typename_type): Check the hash table to avoid creating
5088         duplicates.
5089         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
5090         (grokdeclarator): Use CLASS_TYPE_P.
5091         (xref_basetypes): Likewise.
5092         (start_function): Likewise.  Don't put current_class_ref on the
5093         permanent obstack.
5094         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
5095         and TYPE_TI_ARGS.
5096         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
5097         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
5098         fields for types other than class types.  Do clear TYPE_ALIAS_SET
5099         for types other than class types, though.
5100         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
5101         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5102         * pt.c (process_template_parm): Don't set
5103         CLASSTYPE_GOT_SEMICOLON.
5104         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5105         Coerce arguments on the momentary obstack.
5106         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5107         (instantiate_class_template): Calculate template arguments on the
5108         momentary obstack.  Tidy.
5109         (tsubst_template_arg_vector): Use make_temp_vec.
5110         (tsubst_aggr_type): Put template arguments on the momentary
5111         obstack.
5112         (tsubst_decl): Likewise.
5113         (tsubst): Copy the array bounds index to the permanent obstack
5114         before building index types.  Use new macros.
5115         (unify): Use new macros.
5116         (do_type_instantiation): Likewise.
5117         * search.c (lookup_fnfields_1): Use new macros.
5118         (dfs_pushdecls): Build envelopes on the cache obstack.
5119         (dfs_compress_decls): Use new macros.
5120         (push_class_decls): Build on the cache obstack.
5121         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
5122         * sign.c (build_signature_pointer_or_reference_type): Use
5123         SET_IS_AGGR_TYPE.
5124         * tree.c (make_binfo): Check CLASS_TYPE_P.
5125         (copy_template_template_parm): Adjust.
5126         (make_temp_vec): Use push_expression_obstack.
5127         * typeck.c (complete_type): Use new macros.
5128         (comptypes): Likewise.
5129
5130 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
5131
5132         * pt.c (tsubst): Add diagnostics for invalid array, reference
5133         and pointer to member types.
5134
5135 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
5136
5137         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
5138
5139         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
5140         Simplify.
5141
5142         * parse.y (structsp): Fix cut-and-paste error.
5143
5144         * init.c (build_new): Complain about non-integral size.
5145
5146         * parse.y (unary_expr): Complain about defining types in sizeof.
5147
5148         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
5149
5150         * rtti.c (build_x_typeid): Complain about typeid without
5151         including <typeinfo>.
5152         (get_typeid): Likewise.  Complain about typeid of incomplete type.
5153         (get_tinfo_fn_dynamic): Likewise.
5154         (get_typeid_1): Not static anymore.
5155         * except.c (build_eh_type_type): Use get_typeid_1.
5156
5157         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
5158         ambiguous or private bases.  Fix warning for reference cast.
5159
5160 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
5161
5162         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
5163         * decl.c (duplicate_decls): Remove special-case code to deal with
5164         template friends, and just do the obvious thing.
5165         * pt.c (register_specialization): Tweak for clarity, and also to
5166         clear DECL_INITIAL for an instantiation before it is merged with a
5167         specialization.
5168         (check_explicit_specialization): Fix indentation.
5169         (tsubst_friend_function): Handle both definitions in friend
5170         declaration and outside friend declarations.
5171         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
5172         (regenerate_decl_from_template): Tweak accordingly.
5173         (instantiate_decl): Likewise.
5174
5175 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
5176
5177         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
5178         member function reference to error.
5179         * cvt.c (ocp_convert): Complain about converting an overloaded
5180         function to void.
5181
5182         * init.c (build_offset_ref): Just return a lone static member
5183         function.
5184
5185         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
5186         not internal ones.
5187
5188         * typeck.c (build_binary_op_nodefault): Improve error handling.
5189
5190         * decl.c (grokfndecl): Complain about making 'main' a template.
5191
5192         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
5193
5194         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
5195         TYPE_DECL in a template.
5196
5197 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
5198
5199         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
5200
5201         * decl.c (struct cp_function): Add named_label_uses.
5202         (push_cp_function_context): Save it.
5203         (pop_cp_function_context): Restore it.
5204         (define_label): Also complain about jumping into the scope of
5205         non-POD objects that don't have constructors.
5206         * tree.c (pod_type_p): New fn.
5207
5208         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
5209         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
5210         (get_tinfo_fn): Not here.
5211         * repo.c (repo_get_id): Abort if we get called for an incomplete
5212         type.
5213
5214 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
5215
5216         * except.c (expand_throw): Make sure first argument to
5217         __cp_push_exception is of type `void*' to avoid spurious error
5218         messages.
5219
5220 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
5221
5222         * pt.c (try_one_overload): Take orig_targs again.  Only check for
5223         mismatches against them; we don't care what a previous call found.
5224         (resolve_overloaded_unification): Adjust.
5225
5226         * search.c (lookup_field): Don't return anything for a non-type
5227         field from a dependent type.
5228         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
5229         in an array declarator.
5230         (start_decl): Push into the class before looking for the field.
5231
5232 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
5233
5234         * method.c (build_overload_value): Handle REFERENCE_TYPE.
5235
5236 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5237
5238         * decl.c (grokdeclarator): Allow namespace-scoped members if they
5239         are friends.
5240
5241 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
5242
5243         * pt.c (tsubst_decl): Don't mess with the global value of an
5244         un-mangled DECL_ASSEMBLER_NAME.
5245
5246 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
5247
5248         * decl.c (init_decl_processing): Remove CYGWIN conditional
5249         since CYGWIN is now able to deal with trapping signals.
5250
5251 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5252
5253         * cp-tree.h: Don't include gansidecl.h.
5254         * exception.cc: Include gansidecl.h (since we don't include config.h)
5255         * g++spec.c: Don't include gansidecl.h.
5256
5257 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
5258
5259         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
5260         size of dummy.
5261         (DECL_DEFINED_IN_CLASS_P): New macro.
5262         (TEMPLATE_PARMS_FOR_INLINE): Document.
5263         (check_static_variable_definition): New function.
5264         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
5265         appropriate.
5266         (check_static_variable_definition): Split out from ...
5267         (grokdeclarator): Here.
5268         * pt.c (check_default_tmpl_args): New function, split out from ...
5269         (push_template_decl_real): Here.
5270         (instantiate_template): Fix comment.
5271
5272 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
5273
5274         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
5275         (CP_TYPE_VOLATILE_P): Likewise.
5276         (CP_TYPE_RESTRICT_P): Likewise.
5277
5278 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
5279
5280         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
5281
5282 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
5283
5284         * class.c (instantiate_type): Be more helpful.
5285
5286         * decl2.c (import_export_decl): Call import_export_class.
5287
5288         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
5289         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
5290         * pt.c (tsubst_copy): Likewise.
5291
5292 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
5293
5294         * init.c (expand_vec_init): Fix off-by-one error.
5295
5296 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
5297
5298         * parse.y (apparent_template_type): New type.
5299         (named_complex_class_head_sans_basetype): Use it.
5300         * Makefile.in (CONFLICTS): One new conflict.
5301         * parse.c: Regenerated.
5302
5303 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
5304
5305         * cp-tree.h (COMPARE_STRICT): New macro.
5306         (COMPARE_BASE): Likewise.
5307         (COMPARE_RELAXED): Likewise.
5308         (COMPARE_REDECLARATION): Likewise.
5309         (same_type_p): Likewise.
5310         (same_or_base_type_p): Likewise.
5311         * call.c (standard_conversion): Use them, in place of comptypes
5312         with numeric arguments.
5313         (reference_binding): Likewise.
5314         (convert_like): Likewise.
5315         (build_over_call): Likewise.
5316         (is_subseq): Likewise.
5317         (is_properly_derived_from): Likewise.
5318         (compare_ics): Likewise.
5319         (joust): Likewise.
5320         * class.c (delete_duplicate_fields_1): Likewise.
5321         (resolves_to_fixed_type_p): Likewise.
5322         (instantiate_type): Likewise.  Remove #if 0'd code.
5323         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
5324         (pushdecl): Likewise.
5325         (lookup_name_real): Likewise.
5326         (grokdeclarator): Likewise.  Check for illegal array declarations.
5327         (grokparms): Likewise.
5328         (grok_op_properties): Likewise.
5329         * decl2.c (check_classfn): Likewise.
5330         * friend.c (is_friend): Likewise.
5331         (make_friend_class): Likewise.
5332         * init.c (expand_aggr_init): Likewise.
5333         (expand_vec_init): Likewise.
5334         * pt.c (is_member_template_class): Remove declaration.
5335         (is_specialization_of): Use COMPARE_* and new macros.
5336         (comp_template_parms): Likewise.
5337         (convert_nontype_argument): Likewise.
5338         (coerce_template_template_parms): Likewise.
5339         (template_args_equal): Likewise.
5340         (lookup_template_class): Likewise.
5341         (type_unification_real): Likewise.
5342         (unify): Likewise.
5343         (get_bindings_real): Likewise.
5344         * search.c (covariant_return_p): Likewise.
5345         (get_matching_virtual): Likewise.
5346         * sig.c (match_method_types): Likewise.
5347         * tree.c (vec_binfo_member): Likewise.
5348         (cp_tree_equal): Likewise.
5349         * typeck.c (common_type): Likewise.
5350         (comp_array_types): Likewise.  Get issues involving unknown array
5351         bounds right.
5352         (comptypes): Update comments.  Use new flags.
5353         (comp_target_types): Use new macros.
5354         (compparms): Likewise.
5355         (comp_target_parms): Likewise.
5356         (string_conv_p): Likewise.
5357         (build_component_ref): Likewise.
5358         (build_indirect_ref): Likewise.
5359         (build_conditional_expr): Likewise.
5360         (build_static_cast): Likewise.
5361         (build_reinterpret_cast): Likewise.
5362         (build_const_cast): Likewise.
5363         (build_modify_expr): Likewise.
5364         (convert_for_assignment): Likewise.
5365         (comp_ptr_ttypes_real): Likewise.
5366         (ptr_reasonably_similar): Likewise.
5367         (comp_ptr_ttypes_const): Likewise.
5368
5369 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
5370
5371         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
5372
5373 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
5374
5375         * decl2.c (delete_sanity): Pass integer_zero_node, not
5376         integer_two_node, to build_vec_delete.
5377         * init.c (build_array_eh_cleanup): Remove.
5378         (expand_vec_init_try_block): New function.
5379         (expand_vec_init_catch_clause): Likewise.
5380         (build_vec_delete_1): Don't deal with case that auto_delete_vec
5381         might be integer_two_node anymore.
5382         (expand_vec_init): Rework for initialization-correctness and
5383         exception-correctness.
5384         * typeck2.c (process_init_constructor): Make mutual exclusivity
5385         of cases more obvious.
5386
5387 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
5388
5389         * decl.c (lookup_name_real): OK, only warn if not lexing.
5390         Simplify suggested fix.
5391
5392         * cp-tree.h (IDENTIFIER_MARKED): New macro.
5393         * search.c (lookup_conversions): Use breadth_first_search.
5394         (add_conversions): Avoid adding two conversions to the same type.
5395         (breadth_first_search): Work with base binfos, rather
5396         than binfos and base indices.
5397         (get_virtual_destructor): Adjust.
5398         (tree_has_any_destructor_p): Adjust.
5399         (get_matching_virtual): Adjust.
5400
5401         * pt.c (push_template_decl_real): Generalize check for incorrect
5402         number of template parms.
5403         (is_member_template_class): #if 0.
5404
5405 1998-10-29  Richard Henderson  <rth@cygnus.com>
5406
5407         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
5408         last.
5409
5410 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5411
5412         * lex.c: Call check_newline from lang_init always.  After
5413         calling cpp_start_read, set yy_cur and yy_lim to read from the
5414         cpplib token buffer.
5415
5416 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
5417
5418         * class.c (instantiate_type): Don't consider templates for a normal
5419         match.
5420
5421         * class.c (finish_struct_1): Don't complain about non-copy
5422         assignment ops in union members.
5423
5424         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
5425         (prepare_fresh_vtable): Likewise.
5426         (finish_struct_1): Don't call import_export_class.
5427         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
5428         (finish_prevtable_vardecl): Lose.
5429         (finish_file): Don't call it.
5430         * pt.c (instantiate_class_template): Likewise.
5431         * cp-tree.h: Remove it.
5432
5433         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
5434         * decl.c (finish_function): Not here.
5435         (start_function): Do set DECL_INITIAL.
5436
5437         * pt.c (push_template_decl_real): Complain about default template
5438         args for enclosing classes.
5439
5440         * call.c (add_function_candidate): Treat conversion functions
5441         as coming from the argument's class.
5442         * cp-tree.h (DECL_CONV_FN_P): New fn.
5443         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
5444         * class.c (add_method): Use DECL_CONV_FN_P.
5445         * decl2.c (check_classfn): Likewise.
5446         * error.c (dump_function_name): Likewise.
5447         (dump_function_decl): Likewise.
5448         * pt.c (fn_type_unification): Likewise.
5449         * search.c (add_conversions): Likewise.
5450
5451 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
5452
5453         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
5454         * method.c (hack_identifier): Also check for using RESULT_DECL
5455         from outer context.
5456
5457 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
5458
5459         * decl.c (grokdeclarator): Use type_quals, rather than constp,
5460         consistently.
5461
5462 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
5463
5464         * call.c (standard_conversion): instantiate_type here.
5465         (reference_binding): And here.
5466         (implicit_conversion): Not here.
5467         (build_op_delete_call): No need to cons up an OVERLOAD.
5468         * cvt.c (cp_convert_to_pointer): instantiate_type here.
5469         (convert_to_reference): And here.
5470         * decl.c (grok_reference_init): Not here.
5471         (grokparms): Or here.
5472         * typeck2.c (digest_init): Or here.
5473         * typeck.c (decay_conversion): Take the address of overloaded
5474         functions, too.
5475         (require_instantiated_type): Lose.
5476         (convert_arguments): Don't handle unknown types here.
5477         (build_c_cast): Likewise.
5478         (build_binary_op): Gut.
5479         (build_conditional_expr): Don't require_instantiated_type.
5480         (build_modify_expr): Likewise.
5481         (build_static_cast): Don't instantiate_type.
5482         (build_reinterpret_cast): Likewise.
5483         (build_const_cast): Likewise.
5484         (convert_for_initialization): Likewise.
5485         (build_ptrmemfunc): Use type_unknown_p.
5486         (convert_for_assignment): Also do default_conversion on overloaded
5487         functions.  Hand them off to ocp_convert.
5488
5489 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
5490
5491         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
5492         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
5493
5494         * class.c (finish_struct_1): Use build_cplus_array_type to build
5495         array types.
5496         * decl.c (init_decl_processing): Likewise.
5497         * except.c (expand_end_eh_spec): Likewise.
5498         * search.c (expand_upcast_fixups): Simplify very slightly.
5499
5500 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
5501
5502         * decl.c (grokdeclarator): Complain about a variable using
5503         constructor syntax coming back null from start_decl.
5504
5505         * friend.c (make_friend_class): Complain about trying to make
5506         a non-class type a friend.
5507
5508         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
5509         (start_function): Not here.
5510
5511 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
5512
5513         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
5514
5515 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
5516
5517         * typeck2.c (process_init_constructor): Only skip anonymous fields
5518         if they are bitfields.
5519
5520         * cp-tree.def (TYPEOF_TYPE): New code.
5521         * error.c (dump_type_real): Handle it.
5522         * pt.c (tsubst): Likewise.
5523         * tree.c (search_tree): Likewise.
5524         * semantics.c (finish_typeof): New fn.
5525         * parse.y (typespec): Use it.
5526         * cp-tree.h: Declare it.
5527
5528 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
5529
5530         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
5531
5532 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
5533
5534         * typeck.c (convert_arguments): Don't handle pmf references
5535         specially.
5536
5537         * init.c (build_member_call): Don't try to convert to the base type
5538         if it's ambiguous or pedantic.
5539
5540         * typeck2.c (check_for_new_type): Only depend on pedantic for
5541         C-style casts.
5542
5543 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
5544
5545         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
5546         non-converting constructors.
5547
5548 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5549
5550         * gxxint.texi: Correct documentation for n, N, Q, and B.
5551
5552 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5553
5554         * parse.y (condition): Convert VAR_DECL from reference to indirect
5555         reference.
5556
5557 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
5558
5559         * exception.cc (__cp_pop_exception): Free the original exception
5560         value, not the potentially coerced one.
5561
5562 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
5563
5564         * Makefile.in (hash.h): Run gperf when necessary.
5565
5566         * cp-tree.h (CP_TYPE_READONLY): Remove.
5567         (CP_TYPE_VOLATILE): Likewise.
5568         (CP_TYPE_QUALS): New macro.
5569         (CP_TYPE_CONST_P): Likewise.
5570         (CP_TYPE_VOLATILE_P): Likewise.
5571         (CP_TYPE_RESTRICT_P): Likewise.
5572         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
5573         (cp_build_type_variant): Rename to ...
5574         (cp_build_qualified_type): New function.
5575         (c_apply_type_quals_to_decl): Declare.
5576         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
5577         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
5578         (cp_type_qual_from_rid): New function.
5579         (compparms): Remove unused parameter.  All callers changed.
5580         (cp_type_quals): New function.
5581         (at_least_as_qualified_p): Likewise.
5582         (more_qualified_p): Likewise.
5583
5584         * call.c (standard_conversion): Replace calls to
5585         cp_build_type_variant with cp_build_qualified_type.  Use
5586         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
5587         compare them.  Use CP_TYPE_* macros to check qualifiers.
5588         (reference_binding): Likewise.
5589         (implicit_conversion): Likewise.
5590         (add_builtin_candidates): Likewise.
5591         (build_over_call): Likewise.
5592         * class.c (overrides): Compare all qualifiers, not just `const',
5593         on method declarations.
5594         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
5595         (convert_pointer_to_real): Likewise.
5596         (type_promotes_to): Likewise.
5597         * decl.c (check_for_uninitialized_const_var): New function.
5598         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
5599         (cp_finish_decl): Use check_for_uninitialized_const_var.
5600         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
5601         handle `restrict'.
5602         (grok_ctor_properties): Likewise.
5603         (grok_op_properties): Likewise.
5604         (start_function): Likewise.
5605         (rever_static_member_fn): Likewise.
5606         * decl2.c (grok_method_quals): Likewise.
5607         (grokfield): Likewise.
5608         * error.c (dump_readonly_or_volatile): Rename to ...
5609         (dump_qualifiers): New function.  Handle `restrict'.
5610         (dump_type_real): Use it.
5611         (dump_aggr_type): Likewise.
5612         (dump_type_prefix): Likewise.
5613         (dump_type_suffix): Likewise.
5614         (dump_function_decl): Likewise.
5615         (cv_as_string): Likewise.
5616         * gxx.gperf: Add __restrict and __restrict__.
5617         * gxxint.texi: Document `u' as used for `__restrict', and a few
5618         other previously undocumented codes.
5619         * hash.h: Regenerated.
5620         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
5621         (build_member_call): Likewise.
5622         (build_new_1): Likewise.
5623         * lex.c (init_parse): Add entry for RID_RESTRICT.
5624         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
5625         (cp_type_qual_from_rid): Define.
5626         * lex.h (enum rid): Add RID_RESTRICT.
5627         * method.c (process_modifiers): Deal with `restrict'.
5628         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
5629         * parse.c: Regenerated.
5630         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
5631         (tsubst_aggr_type): Likewise.
5632         (tsubst): Likewise.
5633         (check_cv_quals_for_unify): Likewise.
5634         (unify): Likewise.
5635         * rtti.c (init_rtti_processing): Likewise.
5636         (build_headof): Likewise.
5637         (get_tinfo_var): Likewise.
5638         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
5639         (expand_class_desc): Likewise.
5640         (expand_attr_desc): Likewise.
5641         (synthesize_tinfo_fn): Likewise.
5642         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
5643         (get_matching_virtual): Likewise.
5644         (expand_upcast_fixups): Likewise.
5645         * sig.c (build_signature_pointer_or_reference_name): Take
5646         type_quals, not constp and volatilep.
5647         (build_signature_pointer_or_reference_type): Likewise.
5648         (match_method_types): More CP_TYPE_QUALS conversion, etc.
5649         (build_signature_pointer_constructor): Likewise.
5650         (build_signature_method_call): Likewise.
5651         * tree.c (build_cplus_array_type): Likewise.
5652         (cp_build_type_variant): Rename to ...
5653         (cp_build_qualified_type): New function.  Deal with `__restrict'.
5654         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
5655         (build_exception_variant): Likewise.
5656         (mapcar): Likewise.
5657         * typeck.c (qualif_type): Likewise.
5658         (common_type): Likewise.
5659         (comptypes): Likewise.
5660         (comp_cv_target_types): Likewise.
5661         (at_least_as_qualified_p): Define.
5662         (more_qualified_p): Likewise.
5663         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
5664         (compparms): Likewise.
5665         (inline_conversion): Likewise.
5666         (string_conv_p): Likewise.
5667         (build_component_ref): Likewise.
5668         (build_indirect_ref): Likewise.
5669         (build_array_ref): Likewise.
5670         (build_unary_op): Likewise.
5671         (build_conditional_expr): Likewise.
5672         (build_static_cast): Likewise.
5673         (build_c_cast): Likewise.
5674         (build_modify_expr): Likewise.
5675         (convert_For_assignment): Likewise.
5676         (comp_ptr_ttypes_real): Likewise.
5677         (cp_type_quals): New function.
5678
5679 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
5680
5681         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
5682         (CP_TYPE_VOLATILE): Likewise.
5683         * decl.c (grokdeclarator): Use them.
5684         * tree.c (canonical_type_variant): Likewise.
5685
5686 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5687
5688         * parse.y (named_class_head): Push into class while parsing the
5689         base class list.
5690         * decl2.c (push_scope, pop_scope): New functions.
5691         * cp-tree.h: Declare them.
5692         * init.c (build_new_1): Delay cleanup until end of full expression.
5693
5694 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
5695
5696         * typeck.c (build_component_ref): Use of a type here is an error.
5697
5698 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
5699
5700         Revamp references to member functions.
5701         * method.c (hack_identifier): Call build_component_ref for a
5702         reference to a member function.
5703         * typeck.c (build_component_ref): Only return a single function
5704         if it's static.  Otherwise, return a COMPONENT_REF.
5705         (build_x_function_call): Handle a COMPONENT_REF.
5706         (build_unary_op): Handle all unknown-type things.
5707         * decl2.c (arg_assoc): Handle COMPONENT_REF.
5708         * class.c (instantiate_type): Complain if the function we get is a
5709         nonstatic member function.  Remove code for finding "compatible"
5710         functions.
5711         * pt.c (tsubst_copy): Handle NOP_EXPR.
5712         * tree.c (build_dummy_object): New fn.
5713         (maybe_dummy_object): New fn.
5714         (is_dummy_object): New fn.
5715         * cp-tree.h: Declare them.
5716         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
5717         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
5718         * init.c (build_member_call): Use maybe_dummy_object and
5719         is_dummy_object.
5720         (build_offset_ref): Use maybe_dummy_object.
5721         (resolve_offset_ref): Use is_dummy_object.
5722         * typeck.c (build_x_function_call): Call build_dummy_object.
5723         (unary_complex_lvalue): Call is_dummy_object.
5724
5725         * typeck.c (build_component_addr): Make sure field is a field.
5726
5727         * call.c (build_new_op): Delete obsolete code.
5728
5729         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
5730
5731 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5732
5733         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
5734         std if std is ignored.
5735
5736 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
5737
5738         * decl.c (grokvardecl): Fix thinko.
5739
5740         * decl.c (grokdeclarator): Embedded attrs bind to the right,
5741         not the left.
5742
5743         * parse.y (fn.def2): Fix 'attrs' format.
5744
5745 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
5746
5747         * Makefile.in (CONFLICTS): Update.
5748         * parse.y (expr_or_declarator_intern): New rule.
5749         (expr_or_declarator, direct_notype_declarator, primary,
5750         functional_cast): Use it.
5751         (notype_declarator_intern): New rule.
5752         (notype_declarator, complex_notype_declarator): Use it.
5753
5754 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
5755
5756         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
5757         (grokvardecl): Likewise.
5758
5759 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5760
5761         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
5762         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
5763
5764         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
5765
5766         * pt.c (process_partial_specialization): Cast 1st argument of
5767         `bzero' to (PTR).
5768
5769         * tree.c (build_base_fields): Cast `base_align' to (int) when
5770         comparing against one.
5771
5772 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
5773
5774         * decl.c (lookup_name_real): Handle template parameters for member
5775         templates where said parameters have the same name as the
5776         surrounding class.
5777
5778         * decl.c (expand_static_init): Build cleanups before entering the
5779         anonymous function used to do them to avoid access-checking
5780         confusion.
5781
5782         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
5783         accidentally removed by previous change, and make DECL_RTL here.
5784         * class.c (add_method): Don't make DECL_RTL here.
5785
5786         * pt.c (for_each_template_parm): Don't examine uninstantiated
5787         default arguments.
5788
5789 1998-10-16  Dave Brolley  <brolley@cygnus.com>
5790
5791         * lex.c (real_yylex): Fix unaligned access of wchar_t.
5792
5793 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
5794
5795         * class.c (add_method): Fix documentation to reflect previous
5796         changes.  Check for duplicate method declarations here.
5797         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
5798         correctly; such things never match.
5799         (grokfndecl): Don't look for duplicate methods here.
5800         * decl2.c (check_classfn): Don't assume names are mangled.
5801         Don't add bogus member function declarations to a class before the
5802         class type is complete.
5803         (grokfield): Reformat error message.
5804         * method.c (set_mangled_name_for_decl): Don't mangle names while
5805         processing_template_decl.
5806
5807 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
5808
5809         * typeck.c (build_indirect_ref): Complain about a pointer to data
5810         member, too.
5811         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
5812         data member.
5813         * init.c (resolve_offset_ref): Don't undo the above.
5814
5815         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
5816         (struct lang_decl_flags): Add `bitfield'.
5817         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
5818         DECL_BIT_FIELD.
5819         * decl2.c (grokbitfield, grok_alignof): Likewise.
5820         * init.c (build_offset_ref): Likewise.
5821         * typeck.c (build_component_addr, expr_sizeof): Likewise.
5822         * cvt.c (build_up_reference): Don't crash if taking the address
5823         returns error_mark_node.
5824
5825         * decl.c (grokfndecl): Also check ctype when checking for ::main().
5826
5827 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
5828
5829         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
5830         Do mangling here.
5831         (grokdeclarator): Instead of here.
5832         * friend.c (do_friend): Lose special handling of ::main and
5833         __builtin_*.
5834         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
5835
5836         * spew.c (yylex): Clear looking_for_typename if we got
5837         'enum { ... };'.
5838
5839 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
5840
5841         * class.c (maybe_warn_about_overly_private_class): Improve error
5842         messages for class with only private constructors.
5843
5844         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
5845         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
5846         (build_typename_type): New function.
5847         * decl.c (build_typename_type): Broken out from ...
5848         (make_typename_type): Use it.
5849         * search.c (lookup_field): Likewise.
5850
5851 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
5852
5853         * pt.c (convert_nontype_argument): Check against type_referred_to.
5854         * decl.c (grokvardecl): Check for declarator name before building
5855         DECL_ASSEMBLER_NAME.
5856
5857 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
5858
5859         * pt.c (lookup_template_class): Add comment.
5860         (instantiate_class_template): Don't mark the _TYPE node for
5861         member class templates as an instantiation.
5862
5863 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
5864
5865         * decl.c (grokfndecl): Fix my thinko.
5866
5867 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
5868
5869         * tinfo2.cc (fast_compare): Remove.
5870         (before): Just use strcmp.
5871         * tinfo.cc (operator==): Just use strcmp.
5872
5873 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
5874
5875         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
5876         declarations.
5877
5878 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
5879
5880         * cp-tree.h (specializations_of_same_template_p): Remove.
5881         * search.c (get_template_base): Don't use it.
5882         (get_template_base_recursive): Likewise.
5883         * pt.c (specializations_of_same_template_p): Remove.
5884         (unify): Don't use it.
5885         (lookup_template_class): Find the correct parent when setting
5886         CLASSTYPE_TI_TEMPLATE.
5887
5888 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
5889
5890         * tinfo.cc (operator==): Always compare names.
5891
5892 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
5893
5894         * decl.c (start_function): Fix cut-and-paste error.
5895
5896 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
5897
5898         * inc/typeinfo: Add #pragma interface.
5899         (operator!=): Just call operator==.
5900         * tinfo.cc: Add #pragma implementation.
5901         (operator==): Move from inc/typeinfo and tinfo2.cc.
5902         Check __COMMON_UNRELIABLE instead of _WIN32.
5903
5904         * typeck2.c (my_friendly_abort): Add URL.
5905
5906 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
5907
5908         * decl.c (start_method): Added extra parameter for attributes.
5909         * cp-tree.h (start_method): Update prototype.
5910         * parse.y (fn.def2): Update start_method parameter list.
5911
5912 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
5913
5914         * cp-tree.h (specializations_of_same_template_p): Declare.
5915         * pt.c (specializations_of_same_template_p): New function.
5916         (unify): Use it.
5917         * search.c (get_template_base): Use it.
5918         (get_template_base_recursive): Likewise.
5919
5920 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
5921
5922         * decl2.c (start_objects): Add new variable `joiner' and
5923         initialize it properly.
5924
5925 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
5926
5927         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
5928         change to vtable types.
5929
5930         * cvt.c (ocp_convert): Avoid infinite recursion caused by
5931         1998-10-03 change.
5932
5933 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
5934
5935         * pt.c (resolve_overloaded_unification): New fn.
5936         (try_one_overload): Likewise.
5937         (unify): Don't fail on unknown type.
5938         (type_unification_real): Likewise.  Use resolve_overloaded_unification
5939         to handle an overloaded argument.
5940         (template_args_equal): Split out...
5941         (comp_template_args): From here.
5942         (determine_specialization): Also allow a template with more
5943         parms than were explicitly specified.
5944         * cp-tree.h: Add template_args_equal.
5945         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
5946
5947 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
5948
5949         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
5950         change.
5951
5952 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
5953
5954         * typeck.c (unsigned_type): Only return TItype nodes when
5955         HOST_BITS_PER_WIDE_INT is >= 64 bits.
5956         (signed_type): Likewise.
5957         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
5958         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
5959         (init_decl_processing): Only create TItype nodes when
5960         HOST_BITS_PER_WIDE_INT is >= 64 bits.
5961         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
5962         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
5963
5964 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5965
5966         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
5967         (gxx.gperf): Update comments describing invocation flags.
5968         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
5969
5970 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
5971
5972         * class.c (finish_struct_1): Add commentary on previous change.
5973
5974         * cp-tree.h (vtbl_ptr_type_node): New variable.
5975         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
5976         already of the right type.
5977         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
5978         Simplify code to grow vtable.
5979         * decl.c (vtbl_ptr_type_node): Define.
5980         (init_decl_processing): Initialize it.
5981
5982 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
5983
5984         * cp-tree.def (PTRMEM_CST): New tree node.
5985         * cp-tree.h (ptrmem_cst): New type.
5986         (lang_type): Remove local_typedecls.
5987         (dummy): Increase to 12 bits from 11.
5988         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
5989         (PTRMEM_CST_CLASS): New macro.
5990         (PTRMEM_CST_MEMBER): Likewise.
5991         (current_access_specifier): New variable.
5992         (current_class_type): Remove duplicate declaration.
5993         (finish_struct): Change prototype.
5994         (unreverse_member_declarations): New function.
5995         (pushdecl_class_level): Change prototype.
5996         (grok_enum_decls): Remove.
5997         (fixup_anonymous_union): New function.
5998         (grok_x_components): Change prototype.
5999         (tsubst_chain): Remove.
6000         (finish_member_template_decl): Likewise.
6001         (check_explicit_specialization): Fix indentation.
6002         (finish_class_definition): Change prototype.
6003         (finish_member_class_template): Likewise.
6004         (finish_member_declaration): New function.
6005         (check_multiple_declarators): Likewise.
6006         * class.c (class_stack_node_t): New type.
6007         (current_class_base): Remove.
6008         (current_class_stack): Change type.
6009         (current_access_specifier): New variable.
6010         (grow_method): Remove.
6011         (check_member_decl_is_same_in_complete_scope): Break out from
6012         finish_struct.
6013         (make_method_vec): New function.
6014         (free_method_vec): Likewise.
6015         (add_implicitly_declared_members): Break out from finish_struct_1.
6016         (free_method_vecs): New variable.
6017         (add_method): Rework for direct use from parser.
6018         (handle_using_decl): Watch for NULL_TREE while iterating through
6019         CLASSTYPE_METHOD_VEC.
6020         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
6021         just do some error-checking.
6022         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
6023         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
6024         (finish_struct): Change prototype.  Simplify; fields and methods
6025         are already set up at this point.
6026         (init_class_processing): Set up current_class_stack.
6027         (pushclass): Save current_access_specifier.
6028         (popclass): Restore it.
6029         (currently_open_class): Simplify.
6030         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
6031         * decl.c (saved_scope): Add access_specifier.
6032         (maybe_push_to_top_level): Save it.
6033         (pop_from_top_level): Restore it.
6034         (maybe_process_template_type_declaration): Use
6035         finish_member_declaration.
6036         (pushtag): Likewise.
6037         (pushdecl_class_level): Don't return a value.
6038         (fixup_anonymous_union): Break out from grok_x_components.
6039         (shadow_tag): Use it.
6040         (xref_tag): Complain about using an elaborated type specifier to
6041         reference a template type parameter or typedef name.
6042         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6043         (current_local_enum): Remove.
6044         (build_enumerator): Call finish_member_declaration.
6045         (grok_enum_decls): Remove.
6046         * decl2.c (grok_x_components): Simplify.
6047         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
6048         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6049         (merge_functions): Add to comment.
6050         (arg_assoc_type): Prototype.
6051         (arg_assoc): Pass as many arguments as there are parameters.
6052         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
6053         OFFSET_REF.
6054         * expr.c (cpls_expand_expr): Remove dead code.  Handle
6055         PTRMEM_CST.
6056         * friend.c (do_friend): Lookup friends when in nested classes.
6057         Change comments.
6058         * init.c (build_offset_ref): Do lookup even for classes that are
6059         only partially defined.
6060         (decl_constant_value): Remove dead code.
6061         * method.c (build_overload_value): Remove hack where by TYPE was
6062         not a TYPE.  Handle PTRMEM_CST.
6063         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
6064         should go.
6065         * parse.y (components, notype_components, component_decl,
6066         component_decl_1, component_declarator, component_declarator0):
6067         Now all are itype rather than ttype.  Rework to add members to
6068         classes on the fly.
6069         (typesqpecqual_reserved): Use check_multiple_declarators.
6070         (structsp): Update class to finish_class_definition.
6071         (do_xref_defn): Unsplit into named_class_head.
6072         (access_specifier): Set current_access_specifier.
6073         * pt.c (set_current_access_from_decl): New function.
6074         (finish_member_template_decl): Don't take the parameters.
6075         (comp_template_args): Make more robust.
6076         (lookup_template_class): Don't use current_local_enum.
6077         (for_each_template_parm): Handle PTRMEM_CST.
6078         (instantiate_class_template): Use set_current_access_from_decl,
6079         finish_member_declaration and unreverse_member_declarations.  Set
6080         lineno/input_filename before generating implicit member functions.
6081         (type_unification_real): Don't assume back-unification happens
6082         only for the last argument.
6083         (regenerate_decl_from_template): Call pushclass a bit earlier.
6084         (tsubst_chain): Remove.
6085         (tsubst_enum): Use set_current_access_from_decl.
6086         (set_mangled_name_for_template_decl): Fix indentation.
6087         * search.c (lookup_fnfields_1): Change iteration through
6088         CLASSTYPE_METHOD_VEC.
6089         (dfs_pushdecls): Likewise.
6090         (dfs_compress_decls): Likewise.
6091         (add_conversions): Likewise.
6092         * semantics.c (finish_class_definition): Don't take components.
6093         Change call to finish_struct.
6094         (finish_member_declaration): New function.
6095         (finish_member_class_template): Don't take template parameters.
6096         Change call to grok_x_components.  Call finish_member_template_decl.
6097         (check_multiple_declarators): New function.
6098         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
6099         a passed in fieldlist.
6100         * tree.c (search_tree): Handle PTRMEM_CST.
6101         (mapcar): Likewise.
6102         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
6103         INTEGER_CSTs, for pointer-to-data members.
6104
6105         * call.c (resolve_args): Resolve template specializations, if
6106         possible.
6107
6108 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6109
6110         * Makefile.in (spew.o): Depend on toplev.h.
6111
6112         * call.c (compare_ics): Initialize variables `deref_from_type2',
6113         `deref_to_type1' and `deref_to_type2'.
6114
6115         * except.c (get_eh_type): Hide prototype and definition.
6116         (process_start_catch_block_old): Remove unused static prototype.
6117
6118         * pt.c (tsubst_decl): Initialize variable `argvec'.
6119
6120         * spew.c: Include toplev.h.
6121
6122 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
6123
6124         * pt.c (instantiate_decl): Do save and restore file position.
6125
6126 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6127
6128         * method.c (build_decl_overload_real): Clear
6129         numeric_output_need_bar after __.
6130
6131 1998-10-05  Nathan Sidwell  <nathan@acm.org>
6132
6133         * call.c (build_new_method_call): Issue 'incomplete type' error,
6134         if class is not defined.
6135
6136 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6137
6138         * call.c (build_object_call): Move declaration of variable
6139         `fn' into the scope where it is used.  Don't access variable
6140         `fn' when it is uninitialized, instead use `fns'.
6141
6142 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
6143
6144         * errfn.c (cp_thing): Print buf as a string not as a printf format
6145         to avoid problems with the operator%.  Consequently, `%%' sequences
6146         in format are copied as `%' in buf.
6147
6148 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
6149
6150         * pt.c (pop_tinst_level): Call extract_interface_info.
6151         (instantiate_decl): Don't save and restore file position.
6152
6153         * decl.c (cp_finish_decl): Make statics in extern inlines and
6154         templates common, if possible and the target doesn't support weak
6155         symbols.
6156
6157         * decl.c (grokdeclarator): Remove redundant calls to
6158         build_type_variant and some duplicated code.
6159         * sig.c (build_signature_reference_type): Only take the type parm.
6160         (build_signature_pointer_type): Likewise.
6161         * tree.c (build_cplus_method_type): Adjust.
6162         * cp-tree.h: Update.
6163
6164 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
6165
6166         * call.c (build_over_call): Make pedwarns about dropped qualifiers
6167         into full-fledged errors.
6168         * cvt.c (convert_to_reference): Likewise.
6169         * typeck.c (convert_for_assignment): Likewise.
6170
6171         * search.c (expand_upcast_vtables): In addition to unsetting
6172         TREE_READONLY, remove top-level const type qualifier.
6173
6174 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
6175
6176         * class.c (current_class_ptr, current_class_ref): Clarify
6177         documentation.
6178         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
6179         NOP type conversions.
6180         * decl.c (decls_match): Use comptypes directly; ignore
6181         qualifiers on the DECL.
6182         (duplicate_decls): Remove qualifier checks on DECL.
6183         (grokdeclarator): Make the type built up include top-level
6184         qualifiers.
6185         * decl2.c (do_dtors): Fix spelling error.
6186         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
6187         when printing type information.
6188         * init.c (build_new_1): Add documentation.  Deal with the fact
6189         that type of allocated memory now contains qualifiers.
6190         * lex.c (is_global): Improve error-recovery.
6191         * sig.c (build_member_function_pointer): Don't cast away const
6192         on fields of sigtable_entry_type.
6193         * tree.c (lvalue_type): Don't look at top-level qualifiers on
6194         expressions.
6195         * typeck.c (decay_conversion): Likewise.
6196         (build_component_ref): Make sure the type of the COMPONENT_REF
6197         contains top-level qualifiers, as appropriate.  Improve
6198         error-handling.
6199         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
6200         (build_array_ref): Likewise.
6201         (build_unary_op): Improve error-recovery.
6202         (unary_complex_lvalue): Make taking the address a bound member
6203         function an error, not a sorry.
6204         (build_conditional_expr): Look at the type qualifiers, not the
6205         qualifiers on the expression itself.
6206
6207 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
6208
6209         * decl2.c (merge_functions): Remove duplicates.
6210
6211         * decl2.c: Add -f{no-,}implicit-inline-templates.
6212         (import_export_decl): Check it.
6213
6214         * decl.c (lookup_name_real): Template parms also take precedence
6215         over implicit typename.  Only warn if yylex.
6216
6217         * typeck.c (build_conditional_expr): Only fold if ifexp is an
6218         INTEGER_CST.
6219
6220         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
6221         instead of linkage.
6222
6223 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
6224
6225         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
6226         * class.c (build_vbase_pointer): Use it.
6227         * rtti.c (expand_class_desc): Likewise.
6228         * tree.c (build_vbase_pointer_fields): Likewise.
6229
6230 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
6231
6232         * decl.c (start_decl): Add invocation of
6233         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
6234         (start_function): Add invocation of
6235         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
6236
6237         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
6238         HANDLE_GENERIC_PRAGMAS.
6239
6240 1998-09-28  Anthony Green  <green@cygnus.com>
6241
6242         * semantics.c (finish_asm_stmt): Always permit volatile asms.
6243
6244 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
6245
6246         * decl.c (grokdeclarator): Tighten checks for invalid
6247         destructors.  Improve error-messages and error-recovery.
6248         * decl2.c (check_classfn): Don't assume that mangled destructor
6249         names contain type information.
6250
6251 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
6252
6253         * search.c (get_base_distance): Remove assert.
6254
6255         * decl2.c (build_anon_union_vars): Don't process a field with no
6256         name.
6257         (finish_anon_union): Also complain about local anon unions with no
6258         members.
6259
6260 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6261
6262         * decl.c (lookup_namespace_name): If the name is a namespace,
6263         return it immediately.
6264
6265 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6266
6267         * cp-tree.h (define_case_label): Remove unused parameter.
6268         (check_java_method): Likewise.
6269         (grokclassfn): Likewise.
6270         (expand_aggr_init): Likewise.
6271         (build_x_delete): Likewise.
6272         (maybe_end_member_template_processing): Likewise.
6273         (unshare_base_binfos): Add prototype.
6274         (string_conv_p): Likewise.
6275         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
6276
6277         * cvt.c (build_up_reference): Remove unused parameter
6278         `checkconst', all callers changed.
6279         (build_type_conversion): Mark parameter `code' with
6280         ATTRIBUTE_UNUSED.
6281         (build_expr_type_conversion): Initialize variable `conv'.
6282
6283         * decl.c (push_namespace): Initialize variable `d'.
6284         (define_case_label): Remove unused parameter `decl', all callers
6285         changed.
6286
6287         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
6288         `argc' with ATTRIBUTE_UNUSED.
6289         (grokclassfn): Remove unused parameter `cname', all callers
6290         changed.
6291         (check_java_method): Likewise for parameter `ctype'.
6292         (copy_assignment_arg_p): Mark parameter `virtualp' with
6293         ATTRIBUTE_UNUSED.
6294         (finish_prevtable_vardecl): Likewise for parameter `prev'.
6295
6296         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
6297
6298         * init.c (expand_aggr_init_1): Remove unused parameter
6299         `alias_this', all callers changed.
6300         (expand_aggr_init): Likewise.
6301         (expand_default_init): Likewise.
6302         (build_new_1): Initialize variable `susp'.
6303         (build_x_delete): Remove unused parameter `type', all callers
6304         changed.
6305
6306         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
6307         ATTRIBUTE_UNUSED.
6308         (readescape): Use (unsigned) value in shift.
6309         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
6310         comparing to a signed quantity.
6311
6312         * pt.c (maybe_end_member_template_processing): Remove unused
6313         parameter `decl', all callers changed.
6314         (check_explicit_specialization): Add braces around empty body in
6315         an else-statement.
6316         (current_template_args): Initialize variable `args'.
6317         (lookup_template_class): Likewise for variable `prev_local_enum'.
6318         (tsubst_decl): Likewise for variable `r'.
6319         (set_mangled_name_for_template_decl): Initialize variable
6320         `context'.
6321
6322         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
6323         Likewise for variable `i'.
6324         (yylex): Initialize variable `trrr'.
6325
6326         * typeck.c (compparms): Mark variable `strict' with
6327         ATTRIBUTE_UNUSED.
6328
6329         * xref.c (simplify_type): Cast argument of ctype function to
6330         `unsigned char'.
6331
6332 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
6333
6334         * cp-tree.h (language_lvalue_valid): Remove.
6335         * decl.c (grokdeclarator): Don't disallow references to functions.
6336         * tree.c (lvalue_p_1): New function, combining duplicated
6337         code from ...
6338         (lvalue_p): Use it.
6339         (real_lvalue_p): Likewise.
6340         * typeck.c (language_lvalue_valid): Remove.
6341         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
6342         they don't have TREE_READONLY set.
6343         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
6344
6345 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
6346
6347         * spew.c (yylex): Give diagnostic.
6348         * hash.h (is_reserved_word): Add export.
6349         * gxx.gperf: Likewise.
6350         * lex.h (rid): Add RID_EXPORT.
6351         * lex.c (init_parse): Likewise.
6352
6353 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
6354
6355         * friend.c (do_friend): Make warning a full sentence.
6356
6357 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
6358
6359         * parse.y (component_decl_list): Improve error-recovery.
6360
6361 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
6362
6363         * decl.c (make_typename_type): Move error to point where name
6364         variable can be used by dump_type.
6365
6366 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
6367
6368         * decl.c (grokfndecl): Improve error-recovery.
6369         * decl2.c (grokfield): Likewise.
6370         * pt.c (finish_member_template_decl): Likewise.
6371
6372 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6373
6374         * method.c (hack_identifier): Finding multiple members is always
6375         an error.
6376
6377 1998-09-21  Per Bothner  <bothner@cygnus.com>
6378
6379         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
6380
6381 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
6382
6383         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
6384
6385 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
6386
6387         * class.c (maybe_warn_about_overly_private_class): Reformat.
6388
6389 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
6390
6391         * exception.cc (__cplus_type_matcher): Realign some code.
6392
6393 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
6394
6395         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
6396         (tinfo2.o): Likewise.
6397         (exception.o): Likewise.
6398         (new.o): Likewise.
6399         (opnew.o): Likewise.
6400         (opnewnt.o): Likewise.
6401         (opvnew.o): Likewise.
6402         (opvnewnt.o): Likewise.
6403         (opdel.o): Likewise.
6404         (opdelnt.o): Likewise.
6405         (opvdel.o): Likewise.
6406         (opvdelnt.o): Likewise.
6407
6408 1998-09-16  Richard Henderson  <rth@cygnus.com>
6409
6410         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
6411
6412 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
6413
6414         * call.c (build_field_call): Handle static data members too.
6415
6416         * typeck.c (comptypes): When comparing pointer types, check
6417         whether referred types match even in strictest modes.
6418
6419 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
6420
6421         * cp-tree.h: Revert previous change.
6422         (finish_struct_methods): Remove declaration.
6423         * class.c: Revert previous change.
6424         (maybe_warn_about_overly_private_class): New function.
6425         (finish_struct_methods): Declare here, and make static.  Remove
6426         unnecessary parameters.  Tidy slightly.  Use
6427         maybe_warn_about_overly_private_class.
6428         (finish_struct_1): Adjust.  Remove check for private constructors,
6429         now done elsewhere.
6430         (finish_struct): Adjust.
6431
6432 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
6433
6434         * except.c (expand_start_catch_block): No need to check for new
6435         exception model.
6436         (process_start_catch_block_old): Deleted.
6437         (process_start_catch_block): Add call to start_decl_1().
6438         (expand_end_catch_block): Add call to end_catch_handler().
6439         * exception.cc (__cplus_type_matcher): Only check the exception
6440         language if there is an exception table.
6441
6442 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
6443
6444         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
6445         as used to prevent conflicts with virtual function tables.
6446
6447 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
6448
6449         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
6450         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
6451         * class.c (maybe_class_too_private_p): New function.
6452         (finish_struct_methods): Use it.
6453         (finish_struct_1): Likewise.
6454         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
6455         appropriate.
6456
6457         * pt.c (check_specialization_scope): Fix spelling error.
6458         (check_explicit_specialization): Remove code to handle explicit
6459         specializations in class scope; they are now correctly diagnosed
6460         as errors.
6461
6462 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
6463
6464         * decl.c (pushdecl): Don't copy types if the
6465         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
6466         type.
6467
6468 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6469
6470         * class.c (get_enclosing_class): New function.
6471         (is_base_of_enclosing_class): Likewise.
6472         * cp-tree.h (get_enclosing_class): Declare.
6473         (is_base_of_enclosing_class): Likewise.
6474         * pt.c (coerce_template_parms): Use them.
6475
6476 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
6477
6478         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
6479         null to decide whether to use it.
6480
6481         * error.c (dump_type_real): Handle NAMESPACE_DECL.
6482         * parse.y (base_class.1): Avoid crash on error.
6483
6484 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6485
6486         * decl.c (make_typename_type): If context is a namespace, the code
6487         is in error.
6488
6489 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
6490
6491         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
6492
6493 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
6494
6495         * cp-tree.h (anonymous_namespace_name): Declare.
6496         * decl.c: Define it.
6497         (push_namespace): Use anonymous_namespace_name, rather than local
6498         static anon_name.
6499         * error.c (dump_decl): If a namespace is named
6500         anonymous_namespace_name, call it {anonymous}.
6501
6502         * decl.c (grokparms): Distinguish between references and pointers
6503         in error message.
6504
6505 1998-09-08  Richard Henderson  <rth@cygnus.com>
6506             Mark Mitchell  <mark@markmitchell.com>
6507
6508         * pt.c (process_partial_specialization): Consistently allocate
6509         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
6510         tpd.parms, where appropriate.
6511
6512 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
6513
6514         * Makefile.in (INCLUDES): Update after recent toplevel gcc
6515         reorganizations.
6516
6517 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
6518
6519         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
6520         * class.c (finish_struct): Remove hackery to deal with explicit
6521         specializations in class scope.
6522         * decl.c (grokfndecl): Improve error-recovery.
6523         * decl2.c (grokfield): Likewise.
6524         * pt.c (check_specialization_scope): New function.
6525         (begin_specialization): Call it.
6526         (process_partial_specialization): New function, split out from
6527         push_template_decl.  Check partial specializations more
6528         stringently.
6529         (push_template_decl): Call it.
6530         (check_explicit_specialization): Don't attempt to handle explicit
6531         specializations in class scope.
6532         (template_parm_data): Document.  Add current_arg and
6533         arg_uses_template_parms.
6534         (mark_template_parm): Set it.
6535         (tsubst_arg_types): Remove unused variable.
6536         * semantics.c (begin_class_definition): Tweak.
6537
6538 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
6539
6540         * inc/typeinfo (type_info::type_info(const char*)): Make
6541         `explicit'.
6542
6543         * cp-tree.h (hash_tree_cons_simple): New macro.
6544         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
6545         (coerce_template_parms): Use make_temp_vec, instead of
6546         make_tree_vec.  Document this behavior.
6547         (lookup_template_class): Likewise.
6548         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
6549         Remove dead code (and add assertion to check its deadness).  Fix
6550         bug w.r.t. exception specifications.
6551
6552 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
6553
6554         * decl2.c (import_export_vtable): Always make artificials comdat.
6555         (import_export_decl): Likewise.
6556         * pt.c (mark_decl_instantiated): Likewise.
6557
6558 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
6559
6560         * cp-tree.h (finish_globally_qualified_member_call_expr):
6561         Rename to ...
6562         (finish_qualified_call_expr).
6563         * semantics.c: Likewise.
6564         * parse.y (primary): Use it.
6565         * method.c (hack_identifier): Remove redundant code.
6566
6567         * init.c (resolve_offset_ref): Call convert_from_reference to
6568         handle members of reference type.  Improve error recovery.
6569
6570 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
6571
6572         * cp-tree.h: Declare warn_nontemplate_friend.
6573         * decl2.c (lang_decode_option): Set.
6574         * lang-options.h: Add -Wnon-template-friend.
6575         * friend.c (do_friend): Use to toggle non-template function warning.
6576
6577 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
6578
6579         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
6580         corresponding INTEGER_CSTs when processing_template_decl.
6581         * pt.c (tsubst_enum): Tweak accordingly.
6582
6583 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
6584
6585         * decl.c (pushdecl_class_level): Add warning here.
6586         (pushdecl): Tweak.
6587
6588 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
6589
6590         * cvt.c (convert_pointer_to_real): Tidy.
6591         * search.c (get_base_distance_recursive): Simplify.
6592         (get_base_distance): Likewise.
6593
6594         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
6595         parms.
6596
6597 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
6598
6599         * lex.c (check_newline):  Call HANDLE_PRAGMA before
6600         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
6601         if unknown pragmas are encountered.
6602         (handle_sysv_pragma): Interpret return code from
6603         handle_pragma_token ().  Return success/failure indication rather
6604         than next unprocessed character.
6605         (pragma_getc): New function: retrieves characters from the
6606         input stream.  Defined when HANDLE_PRAGMA is defined.
6607         (pragma_ungetc): New function: replaces characters back into the
6608         input stream.  Defined when HANDLE_PRAGMA is defined.
6609
6610 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
6611
6612         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
6613         * class.c (build_vtable_entry_ref): Likewise.
6614
6615 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
6616
6617         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
6618         * decl2.c (import_export_decl): Likewise.
6619         * pt.c (instantiate_decl): Use it.
6620
6621 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
6622
6623         * decl.c (lookup_name_real): Also do implicit typename thing for
6624         artificial TYPE_DECLs.
6625         * search.c (lookup_field): Likewise.
6626         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
6627         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
6628         (enter_scope_of): Extract type from implicit typename.
6629         (begin_class_definition): Likewise.
6630         * lex.c (identifier_type): Handle implicit typename when checking
6631         for SELFNAME.
6632
6633         * cp-tree.h: Declare flag_strict_prototype.
6634         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
6635         -fstrict-prototype.
6636         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
6637         specified, set it to the value of pedantic.
6638
6639 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
6640
6641         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
6642
6643 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
6644
6645         * decl.c (finish_enum): Handle member enums of classes declared in
6646         template functions.
6647
6648         * decl2.c (grok_x_components): Strip attributes before calling
6649         groktypename.
6650
6651 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
6652
6653         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
6654         -fenum-int-equivalence and -fno-nonnull-objects.
6655         * class.c (check_for_override): Remove support for -fall-virtual.
6656         (finish_struct_1): Likewise.
6657         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
6658         * typeck.c (build_binary_op_nodefault): Likewise.
6659         * cvt.c (ocp_convert): Likewise.
6660         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
6661         * class.c (build_vbase_path): Likewise.
6662
6663 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
6664
6665         * Makefile.in (INTERFACE): New, set to 1.
6666
6667 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
6668
6669         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
6670         comparing with global_namespace.
6671         (dump_aggr_type): Likewise.
6672
6673         * decl.c (grokfndecl): Issue error on declaration of friend
6674         templates with explicit template arguments.
6675
6676         * pt.c (convert_template_argument): New function, split out
6677         from...
6678         (coerce_template_parms): Here.
6679         (tsubst): Attempt better error-recovery.
6680
6681 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
6682
6683         * pt.c (decl_template_parm_p): Add checks for
6684         TEMPLATE_TEMPLATE_PARM.
6685
6686 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
6687
6688         * lex.c (do_identifier): Fix thinko in previous change.
6689
6690 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
6691
6692         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
6693         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
6694
6695 1998-08-28  Richard Henderson  <rth@cygnus.com>
6696
6697         Add support for discarding unused virtual functions.
6698         * lang-options.h: Add -fvtable-gc.
6699         * cp-tree.h: Add flag_vtable_gc.
6700         * decl2.c (output_vtable_inherit): New fn.
6701         (finish_vtable_vardecl): Call it.
6702         * class.c (build_vtable_entry_ref): New fn.
6703         (build_vtbl_ref): Call it.
6704
6705 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
6706
6707         * cp-tree.h (build_enumerator): Take the enumeration type as a
6708         parameter.
6709         * decl.c (finish_enum): Don't set the TREE_TYPE for the
6710         enumeration constant values if we're processing_template_decls.
6711         Don't set the type for the CONST_DECLs either; that's done in
6712         build_enumerator.
6713         (build_enumerator): Take the enumeration type as a
6714         parameter.
6715         * lex.c (do_identifier): Don't resolve enumeration constants while
6716         processing template declarations, even if they happen to be
6717         TEMPLATE_PARM_INDEXs.
6718
6719         * parse.y (current_enum_type): New variable.
6720         (primary): Don't allow statement-expression in local classes just
6721         as we don't in global classes.
6722         (structsp): Use current_enum_type.
6723         (enum_list): Likewise.
6724         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
6725         finish_enum; they no longer occur.
6726
6727         * cp-tree.h (finish_base_specifier): New function.
6728         * parse.y (base_class): Use it.
6729         * semantics.c (finish_base_specifier): Define it.
6730
6731         * parse.y (structsp): Warn on use of typename outside of template
6732         declarations.
6733
6734 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
6735
6736         * lex.c (handle_cp_pragma): Remove #pragma vtable.
6737         * lang-options.h: Remove +e options.
6738         * decl2.c (lang_decode_option): Likewise.
6739         (import_export_vtable): Don't check write_virtuals.
6740         (finish_vtable_vardecl, finish_file): Likewise.
6741         * search.c (dfs_debug_mark): Likewise.
6742         * semantics.c (begin_class_definition): Likewise.
6743         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
6744
6745         * call.c (build_over_call): Check flag_elide_constructors.
6746         * decl2.c: flag_elide_constructors defaults to 1.
6747         * typeck.c (convert_arguments): Remove return_loc parm.
6748         (build_function_call_real): Adjust.
6749
6750         * search.c: Tear out all mi_matrix and memoize code.
6751         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
6752         * lang-options.h: Remove documentation for -fhandle-exceptions,
6753         -fmemoize-lookups and -fsave-memoized.
6754         * cp-tree.h: Lose mi_matrix and memoize support.
6755         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
6756         * class.c: Lose struct class_level.
6757         (pushclass, popclass): Lose memoize support.
6758         * init.c (build_offset_ref): Likewise.
6759
6760         Never change BINFO_INHERITANCE_CHAIN.
6761         * init.c (emit_base_init): Change modification of
6762         BINFO_INHERITANCE_CHAIN to an assert.
6763         * search.c (get_base_distance_recursive): Likewise.
6764         (get_base_distance): Likewise.
6765         (lookup_member): Likewise.
6766         (convert_pointer_to_single_level): Likewise.
6767         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
6768         (lookup_fnfields): Likewise.
6769         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
6770         (unshare_base_binfos): Don't call propagate_binfo_offsets.
6771         (layout_basetypes): Call propagate_binfo_offsets instead of
6772         unshare_base_binfos.
6773         * decl.c (xref_basetypes): Call unshare_base_binfos.
6774         * pt.c (instantiate_class_template): Likewise.
6775         * tree.c (reverse_path): Remove 'copy' parm; always make a
6776         temporary copy.
6777         * class.c (build_vbase_path): Just call it.
6778         * search.c (compute_access): Likewise.  Don't re-reverse.
6779
6780 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
6781
6782         * class.c (build_vbase_path): Use reverse_path.
6783         (finish_base_struct): Move warnings for inaccessible bases to
6784         layout_basetypes.
6785         (modify_one_vtable): Remove check of TREE_USED (binfo).
6786         (fixup_vtable_deltas1): Likewise.
6787         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
6788         (xref_tag): Remove binfos parameter.
6789         (make_binfo): Remove chain parameter.
6790         (reverse_path): Add copy parameter.
6791         * decl.c (init_decl_processing): Change calls to xref_tag.
6792         (xref_tag): Remove binfos parameter.
6793         (xref_basetypes): Change calls to make_binfo.
6794         * decl2.c (grok_x_components): Change calls to xref_tag.
6795         (handle_class_head): Likewise.
6796         * friend.c (do_friend): Likewise.
6797         * lex.c (make_lang_type): Change calls to make_binfo.
6798         * parse.y (structsp): Change calls to xref_tag.
6799         (named_complex_class_head_sans_basetype): Likewise.
6800         (named_class_head): Likewise.
6801         * rtti.c (init_rtti_processing): Likewise.
6802         * search.c (compute_access): Change calls to reverse_path.
6803         (dfs_get_vbase_types): Change calls to make_binfo.
6804         (get_vbase_types): Remove dead code.
6805         * tree.c (unshare_base_binfos): Change calls to make_binfo.
6806         (layout_basetypes): Warn here about inaccessible bases.
6807         (make_binfo): Remove chain parameter.
6808         (reverse_path): Add copy parameter.
6809
6810 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
6811
6812         * class.c: #if 0 complete_type_p.
6813         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
6814         * method.c (process_overload_item): Likewise.
6815         * typeck.c (comp_target_types): Likewise.
6816
6817         Stop sharing binfos for indirect virtual bases.
6818         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
6819         (layout_basetypes): Likewise.
6820         (unshare_base_binfos): Copy vbases, too.
6821         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
6822         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
6823         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
6824         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
6825         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
6826         reference to BINFO_VIA_PUBLIC.
6827         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
6828         (push_class_decls): Use them.
6829         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
6830         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
6831
6832 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
6833
6834         * decl.c (build_enumerator): Set DECL_CONTEXT for the
6835         CONST_DECLs.
6836
6837 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
6838
6839         * cp-tree.h (finish_enum): Change prototype.
6840         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
6841         VALUES parameter.  Don't try to compute mins/maxs if
6842         processing_template_decl.
6843         * parse.y (structsp): Use new calling sequence for finish_enum.
6844         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
6845         (lookup_template_class): Remove unused variables.  Tweak.
6846         Register enums on instantiation list before substituting
6847         enumeration constants.
6848         (tsubst_decl): Remove unused variables.
6849         (regenerate_decl_from_template): Likewise.
6850
6851         * decl.c (duplicate_decls): Don't obliterate the
6852         DECL_TEMPLATE_INFO for a template if we're not replacing it with
6853         anything.
6854
6855         * lex.c (do_identifier): Fix typo in comment.
6856
6857 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6858
6859         * errfn.c: Remove stdarg.h/varargs.h.
6860         * tree.c: Likewise.
6861
6862 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
6863
6864         * pt.c (tsubst_copy): Only do typename overloading on an
6865         IDENTIFIER_NODE that happens to look like a typename if it actually
6866         has a type for us to use.
6867
6868 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
6869
6870         * typeck.c (comp_cv_target_types): Split out...
6871         (comp_target_types): From here.  Don't allow cv-qual changes under
6872         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
6873         (build_ptrmemfunc): Pass 1 to nptrs.
6874         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
6875
6876 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
6877
6878         * search.c (dependent_base_p): Don't compare a binfo to
6879         current_class_type; use the TREE_TYPE of the binfo instead.
6880
6881         * cp-tree.h (CLASS_TYPE_P): Revise definition.
6882
6883 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
6884
6885         * decl.c (duplicate_decls): Don't complain about different
6886         exceptions from an internal decl even if pedantic.
6887
6888         * typeck.c (convert_for_assignment): Converting from pm of vbase
6889         to derived is an error, not a sorry.
6890
6891         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
6892         * class.c (fixed_type_or_null): Rename from
6893         resolves_to_fixed_type_p.  Return the dynamic type of the
6894         expression, if fixed, or null.
6895         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
6896         does not match the static type.
6897         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
6898         resolves_to_fixed_type_p again.
6899
6900 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
6901
6902         * pt.c (tsubst_decl): Move special case code for dealing with
6903         tricky friend templates here from ...
6904         (regenerate_decl_from_template): Here.
6905
6906 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
6907
6908         * decl.c (start_decl): Remove redundant linkage check.
6909
6910 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
6911
6912         * typeck.c (c_expand_return): Handle the case that valtype
6913         is wider than the functions return type.
6914
6915 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
6916
6917         * cp-tree.h (CLASS_TYPE_P): New macro.
6918         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
6919         * pt.c (process_template_parm): Undo previous change.
6920
6921 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
6922
6923         * cp-tree.h: Declare.
6924         * pt.c (decl_template_parm_p): New function.
6925         * decl.c (pushdecl): Check decls for redeclaring template parms.
6926         (xref_tag): Make redeclaration an error, print decl.
6927         * decl2.c (grokfield): Check field_decls for redeclaration as well.
6928
6929 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
6930
6931         * parse.y (primary): Fix up the type of string constants.
6932
6933 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
6934
6935         * typeck.c (convert_for_initialization): Move check for odd uses
6936         of NULL to avoid duplicate warnings.
6937
6938 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
6939
6940         * tree.c (lvalue_type): Fix for arrays.
6941         * typeck.c (string_conv_p): New fn.
6942         (convert_for_assignment): Use it.
6943         (build_unary_op): Use lvalue_type.
6944         * call.c (standard_conversion, convert_like): Use string_conv_p.
6945         (add_function_candidate): Use lvalue_type.
6946         * cvt.c (convert_to_reference): Likewise.
6947         * decl2.c (lang_decode_option): Ignore -traditional.
6948         * decl.c (init_decl_processing): flag_writable_strings inhibits
6949         flag_const_strings.
6950
6951 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
6952
6953         * lang-options.h (lang_options): Add fconst-strings to the list
6954         of valid options.
6955         * decl2.c (lang_f_options, lang_decode_option): Likewise.
6956
6957 1998-08-24  Nathan Sidwell  <nathan@acm.org>
6958
6959         * lex.c (real_yylex): Don't warn about long long constants if
6960         we're allowing long long.
6961
6962 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6963
6964         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
6965         accessing bindings directly.
6966
6967         * search.c (my_tree_cons): Reimplement.
6968
6969         * lang-specs.h: Remove __HONOR_STD.
6970         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
6971
6972 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
6973
6974         * decl.c (grokdeclarator): Complain about in-class initialization
6975         of aggregates and/or references.
6976         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
6977         TEMPLATE_TYPE_PARMs.
6978
6979         * decl2.c (grok_array_decl): Add comment.
6980         (mark_used): Don't instantiate an explicit instantiation.
6981         * friend.c (make_friend_class): Remove bogus comment.  Fix check
6982         for partial specializations.
6983         * pt.c (check_explicit_specialization): Don't
6984         SET_DECL_EXPLICIT_INSTANTIATION here.
6985         (mark_decl_instantiated): Or here.
6986         (do_decl_instantiation): Do it here, instead.  Add checks for
6987         duplicate explicit instantiations, etc.  Tidy.
6988         (do_type_instantiation): Likewise.
6989         (instantiate_decl): Improve comments.  Complain about explicit
6990         instantiations where no definition is available.
6991
6992         * cp-tree.h (ansi_null_node): Remove.
6993         * call.c (build_over_call): Warn about converting NULL to an
6994         arithmetic type.
6995         * cvt.c (build_expr_type_conversion): Likewise.  Use
6996         null_ptr_cst_p instead of expanding it inline.
6997         * decl.c (ansi_null_node): Remove.
6998         (init_decl_processing): Make null_node always have integral type.
6999         * except.c (build_throw): Warn about converting NULL to an
7000         arithmetic type.
7001         * lex.c (init_parse): Remove handling of ansi_null_node.
7002         * pt.c (type_unification_real): Don't convert NULL to void* type.
7003         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
7004         (convert_for_assignment): Warn about converting NULL to an
7005         arithmetic type.
7006         (convert_for_initialization): Likewise.
7007
7008 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
7009
7010         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
7011         * pt.c (coerce_template_parms): Use no_linkage_check.
7012         * decl.c (grokvardecl): Likewise.
7013         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
7014
7015         * method.c (process_overload_item): Remove useless code.
7016
7017 1998-08-20  Per Bothner  <bothner@cygnus.com>
7018
7019         Handle new'ing of Java classes.
7020         * init.c (build_class_classref):  New function.
7021         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
7022         constructor does not return this;  don't need to exception-protect.
7023
7024         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
7025         * decl2.c (acceptable_java_type):  Handle template-derived types.
7026
7027 1998-08-20  Per Bothner  <bothner@cygnus.com>
7028
7029         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
7030
7031 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
7032
7033         * decl.c (duplicate_decls): Always merge the old and new patterns
7034         for templates, regardless of whether or not the new one has
7035         DECL_INITIAL.  Don't throw away specializations.  Merge
7036         DECL_SAVED_TREE.
7037         * pt.c (tsubst_decl): Use the right pattern when calculating the
7038         complete args for a new template instance.
7039         (do_decl_instantiation): Fix typo in comment.
7040         (regenerate_decl_from_template): Deal with tricky friend template
7041         case.
7042         (instantiate_decl): Likewise.
7043
7044 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
7045
7046         * init.c (build_builtin_delete_call): Add missing assemble_external
7047         call.
7048
7049 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
7050
7051         * parse.y (notype_unqualified_id): Also accept ~A<int>.
7052
7053 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
7054
7055         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
7056         arithmetic.
7057         * except.c (build_throw): Warn when NULL is thrown, even with
7058         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
7059         thrown expression.
7060
7061         * cp-tree.h (ansi_null_node): New variable.
7062         * decl.c (ansi_null_node): New variable.
7063         (init_decl_processing): Initialize its type.
7064         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
7065         for null_node in non-ANSI mode.
7066         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
7067         place of null_node to avoid spurious errors.
7068
7069 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
7070
7071         * cp-tree.h (enter_scope_of): New function.
7072         * parse.y (complex_direct_notype_declarator): Use it.
7073         * semantics.c (enter_scope_of): New function.
7074
7075 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
7076
7077         * decl.c (grokparms): No, here.
7078
7079         * decl.c (grokdeclarator): Catch parm with pointer to array of
7080         unknown bound here...
7081         * method.c (process_overload_item): ...not here.
7082
7083         * gxxint.texi: Remove obsolete documentation of overloading code.
7084
7085         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
7086         * class.c (finish_struct_bits): Likewise.
7087
7088         * tree.c (lvalue_type): Fix for arrays.
7089         * typeck.c (build_unary_op): Use lvalue_type.
7090         * call.c (add_function_candidate): Likewise.
7091         * cvt.c (convert_to_reference): Likewise.
7092
7093         * decl2.c (lang_decode_option): Ignore -traditional.
7094
7095         * init.c (build_offset_ref): Don't mess with error_mark_node.
7096         * lex.c (do_scoped_id): Use cp_error.
7097
7098         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
7099
7100 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7101
7102         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
7103
7104 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
7105
7106         * cp-tree.h (set_identifier_local_value): Provide prototype.
7107
7108         * decl2.c (do_namespace_alias): Remove unused variables `binding'
7109         and `old'.
7110
7111 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
7112
7113         * Makefile.in: Rename BBISON to BISON so that it can be properly
7114         inherited from the parent makefile.
7115
7116 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
7117
7118         * lang-options.h: Add -finit-priority.
7119         * decl2.c: Likewise.  Check flag_init_priority instead of
7120         USE_INIT_PRIORITY.
7121
7122         * decl2.c (setup_initp): New fn.
7123         (start_objects, finish_objects, do_ctors): Handle init_priority.
7124         (do_dtors, finish_file): Likewise.
7125
7126 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
7127
7128         * pt.c (tsubst_copy): Hush warning.
7129
7130         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
7131
7132 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
7133
7134         * pt.c (print_template_context): Don't abort when instantiating a
7135         synthesized method.
7136
7137         * decl.c (grokdeclarator): Issue errors on namespace qualified
7138         declarators in parameter lists or in class scope.
7139
7140 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
7141
7142         * pt.c (check_explicit_specialization): Don't abort on bogus
7143         explicit instantiations.
7144
7145 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
7146
7147         * typeck.c (require_complete_type): Use complete_type_or_else.
7148         (complete_type_or_else): Always return NULL_TREE on failure, as
7149         documented.
7150
7151         * pt.c (tsubst_aggr_type): Prototype.
7152         (tsubst_decl): New function, split out from tsubst.  Set
7153         input_filename and lineno as appropriate.
7154         (pop_tinst_level): Restore the file and line number saved in
7155         push_tinst_level.
7156         (instantiate_class_template): Set input_filename and lineno as
7157         appropriate.
7158         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
7159         context for a TYPENAME_TYPE is complete.
7160
7161         * decl2.c (grokbitfield): Issue errors on bitfields declared with
7162         function type.
7163         (do_dtors): As in do_ctors, pretend to be a member of the same
7164         class as a static data member while generating a call to its
7165         destructor.
7166
7167         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
7168         conversions, even in complex virtual base class hierarchies.
7169
7170 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
7171
7172         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
7173         (TYPE_TEMPLATE_INFO): Likewise.
7174         (SET_TYPE_TEMPLATE_INFO): Likewise.
7175         (ENUM_TI_TEMPLATE): Likewise.
7176         (ENUM_TI_ARGS): Likewise.
7177         (lookup_nested_type_by_name): Remove.
7178         * decl.c (maybe_process_template_type_declaration): Handle enums.
7179         (start_enum): Don't check for primary-template enum declarations
7180         here.
7181         (finish_enum): Clean up, document.  Make sure template enum
7182         constants get the correct type.
7183         (build_enumerator): Copy initializers for template enumerations,
7184         too.
7185         (grok_enum_decls): Document.
7186         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
7187         better.  Build LOOKUP_EXPRs for local variables, even if they are
7188         TREE_PERMANENT.
7189         * pt.c (tsubst_enum): Remove field_chain parameter.
7190         (template_class_depth): Include the depth of surrounding function
7191         contexts.
7192         (push_template_decl): Check for primary-template enum declarations
7193         here.  Deal with enumeration templates.
7194         (lookup_template_class): Likewise.
7195         (for_each_template_parm): Likewise.
7196         (instantiate_class_template): Don't call tsubst_enum directly,
7197         call tsubst instead, to instantiate enums.  Deal with all
7198         field_chain issues here, not in tsubst_enum.
7199         (lookup_nested_type_by_name): Remove.
7200         (tsubst_aggr_type): Revise handling of enumeration types.
7201         (tsubst): Likewise.
7202         (tsubst_copy): Likewise.
7203         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
7204
7205 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
7206
7207         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
7208         uses template parameters.
7209         * method.c (build_template_parm_names): Use the full set of
7210         template arguments for tsubst'ing.
7211         (build_overload_identifier): Pass the full set of template
7212         arguments to build_template_parm_names, not just the
7213         innermost_args.
7214         * pt.c (TMPL_ARGS_DEPTH): Define using
7215         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
7216         (NUM_TMPL_ARGS): New macro.
7217         (add_outermost_template_args): Deal with the case where the outer
7218         args will be completely discarded.
7219         (coerce_template_parms): Use the full set of template arguments
7220         for tsubst'ing.  Simplify.  Add some asserts.  Improve
7221         error messages.
7222         (lookup_template_class): Pass the full set of template arguments
7223         to coerce_template_parms.
7224         (tsubst): Add assertion.
7225         (do_type_instantiation): Don't instantiate member template
7226         classes.
7227
7228         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
7229         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
7230
7231 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
7232
7233         * method.c (set_mangled_name_for_decl): Change return type to void.
7234
7235         * decl.c (lookup_name_real): A namespace-level decl takes priority
7236         over implicit typename.  Avoid doing the same lookup twice.
7237
7238         * search.c (dependent_base_p): New fn.
7239         (dfs_pushdecls, dfs_compress_decls): Use it.
7240
7241         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
7242         virtual functions if the type doesn't have any.
7243
7244 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
7245
7246         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
7247         uses template parameters.
7248
7249 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
7250
7251         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
7252         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
7253         * lex.c (do_identifier): Don't use a second argument, or a type,
7254         when building LOOKUP_EXPRs.
7255         (do_identifier): Likewise.
7256         (do_scoped_id): Likewise.
7257         * method.c (hack_identifier): Improve error message.
7258         * pt.c (lookup_template_function): Don't needlessly call
7259         copy_to_permanent or build_min.
7260         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
7261         necessary.
7262         (do_decl_instantiation): Improve error message.
7263         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
7264         (build_min): Copy the type to the permanent obstack, too.
7265
7266 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
7267
7268         * init.c (init_init_processing): Remove BI* handling.
7269         (build_builtin_call): Remove.
7270         (build_builtin_delete_call): New fn.
7271         (build_delete): Use it.
7272
7273 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
7274
7275         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
7276         (maybe_check_template_type): New function.
7277         * decl.c (maybe_process_template_type_declaration): New function,
7278         split out from pushtag  Call maybe_check_template_type.
7279         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
7280         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
7281         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
7282         * pt.c (template_class_depth_real): Generalization of ...
7283         (template_class_depth): Use it.
7284         (register_specialization): Use duplicate_decls for duplicate
7285         declarations of specializations.
7286         (maybe_check_template_type): New function.
7287         (push_template_decl_real): Fix comment.
7288         (convert_nontype_argument): Likewise.
7289         (lookup_template_class): Likewise.  Avoid an infinite loop on
7290         erroneous code.
7291         (tsubst_friend_function): Fix comment.
7292         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
7293         an IDENTIFIER_NODE.
7294         * semantics.c (begin_function_definition): Use
7295         reset_specialization to note that template headers don't apply
7296         directly to declarations after the opening curly for a function.
7297
7298 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
7299
7300         * decl.c (push_overloaded_decl): Use current_namespace instead of
7301         DECL_CONTEXT (decl) to determine where we go.
7302
7303         * decl.c (lookup_name_real): Fix typo.
7304
7305 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
7306
7307         * friend.c (is_friend): Be lenient with member functions to deal
7308         with nested friends.
7309
7310 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
7311
7312         * class.c (finish_struct_1): Convert integer_zero_node to
7313         ssizetype before passing it to set_rtti_entry.
7314         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
7315         of any size to a pointer.
7316
7317 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
7318
7319         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
7320         (build_template_decl_overload): Remove.
7321         (set_mangled_name_for_decl): New function.
7322         (innermost_args): Remove is_spec parameter.
7323         (most_specialized, most_specialized_class): Remove declarations.
7324         (lookup_template_class): Add entering_scope parameter.
7325         (maybe_process_partial_specialization): New function.
7326         (finish_template_decl): Likewise.
7327         (finish_template_type): Likewise.
7328         * class.c (finish_struct): Clean up processing of member template
7329         specializations.
7330         * decl.c (pushtag): Fix formatting.
7331         (lookup_tag): Improve handling of pseudo-global levels.
7332         (make_typename_type): Adjust call to lookup_template_class.
7333         (shadow_tag): Use maybe_process_partial_specialization.
7334         (xref_tag): Improve handling of member friends.
7335         (start_function): Call push_nested_class before
7336         push_template_decl.  Don't call push_template_decl for
7337         specializations.
7338         * decl2.c (grok_x_components): Don't call xref_tag for
7339         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
7340         (grokclassfn): Use set_mangled_name_for_decl.
7341         (arg_assoc_class): Adjust call to innermost_args.
7342         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
7343         * error.c (dump_function_name): Improve printing of template
7344         function names.
7345         * friend.c (is_friend): Don't compare types of decls to determine
7346         friendship, unless flag_guiding_decls.
7347         (make_friend_class): Partial specializations cannot be friends.
7348         (do_friend): Use set_mangled_name_for_decl.  Call
7349         push_template_decl_real instead of push_template_decl.
7350         * method.c (build_decl_overload_real): Remove prototype.  Give it
7351         external linkage.
7352         (build_overload_identififer): Adjust call to innermost_args.
7353         (build_template_decl_overload): Remove.
7354         (set_mangled_name_for_decl): New function.
7355         * parse.y (.finish_template_type): New non-terminal.
7356         (template_def): Use finish_template_decl.  Use template_extdef
7357         instead of extdef.
7358         (template_extdef, template_datadef): New non-terminals, containing
7359         only those rules for things which can be templates.
7360         (datadef): Tidy.
7361         (template_type, self_template_type): Use .finish_template_type.
7362         (named_class_head): Use maybe_process_partial_specialization.
7363         * pt.c (mangle_class_name_for_template): Remove context parameter.
7364         (get_class_bindings): Remove outer_args parameter.
7365         (complete_template_args): Remove.
7366         (add_outermost_template_args): New function.
7367         (register_specialization): Return the specialization.
7368         (unregister_specialization): New function.
7369         (tsubst_template_parms): Likewise.
7370         (most_specialized, most_specialized_class): Prototype here as
7371         static.
7372         (original_template): Rename to most_general_template.
7373         (tsubst_template_parms): New function.
7374         (set_mangled_name_for_template_decl): Likewise.
7375         (TMPL_ARGS_DEPTH): New macro.
7376         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
7377         (TMPL_ARGS_LEVEL): New macro.
7378         (SET_TMPL_ARGS_LEVEL): Likewise.
7379         (TMPL_ARG): Likewise.
7380         (SET_TMPL_ARG): Likewise.
7381         (TMPL_ARGS_DEPTH): Likewise.
7382         (finish_member_template_decl): Use finish_template_decl.
7383         (maybe_process_partial_specialization): New function, split out
7384         from tsubst.
7385         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
7386         (maybe_begin_member_template_processing): Use new macros.
7387         (is_member_template): Likewise.
7388         (is_member_template_class): Likewise.
7389         (add_to_template_args): Likewise.  Deal with multiple levels of
7390         args.
7391         (maybe_process_partial_specialization): New function.
7392         (retrieve_specialization): Add consistency check.
7393         (determine_specialization): Return full argument list.
7394         (check_explicit_specialization): Tweak friend handling.  Use full
7395         argument lists.  Simplify.
7396         (current_template_args): Use new macros.
7397         (push_template_decl_real): Change ill-named mainargs to specargs.
7398         Check that a partial specialization actually specializes at least
7399         one parameter.   Improve friend handling.  Modify for full
7400         template arguments.
7401         (classtype_mangled_name): Don't mangle the names of
7402         specializations.
7403         (lookup_template_class): Add entering_scope parameter.  Use it to
7404         avoid finding a template type when an instantiation is required.
7405         Simplify.  Use full template arguments.
7406         (tsubst_friend_function): Use unregister_specialization.  Use new
7407         macros.  Use full template arguments.
7408         (tsubst_friend_class): Substitute, using tsubst_template_parms,
7409         into the template parameters before passing them to
7410         redeclare_class_template.
7411         (instantiate_class_template): Simplify.  Use full template
7412         arguments.  Adjust calls to get_class_bindings.  Use
7413         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
7414         (innermost_args): Use new macros.
7415         (tsubst_aggr_type): New function, split out from tsubst.
7416         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
7417         conventions for lookup_template_class.  Refine handling of partial
7418         instantiations.   Remove calls to complete_template_args.
7419         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
7420         and set_mangled_name_for_template_decl.
7421         (tsubst_copy): Use tsubst_aggr_type.
7422         (instantiate_template): Use full template arguments.
7423         (more_specialized): Improve formatting.
7424         (more_specialized_class): Adjust calls to get_class_bindings.
7425         (get_bindings_real): Don't call complete_template_args.
7426         (most_specialized): Don't overwrite input; create a new list.
7427         (most_specialized_class): Use most_general_template.
7428         (regenerate_decl_from_template): Use unregister_specialization.
7429         Use full template arguments.
7430         (instantiate_decl): Use full template arguments.
7431         (set_mangled_name_for_template_decl): New function.
7432         * semantics.c (begin_class_definition): Use
7433         maybe_process_partial_specialization.
7434         (finish_member_class_template): New function.
7435         (finish_template_decl): Likewise.
7436         (finish_template_type): Likewise.
7437         (typeck.c): Don't crash after issuing a compiler_error.
7438         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
7439
7440 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
7441
7442         * typeck2.c (build_functional_cast): Handle default-initialization.
7443
7444         * call.c (build_over_call): Pass 1 to popclass.
7445
7446         * parse.y (direct_notype_declarator): Add precedence declaration
7447         to notype_unqualified_id case.
7448         * Makefile.in (EXPECT): Adjust.
7449
7450         * tree.c (ovl_member): Fix for single function in OVL.
7451
7452 1998-07-27  Dave Brolley  <brolley@cygnus.com>
7453
7454         * c-lex.c (yylex): Fix boundary conditions in character literal and
7455         string literal loops.
7456
7457 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
7458
7459         * decl.c (lookup_name_real): OK, do return the from_obj value
7460         unless got_object depends on template parms.
7461
7462         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
7463
7464         * pt.c (coerce_template_parms): Also complain about local enums.
7465
7466         * cp-tree.h: Add prototype for set_identifier_local_value.
7467         * decl.c (set_identifier_local_value_with_scope): Make static,
7468         prototype.
7469         * search.c (covariant_return_p): Likewise.
7470         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
7471
7472         * call.c (build_method_call): Only pull out the type of a destructor
7473         if it's a template type parm.
7474         * decl.c (lookup_name_real): Never return the from_obj value.
7475
7476 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
7477
7478         * except.c (process_start_catch_block_old): Call start_decl_1 for
7479         catch parm.
7480         * decl.c (start_decl_1): Avoid duplicate error.
7481
7482         * init.c (expand_default_init): Only perform the initialization if
7483         it will do something.
7484
7485 1998-07-23  H.J. Lu  (hjl@gnu.org)
7486
7487         * parse.y (base_class): Check for invalid base class.
7488
7489 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
7490
7491         * decl2.c (import_export_template): Fold in...
7492         (import_export_class): ...to here.  Handle dllimport/export.
7493
7494         * class.c (build_vtable): Pass at_eof to import_export_vtable.
7495         (prepare_fresh_vtable): Likewise.
7496         * decl2.c (import_export_class): Split out...
7497         (finish_prevtable_vardecl): From here.
7498         * class.c (finish_struct_1): Call import_export_class if at_eof.
7499
7500         * decl.c (start_function): #if 0 mysterious code I wrote and have
7501         forgotten why.
7502         * rtti.c (get_tinfo_fn): If this is for a class type, set
7503         DECL_CONTEXT.
7504
7505 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
7506
7507         * inc/exception: Change terminate and unexpected to ().
7508
7509         * parse.y (named_class_head_sans_basetype_defn): A
7510         named_class_head_sans_basetype followed by '{' or ':' is a defn.
7511
7512 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
7513
7514         * tree.c (canonical_type_variant): New fn to handle arrays.
7515         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
7516         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
7517         * method.c (process_overload_item): Use build_overload_value for
7518         arrays.
7519
7520 1998-07-20  Dave Brolley  <brolley@cygnus.com>
7521
7522         * lex.c (mbchar.h): #include it.
7523         (GET_ENVIRONMENT): New macro.
7524         (init_parse): Set character set based on LANG environment variable.
7525         (real_yylex): Handle multibyte characters in character literals.
7526         (real_yylex): Handle multibyte characters in string literals.
7527
7528 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
7529
7530         * lex.c (do_identifier): Look for class value even if we don't
7531         have a global value.  Do implicit declaration if parsing is 2.
7532         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
7533         lookup.
7534
7535 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
7536
7537         * decl.c (pushtag): Revert previous change.
7538         * pt.c (lookup_template_class): Don't put out debugging
7539         information for types that use template parameters.
7540
7541         * decl.c (pushtag): Don't put out debugging information for
7542         compiler-generated typedefs.
7543
7544         * error.c (dump_type_real): Don't crash when presented with
7545         intQI_type_node or the like.
7546
7547         * semantics.c (finish_translation_unit): Fix spelling error in
7548         comment.
7549
7550 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
7551
7552         * decl.c (lookup_name_real): Pull out single function here.
7553         (select_decl): Not here.
7554         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
7555
7556         * decl.c (qualify_lookup): Tweak again.
7557
7558         * pt.c (lookup_template_class): Don't mess with the context of the
7559         instantiation.
7560         * decl2.c (current_decl_namespace): Remove special handling for
7561         templates.
7562
7563         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
7564         a member template specialization.
7565
7566         * tree.c (ovl_member): Use decls_match to compare functions.
7567         * decl.c (decls_match): Check the context of a function.
7568
7569         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
7570         in Koenig lookup support rules.
7571         * semantics.c (finish_call_expr): Handle the new cases.
7572
7573         * typeck.c (build_x_function_call): Handle overloaded methods.
7574
7575         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
7576
7577 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
7578
7579         * semantics.c (finish_object_call_expr): Revert previous change.
7580         * call.c (build_new_method_call): Likewise.  Instead, convert
7581         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
7582
7583 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
7584
7585         * decl.c (qualify_lookup): Handle templates.
7586
7587         * decl2.c (do_using_directive): Don't pass ancestor.
7588         * decl.c (push_using_directive): Calculate ancestor.
7589
7590         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
7591         * decl.c (pushdecl): Move type shadowing handling from here...
7592         (duplicate_decls): ...to here.
7593         * decl.c (set_identifier_local_value_with_scope): New fn.
7594         (pushdecl): Use it.
7595         (set_identifier_local_value, lookup_type_current_level): New fns.
7596         * decl2.c (do_local_using_decl): Handle types and binding level
7597         stuff properly.
7598
7599         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
7600         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
7601         (lookup_namespace_name): Likewise.
7602         * typeck.c (build_unary_op): Not here anymore.
7603
7604         * decl2.c (do_class_using_decl): Make sure we get an identifier.
7605         * class.c (handle_using_decl): Ignore TYPE_DECLs.
7606
7607         * decl.c (qualify_lookup): New fn.
7608         (lookup_name_real): Use it.
7609
7610 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
7611
7612         * decl2.c (add_using_namespace): When directly using a namespace
7613         that was indirect before, promote it.
7614
7615         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
7616         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
7617         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
7618         * decl.c (select_decl): Replace two flag parameters by one.
7619         (unqualified_namespace_lookup): Likewise, pass flag.
7620         (lookup_flags): New function.
7621         (lookup_name_real): Compute flags, pass them.
7622         (lookup_namespace_name): Call with zero-flag.
7623         * decl2.c (ambiguous_decl): Add flag parameter, complain only
7624         according to flags.
7625         (lookup_using_namespace, qualified_lookup_using_namespace):
7626         Add flag parameter, pass them through.
7627         * lex.c (do_scoped_id): Call with zero-flag.
7628
7629 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
7630
7631         * typeck.c (convert_for_assignment): Use comptypes.
7632
7633 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
7634
7635         * semantics.c (finish_object_call_expr): Move test for the
7636         function called being a TYPE_DECL to ...
7637         * call.c (build_new_method_call): Here.
7638
7639 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
7640
7641         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
7642         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
7643
7644         * lex.c (looking_for_typename): Don't initialize.
7645
7646         * decl2.c (ambiguous_decl): Clarify error message.
7647
7648         * decl.c (push_using_directive): Iterate over namespaces used
7649         indirectly.
7650
7651 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7652
7653         * decl2.c (add_using_namespace): Iterate over namespaces used
7654         indirectly.
7655
7656         * decl.c (lookup_name_real): Accept namespace aliases as locals.
7657         (cat_namespace_levels): Ignore aliases.
7658         (duplicate_decls): Ignore duplicate aliases.
7659         * decl2.c (do_namespace_alias): Process block level namespace
7660         aliases.  Store alias with pushdecl.  Remove odr errors.
7661         * parse.y (namespace_alias): New non-terminal.
7662         (extdef): Use it.
7663
7664 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
7665
7666         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
7667         Handle TEMPLATE_TYPE_PARM.
7668         (arg_assoc): Rewrite.
7669
7670         * pt.c (complete_template_args): Don't look at the context unless
7671         we have to.
7672
7673         * method.c (build_decl_overload_real): Fix namespace handling.
7674
7675         * typeck.c (build_unary_op): Extract a lone function from an
7676         OVERLOAD.
7677
7678         * call.c (build_scoped_method_call): Handle getting a namespace
7679         for basetype in a destructor call.
7680         (check_dtor_name): Handle enums.
7681
7682         * parse.y (using_directive): New nonterminal.
7683         (extdef, simple_stmt): Use it.
7684
7685 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7686
7687         * decl2.c (add_function): Move error message ...
7688         (arg_assoc_namespace): ... from here.
7689
7690 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
7691
7692         * parse.y (namespace_qualifier): Fix multiple level handling.
7693         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
7694         (arg_assoc): Don't skip the first argument of a function.
7695
7696 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
7697
7698         * search.c (my_tree_cons): Clean up.
7699
7700 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
7701
7702         * call.c (joust): Don't warn about "confusing" conversions to the
7703         same type.
7704
7705 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7706
7707         * class.c (push_nested_class): Complain about namespaces.
7708         * decl.c (start_decl): Enter the object's namespace.
7709         (cp_finish_decl): Leave it.
7710         (grokdeclarator): Likewise.
7711         * decl2.c (check_decl_namespace): New function.
7712         (finish_file): Call it.
7713         * parse.y (complex_direct_notype_declarator): Set complexity
7714         of namespace-qualified ids to -1, enter the namespace.
7715
7716         * method.c (build_template_decl_overload): Expect _DECL as first
7717         parameter.  Put context temporarily into current_namespace.
7718         * pt.c (check_explicit_specialization): Change caller.
7719         (tsubst): Likewise.
7720
7721         * init.c (build_offset_ref): Call mark_used and
7722         convert_from_reference for namespace members.
7723
7724 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7725
7726         * search.c (my_tree_cons): The bitfield is at index 2.
7727
7728 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
7729
7730         * lang-options.h: Format changed to work with new --help support
7731         in gcc/toplev.c
7732
7733 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7734
7735         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
7736         Do Koenig lookup in CALL_EXPR.
7737         (arg_assoc): Handle error_mark.
7738         * lex.c (is_global): New function.
7739         (do_identifier): Expect arguments for Koenig lookup.
7740         * parse.y (primary): Add rules for calls of unqualified function calls.
7741         (do_id): Change call of do_identifier.
7742         * pt.c (finish_stmt_expr): Likewise.
7743         * semantics.c (finish_id_expr): Likewise.
7744         (finish_call_expr): Add integer parameter to indicate
7745         argument-dependent lookup.
7746
7747         * decl.c (struct binding_level): New field using_directives.
7748         (push_using_decl): Not sorry anymore.
7749         (push_using_directive): New function.
7750         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
7751         (unqualified_namespace_lookup): New function, code from ...
7752         (lookup_name_real): ... here.
7753         * decl2.c (lookup_using_namespace): Pass using list instead of
7754         initial scope.
7755         (validate_nonmember_using_decl): New function.
7756         (do_nonmember_using_decl): New function.
7757         (do_toplevel_using_decl): Use them.
7758         (do_local_using_decl): New function.
7759         (do_using_directive): Support block-level directives.
7760         * parse.y (simple_stmt): Support using declarations and
7761         directives.
7762         (namespace_qualifier, namespace_using_decl): New non-terminals.
7763
7764         * xref.c (classname): New function.
7765         (GNU_xref_hier): Change class and base parameters to tree.
7766         * decl.c (xref_baseypes): Change caller.
7767         * friend.c (make_friend_class): Likewise.
7768
7769 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7770
7771         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
7772         comparison.
7773
7774         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
7775         template template parameter, record its use.
7776         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
7777         its template arguments if exists.
7778
7779         * pt.c (coerce_template_template_parms): New function equivalent
7780         to coerce_template_parms when IS_TMPL_PARM is true.
7781         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
7782         all callers changed.
7783
7784         (coerce_template_parms): Access ARGLIST properly when creating a
7785         new vector.  Only accept implicit TYPE_DECL as valid argument for
7786         a template template parameter when it is a base class of
7787         current_class_type.  Don't display error message when COMPLAIN is
7788         false.
7789
7790 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
7791
7792         * repo.c (get_base_filename): Use file_name_nondirectory.
7793         (open_repo_file): Likewise.
7794         * cp-tree.h (file_name_nondirectory): Add prototype.
7795
7796 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
7797
7798         * friend.c (do_friend): Pull the identifier out of declarator.
7799         Use cp_error and friends.
7800         * decl2.c (qualified_lookup_using_namespace): Fix call to
7801         purpose_member.
7802         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
7803         (grokvardecl): Use DECL_CLASS_SCOPE_P.
7804         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
7805         * class.c (warn_hidden): Fix for OVERLOAD.
7806         From grahams@rcp.co.uk:
7807         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
7808         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
7809
7810 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
7811
7812         * g++.1 (-traditional): Remove duplicated documentation.
7813
7814 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
7815
7816         * method.c (flush_repeats): Add nrepeats parameter.
7817         (issue_nrepeats): Likewise.
7818         (is_back_referenceable_type): New function.  Don't back-reference
7819         TEMPLATE_TYPE_PARMs as well as simple types like integers.
7820         (build_mangled_name_for_type): Likewise.
7821         (build_mangled_name_for_type_with_Gcode): Likewise.
7822         (lasttype): Remove.
7823         (nrepeats): Likewise.
7824         (Nrepeats): Likewise.
7825         (start_squangling): Don't clear the variables removed above.
7826         (end_squangling): Likewise.
7827         (flush_repeats): Tidy.  Use nrepeats parameter rather than
7828         Nrepeats global.
7829         (issue_nrepeats): Likewise, but with nrepeats global.  Use
7830         is_backreferenceable_type.
7831         (build_overload_nested_name): Tidy.  Add comment.  Use
7832         build_mangled_name_for_type.
7833         (build_underscore_int): Comment.
7834         (build_overload_scope_ref): Use build_mangled_name_for_type.
7835         (build_overload_int): Likewise.
7836         (build_template_template_parm_names): Tidy.
7837         (build_template_parm_names): Use build_mangled_name_for_type.
7838         (build_overload_identifier): Add comments.
7839         (build_mangled_name_for_type_with_Gcode): Split out from
7840         build_mangled_name.
7841         (build_mangled_name_for_type): Use it.
7842         (build_mangled_name): Rework to use build_mangled_name_for_type
7843         and to not use global nrepeats/Nrepeats.  Tidy.
7844         (process_modifiers): Tidy.
7845         (check_btype): Use is_backreferenceable_type.  Add comment.
7846         Rename `node' to `type'.
7847         (process_overload_item): Set numeric_output_need_bar here.
7848         Use build_mangled_name_for_type.  Tidy.
7849         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
7850         build_mangled_name_for_type.
7851
7852         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
7853         for TYPE_DECLs.
7854
7855 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
7856
7857         * cp-tree.h (warn_long_long): Define.
7858         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
7859         warning "ANSI C++ does not support `long long'".
7860         * decl2.c (warn_long_long): Define.
7861         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
7862
7863 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
7864
7865         * decl.c (xref_tag): Handle attributes between 'class' and name.
7866         * parse.y (aggr): Likewise.
7867         * semantics.c (finish_class_definition): Likewise.
7868         * Makefile.in (EXPECTED): Adjust.
7869
7870         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
7871         * decl2.c: Define them.
7872         (lang_decode_option): Handle them.
7873         * lang-options.h: Add -foptional-diags.
7874         * class.c (finish_struct): Don't complain about multiple meanings of
7875         name if -fno-optional-diags.
7876         * decl.c (pushdecl_class_level): Likewise.
7877         * lex.c (real_yylex): Check warn_multichar.
7878
7879 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
7880
7881         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
7882
7883         * tree.c (make_binfo): Fix length.
7884
7885 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
7886
7887         * decl2.c (lang_decode_option): Remove warn_template_debugging.
7888         * lang-options.h: Likewise.
7889
7890 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7891
7892         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
7893         (process_start_catch_block): Likewise for variables
7894         `false_label_rtx', `call_rtx' and `return_value_rtx'.
7895
7896 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
7897
7898         * tree.c (build_srcloc): Make sure we allocate this node on the
7899         permanent obstack.
7900
7901 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
7902
7903         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
7904         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
7905         (lang_specific_driver): Only add -lm automatically if need_math is
7906         nonzero.
7907
7908 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
7909
7910         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
7911
7912 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7913
7914         * Makefile.in (EXPR_H): New dependency variable.
7915         (decl2.o): Depend on $(EXPR_H).
7916         (typeck.o): Likewise.
7917         (init.o): Likewise.
7918         (expr.o): Likewise.
7919
7920 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
7921
7922         * decl.c (start_enum): Put local enums on permanent_obstack.
7923
7924 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
7925
7926         * cp-tree.h (c_get_alias_set): Declare.
7927         * decl.c (init_decl_processing): Set lang_get_alias_set.
7928
7929 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
7930
7931         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
7932         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
7933         flag for all function decls which are in the exception table.
7934         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
7935         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
7936         code is emitted for any referenced rtti function.
7937
7938 1998-06-25  Dave Brolley  <brolley@cygnus.com>
7939
7940         * lang-specs.h: Use new | syntax to eliminate
7941         string concatenation.
7942
7943 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
7944
7945         * cp-tree.h (CP_DECL_CONTEXT): New macro.
7946         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
7947         * method.c (build_overload_nested_name): Likewise.
7948         * sig.c (build_signature_pointer_or_reference_type): Don't set
7949         DECL_CONTEXT.
7950
7951 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7952
7953         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
7954         * cp-tree.h (FROB_CONTEXT): New macro.
7955         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
7956         * decl.c (namespace_binding): Replace NULL_TREE with
7957         global_namespace.
7958         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
7959         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
7960         Likewise.
7961         * decl.c (pushtag): Use FROB_CONTEXT.
7962         (pushdecl, make_typename_type, define_function, grokdeclarator):
7963         Likewise.
7964         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
7965         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
7966         Likewise.
7967         * decl2.c (decl_namespace): Return global_namespace if no context.
7968         * method.c (build_overload_nested_name): Expect null as context.
7969         * pt.c (mangle_class_name_for_template): Do nothing for null
7970         contexts.
7971         (lookup_template_class): Allow for null id_context.
7972
7973 1998-06-25  Richard Henderson  <rth@cygnus.com>
7974
7975         * method.c (emit_thunk): Set current_function_is_thunk for the
7976         ASM_OUTPUT_MI_THUNK case as well.
7977
7978 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
7979
7980         * exception.cc (__cplus_type_matcher): Get a match_info pointer
7981         instead of an exception table entry as a parameter.
7982
7983 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
7984
7985         * parse.y (function_try_block): Don't call start_catch_handler.
7986         * except.c (call_eh_info): Remove coerced field from declaration.
7987         (build_eh_type_type_ref): New function to create an address of a
7988         rtti function for the new style exception tables.
7989         (expand_start_catch_block): Split function, this contains the
7990         common part.
7991         (process_start_catch_block_old): New function to perform the rest
7992         of expand_start_catch_block under old style exceptions.
7993         (process_start_catch_block_old): New function to perform the rest
7994         of expand_start_catch_block under new style exceptions.
7995         (expand_end_catch_block): Only pop the false label off the stack under
7996         the old style of exceptions.
7997         * semantics.c (finish_try_block): Don't call start_catch_handler.
7998         * exception.cc (struct cp_eh_info): Add original_value field.
7999         (__cplus_type_matcher): Perform type matching on the original exception
8000         value, and if we have a match, set the current value.
8001         (__cp_push_exception): Set the original exception value.
8002
8003 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
8004
8005         * call.c (joust): Fix confusing conversion warning.
8006
8007         * call.c (build_op_delete_call): Add placement parm.  Check
8008         LOOKUP_SPECULATIVELY.
8009         * cp-tree.h, decl2.c, init.c: Adjust.
8010         * decl.c (finish_function): Use it.
8011
8012         * pt.c (tsubst): Diagnose creating void fields or variables.
8013
8014 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8015
8016         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
8017
8018         * cp-tree.h (check_dtor_name): Add prototype.
8019
8020         * init.c (expand_member_init): Remove unused variables
8021         `ptr_type_node', `parm' and `rval'.
8022
8023         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
8024         in call to fprintf.
8025         (lang_print_xnode): Likewise.
8026
8027         * typeck2.c (enum_name_string): Cast argument to sprintf to long
8028         and use %ld specifier.
8029
8030         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
8031         specifier in call to fprintf.
8032         (GNU_xref_member): Cast argument to sprintf to int.
8033
8034 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
8035
8036         * typeck2.c (pop_init_level): Warn about implicit zero initialization
8037         of struct members.
8038
8039 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8040
8041         * cp-tree.h: Prototype function `check_java_method'.
8042
8043 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
8044
8045         * class.c (finish_struct): Make conflicting use of id a pedwarn.
8046         * decl.c (pushdecl_class_level): Likewise.
8047
8048 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
8049
8050         * pt.c (convert_nontype_argument): Issue an error when presented
8051         with an integer (real) constant that cannot be simplified to an
8052         INT_CST (REAL_CST).
8053
8054         * cp-tree.h (c_get_alias_set): Remove declaration added in
8055         1998-06-13 change that should never have been checked in.
8056
8057 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
8058
8059         * typeck.c (build_binary_op_nodefault): Change % in format strings
8060         to %%.
8061
8062         * decl.c (grokvardecl): Don't build_static_name for decls that
8063         aren't at namespace scope.
8064
8065         * init.c (perform_member_init): Catch default-initialization of
8066         references.
8067
8068 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
8069
8070         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
8071
8072 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
8073
8074         * method.c (hack_identifier): Complain about getting a namespace
8075         or class template.
8076         * typeck.c (decay_conversion): Remove check for namespaces.
8077         * typeck2.c (incomplete_type_error): Likewise.
8078         * parse.y (template_arg): Add PTYPENAME expansion.
8079
8080 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
8081
8082         * decl.c (grokvardecl): Don't build external assembler names for
8083         TYPENAMEs in other namespaces as there is no declarator.
8084         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
8085         info from DECL_CONTEXT if it is NULL.
8086
8087 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
8088
8089         * call.c (check_dtor_name): Split out.
8090         (build_scoped_method_call): Use it.
8091         (build_method_call): Use it.
8092         * init.c (build_offset_ref): Use it.
8093
8094         * typeck.c (build_static_cast): Fix handling of pointers to members.
8095
8096         * decl.c (finish_function): Just return nothing from a constructor.
8097         * typeck.c (c_expand_return): Complain about returning a void
8098         expression from a destructor.
8099
8100 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
8101
8102         * class.c (alter_access): Accept a BINFO explaining how to get
8103         from the entity whose accessed is being altered to the type doing
8104         the altering.
8105         (handle_using_decl): New function containing code split out from ...
8106         (finish_struct_1): Here.
8107
8108         * cp-tree.h (complete_type_or_else): Declare.
8109         * init.c (build_new_1, build_delete): Use it.
8110         * typeck.c (require_complete_type): Use complete_type, rather than
8111         expanding it inline.
8112         (complete_type_or_else): New function.
8113         (build_component_ref): Use it.
8114         (pointer_int_sum): Make sure the type pointed to is complete.
8115         (pointer_diff): Likewise.
8116
8117         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
8118         types.
8119
8120         * search.c (get_matching_virtual): Note that member templates
8121         cannot override virtual functions.
8122
8123 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
8124
8125         * pt.c (check_explicit_specialization): If DECLARATOR turned into
8126         an error_mark_node from lookup_template_function, return the same.
8127         (determine_specialization): Also make sure TEMPLATE_ID isn't an
8128         error_mark_node, before we try to read its operands.
8129         * decl.c (grokdeclarator): If we got an error_mark_node from
8130         check_explicit_specialization, just return it right back.
8131
8132 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
8133
8134         * class.c (instantiate_type): Don't treat template-ids that don't
8135         specify any template arguments as equivalent to ordinary
8136         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
8137         pointer-to-members for member templates.  Tidy slightly.
8138         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
8139         * init.c (build_offset_ref): Handle template-ids like ordinary
8140         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
8141         offset part of the OFFSET_REF.
8142         * typeck.c (build_unary_op): Change check for unknown types to
8143         look for OFFSET_REFs, not SCOPE_REFs.
8144
8145 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
8146
8147         * pt.c (is_member_template_class): New function.
8148         (push_template_decl_real): Use it.
8149
8150 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
8151
8152         * friend.c (do_friend): Add support for nested classes using
8153         member functions of the enclosing class as friends.
8154
8155 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
8156
8157         * call.c (convert_default_arg): Make global, not static.
8158         (convert_arg_for_ellipsis): Split out from ...
8159         (build_over_call): Here.
8160         * cp-tree.h (convert_default_arg); Declare.
8161         (convert_arg_to_ellipsis): Likewise.
8162         (do_member_init): Remove.
8163         * init.c (do_member_init): Remove; this code is dead.
8164         (expand_member_init): Remove much of this code; it is dead.
8165         * typeck.c (convert_arguments): Use convert_default_arg and
8166         convert_arg_for_ellipsis, rather than duplicating here.
8167
8168         * call.c (convert_like): Don't fail silently if
8169         build_user_type_conversion fails.  Always return error_mark_node
8170         for failure.
8171
8172 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
8173
8174         * search.c (covariant_return_p): Complain about ambiguous base.
8175
8176         * typeck.c (build_component_ref): Diagnose ref to nested type.
8177
8178 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
8179
8180         * decl.c (grokparms): Check that INIT isn't an error_mark_node
8181         before giving error about invalid type for default arg.
8182
8183 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
8184
8185         * call.c (build_method_call): Fix thinko.
8186
8187 1998-06-10  Dave Brolley  <brolley@cygnus.com>
8188
8189         * decl2.c (lang_decode_option): New argc/argv interface.
8190         * cp-tree.h (lang_decode_option): New argc/argv interface.
8191         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
8192         specified for cpplib-enabled compilers.
8193         * lex.c (lang_init): Don't check_newline for cpplib.
8194         (init_parse): Don't initialize cpplib here.
8195
8196 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
8197
8198         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
8199         piece before checking DECL_MUTABLE_P.
8200
8201 1998-06-10  John Carr  <jfc@mit.edu>
8202
8203         * tree.c (debug_binfo): Make printf format match arguments.
8204
8205         * error.c (OB_PUTI): Make printf format match arguments.
8206
8207 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
8208
8209         * init.c (perform_member_init): Handle default-initialization.
8210
8211         * except.c (build_throw): Handle throwing NULL.
8212
8213         * typeck.c (build_x_function_call): Use resolve_offset_ref.
8214
8215         * search.c (compute_access): Only strip an anonymous union
8216         for a FIELD_DECL.
8217
8218         * call.c (add_builtin_candidates): Tweak.
8219
8220         * cvt.c (build_expr_type_conversion): Restore code for conversion
8221         from class types.
8222         * decl2.c (delete_sanity): Use it.  Clean up.
8223
8224         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
8225
8226 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
8227
8228         * typeck.c (c_expand_return): Don't warn about void expressions on
8229         return statements in functions returning void.
8230
8231 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
8232
8233         * pt.c (fn_type_unification): Revise documentation.  Tidy.
8234         (type_unification): Likewise.
8235
8236 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
8237
8238         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
8239         expand_end_catch.
8240         * parse.y (function_try_block): Rename expand_start_catch, and delete
8241         expand_end_catch.
8242         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
8243         expand_end_catch.
8244
8245 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
8246
8247         * search.c (lookup_member): New fn.
8248         * class.c (finish_struct_1): Use it.
8249         * decl.c (lookup_name_real): Use it.
8250
8251 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8252
8253         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
8254
8255         * cp-tree.h: Add prototype for `maybe_print_template_context' and
8256         `maybe_make_one_only'.
8257
8258         * decl.c (auto_function): Remove unused variable `decl'.
8259
8260         * decl2.c: Include dwarf2out.h and dwarfout.h.
8261
8262         * lex.c: Remove redundant declarations of `set_float_handler' and
8263         `asm_out_file'.
8264
8265 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
8266
8267         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
8268         time flag.  Call __cp_eh_info instead of __cp_exception_info.
8269         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
8270         (__cp_exception_info): Return offset into cp_eh_info structure to
8271         match what use to be the start of this structure.
8272         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
8273         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
8274         compile time flag.
8275         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
8276         __cp_eh_info instead of __cp_exception_info.
8277
8278 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
8279
8280         * decl.c (cp_finish_decl): Disable inlining of extern inlines
8281         with static variables.
8282
8283 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
8284
8285         * init.c (build_offset_ref): Correct previous change to use build,
8286         not build_min.
8287
8288 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
8289
8290         * class.c (instantiate_type): Handle pointer-to-members where the
8291         member is a template.
8292         * init.c (build_offset_ref): Likewise.
8293         * typeck.c (build_unary_op): Likewise.
8294
8295 1998-06-07  Richard Henderson  <rth@cygnus.com>
8296
8297         * lex.c (lang_init_options): New function.
8298         (lang_init): Remove flag_exceptions == 2 hack.
8299
8300 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
8301
8302         * search.c (envelope_add_decl): Tweak for implicit typename.
8303
8304         * call.c (joust): Also warn about confusing conversion op/constructor
8305         overload resolution.
8306
8307         * spew.c (yylex): Also return the TYPE_DECL if got_object.
8308         Don't clear got_object after '~'.
8309         * call.c (build_scoped_method_call): Tweak destructor handling.
8310         (build_method_call): Likewise.
8311         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
8312         TYPE_MAIN_VARIANT for destructors.
8313         * semantics.c (finish_object_call_expr): Complain about calling a
8314         TYPE_DECL.
8315
8316 1998-06-05  Per Bothner  <bothner@cygnus.com>
8317
8318         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
8319         Define - update needed by gcc.c change.
8320
8321 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
8322
8323         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
8324
8325 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
8326
8327         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
8328         * decl.c (lookup_name_real): Add namespaces_only parameter.
8329         If set, return only NAMESPACE_DECLs.
8330         (select_decl): Likewise.
8331         (identifier_type_value): Give additional parameter.
8332         (lookup_name_nonclass): Likewise.
8333         (lookup_name): Likewise.
8334         (find_binding): Skip namespace aliases.
8335         (binding_for_name): Likewise.
8336         (push_namespace): Check for namespace aliases.
8337         (lookup_name_namespace_only): New function.
8338         (begin_only_namespace_names, end_only_namespace_names): New functions.
8339         * decl2.c (set_decl_namespace): Skip namespace aliases.
8340         (do_using_directive): Likewise.
8341         (do_namespace_alias): Produce namespace aliases, fix alias
8342         redeclaration.
8343         * error.c (dump_decl): Support SCOPE_REF.
8344         * parse.y (extdef): Wrap lookup with namespace_only for namespace
8345         aliases and using declarations.
8346
8347 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
8348
8349         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
8350
8351         * error.c (dump_expr): Clean up NEW_EXPR case.
8352
8353 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8354
8355         Suggested by Brendan Kehoe
8356         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
8357         treat it as using ::decl.
8358
8359         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
8360
8361         * tree.c (mapcar): Support NEW_EXPR.
8362
8363         * error.c (dump_expr): Support NEW_EXPR.
8364
8365 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
8366
8367         * method.c (make_thunk): Use overload machinery to make name.
8368         * search.c (covariant_return_p): New fn.
8369         (get_matching_virtual): Use it.
8370
8371         * init.c (build_new_1): Fix check for void.
8372
8373 1998-06-01  Per Bothner  <bothner@cygnus.com>
8374
8375         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
8376         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
8377         java_int_type_node, java_long_type_node, java_float_type_node,
8378         java_double_type_node, java_char_type_node, java_boolean_type_node):
8379         New "primitive" types, with predefined names __java_byte etc.
8380         (record_builtin_java_type):  New function.
8381         (init_decl_processing):  Make Java types with record_builtin_java_type.
8382         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
8383         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
8384         (grokfndecl):  Call check_java_method for Java classes.
8385         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
8386         (process_overload_item):  Match types against specific
8387         java_XX_type_node types, rather than using is_java_type.
8388         * class.c (finish_struct_1):  Don't add default copy constructor
8389         or operator= if TYPE_FOR_JAVA.
8390         (pop_lang_conext):  Restore strict_prototyp proper if Java.
8391         * decl2.c (acceptable_java_type, check_java_method):  New functions.
8392         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
8393         (tsubst):  Move common statement after if statement.
8394         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
8395
8396 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
8397
8398         * pt.c (for_each_template_parm): Use first_rtl_op.
8399
8400         * tree.c (build_cplus_array_type_1): Also check index_type for
8401         template parms.
8402
8403 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
8404
8405         * pt.c (tsubst): Always copy BINFO_BASETYPES.
8406
8407 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
8408
8409         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
8410         TYPE_SIZE_UNIT too.
8411
8412 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
8413
8414         * decl.c (grokdeclarator): Don't complain about in-class
8415         initialization of static consts if we don't really know the type
8416         of the variable.
8417
8418 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
8419
8420         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
8421         * method.c (build_destructor_name): New fn.
8422         * decl2.c (maybe_retrofit_in_chrg): Split out...
8423         (grokclassfn): From here.  Reorganize.
8424         * decl.c (grok_ctor_properties): Make sure ctors for types with
8425         vbases have the in_chrg parm.
8426         * pt.c (instantiate_class_template): Update
8427         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
8428         grok_*_properties.
8429         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
8430
8431 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
8432
8433         * pt.c (instantiate_decl): Make test for whether or not static
8434         variables should be instantiated early match its comment.
8435
8436 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
8437
8438         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
8439         a member.
8440         (start_function): Call check_default_args.
8441         * decl2.c (grokfield): Don't call check_default_args.
8442         (check_default_args): Use cp_error_at.
8443         * lex.c (do_pending_defargs): Call check_default_args.
8444
8445 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
8446
8447         * call.c (build_method_call): Make sure get_type_value returns
8448         something before we try to use its TYPE_MAIN_VARIANT.
8449         (build_scoped_method_call): Likewise.
8450
8451 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
8452
8453         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
8454         initialize an array.
8455
8456         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
8457         DECL_VIRTUAL_P.
8458
8459         * friend.c (do_friend): Clarify template warning.
8460
8461 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
8462
8463         * decl.c (shadow_label): Don't treat decls as identifiers.
8464         (maybe_push_to_top_level): Clear shadowed_labels.
8465
8466         * pt.c (instantiate_decl): Reset lineno and filename after calling
8467         regenerate_decl_from_template.
8468
8469         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
8470         error_mark_node.
8471
8472 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
8473
8474         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
8475
8476 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
8477
8478         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
8479         (convert_nontype_argument): Handle cases when nontype template
8480         parameters become classes after substitution.
8481
8482 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
8483
8484         * friend.c (is_friend): Use comptypes, rather than == to compare
8485         types.  Modify for new representation of template friends.
8486         (make_friend_class): Likewise.
8487         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
8488         (instantiate_class_template): Deal with template friends.
8489
8490         * decl.c (store_parm_decls): Remove redundant call to
8491         expand_main_function.
8492
8493 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8494
8495         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
8496         DECL_USE_TEMPLATE.
8497
8498 1998-05-26  Per Bothner  <bothner@cygnus.com>
8499
8500         * language_as_string:  Handle lang_java.
8501
8502 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
8503
8504         * decl.c (pushdecl): Don't copy the type_decl.
8505
8506 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8507
8508         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
8509         current_class_type.
8510         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
8511
8512         * parse.y (complex_direct_notype_declarator): Use $1 to access
8513         scope of notype_qualified_id.
8514
8515 1998-05-26  Dave Brolley  <brolley@cygnus.com>
8516
8517         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
8518         (init_parse): Initialize cpplib interface.
8519
8520         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
8521         empty continuation.
8522
8523 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
8524
8525         * decl.c (pushtag): Avoid crashing on erroneous input.
8526
8527 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8528
8529         * decl.c (push_namespace): Only produce one unique name for
8530         anonymous namespaces.
8531         (get_unique_name): Remove.
8532
8533 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
8534
8535         * call.c (tourney): Don't do any extra comparisons.
8536
8537         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
8538
8539         * cp-tree.h (processing_template_parmlist): Declare.
8540         * decl.c (pushtag): Don't call push_template_decl when we
8541         shouldn't.
8542         * pt.c (processing_template_parmlist): New variable.
8543         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
8544         (complete_template_args): Use it.
8545         (add_to_template_args): Likewise.
8546         (innermost_args): Likewise.
8547         (tsubst): Likewise.
8548         (begin_template_parm_list): Use processing_template_parmlist.
8549         (end_template_parm_list): Likewise.
8550
8551         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
8552         * decl.c (grokdeclarator): Use it.
8553         * decl2.c (grok_x_components): Likewise.
8554         * init.c (initializing_context): Likewise.
8555         * method.c (do_build_copy_constructor): Likewise.
8556         (do_build_assign_ref): Likewise.
8557         * search.c (compute_access): Likewise.
8558         * typeck.c (build_component_ref): Likewise.
8559
8560         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
8561         unnamed type a typedef name "for linkage purposes".
8562
8563         * pt.c (lookup_template_class): Don't look at
8564         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
8565
8566         * method.c (build_overload_int): Handle error cases gracefully.
8567
8568         * pt.c (instantiate_decl): Handle static member variables
8569         correctly.
8570
8571         * pt.c (tsubst): Use the tsubst'd type when producing new
8572         TEMPLATE_PARM_INDEX nodes.
8573
8574 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
8575
8576         * tree.c (cp_tree_equal): Handle pointers to member functions.
8577
8578         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
8579         sure the type of the REF_BIND is a reference type.
8580         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
8581         target_type for clarity.
8582
8583         * parse.y (xcond): Move call to condition_conversion ...
8584         * semantics.c (finish_for_cond): Here.
8585         * parse.c: Regenerated.
8586
8587 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
8588
8589         * decl.c (push_namespace): Namespaces have type void.
8590         * typeck2.c (incomplete_type_error): Complain about namespace
8591         used as expression.
8592         * typeck.c (decay_conversion): Likewise.
8593
8594 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8595
8596         * error.c (dump_expr): Support namespaces.
8597
8598 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
8599
8600         * cp-tree.def: Add SRCLOC.
8601         * cp-tree.h: Add struct tree_srcloc and accessor macros.
8602         * tree.c (build_srcloc, build_srcloc_here): New fns.
8603         * pt.c (add_pending_template): Use build_srcloc_here.
8604         (push_tinst_level): Update last_template_error_tick before erroring.
8605         (instantiate_decl): Restore lineno and input_filename before
8606         calling add_pending_template.
8607         * decl2.c (finish_file): Set up lineno and input_filename for
8608         pending templates.
8609
8610 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
8611
8612         * decl.c (lang_print_error_function): New fn.
8613         (init_decl_processing): Set print_error_function to use it.
8614         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
8615
8616         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
8617         ICS_BAD_FLAG.
8618
8619         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
8620         copy-initialization.
8621
8622         * class.c (build_vtable_entry): Use int_fits_type_p.
8623         (build_vtable): Pass a signed offset to build_vtable_entry.
8624         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
8625         set_rtti_entry): Likewise.
8626
8627 1998-05-22  Per Bothner  <bothner@cygnus.com>
8628
8629         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
8630         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
8631
8632 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
8633
8634         * pt.c (print_template_context): Use fprintf instead of cp_error.
8635
8636         * pt.c (determine_specialization): Just return an error_mark_node.
8637         Also print the decl we want in error messages.  If we complain,
8638         return error_mark_node.
8639         (tsubst_friend_function): Set lineno and input_filename so
8640         error messages will be useful.
8641         (instantiate_template): Just return an error_mark_node.
8642         (check_explicit_specialization): Don't mess with a returned
8643         error_mark_node.
8644
8645         * pt.c (print_template_context): Add new argument.
8646         (maybe_print_template_context): New fn.
8647         (push_tinst_level): Increment tinst_level_tick.
8648         (pop_tinst_level): Likewise.
8649         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
8650         xrealloc instead of xmalloc.
8651
8652         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
8653
8654 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
8655
8656         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
8657         if the template we looked up is the same as the one we already
8658         have.
8659
8660 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
8661
8662         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
8663         (cpp_reader,parse_in): Add for cpplib.
8664         (check_newline): Call handle_sysv_pragma with new interface.
8665         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
8666
8667         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
8668         (sub_getch): Call GETC for cpplib.
8669
8670         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
8671         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
8672
8673         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
8674
8675 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
8676
8677         * decl2.c (maybe_make_one_only): New fn.
8678         (import_export_vtable): Use it.
8679         (import_export_decl): Likewise.
8680         * pt.c (mark_decl_instantiated): Likewise.
8681
8682 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
8683
8684         * decl2.c (find_representative_member): Rename to ...
8685         (build_anon_union_vars): New function.
8686         (finish_anon_union): Fix stupidity of previous change.
8687
8688 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
8689
8690         * decl.c (grokfndecl): Handle definition of specialization in
8691         friend declaration.
8692
8693         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
8694
8695 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
8696
8697         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
8698         to look for type declarations.
8699         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
8700         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
8701         (finish_member_class_template): Declare.
8702         * decl.c (pushtag): Put member class templates on the
8703         CLASSTYPE_TAGS list, just as for ordinary member classes.
8704         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
8705         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
8706         IDENTIFIER_NAMESPACE_VALUEs.
8707         * parse.y (component_decl): Move code to ...
8708         * semantics.c (finish_member_class_template): New function.
8709         Don't put member class templates on the list of components for a
8710         class.
8711         * parse.c: Regenerated.
8712         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
8713         In fact, don't use DECL_CONTEXT at all here.
8714
8715 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8716
8717         * decl.c (record_unknown_type): New function.
8718         (init_decl_processing): Call it for the unknown and global type
8719         nodes.
8720
8721 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
8722
8723         * decl2.c (find_representative_member): New function.
8724         (finish_anon_union): Use it.
8725
8726         * cp-tree.h (MAIN_NAME_P): New macro.
8727         (DECL_MAIN_P): Likwise.
8728         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
8729         (grokfndecl): Use the new macros.
8730         (grokdeclarator): Likewise.
8731         (start_function): Likewise.
8732         (store_parm_decls): Likewise.
8733         (finsh_function): Likewise.
8734         * friend.c (do_friend): Likewise.
8735         * typeck.c (build_function_call_real): Likewise.
8736         (build_unary_op): Likewise.
8737
8738 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
8739
8740         * decl2.c (start_objects, finish_objects, do_dtors,
8741         do_ctors): Split out from...
8742         (finish_file): ...here.
8743
8744 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
8745
8746         * tree.c (is_overloaded_fn): Don't abort on placeholders from
8747         push_class_decls.
8748
8749 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
8750
8751         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
8752
8753         * error.c (dump_expr): Handle an ARROW_EXPR.
8754
8755 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
8756
8757         * decl.c (saveable_obstack): Declare.
8758         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
8759         declare, if necessary.
8760
8761 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
8762
8763         * call.c (compare_qual): Remove.
8764         (is_subseq): Tweak.
8765         (is_properly_derived_from): New function.
8766         (maybe_handle_ref_bind): Likewise.
8767         (maybe_handle_implicit_object): Likewise.
8768         (compare_ics): Modify substantially to bring into conformance with
8769         the standard.
8770         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
8771         (comp_cv_qualification): Declare.
8772         (comp_cv_qual_signature): Likewise.
8773         * typeck.c (comp_cv_qualification): Likewise.
8774         (comp_cv_qual_signature): Likewise.
8775
8776 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8777
8778         * Makefile.in (parse.o): Depend on toplev.h.
8779
8780         * class.c (typecode_p): Remove prototype and definition.
8781
8782         * cp-tree.h (currently_open_class, is_empty_class, member_p):
8783         Add prototype.
8784
8785         * decl.c (push_overloaded_decl_top_level): Remove prototype and
8786         definition.
8787
8788         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
8789         in call to `cp_thing'.
8790         (cp_warning): Likewise for function pointer `warning'.
8791
8792         * except.c (do_function_call): Remove prototype and definition.
8793         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
8794
8795         * method.c (is_java_type): Add prototype and make it static.
8796
8797         * parse.y: Include toplev.h.
8798
8799         * pt.c (type_unification): Remove unused variable `arg'.
8800         (instantiate_decl): Likewise for `save_ti'.
8801
8802         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
8803
8804 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
8805
8806         * init.c (build_member_call): Handle template_ids.
8807         * parse.y (primary): Add global_scope template_id.
8808
8809 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
8810
8811         * decl2.c (get_sentry): Use end_temporary_allocation.
8812         Don't declare permanent_obstack.
8813
8814 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
8815
8816         * parse.y (.finish_new_placement): New non-terminal.
8817         (unary_expr, new_type_id): Use it.
8818         * parse.c: Regenerated.
8819
8820 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
8821
8822         * pt.c (redeclare_class_template): Say where the original definition
8823         of the template-parameter's default argument appeared.
8824
8825 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
8826
8827         * call.c (build_over_call): Tweak empty class handling.
8828
8829         * decl.c (make_typename_type): Use currently_open_class.
8830
8831         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
8832
8833 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
8834
8835         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
8836         for a type unless it is one.
8837
8838         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
8839
8840 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
8841
8842         * Makefile.in (program_transform_name, objdir): Define.
8843
8844         * Makefile.in (BISON): Use bison from the build tree if it exists.
8845         (FLEX): Likewise.
8846
8847 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
8848
8849         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
8850
8851         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
8852
8853 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
8854
8855         * call.c (build_scoped_method_call): Likewise.
8856
8857 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
8858
8859         * init.c (build_new_1): Call suspend_momentary around the creation
8860         of values that must be saved for exception handling.
8861         * parse.y (.build_new_placement): New non-terminal.
8862         (unary_expr, new_placement): Use it.
8863         * parse.c: Regenerated.
8864
8865 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
8866
8867         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
8868         old and new types.
8869
8870         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
8871         canonical type.
8872
8873         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
8874
8875 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
8876
8877         * decl.c (start_decl): Revert problem change.
8878
8879         * Makefile.in (CONFLICTS): Fix.
8880
8881 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
8882
8883         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
8884
8885 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
8886
8887         * class.c (finish_struct_1): Use BINFO_SIZE.
8888
8889         * decl.c (start_decl): Use 'tem'.
8890
8891 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
8892
8893         * exception.cc: Include eh-common.h.
8894         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
8895         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
8896         (__cp_push_exception): Initialize eh_info struct as well.
8897         * except.c: Remove local structs and include eh-common.h.
8898         (init_exception_processing): Set language and version codes.
8899         (call_eh_info): Add presence of eh_info to runtime description of
8900         struct cp_eh_info.
8901         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
8902         * semantics.c (finish_try_block): Call start_catch_block() and
8903         end_catch_block().
8904         * parse.y (function_try_block): Call start_catch_block() and
8905         end_catch_block().
8906
8907 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
8908
8909         * typeck.c (original_type): New function.
8910         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
8911         to see if they're actually the same.
8912         * cp-tree.h (original_type): Declare.
8913
8914 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8915
8916         * Makefile.in (lex.o): Depend on output.h.
8917
8918         * call.c (add_function_candidate): Remove unused variable `cand'.
8919         (add_conv_candidate): Likewise.
8920         (build_builtin_candidate): Likewise.
8921
8922         * cp-tree.h: Add prototype for `types_overlap_p'.
8923
8924         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
8925
8926         * decl2.c (merge_functions): Remove unused variables `tmp' and
8927         `tempn'.
8928
8929         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
8930         (code_as_string): Likewise.
8931         (language_as_string): Likewise.
8932         (parm_as_string): Likewise.
8933         (op_as_string): Likewise.
8934         (assop_as_string): Likewise.
8935         (cv_as_string): Likewise.
8936
8937         * lex.c: Include output.h.
8938
8939         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
8940
8941         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
8942         ATTRIBUTE_UNUSED.
8943
8944         * tinfo.cc (__class_type_info::dcast): Change the type of variable
8945         `i' from int to size_t.
8946
8947         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
8948         ATTRIBUTE_UNUSED.
8949
8950 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
8951
8952         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
8953         DECL_NAMESPACE_SCOPE_P.
8954         (lang_decl_name): Likewise.
8955         * pt.c (tsubst_friend_function, tsubst): Likewise.
8956         * decl.c (pushdecl, redeclaration_error_message, start_decl,
8957         cp_finish_decl, start_function): Likewise.
8958         * class.c (finish_struct_1): Likewise.
8959         * call.c (build_over_call): Likewise.
8960         (compare_ics): Use DERIVED_FROM_P.
8961
8962 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
8963
8964         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
8965         * method.c (build_mangled_name): Use it.
8966         (build_decl_overload_real): Likewise.
8967
8968         * error.c (dump_simple_decl): New function, broken out from ...
8969         (dump_decl): Use it.
8970
8971 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
8972
8973         * ptree.c (lang_print_xnode): Add missing `break'.
8974
8975         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
8976
8977         * call.c (add_template_candidate): Adjust for changes to
8978         fn_type_unification.
8979         (add_template_candidate_real): Likewise.
8980         (add_template_conv_candidate): Likewise.
8981         (build_user_type_conversion_1): Likewise.
8982         (build_new_function_call): Likewise.
8983         (build_object_call): Likewise.
8984         (build_new_op): Likewise.
8985         (build_new_method_call): Likewise.
8986         * class.c (instantiate_type): Likewise.
8987         * cp-tree.h (unification_kind_t): New type.
8988         (fn_type_unification): Adjust prototype.
8989         (type_unificaiton): Likewise.
8990         * pt.c (UNIFY_ALLOW_NONE): New macro.
8991         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
8992         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
8993         (UNIFY_ALLOW_DERIVED): Likewise.
8994         (unify): Change prototype.
8995         (maybe_adjust_types_for_deduction): New function.
8996         (check_cv_quals_for_unify): Likewise.
8997         (determine_specialization): Adjust.
8998         (fn_type_unification): Likewise.
8999         (type_unification): Likewise.
9000         (type_unification_real): Likewise.  Use
9001         maybe_adjust_types_for_deduction.  Fix mishandling of
9002         back-unification of template functions passed as arguments.  Pass
9003         appropriate combination of UNIFY_ALLOW_* to unify.
9004         (unify): Remove unused NTPARMS parameter.  Use
9005         check_cv_quals_for_unify.  Remove bogus code that allowed
9006         too-generous unification in order to adhere more closely to standard.
9007         (get_bindings_real): Adjust.
9008         (get_class_bindings): Likewise.
9009
9010         * method.c (build_overload_identifier): Only use the innermost
9011         template arguments when mangling.
9012         * pt.c (tsubst_template_argument_vector): New function.
9013         (complete_template_args): Deal with the situation where the
9014         extra_args contain more than one level of arguments.
9015         (lookup_template_class): Deal with member template classes, which
9016         may have more than one level of arguments.
9017         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
9018         Improve handling of member template classes.  Use
9019         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
9020         tsubst_template_argument_vector where appropriate.
9021         (regenerate_decl_from_template): Break out from ...
9022         (instantiate_decl): Here.
9023
9024         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
9025         * parse.h: Regenerated.
9026         * parse.c: Really regenerated.
9027
9028         * cp-tree.h (finish_unary_op_expr): New function.
9029         (finish_id_expr): Likewise.
9030         (begin_new_placement): Likewise.
9031         (finish_new_placement): Likewise.
9032         (finish_declarator): Likewise.
9033         (finish_translation_unit): Likewise.
9034         (finish_parmlist): Likewise.
9035         (begin_class_definition): Likewise.
9036         (finish_class_definition): Likewise.
9037         (finish_default_args): Likewise.
9038         (finish_inline_definitions): Likewise.
9039         * parse.y (GCC_ASM_KEYWORD): Remove.
9040         (TYPENAME_ELLIPSIS): Likewise.
9041         * parse.c: Regenerated.
9042         Use new functions in semantics.c in the actions for many rules.
9043         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
9044         * hash.h: Regenerated.
9045         * semantics.c (finish_expr_stmt): Allow NULL expr.
9046         (finish_unary_op_expr): New function, containing
9047         code previously in parse.y.
9048         (finish_id_expr): Likewise.
9049         (begin_new_placement): Likewise.
9050         (finish_new_placement): Likewise.
9051         (finish_declarator): Likewise.
9052         (finish_translation_unit): Likewise.
9053         (finish_parmlist): Likewise.
9054         (begin_class_definition): Likewise.
9055         (finish_class_definition): Likewise.
9056         (finish_default_args): Likewise.
9057         (finish_inline_definitions): Likewise.
9058
9059 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
9060
9061         * typeck.c (build_c_cast): Don't decay arrays and functions to
9062         pointer type when converting to a class type.
9063
9064 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
9065
9066         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
9067         (DECL_CLASS_SCOPE_P): Likewise.
9068
9069 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
9070
9071         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
9072         * decl2.c (constructor_name_full): Likewise.
9073
9074 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
9075
9076         * tree.c (mapcar): Add OVERLOAD support.
9077
9078         * init.c (resolve_offset_ref): We must use basetype_path before we
9079         destroy it with a call to convert_pointer_to.
9080
9081 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
9082
9083         * class.c (currently_open_class): New fn.
9084         * decl.c (lookup_name_real): Use it.
9085         * search.c (lookup_field): Likewise.
9086
9087 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9088
9089         * cp-tree.def (OVERLOAD): New node.
9090         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
9091         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
9092         (NAMESPACE_BINDING): Remove.
9093         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
9094         namespace_binding.
9095         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
9096         Define.
9097         (tree_overload): New struct.
9098         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
9099         (REAL_IDENTIFIER_TYPE_VALUE): Define.
9100         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
9101         (lang_decl_flags): Remove in_namespace.
9102         (lang_decl): Remove chain.
9103         (DECL_CHAIN, DECL_NAMESPACE): Remove.
9104         (flag_honor_std): Declare extern.
9105         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
9106         namespace_binding, set_namespace_binding,
9107         lookup_function_nonclass, cat_namespace_levels,
9108         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
9109         scratch_ovl_cons, ovl_member, build_overload): Declare.
9110         (decl_list_length, get_namespace_id, current_namespace_id,
9111         overloaded_globals_p): Remove.
9112         (lookup_using_namespace, qualified_lookup_using_namespace): Change
9113         return type.
9114         (push_scratch_obstack): New macro.
9115         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
9116         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
9117         convs, fns.
9118         (build_new_function_call): Iterate using OVL_CHAIN.
9119         Print DECL_NAME in when reporting ambiguities.
9120         (build_object_call): Iterate using OVL_NEXT for fns, convs.
9121         (build_new_op): Call lookup_function_nonclass.
9122         Iterate using OVL_NEXT.
9123         (build_op_delete_call): Change detection of members.
9124         Do not wrap TREE_LIST around fields and single global functions.
9125         (build_over_call): Don't push a class level if the context is a
9126         namespace.
9127         (build_new_method_call): Iterate using OVL_NEXT.
9128         * class.c (add_method): Chain overloaded members using
9129         build_overload.  Remove copying of method.
9130         (grow_method): When iterating through the obstack, expect OVERLOAD
9131         nodes.  Chain overload members.
9132         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
9133         nodes in call to get_baselinks.
9134         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
9135         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
9136         fdecls that are OVERLOAD nodes.
9137         (validate_lhs): New function.
9138         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
9139         code.  Use DECL_NAME in error messages.  Split code between global
9140         and member function processing.
9141         * decl.c (global_type_node): New static variable.
9142         (in_std): New global.
9143         (struct binding_level): New field usings.
9144         (resume_binding_level): Assert that we are not in a class.
9145         (toplevel_bindings_p): Just check for namespace_p or
9146         pseudo_global.
9147         (resume_level): Remove.
9148         (find_binding): New function.
9149         (binding_for_name): Call it.
9150         (namespace_binding, set_namespace_binding): New functions.
9151         (push_namespace): Associate binding level with new namespace,
9152         resume_binding_level for existing namespace.  Remove old code.
9153         Fake std by counting.
9154         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
9155         (maybe_push_to_top_level): Save current namespace.
9156         (pop_from_top_level): Restore saved namespace.
9157         (pop_namespace): Call suspend_binding_level.  Remove old code.
9158         (cat_namespace_levels): New function.
9159         (set_identifier_type_value_with_scope): For namespace bindings,
9160         set BINDING_TYPE, and use global_type_node.
9161         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
9162         (identifier_type_value): New function.
9163         (pushtag): If no context, use current_namespace.
9164         (duplicate_decls): Don't process DECL_CHAIN.
9165         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
9166         already set.  Never reset it to NULL_TREE.  Lookup global variables
9167         in their namespace.  Push overloaded templates if they are on
9168         namespace level.
9169         (pushdecl_namespace_level): New function.
9170         (pushdecl_top_level): Implement using pushdecl_namespace_level.
9171         (pushdecl_using_decl): New function.
9172         (overloaded_globals_p): Remove.
9173         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
9174         them.  Use namespace_binding and set_namespace_value.
9175         (redeclaration_error_message): Complain if the declarations come
9176         from different namespaces.
9177         (lookup_tag): On namespace level, look in the BINDING_TYPE.
9178         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
9179         old code.
9180         (select_decl): New function.
9181         (lookup_name_real): Call it for qualified and unqualified lookup.
9182         Pass tree_bindings from the stack.
9183         If prefer_type is 1, also accept namespaces.
9184         (lookup_function_nonclass): New function.
9185         (init_decl_processing): Set the binding level of the global
9186         namespace to global_binding_level.
9187         Build a proper type list for __builtin_apply.
9188         Initialize std_node to "fake std" if flag_honor_std is set.
9189         Initialize global_type_node.
9190         Allocated bad_alloc in namespace std if flag_honor_std.
9191         (define_function): Set the DECL_CONTEXT to the current_namespace.
9192         (start_decl): A namespace is not considered as a context here.  If
9193         the DECL_CONTEXT is a namespace, push the decl.
9194         (cp_finish_decl): Check for namespaces used as initializers.
9195         (grokfndecl): Add namespace parameter.  Remove processing of
9196         DECL_CHAIN.
9197         (grokvardecl): Add namespace parameter.
9198         (grokdeclarator): Process SCOPEs that are namespaces.  For
9199         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
9200         (start_function): Check for contexts that are namespaces.
9201         Set context for declarations that have not been pushed.
9202         (store_parm_decls): Check for ::main only.
9203         (finish_function): Likewise.
9204         (start_method): Check for contexts that are namespaces.
9205         (start_method): Remove DECL_CHAIN processing.
9206         * decl2.c (flag_honor_std): Declare.
9207         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
9208         (decl_namespace_list): New static global.
9209         (grok_x_components): Ignore namespaces as type contexts.
9210         (check_classfn): Expect OVERLOAD nodes.
9211         (grokfield): Remove DECL_CHAIN processing.
9212         (finish_file): Call cat_namespace_levels.
9213         (merge_functions): New function.
9214         (ambiguous_decl): Rewrite.
9215         (lookup_using_namespace): Produce tree_bindings.
9216         (qualified_lookup_using_namespace): Likewise.
9217         (set_decl_namespace, decl_namespace, current_decl_namespace,
9218         push_decl_namespace, pop_decl_namespace): New functions.
9219         (arg_lookup): New struct.
9220         (add_function, arg_assoc_namespace, arg_assoc_class,
9221         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
9222         New functions.
9223         (get_namespace_id, current_namespace_id): Remove.
9224         (do_toplevel_using_decl): Rewrite.
9225         (do_class_using_decl): Complain about namespace qualifiers.
9226         (do_using_directive): Sorry if not on namespace level.  Complain
9227         about unknown namespaces.
9228         * error.c (dump_aggr_type): Check for namespace contexts.
9229         * except.c (init_exception_processing): Push terminate into std.
9230         * friend.c (is_friend): A namespace is not a context, here.
9231         * init.c (expand_member_init): Remove DECL_CHAIN processing.
9232         (build_offset_ref): Process OVERLOAD nodes.
9233         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
9234         * lex.c (identifier_type): Loop using OVL_CHAIN.
9235         (see_typename): Set looking_for_typename to 2.
9236         (real_yylex): Likewise.
9237         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
9238         (do_scoped_id): Expect OVERLOAD nodes.
9239         Change calling convention for qualified_lookup_using_namespace.
9240         (build_lang_decl): Don't set in_namespace anymore.
9241         * method.c (typevec_size): New global.
9242         (build_overload_nested_name): Return if global_namespace.
9243         Otherwise, always expect a declaration context.
9244         (build_qualified_name): Likewise.
9245         Make sure we don't write beyond typevec_size.
9246         (build_decl_overload_real): Likewise.
9247         Allocate one extra slot for the namespace.
9248         (hack_identifier): Mark code dead.
9249         Process OVERLOAD and NAMESPACE_DECL nodes.
9250         * parse.y (program): Pop namespaces until in global namespace.
9251         (extdef): In a using-declaration, don't discard the identifier if
9252         there is no declaration.
9253         (left_curly): Ignore type contexts which are namespaces.
9254         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
9255         used as scope.
9256         * pt.c (template_class_depth): Expect types to be namespaces.
9257         (determine_specialization): Simplify by expecting OVERLOAD nodes.
9258         (push_template_decl): Push into namespace level.
9259         Reset ctx if it is a namespace.
9260         Set DECL_CONTEXT to current_namespace if not set already.
9261         Ignore real contexts that are namespaces.
9262         (mangle_class_name_for_template): Skip global_namespace.
9263         Mangle other namespaces as declarations.
9264         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
9265         (lookup_template_class): Push into namespace of context.
9266         If the context is a namespace, set it to global_namespace.
9267         Use id_context for mangling.
9268         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
9269         (tsubst_friend_function): Ignore namespace contexts.
9270         Push into namespace level.
9271         (tsubst): Handle NAMESPACE_DECL nodes.
9272         Remove DECL_CHAIN processing.
9273         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
9274         * ptree.c (print_lang_identifier): Print bindings.
9275         (lang_print_xnode): Print OVERLOAD nodes.
9276         * rtti.c (init_rtti_processing): Push type_info into std.
9277         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
9278         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
9279         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
9280         lookup_fnfields_here): Likewise.
9281         Process all nodes, instead of going through TREE_CHAIN.
9282         * sig.c (build_signature_pointer_or_reference_type): Set context
9283         to global_namespace.
9284         (build_signature_table_constructor): Expect OVERLOAD nodes.
9285         * spew.c (yylex): Save old setting of looking_for_typename.
9286         * tree.c (decl_list_length): Remove.
9287         (binding_init): New function.
9288         (count_functions): Rewrite.
9289         (is_overloaded_fn): Expect OVERLOAD nodes.
9290         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
9291         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
9292         ovl_member): New functions.
9293         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
9294         (type_unknown_p): Likewise.
9295         (require_instantiated_type): Likewise.
9296         (build_component_ref): Declare code dead.
9297         (build_x_function_call): Create and expect OVERLOAD nodes.
9298         (build_function_call_real): Check for ::main only.
9299         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
9300         (convert_for_assignment): Check for TREE_LIST before accessing
9301         TREE_VALUE.
9302         * decl.c (duplicate_decls): Check for namespace bindings instead
9303         of global bindings.
9304         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
9305         lookup_name_current_level, start_decl, xref_tag,
9306         finish_enum): Likewise.
9307         * init.c (build_offset_ref): Likewise.
9308         * search.c (lookup_field): Likewise.
9309         (lookup_fnfields): Likewise.
9310         (dfs_debug_mark): Likewise.
9311         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
9312         (poplevel_class, pop_from_top_level): Likewise.
9313         * decl2.c (finish_method): Likewise.
9314         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
9315         * decl.c (record_builtin_type): Likewise.
9316         (init_decl_processing, grokfndecl): Likewise.
9317         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
9318         (make_lang_type): Likewise.
9319         * parse.y (make_thunk): Likewise.
9320         * pt.c (tsubst): Likewise.
9321         * tree.c (debug_binfo): Likewise.
9322         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
9323         tinfo2.cc, inc/new.h: Add std qualifications.
9324         * inc/new: Wrap with namespace std if __HONOR_STD.
9325         * inc/typeinfo: Likewise.
9326
9327 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
9328
9329         * call.c (build_user_type_conversion_1): Handle second_conv
9330         properly for templates.
9331
9332 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
9333
9334         * method.c (build_decl_overload_real): Set TREE_USED flag to
9335         zero for build_type_variants nodes as well.
9336
9337 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
9338
9339         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
9340
9341 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
9342
9343         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
9344         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
9345         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
9346         xref.o): Add toplev.h dependencies.
9347
9348 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
9349
9350         * errfn.c (cp_error, cp_warning): Remove declarations for
9351         error and warning respectively.
9352
9353 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9354
9355         * error.c: Convert to using ctype macros defined in system.h.
9356         * method.c: Likewise.
9357         * xref.c: Likewise.
9358         * lex.c: Likewise.  Also remove redundant system header stuff.
9359
9360 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
9361
9362         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
9363         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
9364         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
9365         xref.c: Add include of toplev.h.
9366
9367 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
9368
9369         * tree.c (perm_manip): Also regenerate the RTL of an extern.
9370         (copy_to_permanent): Use end_temporary_allocation.
9371
9372 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
9373
9374         * init.c (expand_vec_init): The initialization of each array
9375         element is a full-expression.
9376
9377 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
9378
9379         * method.c (build_mangled_name): Add a call to build_type_variant
9380         to get the right type.
9381
9382 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
9383
9384         * Makefile.in: Add .SUFFIXES.
9385
9386         * cp-tree.def: Remove NAMESPACE_DECL.
9387
9388 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
9389
9390         * call.c (build_over_call): Do evaluate arg even if it has empty
9391         class type.
9392         * decl.c (start_function): Don't push a member function.
9393
9394 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
9395
9396         * Makefile.in (g++FAQ.info): Put -o option before input file.
9397
9398 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
9399
9400         * gxxint.texi: Add info for squangling codes K and B.
9401
9402 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
9403
9404         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
9405         the expression in templates.
9406         (finish_stmt_expr): Likewise.
9407
9408 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
9409
9410         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
9411
9412 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
9413
9414         * decl.c (maybe_push_to_top_level): Always clear
9415         current_template_parms and processing_template_decl.
9416         (pushtag): Remove check of current_class_type and some comments,
9417         since maybe_push_to_top_level no longer creates confusion.
9418
9419 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
9420
9421         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
9422         (DECL_CLASS_TEMPLATE_P): Likewise.
9423         (DECL_PRIMARY_TEMPLATE): Likewise.
9424         (PRIMARY_TEMPLATE_P): Use it.
9425         (push_template_decl_real): New function.
9426         (redeclare_class_template): Take new template parameters as
9427         input.
9428         (is_specialization_of): New function.
9429         (comp_template_args): Declare.
9430         * decl.c (pushtag): Handle friend template classes.
9431         (xref_tag): Likewise.  Use new calling convention for
9432         redeclare_class_template.
9433         * decl2.c (grok_x_components): Handle friend templates.
9434         * friend.c (is_friend): Use is_specialization_of where
9435         appropriate.  Deal with friend class templates.
9436         (make_friend_class): Let a class template be friends with itself.
9437         * pt.c (comp_template_args): Remove declaration.
9438         (tsubst_friend_class): New function.
9439         (push_template_decl_real): New function.
9440         (push_template_decl): Use it.
9441         (redeclare_class_template): Adjust for new calling convention.
9442         (comp_template_args): Give it external linkage.
9443         (instantiate_class_type): Use tsubst_friend_class to deal
9444         with friend templates.
9445         * typeck.c (comptypes): Use comp_template_args, rather than
9446         expanding it inline.
9447         * parse.y (component_decl): Handle a nested template type
9448         like other component type declarations.
9449
9450         * pt.c (check_explicit_specialization): Handle overloaded
9451         constructors correctly.
9452
9453         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
9454         (lookup_template_class): Use it.
9455
9456 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
9457
9458         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
9459         * cp-tree.h: Add WRAPPER support.
9460         * call.c (add_candidate): Split out from add_*_candidate fns.
9461         (build_over_call): Take the candidate instead of function and args.
9462         Enforce access control here.  Emit overload warnings here.
9463         (add_warning): New fn.
9464         (joust): Add WARN parm.  If not set, call add_warning instead of
9465         printing a warning.  Re-enable some warnings.
9466         (tourney): Pass it.
9467         (convert_like): Adjust.
9468         (build_new_op): Adjust.
9469         (build_new_function_call): Adjust.
9470         (build_user_type_conversion_1): Adjust.
9471         (USER_CONV_FN): Adjust.
9472         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
9473         build_int_wrapper): New fns.
9474
9475 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
9476
9477         * pt.c (unify): Fix typo in previous change.
9478
9479 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
9480
9481         * error.c (dump_type_real): Declare canonical_name.
9482
9483         * typeck.c (comp_target_types): Fix PMFs.
9484
9485 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
9486
9487         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
9488         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
9489         TEMPLATE_DECL.
9490
9491         * pt.c (tsubst): Decrease the template-level of
9492         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
9493         TEMPLATE_PARM_INDEX.
9494         (template_decl_level): New function.
9495         (unify): Make sure to record unifications for template
9496         parameters, even when the parameters exactly match the arguments.
9497         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
9498         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
9499         aren't from the level we're currently working on.
9500
9501 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
9502
9503         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
9504
9505         * decl2.c (check_member_template): Set DECL_IGNORED for member
9506         class templates, too.
9507
9508         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
9509
9510 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
9511
9512         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
9513
9514 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
9515
9516         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
9517         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
9518         (init_decl_processing): Handle TI types.
9519         * typeck.c (unsigned_type, signed_type): Handle TI types.
9520
9521 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
9522
9523         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
9524         New local added_libraries.  Increment count when add library to
9525         arglist.
9526
9527 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
9528
9529         * cp-tree.h (type_as_string_real): New function.
9530         * pt.c (mangle_class_name_for_template): Use it.
9531         * error.c (dump_aggr_type): Change prototype.
9532         (dump_type_prefix): Likewise.
9533         (dump_type_suffix): Likewise.
9534         (dump_type_real): Convert from dump_type.  If desired, the
9535         "canonica" name of a typedef, i.e., the name of the underlying
9536         type, can be printed.
9537         (dump_type): Call dump_type_real.
9538
9539 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
9540
9541         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
9542
9543         * typeck.c (comp_target_types): Tweak pedantic case.
9544         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
9545         Return -1 or 1 instead of 1 or 2.
9546         (compparms): Remove STRICT handling.
9547         (convert_for_assignment): Fix handling of pmfs.
9548
9549 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
9550
9551         * typeck.c (comp_target_types): Handle references like pointers.
9552         (comp_target_parms): Note that return code from comp_target_types
9553         can be negative to indicate failure.
9554
9555 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
9556
9557         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
9558         which requires a working target compiler to build.
9559
9560 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
9561
9562         * tree.c (avoid_overlap): Add prototype.
9563
9564         * spew.c (num_tokens): Add prototype.
9565         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
9566
9567         * search.c (dfs_check_overlap): Add prototype.
9568         (dfs_no_overlap_yet): Likewise.
9569
9570         * pt.c (original_template): Add prototype.
9571         (inline_needs_template_parms): Likewise.
9572         (push_inline_template_parms_recursive): Likewise.
9573         (retrieve_specialization, register_specialization): Likewise.
9574         (print_candidates, reduce_template_parm_level): Likewise.
9575         (build_template_decl, mark_template_parm): Likewise.
9576         (tsubst_friend_function, get_bindings_real): Likewise.
9577
9578         * method.c (start_squangling): Add prototype.
9579         (end_squangling, check_ktype, issue_ktype): Likewise.
9580         (build_overloaded_scope_ref, check_btype): Likewise.
9581         (build_mangled_template_parm_index): Likewise.
9582
9583         * lex.c (init_cpp_parse): Add prototype.
9584         (handle_cp_pragma, handle_sysv_pragma): Likewise.
9585         (reduce_cmp, token_cmp): Likewise.
9586
9587         * except.c (call_eh_info): Add prototype.
9588         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
9589         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
9590
9591         * decl2.c (is_namespace_ancestor): Add prototype.
9592         (namespace_ancestor, add_using_namespace): Likewise.
9593         (ambiguous_decl): Likewise.
9594
9595         * decl.c (indent): Add prototype.
9596
9597         * call.c (add_template_candidate_real): Add prototype.
9598
9599 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
9600
9601         * decl2.c (build_expr_from_tree): Just return a PMF.
9602
9603 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
9604
9605         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
9606         when doing initializations.
9607
9608         * pt.c (unify): Use comptypes to compare type args.
9609
9610 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
9611
9612         * decl.c (duplicate_decls): Fix check for when it's safe to free
9613         the new decl.
9614
9615         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
9616         to type_as_string.
9617
9618 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
9619
9620         * pt.c (build_template_parm_index): Add prototype.
9621
9622         * search.c (my_tree_cons): Don't clear words outside the
9623         newly allocated node.
9624
9625 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
9626
9627         * lex.c (init_parse): Now returns char* containing the filename.
9628
9629 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
9630                           Jeff Law   <law@cygnus.com>
9631
9632         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
9633         than a pointer.
9634
9635 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9636
9637         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
9638
9639 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9640
9641         * decl.c (duplicate_decls): Don't warn for redundant decls if
9642         friend: let add_friend take care of it.
9643
9644 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
9645
9646         * sig.c (build_signature_pointer_constructor): Don't set
9647         TREE_HAS_CONSTRUCTOR for a signature pointer.
9648         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
9649         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
9650         here, too.
9651         * typeck.c (build_unary_op): Only allow taking the address of a
9652         real constructor.
9653         * typeck2.c (digest_init): Simplify.
9654         (store_init_value): Don't pedwarn about using { } for pmfs.
9655
9656 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
9657
9658         * cp-tree.h (start_decl):  Update prototype.
9659         * decl.c (start_decl):  Like the C version, new parameters
9660         for the attributes.  Call cplus_decl_attributes here,
9661         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
9662         (grokdeclarator):  Pass NULL for new start_decl arguments.
9663         * pt.c (tsubst_expr):  Likewise.
9664         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
9665         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
9666         * lex.c (build_lang_decl): Add lang_name_java.
9667         * class.c (push_lang_context): Add lang_name_java.
9668         * method.c (build_mangled_name): Check for is_java_type.
9669
9670 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9671
9672         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
9673         * call.c (build_scoped_method_call): Check for TREE_CODE for
9674         VOID_TYPE instead of type ==  void_type_node.
9675         (build_method_call): Likewise.
9676         * decl.c (lookup_name_real): Likewise.
9677         (grokdeclarator): Likewise.
9678         (start_decl): Likewise.
9679         (grokparms): Likewise.
9680         (start_function): Likewise.
9681         (finish_function): Likewise.
9682         (start_method): Likewise.
9683
9684 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
9685
9686         * lex.c (finput): New variable.
9687         (init_cpp_parse):  Renamed from init_parse.
9688         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
9689         (finish_parse): New function.
9690         * cp-tree.h (init_lex, init_parse): Remove declarations.
9691
9692 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
9693
9694         * call.c (build_call): Still evaluate the actual argument.
9695         * class.c (is_empty_class): Update for -fnew-abi.
9696
9697         * decl2.c: -fnew-abi implies -fsquangle.
9698
9699         * method.c (do_build_assign_ref): Don't do anything to copy
9700         an empty class.
9701         (do_build_copy_constructor): Likewise.
9702         * call.c (build_over_call): Likewise.
9703
9704 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
9705
9706         * tree.c (avoid_overlap): Return a value.
9707
9708 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
9709
9710         * method.c (check_btype): Add missing argument to xrealloc.
9711         (check_ktype): Likewise.
9712
9713 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
9714
9715         Implement empty base optimization.
9716         * class.c (finish_struct_1): Add vbase fields earlier.  Set
9717         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
9718         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
9719         (types_overlap_p): New fn.
9720         * tree.c (avoid_overlap): New fn.
9721         (build_base_fields): Use it to avoid overlapping empty bases.
9722         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
9723
9724         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
9725
9726         Re-implement allocation of base class subobjects.
9727         * tree.c (unshare_base_binfos): New fn.
9728         (layout_basetypes): Use it.  Now handles offsets of both virtual and
9729         non-virtual bases, after layout_type.
9730         (layout_vbasetypes): Remove.
9731         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
9732         (build_vbase_pointer_fields): Split out from old layout_basetypes.
9733         * class.c (finish_base_struct): Lose offset handling code.
9734         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
9735         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
9736         * cp-tree.h: Adjust.
9737
9738 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
9739
9740         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
9741         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
9742         * class.c (duplicate_tag_error): Likewise.
9743         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
9744         * tree.c (layout_vbasetypes): Update from layout_record, remove
9745         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
9746         (layout_basetypes): Likewise.
9747
9748 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
9749
9750         * class.c, Make sure system.h is included just after config.h.
9751         Delete lingering stdio and errno references too.
9752         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
9753
9754 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
9755
9756         * friend.c (is_friend): Fix access control for local classes.
9757
9758         * class.c (is_empty_class): New fn.
9759         * call.c (build_call): Don't pass empty class objects to a function.
9760
9761 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
9762
9763         * call.c (build_over_call): Do name resolution for default
9764         arguments of function templates in the scope of the templates.
9765
9766 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
9767
9768         * call.c: Include system.h.  Remove includes, declarations and
9769         defines provided by system.h.
9770         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
9771         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
9772         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
9773         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
9774         * typeck2.c, xref.c: Likewise.
9775         * Makefile.in: Dependencies updated as appropriate.
9776         * Make-lang.in: Likewise.
9777
9778 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
9779
9780         * pt.c (fn_type_unification): Allow incomplete unification without
9781         an immediate error message.
9782
9783 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
9784
9785         * tree.c (member_p): New fn.
9786         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
9787         initializing class members.
9788
9789         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
9790         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
9791
9792         * call.c (build_method_call): Handle non-scoped destructors, too.
9793         * pt.c (tsubst_copy): Likewise.
9794
9795         * pt.c (print_template_context): Split out...
9796         (push_tinst_level): ...from here.
9797
9798         * friend.c (is_friend): Don't pass a type to decl_function_context.
9799
9800         * typeck.c (convert_for_initialization): Always hand off
9801         conversions to class type.
9802
9803 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
9804
9805         * friend.c (is_friend): Local classes have the same access as the
9806         enclosing function.
9807
9808 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
9809
9810         * typeck.c (expand_target_expr): Delete dead function.
9811
9812         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
9813
9814         * repo.c (save_string): Delete dead function.
9815
9816         * method.c (thunk_printable_name): Delete dead function.
9817
9818         * lex.c (yynextch): Delete dead function.
9819
9820         * expr.c (tree_extract_aggr_init): #if 0 out.
9821
9822         * except.c (do_unwind): Delete dead function.
9823         (easy_expand_asm): Likewise.
9824
9825         * cvt.c (build_conversion_type_1): Delete dead function.
9826
9827         * cp-tree.h (push_expression_obstack): Declare.
9828
9829         * call.c (source_type): #if 0 out.
9830
9831         * class.c (alter_access): Remove unused label.  Add braces
9832         around empty else clause.
9833
9834         * lex.c (yyprint): Fix argument to printf.
9835
9836 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
9837
9838         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
9839
9840         * pt.c (instantiate_class_template): Make sure template
9841         arguments are permanent.
9842         * init.c (resolve_offset_ref): Don't go looking around in
9843         template types.
9844
9845         * semantics.c: Add routines to handle expressions, and some
9846         declaration processing.
9847         * parse.y: Use them.
9848         (current_class_depth): Move declaration to cp-tree.h.
9849         * parse.c: Regenerated.
9850         * cp-tree.h: Use them.
9851         (current_class_depth): Declare.
9852         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
9853
9854 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
9855
9856         * error.c (dump_decl): Be a bit more explicit with template
9857         type arguments, when verbose.
9858
9859 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
9860
9861         * inc/exception: Reorder closing braces.
9862
9863 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
9864
9865         * pt.c (redeclare_class_template): New function.
9866         * cp_tree.h (redeclare_class_template): Declare it.
9867         * decl.c (xref_tag): Use it.
9868
9869 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
9870
9871         * call.c (build_over_call): Check IS_AGGR_TYPE, not
9872         TYPE_LANG_SPECIFIC.
9873         * typeck.c (convert_arguments): Likewise.
9874
9875         * decl.c (grokdeclarator): Remove const and volatile from type after
9876         setting constp and volatilep.
9877
9878         * class.c (finish_struct_1): Don't warn about bool bitfield larger
9879         than one bit.
9880
9881 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
9882
9883         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
9884
9885 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
9886
9887         * call.c (build_object_call): Complain about ambiguous operator(),
9888         rather that crashing.
9889         (build_new_op): Likewise.
9890         (build_op_delete_call): Likewise.
9891
9892 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
9893
9894         * cvt.c (perform_qualification_conversions): Use comp_target_types
9895         instead of comp_ptr_ttypes.
9896
9897 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
9898
9899         * cp-tree.h (enforce_access): Declare.
9900         * call.c (enforce_access): Make it extern, not static.
9901         * class.c (alter_access): Use enforce_access; modify code for ISO
9902         compliance, rather than ARM rules.
9903
9904 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
9905
9906         * cp-tree.h: Fix typo.
9907
9908 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
9909
9910         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
9911         if (aggregate_value_p (type)).
9912
9913         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
9914
9915 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
9916
9917         * tree.c (mapcar): When dealing with a DECL, use it's constant
9918         value, if any.
9919         * pt.c (lookup_template_class): Don't mangle the names of template
9920         classes whose arguments are unknown.
9921
9922         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
9923
9924 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
9925
9926         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
9927
9928 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
9929
9930         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
9931         boolean_type_node to 1.
9932
9933 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
9934
9935         * error.c (dump_expr): Remove unused variable `l'.
9936
9937         * pt.c (for_each_template_parm): New function, created by
9938         converting uses_template_parms.
9939         (tree_fn_t): New typedef.
9940         (uses_template_parms): Use it.
9941         (mark_template_parm): New function.
9942         (push_template_decl): Check that the argument list of a partial
9943         specialization uses all the template parameters.
9944
9945         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
9946         with it; we might want it for debugging.
9947         * cp-tree.h (type_unification): Change interface.
9948         * class.c (finish_struct_1): Skip nested template types, just like
9949         ordinary nested types.
9950         (instantiate_type): Use new interface to type_unification.
9951         * lex.c (init_lex): Add __sz as opname for sizeof.
9952         * method.c (build_overload_scope_ref): New function.
9953         (build_overload_int): Handle complex expressions.  Set
9954         numeric_output_need_bar if necessary.
9955         (build_overload_value): Handle non-PARM_DECL nodes; this
9956         routine is now used by build_overload_int.  Remove some
9957         assignments to numeric_output_need_bar.  Use
9958         build_overload_scope_ref.
9959         (build_qualified_name): Note that some template mangled names end
9960         with digits, and set numeric_output_need_bar appropriately.  Use
9961         build_underscore_int.
9962         * pt.c (unify): Change interface.
9963         (type_unification_real): Likewise.
9964         (determine_specialization): Use new interfaces.
9965         (tsubst): Deal gracefully with situations in which the argument
9966         vector is not fully filled.
9967         (fn_type_unification): Use new interfaces.
9968         (type_unification): Likewise.  Remove NOP_EXPR hack.
9969         (type_unification_real): Likewise.
9970         (unify): Likewise.  Deal with unification of complex expressions.
9971
9972 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
9973
9974         * pt.c (complete_template_args): Initialize skip properly.
9975
9976         * decl.c (make_typename_type): Revert.
9977         (make_implicit_typename): Remove.
9978         (lookup_name_real): Don't call it.  Call lookup_field if we see a
9979         TYPE_DECL from a template base.
9980         * search.c (lookup_field): Do implicit typename stuff.
9981
9982 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
9983                           Geoff Noer    <noer@cygnus.com>
9984
9985         * Makefile.in: Various fixes for building cygwin32 native toolchains.
9986         * Make-lang.in: Likewise.
9987
9988 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
9989
9990         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
9991
9992 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
9993
9994         * decl.c (make_implicit_typename): Rewrite removed code.
9995         (make_typename_type): Call it if the type we look up comes from
9996         a base that uses template parms.
9997
9998         * pt.c (complete_template_args): Rewrite.
9999         (tsubst, FUNCTION_DECL): Use it.
10000
10001 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
10002
10003         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
10004         c_expand_asm_operands () if output_operands, input_operands or
10005         clobbers is not NULL_TREE.
10006
10007 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10008
10009         * pt.c (complete_template_args): New function.
10010         (get_bindings): Deal with specializations of function templates
10011         with return type containing parameters from outer class
10012         templates.
10013         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
10014         substitute arguments and compose a new type.
10015
10016 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
10017
10018         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
10019         FUNCTION_DECLs.
10020
10021 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10022
10023         * decl.c (make_implicit_typename): Lose useless code.
10024
10025         * call.c (standard_conversion): Handle A* -> const A* properly.
10026
10027         * pt.c (get_bindings_real): Rename from get_bindings.  Add
10028         check_rettype parm.
10029         (get_bindings): Pass 1.
10030         (get_bindings_overload): Pass 0.
10031
10032 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
10033
10034         * pt.c (check_explicit_specialization): When reverting a static
10035         member function, also remove the `this' parameter from
10036         last_function_parms.
10037
10038 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
10039
10040         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
10041         a function context.
10042
10043         * decl.c (store_bindings): Use free_binding_vecs.
10044         (pop_from_top_level): Likewise.
10045
10046 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
10047
10048         * decl.c (make_implicit_typename): Only change the type of a
10049         TYPENAME_TYPE.
10050
10051 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
10052
10053         * semantics.c: New file, containing routines to perform the
10054         semantic phase of parsing.
10055         * parse.y: Use it.
10056         * pt.c (tsubst_expr): Likewise.
10057         * cp-tree.h: Declare the various functions in semantics.c.
10058         Provide macros to access _STMT tree nodes.
10059         * cp-tree.def: Add ASM_STMT tree node.
10060         * Makefile.in, Make-lang.in: Add dependencies on and for
10061         semantics.c.
10062
10063 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
10064
10065         * pt.c (push_template_decl): Only check primary templates.
10066
10067         * pt.c (check_explicit_specialization): Complain about default args
10068         in explicit specialization.
10069
10070         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
10071         constructor_declarator.
10072
10073 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
10074
10075         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
10076         has no overloaded operator ->.
10077
10078         * call.c (build_field_call): Don't crash when presented with a
10079         field that is actually a nested type.
10080
10081         * decl.c (pushtag): Deal with friend class injection in local
10082         classes.
10083
10084         * call.c (build_object_call): Don't crash if OBJ is a
10085         pointer-to-member-function.
10086
10087 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
10088
10089         * pt.c (push_template_decl): Complain about template with C linkage,
10090         anonymous template class.
10091
10092 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
10093
10094         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
10095         * search.c: Likewise.
10096
10097         * lex.c (do_pending_defargs): Only call
10098         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
10099
10100         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
10101
10102 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
10103
10104         * parse.y: Deal with CONSTRUCTORS in new_initializers.
10105
10106 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
10107
10108         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
10109         closely mimics the behavior in parse.y.
10110         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
10111         into a compound statement.
10112
10113 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
10114
10115         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
10116         * pt.c (inline_needs_template_parms): New fn.
10117         (original_template): New fn.
10118         (push_inline_template_parms_recursive): New fn.
10119         (maybe_begin_member_template_processing): Use them.
10120         (maybe_end_member_template_processing): Likewise.
10121         (is_member_or_friend_template): Rename to is_member_template.
10122         Member functions of local classes are never member templates.
10123
10124 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10125
10126         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
10127         added in the class scope to catch redefinition error.
10128
10129         * pt.c (reduce_template_parm_level): Also copy
10130         the DECL_TEMPLATE_PARMS field.
10131
10132 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
10133
10134         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
10135         reduced-level template type parameter.
10136
10137 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
10138
10139         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
10140         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
10141         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
10142         * decl.c (duplicate_decls): Propagate it.
10143         * typeck2.c (abstract_virtuals_error): Use two loops to emit
10144         abstract virtual functions and virtual functions which need a
10145         final overrider separately.
10146
10147 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
10148
10149         * lang-specs.h: Properly put brackets around array elements in
10150         initializer.
10151
10152         * typeck.c (build_binary_op_nodefault): Correctly place parens around
10153         && and || in expression.
10154
10155 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
10156
10157         * call.c (default_parm_conversions): Remove prototype definition.
10158         (build_method_call): Remove unused variable result.
10159
10160         * cvt.c (ocp_convert): Remove unused variable conversion.
10161
10162         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
10163
10164         * except.c (do_unwind): #if 0 definition of unused variables fcall
10165         and next_pc.
10166
10167         * expr.c (extract_scalar_init): #if 0 prototype and function
10168         definition.
10169
10170         * init.c (expand_aggr_init_1): Remove unused variable init_type.
10171         (build_new_1): Remove unused variable t.
10172
10173         * pt.c (instantiate_class_template): Remove unused variable newtag;
10174         cast called function return value to void.
10175         (do_decl_instantiation): Remove unused variables name and fn.
10176
10177         * tree.c (get_type_decl): Add default return to shut up compiler from
10178         complaining control reaches end of non-void function.
10179
10180         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
10181
10182 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
10183
10184         * call.c (default_parm_conversions): Remove prototype definition.
10185         (build_method_call): Remove unused variable result.
10186         (build_over_call): Add default case in enumeration switch.
10187
10188 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
10189
10190         * decl2.c (lang_decode_option): Change j's type to size_t.
10191
10192         * tree.c (layout_vbasetypes): record_align and desired_align are of
10193         type unsigned int; const_size and nonvirtual_const_size likewise.
10194
10195 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
10196
10197         * parse.y (new_initializer): Make sure all initializers are
10198         lists.
10199
10200 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
10201
10202         * decl2.c (import_export_decl): Mark tinfo functions for
10203         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
10204
10205 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
10206
10207         * method.c: Fix typo.
10208
10209 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10210
10211         * method.c: Include "system.h" to get stdlib.h, stdio.h,
10212         ctype.h, string.h, etc.
10213         (issue_nrepeats): Add default case in enumeration switch.
10214         (check_btype): Likewise.
10215         (process_overload_item): Likewise.
10216
10217         * Makefile.in (method.o): Depend on system.h.
10218
10219 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
10220
10221         * lex.c (do_scoped_id): Fix parenthesizing.
10222
10223 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
10224
10225         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
10226         FLAG_RTTI is unset, initialize type info machinery and continue
10227         with FLAG_RTTI enabled.
10228         (get_typeid): Likewise.
10229
10230 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
10231
10232         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
10233         from B.
10234
10235 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
10236
10237         * pt.c (finish_member_template_decl): Deal more gracefully with
10238         invalid declarations.
10239
10240 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
10241
10242         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
10243         cp-tree.h: Clean up more old overloading code, old RTTI code, and
10244         some formatting quirks.
10245
10246         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
10247         method.c, pt.c, ptree.c, typeck.c: Remove support for
10248         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
10249         * class.h: Remove.
10250         * Makefile.in: Adjust.
10251
10252         * pt.c (unify): Don't allow reduced cv-quals when strict.
10253
10254         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
10255         *type_unification* and unify.
10256
10257 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
10258
10259         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
10260         (nested_name_specifier): And add it before this use.
10261         (typename_sub0): And this use.  Also add use without the keyword.
10262         (typename_sub1): Likewise.
10263         * pt.c (instantiate_class_template): Don't actually instantiate
10264         anything if our type uses template parms.
10265
10266 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
10267
10268         * decl.c (start_function): Don't call temporary_allocation for a
10269         nested function.
10270
10271 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
10272
10273         * pt.c (instantiate_class_template): Don't mess with friends if
10274         our type uses template parms.
10275
10276 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
10277
10278         * parse.y (nested_name_specifier): Use explicit_template_type.
10279         (typename_sub): Allow a template_type, an explicit_template_type,
10280         or an implicit template type at the end.
10281         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
10282         * decl.c (make_typename_type): Handle template-id where the name
10283         is a TEMPLATE_DECL.
10284         * call.c (build_scoped_method_call): Handle member template
10285         destructor call.
10286         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
10287         destructor is represented by the type.
10288
10289         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
10290         * parse.y (nested_name_specifier): Add 'template' case.
10291         (explicit_template_type): New rule.
10292         (typename_sub): Use it.
10293         * decl.c (make_typename_type): Handle getting a template-id for NAME.
10294         * pt.c (tsubst): Likewise.
10295
10296 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
10297
10298         * pt.c (add_to_template_args): Fix thinko.
10299         (instantiate_class_template): Call it later.
10300
10301         * pt.c (get_class_bindings): Add outer_args parm.
10302         (most_specialized_class): Likewise.
10303         (instantiate_class_template): Pass it.
10304         (more_specialized_class): Likewise.
10305         (lookup_template_class): Get context from template if none
10306         was specified.
10307         (finish_member_template_decl): Don't do anything with a
10308         partial specialization.
10309         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
10310         AGGREGATE_TYPE_P.
10311         * class.c (finish_struct): Member class templates have already been
10312         checked for name clashes.
10313         * decl.c (pushdecl_with_scope): Handle pushing at class level.
10314
10315 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
10316
10317         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
10318         (tsubst, *_PARM): Support multiple levels of template classes.
10319         (instantiate_class_template): Look up the pattern from the
10320         original template.
10321         (lookup_template_class): Handle getting a template for d1.
10322         (push_template_decl): Correct setting of 'primary'.
10323         (reduce_template_parm_level): Add 'levels' parm.
10324         (finish_member_template_decl): Support member class templates.
10325         (template_class_depth): Handle multiple levels.
10326         * parse.y (component_decl_1, fn.def2): Remove member template case.
10327         (component_decl): Add member template cases.
10328         * decl2.c (check_member_template): We now handle member template
10329         classes.
10330         * decl.c (pushtag): Handle member templates.
10331         * method.c (do_inline_function_hair): Don't touch
10332         IDENTIFIER_GLOBAL_VALUE.
10333         * init.c (build_offset_ref): If name isn't an identifier, just
10334         return it.
10335         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
10336
10337         * typeck.c (get_delta_difference): Do adjust for conversions to
10338         and from virtual base.
10339
10340 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
10341
10342         * typeck.c (get_delta_difference): Give hard error for conversion
10343         from virtual base.
10344
10345         * cp-tree.h: Tweak formatting.
10346
10347 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
10348
10349         * decl.c (push_namespace): Handle redeclaration error.
10350
10351         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
10352         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
10353         (NAMESPACE_BINDING): New macro.
10354         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
10355         * *.c: Use them.
10356
10357         * pt.c (push_template_decl): Use innermost_args.
10358
10359         * decl.c (get_unique_name): Tweak from earlier in the name.
10360
10361 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10362
10363         * cp-tree.def: Add CPLUS_BINDING node.
10364         * cp-tree.h (tree_binding): New struct.
10365         (BINDING_SCOPE, BINDING_VALUE): New macros.
10366         (current_namespace, global_namespace): Declare extern.
10367         (struct lang_decl_flags): New field in_namespace.
10368         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
10369         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
10370         (TREE_INDIRECT_USING): New macro.
10371         * decl2.c (current_namespace, global_namespace): Declare.  The
10372         value is a NAMESPACE_DECL now, not a TREE_LIST.
10373         (is_namespace_ancestor, namespace_ancestor): New static functions.
10374         (add_using_namespace, ambiguous_decl): Likewise.
10375         (lookup_using_namespace): New support function for lookup_name.
10376         (qualified_lookup_using_namespace): New support function for
10377         do_scoped_id and lookup_namespace_name.
10378         (get_namespace_id): Mark as obsolete.
10379         (current_namespace_id): Likewise.
10380         (do_namespace_alias): Implement.
10381         (do_using_directive): Implement as call to add_using_namespace.
10382         * decl.c (binding_for_name): New function.
10383         (push_namespace, pop_namespace): Implement.
10384         (push_decl): Don't install a FUNCTION_DECL in the global branch.
10385         (lookup_namespace_name): Implement using qualified lookup.
10386         (lookup_name_real): For global scoping, lookup in
10387         global_namespace.  For namespace scoping, lookup in given
10388         namespace.  For unscoped lookup, iterate over namespace,
10389         considering using directives.
10390         (init_decl_processing): Initialize global_namespace.
10391         (grokvardecl): Build assembler name as static name for globals.
10392         (grokdeclarator): Remove old namespace mangling.
10393         (xref_tag): When installing a global binding for the
10394         tag, make sure we have an identifier.
10395         * method.c (build_overload_nested_name): Mangle namespaces.
10396         (build_qualified_name): Likewise.
10397         (build_decl_overload_real): Likewise.
10398         * lex.c (build_lang_decl): Set namespace for new declaration to
10399         current_namespace.
10400         (do_scoped_id): Find global names in global or current
10401         namespace, or using qualified namespace lookup, depending on
10402         context.
10403         * init.c (build_member_call): When scope is namespace, use
10404         build_x_function_call instead.
10405         (build_offset_ref): When scope is namespace, collapse processing
10406         to lookup_namespace_name instead.
10407         * error.c (dump_decl): Support NAMESPACE_DECL.
10408         * decl.c (pushdecl): Bind globals to current namespace.
10409         (push_overloaded_decl): Likewise.
10410         (lookup_tag): Likewise.
10411         (lookup_name_current_level): Likewise.
10412         (xref_tag): Likewise.
10413         (start_function): Likewise.
10414         * lex.c (do_identifier): Likewise.
10415         (identifier_typedecl_value): Likewise.
10416         (real_yylex): Likewise.
10417         * method.c (do_inline_function_hair): Likewise.
10418         * parse.y (unscoped): Likewise.
10419         * pt.c (check_explicit_specialization): Likewise.
10420         (lookup_template_class): Likewise.
10421         * rtti.c (call_void_fn): Likewise.
10422         * sig.c (build_sigtable): Likewise.
10423         * ptree.c (lang_print_xnode): New function.
10424
10425 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
10426
10427         * pt.c (instantiate_class_template): Don't instantiate if pedantic
10428         and the args use template parms.
10429
10430         * pt.c (push_tinst_level): If the instantiation uses template parms,
10431         fail silently.
10432         * decl.c (xref_basetypes): Do call complete_type for basetypes
10433         that involve template parameters.
10434
10435 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
10436
10437         * typeck2.c (process_init_constructor): Fix labeled init check.
10438
10439 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
10440
10441         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
10442         argument to tsubst and friends.
10443
10444         * pt.c (tsubst, FUNCTION_DECL): Tidy.
10445
10446         * typeck.c (build_x_function_call): Handle static member function
10447         templates like non-templates.  Handle friend templates like normal
10448         function templates.
10449         * pt.c (tsubst, *_PARM): Don't use orig_level.
10450         (get_bindings): Don't call add_to_template_args.
10451         (instantiate_template): Likewise.
10452         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
10453         * ptree.c (print_lang_type): Print index/level for template parms.
10454
10455 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
10456
10457         * Make-lang.in (cc1plus): Note that cc1plus depends on
10458         cp/cp-tree.h and cp/cp-tree.def.
10459
10460         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
10461         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
10462         position in a template parameter list.
10463         * cp-tree.h (template_parm_index): New structure, used as the tree
10464         structure for a TEMPLATE_PARM_INDEX.
10465         (TEMPLATE_PARM_IDX): New macro.
10466         (TEMPLATE_PARM_LEVEL): Likewise.
10467         (TEMPLATE_PARM_DESCENDANTS): Likewise.
10468         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
10469         (TEMPLATE_PARM_DECL): Likewise.
10470         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
10471         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
10472         (TEMPLATE_TYPE_DECL): Likewise.
10473         (TEMPLATE_CONST_IDX): Remove.
10474         (TEMPLATE_CONST_LEVEL): Likewise.
10475         (TEMPLATE_CONST_SET_INFO): Likewise.
10476         (TEMPLATE_TYPE_SET_INFO): Likewise.
10477         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
10478         node.
10479         (TEMPLATE_TYPE_LEVEL): Likewise.
10480         * decl.c (decls_match): Call comp_template_parms, rather than
10481         expanding it inline.
10482         (duplicate_decls): If two template declarations are being merged,
10483         then their TEMPLATE_INFOs should be merged as well.
10484         (grokfndecl): Save template-id information when declaring a friend
10485         with explicit template arguments.  Pass arguments to
10486         check_explicit_specialization via correct convention; at some
10487         point check_explicit_specialization changed, but these call-sites
10488         did not.
10489         (grokdeclarator): Tidy up slightly.
10490         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
10491         two template functions with the same DECL_ASSEMBLER_NAME the same,
10492         since the names are not yet mangled.
10493         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
10494         TEMPLATE_CONST_PARM.
10495         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
10496         decl for a non-type parameter, rather than printing `<tparm ...>'.
10497         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
10498         (do_friend): Deal with template friends.
10499         * lex.c (do_pending_inlines): Call
10500         maybe_begin_member_template_processing, rather than
10501         conditionally calling begin_member_template_processing.
10502         (process_next_inline): Likewise.  Call
10503         maybe_end_member_template_processing, rather than
10504         conditionally calling end_member_template_processing.
10505         (do_pending_defargs): Likewise.
10506         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
10507         TEMPLATE_CONST_PARM.
10508         * method.c (build_mangled_template_parm_index): New function.
10509         (build_overload_value): Use it.
10510         (build_overload_name): Likewise.
10511         * pt.c (finish_member_template_decl): Allow friend declarations.
10512         (template_class_depth): New function.
10513         (is_member_template): Rename, and modify, to become...
10514         (is_member_or_friend_template): New function.
10515         (end_member_template_processing): Rename, and modify, to become...
10516         (maybe_end_member_template_processing).
10517         (build_template_parm_index): New function.
10518         (reduce_template_parm_level): New function.
10519         (process_template_parm): Modify to use build_template_parm_index.
10520         (push_template_decl): Deal with friend templates.
10521         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
10522         TEMPLATE_CONST_PARM.
10523         (tsubst_friend_function): New function.
10524         (instantiate_class_template): Generate the DECL_FRIENDLIST
10525         for a new instantiation by using tsubst_friend_function rather
10526         than just tsubst.
10527         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
10528         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
10529         appropriate new macros.  Use reduce_template_parm_level to
10530         generate lower-level template parameters.  Handle tsubst'ing into
10531         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
10532         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
10533         templates.  Similarly for the template parameters for a new
10534         template.
10535         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
10536         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
10537         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
10538         (get_bindings): Call add_to_template_args if necessary.
10539         (instantiate_decl): Handle instantiations of friend templates.
10540         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
10541         TEMPLATE_TYPE_PARM as a list of fields; it's not!
10542         * spew.c (yylex): Do a little manual constant propagation to
10543         clarify the code.
10544
10545 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
10546
10547         * error.c: Include sys/types.h.
10548
10549 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
10550
10551         * method.c (build_mangled_name): Start CPP directives in column zero.
10552
10553 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
10554
10555         * typeck2.c (process_init_constructor): Sorry about non-trivial
10556         labeled initializers.
10557         * parse.y (initlist): Re-enable labeled initializers.
10558
10559 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10560
10561         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
10562         all callers changed.  Rely on the new parameter instead of arg
10563         being a TREE_LIST when determine whether we are working inside
10564         template template parameter.  Clean up is_type test.
10565
10566 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
10567
10568         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
10569         * typeck2.c (initializer_constant_valid_p): Allow conversions
10570         between pointers and references.
10571
10572 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
10573
10574         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
10575         if pedantic || warn_pointer_arith.
10576
10577 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10578
10579         * pt.c (unify): Handle TEMPLATE_DECL.
10580
10581 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
10582
10583         * cp-tree.h (strip_attrs): Remove decl.
10584
10585 1998-02-18  Doug Evans  <devans@cygnus.com>
10586
10587         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
10588         Update olddecl's attributes too.
10589         (strip_attrs): Remove function.
10590         * typeck.c (common_type): Call merge_machine_type_attributes.
10591
10592 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
10593
10594         * parse.y (initdcl0_innards): New grammar symbol.
10595         (nomods_initdecls, nomods_initdcl0): Change type from itype to
10596         none, since the resulting value is never used.
10597         (parse_decl): New function.
10598         (datadef): Remove redundant actions.
10599         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
10600         * parse.c: Regenerated.
10601
10602 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
10603
10604         * parse.y (simple_stmt): Use getdecls() to check for decl.
10605
10606 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
10607
10608         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
10609         macros.
10610         (c++.install-common): Install c++filt properly as native or as cross
10611         variant.
10612         (c++.uninstall): Add c++filt.
10613
10614 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
10615
10616         * call.c (standard_conversion): Fix multi-level ptr conversions.
10617
10618 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
10619
10620         * init.c (build_new): Propagate error_mark_node up.
10621
10622 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
10623
10624         * parse.y (simple_stmt): If the condition isn't a declaration,
10625         start the controlled block after the test.
10626
10627 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
10628
10629         * call.c (build_over_call): Convert builtin abs, labs and fabs to
10630         tree-codes.
10631         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
10632         builtins.
10633
10634 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
10635
10636         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
10637
10638 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
10639
10640         * cp-tree.h: Add access_protected_virtual_node.
10641         * class.c (init_class_processing): Initialize it.
10642         * decl.c (xref_basetypes): Use it.
10643         * parse.y (base_class_access_list): Likewise.
10644
10645         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
10646         (c++.install-common): Install c++filt.
10647
10648 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10649
10650         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
10651
10652 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
10653
10654         * call.c (reference_binding): Use comptypes when comparing
10655         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
10656
10657 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
10658
10659         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
10660         (really_overloaded_fn): Move check here from is_overloaded_fn.
10661         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
10662
10663 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
10664
10665         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
10666         conversions.
10667
10668 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
10669
10670         * cp-tree.h (push_template_decl): Return the decl passed in, or an
10671         equivalent duplicate.
10672         * decl.c (pushtag): Use the return value from push_template_decl.
10673         (duplicate_decls): When duplicating a template declaration, merge
10674         the DECL_TEMPLATE_RESULTs as well.
10675         (make_implicit_typename): Don't try to dive into typename types to
10676         find a context for making a new implicit typename.
10677         (start_decl): Use the return value from push_template_decl.
10678         (grokdeclarator): Complain about declarations list `const operator
10679         int'.  Since we don't correctly handle in-class initializations of
10680         non-static data members, complain about this (now illegal)
10681         practice.  Issue an error for initializations of non-const statics
10682         since that is illegal as well, and since we don't handle that case
10683         correctly either.
10684         (start_function): Use the return value from push_template_decl.
10685         (start_method): Likewise.
10686         * decl2.c (grokfield): Likewise.  Since the change to
10687         grokdeclarator ensures that all initialized fields are in fact
10688         static, remove a redundant test for TREE_PUBLIC.
10689         * parse.y (initlist): Disable labeled initializers since they do
10690         not work as per the documentation, and since they do not use the
10691         same syntax as the C front end.
10692         * pt.c (push_template_decl): Return the decl passed in, or an
10693         equivalent duplicate.
10694         (lookup_template_class): When searching in a nested context,
10695         use the right arguments.
10696         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
10697         * typeck.c (build_component_ref): Assign the correct type to the
10698         result of build_vfn_ref.
10699
10700 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
10701
10702         * pt.c (convert_nontype_argument): Fix typo.
10703         (check_explicit_specialization): Allow old-style specialization
10704         of class template members.
10705
10706 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
10707                           Manfred Hollstein  <manfred@s-direktnet.de>
10708
10709         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
10710         when deciding to override DECL_ASSEMBLER_NAME.
10711
10712 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
10713
10714         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
10715         * cp-tree.h (flag_do_squangling): Add declaration.
10716         * lang-options.h: Add -fsquangle and -fno-squangle.
10717         * method.c: Add macros and static variables for squangling.
10718         (build_overload_name): Rename to build_mangled_name, add logic for B
10719         compression, and split into process_modifiers and
10720         process_overload_item.
10721         (process_modifiers): New function, to handle constant, reference,
10722         and pointer types.
10723         (process_overload_item): New function, handles issue of type codes.
10724         (build_overload_name): New function, start squangling and call
10725         build_mangled_name.
10726         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
10727         (start_squangling): New function to initialize squangling structs.
10728         (end_squangling): New function to destroy squangling structs.
10729         (nrepeats): Rename variable to Nrepeats.
10730         (issue_nrepeats): New function for issuing 'n' type repeats.
10731         (check_ktype): New function to check for type K name compression.
10732         (build_overload_nested_name): Add a check for K name compression.
10733         (build_qualified_name): Add a check for K name compression and don't
10734         use DECL_ASSEMBLER_NAME when squangling is on.
10735         (check_btype): New function, checks for B type compression.
10736         (build_static_name, build_decl_overload_real): Initiate squangling.
10737         (build_typename_overload, build_overload_with_type): Initiate
10738         squangling
10739
10740 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
10741
10742         * method.c (make_thunk): Avoid name buffer overflow.
10743
10744 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
10745
10746         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
10747         don't define them yet.
10748
10749         * parse.y (nomods_initdcl0): Add constructor_declarator case.
10750
10751 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10752
10753         * config-lang.in (diff_excludes): Use basename only.
10754
10755 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
10756
10757         * tinfo2.cc: Add tinfo for signed char.
10758
10759 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
10760
10761         * search.c (compute_access): Handle protected constructors in derived
10762         classes as accessible.
10763
10764 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
10765
10766         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
10767         Call convert_from_reference sooner.
10768
10769 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
10770
10771         * cvt.c (ocp_convert): Obtain the constant values from constant
10772         decls even if the destination type is the same as the type of the
10773         decl.
10774
10775         * decl2.c (finish_file): Make sure that static inlines with
10776         definitions are not marked DECL_EXTERNAL before returning.
10777
10778 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
10779
10780         * decl.c: Lose arg_looking_for_template.
10781         (lookup_name_real): Likewise.
10782         * parse.y: Lose processing_template_arg, template_arg1.
10783         (primary): Likewise.
10784         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
10785
10786 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10787
10788         * error.c (dump_decl): Fix type of default arguments for template
10789         template parameters and nontype template parameters.
10790         * parse.y (template_parm): Handle invalid default template
10791         template arguments here.
10792
10793         * parse.y (template_parm): Use template_arg instead of PTYPENAME
10794         for default template template argument.
10795         * pt.c (coerce_template_parms): Merge default template argument
10796         codes.  Can treat RECORD_TYPE as template name if it is implicitly
10797         created.  Fix argument index in error message.
10798         * typeck.c (comptypes): Merge template argument comparison codes in
10799         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
10800
10801 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
10802
10803         * lex.c (file_name_nondirectory): Also check for '/'.
10804
10805 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
10806
10807         * parse.y (primary): Deal with statement-expressions in
10808         templates.
10809         * pt.c (tsubst_copy): Handle BIND_EXPR.
10810         * tree.c (mapcar): Likewise.
10811
10812         * call.c (add_template_candidate_real): Pass extra parameter to
10813         fn_type_unification.
10814         * cp-tree.h (fn_type_unification): Add parameter.
10815         * pt.c (fn_type_unification): Add additional parameter to deal with
10816         static member functions.
10817         (get_bindings): Deal with static member functions.
10818
10819         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
10820         (revert_static_member_fn): Declare.
10821         * decl.c (revert_static_member_fn): Remove declaration.  Change
10822         linkage from internal to external.
10823         (cp_finish_decl): Deal with virtual functions in classes local to
10824         template functions.
10825         * decl2.c (finish_file): Don't forget to emit increment/decrement
10826         expressions in initializers for file-scope variables.
10827         * parse.y (typename_sub2): If the typename doesn't names a
10828         template, rather than a type, issue an error message.
10829         * pt.c (check_explicit_specialization): Handle specializations of
10830         static member functions.
10831         (coerce_template_parms): Handle offset references to lists of
10832         member functions.
10833         * search.c (note_debug_info_needed): Don't crash when handed a
10834         type which is being defined.
10835         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
10836         that can happen with some illegal code.
10837
10838 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10839
10840         * call.c (user_harshness): Initialize `code' to 0.
10841         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
10842         (null_ptr_cst_p): Add parentheses around && within ||.
10843         (standard_conversion): Likewise.
10844         (z_candidate): Likewise.
10845         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
10846         (build_object_call): Likewise for `mem_args'.
10847         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
10848         default case in enumeration switch.
10849
10850         * class.c (build_vtable_entry): Add explicit braces to avoid
10851         ambiguous `else'.
10852         (build_class_init_list): Likewise.
10853         (finish_struct_1): Initialize `width' to 0.
10854         (instantiate_type): Initialize `name' to NULL_TREE.  Add
10855         explicit braces to avoid ambiguous `else'.
10856
10857         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
10858         `else'.
10859
10860         * decl.c (grok_reference_init): Eliminate unused parameter, all
10861         callers changed.
10862         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
10863         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
10864         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
10865         (grokdeclarator): Add parentheses around && within ||.  Add
10866         explicit braces to avoid ambiguous `else'.
10867         (grokparms): Initialize `type' to NULL_TREE.
10868         (xref_tag): Remove unused label `just_return'.
10869         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
10870         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
10871         (hack_incomplete_structures): Add parentheses around assignment
10872         used as truth value.
10873
10874         * decl2.c (coerce_delete_type): Hide definition of `e3'.
10875
10876         * error.c: Include <stdlib.h>.
10877         (dump_expr): Change the type of `i' to size_t.  Remove unused
10878         label `error'.
10879
10880         * except.c (init_exception_processing): Remove unused variable `d'.
10881         (expand_throw): Likewise for `label'.
10882
10883         * friend.c (add_friends): Add explicit braces to avoid ambiguous
10884         `else'.
10885
10886         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
10887         (sort_base_init): Likewise for `binfo'.
10888         (expand_member_init): Likewise for `rval'.
10889         (build_member_call): Add parentheses around assignment used as
10890         truth value.
10891         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
10892         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
10893         `old_immediate_size_expand' to 0.
10894         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
10895         (build_vec_delete_1): Remove unused variable `block'.
10896         (expand_vec_init): Initialize `itype' to NULL_TREE.
10897
10898         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
10899         declaration of `index' and `rindex' with autoconf macros.
10900         (reinit_parse_for_expr): Remove unused variables
10901         `look_for_semicolon' and `look_for_lbrac'.
10902         (cons_up_default_function): Initialize `args' to NULL_TREE.
10903         (readescape): Initialize `firstdig' to 0.
10904         (real_yylex): Add parentheses around assignment used as truth value.
10905
10906         * method.c: Include <strings.h> if we don't have <string.h>.
10907         Protect declaration of `index' with autoconf macro.
10908
10909         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
10910         Initialize `type' to NULL_TREE.
10911         (structsp): Remove unused variable `id'.
10912
10913         * pt.c (coerce_template_parms): Add explicit braces to avoid
10914         ambiguous `else'.
10915         (lookup_template_class): Initialize `template' to NULL_TREE.
10916         (instantiate_class_template): Remove unused variable `name' and `e'.
10917         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
10918         (do_poplevel): Initialize `saved_warn_unused' to 0.
10919         (type_unification): Remove unused varable `parm'.
10920         (unify): Likewise for `j'.
10921
10922         * repo.c (init_repo): Add parentheses around assignment used as
10923         truth value.
10924         (finish_repo): Remove unused varable `p'.
10925
10926         * search.c (get_binfo): Initialize `type' to NULL_TREE.
10927         (get_base_distance): Likewise.
10928         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
10929         and `new_v' to NULL_TREE.
10930         (lookup_fnfields): Likewise for `rval_binfo_h'.
10931         (breadth_first_search): Add parentheses around assignment used as
10932         truth value.
10933         (get_template_base): Initialize `type' to NULL_TREE.
10934
10935         * sig.c (append_signature_fields): Initialize `last_mfptr' to
10936         NULL_TREE.
10937         (build_signature_table_constructor): Likewise for
10938         `last_rhs_field', `pfn' and `vt_off'.
10939         (build_sigtable): Likewise for `init'.
10940
10941         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
10942         (propagate_binfo_offsets): Likewise for `delta'.
10943         (hash_tree_cons): Initialize hashcode to 0.
10944         (can_free): Likewise for `size'.
10945         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
10946
10947         * typeck.c (convert_sequence): Hide prototype.
10948         (common_type): Add explicit braces to avoid ambiguous `else'.
10949         (comp_target_types): Likewise.
10950         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
10951         (build_function_call_real): Add explicit braces to avoid ambiguous
10952         `else'.
10953         (convert_arguments): Initialize `called_thing' to 0.
10954         (convert_for_initialization): Initialize `savew' and `savee' to 0.
10955
10956         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
10957         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
10958         (build_x_arrow): Likewise for `last_rval'.
10959
10960         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
10961
10962 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
10963
10964         * decl.c (init_decl_processing): Use set_sizetype.
10965         * decl2.c (sizetype): Don't declare.
10966         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
10967         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
10968         (build_component_addr, unary_complex_lvalue): Likewise.
10969         * rtti.c (expand_class_desc): Likewise.
10970         * class.c (get_vfield_offset): Likewise.
10971
10972 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
10973
10974         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
10975         early to avoid bogus error.  Handle overloaded function
10976         names provided as template arguments correctly.
10977         (coerce_template_parms): Don't mishandle overloaded functions when
10978         dealing with template template parameters.
10979         (lookup_template_class): Issue an error message, rather than
10980         crashing, when the TYPE_DECL provided is not a template type.
10981
10982 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
10983
10984         * class.c (instantiate_type): Don't just return a known type if
10985         it's wrong.
10986
10987 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
10988
10989         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
10990         since that code could never be reached.
10991
10992         * error.c (dump_decl): Avoid aborting in the midst of printing an
10993         error message about an illegal template declaration.
10994
10995         * parse.y (structsp): Print an error message, rather than crashing,
10996         when a class-head does not name a class.
10997
10998         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
10999         template arguments as a g++ extension.
11000
11001         * cp-tree.def (ALIGNOF_EXPR): New tree code.
11002         * decl2.c (grok_alignof): If processing_template_decl, just store
11003         the expression.
11004         * typeck.c (c_alignof): Likewise.
11005         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
11006         * error.c (dump_expr): Likewise.
11007         * pt.c (tsubst_copy): Likewise.
11008         * tree.c (cp_tree_equal): Likewise.
11009         * pt.c (uses_template_parms): Correctly determine whether or not a
11010         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
11011         folding can be done.
11012
11013         * cp-tree.h (grok_enum_decls): Remove type parameter.
11014         * decl.c (grok_enum_decls): Likewise.
11015         * decl2.c (grok_x_components): Call grok_enum_decls
11016         unconditionally, since it will do nothing if there is no
11017         current_local_enum.  Use the new calling sequence.
11018         * pt.c (tsubst_enum): Use the new calling sequence for
11019         grok_enum_decls.
11020
11021         * decl.c (start_function): Make member functions of local classes
11022         in extern inline functions have comdat linkage here...
11023         (grokdeclarator): Rather than here.
11024
11025 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
11026
11027         * pt.c (convert_nontype_argument): Use decl_constant_value.
11028
11029 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
11030
11031         * call.c (add_template_candidate_real): New function.
11032         (add_template_candidate): Use it.
11033         (add_template_conv_candidate): Likewise.
11034         (joust): Pass extra argument to more_specialized.
11035         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
11036         (is_local_class): Remove.
11037         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
11038         * cp-tree.h (is_local_class): Remove.
11039         (perform_array_to_pointer_conversion): Likewise.
11040         (finish_member_template_decl): Add.
11041         (check_explicit_specialization): Return a tree, not an int.
11042         (more_specialized): Take additional argument.
11043         (get_bindings): Likewise.
11044         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
11045         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
11046         (perform_array_to_pointer_conversion): Remove.
11047         * decl.c (saved_scope): Add processing_specialization,
11048         processing_explicit_instantiation fields.
11049         (maybe_push_to_top_level): Save them.
11050         (pop_from_top_level): Restore them.
11051         (grokfndecl): Use new return value from
11052         check_explicit_specialization.
11053         (start_decl): Don't check flag_guiding_decls before pushing
11054         decls.
11055         (cp_finish_decl): Remove previous (bogus) change.
11056         (grok_declarator): Use decl_function_context rather than
11057         is_local_class.
11058         * decl2.c (finish_file): Pass extra argument to get_bindings.
11059         (build_expr_from_tree): Let build_x_component_ref check
11060         validity of arguments rather than doing it here.
11061         * lex.c (cons_up_default_function): Remove code fooling with
11062         processing_specialization, processing_explicit_instantiation
11063         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
11064         * method.c (build_overload_identifier): Mangle local classes in
11065         template functions correctly.
11066         * parse.y (finish_member_template_decl): Move to pt.c.
11067         * pt.c (finish_member_template_decl): Moved here from parse.y.
11068         (print_candidates): New function.
11069         (determine_specialization): Change interface.  Properly look for
11070         most specialized versions of template candidates.
11071         (check_explicit_specialization): Fully process explicit
11072         instantiations.
11073         (push_template_decl): Avoid looking at CLASSTYPE fields in
11074         FUNCTION_DECLS.
11075         (determine_overloaded_function): Remove.
11076         (convert_nontype_argument): Change name from
11077         convert_nontype_parameter.  Use determine_overloaded_function
11078         instead of instantiate_type.
11079         (mangle_class_name_for_template): Handle type contexts as well as
11080         function contexts.
11081         (classtype_mangled_name): Likewise.
11082         (lookup_template_class): Likewise.
11083         (tsubst): Likewise.
11084         (more_specialized): Take explict template arguments as a
11085         parameter.
11086         (most_specialized): Likewise.
11087         (get_bindings): Likewise.  Check that return types match before
11088         proclaiming a function a match.
11089         (do_decl_instantiation): Remove code searching for function to
11090         instantiate; that is now done in check_explicit_specialization.
11091         (add_maybe_template): Pass extra argument to get_bindings.
11092         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
11093         implementation.
11094         * typeck.c (build_component_ref): Check for invalid arguments.
11095
11096 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
11097
11098         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
11099         return_target and call_target are equivalent.
11100
11101         * pt.c (type_unification_real): Just accept function parms that
11102         don't use any template parms.
11103
11104 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
11105
11106         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
11107         unset DECL_NOT_REALLY_EXTERN.
11108
11109         * parse.y (typename_sub*): Fix std::.
11110
11111 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
11112
11113         * error.c (dump_decl): Fix type default template args.
11114         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
11115
11116 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
11117
11118         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
11119         (file_name_nondirectory): Use.
11120
11121 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11122
11123         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
11124         that are not really present.  Substitute default arguments in
11125         template template arguments.  Correctly convert TEMPLATE_DECL to
11126         TEMPLATE_TEMPLATE_PARM.
11127         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
11128         are no longer treated specially here.
11129         * parse.y (template_template_parm): Fix copy error.
11130         * decl.c (grokdeclarator): Warn about missing `typename' for nested
11131         type created from template template parameters.
11132         * parse.y (bad_parm): Likewise
11133
11134         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
11135         (push_nested_class): Likewise.
11136         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
11137         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
11138         (copy_template_template_parm): Declare.
11139         * decl.c (arg_looking_for_template): New variable.
11140         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
11141         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
11142         node if arg_looking_for_template is nonzero.
11143         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
11144         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
11145         (grokdeclarator): Handle TEMPLATE_DECL.
11146         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
11147         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
11148         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
11149         (dump_decl): Handle unnamed template type parameters.
11150         Handle template template parameters.
11151         (dump_function_name): Handle template template parameters.
11152         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
11153         Handle TEMPLATE_TEMPLATE_PARM.
11154         * method.c (build_template_template_parm_names): New function.
11155         (build_template_parm_names): Handle TEMPLATE_DECL.
11156         (build_overload_nested_name, build_overload_name):
11157         Handle TEMPLATE_TEMPLATE_PARM.
11158         * parse.y (maybe_identifier): New nonterminal.
11159         (template_type_parm): Use it.
11160         (template_template_parm, template_arg1): New nonterminal.
11161         (template_parm): Add template_template_parm rules.
11162         (template_arg): Set processing_template_arg.
11163         (template_arg1): Rules moved from template_arg.
11164         (primary, nonnested_type): Set arg_looking_for_template if we are
11165         processing template arguments.
11166         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
11167         (process_template_parm): Handle template template parameters.
11168         (coerce_template_parms, comp_template_args): Likewise.
11169         (mangle_class_name_for_template, lookup_template_class): Likewise.
11170         (uses_template_parms): Handle TEMPLATE_DECL and
11171         TEMPLATE_TEMPLATE_PARM.
11172         (current_template_args): Handle TEMPLATE_DECL.
11173         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
11174         * search.c (dfs_walk, dfs_record_inheritance):
11175         Handle TEMPLATE_TEMPLATE_PARM.
11176         * tree.c (copy_template_template_parm): New function.
11177         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
11178         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
11179
11180 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
11181
11182         * decl.c (start_decl): Don't allow duplicate definitions of static
11183         data members.
11184
11185         * call.c (build_user_type_conversion_1): Handle user-defined
11186         template conversion operators correctly.
11187
11188         * decl2.c (build_expr_from_tree): Issue an error message if the
11189         object in a COMPONENT_REF is a TEMPLATE_DECL.
11190
11191         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
11192
11193         * class.c (is_local_class): New function.
11194         * cp-tree.h (is_local_class): Declare it.
11195         (last_tree): Likewise.
11196         (begin_tree): Likewise.
11197         (end_tree): Likewise.
11198         (lookup_template_class): Change prototype.
11199         * decl.c (cp_finish_decl): Check for NULL where necessary.
11200         Consider FUNCTION_DECLS to declare objects with top-level binding,
11201         when calling make_decl_rtl.
11202         (grokdeclarator): Give members of local classes internal linkage.
11203         (start_function): Remove declaration of last_tree.
11204         (finish_function): Set flag_keep_inline_functions around call to
11205         rest_of_compilation if we are processing a member function in a
11206         local class.
11207         (start_method): Call push_template_decl for member functions of
11208         local classes in template functions.
11209         * decl2.c (import_export_decl): Don't give external linkage to
11210         instantiations of templates with internal linkage.
11211         * parse.y (last_tree): Remove declaration.
11212         (template_type): Pass extra parameter to lookup_template_class.
11213         (self_template_type): Likewise.
11214         (structsp): Move call to reset_specialization into left_curly.
11215         (left_curly): Call reset_specialization, and begin_tree.
11216         * pt.c (saved_trees): New variable.
11217         (mangle_class_name_for_template): Change prototype.  Use
11218         additional function context to name local classes in templates
11219         correctly.
11220         (classtype_mangled_name): Pass the context.
11221         (push_template_decl): Handle local classes and templates, and
11222         member functions for such classes.
11223         (convert_nontype_parameter): Fix handling of pointer-to-member
11224         constants.
11225         (lookup_template_class): Handle local classes in templates.
11226         (tsubst): Likewise.  Don't assume that template instantiations
11227         have external linkage; pay attention to the template declaration.
11228         (mark_decl_instantiated): Likewise.
11229         (begin_tree): New function.
11230         (end_tree): Likewise.
11231
11232         * decl.c (xref_basetypes): Don't call complete_type for basetypes
11233         that involve template parameters; that can lead to infinite
11234         recursion unnecessarily.
11235
11236         * pt.c (register_specialization): Do not register specializations
11237         that aren't ready to be registered yet.
11238         (check_explicit_specialization): Handle explicit specialization of
11239         constructors and destructors.
11240         (build_template_decl): New function.
11241         (push_template_delc): Handle out-of-class specializations of
11242         member templates.
11243
11244         * pt.c (check_explicit_specialization): Set up the template
11245         information before registering the specialization.
11246         (coerce_template_parms): Fix thinko.
11247         (tsubst): Handle specializations of member templates correctly.
11248
11249         * class.c (finish_struct_methods): Remove calls to
11250         check_explicit_specialization from here.
11251         (finish_struct): And insert them here.
11252         * cp-tree.h (perform_qualification_conversions): New function.
11253         (perform_array_to_pointer_conversion): Likewise.
11254         (begin_explicit_instantiation): Likewise.
11255         (end_explicit_instantiation): Likewise.
11256         (determine_specialization): Renamed from
11257         determine_explicit_specialization.
11258         (comp_template_parms): New function.
11259         (processing_explicit_instantiation): New variable.
11260         * cvt.c (perform_qualification_conversions): New function.
11261         (perform_array_to_pointer_conversion): Likewise.
11262         * decl.c (duplicate_decls): Don't consider template functions
11263         alike unless they have the same parameters.  Refine handling of
11264         instantiation/specialization mismatches.
11265         (start_decl): Don't call pushdecl for template specializations,
11266         since they don't affect overloading.
11267         (start_function): Likewise.
11268         (grokfndecl): Call check_explicit_specialization a little later.
11269         Don't call duplicate_decls for memberm template specializations.
11270         (grokdeclarator): Don't update template_count for classes that are
11271         themselves specializations.  Remove use of `2' as parameter to
11272         grokfndecl since that value isn't used.
11273         * lex.c (cons_up_default_function): Save and restore
11274         processing_explicit_instantiation around calls to grokfield.
11275         * parse.y (finish_member_template_decl): New function.
11276         (component_decl_1): Use it.
11277         (fn.def2): Likewise.
11278         (template_arg_list_opt): New nonterminal.
11279         (template_type): Use it.
11280         (self_template_type): Likewise.
11281         (template_id): Likewise.
11282         (object_template_id): Likewise.
11283         (notype_template_declarator): Likwise.
11284         (begin_explicit_instantiation): Likewise.
11285         (end_explicit_instantiation): Likewise.
11286         (explicit_instantiation): Use them.
11287         * pt.c (coerce_template_parms): Add parameters.
11288         (processing_explicit_instantiation): New variable.
11289         (convert_nontype_parameter): New function.
11290         (determine_overloaded_function): Likewise.
11291         (begin_explicit_instantiation): Likewise.
11292         (end_explicit_instantiation): Likewise.
11293         (retrieve_specialization): Likewise.
11294         (register_specialization): Likewise.
11295         (processing_explicit_specialization): Removed.
11296         (determine_specialization): Handle specializations of member
11297         functions of template class instantiations.
11298         (check_explicit_specialization): Refine to conform to standard.
11299         (comp_template_parms): New function.
11300         (coerce_template_parms): Call convert_nontype_parameter.
11301         (tsubst): Refine handling of member templates.  Use
11302         register_specialization.
11303         (instantiate_template): Use retrieve_specialization.
11304         (do_decl_instantiation): Likewise.
11305         (instantiate_decl): Likewise.
11306         (type_unification): Improve handling of explict template
11307         arguments.
11308         * tree.c (mapcar): Return error_mark_node, rather than aborting,
11309         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
11310         * typeck.c (build_unary_op): Call determine_specialization, rather
11311         than determine_explicit_specialization.
11312
11313 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
11314
11315         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
11316
11317 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
11318
11319         * error.c (dump_decl): For enum tags, output the tag, not its value.
11320
11321 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
11322
11323         * decl.c (init_decl_processing): Only call init_rtti_processing
11324         FLAG_RTTI is set.
11325
11326 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
11327
11328         * init.c (build_new_1): Split out from build_new.
11329         (build_new): Just return a NEW_EXPR.
11330         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
11331
11332         * decl2.c (get_temp_regvar): Tweak.
11333
11334         * cp-tree.h (TREE_CALLS_NEW): Comment out.
11335         * class.c (resolves_to_fixed_type_p): Remove use.
11336         * method.c (build_opfncall): Likewise.
11337         * call.c (build_new_op): Likewise.
11338
11339 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
11340
11341         * exception.cc (__eh_alloc, __eh_free): New fns.
11342         (__cp_push_exception, __cp_pop_exception): Use them.
11343         (__uncatch_exception): Call terminate here if no exception.
11344         * except.c (build_terminate_handler): New fn.
11345         (expand_start_catch_block): Use it.
11346         (expand_exception_blocks): Likewise.
11347         (alloc_eh_object): New fn.
11348         (expand_throw): Use it.  Protect exception init with terminate.
11349         * typeck.c (build_modify_expr): Remove code that ignores trivial
11350         methods.
11351
11352 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11353
11354         * call.c (add_builtin_candidate): Add default case in enumeration
11355         switch.
11356         (build_new_op): Likewise.
11357         (convert_like): Likewise.
11358         * cvt.c (build_expr_type_conversion): Likewise.
11359         * tree.c (real_lvalue_p): Likewise.
11360         (lvalue_p): Likewise.
11361         (cp_tree_equal): Likewise.
11362         * typeck.c (comptypes): Likewise.
11363         (build_component_ref): Likewise.
11364         (build_function_call_real): Likewise.
11365         (build_binary_op_nodefault): Likewise.
11366         (build_unary_op): Likewise.
11367         (build_modify_expr): Likewise.
11368         * typeck2.c (initializer_constant_valid_p): Likewise.
11369
11370 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
11371
11372         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
11373
11374 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
11375
11376         * pt.c (coerce_template_parms): Make sure to digest_init if
11377         possible.
11378
11379         * decl.c (duplicate_decls): Make the newdecl virtual if the
11380         olddecl was, just as is done with other attributes of olddecl.
11381
11382 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
11383
11384         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
11385         address of an OFFSET_REF.
11386
11387         * cp-tree.def: Add AGGR_INIT_EXPR.
11388         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
11389         AGGR_INIT_EXPR where appropriate.
11390         * expr.c (cplus_expand_expr): Likewise.  Simplify.
11391
11392         * decl2.c (finish_file): Remove call to register_exception_table.
11393
11394 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11395
11396         * pt.c (instantiate_class_template): Don't do injection when
11397         processing_template_decl is true, as pollutes current_binding_level
11398         for base classes.
11399
11400 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
11401
11402         * pt.c (maybe_fold_nontype_arg): Add prototype.
11403
11404 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
11405
11406         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
11407         * error.c (dump_expr): Likewise.
11408
11409 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
11410
11411         * typeck.c (build_function_call_real): Remove "inline called before
11412         definition" pedwarn.
11413
11414         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
11415
11416 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
11417
11418         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
11419
11420         * pt.c (type_unification_real): Change __null to type void* with
11421         a warning.
11422
11423 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
11424
11425         * call.c (implicit_conversion): Don't call
11426         build_user_type_conversion_1 with a NULL expr, since it will
11427         crash.
11428
11429         * pt.c (unify): Don't try to unify array bounds if either array is
11430         unbounded.
11431
11432 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
11433
11434         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
11435         Replace extern decls with casts.
11436
11437         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
11438         Update last_parm_cleanup_insn.
11439         (store_after_parms): Remove.
11440         * cp-tree.h: Adjust.
11441
11442 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
11443
11444         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
11445         (finish_file): Check DECL_COMDAT instead of weak|one_only.
11446         (import_export_vtable): Use make_decl_one_only instead of
11447         comdat_linkage for win32 tweak.
11448         (import_export_decl): Likewise.
11449         * pt.c (mark_decl_instantiated): Likewise.
11450
11451         * decl2.c (finish_file): Lose handling of templates in pending_statics.
11452
11453 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
11454
11455         * decl2.c (finish_file): Lose call to expand_builtin_throw.
11456         * except.c (expand_builtin_throw): Remove.
11457         * cp-tree.h: Remove ptr_ptr_type_node.
11458         * decl.c: Likewise.
11459
11460 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
11461
11462         * decl.c (ptr_ptr_type_node): Define.
11463         (init_decl_processing): Initialize it.
11464         * cp-tree.h: Declare it.
11465         * exception.cc (__cp_exception_info): Use __get_eh_info.
11466         (__cp_push_exception): Likewise.
11467         (__cp_pop_exception): Likewise.
11468
11469         From Scott Snyder <snyder@d0sgif.fnal.gov>:
11470         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
11471         saved_pc.
11472         (init_exception_processing): Removed saved_pc initialization.
11473
11474 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
11475
11476         * pt.c (instantiate_decl): Defer all templates but inline functions.
11477
11478 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
11479
11480         * init.c (expand_vec_init): Don't fold a list of parameters.
11481
11482         * decl.c (copy_args_p): Handle copy elision for types with virtual
11483         bases.
11484         * call.c (build_over_call): Likewise.
11485
11486 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
11487
11488         * pt.c (lookup_template_function): Copy the template arguments,
11489         not just the list containing them, to the permanent obstack.
11490
11491 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
11492
11493         * except.c (expand_start_catch_block): suspend_momentary for the
11494         terminate handler.
11495
11496         * error.c (dump_decl): Handle LOOKUP_EXPR.
11497
11498 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
11499
11500         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
11501         permanent obstack if we are processing a template decl.
11502         * typeck.c (build_static_cast): Likewise.
11503         (build_const_cast): Likewise.
11504         (build_reinterpret_cast): Likewise.
11505
11506         * pt.c (coerce_template_parms): Coerce some expressions, even
11507         when processing_template_decl.
11508
11509 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
11510
11511         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
11512         handling of pointer difference expressions.
11513
11514         * typeck.c (comp_target_types): Comparison of function/method types
11515         is independent of nptrs.
11516
11517 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
11518
11519         * pt.c (tsubst): Avoid creating pointer to reference and
11520         reference to reference types.
11521
11522 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
11523
11524         * parse.y (do_id): New nonterminal.
11525         (template_id): Use it.
11526
11527 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
11528
11529         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
11530         * spew.c (yylex): Don't do_identifier here.
11531         * decl2.c (build_expr_from_tree): Revert last change.
11532
11533         * decl2.c (build_expr_from_tree): Expand the name for a method call.
11534         * parse.y (object_template_id): Don't try to take the DECL_NAME.
11535
11536 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
11537
11538         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
11539         alloc_expr.
11540         * call.c (build_op_delete_call): Adjust.
11541
11542         * except.c (expand_end_catch_block): Lose rethrow region.
11543         (expand_start_catch_block): Likewise.
11544         (expand_end_catch_block): Don't expand_leftover_cleanups.
11545
11546 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11547
11548         * pt.c (tsubst): Remove tree_cons call (places redundant info into
11549         DECL_TEMPLATE_INSTANTIATION).
11550
11551 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
11552
11553         * tree.c (is_overloaded_fn): Handle getting a fn template.
11554         (really_overloaded_fn): Likewise.
11555         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
11556         * pt.c (check_explicit_specialization): Tweak.
11557         (determine_explicit_specialization): Tweak.
11558
11559         * tree.c, cp-tree.h (get_target_expr): New fn.
11560
11561 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
11562
11563         * pt.c (check_explicit_specialization): Fix misspelling in
11564         diagnostic: `preceeded'.
11565         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
11566         `conversiona'.
11567
11568 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
11569
11570         * pt.c (determine_explicit_specialization): Avoid an internal
11571         error for bad specializations.
11572
11573         * method.c (build_overload_value): Handle SCOPE_REF.
11574
11575 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
11576
11577         * class.c (prepare_fresh_vtable): Enable even more complex MI
11578         vtable names.
11579
11580 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
11581
11582         * exception.cc (__check_eh_spec): Optimize a bit.
11583
11584         * exception.cc (__cp_pop_exception): Lose handler arg.
11585         * except.c (do_pop_exception): Likewise.
11586         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
11587         (expand_end_catch_block): Likewise.
11588
11589 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
11590
11591         * pt.c (check_explicit_specialization): Complain about using a
11592         template-id for a non-specialization.
11593
11594 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
11595
11596         * repo.c: Prototype rindex only if needed.
11597         * xref.c: Likewise.
11598
11599 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
11600
11601         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
11602
11603 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
11604
11605         * typeck.c (build_const_cast): Handle references here instead of
11606         handing off to convert_to_reference.
11607
11608         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
11609         TerminateFunctionCall.
11610         (init_exception_processing): Likewise.  Terminate et al are now
11611         the fns, not ADDR_EXPRs.
11612         (various): Lose redundant assemble_external calls.
11613         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
11614
11615         * cp-tree.h (struct lang_decl_flags): Add comdat.
11616         (DECL_COMDAT): New macro.
11617         * decl.c (duplicate_decls): Propagate it.
11618         (cp_finish_decl): Handle it.
11619         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
11620
11621         * class.c: Remove static pending_hard_virtuals.
11622         (add_virtual_function): Take pointers to pending_virtuals
11623         and pending_hard_virtuals.
11624         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
11625
11626 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
11627
11628         * decl2.c (import_export_vtable): If we support one_only but not
11629         weak symbols, mark instantiated template vtables one_only.
11630         (import_export_decl): Likewise for tinfo functions.
11631         (finish_vtable_vardecl): Also write out vtables from explicitly
11632         instantiated template classes.
11633         * pt.c (mark_class_instantiated): Revert last change.
11634
11635         * except.c (expand_throw): Call mark_used on the destructor.
11636
11637 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
11638
11639         * lex.c (lang_init): Enable flag_exceptions by default if no
11640         command line switch was specified.
11641
11642 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
11643
11644         * pt.c (unify): Handle `void' template parameters in
11645         specializations.
11646
11647 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
11648
11649         * rtti.c (build_dynamic_cast): Handle template case here.
11650         (build_dynamic_cast_1): Not here.
11651
11652         * typeck2.c (digest_init): Make copies where appropriate.
11653
11654         * decl2.c (delete_sanity): resolve_offset_ref.
11655
11656         * except.c: Call terminate without caching so many bits.
11657
11658         * except.c (expand_start_catch_block): Fix catching a reference
11659         to pointer.
11660
11661 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
11662
11663         * init.c (build_new): Copy size to the saveable obstack.
11664
11665         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
11666         TRY_CATCH_EXPR for now.
11667
11668 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
11669
11670         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
11671         has DECL_LANG_SPECIFIC.
11672
11673         * exception.cc (struct cp_eh_info): Add handlers field.
11674         (__cp_push_exception): Initialize it.
11675         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
11676         (__throw_bad_exception): Remove.
11677         * except.c (call_eh_info): Add handlers field.
11678         (get_eh_handlers): New fn.
11679         (push_eh_cleanup): Increment handlers.
11680
11681 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
11682
11683         * except.c (expand_start_eh_spec): Use the try/catch code.
11684         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
11685         doing everything inline.
11686         (init_exception_processing): throw_type_match now takes
11687         const void pointers.
11688         * exception.cc (__check_eh_spec): New fn.
11689         * inc/exception: Neither terminate nor unexpected return.
11690         * decl.c: Make const_ptr_type_node public.
11691         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
11692
11693         * except.c (expand_start_catch_block): We only need the rethrow
11694         region for non-sjlj exceptions.
11695         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
11696
11697 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
11698
11699         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
11700         (various.o): Likewise.
11701         * inc/new: Add placement deletes.  Add throw specs for default new.
11702         * new.cc (set_new_handler): Move here from libgcc2.
11703         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
11704         (new): Move from libgcc2.  Throw bad_alloc.
11705         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
11706         * decl.c (init_decl_processing): Update exception specs on new and
11707         delete.
11708
11709         * method.c (build_decl_overload_real): Don't mess with global
11710         placement delete.
11711
11712         * init.c (build_new): Check for null throw spec, not nothrow_t.
11713
11714         * decl.c (duplicate_decls): Don't complain about different exceptions
11715         from an internal declaration.
11716
11717         * call.c (build_op_delete_call): Fix check for member fns again.
11718
11719         * decl2.c (import_export_decl): Interface hackery affects
11720         virtual synthesized methods.
11721
11722 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
11723
11724         * decl.c (start_decl): Don't just complain about a mismatched
11725         scope, fix it.
11726
11727         * decl.c (make_implicit_typename): Handle case where t is not
11728         actually from context.
11729         * tree.c (get_type_decl): Lose identifier case.
11730         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
11731         * parse.y (nonnested_type): Just use lookup_name.
11732         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
11733
11734 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
11735
11736         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
11737         T was built in C language context (for example, by
11738         output_func_start_profiler).
11739
11740 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
11741
11742         * decl.c (make_implicit_typename): New fn.
11743         (lookup_name_real): Use it.  Use current_class_type as the context.
11744
11745 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
11746
11747         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
11748
11749 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
11750
11751         * friend.c (do_friend): Warn about non-template friends in templates.
11752
11753         * call.c (build_op_delete_call): Fix handling of inherited delete.
11754
11755         * search.c (dfs_record_inheritance): Ignore template type parms.
11756
11757 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
11758
11759         * call.c (build_new_op): Fix copy error.
11760         (build_op_new_call): New fn.
11761         (build_op_delete_call): New fn.
11762         * cp-tree.h: Declare them.
11763         * init.c (build_new): Use them.  Support placement delete.
11764         (build_x_delete): Use build_op_delete_call.
11765         (build_delete): Likewise.
11766         * decl2.c (delete_sanity): Likewise.
11767         (coerce_delete_type): Don't complain about placement delete.
11768
11769 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
11770
11771         * call.c (build_new_function_call): Remove unused 'obj' parm.
11772         * cp-tree.h, typeck.c: Adjust.
11773
11774         * init.c (build_new): Make the cleanup last longer.
11775         (expand_vec_init): Call do_pending_stack_adjust.
11776
11777 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
11778
11779         * pt.c (do_type_instantiation): Fix typo.
11780         (mark_class_instantiated): If we support one_only but not weak
11781         symbols, don't mark this as known.
11782
11783         * init.c (build_new): Handle vec delete in EH cleanup.
11784
11785 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11786
11787         * call.c (build_method_call): Call complete_type before checking
11788         for destructor.
11789
11790 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
11791
11792         * decl.c (add_block_current_level): Delete.
11793         * init.c (build_vec_delete_1): Delete build_block and
11794         add_block_current_level calls.
11795
11796 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
11797
11798         * init.c (build_new): Handle freeing allocated memory when the
11799         constructor throws.
11800
11801         * call.c (build_new_method_call): Fix flags arg.
11802
11803         * pt.c (do_type_instantiation): Don't try to instantiate
11804         member templates.
11805         (mark_decl_instantiated): If we support one_only but not
11806         weak symbols, mark this one_only.
11807         * decl2.c (import_export_vtable): Don't defer handling of vtables
11808         if MULTIPLE_SYMBOL_SPACES.
11809
11810 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
11811
11812         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
11813
11814 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
11815
11816         * except.c (do_pop_exception): Return a value.
11817
11818 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
11819
11820         * call.c (build_new_method_call): Handle getting a
11821         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
11822         if we got template parms.
11823         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
11824         not just the args.
11825         * decl2.c (build_expr_from_tree): Tweak last change.
11826         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
11827         (maybe_fold_nontype_arg): Split out from tsubst_copy.
11828         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
11829
11830 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
11831
11832         * pt.c (tsubst_copy): Handle explicit template arguments in
11833         function calls.
11834         * typeck.c (build_x_function_call): Likewise.
11835         * decl2.c (build_expr_from_tree): Lookup function name if it
11836         hasn't been done.
11837
11838         * pt.c (tsubst): Instantiate template functions properly when
11839         template parameter does not appear in function arguments and return
11840         type.
11841         (comp_template_args): Handle member templates required by tsubst.
11842
11843 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
11844
11845         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
11846         previous change.
11847
11848 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
11849
11850         * pt.c (coerce_template_parms): Tweak error message.
11851
11852         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
11853         return type defaults to `int', even if there are storage-class
11854         specifiers.
11855
11856 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
11857
11858         Complete nested exception support.
11859         * except.c (do_pop_exception): Split out...
11860         (push_eh_cleanup): From here.  Handle the EH region by hand.
11861         (expand_start_catch_block): Add a new level for the catch parm.
11862         Move the rethrow region outside the two cleanup regions.
11863         Protect the initializer for the catch parm with terminate.
11864         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
11865         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
11866         popping off the middle of the stack.
11867         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
11868         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
11869         (build_cplus_new): Only wrap CALL_EXPRs.
11870         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
11871         the constructor call.
11872
11873 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11874
11875         * Make-lang.in (c++.distdir): Make inc subdirectory.
11876
11877 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
11878
11879         * decl2.c (finish_file): Put back some code.
11880
11881 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
11882
11883         * decl2.c (finish_file): Remove redundant code.
11884         * method.c (emit_thunk): Don't let the backend defer generic thunks.
11885
11886 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
11887
11888         * except.c (call_eh_info): Split out...
11889         (push_eh_info): From here.
11890         (expand_builtin_throw): Use it.
11891         (expand_start_catch_block): Move region start back.
11892
11893 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
11894
11895         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
11896         (real_yylex): Record wide strings using target endianness, not host.
11897
11898 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
11899
11900         * repo.c (rindex): Add decl unconditionally.
11901         (get_base_filename, open_repo_file): Don't cast rindex.
11902         * xref.c (rindex): Add decl unconditionally.
11903         (index): Remove unused decl.
11904         (open_xref_file): Don't cast rindex.
11905
11906 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
11907
11908         * class.c (build_vbase_path): Propagate the result type properly.
11909
11910 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
11911
11912         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
11913         remaining use of saved_throw_type with a call to get_eh_type.
11914
11915 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
11916
11917         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
11918         (file_name_nondirectory): New function, doing the same as the macro.
11919         (set_typedecl_interface_info): Use it instead of the macro.
11920         (check_newline): Likewise.
11921         (handle_cp_pragma): Likewise.
11922
11923         * repo.c (get_base_filename): Cast result of rindex to char*.
11924         (open_repo_file): Likewise.
11925         * xref.c (open_xref_file): Likewise.
11926         * error.c (dump_char): Make its arg int, not char.
11927
11928         * except.c (push_eh_info): Pass the number of fields - 1 down, not
11929         the exact number of fields.
11930
11931 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
11932
11933         Support for nested exceptions.
11934         * tinfo2.cc (__is_pointer): New fn.
11935         * exception.cc (struct cp_eh_info): Define.
11936         (__cp_exception_info, __uncatch_exception): New fns.
11937         (__cp_push_exception, __cp_pop_exception): New fns.
11938         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
11939         Lose empty_fndecl.
11940         (init_exception_processing): Likewise.  __eh_pc is now external.
11941         (push_eh_info): New fn.
11942         (get_eh_{info,value,type,caught}): New fns.
11943         (push_eh_cleanup): Just call __cp_pop_exception.
11944         (expand_start_catch_block): Use push_eh_info.  Start the eh region
11945         sooner.
11946         (expand_end_eh_spec): Use push_eh_info.
11947         (expand_throw): Call __cp_push_exception to set up the exception info.
11948         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
11949         when we rethrow.
11950         (expand_builtin_throw): Don't refer to empty_fndecl.
11951
11952 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
11953
11954         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
11955
11956 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
11957
11958         * method.c (build_template_parm_names, build_decl_overload_real):
11959         Add static to definitions.
11960         * pt.c (add_to_template_args, note_template_header,
11961         processing_explicit_specialization, type_unification_real): Likewise.
11962         ({determine,check}_explicit_specialization): Use a single string for
11963         error messages.
11964
11965 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
11966
11967         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
11968         (expand_end_catch_block): Likewise.
11969         (expand_end_eh_spec): Likewise.
11970
11971 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
11972
11973         * decl.c (duplicate_decls): Handle template specializations
11974         correctly.
11975         * error.c (dump_function_name): Fix printing of specializations of
11976         member functions that are not member templates.
11977         * cp-tree.h (processing_specialization): Make global.
11978         * pt.c (processing_specialization): Likewise.
11979         * lex.c (cons_up_default_function): Save and restore
11980         processing_specialization to avoid confusion.
11981
11982 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
11983
11984         * decl.c (init_decl_processing): Give null_node unknown* type.
11985         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
11986         (common_type): Likewise.
11987         * error.c (args_as_string): Recognize null_node.
11988
11989 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11990
11991         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
11992         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
11993
11994         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
11995
11996         * Make-lang.in (g++): Include prefix.o.
11997
11998 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
11999
12000         * pt.c (determine_explicit_specialization): Initialize "dummy"
12001         to keep Purify quiet.
12002
12003 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
12004
12005         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
12006         (build_overload_int): Not here.
12007
12008 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
12009
12010         * class.c (build_type_pathname): Remove.
12011         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
12012
12013 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
12014
12015         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
12016         &&label GNU extension.
12017
12018 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
12019
12020         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
12021         so as to avoid incorrect manglings.
12022         * method.c (build_decl_overload_real): Don't mangle return types
12023         for constructors.
12024
12025 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12026
12027         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
12028         scratch_tree_cons): Define as macros for now.
12029         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
12030         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
12031         typeck2.c: Use them and the expression_obstack variants.
12032
12033 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12034
12035         * decl.c (store_return_init): Allow classes with explicit ctors to
12036         be used with the named return values extension.
12037
12038 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
12039
12040         * pt.c (instantiate_decl): Fix previous change.
12041
12042 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
12043
12044         * pt.c (tsubst): Fix thinko.
12045         (instantiate_decl): Really use the original template.
12046
12047         * call.c (build_new_method_call): Use simple constructor_name for
12048         error messages.
12049
12050 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
12051
12052         * method.c (build_underscore_int): Don't use ANSI specific
12053         features.
12054
12055 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
12056
12057         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
12058         for our key method; it might have been inlined by -O3.
12059
12060 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
12061
12062         * decl.c (make_typename_type): Do not try to call lookup_field for
12063         non-aggregate types.
12064
12065 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
12066
12067         * typeck.c (build_reinterpret_cast): Tweak.
12068
12069 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
12070
12071         * typeck.c (build_reinterpret_cast): Converting a void pointer
12072         to function pointer with a reinterpret_cast produces a warning
12073         if -pedantic is issued.
12074
12075 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12076
12077         * typeck.c (c_expand_return): Don't warn about returning a
12078         reference-type variable as a reference.
12079
12080 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
12081
12082         * method.c (build_static_name): Fix typo.
12083
12084 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
12085
12086         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
12087         OLDDECL before we try to do DECL_USE_TEMPLATE.
12088
12089 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
12090
12091         * decl.c (duplicate_decls): Don't warn about template instances.
12092
12093         * typeck.c (mark_addressable): Lose ancient code that unsets
12094         DECL_EXTERNAL.
12095
12096         * pt.c (do_decl_instantiation): Lose support for instantiating
12097         non-templates.
12098
12099         * call.c (build_new_function_call): Fix handling of null explicit
12100         template args.
12101         (build_new_method_call): Likewise.
12102
12103 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
12104
12105         * method.c (build_underscore_int): Fix typo.
12106
12107 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
12108
12109         * tree.c (print_lang_statistics): #if 0 call to
12110         print_inline_obstack_statistics until its definition is checked in.
12111
12112 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
12113
12114         * decl2.c (finish_file): Move dump_tree_statistics to end.
12115
12116         * pt.c (instantiate_decl): Look for the original template.
12117         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
12118         of member templates.
12119
12120 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
12121
12122         * Makefile.in (g++FAQ.*): New rules.
12123         (CONFLICTS): Update.
12124         * g++FAQ.texi: Moved from libg++.
12125
12126         * parse.y (PFUNCNAME): Only specify the type once.
12127
12128 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
12129
12130         * lex.c (real_yylex): Clean up the code to fully behave the way
12131         the c-lex.c parser does for complex and real numbers.
12132
12133 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
12134
12135         * method.c (build_decl_overload_real): Reformat.
12136
12137 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
12138
12139         * method.c (synthesize_method): If at_eof, determine our linkage.
12140
12141 1997-09-29  Paul Eggert  <eggert@twinsun.com>
12142
12143         * lex.c (real_yylex): Treat `$' just like `_', except issue a
12144         diagnostic if !dollars_in_ident or if pedantic.
12145
12146         * lang-specs.h (@c++): -ansi no longer implies -$.
12147
12148         * decl2.c (lang_decode_option):
12149         -traditional and -ansi now do not mess with
12150         dollars_in_ident.
12151
12152 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
12153
12154         * Makefile.in (parse.o, decl.o): Also depend on
12155         $(srcdir)/../except.h $(srcdir)/../output.h.
12156         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
12157         $(srcdir)/../except.h $(srcdir)/../output.h.
12158         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
12159         ../insn-codes.h.
12160
12161         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
12162
12163         * expr.c (cplus_expand_expr): Make it static.
12164
12165         * decl2.c, init.c, typeck.c: Include "expr.h".
12166         (expand_expr): Use proper values when calling the function.
12167
12168 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
12169
12170         * lang-options.h: New -Wold-style-cast flag.
12171         * cp-tree.h (warn_old_style_cast): New variable.
12172         * decl2.c (warn_old_style_cast): Likewise.
12173         (lang_decode_option): Support -Wold-style-cast.
12174         (reparse_absdcl_as_casts): Produce old-style-cast warning.
12175
12176 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12177
12178         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
12179         TREE_USED, reset value based on already_used.
12180
12181         * init.c (expand_member_init): Revert change.
12182
12183 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
12184
12185         * cp-tree.h, decl.c, decl2.c, pt.c:
12186         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
12187
12188         * decl2.c (lang_decode_option): Add missing ;.
12189
12190 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
12191
12192         * friend.c (do_friend): Disable injection for all template-derived
12193         decls.
12194         * decl2.c (lang_decode_option): Handle -fguiding-decls.
12195         * parse.y (notype_template_declarator): New nonterminal.
12196         (direct_notype_declarator): Use it.
12197         (complex_direct_notype_declarator): Likewise.
12198         (object_template_id): Accept any kind of identifier after TEMPLATE.
12199         (notype_qualified_id): Don't add template declarators here.
12200
12201 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
12202
12203         * call.c (add_template_candidate): Add explicit_targs parameter.
12204         (build_scoped_method_call): Use it.
12205         (build_overload_call_real): Likewise.
12206         (build_user_type_conversion_1): Likewise.
12207         (build_new_function_call): Likewise.
12208         (build_object_call): Likewise.
12209         (build_new_op): Likewise.
12210         (build_new_method_call): Likewise.
12211         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
12212         (build_new_method_call): Likewise.
12213
12214         * class.c (finish_struct_methods): Add specialization pass to
12215         determine which methods were specializing which other methods.
12216         (instantiate_type): Handle TEMPLATE_ID_EXPR.
12217
12218         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
12219
12220         * cp-tree.h (name_mangling_version): New variable.
12221         (flag_guiding_decls): Likewise.
12222         (build_template_decl_overload): New function.
12223         (begin_specialization): Likewise.
12224         (reset_specialization): Likewise.
12225         (end_specialization): Likewise.
12226         (determine_explicit_specialization): Likewise.
12227         (check_explicit_specialization): Likewise.
12228         (lookup_template_function): Likewise.
12229         (fn_type_unification): Add explicit_targs parameter.
12230         (type_unification): Likewise.
12231
12232         * decl.c (duplicate_decls): Add smarts for explicit
12233         specializations.
12234         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
12235         specializations.
12236         (grokfndecl): Call check_explicit_specialization.
12237
12238         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
12239         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
12240         (check_classfn): Handle specializations.
12241
12242         * error.c (dump_function_name): Print specialization arguments.
12243
12244         * friend.c (do_friend): Don't call pushdecl for template
12245         instantiations.
12246
12247         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
12248
12249         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
12250         and -fno-guiding-decls.
12251
12252         * lex.c (identifier_type): Return PFUNCNAME for template function
12253         names.
12254
12255         * method.c (build_decl_overload_real): New function.
12256         (build_template_parm_names): New function.
12257         (build_overload_identifier): Use it.
12258         (build_underscore_int): New function.
12259         (build_overload_int): Use it.  Add levels for template
12260         parameters.
12261         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
12262         (build_overload_nested_names): Handle template type parameters.
12263         (build_template_decl_overload): New function.
12264
12265         * parse.y (YYSTYPE): New ntype member.
12266         (nested_name_specifier): Use it.
12267         (nested_name_specifier_1): Likewise.
12268         (PFUNCNAME): New token.
12269         (template_id, object_template_id): New non-terminals.
12270         (template_parm_list): Note specializations.
12271         (template_def): Likewise.
12272         (structsp): Likewise.
12273         (fn.def2): Handle member template specializations.
12274         (component_decl_1): Likewise.
12275         (direct_notype_declarator): Handle template-ids.
12276         (component_decl_1): Likewise.
12277         (direct_notype_declarator): Handle template-ids.
12278         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
12279
12280         * pt.c (processing_specializations): New variable.
12281         (template_header_count): Likewise.
12282         (type_unification_real): New function.
12283         (processing_explicit_specialization): Likewise.
12284         (note_template_header): Likewise.
12285         (is_member_template): Handle specializations.
12286         (end_template_decl): Call reset_specialization.
12287         (push_template_decl): Handle member template specializations.
12288         (tsubst): Likewise.
12289         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
12290         (instantiate_template): Handle specializations.
12291         (instantiate_decl): Likewise.
12292         (fn_type_unification): Handle explicit_targs.
12293         (type_unification): Likewise.  Allow incomplete unification
12294         without an error message, if allow_incomplete.
12295         (get_bindings): Use new calling sequence for fn_type_unification.
12296
12297         * spew.c (yylex): Handle PFUNCNAME.
12298
12299         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
12300         (really_overloaded_fn): Likewise.
12301         (get_first_fn): Handle function templates.
12302
12303         * typeck.c (build_x_function_call): Use really_overloaded_fn.
12304         Handle TEMPLATE_ID_EXPR.
12305         (build_x_unary_op): Likewise.
12306         (build_unary_op): Likewise.
12307         (mark_addressable): Templates whose address is taken are marked
12308         as used.
12309
12310 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
12311
12312         * decl.c (init_decl_processing): Declare __builtin_constant_p as
12313         accepting any kind of type, not only int.
12314
12315 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
12316
12317         * search.c (get_matching_virtual): Notice virtual bases when sorrying
12318         about covariant returns.
12319
12320         * parse.y (member_init): Also imply typename here.  Remove ancient
12321         extension for initializing base members.
12322
12323 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
12324
12325         Handle multi-level typenames and implicit typename in base list.
12326         * parse.y (typename_sub{,[0-2]}): New rules.
12327         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
12328         (nonnested_type): New rule.
12329         (complete_type_name): Use it.
12330         (base_class.1): Use typename_sub and nonnested_type.
12331         (nested_name_specifier): Don't elide std:: here.
12332         * decl.c (make_typename_type): Handle getting a type for NAME.
12333         (lookup_name_real): Turn std:: into :: here.
12334
12335         Rvalue conversions were removed in London.
12336         * call.c (is_subseq): Don't consider lvalue transformations.
12337         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
12338         (joust): Re-enable ?: kludge.
12339
12340 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
12341
12342         * decl.c (start_function): Up warning of no return type to be a
12343         pedwarn.
12344
12345 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12346
12347         * init.c (expand_member_init): Don't set TREE_USED.
12348         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
12349         set,don't clear TREE_USED wholesale.
12350
12351 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
12352
12353         * call.c (build_over_call): Do require_complete_type before
12354         build_cplus_new.
12355
12356 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
12357
12358         * search.c (lookup_field): Call complete_type in all cases.
12359
12360         * decl.c (finish_function): Just warn about flowing off the end.
12361
12362 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
12363
12364         * decl.c (grokparms): Don't bash a permanent list node if we're
12365         in a function.
12366
12367 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
12368
12369         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
12370
12371 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
12372
12373         * call.c (build_new_op): Give better error for syntactically
12374         correct, but semantically invalid, use of undeclared template.
12375
12376         * call.c (compare_qual): Handle pmfs.
12377
12378         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
12379         after the exception spec.
12380
12381 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
12382
12383         * call.c (null_ptr_cst_p): Integer type, not integral type.
12384
12385         * call.c (joust): Disable warnings until they can be moved to the
12386         right place.
12387
12388 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
12389
12390         * Makefile.in, config-lang.in:  Convert to autoconf.
12391
12392 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
12393
12394         * decl.c (lookup_name_real): Add implicit 'typename' to types from
12395         base classes.
12396
12397         * pt.c (most_specialized_class): Fix typo.
12398         (tsubst): Move constant folding to TREE_VEC case.
12399
12400 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
12401
12402         * pt.c (do_poplevel): Don't warn about unused local variables
12403         while processing_template_decl since we don't always know whether
12404         or not they will need constructing/destructing.
12405
12406         * pt.c (uses_template_parms): Check the values of an enumeration
12407         type to make sure they don't depend on template parms.
12408
12409         * decl.c (make_typename_type): Don't lookup the field if the
12410         context uses template parms, even if we're not
12411         processing_template_decl at the moment.
12412
12413         * pt.c (coerce_template_parms): Avoid looking at the
12414         TYPE_LANG_DECL portion of a typename type, since there won't be
12415         one.
12416         (tsubst): Do constant folding as necessary to make sure that
12417         arguments passed to lookup_template_class really are constants.
12418
12419 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
12420
12421         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
12422         * decl2.c (finish_file): Only register exception tables if we
12423         need to.
12424
12425         * decl.c (init_decl_processing): Add __builtin_[fs]p.
12426
12427 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
12428
12429         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
12430
12431 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
12432
12433         * error.c (dump_decl): Avoid crashing when presented with a
12434         uninitialized constant, as can occur with a template parameter.
12435         (dump_expr): Make sure that there are enough levels of
12436         current_template_parms before we start diving through them.
12437
12438 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
12439
12440         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
12441         c-typeck.c.
12442
12443 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12444
12445         * except.c (expand_throw): Call build_delete for all
12446         exception types, not just objects with destructors.
12447
12448 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
12449
12450         * decl.c (current_local_enum): Remove static.
12451         * pt.c (tsubst_enum): Save and restore value of current_local_enum
12452         in case template is expanded in enum decl.
12453         (instantiate_class_template): Use new tsubst_enum signature.
12454         (tsubst_expr): Likewise.
12455
12456 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
12457
12458         * pt.c (begin_member_template_processing): Take a function as
12459         argument, not a set of template arguments.  Use the template
12460         parameters, rather than the arguments.  Handle non-type parameters
12461         correctly.  Push a binding level for the parameters so that multiple
12462         member templates using the same parameter names can be declared.
12463         (end_member_template_processing): Pop the binding level.
12464         (push_template_decl): Mark member templates as static when
12465         appropriate.
12466
12467         * lex.c (do_pending_inlines): Pass the function, not its template
12468         arguments, to begin_member_template_processing.
12469         (process_next_inline): Likewise.
12470         (do_pending_defargs): Likewise.
12471
12472         * error.c (dump_expr): Obtain the correct declaration for a
12473         TEMPLATE_CONST_PARM.
12474
12475         * call.c (add_template_conv_candidate): New function.
12476         (build_object_call): Handle member templates, as done in the other
12477         build_ functions.
12478
12479 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
12480
12481         * decl.c (replace_defag): Undo previous change.
12482         * lex.c (do_pending_defargs): Deal with member templates.
12483
12484         * pt.c (is_member_template): Avoid crashing when passed a
12485         non-function argument.
12486
12487 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
12488
12489         * class.c (grow_method): Remove check for redeclaration.
12490
12491 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
12492
12493         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
12494         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
12495         (PRIMARY_TEMPLATE_P): Use it.
12496         * call.c (build_overload_call_real): Use it.
12497         * class.c (instantiate_type): Likewise.
12498         * decl.c (decls_match): Likewise.
12499         * method.c (build_overload_identifier): Likewise.
12500         * pt.c (push_template_decl): Likewise.
12501         (classtype_mangled_name): Likewise.
12502         (lookup_template_class): Likewise.
12503
12504         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
12505         DECL_NTPARMS to conform to usage elsewhere.
12506         * call.c (add_template_candidate): Likewise.
12507         * class.c (instantiate_type): Likewise.
12508         * pt.c (instantiate_template): Likewise.
12509         (get_bindings): Likewise.
12510
12511         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
12512         is_member_template.
12513
12514         * pt.c (unify): Undo changes to allow multiple levels of template
12515         parameters.
12516         (type_unification): Likewise.
12517         (fn_type_unification): Likewise.
12518         (get_class_bindings): Likewise.
12519         * cp-tree.h (Likewise).
12520
12521         * decl.c (replace_defarg): Check that the type of the default
12522         parameter does not invlove a template type before complaining
12523         about the initialization.
12524
12525         * error.c (dump_expr): Deal with template constant parameters in
12526         member templates correctly.
12527
12528         * pt.c (is_member_template): Deal with class specializations
12529         correctly.
12530         (tsubst): Handle "partial instantiation" of member templates
12531         correctly.
12532
12533 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
12534
12535         * pt.c (type_unification): Change calling sequence to allow for
12536         multiple levels of template parameters.
12537         (tsubst_expr): Likewise.
12538         (tsubst): Likewise.
12539         (tsubst_copy): Likewise.
12540         (instantiate_template): Likewise.
12541         (unify): Likewise.
12542         * call.c (build_overload_call_real): Use it.
12543         (add_builtin_candidate): Use it.
12544         (build_new_method_call): Use it.
12545         * class.c (instantiate_type): Use it.
12546         * decl.c (grokdeclarator): Use it.
12547         * decl2.c (finish_file): Use it.
12548         * method.c (build_overload_identifier): Use it.
12549
12550         * call.c (add_template_candidate):  Add additional parameter for
12551         the function return type.  Call fn_type_unification istead of
12552         type_unification.
12553         (build_user_type_conversion_1): Handle member templates.
12554         (build_new_function_call): Likewise.
12555         (build_new_op): Likewise.
12556         (build_new_method_call): Likewise.
12557
12558         * class.c (grow_method): Don't give an error message indicating
12559         that two member templates with the same name are ambiguous.
12560         (finish_struct): Treat member template functions just like member
12561         functions.
12562
12563         * cp-tree.h (check_member_template): Add declaration.
12564         (begin_member_template_processing): Likewise.
12565         (end_member_template_processing): Likewise.
12566         (fn_type_unification): Likewise.
12567         (is_member_template): Likewise.
12568         (tsubst): Change prototype.
12569         (tsubst_expr): Likewise.
12570         (tsubst_copy): Likewise.
12571         (instantiate_template): Likewise.
12572         (get_bindings): Likewise.
12573
12574         * decl.c (decls_match): Handle multiple levels of template
12575         parameters.
12576         (pushdecl): Handle template type params just like other type
12577         declarations.
12578         (push_class_level_binding): Return immediately if the
12579         class_binding_level is NULL.
12580         (grokfndecl): If check_classfn() returns a member_template, use
12581         the result of the template, not the template itself.
12582
12583         * decl2.c (check_member_template): New function.  Check to see
12584         that the entity declared to be a member template can be one.
12585         (check_classfn): Allow redeclaration of member template functions
12586         with different types; the new functions can be specializations or
12587         explicit instantiations.
12588
12589         * error.c (dump_decl): Handle multiple levels of template
12590         parameters.
12591         (dump_function_decl): Update to handle function templates.
12592
12593         * lex.c (do_pending_inlines): Set up template parameter context
12594         for member templates.
12595         (process_next_inline): Likewise.
12596
12597         * method.c (build_overload_identifier): Adjust for multiple levels
12598         of template parameters.
12599
12600         * parse.y (fn.def2): Add member templates.
12601         (component_decl_1): Likewise.
12602
12603         * pt.c (begin_member_template_processing): New function.
12604         (end_member_template_processing): Likewise.
12605         (is_member_template): Likewise.
12606         (fn_type_unification): Likewise.
12607         (current_template_parms): Return a vector of all the template
12608         parms, not just the innermost level of parms.
12609         (push_template_decl): Deal with the possibility of member
12610         templates.
12611         (lookup_template_class): Likewise.
12612         (uses_template_parms): Likewise.
12613         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
12614         TEMPLATE_CONST_PARM to deal with multiple levels of template
12615         arguments.   Add processing of TEMPLATE_DECL to produce new
12616         TEMPLATE_DECLs from old ones.
12617         (do_decl_instantiation): Handle member templates.
12618
12619         * search.c (lookup_fnfields_1): Handle member template conversion
12620         operators.
12621
12622         * tree.c (cp_tree_equal): Check the levels, as well as the
12623         indices, of TEMPLATE_CONST_PARMs.
12624
12625         * typeck.c (comptypes): Check the levels, as well as the indices,
12626         fo TEMPLATE_TYPE_PARMs.
12627         (build_x_function_call): Treat member templates like member
12628         functions.
12629
12630 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
12631
12632         * typeck.c (c_expand_return): Always convert_for_initialization
12633         before checking for returning a pointer to local.
12634
12635         * pt.c (type_unification): If strict and the function parm doesn't
12636         use template parms, just compare types.
12637
12638 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
12639
12640         * method.c (build_overloaded_value): Replace direct call
12641         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
12642
12643 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
12644
12645         * typeck.c (convert_arguments): Don't arbitrarily choose the first
12646         of a set of overloaded functions.
12647
12648 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
12649
12650         * lex.c (real_yylex): Don't elide __FUNCTION__.
12651
12652         * method.c (build_overload_value): Add in_template parm.
12653         (build_overload_int): Likewise.
12654         (build_overload_identifier): Pass it.
12655
12656         * decl.c (duplicate_decls): Don't bash a previous template
12657         definition with a redeclaration.
12658
12659         * pt.c (unify): float doesn't match double.
12660
12661         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
12662         TYPE_DECL.  Handle getting non-template types.
12663         * parse.y (explicit_instantiation): Use typespec instead of
12664         aggr template_type.
12665
12666 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
12667
12668         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
12669
12670 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
12671
12672         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
12673         (compare_ics): Likewise.
12674
12675 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
12676
12677         * call.c (joust): Warn about choosing one conversion op over
12678         another because of 'this' argument when the other return type is
12679         better.
12680         (source_type): New fn.
12681
12682         * call.c (build_new_op): Strip leading REF_BIND from first operand
12683         to builtin operator.
12684
12685         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
12686         use its RTL.
12687
12688 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
12689
12690         * call.c (null_ptr_cst_p): Remove support for (void*)0.
12691
12692 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
12693
12694         * typeck.c (expand_target_expr): Make definition match declaration.
12695
12696         * class.c (get_basefndecls): Make definition match declaration.
12697
12698 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
12699
12700         * input.c (sub_getch): Eventually give up and release the input file.
12701
12702         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
12703         right place.
12704
12705         * call.c (joust): Tweak message.
12706
12707 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
12708
12709         * error.c (type_as_string): Put const/volatile on template type
12710         parameters where appropriate.
12711
12712 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
12713
12714         * call.c (strictly_better): Make arguments unsigned ints.
12715
12716 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
12717
12718         * lex.c (real_yylex): Refer to __complex instead of complex.
12719
12720 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
12721
12722         * lex.c (real_yylex): Don't use getc directly.
12723
12724 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
12725
12726         * call.c (is_subseq): Don't try to be clever.
12727
12728 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
12729
12730         * parse.y, pt.c: Include "except.h".
12731         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
12732         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
12733         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
12734         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
12735         prototyping.
12736
12737 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
12738
12739         * decl2.c (mark_vtable_entries): Instead of replacing pure
12740         virtuals with a reference to __pure_virtual, copy the decl and
12741         change the RTL.
12742
12743 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
12744
12745         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
12746
12747         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
12748
12749         * pt.c (instantiate_class_template): Call repo_template_used
12750         before finish_prevtable_vardecl.
12751
12752         * call.c (is_subseq): New fn.
12753         (compare_ics): Use it.
12754
12755         * repo.c (finish_repo): Don't crash on no args.
12756
12757         * parse.y (named_complex_class_head_sans_basetype): Handle
12758         explicit global scope.
12759         * decl2.c (handle_class_head): New fn.
12760
12761         * pt.c (unify): Add CONST_DECL case.
12762
12763 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
12764
12765         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
12766
12767         * cp-tree.h (report_type_mismatch): Add prototype.
12768         * call.c (build_overload_call_real): Remove erroneous fourth
12769         argument to report_type_mismatch.
12770         (build_user_type_conversion_1): Remove erroneous second arg to
12771         tourney.
12772         (build_new_function_call): Likewise.
12773         (build_object_call): Likewise.
12774         (build_new_op): Likewise.
12775         (build_new_method_call): Likewise.
12776
12777 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
12778
12779         * error.c (dump_decl): Don't bother processing a function with no
12780         DECL_LANG_SPECIFIC.
12781
12782         * method.c (emit_thunk): Call init_function_start in the macro case.
12783
12784 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
12785
12786         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
12787         defined and used to set flag_vtable_thunks.
12788
12789 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
12790
12791         * parse.y: Don't clear the inlines from their obstack until they've
12792         all been processed.
12793
12794         * decl.c (duplicate_decls): Don't complain about exception
12795         specification mismatch if flag_exceptions is off.
12796
12797 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
12798
12799         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
12800
12801 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
12802
12803         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
12804         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
12805         Include <stdio.h> before include files that formerly used STDIO_PROTO.
12806
12807         * decl.c, g++spec.c, lex.c, method.c, repo.c:
12808         Include "config.h" first, as per autoconf manual.
12809
12810 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
12811
12812         * decl.c (duplicate_decls): Tweak wording.
12813         * lex.c (do_pending_defargs): Don't die if we see a default arg
12814         that isn't a DEFAULT_ARG.
12815         * error.c (dump_expr): Handle DEFAULT_ARG.
12816
12817         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
12818         * lang-options.h: Add -fhandle-exceptions.
12819
12820         * class.c (build_vtable): Vtables are artificial.
12821         (prepare_fresh_vtable): Likewise.
12822
12823 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
12824
12825         * cvt.c (ocp_convert): After converting to the target type, set
12826         LOOKUP_NO_CONVERSION.
12827
12828         * call.c (joust): Warn about potentially confusing promotion rules
12829         with -Wsign-promo.
12830         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
12831
12832 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
12833
12834         * exception.cc: Declare __terminate_func with noreturn attribute.
12835
12836 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
12837
12838         * parse.y: Break out eat_saved_input, handle errors.
12839         (function_try_block): Use compstmt instead of compstmt_or_error.
12840
12841 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
12842
12843         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
12844
12845 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
12846
12847         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
12848         existence of cc1plus check whether $(LANGUAGES) contains C++.
12849
12850 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
12851
12852         * method.c (do_build_copy_constructor): When copying an anonymous
12853         union member loop around to handle nested anonymous unions.  Use
12854         the offset of the member relative to the outer structure, not the
12855         union.
12856
12857 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
12858
12859         * call.c (resolve_args): New fn.
12860         (build_new_function_call): Use it.
12861         (build_object_call): Likewise.
12862         (build_new_method_call): Likewise.
12863
12864 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
12865
12866         * call.c (build_over_call): tsubst all default parms from templates.
12867
12868 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
12869
12870         * decl.c (struct cp_function): Add static_labelno.
12871         (push_cp_function_context): Save it.
12872         (pop_cp_function_context): Restore it.
12873
12874 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
12875
12876         * typeck.c (build_component_ref_1): Convert from reference.
12877
12878 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
12879
12880         * parse.y (current_declspecs, prefix_attributes): Initialize to
12881         NULL_TREE.
12882
12883         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
12884         before we try to force it to be a TREE_LIST.
12885         (decl): Make sure $1.t is non-nil.
12886
12887 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
12888
12889         * pt.c (uses_template_parms): Handle template first-parse codes.
12890
12891         * decl.c (cp_finish_decl): Only warn about user-defined statics.
12892
12893 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
12894
12895         * pt.c (unify): Handle BOOLEAN_TYPE.
12896
12897         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
12898         * pt.c (tsubst): Don't set it.
12899         * call.c (build_over_call): Use uses_template_parms.
12900
12901 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
12902
12903         * method.c (build_overload_nested_name): Use static_labelno
12904         instead of var_labelno.
12905         (build_qualified_name): New fn.
12906         (build_overload_name): Split out from here.
12907         (build_static_name): Use build_qualified_name.
12908         * decl.c (cp_finish_decl): Statics in extern inline functions
12909         have comdat linkage.
12910         (start_function): Initialize static_labelno.
12911
12912 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12913
12914         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
12915         before "all member functions in class [] are private".
12916
12917 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
12918
12919         * lex.c (do_scoped_id): convert_from_reference.
12920         * init.c (build_offset_ref): Likewise.
12921
12922 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
12923
12924         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
12925
12926 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
12927
12928         * typeck.c (get_member_function_from_ptrfunc): Promote index
12929         before saving it.
12930
12931 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
12932
12933         * tree.c (layout_basetypes): Move non-virtual destructor warning.
12934         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
12935
12936 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
12937
12938         * decl.c (grokdeclarator): Call add_defarg_fn for the function
12939         type, too.
12940         * lex.c (add_defarg_fn): Adjust.
12941         (do_pending_defargs): Adjust.  Don't skip the first parm.
12942
12943 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
12944
12945         * decl.c (build_enumerator): Global enumerators are also readonly.
12946
12947         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
12948         (build_dynamic_cast): Call it and convert_from_reference.
12949
12950         * lex.c (add_defarg_fn): New fn.
12951         (snarf_defarg): Don't add to defarg_types.
12952         (do_pending_defargs): Lose defarg_types.  All fns we process now
12953         have defargs.
12954         * decl.c (grokfndecl): Call add_defarg_fn.
12955
12956         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
12957         * cp-tree.def: Add DEFAULT_ARG.
12958         * spew.c (yylex): Call snarf_defarg as appropriate.
12959         * parse.y: New tokens DEFARG and DEFARG_MARKER.
12960         (defarg_again, pending_defargs, defarg, defarg1): New rules.
12961         (structsp): Use pending_defargs.
12962         (parms, full_parm): Use defarg.
12963         * lex.c (init_lex): Initialize inline_text_firstobj.
12964         (do_pending_inlines): Never pass the obstack to feed_input.
12965         (process_next_inline): Call end_input instead of restore_pending_input.
12966         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
12967         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
12968         * input.c (end_input): New fn.
12969         (sub_getch): At the end of some fed input, just keep returning EOF
12970         until someone calls end_input.
12971         Remove 'obstack' field from struct input_source.
12972         * decl.c (grokparms): Handle DEFAULT_ARG.
12973         (replace_defarg): New fn.
12974         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
12975
12976 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
12977
12978         * call.c (implicit_conversion): If nothing else works, try binding
12979         an rvalue to a reference.
12980
12981 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
12982
12983         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
12984         ifndef for Cygwin32 to include SIGSEGV.
12985
12986 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
12987
12988         * class.c (finish_struct_1): Only complain about pointers without
12989         copy stuff if there are any constructors.
12990
12991         * rtti.c (build_dynamic_cast): Call complete_type on the types.
12992
12993         * decl.c (grokfndecl): If the function we chose doesn't actually
12994         match, die.
12995
12996         * decl2.c (grokclassfn): Don't specify 'const int' for the
12997         artificial destructor parm.
12998
12999         * pt.c (type_unification): If we are called recursively, nothing
13000         decays.
13001
13002 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
13003
13004         * decl.c (init_decl_processing): Stop trying to catch signals
13005         other than SIGABRT since the Cygwin32 library doesn't support
13006         them correctly yet.  This fixes a situation in which g++ causes
13007         a hang on SIGSEGVs and other such signals in our Win32-hosted
13008         tools.
13009
13010 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
13011
13012         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
13013
13014 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
13015
13016         * typeck2.c (store_init_value): Always return the value if our
13017         type needs constructing.
13018
13019         * method.c (hack_identifier): Convert class statics from
13020         reference, too.
13021
13022 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
13023
13024         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
13025
13026 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
13027
13028         * typeck.c (c_expand_return): Make sure we clean up temporaries at
13029         the end of return x;
13030
13031 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13032
13033         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
13034
13035 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
13036
13037         * except.c (expand_builtin_throw): Add support
13038         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
13039
13040 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
13041
13042         * repo.c (extract_string): Null-terminate.
13043
13044         * cp-tree.h (TI_SPEC_INFO): New macro.
13045         (CLASSTYPE_TI_SPEC_INFO): New macro.
13046         * pt.c (push_template_decl): Correctly determine # of template parms
13047         for partial specs.
13048
13049         * call.c (compare_ics): Really fix 'this' conversions.
13050
13051         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
13052         non-template fn.
13053
13054         * pt.c (push_template_decl): Complain about mismatch in # of
13055         template parms between a class template and a member template.
13056
13057 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13058
13059         * method.c (synthesize_method): You can't call
13060         function_cannot_inline_p after finish_function.
13061         * decl.c (finish_function): Turn on flag_inline_functions and turn
13062         off DECL_INLINE before handing a synthesized method to the
13063         backend.
13064
13065 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13066
13067         * method.c (synthesize_method): Remove July 30 change to never set
13068         DECL_INLINE if at_eof.
13069
13070 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
13071
13072         * xref.c (GNU_xref_member): Ensure that the node has a
13073         decl_lang_specific part before checking DECL_FRIEND_P.
13074
13075 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
13076
13077         * pt.c (instantiate_class_template): Diagnose non-class types used
13078         as bases.
13079
13080 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
13081
13082         * typeck.c (build_conditional_expr): Use convert_for_initialization
13083         instead of convert_and_check.
13084
13085 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13086
13087         * parse.y (typespec): Don't pedwarn for typeof.
13088
13089 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
13090
13091         * repo.c (finish_repo): Only check changes if we would write a
13092         repo file.
13093
13094         * call.c (compare_ics): Fix handling of 'this' conversions.
13095
13096         * pt.c (do_decl_instantiation): Support static data too.  Rename
13097         from do_function_instantiation.
13098         * cp-tree.h: Adjust.
13099         * parse.y: Adjust.
13100
13101         * repo.c (extract_string): New fn.
13102         (get_base_filename): Use it.
13103         (init_repo): Compare old args with current args.
13104
13105 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
13106
13107         * Makefile.in, Make-lang.in: Protect C-ls with a comment
13108         character, idea from Paul Eggert <eggert@twinsun.com>.
13109
13110 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
13111
13112         * typeck.c (c_expand_return): Be more persistent in looking for
13113         returned temps.
13114
13115         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
13116         pointer to reference.
13117
13118         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
13119
13120 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
13121
13122         * init.c (build_member_call, build_offset_ref):
13123         Use do_scoped_id instead of do_identifier.
13124
13125         * cvt.c (convert): Remove bogosity.
13126
13127 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13128
13129         * cvt.c (build_up_reference): Do checks of ARGTYPE and
13130         TARGET_TYPE before trying to use get_binfo.
13131
13132 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
13133
13134         * cvt.c (build_up_reference): Call get_binfo to get access control.
13135
13136         * decl2.c (import_export_decl): If we don't support weaks, leave
13137         statics undefined.
13138
13139 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
13140
13141         * except.c (expand_builtin_throw): Add support for machines that
13142         cannot access globals after throw's epilogue when
13143         -fno-sjlj-exceptions is used.
13144
13145 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
13146
13147         * parse.y: 'std::' becomes '::'.
13148         * lex.c (real_yylex): Remove 'namespace' warning.
13149         * init.c (build_member_call): Ignore 'std::'.
13150         (build_offset_ref): Likewise.
13151         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
13152         (do_toplevel_using_decl): Ignore 'using std::whatever'.
13153         * decl.c (push_namespace): Just sorry.
13154         (pop_namespace): Nop.
13155         (init_decl_processing): Declare std namespace.
13156
13157 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
13158
13159         * search.c (push_class_decls): A name which ambiguously refers to
13160         several instantiations of the same template just refers to the
13161         template.
13162
13163 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
13164
13165         * decl.c (build_enumerator): Fix problem with unsigned long
13166         enumerated values being smashed to ints, causing overflow
13167         when computing next enumerated value (for enum values around
13168         MAX_VAL).
13169
13170 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
13171
13172         * typeck.c (build_component_ref): Only call mark_used on a decl.
13173
13174 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13175
13176         * typeck.c (build_c_cast): Make the check for a ptr to function
13177         more specific before possible default_conversion call.
13178
13179 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
13180
13181         * except.c (expand_exception_blocks): Simplify and fix and make
13182         sure we don't end a region in a sequence, as expand_end_bindings
13183         doesn't like it.
13184
13185 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
13186
13187         * except.c (init_exception_processing): Mark terminate as not
13188         returning so that the optimizer can optimize better.
13189
13190 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
13191
13192         * cvt.c (convert): Don't do any extra work, if we can avoid it
13193         easily.
13194
13195 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
13196
13197         * *.[chy]: Change cp_convert to ocp_convert, change convert to
13198         cp_convert.  convert is now reserved for the backend, and doesn't
13199         have the semantics a frontend person should ever want.
13200
13201 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
13202
13203         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
13204         Lose -traditional support.
13205
13206 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13207
13208         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
13209
13210         * parse.y (self_reference): Do it for templates, too.
13211         * class.c (pushclass): Don't overload_template_name; the alias
13212         generated by build_self_reference serves the same purpose.
13213
13214         * tree.c (list_hash): Make static, take more args.
13215         (list_hash_lookup): Likewise.
13216         (list_hash_add): Make static.
13217         (list_hash_canon): Lose.
13218         (hash_tree_cons): Only build a new node if one isn't already in the
13219         hashtable.
13220         (hash_tree_chain): Use hash_tree_cons.
13221         * cp-tree.h: Adjust.
13222         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
13223         of calling lookup_name.
13224
13225 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
13226
13227         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
13228         doesn't refer to the CONST_DECLs.
13229
13230 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
13231
13232         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
13233         is bigger.
13234         (expand_class_desc): Convert the last argument to a sizetype.
13235
13236 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13237
13238         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
13239         __real__): Add reswords.
13240         * hash.h: Regenerate.
13241         * lex.h (rid): Add RID_COMPLEX.
13242         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
13243         * lex.c (init_lex): Add building of RID_COMPLEX.
13244         (real_yylex): General cleanup in line with what c-lex.c also has,
13245         sans the cruft for traditional; add handling of SPEC_IMAG, complex
13246         types, and imaginary numeric constants.
13247         * parse.y (REALPART, IMAGPART): Add tokens.
13248         (unary_expr): Add REALPART and IMAGPART rules.
13249         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
13250         * decl.c (complex_{integer,float,double,long}_type_node): Define
13251         types.
13252         (init_decl_processing): Set up the types.
13253         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
13254         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
13255         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
13256         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
13257         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
13258         COMPLEX_TYPE case.
13259         * method.c (build_overload_name): Add handling of the different
13260         COMPLEX_TYPEs, prefixing them with `J'.
13261         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
13262         as a template parm.
13263         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
13264         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
13265         (mapcar): Handle COMPLEX_CST.
13266         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
13267         (common_type): Add code for complex types.
13268         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
13269         (convert_for_assignment): Likewise.
13270         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
13271
13272 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
13273
13274         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
13275         tsubst_expr, as it might try to do overload resolution.
13276
13277 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
13278
13279         * pt.c (instantiate_class_template): Oops.
13280
13281 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
13282
13283         * cp-tree.def: Add TAG_DEFN.
13284         * pt.c (tsubst_enum): New fn.
13285         (instantiate_class_template): Use it.
13286         (tsubst_expr): Support TAG_DEFN.
13287         (tsubst): Support local enums.
13288         (tsubst_copy): Likewise.
13289         * decl.c (finish_enum): Likewise.
13290         (start_enum): If this is a local enum, switch to permanent_obstack.
13291
13292 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
13293
13294         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
13295         (finish_function): Put the base init code for constructors just
13296         after the parm cleanup insns.
13297         (struct cp_function): Add last_parm_cleanup_insn.
13298         (push_cp_function_context): Likewise.
13299         (pop_cp_function_context): Likewise.
13300
13301 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13302
13303         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
13304
13305 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13306
13307         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
13308         for THUNK_FNDECL before we switch to temporary allocation.
13309
13310 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
13311
13312         * call.c (build_new_op): Handle null arg2 for ?:.
13313
13314 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
13315
13316         * except.c (expand_exception_blocks): Ensure that we flow through
13317         the end of the exception region for the exception specification.
13318         Move exception region for the exception specification in, so that
13319         it doesn't protect the parm cleanup.  Remove some obsolete code.
13320         * decl.c (store_parm_decls): Likewise.
13321         (finish_function): Likewise.
13322
13323 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
13324
13325         * init.c (build_new): Fix nothrow handling.
13326
13327 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13328
13329         * init.c (emit_base_init): Don't warn about the initialization
13330         list for an artificial member.
13331
13332 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13333
13334         * expr.c (do_case): Handle !START case for the error msg.
13335
13336 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
13337
13338         * decl2.c, lang-options.h: New option -Weffc++.
13339         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
13340         to -Weffc++.
13341
13342         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
13343         to MULTIPLE_SYMBOL_SPACES.
13344
13345 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
13346
13347         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
13348
13349         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
13350
13351         * typeck.c (c_expand_return): Don't complain about returning void
13352         to void in an artificial function.
13353         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
13354         don't set DECL_RESULT, set DECL_ARTIFICIAL.
13355         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
13356
13357 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
13358
13359         * init.c (init_decl_processing): Add support for setjmp/longjmp based
13360         exception handling.
13361         * except.c (init_exception_processing): Likewise.
13362         (expand_end_catch_block): Likewise.
13363         (expand_exception_blocks): Likewise.
13364         (expand_throw): Likewise.
13365         * exception.cc (__default_terminate): Likewise.
13366
13367         * init.c (perform_member_init): Use new method of expr level
13368         cleanups, instead of cleanups_this_call and friends.
13369         (emit_base_init): Likewise.
13370         (expand_aggr_vbase_init_1): Likewise.
13371         (expand_vec_init): Likewise.
13372         * decl.c (cp_finish_decl): Likewise.
13373         (expand_static_init): Likewise.
13374         (store_parm_decls): Likewise.
13375         (cplus_expand_expr_stmt): Likewise.
13376         * decl2.c (finish_file): Likewise.
13377
13378         * Make-lang.in (exception.o): Ok to compile with -O now.
13379
13380         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
13381         we know it will be done later by the backend.
13382
13383         * decl2.c (lang_f_options): Remove support for short temps.
13384         * lang-options.h: Likewise.
13385
13386 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
13387
13388         * tree.c (varargs_function_p): New fn.
13389         * method.c (emit_thunk): Replace broken generic code with code to
13390         generate a heavyweight thunk function.
13391
13392 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
13393
13394         * pt.c (process_template_parm): pedwarn about floating-point parms.
13395
13396         * decl.c (grokdeclarator): inline no longer implies static.
13397
13398         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
13399
13400 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
13401
13402         * class.c (check_for_override): The signature of an overriding
13403         function is not changed.
13404
13405         * call.c (build_over_call): Move setting of conv into the loop.
13406         Note: this change, along with the related changes of the 18th thru
13407         the 20th of April, fix an infinite loop problem in conversions.
13408
13409 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13410
13411         * call.c (build_user_type_conversion_1): Really ignore rvalue
13412         conversions when looking for a REFERENCE_TYPE.
13413
13414         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
13415         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
13416         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
13417         (build_unary_op): Likewise.
13418         * call.c (build_over_call): See through a CONVERT_EXPR around the
13419         ADDR_EXPR for on a temporary.
13420         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
13421         the ADDR_EXPR for a local variable.
13422
13423 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
13424
13425         * call.c (build_user_type_conversion_1): If we're trying to
13426         convert to a REFERENCE_TYPE, only consider lvalue conversions.
13427         (build_new_function_call): Print candidates.
13428         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
13429         (reference_binding): Binding a temporary of a reference-related type
13430         is BAD.
13431
13432 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13433
13434         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
13435         * tinfo2.cc (type_info::before): Likewise.
13436
13437 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
13438
13439         * call.c (implicit_conversion): Oops.
13440
13441 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
13442
13443         * call.c (implicit_conversion): Try to find a reference conversion
13444         before binding a const reference to a temporary.
13445
13446 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
13447
13448         * exception.cc (__default_unexpected): Call terminate by default,
13449         so that if the user overrides terminate, the correct function will
13450         be called.
13451
13452 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
13453
13454         * parse.y (left_curly): Avoid trying to use any fields of
13455         error_mark_node, as there aren't any.
13456
13457 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
13458
13459         * lex.c (do_identifier): Avoid breaking on overloaded methods
13460         as default arguments.
13461
13462 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
13463
13464         * call.c (add_template_candidate): Initialize the variable "dummy".
13465
13466 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
13467
13468         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
13469         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
13470
13471 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13472
13473         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
13474         (debug_binfo): Delete decl, not needed.
13475
13476         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
13477         promotes_to_aggr_type): Delete fns.
13478         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
13479         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
13480         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
13481
13482         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
13483
13484         * friend.c (is_friend_type): Delete fn.
13485         * cp-tree.h (is_friend_type): Delete decl.
13486
13487         * decl.c (original_result_rtx, double_ftype_double,
13488         double_ftype_double_double, int_ftype_int, long_ftype_long,
13489         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
13490         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
13491
13492         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
13493         fwd decls.
13494         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
13495
13496         * decl.c (pushdecl_nonclass_level): #if 0, unused.
13497         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
13498
13499         * lex.c (reinit_lang_specific): #if 0, unused.
13500         * cp-tree.h (reinit_lang_specific): #if 0 decl.
13501
13502         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
13503         * cp-tree.h (revert_static_member_fn): Delete decl.
13504
13505         * class.c (root_lang_context_p): Delete fn.
13506         * cp-tree.h (root_lang_context_p): Delete decl.
13507
13508         * decl.c (set_current_level_tags_transparency): #if 0, unused.
13509         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
13510
13511         * lex.c (set_vardecl_interface_info): Make static.
13512         * cp-tree.h (set_vardecl_interface_info): Delete decl.
13513
13514         * call.c (find_scoped_type): Make static.
13515         * cp-tree.h (find_scoped_type): Delete decl.
13516
13517         * search.c (convert_pointer_to_vbase): Make static.
13518         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
13519
13520         * decl.c (const_ptr_type_node): Likewise.
13521         * cp-tree.h (const_ptr_type_node): Delete decl.
13522
13523         * typeck.c (common_base_type): Make static.
13524         * cp-tree.h (common_base_types): Delete erroneous decl.
13525
13526         * pt.c (classtype_mangled_name): Make static.
13527         * cp-tree.h (classtype_mangled_name): Delete decl.
13528
13529         * lex.c (check_newline): Make static.
13530         * cp-tree.h (check_newline): Delete decl.
13531
13532         * typeck.c (build_x_array_ref): Delete fn, same idea as
13533         grok_array_decl.
13534         * cp-tree.h (build_x_array_ref): Delete decl.
13535
13536         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
13537         copy_lang_decl.
13538         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
13539
13540         * class.c (build_vtable_entry): Make static.
13541         * cp-tree.h (build_vtable_entry): Delete decl.
13542
13543         * class.c (build_vbase_pointer): Make static.
13544         * cp-tree.h (build_vbase_pointer): Delete decl.
13545
13546         * sig.c (build_sptr_ref): Add forward decl and make static.
13547         * cp-tree.h (build_sptr_ref): Delete decl.
13548
13549         * call.c (build_new_method_call): Add forward decl and make static.
13550         * cp-tree.h (build_new_method_call): Delete decl.
13551
13552         * call.c (build_object_call): Make static.
13553         * class.c (check_for_override, complete_type_p, mark_overriders):
13554         Likewise.
13555         * decl.c (cp_function_chain): Likewise.
13556         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
13557         Likewise.
13558         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
13559         Likewise.
13560         * tree.c (build_cplus_array_type_1): Likewise.
13561         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
13562         (comp_target_parms): Likewise.
13563
13564         * init.c (build_builtin_call): Make static.
13565         * cp-tree.h (build_builtin_call): Delete decl.
13566
13567         * typeck.c (binary_op_error): Delete decl.
13568         * cp-tree.h (binary_op_error): Likewise.
13569
13570 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13571
13572         * call.c (build_method_call): Compare against error_mark_node
13573         directly, rather than the ERROR_MARK tree code.
13574         * cvt.c (cp_convert): Likewise.
13575         * decl.c (print_binding_level): Likewise.
13576         (duplicate_decls): Likewise.
13577         (grokdeclarator): Likewise.
13578         (grokdeclarator): Likewise.
13579         * init.c (expand_aggr_init_1): Likewise.
13580         (decl_constant_value): Likewise.
13581         * method.c (build_opfncall): Likewise.
13582         (hack_identifier): Likewise.
13583         * typeck.c (build_modify_expr): Likewise.
13584
13585         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
13586
13587 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13588
13589         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
13590
13591         * pt.c (coerce_template_parms): Add new error message.
13592
13593         * method.c (build_overload_value): Implement name mangling for
13594         floating-point template arguments.
13595
13596         * method.c (build_overload_int, icat, dicat): Fix mangling of template
13597         arguments whose absolute value doesn't fit in a signed word.
13598
13599 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13600
13601         * friend.c: New file; put all of the friend stuff in here.
13602         * init.c: Instead of here.
13603         * Makefile.in (CXX_OBJS): Add friend.o.
13604         (friend.o): Add dependencies.
13605         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
13606
13607 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
13608
13609         * call.c (build_scoped_method_call): Complain if the scope isn't a
13610         base.
13611
13612 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
13613
13614         * parse.y (left_curly): Don't crash on erroneous type.
13615
13616         * init.c (build_delete): Fix type of ref.
13617
13618 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
13619
13620         * search.c (get_vbase_1): Renamed from get_vbase.
13621         (get_vbase): Wrapper, now non-static.
13622         (convert_pointer_to_vbase): Now static.
13623
13624         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
13625         * init.c (build_delete): Pass one.
13626         (build_partial_cleanup_for): Use build_scoped_method_call.
13627         * decl.c (finish_function): Pass a binfo.
13628
13629 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13630
13631         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
13632
13633         * typeck.c (build_c_cast): Lose other reference to flag.
13634
13635         * call.c (build_field_call): Don't look for [cd]tor_identifier.
13636         * decl2.c (delete_sanity): Remove meaningless use of
13637         LOOKUP_HAS_IN_CHARGE.
13638         * decl.c (finish_function): Use build_scoped_method_call instead
13639         of build_delete for running vbase dtors.
13640         * init.c (build_delete): Call overload resolution code instead of
13641         duplicating it badly.
13642
13643 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
13644
13645         * call.c (build_over_call): Call mark_used before trying to elide
13646         the call.
13647
13648         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
13649
13650 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13651
13652         * typeck.c (build_modify_expr): Always pedwarn for a cast to
13653         non-reference used as an lvalue.
13654
13655 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
13656
13657         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
13658
13659 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
13660
13661         * parse.y (handler): Fix template typo.
13662
13663 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13664
13665         * error.c (lang_decl_name): New fn.
13666         * tree.c (lang_printable_name): Use it.
13667
13668 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
13669
13670         * g++spec.c: Include config.h so that we can catch bzero #defines
13671         from the config file.
13672
13673 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
13674
13675         * new1.cc: Include a declaration for malloc, to avoid warning, and
13676         avoid lossing on systems that require one (ones that define malloc
13677         in xm.h).
13678
13679 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13680
13681         * decl2.c (max_tinst_depth): New variable.
13682         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
13683         option.
13684         * pt.c (max_tinst_depth): Variable moved.
13685         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
13686         as legal.
13687
13688 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
13689
13690         * decl.c (xref_basetypes): Allow a base class that depends on
13691         template parms to be incomplete.
13692
13693         * decl2.c (build_expr_from_tree): Support typeid(type).
13694         * rtti.c (get_typeid): Support templates.
13695         (expand_si_desc, expand_class_desc): Fix string length.
13696         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
13697
13698 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
13699
13700         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
13701
13702         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
13703
13704 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13705
13706         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
13707         smashes together template and non-template decls of the same
13708         signature.
13709
13710 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
13711
13712         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
13713
13714 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13715
13716         * decl.c (duplicate_decls): Next route, pedwarn about different
13717         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
13718
13719 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13720
13721         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
13722         (struct lang_type): Delete has_default_implementation member.
13723         Increase dummy to 21.
13724         * decl.c (start_method): Delete usage.
13725
13726         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
13727         store_after_parms, start_decl_1, auto_function): Add decls.
13728         (get_arglist_len_in_bytes, declare_implicit_exception,
13729         have_exceptions_p, make_type_decl, typedecl_for_tag,
13730         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
13731         build_component_type_expr, cplus_exception_name,
13732         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
13733         * call.c (build_this): Make static.
13734         (is_complete): Likewise.
13735         (implicit_conversion): Likewise.
13736         (reference_binding): Likewise.
13737         (standard_conversion): Likewise.
13738         (strip_top_quals): Likewise.
13739         (non_reference): Likewise.
13740         (build_conv): Likewise.
13741         (user_harshness): Likewise.
13742         (rank_for_ideal): Likewise.
13743         * decl.c (start_decl_1): Delete forward decl.
13744         (push_decl_level): Make static.
13745         (resume_binding_level): Make static.
13746         (namespace_bindings_p): Make static.
13747         (declare_namespace_level): Make static.
13748         (lookup_name_real): Make static.
13749         (duplicate_decls): Make static.  Take register off NEWDECL and
13750         OLDDECL parm decls.
13751         * decl2.c (get_sentry): Make static.
13752         (temp_name_p): Delete fn.
13753         * except.c (auto_function): Delete decl.
13754         * lex.c (handle_{cp,sysv}_pragma): Make static.
13755         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
13756         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
13757         * pt.c (tsubst_expr_values): Make static.
13758         * rtti.c (combine_strings): Delete decl.
13759
13760 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
13761
13762         * pt.c (push_template_decl): Handle getting a typedef.
13763
13764         * call.c (build_new_function_call): Complain about void arg.
13765
13766 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13767
13768         * decl.c (duplicate_decls): Give pedwarn of different exceptions
13769         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
13770
13771 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
13772
13773         * except.c (expand_throw): Don't expand the cleanup tree here,
13774         since we are not going to write the rtl out.  Fixes problem with
13775         -g -O on SPARC.
13776
13777 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
13778
13779         * Make-lang.in: Add $(exeext) as necessary.
13780
13781 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
13782
13783         * parse.y (handler_seq): Must have at least one catch clause.
13784
13785 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
13786
13787         * call.c (add_builtin_candidate): Restore ?: hack.
13788
13789         * decl.c (grok_op_properties): More warnings.
13790
13791 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13792
13793         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
13794         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
13795
13796         * decl.c (duplicate_decls): Scale back to a warning, and only do
13797         'em if -pedantic.
13798
13799 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
13800
13801         * decl.c (duplicate_decls): pedwarn mismatched exception
13802         specifications.
13803
13804 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
13805
13806         * call.c (build_new_method_call): Don't display the invisible
13807         argument for controlling virtual bases.
13808
13809 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
13810
13811         * new: Add nothrow new and delete, bad_alloc and throw specifications
13812         for delete.
13813         * decl.c (init_decl_processing): Add throw specification for delete.
13814         * new.cc (nothrow): Define.
13815         * lex.c (real_yylex): Removing warning that throw and friends are
13816         keywords.
13817         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
13818         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
13819         * Make-lang.in: Add new{1,2}.{cc,o}.
13820
13821 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
13822
13823         * lex.c (cons_up_default_function): Fix return type of synth op=.
13824
13825         * init.c (emit_base_init): Add warnings for uninitialized members
13826         and bases.
13827
13828         * decl.c (xref_basetypes): Add warning for non-polymorphic type
13829         with destructor used as base type.
13830
13831         * decl.c (grok_op_properties): Add warning for op= returning void.
13832         * typeck.c (c_expand_return): Add warning for op= returning anything
13833         other than *this.
13834
13835         * class.c (finish_struct_1): Add warning for class with pointers
13836         but not copy ctor or copy op=.
13837
13838         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
13839         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
13840         (instantiate_template): If -fexternal-templates, add this
13841         instantiation to pending_templates.
13842
13843         * decl2.c (copy_assignment_arg_p): Disable old hack to support
13844         Booch components.
13845
13846 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
13847
13848         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
13849
13850 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
13851
13852         * call.c (standard_conversion): Handle getting references.  Tack
13853         on RVALUE_CONV here.  Do it for non-class types, too.
13854         (reference_binding): Pass references to standard_conversion.
13855         (implicit_conversion): Likewise.
13856         (add_builtin_candidate): Disable one ?: kludge.
13857         (convert_like): Handle RVALUE_CONVs for non-class types.
13858         (joust): Disable the other ?: kludge.
13859
13860 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13861
13862         * decl.c (init_decl_processing): Add code to build up common
13863         function types beforehand, to avoid creation then removal of
13864         things already in the hash table.
13865
13866 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
13867
13868         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
13869         the arguments.
13870
13871         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
13872         current_template_parms.
13873
13874 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
13875
13876         * search.c (lookup_field): Don't return a function, check want_type.
13877
13878 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13879
13880         * init.c (build_new): Make sure PLACEMENT has a type.
13881
13882 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13883
13884         * init.c (build_new): Support new (nothrow).
13885
13886 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13887
13888         * pt.c (instantiate_decl): Also do push_to_top_level before setting
13889         up DECL_INITIAL.
13890
13891         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
13892         * pt.c (tsubst): Defer instantiation of default args.
13893         * call.c (build_over_call): Until here.
13894
13895 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13896
13897         * search.c (lookup_field): Make sure we have an
13898         IDENTIFIER_CLASS_VALUE before we try to return it.
13899
13900 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13901
13902         * call.c (build_method_call): Delete unused var PARM.
13903         (build_overload_call_real): Likewise.
13904         (build_object_call): Delete unused var P.
13905         (build_new_op): Likewise.
13906         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
13907         var definitions, which are never used.
13908         (shadow_tag): Delete unused var FN.
13909         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
13910         * init.c (build_new): Delete unused var ALLOC_TEMP.
13911         * method.c (hack_identifier): Delete unused var CONTEXT.
13912         (do_build_copy_constructor): Delete unused var NAME.
13913         (synthesize_method): Delete unused var BASE.
13914         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
13915         * rtti.c (build_headof): Delete unused var VPTR.
13916         (get_typeid): Delete unused var T.
13917         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
13918         and ORIG_OP2.
13919         (build_ptrmemfunc): Delete unused vars U and NINDEX.
13920         * typeck2.c (build_functional_cast): Delete unused var BINFO.
13921
13922 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
13923
13924         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
13925         things in a type being defined.
13926         * decl.c (finish_enum): Reverse the values so that they are in
13927         the correct order.
13928
13929         * pt.c (instantiate_class_template): Don't initialize
13930         BINFO_BASETYPES until the vector is filled out.
13931         (unify): Don't abort on conflicting bindings, just fail.
13932         (instantiate_decl): Do push_tinst_level before any tsubsting.
13933
13934         * method.c (build_overload_value): Handle getting a
13935         TEMPLATE_CONST_PARM for a pointer.
13936
13937 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
13938
13939         * init.c (expand_member_init): Don't give 'not a base' error for
13940         templates.
13941
13942         * pt.c (instantiate_decl): Call import_export_decl later.
13943
13944         * pt.c (instantiate_class_template): Return a value.
13945
13946         * parse.y (extension): New rule for __extension__.
13947         (extdef, unary_expr, decl, component_decl): Use it.
13948
13949 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
13950
13951         * class.c (base_binfo): Remove unused base_has_virtual member.
13952         (finish_base_struct): Likewise.
13953         (finish_struct_1): Likewise.
13954
13955 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
13956
13957         * search.c (expand_upcast_fixups): Fix bogus code generation
13958         problem where the generated code uses the wrong index into the
13959         runtime built vtable on the stack.  Old code could clobber random
13960         stack values.
13961
13962 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
13963
13964         * init.c (perform_member_init): Make sure the partial EH cleanups
13965         live on the function_obstack.
13966
13967 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
13968
13969         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
13970         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
13971
13972 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
13973
13974         * decl.c (grokvardecl): Avoid ANSI style initialization.
13975
13976 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
13977
13978         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
13979
13980 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
13981
13982         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
13983
13984 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13985
13986         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
13987         arguments we compare against.  Start the count of I at 1, not 0,
13988         since argv[0] is still the command.
13989
13990 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
13991
13992         * lang-specs.h: Accept .cp as an C++ extension.
13993
13994 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13995
13996         * cp-tree.h (ptr_reasonably_similar): Add decl.
13997
13998 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13999
14000         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
14001         pointer.  New local SPECBITS with the parm's value.
14002         (grokdeclarator): Pass &specbits down.
14003
14004         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
14005         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
14006
14007         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
14008         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
14009
14010         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
14011         not an error_mark_node.
14012
14013 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
14014
14015         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
14016         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
14017
14018 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
14019
14020         * decl.c (grokdeclarator): When giving an anonymous struct a name,
14021         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
14022         not affected).
14023
14024         * typeck2.c (build_m_component_ref): If component is a pointer
14025         to data member, resolve the OFFSET_REF now.
14026
14027         * call.c (convert_like): Don't go into infinite recursion.
14028
14029         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
14030
14031         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
14032         * tree.c (layout_basetypes): And on the vbase ptr.
14033
14034 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
14035
14036         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
14037         CHAR_TYPE_SIZE so bool is always the same size as another type.
14038
14039         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
14040
14041 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
14042
14043         * decl2.c (grok_x_components): Remove synthesized methods from
14044         TYPE_METHODS of an anonymous union, complain about member
14045         functions.
14046         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
14047         anonymous unions.
14048         (finish_function): Just clear the DECL_RTL of our arguments.
14049
14050 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14051
14052         * decl2.c (finish_file): Emit DWARF debugging info for static data
14053         members.
14054
14055         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
14056
14057 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
14058
14059         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
14060         IDENTIFIER_NODE.
14061
14062 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
14063
14064         * Make-lang.in (g++-cross$(exeext)): Fix typo.
14065
14066 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14067
14068         Make the g++ driver now be a standalone program, rather than one
14069         that tries to run the gcc driver after munging up the options.
14070         * Make-lang.in (g++.c, g++spec.o): New rules.
14071         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
14072         added.
14073         (g++$(exeext)): New rule, based on xgcc rule.
14074         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
14075         * g++spec.c: New file.
14076         * g++.c: Removed file.
14077
14078 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
14079
14080         * cvt.c (build_up_reference): Arrange for any temporary values
14081         that have been keep in registers until now to be put into memory.
14082
14083 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14084
14085         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
14086         that make -j3 bootstrap works better.
14087
14088 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
14089
14090         * decl.c (pushtag): Do pushdecl for anon tags.
14091
14092 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
14093
14094         * typeck.c (c_expand_return): Fix logic.
14095         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
14096
14097 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
14098
14099         * g++.c (main): Make sure arglist has a final NULL entry.  Add
14100         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
14101         stdin/stdout of the invoked program are redirected to
14102         nowheresville.
14103
14104 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
14105
14106         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
14107
14108 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
14109
14110         * init.c (resolve_offset_ref): Handle obj.vfn better.
14111         * typeck.c (build_component_ref): Set TREE_TYPE on result from
14112         build_vfn_ref.
14113
14114 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
14115
14116         * typeck.c (convert_for_assignment): Also handle anachronistic
14117         implicit conversions from (::*)() to cv void*.
14118         * cvt.c (cp_convert_to_pointer): Likewise.
14119
14120 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
14121
14122         * lex.c (handle_cp_pragma): Fix bogus warning.
14123
14124 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
14125
14126         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
14127         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
14128
14129 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14130
14131         * class.c (finish_struct_1): Support DWARF2_DEBUG.
14132         * search.c (dfs_debug_mark): Likewise.
14133         * decl2.c (finish_vtable_vardecl): Likewise.
14134         * decl.c (pushtag, finish_enum): Likewise.
14135         * lex.c (check_newline): Use debug_* instead of calling *out
14136         functions directly.
14137
14138 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14139
14140         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
14141         on some picky hosts.
14142
14143 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
14144
14145         * class.c (finish_struct_1): A class has a non-trivial copy
14146         constructor if it has virtual functions.
14147
14148         * cvt.c (cp_convert): Always call a constructor.
14149
14150         * call.c (reference_binding): Still tack on a REF_BIND
14151         for bad conversions.
14152         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
14153
14154         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
14155         (c_expand_return): Likewise.
14156         * typeck2.c (digest_init): Likewise for { }.
14157         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
14158         * cvt.c (cp_convert): Handle failure better.
14159
14160 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14161
14162         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
14163         of GCC be path-relative.
14164
14165 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
14166
14167         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
14168         it does need choose-temp.o and pexecute.o.
14169
14170 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14171
14172         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
14173         that we still use it.
14174         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
14175
14176 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
14177
14178         * init.c (expand_default_init): Avoid calling constructors to
14179         initialize reference temps.
14180
14181         * cvt.c (convert_to_reference): Fix.
14182
14183 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
14184
14185         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
14186         (convert_to_reference): Likewise.
14187         * typeck.c (convert_for_initialization): Likewise.
14188         * init.c (expand_default_init): Likewise.
14189         (expand_aggr_init_1): Likewise.
14190         * cp-tree.h (CONV_NONCONVERTING): Lose.
14191         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
14192         * *.c: Adjust.
14193         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
14194
14195 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
14196
14197         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
14198
14199 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14200
14201         * init.c (expand_aggr_init_1): Don't crash on non-constructor
14202         TARGET_EXPR.
14203
14204 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14205
14206         * g++.c: Include gansidecl.h.
14207         (VPROTO, PVPROTO, VA_START): Delete.
14208         (choose_temp_base_try, choose_temp_base, perror_exec,
14209         run_dos) [__MSDOS__]: Delete fns.
14210         (pfatal_with_name): Delete fn.
14211         (temp_filename): Declare like in gcc.c.
14212         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
14213         (error_count, signal_count): Define.
14214         (error): Delete both definitions.
14215         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
14216         (pfatal_pexecute): Add fn from gcc.c.
14217         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
14218         code to use the pexecute stuff also used by gcc.c.
14219         (MIN_FATAL_STATUS): Define.
14220         * Make-lang.in (g++): Add dependency on and linking with
14221         choose-temp.o and pexecute.o.
14222
14223         * cp-tree.h: Include gansidecl.h.
14224         (STDIO_PROTO): Delete #undef/#define.
14225         * cvt.c (NULL): Delete #undef/#define.
14226         * expr.c (NULL): Likewise.
14227         * init.c (NULL): Likewise.
14228         * rtti.c (NULL): Likewise.
14229         * xref.c (NULL): Likewise.
14230
14231         * cp-tree.h (build_user_type_conversion): Add prototype.
14232         * call.c (build_user_type_conversion): Delete prototype.  Correct
14233         decl of FLAGS arg to be an int.
14234         * cvt.c (build_user_type_conversion): Likewise.
14235
14236 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
14237
14238         * cp-tree.def: Add TRY_BLOCK and HANDLER.
14239         * except.c (expand_start_catch_block): Support templates.
14240         * parse.y (try_block, handler_seq): Likewise.
14241         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
14242
14243 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
14244
14245         * pt.c (current_template_args): New fn.
14246         (push_template_decl): Use it.
14247         * decl.c (grokdeclarator): Use it.
14248
14249         * decl2.c (build_expr_from_tree): Dereference ref vars.
14250
14251         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
14252         the decl-specifier-seq.
14253
14254         * decl.c (grok_op_properties): Don't force the type of a conversion
14255         op to be complete.  Don't warn about converting to the same type
14256         for template instantiations.
14257
14258         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
14259         methods.
14260
14261 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
14262
14263         * typeck.c (get_delta_difference): Remove previous bogusness.
14264         Don't give errors if force is set.
14265
14266 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
14267
14268         * decl2.c (finish_file): Don't emit debug info.
14269         * decl.c (pushdecl): Lose obsolete code.
14270         (grokdeclarator): Still do the long long thing after complaining.
14271         * search.c (note_debug_info_needed): Don't do anything if we're in a
14272         template.
14273         * method.c (synthesize_method): For non-local classes,
14274         push_to_top_level first.
14275
14276 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
14277
14278         * typeck.c (get_delta_difference): Add no_error parameter.
14279         (build_ptrmemfunc): Call get_delta_difference with no_error set;
14280         we don't want error messages when converting unrelated
14281         pointer-to-member functions.
14282
14283 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
14284
14285         * error.c (dump_expr): Improve the wording on error messages that
14286         involve pointer to member functions.
14287
14288 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
14289
14290         * cvt.c (cp_convert_to_pointer): Move code for conversions from
14291         (::*)() to void* or (*)() up a bit, so that we can convert from
14292         METHOD_TYPEs as well.
14293
14294 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14295
14296         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
14297         There are no 'member' types.
14298         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
14299         (build_x_typeid): Handle errors.
14300
14301 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
14302
14303         * typeck.c (convert_for_assignment): Handle anachronistic implicit
14304         conversions from (::*)() to void* or (*)().
14305         * cvt.c (cp_convert_to_pointer): Likewise.
14306         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
14307         conversions from here.
14308         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
14309         * lang-options.h: Likewise.
14310         * decl2.c (warn_pmf2ptr): Define.
14311         * cp-tree.h: Declare it.
14312         * typeck2.c (digest_init): Allow pmfs down into
14313         convert_for_initialization.
14314
14315 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
14316
14317         * typeck.c (c_expand_return): Fix for returning overloaded fn.
14318
14319 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14320
14321         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
14322         * decl.c (grok_reference_init): Pass DIRECT_BIND.
14323         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
14324         DIRECT_BIND.
14325         * call.c (convert_like): Don't pass INDIRECT_BIND.
14326         * typeck.c (convert_arguments): Likewise.
14327         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
14328
14329 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
14330
14331         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
14332         similar code in build_up_ref.
14333         * cvt.c (build_up_reference): Drastically simplify.
14334
14335 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
14336
14337         * typeck.c (signed_or_unsigned_type): If the given type already
14338         as the correct signedness, then just return it.
14339
14340         * typeck.c ({un,}signed_type): If can't do anything, call
14341         signed_or_unsigned_type.
14342
14343 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
14344
14345         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
14346         current_class_type is NULL.
14347
14348 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
14349
14350         * class.c (finish_struct_1): Avoid empty structs by adding a field
14351         so layout_type gets the mode right.
14352
14353         * typeck.c (c_expand_return): Drastically simplify.
14354
14355 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
14356
14357         * typeck.c (decay_conversion): Handle overloaded methods.
14358
14359 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
14360
14361         * call.c (build_over_call): A TARGET_EXPR has side-effects.
14362
14363 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
14364
14365         * cvt.c (convert_to_pointer_force): Add code to support pointer to
14366         member function to pointer to function conversions.
14367         * init.c (resolve_offset_ref): Add code to allow faked up objects,
14368         ignoring them if they are not used, and giving an error, if they
14369         are needed.
14370         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
14371         code, and so that we can give an error, if we needed an object,
14372         and one was not provided.
14373         (build_c_cast): Don't call default_conversion when we want to
14374         convert to pointer to function from a METHOD_TYPE.
14375
14376 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
14377
14378         * Make-lang.in (cplib2.ready): Fix logic.
14379
14380         * decl.c (shadow_tag): Only complain about non-artificial function
14381         members.
14382
14383         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
14384
14385 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
14386
14387         * expr.c (cplus_expand_expr): Pre-tweak call_target like
14388         expand_inline_function would.
14389
14390         * pt.c (mark_decl_instantiated): If extern_p, call
14391         mark_inline_for_output.
14392
14393 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
14394
14395         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
14396         pmd conversions.
14397
14398         * typeck.c (get_delta_difference): Fix wording, as we can be used
14399         for pointer to data members.
14400
14401 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
14402
14403         * pt.c (tsubst): If the function decl isn't a member of this
14404         template, return a copy of the decl (including copying the
14405         lang-specific part) so we don't hose ourselves later.
14406
14407 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
14408
14409         * class.c (finish_struct): Remove DWARF-specific tag handling.
14410         * decl.c (pushtag): Likewise.
14411         (finish_function): Always clear DECL_ARGUMENTS on function decls with
14412         no saved RTX.
14413         * decl2.c (finish_file): Emit DWARF debugging info for static data
14414         members.
14415
14416 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
14417
14418         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
14419         isn't the same as the new one before we whack it.
14420
14421 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
14422
14423         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
14424         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
14425         warn_traditional and warn_strict_prototypes; remove ancient
14426         'overload' code; remove references to flag_traditional.
14427
14428 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
14429
14430         * input.c (sub_getch): Handle 8-bit characters in string literals.
14431
14432 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
14433
14434         * tree.c (mapcar): Handle CONSTRUCTORs.
14435         (copy_to_permanent): Handle expression_obstack properly.
14436
14437         * Make-lang.in (cplib2.txt): Also depend on the headers.
14438
14439         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
14440         INT_TYPE_SIZE.
14441         (expand_class_desc): Use USItype for offset field.
14442         * tinfo.h (struct __class_type_info): Likewise.
14443
14444         * method.c (build_overload_int): TYPE_PRECISION should be applied
14445         to types.
14446
14447 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
14448
14449         * call.c (build_new_op): A COND_EXPR involving void must be a
14450         builtin.
14451
14452 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
14453
14454         * typeck.c (build_x_component_ref): New fn.
14455         (build_object_ref): Use it.
14456         * parse.y (primary): Use it.
14457         * decl2.c (build_expr_from_tree): Use it.
14458         * cp-tree.h: Declare it.
14459
14460         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
14461         * error.c (dump_type_suffix): Handle variable arrays.
14462
14463 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14464
14465         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
14466
14467 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
14468
14469         * decl.c (lookup_name_real): Don't try to look up anything in a
14470         TYPENAME_TYPE.
14471
14472         * tinfo2.cc (__throw_type_match_rtti): Oops.
14473
14474 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14475
14476         * Make-lang.in (exception.o): Use -fno-PIC for now.
14477
14478 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
14479
14480         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
14481         calling them.
14482         (get_tinfo_fn_dynamic): Extracted from build_typeid.
14483         * tinfo2.cc (__dynamic_cast): Adjust.
14484
14485         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
14486         (build_x_typeid): Likewise.
14487
14488         * parse.y: Call build_x_typeid instead of build_typeid.
14489         * cp-tree.def: Add TYPEID_EXPR.
14490         * pt.c (tsubst_copy): Handle typeid.
14491         * decl2.c (build_expr_from_tree): Likewise.
14492         * rtti.c (build_x_typeid): Throw bad_typeid from here.
14493         (build_typeid): Not here.
14494         * cp-tree.h: Declare build_x_typeid.
14495
14496 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
14497
14498         * call.c (convert_like): Pull out constant values.
14499
14500         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
14501
14502 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
14503
14504         * decl.c (init_decl_processing): Create short int types before
14505         creating size_t in case a machine description needs to use
14506         unsigned short for size_t.
14507
14508 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
14509
14510         * Make-lang.in (exception.o): Turn off pic.
14511
14512         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
14513         type, multi-level ptr conversions.
14514
14515         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
14516         (throw_bad_cast): Use it.
14517         (throw_bad_typeid): New fn.
14518         (build_typeid): Throw bad_typeid as needed.
14519         Use build_call.
14520         (synthesize_tinfo_fn): Handle functions and arrays before checking
14521         for cv-quals.
14522
14523         * Remove .h from standard C++ headers, add new.h, move into inc
14524         subdirectory.
14525
14526         * exception*: Remove pointer from object, constructors.  Add
14527         default exception::what that uses type_info::name.  Add
14528         __throw_bad_typeid.
14529
14530         * init.c (build_new): Don't add a cookie to new (void *) T[2].
14531
14532 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
14533
14534         * Make-lang.in: Building C++ code depends on cc1plus.
14535
14536 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14537
14538         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
14539         a HOST_WIDE_INT, not a tree.
14540
14541 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
14542
14543         * exception.cc: Don't include <stdlib.h>.
14544
14545         * Make-lang.in (c++.clean): Remove cplib2.*.
14546
14547 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
14548
14549         * parse.y (component_decl_1, component_costructor_declarator case):
14550         Pass attributes/prefix_attributes in tree list.
14551
14552 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
14553
14554         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
14555
14556 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
14557
14558         * lex.c (do_identifier): Don't do deferred lookup in a template
14559         header.
14560
14561         * typeck2.c (store_init_value): Oops.
14562
14563         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
14564         New files for C++ lang-support library.
14565         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
14566         (CXX_LIB2FUNCS): Define.
14567         And rules for building the C++ lang-support code.
14568         * config-lang.in (headers): Define.
14569         (lib2funcs): Define.
14570
14571 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
14572
14573         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
14574         digest_init.
14575         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
14576         * typeck2.c (store_init_value): Check for initializing pmf with { }
14577         here.
14578         (process_init_constructor): Not here.
14579
14580 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
14581
14582         * pt.c (begin_template_parm_list): Increment
14583         processing_template_decl here.
14584         (end_template_parm_list): Not here.
14585         (process_template_parm): No need to add 1 to it now.
14586         * *.c: Use processing_template_decl instead of current_template_parms
14587         to check for being in a template.
14588
14589         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
14590         (tsubst_copy): Handle CONSTRUCTOR.
14591         (instantiate_decl): Set up context properly for variables.
14592         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
14593         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
14594
14595 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14596
14597         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
14598
14599 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
14600
14601         * method.c (make_thunk): Call comdat_linkage before setting the
14602         TREE_CODE.
14603
14604         * decl2.c (comdat_linkage): Use make_decl_one_only.
14605         (import_export_decl): Likewise.
14606         * decl.c (init_decl_processing): Check supports_one_only instead of
14607         SUPPORTS_WEAK.
14608
14609 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
14610
14611         * decl2.c (grokfield): Tighten checking for access decls.
14612
14613         * decl.c (make_typename_type): Resolve references to
14614         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
14615         (lookup_name_real): Types that depend on a template parameter get
14616         an implicit 'typename' unless they're in the current scope.
14617         (start_decl_1): We don't care about incomplete types that depend
14618         on a template parm.
14619         (grokdeclarator): Resolve 'typename's in the type specifier that
14620         refer to members of the current scope.
14621
14622         * call.c (build_over_call): Remove 'inline called before
14623         definition' diagnostic.
14624         (build_method_call): Likewise.
14625         * decl.c (duplicate_decls): Downgrade 'used before declared
14626         inline' to a warning, only with -Winline.
14627
14628 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
14629
14630         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
14631
14632 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
14633
14634         * call.c (build_method_call): When calling a signature
14635         default implementation, as in other cases, let instance_ptr simply
14636         be instance.
14637
14638 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
14639
14640         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
14641
14642 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
14643
14644         * except.c (expand_start_catch_block): Add a pushlevel so that -g
14645         works on hppa and SPARC.
14646
14647 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14648
14649         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
14650
14651 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
14652
14653         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
14654         before testing whether it's a signature.
14655
14656 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
14657
14658         * call.c (build_new_method_call): Don't complain about signature
14659         pointers and references not being an aggr type.
14660         (build_this): If a signature pointer or reference was passed in,
14661         just return it.
14662         (build_new_method_call): If instance is a signature pointer, set
14663         basetype to the signature type of instance.
14664         * sig.c (build_signature_method_call): Deleted basetype and
14665         instance parameters, they can be found as the DECL_CONTEXT of
14666         function and as the first argument passed in.
14667         * cp-tree.h: Changed declaration of build_signature_method_call.
14668         * call.c (build_method_call): Deleted first two arguments in call
14669         of build_signature_method_call.
14670         (build_over_call): Added call to build_signature_method_call.
14671
14672 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
14673
14674         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
14675         target_expr.
14676
14677 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14678
14679         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
14680
14681 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
14682
14683         * except.c (expand_start_try_stmts): Move to except.c in the backend.
14684         (expand_end_try_stmts): Remove.
14685
14686         * init.c (perform_member_init): Use add_partial_entry () instead
14687         of directly manipulating lists.
14688         (emit_base_init): Likewise.
14689
14690 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
14691
14692         * except.c (expand_exception_blocks): Always make sure USE and
14693         CLOBBER insns that came at the end still do, the backend relies
14694         upon this.
14695
14696 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
14697
14698         * call.c (build_over_call): We can only use a TARGET_EXPR of the
14699         right type.
14700
14701 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
14702
14703         * cvt.c (convert_to_reference): Revert last change, don't complain
14704         about temp without target decl.
14705
14706 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
14707
14708         * decl.c (grokdeclarator): Don't core dump when void() is given.
14709
14710 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
14711
14712         * decl.c (copy_args_p): Don't crash.
14713
14714 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
14715
14716         * pt.c (tsubst): And support template args inside the exception
14717         specification.
14718
14719         * pt.c (tsubst): Add support for exception specifications in
14720         template functions.
14721
14722 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
14723
14724         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
14725         fields now.
14726         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
14727         (start_function): Likewise.
14728         (start_method): Likewise.
14729         (grokfield): Likewise.
14730         (make_call_declarator): Add throw spec parameter.
14731         (set_quals_and_spec): Add routine.
14732         * lex.c (set_quals_and_spec): Likewise.
14733         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
14734         * decl.c (shadow_tag): Eliminate the throw spec parameter to
14735         grokdeclarator.
14736         (groktypename): Likewise.
14737         (start_decl): Eliminate the throw spec parameter.  Eliminate the
14738         throw spec parameter to grokdeclarator.  Eliminate the throw spec
14739         field in DECL_STMT.
14740         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
14741         (grokfndecl): Remove useless set of raises.
14742         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
14743         the throw spec parameter to start_decl.  Pull the throw spec out
14744         of the call declarator.
14745         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
14746         (start_function): Eliminate the throw spec parameter.  Eliminate
14747         the throw spec parameter to grokdeclarator.
14748         (start_method): Likewise.
14749         * decl2.c (grokfield): Likewise.
14750         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
14751         (grokoptypename): Likewise.
14752         (finish_file): Eliminate the throw spec parameter to
14753         start_function.  Add throw spec to make_call_declarator.
14754         * except.c (init_exception_processing): Add throw spec to
14755         make_call_declarator.  Eliminate the throw spec parameter to
14756         start_decl.
14757         (expand_start_catch_block): Eliminate the throw spec parameter to
14758         grokdeclarator.
14759         (expand_builtin_throw): Add throw spec to make_call_declarator.
14760         Eliminate the throw spec parameter to start_function.
14761         (start_anon_func): Likewise.
14762         * lex.c (make_call_declarator): Add throw spec parameter.
14763         (set_quals_and_spec): New routine.
14764         (cons_up_default_function): Add throw spec to make_call_declarator.
14765         Eliminate the throw spec parameter to grokfield.
14766         * method.c (synthesize_method): Eliminate the throw spec parameter
14767         to start_function.
14768         * pt.c (process_template_parm): Eliminate the throw spec parameter
14769         to grokdeclarator.
14770         (tsubst): Add throw spec to make_call_declarator.
14771         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
14772         (do_function_instantiation): Eliminate the throw spec parameter to
14773         grokdeclarator.  Eliminate the throw spec parameter to
14774         start_function.
14775         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
14776         to start_function.
14777         * parse.y (datadef): Remove non-winning optimization.
14778         (decl): Likewise.
14779         (fndef): Remove ambiguous error productions uncovered by grammar
14780         fixing.
14781         (constructor_declarator): Add exception_specification_opt here.
14782         (component_constructor_declarator): Likewise.
14783         (direct_after_type_declarator): Likewise.
14784         (complex_direct_notype_declarator): Likewise.
14785         (direct_abstract_declarator): Likewise.
14786         (fn.def1): Remove exception_specification_opt.
14787         (fn.def2): Likewise.
14788         (condition): Likewise.
14789         (initdcl0): Likewise.
14790         (initdcl): Likewise.
14791         (notype_initdcl0): Likewise.
14792         (nomods_initdcl0): Likewise.
14793         (component_decl_1): Likewise.
14794         (component_declarator): Likewise.
14795         (after_type_component_declarator0): Likewise.
14796         (after_type_component_declarator): Likewise.
14797         (notype_component_declarator): Likewise.
14798
14799 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
14800
14801         * call.c (build_over_call): Also use an INIT_EXPR when
14802         initializing anything from an rvalue.
14803
14804         * call.c (build_over_call): Call stabilize_reference when building
14805         an INIT_EXPR instead of calling the copy ctor.
14806
14807         * call.c (joust): Extend the previous change to all comparisons.
14808
14809         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
14810         NO_LINKAGE_HEURISTICS.
14811
14812         * decl2.c (finish_file): Emit any statics that weren't already.
14813
14814         * typeck.c (build_static_cast): Implement.
14815         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
14816         * decl.c (grokparms): Use can_convert_arg instead of
14817         implicit_conversion directly.
14818         (copy_args_p): New fn.
14819         * cvt.c (convert_to_reference): Don't complain about temp with
14820         static_cast.
14821         (build_up_reference): Handle TARGET_EXPRs.
14822         * call.c (build_over_call): Elide unnecessary temps.
14823         (can_convert*): Use new overloading code.
14824
14825 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
14826
14827         * call.c: Move TYPE_PTR*_MACROS ...
14828         * cp-tree.h: To here.
14829         * typeck.c (build_reinterpret_cast): Implement.
14830
14831         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
14832         ptr_complete_ob.
14833         (joust): If we're comparing a function to a builtin and the worst
14834         conversion for the builtin is worse than the worst conversion for the
14835         function, take the function.
14836
14837         * typeck.c (build_const_cast): Implement.
14838         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
14839         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
14840
14841 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
14842
14843         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
14844         too early.  Make sure we explode if exprtype turns out to be a
14845         NULL_TREE when it shouldn't be.
14846
14847 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
14848
14849         * cp-tree.h: New routine make_call_declarator.
14850         * lex.c (make_call_declarator): Define it.
14851         * except.c (init_exception_processing): Use it.
14852         (expand_builtin_throw): Likewise.
14853         (start_anon_func): Likewise.
14854         * decl2.c (finish_file): Likewise.
14855         * lex.c (cons_up_default_function): Likewise.
14856         * parse.y: Likewise.
14857         * pt.c (tsubst): Likewise.
14858
14859 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
14860
14861         * decl2.c (groktypefield): Remove unused code.
14862
14863 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
14864
14865         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
14866         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
14867         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
14868         nonempty_cv_qualifiers.
14869         * hash.h: Rebuild.
14870
14871         * lex.c (make_pointer_declarator): Change type_quals into
14872         cv_qualifiers.
14873         (make_reference_declarator): Likewise.
14874
14875 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
14876
14877         * decl.c (start_function): Only check interface_* for templates
14878         with flag_alt_external_templates.
14879
14880         * call.c (build_new_op): Check for comparison of different enum types.
14881         (build_over_call): Fix arg # output.
14882
14883         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
14884
14885 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
14886
14887         * call.c (build_new_op): Check for erroneous args.
14888
14889         * call.c (build_new_method_call): Add missing args to cp_error.
14890
14891         * tree.c (error_type): Don't print reference-to-array.
14892
14893         * typeck.c (convert_for_assignment): Don't say contravariance for
14894         removing const.
14895
14896 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
14897
14898         * call.c (build_over_call): Diagnose bad convs for `this'.
14899
14900         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
14901         on _ctor_arg.
14902
14903         * call.c (convert_like): Handle bad convs.
14904         (build_over_call): Handle bad convs better.
14905
14906         * decl2.c: -fansi-overloading is now the default.
14907
14908         * call.c (build_new_method_call): Check for erroneous args.
14909
14910         * pt.c (instantiate_class_template): Propagate
14911         TYPE_USES_MULTIPLE_INHERITANCE.
14912
14913 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
14914
14915         * call.c (enforce_access): Add static to routine.
14916
14917 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
14918
14919         * call.c (build_user_type_conversion_1): Fix bad handling.
14920         (compare_ics): Likewise.
14921
14922 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
14923
14924         * call.c (standard_conversion): Oops.
14925
14926 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
14927
14928         * g++.c: Update test for win32 (&& ! cygwin32).
14929
14930 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
14931
14932         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
14933         (ptr_reasonably_similar): New fn.
14934         * call.c (BAD_RANK): New rank.
14935         (ICS_BAD_FLAG): New macro.
14936         (standard_conversion): Handle almost-right pointer conversions.
14937         (reference_binding): Handle bad rvalue bindings.
14938         (add_*_candidate): Stuff.
14939         (build_over_call): Pass bad conversions to convert_for_initialization.
14940         (compare_ics): Handle bad convs.
14941         (joust): Likewise.
14942
14943 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
14944
14945         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
14946         integer_type_node when computing pointer offsets.
14947
14948 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
14949
14950         * tree.c (lvalue_type): New fn.
14951         (error_type): New fn.
14952         * call.c (op_error): Use error_type.
14953         (add_conv_candidate): Use lvalue_type.
14954         (add_builtin_candidates): Likewise.
14955         * error.c (args_as_string): Use error_type.
14956
14957 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
14958
14959         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
14960         (tsubst): Not here.
14961
14962         * decl.c (init_decl_processing): With -ansi, __null's type is the
14963         signed integral type with the same number of bits as a pointer.
14964         Introduce a new variable null_node for it.
14965         * cp-tree.h: Adjust.
14966         * call.c (null_ptr_cst_p): Adjust.
14967
14968 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
14969
14970         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
14971         optimize.
14972
14973 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
14974
14975         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
14976         fns of classes without virtual functions.
14977
14978         * call.c (add_function_candidate): Handle `this' specially.
14979         (compare_ics): Likewise.
14980
14981 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
14982
14983         * typeck.c (build_conditional_expr): Fix handling of __null.
14984
14985         * decl2.c (comdat_linkage): New fn.
14986         (import_export_vtable): Use it.
14987         (import_export_decl): Use it.
14988         * method.c (make_thunk): Use it.
14989
14990 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
14991
14992         * pt.c (end_template_decl): If we don't actually have parms, return.
14993         * parse.y (template_header): Accept 'template <>'.
14994
14995         * errfn.c: Allow 5 args.
14996
14997 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
14998
14999         * tree.c (make_temp_vec): New fn.
15000         * pt.c (push_template_decl): Handle partial specs.
15001         (instantiate_class_template): Likewise.
15002         (more_specialized): Use get_bindings.
15003         (more_specialized_class): New fn.
15004         (get_class_bindings): New fn.
15005         (most_specialized_class): New fn.
15006         (do_function_instantiation): List candidates for ambiguous case.
15007         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
15008         (shadow_tag): Call push_template_decl for partial specializations.
15009         * parse.y: Likewise.
15010         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
15011         DECL_TEMPLATE_MEMBERS.
15012         * call.c (print_z_candidates): Reduce duplication.
15013
15014 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
15015
15016         * decl2.c (lang_decode_option): Allow -fansi-overloading.
15017
15018 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
15019
15020         * pt.c (get_bindings): New fn.
15021         (most_specialized): Likewise.
15022         (do_function_instantiation): Use them.
15023         (add_maybe_template): New fn.
15024         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
15025         * call.c (build_new_op): Handle guiding decls.
15026         (build_new_function_call): Likewise.
15027         * decl2.c (finish_file): Likewise.
15028
15029         * decl2.c (mark_used): Do synthesis here.
15030         * call.c (build_method_call): Not here.
15031         (build_over_call): Or here.
15032         * typeck.c (build_function_call_real): Or here.
15033         * tree.c (bot_manip): Call mark_used on functions used in default
15034         args.
15035
15036 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15037
15038         * decl2.c (import_export_vtable): Delete code that disabled vtable
15039         heuristic on systems with ASM_OUTPUT_EXTERNAL.
15040
15041 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
15042
15043         * typeck.c (build_x_function_call): Handle static call context
15044         better.
15045
15046         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
15047         the function, not its outer block.
15048
15049         * call.c (build_field_call): Pass fields on to build_opfncall
15050         regardless of TYPE_OVERLOADS_CALL_EXPR.
15051         (build_method_call): Pass on to build_new_method_call sooner.
15052
15053         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
15054         gives us.
15055         * class.c (instantiate_type): Don't put a POINTER_TYPE to
15056         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
15057         modifying it.
15058
15059 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
15060
15061         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
15062         (add_builtin_candidate): Don't take enums for ++.
15063         (build_new_method_call): Handle non-aggregates and field calls.
15064         Move new overloading code from...
15065         * cvt.c: Here.
15066
15067         * decl.c (grokparms): Don't check default args in templates.
15068
15069 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
15070
15071         * cvt.c (build_new_op): Fix args to build_unary_op.
15072         (add_builtin_candidates): Don't call type_promotes_to on float.
15073
15074         * decl.c (grokparms): Check the type of the default arg.
15075
15076         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
15077         returning NULL_TREE.
15078
15079         * typeck.c (build_x_binary_op): Avoid doing extra work.
15080         (build_x_unary_op): Likewise.
15081         (build_x_conditional_expr): Likewise.
15082         * cvt.c (build_over_call): Return.
15083         (add_builtin_candidate): Fix MEMBER_REF.
15084         (build_new_op): Likewise.
15085
15086 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
15087
15088         * method.c (build_overload_name): Put bug fix into code but leave
15089         disabled for now so we can be bug compatible with older releases
15090         that do repeats incorrectly.  In the future, we can enable it.
15091
15092 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15093
15094         * cvt.c (convert_like): Don't call build_cplus_new twice.
15095
15096         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
15097         Control new overloading code with -fansi-overloading.
15098
15099 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
15100
15101         * cvt.c (build_over_call): Call build_cplus_new.
15102         * call.c (build_method_call): Likewise.
15103         * typeck.c (build_function_call_real): Likewise.
15104         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
15105         the COND_EXPR in a TARGET_EXPR so they use the same slot.
15106
15107         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
15108         recursive calls.
15109         * typeck.c (complete_type): Propagate
15110         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
15111
15112 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15113
15114         * cvt.c (joust): More ?: kludging.  Sigh.
15115         (build_over_call): Don't try to synthesize global fns.
15116
15117         * search.c (lookup_conversions): Use binfo marking.
15118
15119 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
15120
15121         * search.c (build_mi_matrix): Use the correct value of cid
15122         when determining the new mi_size.
15123
15124 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
15125
15126         * cvt.c (add_builtin_candidates): Do consider type conversion ops
15127         for the first parms of += et al.
15128         (strip_top_quals): New fn.
15129         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
15130         (implicit_conversion): Likewise.
15131         (add_builtin_candidates): Be careful about arrays.
15132         (build_new_method_call): Handle vtable optimization.
15133
15134 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
15135
15136         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
15137         * cvt.c (reference_binding): Use it.
15138         (implicit_conversion): Use it.
15139         (add_builtin_candidate, COND_EXPR): Use it.
15140
15141         * cvt.c (build_new_function_call): Check for error args.
15142
15143         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
15144
15145         * gxx.gperf: Add __null.
15146         * hash.h: Regenerate.
15147         * lex.h: Add RID_NULL.
15148         * lex.c (init_lex): Create null_pointer_node here, stick it in
15149         RID_NULL.
15150         * decl.c (init_decl_processing): Still set its type here.
15151         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
15152         (convert_to_pointer_force): Likewise.
15153         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
15154         if (! pedantic).
15155         * call.c (convert_harshness): Use null_ptr_cst_p.
15156         * typeck.c (convert_for_assignment): Likewise.  Don't produce
15157         null_pointer_node.
15158
15159         * error.c (args_as_string): Handle lists of actual args, too.
15160         * cvt.c (null_ptr_cst): Support (void*)0 for now.
15161         (build_user_type_conversion_1): Improve diagnostics.
15162         (build_new_function_call): Likewise.
15163         (build_object_call): Likewise.
15164         (build_new_method_call): Likewise.  Move call before def diagnostic...
15165         (build_over_call): Here.
15166
15167         * cvt.c (build_new_method_call): Don't complain about no match if
15168         LOOKUP_SPECULATIVELY.
15169         (build_over_call): Fix 'this' for virtual fn.
15170         (build_new_method_call): Add diagnostic.
15171
15172 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
15173
15174         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
15175         constructors to be passed in.
15176         (build_over_call): Likewise.
15177         (build_user_type_conversion_1): Pass them in.
15178         (convert_like): Likewise.
15179         (build_object_call): Handle overloaded conversions.
15180         (build_over_call): Pass the right args to build_vfn_ref.
15181         (standard_conversion): Fix pmf convs.
15182         (joust): Handle comparing statics and non-statics.
15183         (build_new_method_call): New fn.
15184         * call.c (build_method_call): Call it if NEW_OVER.
15185
15186 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
15187
15188         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
15189         %D instead.
15190
15191 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
15192
15193         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
15194         instead of just maybe_build_cleanup so that we deallocate the
15195         thrown object.
15196
15197 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15198
15199         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
15200         * cp-tree.h (finish_prevtable_vardecl): Add decl.
15201
15202 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
15203
15204         * pt.c (instantiate_class_template): Call complete_type.  Also, if
15205         we're at the end of the file and we just instantiated a template
15206         class with a vtable, call finish_prevtable_vardecl.
15207
15208         * error.c (dump_decl): Don't explode (or explode more gracefully
15209         as appropriate) if the object being dumped has a null type.
15210         (dump_expr): Likewise.
15211
15212         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
15213         by counting the number of nodes that we'll need before allocating
15214         the array.
15215         (lookup_fnfields): Fix comment.
15216         (breadth_first_search): Fix comment.
15217
15218 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
15219
15220         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
15221         TYPE_ALIGN.
15222         * class.c (finish_struct): Call cplus_decl_attributes here.
15223         (finish_struct_1): Not here.
15224         * cp-tree.h: Adjust.
15225
15226         * pt.c (type_unification): New parameter STRICT.
15227         (unify): If STRICT, don't allow cv addition or base deduction.
15228         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
15229
15230 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
15231
15232         * search.c (get_template_base{_recursive}): New fns.
15233         * pt.c (more_specialized): New fn.
15234         (do_function_instantiation): Use it.
15235         (unify): Handle base deduction.
15236         * cvt.c (joust): Use more_specialized.
15237         Don't arbitrarily choose between non-builtin candidates.
15238         (build_over_call): Call require_complete_type.
15239
15240         * decl.c (start_function): Statics are static even in a #pragma
15241         interface file.
15242
15243         * decl2.c (import_export_vtable): Disable vtable heuristic on
15244         systems with ASM_OUTPUT_EXTERNAL.
15245
15246         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
15247         (standard_conversion): No std conv to enum type.
15248
15249         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
15250         for ptm's.
15251
15252         * cvt.c (reference_binding): Bind directly to a base subobject of
15253         a class rvalue.
15254
15255         * cvt.c (build_new_op): Enforce access control.
15256
15257 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
15258
15259         * typeck2.c (process_init_constructor): When scanning the
15260         union for a named field, skip things that aren't FIELD_DECLs.
15261
15262         * method.c (synthesize_method): Don't scan fndecl's rtl if
15263         we're at the end of the file; just assume the function can't
15264         be inlined.
15265
15266 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15267
15268         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
15269         it failed.
15270
15271         * cvt.c (build_user_type_conversion_1): Handle overloaded
15272         conversion ops.
15273
15274         * cvt.c (add_builtin_candidates): Don't consider type conversion
15275         operators for the first parameter of operator=.
15276
15277 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
15278
15279         * typeck.c (complete_type): Only call layout_type if we're not
15280         expanding a template.
15281
15282 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
15283
15284         * cvt.c (compare_ics): Oops.
15285
15286         * cvt.c (op_error): Oops.
15287
15288         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
15289         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
15290         (build_conv): Use them.
15291         (implicit_conversion): Use them.
15292         (convert_like): Handle them.
15293         (build_new_op): Handle builtin COND_EXPR again.
15294         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
15295         in lists of types for COND_EXPR.
15296         (add_builtin_candidate): Add enum candidates for COND_EXPR.
15297
15298 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
15299
15300         * typeck.c (build_modify_expr): Always attempt to build a call to
15301         the assignment operator, even if we're using a default one.
15302         (convert_for_initialization): Call complete_type.
15303
15304 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
15305
15306         * cvt.c (reference_binding): A REF_BIND gets the reference type.
15307         (implicit_conversion): Likewise.
15308         (convert_like): Likewise.
15309         (compare_ics): Likewise.
15310         (compare_qual): Likewise.
15311         (print_z_candidates): Handle no candidates.
15312         (build_new_op): Don't handle builtin COND_EXPR for now.
15313
15314 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
15315
15316         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
15317
15318 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15319
15320         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
15321
15322         * cvt.c (build_builtin_candidate): Oops.
15323         (build_new_op): Oops.
15324
15325         * method.c (build_opfncall): Pass COND_EXPR on.
15326         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
15327         (add_builtin_candidate{,s}): Likewise.
15328         (add_builtin_candidates): Likewise.
15329         (print_z_candidates, op_error, build_new_op): Likewise.
15330         (type_decays_to): New fn.
15331         * lex.c (init_lex): Just say ?: for COND_EXPR.
15332
15333 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
15334
15335         * typeck.c (complete_type): Call layout_type rather than building
15336         a new array type.
15337
15338         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
15339         only use ptrdiff_t.
15340
15341 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
15342
15343         * cvt.c: Always compile the new overloading code (but don't use it).
15344         (implicit_conversion): Add a BASE_CONV when converting to
15345         the same class type.
15346         (convert_like): Handle BASE_CONV.
15347
15348 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15349
15350         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
15351         (add_builtin_candidate): Likewise.
15352
15353         NEW_OVER changes:
15354         * typeck.c (build_x_function_call): Try an operator function
15355         whenever we call an object of class type.
15356         * method.c (build_opfncall): Pass CALL_EXPRs through.
15357         * cvt.c (implicit_conversion): Do const-ref case first.
15358         (add_conv_candidate, build_object_call, op_error): New fns.
15359         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
15360         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
15361         builtin candidates.
15362         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
15363         Fall back on preincrement handling.  Use op_error.
15364         Handle warn_synth.
15365         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
15366         an error_mark_node.
15367         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
15368         properly.
15369
15370 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
15371
15372         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
15373
15374 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
15375
15376         * typeck.c (build_component_ref_1): Use build_component_ref
15377         instead of open coding it here.
15378
15379 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
15380
15381         * g++.c (main): Don't link with -lg++.
15382
15383         NEW_OVER changes:
15384         * cvt.c (convert_to_reference): Don't use convert_from_reference on
15385         result of build_type_conversion.
15386         (cp_convert): Only call build_method_call for ctors if
15387         build_type_conversion failed.
15388         (ptr_complete_ob): New function.
15389         (TYPE_PTR{,OB,MEM}_P): New macros.
15390         ({add,build}_builtin_candidate{,s}): New functions.
15391         (print_z_candidates): Handle builtins.
15392         (build_user_type_conversion_1): Don't use conversion fns for
15393         converting to a base type.
15394         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
15395         (build_user_type_conversion): Use convert_from_reference.
15396         (build_new_op): New function.
15397         (build_over_call): Fix handling of methods.
15398         (compare_ics): Handle AMBIG_CONV properly.
15399         * typeck2.c: Increment abort count.
15400         * method.c (build_opfncall): Forward most requests to build_new_op.
15401         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
15402
15403 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15404
15405         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
15406         invalid second argument to dump_expr_list.
15407
15408 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
15409
15410         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
15411
15412 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
15413
15414         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
15415         ASSEMBLE_EXTERNAL.
15416
15417 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
15418
15419         * typeck2.c (process_init_constructor): New pedwarn for using { }
15420         to initialize a pointer to member function.
15421         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
15422         we can avoid the new error.
15423
15424 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
15425
15426         * typeck.c (build_ptrmemfunc1): New function to hide details of
15427         pointer to member functions better.
15428
15429 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
15430
15431         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
15432         methods into the actual method, as we know the implied object is
15433         not used.
15434
15435 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15436
15437         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
15438         inside a system header.
15439
15440 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
15441
15442         * call.c (build_method_call): Call complete_type on the
15443         instance type.
15444
15445 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
15446
15447         * typeck.c (build_component_ref): Always build up an OFFSET_REF
15448         for obj_ptr->func so that we can know which object to use in a
15449         method call.
15450
15451 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
15452
15453         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
15454         around things.  Also improve maintainability.
15455
15456 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
15457
15458         * decl.c (grokdeclarator): Check for overflow when evaluating an
15459         array dimension.
15460
15461 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
15462
15463         * cvt.c (cp_convert): Don't check for ambiguity with constructor
15464         if NEW_OVER.
15465
15466         * typeck.c (build_x_function_call): Pass function overload
15467         questions to new overloading code if NEW_OVER.
15468         * init.c (expand_aggr_init_1): Only check for type conversion ops
15469         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
15470         Don't check for ambiguity with constructor if NEW_OVER.
15471         * cvt.c (convert_to_reference): Dereference the result of a type
15472         conversion operator.
15473         (build_conv): Propagate ICS_USER_FLAG.
15474         (implicit_conversion): Call instantiate_type.
15475         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
15476         (add_function_candidate): Fix cv-quals on argtype.
15477         (print_z_candidates): New function.
15478         (build_new_function_call): Call it.
15479         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
15480         consider non-converting constructors.
15481         Call print_z_candidates.
15482         Return an AMBIG_CONV for an ambiguous conversion.
15483         (build_user_type_conversion): Handle AMBIG_CONV.
15484         (convert_like): Fix test for building TARGET_EXPR.
15485         Call instantiate_type.
15486         Handle AMBIG_CONV and LVALUE_CONV.
15487         (build_over_call): Handle 0 args and ellipsis.
15488         * cp-tree.def: Add AMBIG_CONV.
15489
15490 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
15491
15492         * decl.c (lookup_name_real): If we find mem in obj when parsing
15493         `obj->mem', make sure we return the right value.
15494
15495 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
15496
15497         * search.c (get_base_distance): Call complete_type.
15498
15499 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
15500
15501         * decl.c (store_bindings): Make static.
15502
15503 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
15504
15505         * init.c (expand_aggr_init_1): Don't check type conversions if
15506         NEW_OVER.
15507
15508         * cvt.c (z_candidate): Put back template field.
15509         (add_function_candidate): Set it.
15510         (add_template_candidate): Likewise.
15511         (joust): Use it.
15512         (compare_qual): Handle references and pointers to members.
15513         (compare_ics): Handle reference bindings.
15514
15515         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
15516
15517 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
15518
15519         * call.c (compute_conversion_costs): Call complete_type.
15520
15521         * tree.c (vec_binfo_member): Use comptypes instead of comparing
15522         pointers, so we can handle template parameters.
15523
15524 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
15525
15526         * cvt.c (cp_convert_to_pointer): We have to call complete_type
15527         here; let's make it explicit instead of a side effect of an
15528         error check.
15529
15530 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
15531
15532         * cvt.c (z_candidate): Remove template field.
15533         (reference_binding): Handle binding to temporary.
15534         (implicit_conversion): Likewise.
15535         (add_function_candidate): Handle artificial constructor parms.
15536         Handle functions with too few parms.
15537         (add_template_candidate): New function.
15538         (build_user_type_conversion_1): Handle constructors.
15539         (convert_like): Likewise.
15540         (build_over_call): Likewise.
15541         (build_new_function_call): Support templates.
15542         (compare_ics): Fix reference, inheritance handling.
15543
15544 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
15545
15546         * decl.c: Add signed_size_zero_node.
15547         (init_decl_processing): Build it.
15548         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
15549         when we're trying to make a negative delta.
15550
15551 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15552
15553         Stop doing this damn index==strchr variable name confusion.
15554         * class.c (add_virtual_function): Change local var INDEX to be
15555         named IDX.
15556         (add_method): Likewise.
15557         * lex.c (print_parse_statistics): Likewise.
15558         * search.c (make_memoized_table_entry): Likewise.
15559         (lookup_fnfields_here): Likewise.
15560         (lookup_field): Likewise.
15561         (lookup_fnfields): Likewise.
15562         (get_baselinks): Likewise.
15563         * sig.c (build_signature_table_constructor): Likewise.
15564         (build_signature_method_call): Likewise.
15565         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
15566         (get_member_function_from_ptrfunc): Likewise.
15567         (build_ptrmemfunc): Change local var INDEX to be IDX.
15568         (c_expand_start_case): Likewise.
15569
15570 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
15571
15572         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
15573         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
15574         (convert_to_reference): Use build_type_conversion to convert to
15575         the reference type directly.
15576         (standard_conversion): Fix void* case, non-conversions.
15577         (reference_binding): Fix expr == 0 case, non-conversions.
15578         (convert_like): Support REF_BIND.
15579         (compare_qual): Split out from compare_ics.
15580         (compare_ics): Use it, handle icses with only a qual_conv.
15581
15582         * init.c (expand_vec_init): Don't crash if decl is NULL.
15583
15584 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
15585
15586         * mpw-config.in: New file, configury for Mac MPW.
15587         * mpw-make.sed: New file, makefile editing for MPW.
15588
15589 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15590
15591         * pt.c (instantiate_class_template): Call repo_template_used.
15592
15593         * search.c (lookup_conversions): Only lookup conversions in
15594         complete types.
15595
15596 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15597
15598         * cp-tree.def: Renamed from tree.def, to avoid confusion with
15599         gcc's tree.def.
15600         * cp-tree.h, lex.c: Include cp-tree.def.
15601         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
15602
15603 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
15604
15605         * init.c (build_vec_delete_1): Call complete_type.
15606
15607 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
15608
15609         * except.c (start_anon_func): Make sure anonymous functions are
15610         never external.
15611
15612 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
15613
15614         * decl.c (finish_function): If function_depth > 1, set nested.
15615
15616         * decl2.c (grokbitfield): Revert Bob's change.
15617         * class.c (finish_struct_1): Fix handling of named bitfield widths.
15618
15619 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
15620
15621         * pt.c (add_pending_template): Handle types.
15622         (lookup_template_class): With -fexternal-templates, just add the class
15623         to pending_templates instead of instantiating it now.
15624         * decl2.c (finish_file): Handle types in pending_templates.
15625
15626 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
15627
15628         * decl2.c (grokbitfield): Handle constant decls appropriately.
15629         Give an appropriate error message now instead of spewing core
15630         later.
15631
15632 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
15633
15634         * decl2.c: Don't turn on thunks by default for now.
15635
15636 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
15637
15638         * typeck.c (complete_type): Handle error_mark_node.
15639         (common_type, OFFSET_TYPE): Handle template_type_parms.
15640
15641 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
15642
15643         * pt.c (instantiate_decl): If at_eof, call import_export_decl
15644         regardless of DECL_INLINE.
15645
15646         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
15647
15648         * class.c (finish_struct_bits): Copy TYPE_SIZE.
15649
15650         * rtti.c (build_dynamic_cast): Support templates.
15651         * tree.def: Support DYNAMIC_CAST_EXPR.
15652         * pt.c (tsubst_copy): Likewise.
15653         * decl2.c (build_expr_from_tree): Likewise.
15654
15655 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
15656
15657         * typeck.c (build_static_cast): Support templates.
15658         (build_const_cast): Likewise.
15659         * tree.def: Support CONST/STATIC_CAST_EXPR.
15660         * pt.c (tsubst_copy): Likewise.
15661         * decl2.c (build_expr_from_tree): Likewise.
15662
15663 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
15664
15665         * decl2.c (finish_vtable_vardecl): Don't trust
15666         TREE_SYMBOL_REFERENCED for vtables of local classes.
15667
15668 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
15669
15670         * pt.c (tsubst_copy): Handle operator T.
15671
15672 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15673
15674         * init.c (build_delete): Move creation of PARMS inside test of
15675         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
15676
15677 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
15678
15679         * typeck.c (build_conditional_expr): Don't assume that
15680         the arguments to ?: are always pointers or records.
15681
15682 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
15683
15684         * decl2.c (import_export_decl): Still emit static/weak/comdat
15685         copies of inline template functions with -fno-implicit-templates.
15686
15687 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
15688
15689         * init.c (build_delete): Determine the complete basetype
15690         path to the destructor we're calling.
15691
15692 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
15693
15694         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
15695         initialize the enum, because we really and truly don't know where
15696         it came from.
15697         (start_enum): Don't copy integer_zero_node because
15698         build_enumerator will do it.
15699
15700 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
15701
15702         * decl.c (finish_function): Do access control on base destructors.
15703
15704         * pt.c (tsubst, case FUNCTION_DECL): Set up
15705         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
15706         hose us.
15707
15708 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
15709
15710         * cvt.c (build_up_reference): If we have already extended the
15711         lifetime of the temporary, don't try it again.
15712         * typeck.c (c_expand_return): Don't try and convert the return
15713         value twice when we want a reference, once is enough.
15714
15715 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
15716
15717         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
15718         LOOKUP_ONLYCONVERTING at all for now.
15719
15720         * search.c (add_conversions): Put the conversion function in
15721         TREE_VALUE, the basetype in TREE_PURPOSE.
15722         * cvt.c (build_type_conversion): Adjust.
15723         * cvt.c (build_expr_type_conversion): Adjust.
15724         * call.c (user_harshness): Adjust.
15725
15726 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
15727
15728         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
15729         backend's benefit.
15730
15731 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
15732
15733         * except.c (expand_start_catch_block): Add a dummy region, if we
15734         get an error, so that we can avoid core dumping later.
15735
15736 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
15737
15738         * cp-tree.h (OFFSET_REF): Remove.
15739         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
15740         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
15741         * init.c (expand_aggr_init_1): Likewise.
15742         (build_new): Likewise.
15743         * typeck.c (expand_target_expr): Likewise.
15744
15745 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
15746
15747         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
15748         TARGET_EXPR.
15749
15750 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
15751
15752         * cvt.c (build_up_reference): Redo how and when temporaries are
15753         created.
15754         * decl.c (grok_reference_init): Don't try and be smart about
15755         running cleanups.
15756
15757 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
15758
15759         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
15760         (TARGET_EXPR...), now that it has 4 arguments.
15761         * tree.c (build_cplus_new): Likewise.
15762
15763 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15764
15765         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
15766
15767         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
15768         * decl.c (struct saved_scope): Remove named_labels,
15769         {base,member}_init_list.
15770         (maybe_push_to_top_level): Don't set them.  Call
15771         push_cp_function_context if appropriate.
15772         (pop_from_top_level): Likewise.
15773
15774         * method.c (do_build_assign_ref): Remove obsolete check of
15775         TYPE_HAS_ASSIGN_REF (basetype).
15776
15777         * decl.c (grokfndecl): Diagnose user definition of
15778         implicitly-declared methods.
15779
15780 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
15781
15782         * method.c (do_build_copy_constructor): Add code to give
15783         meaningful error messages instead of crashing.
15784         (do_build_assign_ref): Don't synthesize assignment operators for
15785         classes containing reference or const members.
15786
15787         * class.c (struct base_info): Remove cant_synth_copy_ctor
15788         and cant_synth_asn_ref.
15789         (finish_base_struct): Remove the code that tries to conditionalize
15790         synthesis of copy constructors & assignment operators based on
15791         access permissions.  Instead, let it fail when it tries to
15792         synthesize the copy constructor.  This will give meaningful error
15793         messages instead of silently generating code to perform a bitcopy.
15794
15795 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
15796
15797         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
15798         determining types for constant values.
15799
15800         * decl.c (struct named_label_list): Use instead of stuffing
15801         random items into a TREE_LIST node.
15802         (named_label_uses): Use the new struct.
15803         (poplevel): Likewise.
15804         (lookup_label): Likewise.
15805         (define_label): Add an error message to tell the user the line
15806         where the goto is located in addition to the destination of the
15807         goto.
15808         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
15809         named_label_uses.
15810         (finish_function): Likewise.
15811
15812         (start_decl): Complain about defining a static data member
15813         in a different type from which it was declared.
15814
15815 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
15816
15817         * cvt.c (build_expr_type_conversion): Adjust.
15818
15819 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
15820
15821         * call.c (build_method_call): Always convert 'this' to the
15822         appropriate type.
15823
15824         * search.c (add_conversions): Put the conversion function in
15825         TREE_VALUE, the type in TREE_PURPOSE.
15826         * cvt.c (build_type_conversion): Adjust.
15827         * call.c (user_harshness): Adjust.
15828
15829         * method.c (emit_thunk): Call temporary_allocation and
15830         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
15831
15832         * tree.c (build_cplus_array_type): Handle tweaking of
15833         TYPE_MAIN_VARIANT here.
15834         * typeck.c (common_type): Not here.
15835
15836         * typeck.c (complete_type): Only try to complete an array type if
15837         it has a domain.
15838
15839 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
15840
15841         * decl.c (grokvardecl): Call complete_type.
15842         (grokdeclarator): Call complete_type for PARM_DECLs.
15843
15844 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15845
15846         * pt.c (instantiate_class_template): Re-set
15847         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
15848
15849 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
15850
15851         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
15852         smart enough to do it right.
15853         * tree.c (cp_expand_decl_cleanup): Likewise.
15854         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
15855         cp_expand_decl_cleanup.
15856         (store_parm_decls): Likewise.
15857         (hack_incomplete_structures): Likewise.
15858         * except.c (push_eh_cleanup): Likewise.
15859
15860 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
15861
15862         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
15863         frontend to the backend where it belongs.
15864         * tree.c (unsave_expr): Likewise.
15865         (unsave_expr_now): Likewise.
15866         * tree.def (UNSAVE_EXPR): Likewise.
15867         * cp-tree.h (unsave_expr): Likewise.
15868         (unsave_expr_now): Likewise.
15869
15870 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
15871
15872         * init.c (emit_base_init): Make sure the partial EH cleanups live
15873         on the function_obstack.
15874
15875 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
15876
15877         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
15878         when checking for pointer types.
15879
15880 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
15881
15882         * pt.c (instantiate_class_template): Remove obsolete check for
15883         access declarations.
15884
15885 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
15886
15887         * call.c (build_overload_call): Simplify calls to
15888         build_overload_call by removing last parameter.
15889         (build_method_call): Likewise.
15890         * cp-tree.h: Likewise.
15891         * method.c (build_opfncall): Likewise.
15892         * typeck.c (build_x_function_call): Likewise.
15893
15894 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
15895
15896         * call.c (default_parm_conversions): Factor out common code.
15897         (build_method_call): Use it.
15898         (build_overload_call_real): Use it.
15899
15900 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
15901
15902         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
15903         but pedwarn as the code is bogus.
15904         * typeck.c (decay_conversion): Likewise.
15905         (build_function_call_real): Use build_addr_func instead of
15906         default_conversion.  Don't allow pointer-to-method functions down
15907         here.
15908         (build_unary_op): Use real pointer-to-member functions instead of
15909         fake ones.
15910         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
15911         (convert_for_assignment): Removed some obsolete code.
15912         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
15913         build_x_function_call instead of current_class_ptr.  Only call
15914         digest_init once on an initializer, we do this just checking
15915         TREE_TYPE.
15916         (build_expr_from_tree): Pass current_class_ref to
15917         build_x_function_call instead of current_class_ptr.
15918         * init.c (build_member_call): Likewise.
15919         * pase.y: Likewise.
15920         * error.c (dump_expr): Handle OFFSET_REFs better.
15921         * pt.c (unify): Handle pointer-to-member functions better.
15922         * decl.c (finish_function): Clear out current_class_ref just like
15923         we do for current_class_ptr.
15924
15925         * typeck.c (get_delta_difference): Handle virtual bases better.
15926
15927 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
15928
15929         * sig.c (build_signature_table_constructor): Use the delta for
15930         the original basetype for this virtual function with thunks.
15931         (build_signature_method_call): We still need to adjust 'this'
15932         with thunks.
15933
15934 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
15935
15936         * call.c (build_addr_func): New routine.  Used to get the `real'
15937         address of a function or a method.  Needed to avoid getting a
15938         pointer-to-member function.
15939         (build_call): New routine to build CALL_EXPRs.
15940         (build_method_call): Use it.
15941         * cvt.c (convert_to_aggr): Likewise.
15942         * typeck.c (build_function_call_real): Likewise.
15943         * sig.c (build_signature_table_constructor): Use build_addr_func.
15944         * cp-tree.h (build_call, build_addr_func): Declare them.
15945
15946 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
15947
15948         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
15949         * parse.y: Remove uses of LOOKUP_AGGR.
15950
15951 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
15952
15953         * *.[chy]: Rename current_class_decl to current_class_ptr, and
15954         C_C_D to current_class_ref.
15955
15956 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
15957
15958         * call.c (convert_harshness): Tighten up pointer conversions.
15959
15960 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
15961
15962         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
15963         (finish_file): Likewise.
15964
15965 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
15966
15967         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
15968
15969         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
15970         code.
15971
15972 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15973
15974         * decl2.c: Turn on thunks by default where supported.
15975
15976 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
15977
15978         * cp-tree.h (build_overload_call_maybe): Removed.
15979         * call.c (build_overload_call_real): Invert meaning of last arg to
15980         be require_complete.
15981         (build_overload_call): Likewise.
15982         * typeck.c (build_x_function_call): Use build_overload_call_real
15983         instead of build_overload_call_maybe.
15984
15985 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
15986
15987         * decl2.c (finish_file): Don't try to emit functions that haven't
15988         been compiled.
15989
15990 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
15991
15992         * decl2.c (finish_vtable_vardecl): Oops.
15993
15994         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
15995         Also store the bindings from previous_class_values.
15996         (pop_from_top_level): Restore them.
15997
15998 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
15999
16000         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
16001         symbol has been referenced.
16002         (finish_file): Re-join synthesis/vtable loop with inline emission
16003         loop, disable inlining when an inline is output.
16004
16005 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
16006
16007         * except.c (init_exception_processing): Setup saved_in_catch.
16008         (push_eh_cleanup): Reset __eh_in_catch.
16009         (expand_start_catch_block): Set __eh_in_catch.
16010
16011 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
16012
16013         * except.c (push_eh_cleanup): Add tracking for whether or not we
16014         have an active exception object.
16015         (expand_builtin_throw): Use it to make sure a rethrow without an
16016         exception object is caught.
16017
16018 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
16019
16020         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
16021         cache.
16022
16023 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
16024
16025         * decl2.c (finish_file): Also use sentries for vars with
16026         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
16027         created).
16028
16029         * lex.c (handle_cp_pragma): Disable #pragma
16030         interface/implementation if SUPPORTS_ONE_ONLY > 1.
16031
16032 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
16033
16034         * method.c (emit_thunk): Wrap default case in
16035         temporary/permanent_allocation.
16036
16037         * method.c (make_thunk): Use DECL_ONE_ONLY.
16038         (emit_thunk): Call assemble_end_function.
16039
16040 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
16041
16042         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
16043         (import_export_decl): Likewise.
16044         (finish_prevtable_vardecl): Disable vtable hack if
16045         SUPPORTS_ONE_ONLY > 1.
16046
16047 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
16048
16049         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
16050         PREDECREMENT_EXPRs take two arguments, not one.
16051
16052 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
16053
16054         * class.c (build_vtable_entry): Don't build thunks for abstract
16055         virtuals.
16056
16057         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
16058         frontend.
16059
16060 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
16061
16062         * class.c (set_rtti_entry): Use size_zero_node.
16063         (build_vtable): Likewise.
16064
16065 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
16066
16067         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
16068         (prepare_fresh_vtable): Likewise.
16069
16070 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
16071
16072         * method.c (emit_thunk): Call mark_used on the target function.
16073
16074         * call.c (build_method_call): Don't warn about pending templates.
16075
16076 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
16077
16078         * decl2.c (finish_file): Fix list walking logic.
16079
16080         * typeck2.c (check_for_new_type): Only warn if -pedantic.
16081
16082 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
16083
16084         * class.c (finish_struct_1): Remove old code for
16085         dont_allow_type_definitions.
16086         * cp-tree.h: Likewise.
16087         * spew.c: Make sure cp-tree.h is included before parse.h, so the
16088         definition of flagged_type_tree is found before it is used.
16089         * lex.c: Likewise.
16090         * parse.y: Added the ftype member to the type union, and changed a
16091         number of rules to use it instead of ttype.  Added calls to
16092         check_for_new_type() as appropriate.
16093         * typeck2.c (check_for_new_type): New function for checking
16094         if a newly defined type appears in the specified tree.
16095         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
16096         for check_for_new_type().
16097
16098 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
16099
16100         * decl2.c (finish_file): Only use a sentry if the decl is public.
16101
16102         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
16103         don't pass LOOKUP_ONLYCONVERTING.
16104
16105 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
16106
16107         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
16108         properly keeps track of const and volatile type modifiers.
16109
16110 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
16111
16112         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
16113         * pt.c (comp_template_args): Use it.
16114
16115         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
16116         assemble_external for artificial function decls.
16117
16118         * decl.c (cp_finish_decl): Oops.
16119
16120 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
16121
16122         * decl2.c (import_export_decl): Put static data member templates
16123         into common storage, or make them weak, depending on whether they
16124         are dynamically or statically initialized.
16125         (get_sentry): New function.
16126         (finish_file): Do import_export_decl for static data members before
16127         building the init/fini functions.  Don't init/fini a variable that's
16128         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
16129         push/pop_temp_slots.
16130         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
16131         expand_static_init thang.
16132         * method.c (get_id_2): New function.
16133
16134 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
16135
16136         * parse.y (empty_parms): Make sure we use C++-style prototypes
16137         when we're declaring member functions.
16138
16139 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
16140
16141         * Makefile.in (CONFLICTS): 16 s/r conflicts.
16142         * parse.y (self_template_type): New nonterminal.
16143
16144 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
16145
16146         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
16147         name.
16148         * parse.y (base_class.1): Allow 'typename foo::bar'.
16149
16150         * lex.c (check_newline): Remove #pragma code that plays with the
16151         input stream, since we now deal with tokens.  Clear nextchar when
16152         we're done.
16153         (handle_cp_pragma): Use real_yylex.
16154         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
16155         in one place.
16156
16157         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
16158
16159         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
16160
16161 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
16162
16163         * parse.y: New token SELFNAME for potential constructor.
16164         * spew.c (yylex): Handle it.
16165         * lex.c (identifier_type): Produce it.
16166
16167         * parse.y (complete_type_name): In :: case, don't push class binding.
16168         (complex_type_name): Likewise.
16169
16170 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
16171
16172         * typeck.c (build_reinterpret_cast): Handle pointer to member
16173         functions.
16174
16175 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16176
16177         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
16178         pragmas.
16179         (check_newline): Put the vtable/unit/implementation/interface pragma
16180         code into handle_cp_pragma, replacing it with a call.
16181         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
16182         args.  Get the next token after handling the pragma token.
16183
16184 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
16185
16186         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
16187         (convert_to_pointer_force): Likewise.
16188
16189         * init.c (build_new): Fix array new without -fcheck-new.
16190
16191 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
16192
16193         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
16194         tree.c: Lose TYPE_NESTED_NAME.
16195
16196         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
16197         as identifiers.
16198
16199         * tree.def: Add VEC_INIT_EXPR.
16200         * expr.c (cplus_expand_expr): Handle it.
16201         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
16202         the extra file-scope symbol nastiness.
16203
16204 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
16205
16206         * method.c (make_thunk): Thunks are static.
16207         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
16208
16209         * decl2.c (mark_vtable_entries): Emit thunks as needed.
16210         (finish_file): Don't emit them here.
16211
16212 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
16213
16214         * rtti.c (build_dynamic_cast): Handle null pointers.
16215         (ifnonnull): New function.
16216
16217 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
16218
16219         * call.c (build_method_call): Remember the original basetype we
16220         were called with.  Give an error message instead of trying
16221         (incorrectly) to call a non-static member function through a
16222         non-inherited class.
16223
16224         * search.c (expand_upcast_fixups): Mark the new fixup as
16225         DECL_ARTIFICIAL.
16226
16227 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16228
16229         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
16230
16231         * class.c (set_rtti_entry): Fix for thunks.
16232
16233         * decl2.c (import_export_decl): Still emit typeinfo fns for
16234         cv-variants of builtin types.
16235
16236         * rtti.c (expand_class_desc): Set up base_info_type_node here.
16237         (init_rtti_processing): Instead of here.
16238
16239 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
16240
16241         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
16242         (build_typeid): Only complain about taking dynamic typeid without
16243         -frtti.
16244
16245         * decl2.c: flag_rtti defaults to 1.
16246
16247         * rtti.c (get_tinfo_var): The general class case is now smaller.
16248         (init_rtti_processing): Pack the latter three fields of base_info
16249         into 32 bits.
16250
16251 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
16252
16253         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
16254
16255 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
16256
16257         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
16258         (push_memoized_context): Split out code to undefer pop_type_level to
16259         (clear_memoized_cache): here.
16260         (pop_memoized_context): We can only handle one layer of deferral of
16261         pop_type_level so clear the cache, if there was a previous level.
16262
16263 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16264
16265         * rtti.c (init_rtti_processing): Build up base_info_type_node.
16266         (expand_class_desc): Use one pointer to an array of base_info
16267         structs, passed using a CONSTRUCTOR.
16268
16269 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
16270
16271         * class.c (build_vbase_path): Remove block extern for
16272         flag_assume_nonnull_objects here.
16273         (build_vfn_ref): Split out functionality into build_vtbl_ref.
16274         (build_vtbl_ref): New routine.
16275         (build_vtable): Set up rtti info here.
16276         (add_virtual_function): Note in CLASSTYPE_RTTI the best
16277         place where we can get the rtti pointers from to avoid having to
16278         search around for a place.
16279         (finish_base_struct): Likewise.
16280         (finish_struct_1): Likewise.  Never create totally new vtables
16281         with totally new vtable pointers for rtti.  Disable code to layout
16282         vtable pointers better until we want to break binary
16283         compatibility.
16284         * rtti.c (build_headof_sub): New routine to convert down to a
16285         sub-object that has an rtti pointer in the vtable.
16286         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
16287         maintainable.
16288         (build_dynamic_cast): Make sure we have saved it, if we need to.
16289         * search.c (dfs_init_vbase_pointers): Disable code that deals with
16290         a more efficient vtable layout, enable later.
16291         * call.c (flag_assume_nonnull_objects): Moved declaration to
16292         * cp-tree.h: here.  Declare build_vtbl_ref.
16293         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
16294         function calls that want a tree.
16295
16296 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
16297
16298         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
16299         other X subobjects in the most derived type.  Ack.
16300
16301         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
16302         get_typeid will do it for us.
16303         (get_typeid_1): Break out call-building for expand_*_desc to use.
16304         (get_typeid): Call it.
16305         (expand_*_desc): Likewise.
16306         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
16307         and void *.
16308         (init_decl_processing): Lose builtin_type_tdescs lossage.
16309         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
16310
16311 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
16312
16313         * pt.c (tsubst): When calling set_nested_typename, use
16314         TYPE_NESTED_NAME (current_class_type) instead of
16315         current_class_name.
16316
16317         * decl.c (pushdecl): Likewise.
16318         (pushdecl_class_level): Likewise.
16319         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
16320         set_nested_typename.
16321
16322 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
16323
16324         * rtti.c (synthesize_tinfo_fn): Handle arrays.
16325
16326         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
16327
16328 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
16329
16330         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
16331         (init_rtti_processing): Lose bad_cast_type.
16332         (build_dynamic_cast): Use throw_bad_cast.
16333
16334         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
16335
16336         * decl2.c (finish_file): Don't synthesize artificial functions
16337         that are external and not inline.
16338
16339         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
16340
16341         * decl2.c (finish_file): Handle having new inlines added to
16342         saved_inlines by synthesis.
16343
16344         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
16345
16346 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16347
16348         RTTI rewrite to initialize nodes as needed, not require that
16349         users #include <typeinfo>, complete functionality and reduce wasted
16350         space.
16351         * rtti.c (init_rtti_processing): New fn.
16352         (build_typeid): The vtable entry is now a function.
16353         (get_tinfo_var): New fn.
16354         (get_tinfo_fn): Likewise.
16355         (get_typeid): Use it.
16356         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
16357         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
16358         points __rtti_*.
16359         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
16360         (synthesize_tinfo_fn): New fn.
16361         * method.c (build_t_desc_overload): Lose.
16362         (build_overload_with_type): More generic.
16363         * decl.c (init_decl_processing): Call init_rtti_processing.
16364         * class.c (set_rtti_entry): Use get_tinfo_fn.
16365         * decl2.c (mark_vtable_entries): Mark the rtti function.
16366         (finish_prevtable_vardecl): Don't build_t_desc.
16367         (import_export_decl): Handle tinfo functions.
16368         (finish_file): Likewise.
16369         * typeck.c (inline_conversion): New fn.
16370         (build_function_call_real): Use it.
16371         * cp-tree.h: Add decls.
16372
16373         * method.c (hack_identifier): Also convert component_refs from
16374         references.
16375
16376         * lex.c (cons_up_default_function): Use the type, not the name, in
16377         declspecs.
16378
16379         * decl2.c (import_export_vtable): Fix weak vtables.
16380
16381 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
16382
16383         * search.c (get_base_distance_recursive): Fix access checks for
16384         protected bases.
16385
16386 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16387
16388         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
16389         cp-tree.h.
16390         (convert_harshness): Add prototypes wrapped by PROTO.
16391         * decl2.c (grok_function_init): Likewise.
16392         (do_toplevel_using_decl): Change to void return type.
16393         * class.c (build_vtable_entry): Remove decl of make_thunk.
16394         (merge_overrides): Fix order of arg definitions.
16395         (finish_vtbls): Likewise.
16396         (fixup_vtable_deltas): Likewise.
16397         (modify_all_direct_vtables): Likewise.
16398         (modify_all_indirect_vtables): Likewise.
16399         * search.c (get_base_distance_recursive): Likewise.
16400         (get_abstract_virtuals_1): Likewise.
16401         (fixup_virtual_upcast_offsets): Likewise.
16402         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
16403         * init.c (perform_member_init): Fix order of arg definitions.
16404         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
16405         * cp-tree.h (make_thunk): Add decl.
16406         (overload_template_name, push_template_decl): Add decls.
16407         (do_toplevel_using_decl): Change to void return type.
16408         (vec_binfo_member): Add decl.
16409
16410 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16411
16412         * typeck.c (mark_addressable, convert_for_assignment,
16413         convert_for_initialization, pointer_int_sum, pointer_diff,
16414         unary_complex_lvalue): Add prototypes wrapped by PROTO.
16415         (convert_sequence): #if 0 fn decl, since definition also is.
16416
16417 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
16418
16419         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
16420         cast to pointer types for type searching.
16421
16422 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16423
16424         * typeck.c (get_delta_difference): Use cp_error, not error, in the
16425         case where BINFO == 0.
16426
16427 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
16428
16429         * call.c (build_method_call): Fix wording of error messages so
16430         constructors come out right.
16431
16432 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
16433
16434         * decl.c (push_overloaded_decl): Don't warn about hidden
16435         constructors when both the type and the function are declared
16436         in a system header file.
16437
16438 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
16439
16440         * class.c (finish_struct_1): Propagate the TYPE_PACKED
16441         flag for the type to the type's fields.
16442
16443 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16444
16445         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
16446
16447 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
16448
16449         * class.c (base_info, finish_base_struct): Replace
16450         needs_virtual_dtor with base_has_virtual.
16451
16452         (finish_struct_1): Remove the old code that tried to make default
16453         destructors virtual.  Use base_has_virtual when checking if we need
16454         to add a vtable entry for the rtti code.
16455
16456 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16457
16458         * pt.c (push_template_decl): Complain about template decl with
16459         inappropriate declaration.
16460
16461 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
16462
16463         * typeck.c (build_x_unary_op): Remove bogus check for taking
16464         the address of a member function.
16465
16466 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
16467
16468         * parse.y (constructor_declarator): Only push the class if
16469         we are not already in the class.
16470
16471 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
16472
16473         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
16474         Add additional argument to INIT_CUMULATIVE_ARGS.
16475
16476 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
16477
16478         * decl.c (shadow_tag): Fix error about anon union with methods.
16479
16480         * parse.y (self_reference): Only generate a self-reference if this
16481         is a non-template class.
16482         (opt.component_decl_list): Only use it if it was generated.
16483
16484         * parse.y (component_decl_1): Use constructor_declarator.
16485         (fn.def2): Likewise.
16486         (notype_component_declarator0): Likewise.
16487
16488 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
16489
16490         * typeck.c (build_x_unary_op): Add checks for taking the address
16491         of a TARGET_EXPR or of a member function, and give appropriate
16492         warnings.
16493
16494 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
16495
16496         * pt.c (process_template_parm): Allow template type parms to be
16497         used as types for template const parms.
16498
16499 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
16500
16501         * init.c (expand_vec_init): Ensure the eh cleanups are on the
16502         function_obstack.
16503
16504 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16505
16506         * decl.c (lookup_name_real): Be even more picky about the
16507         ambiguous lookup warning.
16508         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
16509         * parse.y (constructor_declarator): Rather than here.
16510
16511         * parse.y (constructor_declarator): New nonterminal.
16512         (fn.def1): Use it.
16513         (explicit_instantiation): Likewise.
16514
16515 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
16516
16517         Add implicit declaration of class name at class scope.
16518         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
16519         * parse.y (self_reference): New nonterminal.
16520         (opt.component_decl_list): Use it.
16521         (fn.def1): Add nested_name_specifier type_name cases.
16522         * class.c (build_self_reference): New function.
16523         (finish_struct): Handle access_default later, move self-reference
16524         decl to the end.
16525         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
16526         * cp-tree.h: Adjust.
16527
16528         * pt.c (do_function_instantiation): Separate handling of member
16529         functions and non-member functions properly.
16530
16531 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
16532
16533         * pt.c (process_template_parm): Improve error for 'volatile class K'.
16534
16535         * class.c (finish_struct_1): Check the right slot for destructors.
16536
16537         * decl.c (start_enum): Complain about enum templates.
16538
16539 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
16540
16541         * init.c (resolve_offset_ref): Offset pointers to member data by one.
16542         * typeck.c (unary_complex_lvalue): Likewise.
16543
16544 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
16545
16546         * typeck.c (c_expand_return): Check for a returned local
16547         array name, similar to the check for an ADDR_EXPR.
16548
16549 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
16550
16551         * decl.c (cp_finish_decl): Don't build cleanups for static
16552         variables here.
16553
16554 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
16555
16556         * typeck.c (build_modify_expr): Fix error messages to be more
16557         accurate.
16558         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
16559         assignment operators.
16560         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
16561         assignment operators.
16562
16563 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
16564
16565         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
16566         give an error if initialized.  pedwarn about nested type with the
16567         same name as its enclosing class.
16568
16569         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
16570
16571         * typeck.c (require_complete_type): Be sure to instantiate the
16572         MAIN_VARIANT of the type.
16573
16574         * decl2.c (finish_file): Instantiate pending templates before
16575         processing static constructors and destructors.
16576
16577         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
16578         unless at_eof.
16579
16580 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
16581
16582         * decl2.c (delete_sanity): If error_mark_node is passed
16583         in as an expression, quit while we're ahead.
16584
16585         * decl.c (grokdeclarator): Give an error message if `friend'
16586         is combined with any storage class specifiers.
16587
16588 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
16589
16590         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
16591         definition of nonexistent nested type.
16592
16593         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
16594         not to say 'typedef'.
16595
16596 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16597
16598         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
16599         * search.c (dfs_walk, dfs_init_vbase_pointers,
16600         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
16601         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
16602
16603 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
16604
16605         * except.c (build_throw): Support minimal parse.
16606         * pt.c (tsubst_copy): Support THROW_EXPR.
16607         * decl2.c (build_expr_from_tree): Likewise.
16608
16609         * pt.c (mangle_class_name_for_template): Always allocate
16610         scratch_firstobj.
16611
16612 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
16613
16614         * cvt.c (cp_convert_to_pointer): Give an appropriate error
16615         when trying to cast from an incomplete type.
16616
16617 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
16618
16619         * pt.c (instantiate_class_template): Don't bother setting up
16620         CLASSTYPE_TAGS explicitly, as the nested types will add
16621         themselves.
16622
16623 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
16624
16625         * decl.c (shadow_tag): Remove old error check for usage of
16626         an enum without a previous declaration.
16627         (xref_tag): Add error message about usage of enums without a
16628         previous declaration.
16629
16630 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
16631
16632         * lex.c (do_identifier): Only do name consistency check if we're
16633         parsing.
16634
16635         * pt.c (push_template_decl): Don't crash if we get a member defn
16636         that doesn't match.
16637
16638         * decl.c (xref_tag_from_type): New function to do an xref without
16639         always having to figure out code_type_node.
16640         * cp-tree.h: Declare it.
16641         * pt.c (instantiate_class_template): Use it for friend classes.
16642         (lookup_template_class): Use it.
16643
16644         * typeck2.c (build_functional_cast): Pull out a single parm before
16645         passing it to build_c_cast.
16646
16647 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
16648
16649         * expr.c (do_case): Give an error message if a pointer is
16650         given as a case value.
16651
16652 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
16653
16654         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
16655         an overload list.
16656
16657         * lex.c (cons_up_default_function): Really, now, interface hackery
16658         does not apply to synthesized methods.
16659
16660 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
16661
16662         * call.c (build_method_call): Ctors and dtors now have special names
16663         with respect to lookups.
16664         * class.c (add_method): Likewise.
16665         (grow_method): Likewise.
16666         (finish_struct_methods): Likewise.
16667         (warn_hidden): Likewise.
16668         (finish_struct_1): Likewise.
16669         * cvt.c (convert_to_reference): Likewise.
16670         (convert_to_aggr): Likewise.
16671         (cp_convert): Likewise.
16672         * decl2.c (check_classfn): Likewise.
16673         * init.c (expand_member_init): Likewise.
16674         (expand_default_init): Likewise.
16675         (expand_aggr_init_1): Likewise.
16676         (build_offset_ref): Likewise.
16677         (build_new): Likewise.
16678         (build_delete): Likewise.
16679         * lex.c (do_inline_function_hair): Likewise.
16680         * search.c (lookup_field_1): Likewise.
16681         (lookup_fnfields_here): Likewise.
16682         (lookup_field): Likewise.
16683         (lookup_fnfields): Likewise.
16684         (get_virtual_destructor): Likewise.
16685         (dfs_debug_mark): Likewise.
16686         (dfs_pushdecls): Likewise.
16687         (dfs_compress_decls): Likewise.
16688         * tree.c (layout_basetypes): Likewise.
16689         * typeck.c (build_component_ref): Likewise.
16690         (build_x_function_call): Likewise.
16691         (build_modify_expr): Likewise.
16692         (convert_for_initialization): Likewise.
16693         (build_functional_cast): Likewise.
16694         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
16695         (CTOR_NAME): New.
16696         (DTOR_NAME): New.
16697         * decl.c (ctor_identifier): New.
16698         (dtor_identifier): New.
16699         (init_decl_processing): Set them.
16700
16701 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
16702
16703         * typeck.c (build_component_ref): Don't get confused by fields whose
16704         context has no type name, like pointer to member functions.
16705
16706 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
16707
16708         * decl.c (grokdeclarator): Handle typedef without declarator.
16709
16710         * pt.c (tsubst): Handle SCOPE_REF in declarator.
16711
16712         * parse.y (bad_parm): Catch another case of missing `typename'.
16713
16714         * lex.c (yyprint): Handle TYPE_DECLs.
16715
16716         * decl.c (start_function): Don't try to be clever.
16717
16718         * lex.c: Lose compiler_error_with_decl.
16719         * typeck2.c: Lose error_with_aggr_type.
16720         (incomplete_type_error): Use cp_* instead of old functions.
16721         (readonly_error): Likewise.
16722         * typeck.c (convert_arguments): Likewise.
16723         * search.c (lookup_nested_field): Likewise.
16724         * method.c (make_thunk): Likewise.
16725         * decl.c (grokparms): Likewise.
16726         * cp-tree.h: Update.
16727
16728         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
16729         and value.
16730
16731 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
16732
16733         * method.c (build_opfncall): When deleting a pointer to an
16734         array, build a new pointer to the tree past any ARRAY_TYPE
16735         nodes.
16736
16737 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16738
16739         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
16740
16741 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
16742
16743         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
16744         and ! DECL_INLINE.
16745
16746         * decl.c (finish_function): Don't set nested based on
16747         hack_decl_function_context.
16748         * parse.y (function_try_block): Check for nested function.
16749         (pending_inlines): Likewise.
16750
16751         * decl2.c (build_expr_from_tree): If a unary op already has a
16752         type, just return it.
16753
16754         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
16755
16756         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
16757         (finish_file): Check the return value of walk_vtables.
16758         (finish_prevtable_vardecl): Return int.
16759         (finish_vtable_vardecl): Likewise.
16760         (prune_vtable_vardecl): Likewise.
16761         * lex.c (set_vardecl_interface_info): Likewise.
16762         * cp-tree.h: Adjust return types.
16763
16764         * class.c (delete_duplicate_fields_1): Don't complain about
16765         duplicate nested types if they're the same type.
16766         (finish_struct): Remove check for duplicate.
16767         * decl2.c (grokfield): Don't check for typedef of anonymous type.
16768
16769 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
16770
16771         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
16772
16773         * decl.c (grokdeclarator): Lose special handling of class-level
16774         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
16775         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
16776
16777         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
16778
16779         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
16780
16781         * search.c (compute_access): Fix handling of anonymous union
16782         members.
16783         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
16784         from anonymous unions to their members.
16785
16786         * typeck.c (build_x_function_call): For static member functions,
16787         hand off to build_member_call.
16788
16789 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
16790
16791         * typeck.c (build_component_ref): Handle OFFSET_REFs.
16792
16793         * init.c (expand_vec_init): Fix init == 0 case.
16794
16795 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
16796
16797         * init.c (build_new): pedwarn about init and array new.
16798         (expand_vec_init): Handle lists, use convert_for_initialization.
16799
16800         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
16801         when converting to an aggregate type.
16802         * cvt.c (cp_convert): Pass it through.
16803
16804         * typeck.c (build_conditional_expr): Handle user-defined
16805         conversions to slightly different types.
16806
16807         * decl.c (grokdeclarator): Force an array type in a parm to be
16808         permanent.
16809
16810         * decl2.c (do_using_directive): Sorry.
16811         (do_namespace_alias): Likewise.
16812         * lex.c (real_yylex): Warn about using the `namespace' keyword.
16813
16814 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16815
16816         * parse.y (datadef): Move call to note_list_got_semicolon up.
16817
16818 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
16819
16820         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
16821
16822 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
16823
16824         * decl.c (cp_finish_decl): The exception regions have to be
16825         nested, not overlapping.  We start the exception region for a
16826         decl, after it has been fully built, and all temporaries for it
16827         have been cleaned up.
16828
16829 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
16830
16831         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
16832
16833 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
16834
16835         * tree.def: Add RETURN_INIT.
16836         * pt.c (instantiate_decl): Handle RETURN_INIT.
16837         * decl.c (store_return_init): Handle minimal_parse_mode.
16838
16839         * tree.c (cp_build_type_variant): Just return an error_mark_node.
16840         * decl.c (make_typename_type): Don't try to get the file and line
16841         of an identifier.
16842         * typeck.c (comptypes): Handle TYPENAME_TYPE.
16843
16844 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
16845
16846         * decl.c (poplevel): Make sure we clear out and restore old local
16847         non-VAR_DECL values by default when they go out of scope.
16848
16849 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16850
16851         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
16852         referring to addresses of variables and functions.
16853
16854         * error.c (dump_expr): Support SIZEOF_EXPR.
16855
16856         * init.c (do_friend): Use the return value of check_classfn.
16857
16858         * typeck.c (convert_arguments): Call complete_type.
16859
16860         * method.c (hack_identifier): After giving an error, set value to
16861         error_mark_node.
16862
16863 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
16864
16865         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
16866         lossage for local classes.
16867         * cp-tree.h: Declare it.
16868         * decl.c (lookup_name_real): Evil, painful hack for local classes.
16869         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
16870         Use hack_decl_function_context.
16871         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
16872         (start_function): Use hack_decl_function_context.
16873         (finish_function): Likewise.
16874         * method.c (synthesize_method): Likewise.
16875         * lex.c (process_next_inline): Likewise.
16876         (do_pending_inlines): Likewise.
16877         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
16878         done with it.
16879
16880 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
16881
16882         * sig.c (build_signature_pointer_or_reference_type): Align
16883         signature pointers/references on 8-byte boundaries so they can be
16884         grabbed 2 words at a time on a Sparc.
16885
16886 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
16887
16888         * method.c (hack_identifier): Requiring a static chain is now a
16889         hard error.
16890         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
16891         functions.
16892
16893 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
16894
16895         * init.c (build_offset_ref): Call complete_type.
16896
16897         * decl.c (pop_from_top_level): Always pop previous_class_type.
16898
16899         * parse.y: Handle multiple decls in a for-init-statement.
16900         * pt.c (tsubst_expr): Likewise.
16901
16902         * pt.c (tsubst): Use tsubst_expr for the second operand of an
16903         ARRAY_REF.
16904
16905         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
16906         (poplevel_class): Set it here.
16907         (pop_from_top_level): Pop it here if we're returning to class scope.
16908         * class.c (pushclass): Don't set it here.
16909
16910         * decl.c (maybe_push_to_top_level): Save current_template_parms,
16911         and clear it if !pseudo.
16912         (pop_from_top_level): Restore it.
16913
16914         * decl2.c (finish_file): Push the dummy each time we walk the list
16915         of vtables.
16916
16917         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
16918         something for CAST_EXPR.
16919
16920 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
16921
16922         * cvt.c (cp_convert): Warn about implicit conversion of the
16923         address of a function to bool, as it is always true.
16924
16925 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
16926
16927         * typeck.c (c_expand_return): Fix warning for local externs returned.
16928
16929 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
16930
16931         * tree.c (mapcar): Propagate const and volatile properly.
16932
16933         * typeck.c (complete_type): Be sure to instantiate the
16934         MAIN_VARIANT of the type.
16935
16936         * method.c (synthesize_method): Class interface hackery does not
16937         apply to synthesized methods.
16938
16939 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16940
16941         * pt.c (comp_template_args): Use comptypes rather than just
16942         checking for TEMPLATE_TYPE_PARM equivalence.
16943
16944         * typeck.c (build_x_function_call): Call complete_type before
16945         checking TYPE_OVERLOADS_CALL_EXPR.
16946
16947 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
16948
16949         * g++.c (main): Check also for new define ALT_LIBM.
16950
16951 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
16952
16953         * pt.c (instantiate_class_template): If we don't have a pattern
16954         yet, that's OK.
16955         (coerce_template_parms): If we see a local class, bail.
16956
16957         * decl.c (grok_reference_init): Make sure there's a type before
16958         checking its code.
16959
16960         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
16961         (push_template_decl): Likewise.
16962
16963         * parse.y (named_class_head): Set
16964         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
16965
16966         * decl.c (xref_tag): Diagnose redeclaration of template
16967         type-parameter name.
16968
16969         * error.c (dump_type): Handle anonymous template type parms.
16970
16971         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
16972         TYPE_STUB_DECL.
16973         (coerce_template_parms): Likewise.
16974
16975 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
16976
16977         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
16978         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
16979
16980 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
16981
16982         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
16983         before trying to get its STUB_DECL.
16984         (coerce_template_parms): Likewise.
16985
16986         * parse.y (template_type_parm): If they didn't use 'class',
16987         pretend they did after giving an error.
16988
16989         * pt.c (coerce_template_parms): Diagnose use of local class.
16990
16991         * decl.c (grok_reference_init): Use instantiate_type.
16992
16993         * error.c (dump_expr): Handle TEMPLATE_DECLs.
16994
16995         * parse.y (named_class_head): Diagnose mismatching types and tags.
16996
16997         * decl.c (pushdecl): Type decls and class templates clash with
16998         artificial type decls, not hide them.
16999
17000         * decl.c (redeclaration_error_message): Diagnose redefinition of
17001         templates properly.
17002         (duplicate_decls): Diagnose disallowed overloads for template
17003         functions, too.
17004
17005         * decl.c (start_decl): Call complete_type before checking for a
17006         destructor.
17007
17008         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
17009
17010         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
17011
17012 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
17013
17014         * decl.c (grok_op_properties): Don't check for operator++(int) in
17015         a template.
17016
17017         * tree.c (perm_manip): Return a copy of variable and function
17018         decls with external linkage.
17019
17020         * tree.def: Change some of the min tree codes to type "1".
17021         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
17022         * method.c (build_overload_int): Emit something arbitrary for
17023         anything but an INTEGER_CST if we're in a template.
17024
17025         * decl.c (cp_finish_decl): Call complete_type before deciding
17026         whether or not to lay out the decl.
17027
17028         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
17029
17030 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
17031
17032         * typeck2.c (build_x_arrow): Call complete_type.
17033
17034         * pt.c (add_pending_template): Broken out.
17035         (lookup_template_class): If -fexternal-templates, call it for all
17036         the methods of implemented types.
17037         (instantiate_class_template): Instead of instantiating them here.
17038         (instantiate_decl): Handle -fexternal-templates earlier.
17039
17040 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17041
17042         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
17043         memoized lookup stuff inside GATHER_STATISTICS.
17044
17045 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
17046
17047         * decl.c (start_decl): Complain about array of incomplete type
17048         here.
17049         (grokdeclarator): Not here.
17050
17051         * parse.y (template_parm): Expand full_parm inline so we can set
17052         the rule's precedence.
17053
17054         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
17055         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
17056         * decl2.c (grokbitfield): Don't check for integer constant here.
17057         * class.c (finish_struct_1): Check here.
17058
17059         * decl.c (define_label): Make the min decl go on permanent_obstack.
17060
17061         * pt.c (unify): Don't handle CONST_DECLs.
17062         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
17063         (tsubst_copy): Likewise.
17064
17065         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
17066         CONST_DECL for a template parm.
17067
17068 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
17069
17070         * decl.c (grokdeclarator): Complain about array of incomplete type
17071         here.
17072         (start_decl_1): Not here.
17073
17074         * pt.c (tsubst): Handle pointer-to-function declarators.
17075
17076         * method.c (hack_identifier): If pedantic, diagnose local class
17077         methods that require a static chain.
17078
17079         * decl.c (grok_op_properties): No longer static.
17080         * cp-tree.h: Declare it.
17081         * pt.c (tsubst): Call it for operators.
17082         Use tsubst_copy for TREE_VECs.
17083
17084         * parse.y (template_arg): The expr has precedence like '>'.
17085
17086 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
17087
17088         * pt.c (coerce_template_parms): Don't coerce an expression using
17089         template parms.
17090         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
17091         (tsubst): Don't use build_index_2_type if the max_value uses template
17092         parms.
17093         * method.c (build_overload_int): Emit something arbitrary for an
17094         expression using template parms.
17095
17096         * parse.y (template_close_bracket): New non-terminal to catch use
17097         of '>>' instead of '> >' in template class names.
17098         (template_type): Use it.
17099         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
17100
17101         * tree.def: Add CAST_EXPR.
17102         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
17103         CONVERT_EXPR for minimal_parse_mode.
17104         * typeck.c (build_c_cast): Likewise.
17105         * pt.c (tsubst_copy): Likewise.
17106         * decl2.c (build_expr_from_tree): Likewise.
17107         * error.c (dump_expr): Likewise.
17108
17109 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17110
17111         * except.c (SetTerminate, SetUnexpected): Put back global vars.
17112         (init_exception_processing): Put back decl/init of
17113         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
17114         fns from libstdc++.
17115
17116         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
17117         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
17118         Delete unused fns.
17119         * cp-tree.h (declare_uninstantiated_type_level,
17120         uninstantiated_type_level_p): Delete prototypes.
17121
17122 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
17123
17124         * pt.c (tsubst_expr): Add default return.
17125
17126 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17127
17128         * error.c (fndecl_as_string): Delete unused arg CNAME.
17129         * sig.c (build_signature_table_constructor,
17130         build_signature_method_call): Fix calls.
17131
17132         * class.c (the_null_vtable_entry): Delete var definition.
17133         (init_class_processing): Delete tree the_null_vtable_entry init.
17134         * decl.c (no_print_{functions, builtins}): Declare as static.
17135         (__tp_desc_type_node): #if 0 var definition.
17136         (init_type_desc): #if 0 init of __tp_desc_type_node.
17137         (vb_off_identifier): Move var decl into init_decl_processing.
17138         (current_function_assigns_this): Declare as static.
17139         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
17140         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
17141         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
17142         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
17143         * init.c (BI_header_type, BI_header_size): Declare as static.
17144         * pt.c (template_classes): Delete unused var.
17145         (add_pending_template): Delete decl for non-existent fn.
17146         (lookup_template_class): Delete vars CODE and TAG_CODE.
17147         (instantiate_template): Delete unused var TARGS.
17148         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
17149         Delete decls.
17150         (__tp_desc_type_node): #if 0 var decl.
17151         (fndecl_as_string): Fix prototype.
17152
17153 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
17154
17155         * tree.def: Add GOTO_STMT.
17156         * pt.c (tsubst_expr): Support goto and labels.
17157         * decl.c (define_label): Support minimal parsing.
17158         * parse.y (simple_stmt): Likewise.
17159
17160 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17161
17162         * xref.c (GNU_xref_member): Only define/set var I if
17163         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
17164         used.
17165         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
17166         (GNU_xref_end): Fix call.
17167         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
17168         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
17169
17170         * tree.c (build_exception_variant): Delete unused vars I, A, T,
17171         T2, and CNAME.
17172         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
17173         (mapcar): Delete unused var CODE.
17174         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
17175         (break_out_cleanups): Fix call.
17176         (bot_manip): Likewise.
17177         * call.c (build_method_call): Likewise.
17178         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
17179         Likewise.
17180         * typeck.c (unary_complex_lvalue, build_modify_expr,
17181         convert_for_initialization): Likewise.
17182         * typeck2.c (build_functional_cast): Likewise.
17183         * cp-tree.h (build_cplus_new): Fix prototype.
17184
17185         * repo.c (open_repo_file): Delete unused var Q.
17186         (repo_compile_flags, repo_template_declared,
17187         repo_template_defined, repo_class_defined, repo_inline_used,
17188         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
17189         (repo_get_id, repo_vtable_used): Declare as static.
17190         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
17191         prototypes.
17192
17193 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
17194
17195         * parse.y (pending_inlines): Add function_try_block case.
17196
17197         * pt.c (unify): Fix for template const parms.
17198
17199 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17200
17201         * lex.c (extract_interface_info): Delete forward decl.
17202         (default_copy_constructor_body, default_assign_ref_body): Delete
17203         decls for non-existent functions.
17204         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
17205         (init_lex): Delete setting them.
17206         (cons_up_default_function): Delete unused vars FUNC_BUF,
17207         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
17208         #if 0'd synth code.
17209         (toplevel, expression_obstack): Delete unused extern decls.
17210         (tree_node_kind): Delete unused enum.
17211         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
17212         GATHER_STATISTICS.
17213         (tree_node_kind_names): Delete unused extern decl.
17214         (synth_obstack): Delete unused var.
17215         (init_lex): Don't set it.
17216         (init_parse): Add decl before use.
17217         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
17218         (current_unit_{name, language}): Delete unused vars.
17219         (check_newline): Don't bother setting them, just accept the #pragma.
17220         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
17221         (current_unit_{name, language}): Delete decls.
17222
17223         * search.c: Wrap all of the memoized functions, macros, and
17224         variables inside #ifdef GATHER_STATISTICS.
17225         (lookup_field, lookup_fnfields): Likewise.
17226         (init_search_processing): Likewise.
17227         (reinit_search_statistics): Wrap whole function.
17228         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
17229
17230         * decl.c (finish_function): Only call pop_memoized_context if
17231         GATHER_STATISTICS is defined.
17232         (start_function): Likewise for push_memoized_context.
17233         * class.c (pushclass, popclass): Likewise.
17234
17235         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
17236         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
17237
17238         * cvt.c (cp_convert): Delete unused local var FORM.
17239         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
17240         prototypes.
17241
17242 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
17243
17244         * pt.c (do_poplevel): Oops; really return what we get from
17245         poplevel this time.
17246
17247 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17248
17249         * cp-tree.h (is_aggr_type): Add prototype.
17250
17251         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
17252         * method.c ({push,pop}_cp_function_context): Delete decls.
17253         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
17254         (SetUnexpected, SetTerminate): Delete unused vars.
17255         (init_exception_processing): Don't set SetUnexpected or
17256         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
17257         (output_exception_table_entry): Delete unused array LABEL.
17258         (expand_internal_throw): Delete unused var PARAMS.
17259         (expand_start_catch_block): Delete unused var CLEANUP.
17260         (emit_exception_table): Delete unused var EH_NODE_DECL.
17261         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
17262         GOTO_UNWIND_AND_THROW.  Don't set them.
17263         (end_eh_unwinder): Add top decl.
17264         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
17265         (exception_section, push_rtl_perm, do_function_call,
17266         lang_interim_eh, push_eh_cleanup, eh_outer_context,
17267         expand_end_eh_spec, end_eh_unwinder): Declare as static.
17268         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
17269         throw_used): Likewise.
17270         * cp-tree.h (expand_end_eh_spec): Delete prototype.
17271
17272         * search.c (dfs_mark, dfs_mark_vtable_path,
17273         dfs_unmark_vtable_path, dfs_mark_new_vtable,
17274         dfs_unmark_new_vtable, dfs_clear_search_slot,
17275         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
17276         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
17277         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
17278         functions.
17279         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
17280         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
17281         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
17282         Only define #ifdef GATHER_STATISTICS.
17283         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
17284         is defined.
17285         (vbase_decl): Delete var definition.
17286         (init_search): Delete old decl.
17287         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
17288         never actually used.
17289         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
17290         (get_base_distance_recursive): Delete unused fourth arg
17291         BASETYPE_PATH.  Fix call .
17292         (get_base_distance): Fix call.
17293         (push_class_decls): Delete unused var ID.
17294         (make_memoized_table_entry): Declare as static.
17295         (breadth_first_search): Declare as static.
17296         (tree_has_any_destructor_p): Declare as static.
17297         (pop_class_decls): Delete unused arg pop_class_decls.
17298         * class.c (popclass): Fix call to pop_class_decls.
17299         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
17300         tree_has_any_destructor_p): Delete prototypes.
17301
17302         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
17303         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
17304         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
17305         (build_user_desc): Delete unused var T.
17306         (build_class_desc): Delete unused vars T and OFF.
17307         (build_t_desc): Delete unused var NAME_STRING.
17308         (build_headof): Make static.
17309         (get_bad_cast_node): Likewise.
17310         (get_def_to_follow): Likewise.
17311         * cp-tree.h (init_type_desc): Add prototype.
17312         (build_headof): Remove prototype.
17313
17314 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17315
17316         * pt.c (tsubst): Only look for matching decls at file scope for
17317         non-member functions.
17318
17319         * call.c (build_scoped_method_call): Handle scoped destructor
17320         calls in templates.
17321
17322         * decl.c (*_top_level): Also save previous_class_values.
17323
17324         * pt.c (tsubst_expr): Support do {} while loops.
17325         * parse.y (simple_stmt): Likewise.
17326         * tree.def: Likewise.
17327
17328         * method.c (build_overload_identifier): For a class nested in a
17329         template class, don't mangle in the template parms from our
17330         context.
17331
17332         * lex.c, cp-tree.h: Remove support for template instantiations in
17333         the pending_inlines code.
17334         * pt.c: Remove dead functions and unused arguments.
17335         (uses_template_parms): TYPENAME_TYPEs always use template parms.
17336         * parse.y: Stop passing anything to end_template_decl.
17337         * tree.c (print_lang_statistics): Only print tinst info #ifdef
17338         GATHER_STATISTICS.
17339
17340 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17341
17342         * init.c (expand_recursive_init{,_1}): Delete decls.
17343         (sort_member_init): Delete unused var INIT.
17344         (emit_base_init): Delete unused var X.
17345         (build_offset_ref): Delete unused var CNAME.
17346         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
17347         (emit_base_init): Delete unused local var BASE.  Delete extern
17348         decl of IN_CHARGE_IDENTIFIER.
17349         (build_delete): Delete unused local var VIRTUAL_SIZE.
17350
17351         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
17352         (build_delete): Fix call.
17353         * decl2.c (delete_sanity): Likewise.
17354         * cp-tree.h (build_vec_delete): Update prototype.
17355
17356         * typeck.c (common_base_type): Delete unused var TMP.
17357         (build_binary_op): Delete local var ARGS_SAVE.
17358         (build_array_ref): Delete unused var ITYPE.
17359         (c_expand_return): Delete unused var USE_TEMP.
17360
17361         * typeck.c (compexcepttypes): Delete unused arg STRICT.
17362         (comptypes): Fix calls.
17363         * decl.c (duplicate_decls): Likewise.
17364         * cp-tree.h (compexcepttypes): Delete extra arg.
17365
17366         * decl2.c (check_classfn): Delete unused second arg CNAME.
17367         * decl.c (start_decl, grokfndecl): Fix calls.
17368         * init.c (do_friend): Likewise.
17369         * cp-tree.h (check_classfn): Update prototype.
17370
17371         * cp-tree.h (signature_error, import_export_vtable,
17372         append_signature_fields, id_in_current_class, mark_used,
17373         copy_assignment_arg_p): Add decls.
17374         * decl2.c (mark_used): Delete decl.
17375
17376         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
17377
17378         * class.c (get_vtable_entry): Disable unused function.
17379         (doing_hard_virtuals): Delete unused static global var.
17380         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
17381         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
17382         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
17383         (modify_one_vtable): Delete unused var OLD_RTTI.
17384         (finish_struct_anon): Delete unused vars OFFSET and X.
17385         (finish_struct_bits): Delete unused var METHOD_VEC.
17386         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
17387         for-scope local variable METHODS.
17388
17389         * call.c (user_harshness): Delete unused/unneeded arg PARM.
17390         (ideal_candidate): Delete unused args BASETYPE and PARMS.
17391         (build_method_call): Delete unused args passed into ideal_candidate.
17392         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
17393         * cp-tree.h (synthesize_method): Add decl.
17394
17395         * decl.c (note_level_for_for): Give void return type.
17396         (pushdecl_nonclass_level): Likewise.
17397         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
17398         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
17399         (suspend_binding_level): Delete unused var LEVEL.
17400         (duplicate_decls): Delete unused var CTYPE.
17401         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
17402         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
17403         PTR_ENDLINK.
17404         (grokdeclarator): Delete unused var C.
17405         (grokdeclarator): Delete unused var SIZE_VARIES.
17406         (grokparms): Delete unused var SAW_VOID.
17407         (start_function): Delete unused var OLDDECL.
17408         (cplus_expand_expr_stmt): Delete unused var
17409         REMOVE_IMPLICIT_IMMEDIATELY.
17410
17411         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
17412
17413         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
17414
17415 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
17416
17417         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
17418         (build_min_nt): Likewise.
17419         * pt.c (do_pushlevel): Emit line note.
17420         (do_poplevel): Return what we get from poplevel.
17421         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
17422         * parse.y: Use do_pushlevel and do_poplevel.
17423         * cp-tree.h: Declare do_poplevel.
17424
17425         * cp-tree.h: Declare at_eof.
17426         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
17427         * decl2.c (import_export_decl): Renamed from import_export_inline.
17428         (finish_file): Call it to do interface handling for statics.
17429         * pt.c (tsubst_copy): Call mark_used on variables and functions
17430         used here.
17431
17432         * decl2.c (finish_file): Don't emit statics we can't generate.
17433         * pt.c (instantiate_decl): Don't set interface on instantiations
17434         we can't generate.
17435
17436         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
17437         * tree.c (print_lang_statistics): Print max template depth.
17438         * pt.c (push_tinst_level): Dump entire instantiation context.
17439         (instantiate_class_template): Use it and pop_tinst_level.
17440         (instantiate_decl): Likewise.
17441
17442         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
17443         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
17444
17445 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
17446
17447         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
17448         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
17449         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
17450         the new template implementation.
17451
17452 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17453
17454         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
17455
17456 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
17457
17458         * decl.c (cp_finish_decl): Delay emitting the debug information for
17459         a typedef that has been installed as the canonical typedef, if the
17460         type has not yet been defined.
17461
17462 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
17463
17464         * decl2.c (grokfield): Still call pop_nested_class for access decls.
17465
17466 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17467
17468         * decl.c (lookup_label): Call label_rtx.
17469
17470         * decl.c (make_binding_level): New function.
17471         (pushlevel, pushlevel_class): Call it instead of explicit
17472         duplicate calls to xmalloc.
17473
17474         * decl.c (init_decl_processing): Delete useless build_pointer_type
17475         call.
17476
17477         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
17478         (sizet_ftype_string): Delete variable.
17479         (init_decl_processing): Add built-in functions fabsf, fabsl,
17480         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
17481         variable strlen_ftype, used for strlen.
17482
17483 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
17484
17485         * decl.c (push_to_top_level): Start from current_binding_level
17486         again for now; the stl hacks depend on g++ being broken in this
17487         way, and it'll be fixed in the template rewrite.
17488
17489         * tree.def: Add USING_DECL.
17490         * decl2.c (do_class_using_decl): Implement.
17491         (grokfield): Pass access decls off to do_class_using_decl instead of
17492         grokdeclarator.
17493         * error.c (dump_decl): Handle USING_DECLs.
17494         * decl.c (grokdeclarator): Remove code for handling access decls.
17495         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
17496         as access decls for now.
17497         (finish_struct): Don't check USING_DECLs for other uses of the name.
17498
17499         * search.c (get_matching_virtual): Use cp_error_at.
17500
17501 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17502
17503         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
17504         match c-typeck.c.
17505         (self_promoting_args_p): Move the check that TYPE is non-nil
17506         before trying to look at its main variant.
17507         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
17508
17509         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
17510         Delete macros.
17511         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
17512         (do_friend): Delete call to xref_friend.
17513         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
17514
17515         * typeck.c (convert_sequence): #if 0 unused function.
17516
17517         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
17518         be in decl_in_memory_p.
17519         (decl_in_memory_p): Delete decl.
17520         * expr.c (decl_in_memory_p): Delete fn.
17521         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
17522
17523         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
17524
17525 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
17526
17527         * class.c (finish_struct_1): Check for a pure-specifier on a
17528         non-virtual function here.
17529
17530         * decl2.c (grok_function_init): Don't check whether the function
17531         is virtual here.
17532         (grokfield): Don't call check_for_override here.
17533
17534         * decl.c (push_to_top_level): Start from inner_binding_level,
17535         check class_shadowed in class levels.
17536
17537 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
17538
17539         * decl.c (resume_level): Ignore things that don't have names, instead
17540         of core dumping.
17541
17542 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17543
17544         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
17545
17546 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
17547
17548         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
17549         synthesized dtor.
17550
17551         * parse.y (complete_type_name): Bind global_scope earlier.
17552         (complex_type_name): Likewise.
17553         (qualified_type_name): Remove.
17554
17555 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
17556
17557         * decl.c (grokfndecl): Move code that looks for virtuals in base
17558         classes...
17559         * class.c (check_for_override): ... to a new function.
17560         (finish_struct_1): Call it.
17561
17562         * cp-tree.h: Declare warn_sign_compare.
17563
17564         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
17565         rather than extra_warnings to decide whether to warn about
17566         comparison of signed and unsigned.
17567
17568         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
17569         implies -Wsign-compare.  -Wall doesn't imply -W.
17570
17571 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
17572
17573         * typeck.c (build_component_ref): Fix to handle anon unions in base
17574         classes as well.
17575
17576 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17577
17578         * class.c (resolves_to_fixed_type_p): Delete code dealing with
17579         a WITH_CLEANUP_EXPR, since we don't generate them any more.
17580         * cvt.c (build_up_reference): Likewise.
17581         * decl.c (grok_reference_init): Likewise.
17582         (cp_finish_decl): Likewise.
17583         * error.c (dump_expr): Likewise.
17584         * tree.c (real_lvalue_p): Likewise.
17585         (lvalue_p): Likewise.
17586         (build_cplus_new): Likewise.
17587         (unsave_expr_now): Likewise.
17588         * typeck.c (unary_complex_lvalue, build_modify_expr,
17589         c_expand_return): Likewise.
17590
17591 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17592
17593         Make the C++ front-end pay attention to attributes for structures.
17594         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
17595         finish_struct_1.
17596         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
17597         Take out old round_up_size use and setting the DECL_ALIGN possibly
17598         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
17599         can override what the attribute set.
17600         * cp-tree.h (finish_struct): Update prototype.
17601         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
17602         attributes to finish_struct.
17603         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
17604         value down into finish_struct.
17605         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
17606
17607 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
17608
17609         * decl.c (poplevel):  Re-word dead for local handling.
17610         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
17611         (cp_finish_decl):  If is_for_scope, check for duplicates so
17612         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
17613
17614         * lex.c (do_identifier):  Use global binding in preference of
17615         dead for local variable.
17616
17617 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
17618
17619         * init.c (initializing_context): Handle anon union changes, the
17620         context where fields of anon unions can be initialized now has to be
17621         found by walking up the TYPE_CONTEXT chain.
17622
17623 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
17624
17625         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
17626         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
17627         (obscure_complex_init): If bss is supported, always set
17628         DECL_INITIAL to error_mark_node.
17629
17630 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17631
17632         * init.c (is_friend): Make sure there's a context before we see if
17633         it's an aggr type.
17634
17635 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
17636
17637         * init.c (is_friend): Classes are not friendly with nested classes.
17638
17639 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
17640
17641         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
17642         and record its result.
17643
17644 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
17645
17646         * class.c (finish_struct_anon): Switch around code to not move anon
17647         union elements around, nor mess up their contexts, nor offsets,
17648         instead we now build up the right number of COMPONENT_REFs for all
17649         the anon unions that may be present at build_component_ref time.
17650         * typeck.c (lookup_anon_field): New routine to handle field lookup
17651         on fields without names.  We find them, based upon their unique type
17652         instead.
17653         * typeck.c (build_component_ref): Allow FIELD_DECL components.
17654         Handle finding components in anonymous unions, and ensure that a
17655         COMPONENT_REF is built for each level as necessary.
17656
17657 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
17658
17659         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
17660         code that ensures that copy ctors are used if appropriate.
17661
17662 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17663
17664         * init.c (build_vec_delete): Only give an error if base isn't an
17665         error_mark_node.
17666
17667 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
17668
17669         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
17670         (yylex): If we see `new', keep slurping.
17671
17672 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
17673
17674         * class.c (finish_struct_1): Move code for handling anon unions...
17675         (finish_struct_anon): to here.  Fixup so that we do the offset
17676         calculations right, and so that the fields are physically moved to
17677         the containers's chain.
17678
17679 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17680
17681         * decl.c (grokdeclarator): Avoid trying to get an operand off an
17682         identifier node.
17683
17684 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
17685
17686         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
17687         POINTER_SIZE to agree with expr.c.
17688
17689 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
17690
17691         * search.c (lookup_field): Don't report ambiguities if protect is 0,
17692         instead return NULL_TREE.
17693
17694 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
17695
17696         * class.c (finish_struct_1): Call warn_hidden if we want warnings
17697         about overloaded virtual functions.
17698         (warn_hidden): New routine to warn of virtual functions that are
17699         hidden by other virtual functions, that are not overridden.
17700         (get_basefndecls): New routine, used by warn_hidden.
17701         (mark_overriders): New routine, used by warn_hidden.
17702         * search.c (get_matching_virtual): Remove old warning that just
17703         isn't very useful.
17704
17705 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17706
17707         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
17708
17709         * typeck.c (null_ptr_cst_p): Delete unused fn.
17710         (build_function_call_maybe): Delete unused fn.
17711
17712         * expr.c (extract_init): #if 0 the code after unconditional return 0
17713         for now.
17714
17715         Delete old cadillac code.
17716         * edsel.c: Remove file.
17717         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
17718         * Makefile.in (CXX_OBJS): Delete edsel.o.
17719         (edsel.o): Delete rule.
17720         * cp-tree.h (flag_cadillac): Delete var decl.
17721         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
17722         * decl2.c (flag_cadillac): Delete var definition.
17723         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
17724         (grokfield): Delete code depending on flag_cadillac.
17725         (finish_anon_union): Likewise.
17726         * class.c (finish_struct_1): Likewise.
17727         (pushclass): Likewise.
17728         (popclass): Likewise.
17729         (push_lang_context): Likewise.
17730         (pop_lang_context): Likewise.
17731         * decl.c (init_decl_processing): Likewise.
17732         (start_decl): Likewise.
17733         (cp_finish_decl): Likewise.
17734         (xref_tag): Likewise.
17735         (finish_enum): Likewise.
17736         (start_function): Likewise.
17737         (finish_function): Likewise.
17738         (finish_stmt): Likewise.
17739         * lex.c (lang_init): Likewise.
17740         (check_newline): Likewise.
17741
17742         * lex.c (do_pending_inlines): Delete synthesized method kludge.
17743
17744         Delete defunct, ancient garbage collection implementation.
17745         * rtti.c: New file with the RTTI stuff from gc.c.
17746         * gc.c: Removed file (moved the remaining stuff into rtti.c).
17747         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
17748         (rtti.o): New rule, replacing gc.o.
17749         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
17750         * cp-tree.h: Delete gc-related fn decls.
17751         (DECL_GC_OFFSET): Delete macro.
17752         (flag_gc): Delete extern decl.
17753         * decl.c (current_function_obstack_index): Delete var decl.
17754         (current_function_obstack_usage): Delete var decl.
17755         (start_function): Delete clearing of current_function_obstack_index
17756         and current_function_obstack_usage.
17757         (init_decl_processing): Delete code relying on -fgc.
17758         Delete call to init_gc_processing.
17759         (cp_finish_decl): Delete calls to build_static_gc_entry and
17760         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
17761         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
17762         and to expand_expr of a __gc_main call.
17763         (maybe_gc_cleanup): Delete var decl.
17764         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
17765         * decl2.c (flag_gc): Delete var decl.
17766         (lang_f_options): Delete offering of -fgc.
17767         (lang_decode_option): Delete -fgc and -fno-gc handling.
17768         (get_temp_regvar): Delete gc code.
17769         * init.c (build_new): Delete gc code.
17770         * lex.c (init_lex): Delete checking of flag_gc.
17771
17772         * typeck.c (convert_arguments): Delete gc code.
17773         (build_component_addr): Delete -fgc warning.
17774         (build_modify_expr): Delete gc code.
17775
17776         * decl2.c (build_push_scope): Delete fn.
17777         * cp-tree.h (build_push_scope): Delete decl.
17778
17779         * search.c (clear_search_slots): Delete fn.
17780         * cp-tree.h (clear_search_slots): Delete decl.
17781
17782         * search.c (tree_needs_constructor_p): Delete fn.
17783         * cp-tree.h (tree_needs_constructor_p): Delete decl.
17784
17785         * tree.c (id_cmp): Delete fn.
17786
17787         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
17788         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
17789
17790         * tree.c (decl_value_member): Delete fn.
17791         * cp-tree.h (decl_value_member): Delete decl.
17792
17793         * tree.c (list_hash_lookup_or_cons): Delete fn.
17794         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
17795
17796         * method.c (cplus_exception_name): Delete fn.
17797         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
17798
17799         * spew.c (shift_tokens): Delete fn.
17800
17801 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17802
17803         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
17804         to cp_finish_decl.
17805         * parse.y: Likewise.
17806
17807 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17808
17809         * tree.c (build_cplus_staticfn_type): Delete function definition;
17810         never used.
17811         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
17812
17813         * tree.c (virtual_member): Delete function definition; never used.
17814         * cp-tree.h (virtual_member): Delete decl.
17815
17816 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
17817
17818         * typeck.c (build_component_ref): Handle getting vbase pointers
17819         out of complex multiple inheritance better.
17820
17821 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
17822
17823         * typeck.c (build_object_ref): Make sure we use the real type, not
17824         any reference type.
17825
17826 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
17827
17828         * tree.c (build_exception_variant): Don't create new types if we
17829         don't have to, also build new types on the right obstack.
17830
17831 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
17832
17833         * decl.c (store_bindings): Split out from push_to_top_level.
17834         (push_to_top_level): Call it for b->type_shadowed on class binding
17835         levels.
17836
17837 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
17838
17839         * search.c (expand_upcast_fixups): Fix so that offsets stored in
17840         vbase_offsets are always right.  Fixes a problem where virtual base
17841         upcasting and downcasting could be wrong during conversions on this
17842         during virtual function dispatch at ctor/dtor time when dynamic
17843         vtable fixups for deltas are needed.  This only sounds easier than
17844         it is.  :-)
17845         (fixup_virtual_upcast_offsets): Change to reflect new calling
17846         convention for expand_upcast_fixups.
17847
17848 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17849
17850         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
17851         check that it's usable as the bitfield width.
17852
17853 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17854
17855         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
17856         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
17857         only ever used for functions in it.
17858
17859 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
17860
17861         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
17862         (nested_type): Likewise.
17863         (nested_name_specifier): Use lastiddecl.
17864
17865         * decl.c (grokdeclarator): Adjust accordingly.
17866         * init.c (expand_member_init): Likewise.
17867         * parse.y (base_class): Likewise.
17868         * typeck2.c (build_functional_cast): Likewise.
17869
17870         * typeck2.c (build_functional_cast): Fill in name after we've
17871         checked for non-aggr type.
17872
17873 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
17874
17875         * decl2.c (warn_pointer_arith): Default to on.
17876
17877 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
17878
17879         * lex.c (is_rid): New function.
17880         * decl.c (grokdeclarator): Diagnose reserved words used as
17881         declarator-ids.
17882
17883 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
17884
17885         * tree.c (get_decl_list): Don't lose cv-quals.
17886
17887         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
17888         typespecs used as declarator-ids.
17889
17890 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
17891
17892         * decl.c (poplevel): When poping a level, don't give a warning for
17893         any subblocks that already exist.
17894
17895 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17896
17897         * typeck.c (build_object_ref): Finish what I started.
17898
17899         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
17900
17901         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
17902
17903         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
17904         scope.
17905
17906 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
17907
17908         * decl.c (xref_tag): Handle passing a type in directly.
17909
17910         * parse.y (qualified_type_name): Pull out the type.
17911         (nested_type): Likewise.
17912         Take types directly instead of as identifiers.
17913         * call.c (build_scoped_method_call): Take types directly instead of
17914         as identifiers.
17915         * decl.c (xref_basetypes): Likewise.
17916         * init.c (expand_member_init): Likewise.
17917         (build_member_call): Likewise.
17918         (build_offset_ref): Likewise.
17919         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
17920         * method.c (do_build_assign_ref): Likewise.
17921         * decl.c (grokdeclarator): Handle a type appearing as the
17922         declarator-id for constructors.
17923         * method.c (do_build_copy_constructor): current_base_init_list now
17924         uses the types directly, not their names.
17925         * init.c (sort_base_init): Likewise.
17926         (expand_member_init): Likewise.
17927         * init.c (is_aggr_type): New function, like is_aggr_typedef.
17928
17929 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
17930
17931         * tree.c (layout_basetypes): Call build_lang_field_decl instead
17932         of build_lang_decl if first arg is a FIELD_DECL.
17933
17934 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17935
17936         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
17937         non-empty.
17938         * except.c (expand_start_catch_block): Set TREE_USED to avoid
17939         warnings about the catch handler.
17940
17941 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
17942
17943         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
17944         expand_target_expr.
17945
17946 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17947
17948         Fix access control to use trees rather than integers.
17949         * class.c (access_{default, public, protected, private,
17950         default_virtual, public_virtual, private_virtual}_node): Add
17951         definitions.
17952         (init_class_processing): Do creation of those nodes.
17953         * cp-tree.h (access_type): Delete enum decl.
17954         (access_{default, public, protected, private, default_virtual,
17955         public_virtual, private_virtual}_node): Add decls.
17956         (compute_access): Change return type.
17957         * search.c (compute_access): Have tree return type, instead of enum.
17958         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
17959         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
17960         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
17961         * parse.y (VISSPEC): Make ttype rather than itype.
17962         (base_class_access_list): Likewise.
17963         * *.[cy]: Change all refs of `access_public' to `access_public_node',
17964         etc.
17965         * call.c (build_method_call): Make ACCESS be a tree.
17966         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
17967         * cvt.c (convert_to_aggr): Likewise.
17968         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
17969         Likewise.
17970         * method.c (hack_identifier): Likewise.
17971         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
17972
17973 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
17974
17975         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
17976         frontend, and make it more consistent with respect to
17977         warn_pointer_arith.
17978
17979 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
17980
17981         * decl.c (pushdecl): Check for duplicate parameter names.
17982
17983 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
17984
17985         * decl.c (expand_static_init): Call assemble_external for atexit.
17986
17987 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
17988
17989         * except.c (do_unwind): Remove some generated dead code.
17990         (eh_outer_context): New routine, factor out some common code from
17991         expand_builtin_throw and end_eh_unwinder.  Add code to do return
17992         address masking for the PA.
17993         (expand_builtin_throw): Use eh_outer_context instead of open coding
17994         it here.
17995         (end_eh_unwinder): Likewise.
17996
17997 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
17998
17999         * except.c (expand_throw): Call assemble_external for __empty, if we
18000         use it.
18001
18002 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
18003
18004         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
18005         NORMAL_RETURN_ADDR_OFFSET.
18006         (end_eh_unwinder): Likewise.
18007
18008 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
18009
18010         * gc.c (build_dynamic_cast): Make sure we don't cast away const
18011         when dealing with references, and make sure we handle dynamic
18012         casting to a cv qualified reference.
18013
18014 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
18015
18016         * except.c (struct eh_context): New structure top hold eh context
18017         information.
18018         (push_eh_context): New routine.
18019         (pop_eh_context): Likewise.
18020         * decl.c (push_cp_function_context): Use them.
18021         (pop_cp_function_context): Likewise.
18022
18023 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
18024
18025         * decl2.c (finish_file): Also prune uninteresting functions in the
18026         inline emission loop.
18027
18028 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
18029
18030         * sig.c (build_signature_table_constructor): Mark functions
18031         in the signature as referenced.
18032
18033 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
18034
18035         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
18036         the inline emission stuff.
18037
18038 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
18039
18040         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
18041         weak symbols.
18042         * lang-options.h: Add -f{no-,}weak.
18043         * decl.c (init_decl_processing): If the target does not support weak
18044         symbols, don't use them.
18045         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
18046
18047 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
18048
18049         * init.c (expand_member_init): warning for base init after members.
18050
18051 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
18052
18053         * cvt.c (build_expr_type_conversion): Don't convert to a reference
18054         type.
18055
18056 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
18057
18058         * method.c (report_type_mismatch): Improve wording for volatile
18059         mismatches.
18060
18061 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
18062
18063         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
18064         expand_assignment, as the later doesn't handle things that have
18065         copy constructors well.  The compiler would do bitwise copying,
18066         instead of ctor calling in some cases.
18067
18068 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
18069
18070         * g++.c (my_strerror): Return "cannot access" if errno is 0.
18071         (pfatal_with_name, perror_exec): Don't assume that
18072         the returned value from my_strerror contains no '%'s.
18073         (concat): Remove.
18074         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
18075
18076 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
18077
18078         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
18079         TYPE_METHODS/TREE_CHAIN mean what they used to.
18080         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
18081         instead of TYPE_METHODS.
18082         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
18083         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
18084         * cp-tree.h (CLASSTYPE_METHODS): Lose.
18085         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
18086         TYPE_METHODS.
18087         (struct lang_decl): Lose next_method field.
18088         (DECL_NEXT_METHOD): Lose.
18089         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
18090         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
18091         anymore.
18092         (finish_struct_methods): Don't mess with the TREE_CHAINs in
18093         fn_fields.
18094
18095         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
18096         vector.
18097
18098         * call.c (build_method_call): Synthesize here even when not inlining.
18099         * typeck.c (build_function_call_real): Likewise.
18100
18101 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
18102
18103         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
18104         == DBX_DEBUG, call dbxout_start_new_source_file and
18105         dbxout_resume_previous_source_file when appropriate.
18106
18107 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
18108
18109         * except.c (start_anon_func): Push to the top level.
18110         (end_anon_func): Pop from the top level.
18111
18112 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
18113
18114         * cp-tree.h (build_cleanup): New routine to build cleanups.
18115         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
18116         call at ctor time and use atexit to run it later.
18117         * decl2.c (build_cleanup): New routine, taken from finish_file.
18118         (finish_file): Use build_cleanup instead, and don't put function
18119         local statics in global dtor list.
18120
18121 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
18122
18123         * except.c (expand_throw): Ensure that we have cleanups, if we try
18124         and expand cleanups.
18125
18126 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
18127
18128         * except.c (expand_throw): Add logic to manage dynamic cleanups for
18129         the EH object.
18130         (expand_end_catch_block): Use the magic of expand_goto, instead of
18131         emit_jump so that we get the cleanup for any catch clause parameter
18132         and the cleanup for the exception object.  Update to reflect label
18133         changes.
18134         (push_eh_cleanup): New routine to register a cleanup for an
18135         exception object.
18136         (empty_fndecl): Used to default cleanup actions to
18137         nothing.
18138         (init_exception_processing): Setup empty_fndecl.  Setup
18139         saved_cleanup.
18140         (expand_start_catch_block): Update to reflect label changes.  Call
18141         push_eh_object to register the cleanup for the EH object.
18142         (start_anon_func): New routine to start building lambda expressions
18143         from trees.
18144         (end_anon_func): New routine to end them.
18145         (struct labelNode): Change so that we can use tree labels, or rtx
18146         labels.
18147         (saved_cleanup): Object to check for dynamic cleanups for the
18148         exception handling object.
18149         (push_label_entry): Change so that we can use tree labels, or rtx
18150         labels.
18151         (pop_label_entry): Likewise.
18152         (top_label_entry): Likewise.
18153         (expand_start_all_catch): Use tree label instead of rtx label, so
18154         that we can get the magic of expand_goto.
18155         (expand_end_all_catch): Update to reflect label changes.
18156
18157         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
18158         use UNSAVE_EXPRs.
18159         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
18160         building_cleanup logic, as we now use UNSAVE_EXPRs.
18161         * cp-tree.h (unsave_expr): Declare it.
18162         * decl.c (building_cleanup): Remove.
18163         (maybe_build_cleanup): Remove building_cleanup logic, and use
18164         UNSAVE_EXPR instead.
18165
18166 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
18167
18168         * gc.c (build_t_desc): Update error message to say <typeinfo>.
18169
18170 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18171
18172         * decl.c (pushdecl): Only warn about shadowing a local variable if
18173         warn_shadow is true.
18174
18175 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
18176
18177         * typeck.c (build_binary_op_nodefault): Added warning about
18178         comparisons between different enum types with -Wall, unless
18179         -fenum-int-equiv set.
18180
18181 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
18182
18183         * class.c (finish_struct_1): Skip down to the inner type in
18184         multidimensional arrays.  Ensures ctors will be made for types that
18185         need constructing.
18186
18187 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
18188
18189         * decl.c (last_dtor_insn): New to track the last compiler generated
18190         insn in a dtor.
18191         (store_parm_decls): Set it.
18192         (finish_function): Use it to see if the dtor is empty.  Avoid doing
18193         vtable setup all the time, if we can.
18194         (struct cp_function): Add last_dtor_insn.
18195         (push_cp_function_context): Save it.
18196         (pop_cp_function_context): Restore it.
18197
18198 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
18199
18200         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
18201         warnings.
18202
18203 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
18204
18205         * typeck.c (expand_target_expr): Make sure targets get put into the
18206         current temp_slot_level, so that the free_temp_slots call will reuse
18207         them.
18208
18209 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
18210
18211         * class.c (finish_struct_1): Delay delta fixups for virtual bases
18212         until after we have done the hard virtuals, to avoid a bogus `every
18213         virtual function must have a unique final overrider' for virtual
18214         functions that are only overridden by hard virtuals.
18215
18216 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
18217
18218         * pt.c (do_function_instantiation): Don't try to find a file-scope
18219         template for a member function.
18220
18221 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
18222
18223         * g++.c (main): Add handling of -nodefaultlibs.
18224
18225 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
18226
18227         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
18228         distinguish between direct bindings of reference variables, and
18229         indirect bindings of reference variables.
18230         * cvt.c (build_up_reference): Use it.
18231         * typeck.c (convert_arguments): Use it to indicate this is an
18232         indirect binding.
18233         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
18234         as they are unused.
18235         (expand_static_init): Likewise.
18236         (cplus_expand_expr_stmt): Likewise.
18237         * decl2.c (finish_file): Likewise.
18238         * init.c (perform_member_init): Likewise.
18239         (emit_base_init): Likewise.
18240         (expand_aggr_vbase_init_1): Likewise.
18241
18242 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18243
18244         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
18245         get a DECL_LANG_SPECIFIC node.
18246         * cp-tree.h (lang_decl_flags): Add new member `level'.
18247         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
18248         decl_flags level member.
18249
18250 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18251
18252         * call.c (build_method_call): Make sure instance has a
18253         TYPE_LANG_SPECIFIC node before we dive into it.
18254
18255 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
18256
18257         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
18258
18259 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
18260
18261         * decl.c (duplicate_decls): When smashing decls, smash staticness in
18262         the usual way.
18263
18264 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
18265
18266         * decl.c (poplevel): Handle the merging of subblocks of cleanups
18267         when finishing blocks that have already been created (usually due to
18268         the fixup goto code).  Fixes bad debugging information.
18269
18270 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
18271
18272         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
18273         that's not a list of overloaded functions.
18274
18275 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18276
18277         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
18278         before trying to use DECL_ABSTRACT_VIRTUAL_P.
18279
18280 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
18281
18282         * decl2.c (mark_used): New function for hooking into setting of
18283         TREE_USED on decls.
18284         * call.c (build_method_call): Use it.
18285         * class.c (instantiate_type): Likewise.
18286         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
18287         for all like-named functions.
18288         * method.c (hack_identifier): Likewise.
18289         (emit_thunk): Don't call assemble_external.
18290         (make_thunk): Create thunk as a FUNCTION_DECL so that it
18291         gets the right mode and ENCODE_SECTION_INFO works.
18292
18293         * parse.y: Use mark_used.  Pass operator names to do_identifier.
18294         * lex.c (do_identifier): Handle operator names.
18295
18296         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
18297
18298 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18299
18300         * errfn.c: Include stdio.h.
18301         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
18302
18303 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
18304
18305         * typeck2.c (digest_init): Always convert initializers to the
18306         right type.
18307
18308 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
18309
18310         * init.c (member_init_ok_or_else): Don't allow member initializers
18311         for indirect members, as it is invalid.
18312
18313 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18314
18315         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
18316
18317 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
18318
18319         * parse.y (for.init.statement): Catch compound statements inside for
18320         initializations, if we're being pedantic.
18321
18322 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
18323
18324         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
18325         looking for.
18326
18327 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
18328
18329         * error.c (dump_expr): Don't core dump when a boolean expression is
18330         used as a default argument.
18331
18332 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
18333
18334         * class.c (finish_struct_bits): Check aggregate_value_p instead of
18335         RETURN_IN_MEMORY.
18336
18337 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
18338
18339         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
18340         BLKmode type that would otherwise be returned in registers.
18341
18342 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18343
18344         * g++.c (WITHLIBC): New macro.
18345         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
18346         saw_libc and pass it at the end if it was set.
18347
18348 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18349
18350         * parse.y (fn.def1): Call split_specs_attrs in
18351         declmods notype_declarator case.