OSDN Git Service

295be198d2c966080fca833ec65e766825e3c4eb
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
2
3         * call.c (standard_conversion): Accept conversion between
4         COMPLEX_TYPEs 
5
6         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE
7
8 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
9
10         * decl2.c (finish_file): Remove double setup for accounting
11         compile time.
12
13 2000-04-24  Robert Lipe <robertlipe@usa.net>
14
15         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
16
17 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
18
19         * new.cc (set_new_handler): Needs to be in std::.
20
21 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
22
23         * cp-tree.h (lang_decl): Remove pretty_function_p.
24         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
25         language-specific node.
26         * decl.c (cp_make_fname_decl): Use build_decl, not
27         build_lang_decl, to build the variables.
28         (grokvardecl): Don't call build_lang_decl for local variables in
29         templates.
30         (grokdeclarator): Don't call build_lang_decl for local type
31         declarations in templates.
32         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
33         zero'd memory, rather than calling memset.
34         * pt.c: Include hashtab.h.
35         (local_specializations): New variable.
36         (retrieve_local_specialization): Use it.
37         (register_local_specialization): Likewise.
38         (tsubst_decl): Don't assume local variables have
39         DECL_LANG_SPECIFIC.
40         (instantiate_decl): Set up local_specializations.
41         * Makefile.in (HTAB_H): New variable.
42
43 2000-04-23  Richard Henderson  <rth@cygnus.com>
44
45         * typeck.c (c_expand_asm_operands): Restore the original
46         contents of the output list.
47
48 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
49
50         * ir.texi:  Document complex number representation.
51         
52 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
53
54         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
55         (target_incomplete_p): New function.
56         (tinfo_base_init): Create comdat NTBS name variable.
57         (ptr_initializer): Add non_public parameter. Calculate it.
58         (ptmd_initializer): Likewise.
59         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
60         (create_real_tinfo_var): Add non_public parameter. Use it.
61         Push proxy into global namespace.
62         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
63         New enumeration.
64         * inc/typeinfo (type_info::before, type_info::operator==):
65         Compare __name addresses.
66         
67         * tinfo2.cc: Remove new-abi builtins comment.
68
69 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
70
71         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
72
73         * call.c (joust): Exit early if we get the same function, too.
74
75         * decl2.c (key_method): Return NULL_TREE for template classes.
76         (import_export_class): Don't need to check for template classes.
77
78 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
79
80         * lex.c: Remove references to cccp.c.
81
82 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
83
84         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
85         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
86         (DECL_DESTRUCTOR_P): Use destructor_attr.
87         (DECL_CONST_MEMFUNC_P): Reimplement.
88         (DECL_VOLATILE_MEMFUNC_P): Remove.
89         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
90         (overrides): Use DECL_DESTRUCTOR_P.
91         (check_for_override): Likewise.
92         * decl.c (start_function): Likewise.
93         * decl2.c (grokfclassfn): Likewise.
94         (check_classfn): Likewise.
95         (grok_function_init): Likewise.
96
97 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
98
99         * decl2.c (grokfield): Issue error on illegal data member
100         declaration.
101
102 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
103
104         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
105
106 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
107
108         * class.c (build_vtable_entry): Don't build thunks for type-info
109         functions.
110
111 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
112
113         * decl.c (decls_match): Allow a redeclaration of a builtin to
114         specify args while the builtin did not.
115
116 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
117
118         * cp-tree.def (THUNK_DECL): Add to documentation.
119         * cp-tree.h (flag_huge_objects): Declare.
120         * class.c (modify_vtable_entry): Tidy.
121         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
122         Calculate delta appropriately for the new ABI.
123         (dfs_modify_vtables): Use it.
124         (modify_all_vtables): Fix thinko in code to add overriding copies
125         of functions to primary vtables.
126         (build_clone): Fix typo in comment.
127         (clone_function_decl): Correct order of destructors in vtable.
128         (build_vbase_offset_vtbl_entries): Adjust comment.
129         (dfs_vcall_offset_queue_p): Remove.
130         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
131         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
132         (build_vtable_entry): Correct check for pure virtual functions.
133         Don't declare flag_huge_objects.
134         * decl.c (flag_huge_objects): Remove declaration.
135         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
136         Use int_size_in_bytes.
137         (emit_thunk): Handle vcall offset thunks.
138         
139 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
140
141         * decl2.c (parse_time, varconst_time): Delete declarations.
142         (finish_file): Delete LINENO declaration.
143         START_TIME and THIS_TIME now long.
144
145 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
146
147         * class.c (build_base_field): Reformat comment.
148         
149         * inc/cxxabi.h (stddef.h): Comment inclusion.
150         (__base_class_info::__offset): Comment shift.
151
152 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
153
154         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
155         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
156         (cp_push_exception_identifier): New macro.
157         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
158         (DECL_BASE_DESTRUCTOR_P): Likewise.
159         (DECL_DELETING_DESTRUCTOR_P): Likewise.
160         (get_vtbl_decl_for_binfo): Fix formatting.
161         (in_charge_arg_for_name): New macro.
162         (maybe_build_cleanup_and_delete): Remove declaration.
163         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
164         (in_charge_arg_for_name): New function.
165         (build_new_method_call): Use it.  Handle cloned destructors.
166         (build_clone): Don't make the base constructor virtual.
167         Automatically defer generated functions.
168         (clone_function_decl): Handle destructors, too.
169         (clone_constructors_and_destructors): Likewise.
170         (create_vtable_ptr): Don't create a vtable entry for a cloned
171         function.
172         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
173         (initialize_predefined_identifiers): Update appropriately.
174         (finish_destructor_body): Simplify.
175         (maybe_build_cleanup_and_delete): Remove.
176         * except.c (expand_throw): Handle new-ABI destructors.
177         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
178         (build_dtor_call): New function.
179         (build_delete): Use it.  Simplify.
180         * optimize.c (maybe_clone_body): Handle destructors.
181         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
182         
183         * exception.cc (cleanup_fn): New typedef.
184         (CALL_CLEANUP): New macro.
185         (cp_eh_info): Use them.
186         (__cp_push_exception): Likewise.
187         (__cp_pop_exception): Likewise.
188         
189 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
190
191         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
192         (complete_dtor_identifier): New macro.
193         (CLASSTYPE_FIRST_CONVERSION): Remove.
194         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
195         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
196         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
197         (CLASSTYPE_CONSTRUCTORS): Likewise.
198         (CLASSTYPE_DESTRUCTORS): Likewise.
199         (lang_decl): Add cloned_function.
200         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
201         (DECL_BASE_CONSTRUCTOR_P): Likewise.
202         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
203         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
204         (DECL_CLONED_FUNCTION_P): Likewise.
205         (DECL_CLONED_FUNCTION): Likewise.
206         (clone_function_decl): Declare.
207         (maybe_clone_body): Likewise.
208         * call.c (build_user_type_conversion_1): Call complete object
209         constructors in the new ABI.
210         (build_new_method_call): Don't add in-charge parameters under the
211         new ABI.
212         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
213         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
214         CLASSTYPE_DESTRUCTOR_SLOT.
215         (build_clone): New function.
216         (clone_function_decl): Likewise.
217         (clone_constructors_and_destructors): Likewise.
218         (check_bases_and_members): Use it.
219         * decl.c (iniitialize_predefined_identifiers): Initialize
220         complete_dtor_identifier.
221         (finish_function): Don't add extra code to a clone.
222         (lang_mark_tree): Mark cloned_function.
223         * decl2.c (mark_used): Don't bother trying to instantiate things
224         we synthesized.
225         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
226         * method.c (set_mangled_name_for_decl): Don't treat clones as
227         constructors.
228         (synthesize_method): Sythesize cloned functions, not the clones.
229         * optimize.c (inline_data): Update comment on ret_label.
230         (remap_block): Don't assume DECL_INITIAL exists.
231         (copy_body_r): Allow ret_label to be NULL.
232         (maybe_clone_body): Define.
233         * pt.c (tsubst_decl): Handle clones.
234         (instantiate_clone): New function.
235         (instantiate_template): Use it.
236         (set_mangled_name_for_template_decl): Don't treat clones as
237         constructors.
238         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
239         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
240         * semantics.c (expand_body): Clone function bodies as necessary.
241         
242         * optimize.c (remap_decl): Avoid sharing structure for arrays
243         whose size is only known at run-time.
244         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
245
246         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
247         to has_in_charge_parm_p.
248         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
249         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
250         (DECL_COPY_CONSTRUCTOR_P): New macro.
251         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
252         (build_user_type_conversion_1): Likewise.
253         (convert_like_real): Likewise.
254         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
255         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
256         (copy_args_p): Likewise.
257         (grok_ctor_properties): Likewise.
258         (start_function): Likewise.
259         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
260         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
261         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
262         * method.c (do_build_copy_constructor): Use
263         DECL_HAS_IN_CHARGE_PARM_P.
264         (synthesize_method): Likewise.
265         * pt.c (instantiate_template): Remove goto.
266         * tree.c (build_cplus_method_type): Remove mention of obstacks in
267         comment.
268         
269         * cp-tre.h (finish_function): Change prototype.
270         * decl.c (end_cleanup_fn): Adjust caller.
271         (finish_function): Take only one parameter.
272         * decl2.c (finish_objects): Adjust caller.
273         (finish_static_storage_duration_function): Likewise.
274         * method.c (emit_thunk): Likewise.
275         * parse.y: Likewise.
276         * parse.c: Regenerated.
277         * pt.c (instantiate_decl): Likewise.
278         * rtti.c (synthesize_tinfo_fn): Likewise.
279         * semantics.c (expand_body): Likewise.
280
281         * cp-tree.h (copy_decl): New function.
282         * class.c (finish_struct_1): Use it.
283         * lex.c (copy_decl): Define it.
284         * pt.c (tsubst_decl): Likewise.
285         * tree.c (copy_template_template_parm): Likewise.
286         
287         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
288         has_nonpublic_assign_ref.
289         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
290         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
291         * class.c (finish_struct_methods): Don't set
292         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
293         (interface_only): Don't declare.
294         (interface_unknown): Likewise.
295
296 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
297
298         * tree.h (HAVE_TEMPLATES): Remove definition.
299         * lang-options.h (-fthis-is-variable): Remove documentation.
300
301 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
302
303         * class.c (instantiate_type): Handle object-relative template-id.
304
305         * semantics.c (finish_expr_stmt): Call convert_to_void here.
306         * decl.c (cplus_expand_expr_stmt): Not here.
307
308         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
309         Initialize exprtype earlier.
310
311         * parse.y (fn.def1): Check for defining types in return types.
312
313         * decl.c (check_tag_decl): Notice extra fundamental types.
314         Diagnose empty decls in classes, too.
315
316         * decl.c (grokdeclarator): Don't override an anonymous name if no 
317         declarator was given.
318
319         * cvt.c (convert_to_void): Call resolve_offset_ref.
320
321         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
322
323         * decl2.c (decl_namespace): Handle getting a type.
324
325         * typeck.c (build_c_cast): Re-enable warning for cast between
326         pointer and integer of different size.
327
328 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
329
330         * inc/cxxabi.h (__pointer_type_info): Add restrict and
331         incomplete flags.
332         (__pointer_type_info::__pointer_catch): New virtual function.
333         (__pointer_to_member_type_info): Derive from
334         __pointer_type_info. Adjust.
335         (__pointer_to_member_type_info::__do_catch): Remove.
336         (__pointer_to_member_type_info::__is_pointer_p): Declare.
337         (__pointer_to_member_type_info::__pointer_catch): Declare.
338         * rtti.c (qualifier_flags): Add restrict flag.
339         (ptmd_initializer): Reorder members.
340         (create_tinfo_types): Expand comments. Reorder
341         ptmd_desc_type_node members.
342         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
343         Implement.
344         (__pointer_type_info::__do_catch): Move specific code into
345         __pointer_catch. Call it.
346         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
347         specific catch checking. Fix void conversion check.
348         (__pointer_to_member_type_info::__do_catch): Remove.
349         (__pointer_to_member_type_info::__pointer_catch): Implement.
350         
351 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
352
353         * lex.c (init_parse): Remove traces of classof and headof.
354         * decl2.c (flag_operator_names): Default to 1.
355         (lang_decode_option): Do not set it for -ansi.
356
357 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
358
359         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
360         (DECL_MAIN_VARIANT): Remove.
361         * decl.c (duplicate_decls): Don't set it.
362         (start_function): Likewise.
363         (lang_mark_tree): Don't mark it.
364         * decl2.c (defer_fn): Don't use it.
365         * lex.c (retrofit_lang_decl): Don't set it.
366         * pt.c (tsubst_decl): Likewise.
367         * ptree.c (print_lang_decl): Don't print it.
368         * typeck.c (mark_addressable): Don't use it.
369         
370 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
371
372         * vec.cc: Include <new> and <exception>.
373         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
374         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
375         terminate.
376         (__cxa_vec_delete): Catch dtor exceptions.
377
378 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
379
380         Prepend __ to implementation defined names.
381         * inc/typeinfo (type_info): Rename _name to __name.
382         (type_info::type_info): Rename parameter.
383         (type_info::operator==, type_info::operator!=,
384         type_info::before): Likewise.
385         (type_info::is_pointer_p, type_info::is_function_p,
386         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
387         parameters.
388         * inc/cxxabi.h
389         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
390         (__pointer_type_info::__pointer_type_info): Likewise.
391         (__pointer_type_info::is_pointer_p,
392         __pointer_type_info::do_catch): Prepend __. Rename parameters.
393         (__array_type_info::__array_type_info): Rename parameters.
394         (__function_type_info::__function_type_info): Likewise.
395         (__function_type_info::is_function_p): Prepend __.
396         (__enum_type_info::__enum_type_info): Rename parameters.
397         (__pointer_to_member_type_info::__pointer_to_member_type_info):
398         Likewise.
399         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
400         parameters.
401         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
402         (__class_type_info::__class_type_info): Rename parameters.
403         (__class_type_info::sub_kind): Prepend __. Adjust member names.
404         (__class_type_info::upcast_result,
405         __class_type_info::dyncast_result): Prepend __. Move definition
406         into tinfo.cc.
407         (__class_type_info::do_upcast, __class_type_info::do_catch,
408         __class_type_info::find_public_src,
409         __class_type_info::do_dyncast,
410         __class_type_info::do_find_public_src): Prepend __. Rename
411         parameters.
412         (__si_class_type_info::__si_class_type_info): Rename parameters.
413         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
414         __si_class_type_info::do_find_public_src): Prepent __. Rename
415         parameters.
416         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
417         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
418         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
419         parameters.
420         (__dynamic_cast): Rename parameters.
421         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
422         type_info::do_catch, type_info::do_upcast): Prepend __.
423         (contained_p, public_p, virtual_p, contained_public_p,
424         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
425         (__class_type_info::do_catch,
426         __class_type_info::do_upcast): Prepend __. Adjust.
427         (__class_type_info::__upcast_result,
428         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
429         Adjust.
430         (__class_type_info::find_public_src): Prepend __. Adjust.
431         (__class_type_info::do_find_public_src, 
432         __si_class_type_info::do_find_public_src, 
433         __vmi_class_type_info::do_find_public_src): Likewise.
434         (__class_type_info::do_dyncast,
435         __si_class_type_info::do_dyncast,
436         __vmi_class_type_info::do_dyncast): Likewise.
437         (__class_type_info::do_upcast,
438         __si_class_type_info::do_upcast,
439         __vmi_class_type_info::do_upcast): Likewise.
440         (__dynamic_cast): Adjust.
441         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
442         (__function_type_info::is_function_p): Likewise.
443         (__pointer_type_info::do_catch): Likewise. Adjust.
444         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
445         (__throw_type_match_rtti_2): Adjust.
446         (__is_pointer): Adjust.
447
448 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
449
450         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
451         (complete_ctor_identifier): New macro.
452         (special_function_kind): Add sfk_copy_constructor and
453         sfk_assignment_operator.
454         (LOOKUP_HAS_IN_CHARGE): Remove.
455         (cons_up_default_function): Rename to ...
456         (implicitly_declare_fn): ... this.
457         * call.c (build_new_method_call): Add in-charge parameters for
458         constructors here.
459         * class.c (add_implicitly_declared_members): Change parameter name
460         from cant_have_assignment to cant_have_const_assignment.
461         Replace calls to cons_up_default_function to implicitly_declare_fn.
462         * cvt.c (ocp_convert): Use complete_ctor_identifier.
463         * decl.c (initialize_predefined_identifiers): Initialize it.
464         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
465         complex expression.
466         * init.c (expand_default_init): Don't calculate the in-charge
467         parameter here.
468         (build_new_1): Likewise.
469         * lex.c (cons_up_default_function): Move to method.c.
470         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
471         (implicitly_declare_fn): New function.
472         * typeck.c (build_static_cast): Use complete_ctor_identifier.
473         (build_modify_expr): Likewise.
474         * typeck2.c (build_functional_cast): Likewise.
475         
476         Under the new ABI, constructors don't return `this'.
477         * cp-tree.h (warn_reorder): Declare.
478         (special_function_kind): New enum.
479         (global_base_init_list): Remove declaration.
480         (emit_base_init): Don't return a value.
481         (check_base_init): Don't declare.
482         (is_aggr_typedef): Likewise.
483         * decl.c (check_special_function_return_type): New function.
484         (return_types): Remove.
485         (grokdeclarator): Use check_special_function_return_type.
486         (start_function): Don't initialize ctor_label under the new ABI.
487         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
488         * init.c (begin_init_stmts): Move to top of file.
489         (finish_init_stmts): Likewise.
490         (warn_reorder): Don't declare.
491         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
492         value.
493         (check_base_init): Remove.
494         (is_aggr_typedef): Likewise.
495         (build_new_1): Don't use the return value of a constructor.
496         * semantics.c (setup_vtbl_ptr): Don't use the return value
497         of emit_base_init.
498         * typeck.c (check_return_expr): Don't magically convert return
499         statements into `return this' in constructors under the new ABI.
500         
501         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
502         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
503         (base_ctor_identifier): New macro.
504         (base_dtor_identifier): Likewise.
505         (deleting_dtor_identifier): Likewise.
506         * decl.c: Don't include obstack.h.
507         (obstack_chunk_alloc): Don't define.
508         (obstack_chunk_free): Likewise.
509         (struct predefined_identifier): New type.
510         (initialize_predefined_identifiers): New function.
511         (init_decl_processing): Use it.
512         (debug_temp_inits): Remove.
513         (start_method): Don't call preserve_data.
514         (hack_incomplete_structures): Update comment.
515         * init.c (init_init_processing): Don't initialize
516         nelts_identifier.
517         (build_offset_rf): Remove dead code.
518         (build_delete): Use CLASSTYPE_N_BASECLASSES.
519         * search.c (init_search_processing): Don't initialize
520         vptr_identifier.
521         
522 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
523
524         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
525         some sign_compare warnings.
526
527 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
528
529         Rename abi::__vmi_class_type_info members.
530         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
531         base_list, detail_masks members to vmi_flags, vmi_base_count,
532         vmi_bases and vmi_flags_masks respectively.
533         (__vmi_class_type_info::vmi_flags_masks): Rename
534         details_unknown_mask to flags_unknown_mask.
535         * tinfo.cc (__class_type_info::do_upcast): Adjust.
536         (__vmi_class_type_info::do_find_public_src): Adjust.
537         (__vmi_class_type_info::do_dyncast): Adjust.
538         (__vmi_class_type_info::do_upcast): Adjust.
539         
540 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
541
542         * tinfo.cc (convert_to_base): New function.
543         (get_vbase_offset): Remove. Move into convert_to_base.
544         (__vmi_class_type_info::do_find_public_src): Adjust.
545         (__vmi_class_type_info::do_dyncast): Adjust.
546         (__vmi_class_type_info::do_upcast): Adjust.
547
548 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
549
550         * tinfo.cc (operator=): Use __builtin_strcmp.
551         * tinfo2.cc (before): Likewise.
552
553 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
554
555         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
556         (DECL_SAVED_INLINE): Rename to ...
557         (DECL_DEFERRED_FN): ... this.
558         (in_function_p): Remove declaration.
559         (mark_inline_for_output): Rename to ... 
560         (defer_fn): ... this.
561         * decl.c (finish_function): Adjust call to mark_inline_for_output.
562         (in_function_p): Remove definition.
563         * decl2.c (saved_inlines): Rename to ...
564         (deferred_fns): ... this.
565         (saved_inlines_used): Rename to ...
566         (deferred_fns_used): ... this.
567         (mark_inline_for_output): Rename to ...
568         (defer_fn): ... this.
569         (finish_file): Adjust accordingly.
570         (init_decl2): Likewise.
571         * lex.c (cons_up_default_function): Likewise.
572         * pt.c (mark_decl_instantiated): Likewise.
573         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
574         circumstances.
575         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
576         * semantics.c (expand_body): Defer more functions.
577
578 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
579
580         * vec.cc: New file.
581         * Make-lang.in (CXX_LIB2FUNCS): Add it.
582         (vec.o): Build it.
583         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
584         __cxa_vec_delete): Declare.
585
586 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
587
588         * rtti.c (dfs_class_hint_mark): New static function.
589         (dfs_class_hint_unmark): New static function.
590         (class_hint_flags): Use them.
591
592 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
593
594         * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
595
596 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
597
598         * cp-tree.h (instantiate_decl): Change prototype.
599         * decl2.c (mark_used): Adjust call.
600         * optimize.c (inlinable_function_p): Adjust handling of templates.
601         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
602         (do_type_instantiation): Likewise.
603         (instantiate_decl): Defer more templates.
604         (instantiate_pending_templates): Adjust logic to handle inline
605         friend functions.
606
607         * Makefile.in (GGC_H): New variable.  Use it throughout in place
608         of ggc.h.
609         
610         * call.c: Don't include obstack.h.  Include ggc.h.
611         (obstack_chunk_alloc): Don't define.
612         (obstack_chunk_free): Likewise.
613         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
614         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
615         (pop_switch): Free it.
616
617         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
618
619         * dump.c (dequeue_and_dump): Don't try to print the bit_position
620         if we don't have a DECL_FIELD_OFFSET.
621
622 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
623
624         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
625         special_function_p.
626
627 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
628
629         * cfns.gperf (hash, libc_name_p): Prototype.
630
631         * rtti.c (build_dynamic_cast_1): Constification.
632
633         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
634
635         * semantics.c (deferred_type_access_control): Prototype.
636
637 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
638
639         Correct many new ABI issues regarding vbase and vcall offset
640         layout.
641         * cp-tree.h (BINFO_VTABLE): Document.
642         (struct lang_type): Tweak formatting.
643         (BINFO_PRIMARY_BINFO): Add to documentation.
644         (CLASSTYPE_VSIZE): Fix typo in comment.
645         (CLASSTYPE_VBASECLASSES): Update documentation.
646         (BINFO_VBASE_MARKED): Remove.
647         (SET_BINFO_VBASE_MARKED): Likewise.
648         (CLEAR_BINFO_VBASE_MARKED): Likewise.
649         (BINFO_FIELDS_MARKED): Remove.
650         (SET_BINFO_FIELDS_MARKED): Likewise.
651         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
652         (enum access_kind): New enumeration.
653         (num_extra_vtbl_entries): Remove declaration.
654         (size_extra_vtbl_entries): Likewise.
655         (get_vtbl_decl_for_binfo): New function.
656         (dfs_vbase_unmark): Remove declaration.
657         (mark_primary_bases): Likewise.
658         * class.c (SAME_FN): Remove.
659         (struct vcall_offset_data_s): Move definition.
660         (build_vbase_pointer): Use `build', not `build_binary_op', to
661         access the vbase pointer under the new ABI.
662         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
663         (build_primary_vtable): Likewise.
664         (dfs_mark_primary_bases): Move here from search.c.
665         (mark_primary_bases): Likewise.
666         (determine_primary_bases): Under the new ABI, don't make a base
667         class a primary base just because we don't yet have any virtual
668         functions.
669         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
670         (num_vfun_entries): Remove.
671         (dfs_count_virtuals): Likewise.
672         (num_extra_vtbl_entries): Likewise.
673         (size_extra_vtbl_entries): Likewise.
674         (layout_virtual_bases): Iterate in inheritance graph order under
675         the new ABI.
676         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
677         indicate that a vfield is present.
678         (init_class_processing): Initialize access_public_node, etc., from
679         ak_public, etc.
680         (get_vtbl_decl_for_binfo): New function.
681         (dump_class_hierarchy_r): Likewise.
682         (dump_class_hierarchy): Use it.
683         (finish_vtbls): Build the vtbls in inheritance graph order.
684         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
685         (initialize_vtable): Use get_vtbl_decl_for_binfo.
686         (accumulate_vtbl_inits): Add comments explaining why a pre-order
687         walk is required.
688         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
689         where the vptr points, even for primary vtables.
690         (build_vtbl_initializer): Adjust handling of vbase and vcall
691         offsets.
692         (build_vcall_and_vbase_vtable_entries): New function.
693         (dfs_build_vbase_offset_vtbl_entries): Remove.
694         (build_vbase_offset_vtbl_entries): Reimplement.
695         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
696         were already handled in a primary base class vtable.
697         (build_vcall_offset_vtbl_entries): Adjust.
698         (build_rtti_vtbl_entries): Adjust.
699         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
700         * init.c (expand_virtual_init): Simplify.
701         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
702         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
703         * search.c (BINFO_ACCESS): New macro.
704         (SET_BINFO_ACCESS): Likewise.
705         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
706         (access_in_type): Likewise.
707         (dfs_accessible_p): Likewise.
708         (protected_accessible_p): Likewise.
709         (lookup_fnfields_1): Adjust documentation.
710         (dfs_mark_primary_bases): Move to class.c
711         (mark_primary_bases): Likewise.
712         (dfs_vbase_unmark): Remove.
713         (virtual_context): Use BINFO_FOR_VBASE.
714         (dfs_get_vbase_types): Simplify.
715         (dfs_build_inheritance_graph_order): New function.
716         (get_vbase_types): Use it.
717         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
718
719         * tinfo.cc (get_vbase_offset): New function.
720         (__vmi_class_type_info::do_find_public_src): Use it.
721         (__vmi_class_type_info::do_dyncast): Likewise.
722         (__vmi_class_type_info::do_upcast): Likewise.
723         
724 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
725
726         * lang-specs.h: Pass -fno-show-column to the preprocessor.
727
728 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
729
730         * rtti.c (class_hint_flags): Rename flags.
731         (class_initializer): Remove flags.
732         (synthesize_tinfo_var): Combine offset and flags. Add flags
733         for __vmi_class_type_info.
734         (create_tinfo_types): Remove flags from __class_type_info and
735         __si_class_type_info. Merge flags and offset from
736         base_class_type_info.
737         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
738         (__base_class_info::is_virtual_p): Adjust.
739         (__base_class_info::is_public_p): Adjust.
740         (__base_class_info::offset): New accessor.
741         (__class_type_info::details): Remove member.
742         (__class_type_info::__class_type_info): Lose details.
743         (__class_type_info::detail_masks): Remove.
744         (__si_class_type_info::__si_class_type_info): Lose details.
745         (__vmi_class_type_info::details): New member.
746         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
747         (__vmi_class_type_info::detail_masks): New member.
748         * tinfo.cc (__class_type_info::do_upcast): Initialize result
749         with unknown_details_mask.
750         (__vmi_class_type_info::do_find_public_src): Adjust
751         (__vmi_class_type_info::do_dyncast): Adjust.
752         (__vmi_class_type_info::do_upcast): Set result details, if
753         needed. Adjust.
754         (__dynamic_cast): Temporarily #if out optimization.
755
756 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
757
758         * rtti.c (get_tinfo_decl): Mark used.
759         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
760         mark as dealt with, if we output it.
761
762 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
763
764         * class.c: Reorganize to put virtual function table initialization
765         machinery at the end of the file.
766
767 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
768
769         * class.c (finish_struct): Use bitsize_zero_node.
770         * pt.c (instantiate_class_template): Likewise.
771
772 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
773
774         Put RTTI entries at negative offsets in new ABI.
775         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
776         vbase offset at index -3, not -1.
777         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
778         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
779         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
780         (build_rtti_vtbl_entries): New function.
781         (set_rtti_entry): Remove.
782         (build_primary_vtable): Don't use it.
783         (build_secondary_vtable): Likewise.
784         (start_vtable): Remove.
785         (first_vfun_index): New function.
786         (set_vindex): Likewise.
787         (add_virtual_function): Don't call start_vtable.  Do call
788         set_vindex.
789         (set_primary_base): Rename parameter.
790         (determine_primary_base): Likewise.
791         (num_vfun_entries): Don't use skip_rtti_stuff.
792         (num_extra_vtbl_entries): Include RTTI information.
793         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
794         (skip_rtti_stuff): Remove.
795         (dfs_modify_vtables): Don't use it.
796         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
797         (layout_nonempty_base_or_field): Update size handling.
798         (create_vtable_ptr): Tweak.
799         (layout_class_type): Adjust parameter names.
800         (finish_struct_1): Simplify.
801         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
802         (skip_rtti_stuff): Remove.
803         (first_vfun_index): New function.
804         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
805         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
806         (marked_vtable_pathp): Declare.
807         (unmarked_vtable_pathp): Likewise.
808         * error.c (dump_expr): Use first_vfun_index to calculate vtable
809         offsets.
810         * rtti.c (build_headof): Look for RTTI at negative offsets.
811         (get_tinfo_decl_dynamic): Likewise.
812         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
813         here.
814         (create_pseudo_type_info): Do it here instead.  Adjust so that
815         vptr points at first virtual function.
816         * search.c (marked_vtable_pathp): Make it global.
817         (unmarked_vtable_pathp): Likewise.
818         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
819         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
820         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
821         (get_pure_virtuals): Likewise.
822         (expand_upcast_fixups): Likewise.
823         * tree.c (debug_binfo): Likewise.
824         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
825         negative offset.
826         
827 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
828
829         * class.c (check_field_decl): Fix typo.
830         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
831         (check_methods): Likewise.
832         (check_field_decls): Likewise.
833         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
834         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
835         Use DECL_RESULT_FLD, not DECL_RESULT.
836         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
837         * lex.c (identifier_type): Likewise.
838         * pt.c (determine_specialization, lookup_template_class): Likewise.
839         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
840         (resolve_overloaded_unification, more_specialized): Likewise.
841         * semantics.c (finish_member_declaration): Likewise.
842         * typeck.c (build_x_function_call): Likewise.
843         
844 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
845
846         * class.c (layout_empty_base): Handle empty bases with non-byte
847         alignment.
848         (build_base_field): Likewise.
849         (layout_virtual_bases): Likewise.
850
851         * class.c (finish_struct_1): Fix typo in this change:
852         
853         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
854
855 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
856
857         * decl.c (grokdeclarator): Count partial specializations when
858         keeping track of how many template classes have been seen.
859
860         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
861         
862 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
863
864         * class.c (build_vbase_pointer_fields): layout_field now place_field.
865         (get_vfield_offset): Use byte_position.
866         (set_rtti_entry): Set OFFSET to ssizetype zero.
867         (get_binfo_offset_as_int): Deleted.
868         (dfs_record_base_offsets): Use tree_low_cst.
869         (dfs_search_base_offsets): Likewise.
870         (layout_nonempty_base_or_field): Reflect changes in RLI format
871         and call byte_position.
872         (layout_empty_base): Convert offset to ssizetype.
873         (build_base_field): use rli_size_unit_so_far.
874         (dfs_propagate_binfo_offsets): Do computation in proper type.
875         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
876         (layout_class_type): Reflect changes in RLI names and fields.
877         (finish_struct_1): Set DECL_FIELD_OFFSET.
878         * dump.c (dequeue_and_dump): Call bit_position.
879         * expr.c (cplus_expand_constant): Use byte_position.
880         * rtti.c (expand_class_desc): Use bitsize_one_node.
881         * typeck.c (build_component_addr): Use byte_position and don't
882         special case for zero offset.
883         
884 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
885
886         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
887         
888         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
889         tinfo object.
890         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
891         vtable.
892
893 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
894
895         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
896         DECL_P macros.
897         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
898         make_typename_type, check_initializer, cp_finish_decl,
899         xref_tag): Likewise.
900         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
901         decl_namespace, arg_assoc_template_arg, arg_assoc,
902         validate_nonmember_using_decl, do_class_using_decl): Likewise.
903         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
904         args_to_string): Likewise.
905         * friend.c (is_friend): Likewise.
906         * lex.c (note_got_semicolon, note_list_got_semicolon,
907         is_global): Likewise.
908         * method.c (build_overload_nested_name, build_overload_value,
909         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
910         * parse.y (typename_sub, typename_sub1): Likewise.
911         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
912         process_partial_specialization, convert_template_argument,
913         template_args_equal, add_pending_template, lookup_template_class,
914         for_each_template_parm_r, maybe_fold_nontype_arg,
915         tsubst, instantiate_template, type_unification_real, unify,
916         instantiate_pending_templates, set_mangled_name_for_template_decl):
917         Likewise.
918         * repo.c (repo_get_id, repo_template_used): Likewise.
919         * search.c (lookup_field_1): Likewise.
920         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
921         * xref.c (classname): Likewise.
922         
923 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
924
925         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
926         (CANONICAL_BINFO): New macro.
927         (BINFO_NEW_VTABLE_MARKED): Use it.
928         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
929         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
930         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
931         not TREE_TYPE.
932         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
933         (build_secondary_vtable): Likewise.
934         (dfs_finish_vtbls): Likewise.
935         (dfs_accumulate_vtbl_inits): Likewise.
936         (accumulate_vtbl_inits): New function.
937         (finish_vtbls): Make sure that virtual bases come after
938         non-virtual bases in the vtable group.
939         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
940         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
941         * search.c (struct vbase_info): Move definition.
942         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
943         (unmarked_new_vtable_p): Likewise.
944         (dfs_mark_vtable_path): Remove.
945         (dfs_mark_new_vtable): Remove.
946         (dfs_unmark_new_vtable): Likewise.
947         (dfs_clear_search_slot): Likewise.
948         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
949         (dfs_clear_vbase_slots): Likewise.
950         (init_vbase_pointers): LIkewise.
951         
952 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
953
954         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
955         SIZETYPE to a non-SIZETYPE.
956
957 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
958
959         * class.c (layout_virtual_bases): Adjust names in conditionally
960         compiled code.
961         
962         * class.c (record_base_offsets): New function.
963         (layout_conflict_p): Likewise.
964         (layout_nonempty_base_or_field): Use it.
965         (layout_empty_base): New function.
966         (build_base_field): Use it.
967         (build_base_fields): Update comment.
968         (layout_virtual_bases): Fold in a little code form
969         layout_basetypes.  Use layout_empty_base.
970         (layout_basetypes): Remove.
971         (end_of_class): New function.
972         (layout_class_type): Use it.  Adjust.
973
974         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
975         (fntype_p): Remove.
976         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
977         comment. 
978         (dfs_skip_nonprimary_vbases_markedp): Likewise.
979         * typeck.c (fntype_p): Remove.
980
981         * cp-tree.h (TI_SPEC_INFO): Remove.
982         (CLASSTYPE_TI_SPEC_INFO): Likewise.
983         * pt.c (process_partial_specialization): Likewise.
984
985         * class.c (build_base_field): Fix thinko in computation of binfo
986         offsets.
987
988         * tree.c (mark_local_for_remap_p): Mark variables declared in
989         TARGET_EXPRs as well.
990
991 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
992
993         * typeck.c (require_complete_type, complete_type,
994         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
995         build_array_ref, convert_arguments, pointer_diff,
996         build_x_unary_op, build_unary_op, build_c_cast,
997         build_modify_expr): Use COMPLETE_TYPE_P etc.
998         * call.c (is_complete, convert_like_real,
999         build_new_method_call): Likewise.
1000         * class.c (build_vbase_pointer_fields, check_bases,
1001         build_base_field, finish_struct_1, pushclass): Likewise.
1002         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
1003         * decl.c (maybe_process_template_type_declaration, pushtag,
1004         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
1005         layout_var_decl, check_initializer, cp_finish_decl,
1006         grokdeclarator, require_complete_types_for_parms,
1007         grok_op_properties, xref_tag, xref_basetypes,
1008         check_function_type): Likewise.
1009         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
1010         * friend.c (do_friend): Likewise.
1011         * init.c (build_offset_ref): Likewise.
1012         * parse.y (structsp): Likewise.
1013         * pt.c (maybe_process_partial_specialization,
1014         tsubst_friend_function, instantiate_class_template, tsubst,
1015         do_type_instantiation, instantiate_pending_templates): Likewise.
1016         * repo.c (repo_get_id): Likewise.
1017         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
1018         synthesize_tinfo_var, emit_support_tinfos): Likewise.
1019         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
1020         * semantics.c (begin_class_definition): Likewise.
1021         * tree.c (build_cplus_method_type): Likewise.
1022         * typeck2.c (digest_init, build_functional_cast,
1023         add_exception_specifier): Likewise.
1024         * parse.h, parse.c: Regenerated.
1025
1026 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
1027
1028         * inc/cxxabi.h: New header file. Define new-abi entry points.
1029         (__pointer_type_info::target): Rename member to ...
1030         (__pointer_type_info::type): ... here.
1031         (__base_class_info::type): Rename member to ...
1032         (__base_class_info::base): ... here.
1033         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
1034         * cp-tree.h (CPTI_ABI): New global tree enumeration.
1035         (abi_node): New global tree node.
1036         * decl.c (abi_node): Document.
1037         (init_decl_processing): Initialize abi_node.
1038         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
1039         (get_vmi_pseudo_type_info): Likewise.
1040         (create_tinfo_types): Likewise.
1041         (emit_support_tinfos): Likewise.
1042         * tinfo.h (cxxabi.h): Include for new-abi.
1043         Move rtti class definitions to new header file.
1044         * tinfo.cc (abi): Use the namespace.
1045         (std): Move new abi rtti classes from here ...
1046         (__cxxabiv1): ... to here.
1047         * tinfo2.cc (cxxabi.h): Include for new-abi.
1048         Move rtti class definitions to new header file.
1049         (std): Move new abi rtti classes from here ...
1050         (__cxxabiv1): ... to here.
1051         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
1052         namespace.
1053
1054 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
1055             Jason Merrill  <jason@casey.cygnus.com>
1056
1057         * method.c (build_overload_int): Use host_integerp.
1058
1059 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1060
1061         * init.c (build_offset_ref): Handle the case of a templated member
1062         function.
1063     
1064 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1065
1066         * except.c (expand_exception_blocks): Clear catch_clauses_last.
1067
1068 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
1069
1070         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
1071         * class.c (check_bitfield_decl): Turn illegal bitfields into
1072         non-bitfields.
1073         (dfs_propagate_binfo_offsets): Adjust for new size_binop
1074         semantics.
1075         (dfs_offset_for_unshared_vbases): Likewise.
1076         * cvt.c (cp_convert_to_pointer): Convert NULL to a
1077         pointer-to-member correctly under the new ABI.
1078         * expr.c (cplus_expand_constant): Don't use cp_convert when
1079         turning an offset into a pointer-to-member.
1080         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
1081         when dereferencing them under the new ABI.
1082         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
1083         of pointers-to-members under the new ABI.
1084         
1085         * class.c (check_bitfield_decl): Remove restriction on really long
1086         bitfields.
1087         (layout_class_type): Implement new ABI handling of bitfields
1088         longer than their types.
1089
1090 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1091
1092         * parse.y (extdefs): Call ggc_collect.
1093         * parse.c: Regenerated.
1094
1095 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
1096
1097         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
1098         (note_name_declared_in_class): Use OVL_CURRENT to get at a
1099         potential overload.
1100
1101 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1102
1103         * class.c (build_vbase_path): Use integer_zerop.
1104         (build_vtable_entry): Use tree_low_cst.
1105         (get_vfield_offset): Use bit_position.
1106         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
1107         Use tree_low_cst.
1108         (check_bitfield_decl): Set DECL_SIZE using convert.
1109         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
1110         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
1111         Use tree_low_cst.
1112         (finish_struct_1): Use bit_position.
1113         (dump_class_hierarchy): Use tree_low_cst.
1114         * cp-tree.h (min_precision): Add declaration.
1115         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
1116         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
1117         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
1118         * expr.c (cplus_expand_constant): Use bit_position.
1119         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
1120         * rtti.c (get_base_offset): Use bit_position.
1121         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
1122         host_integerp, and tree_low_cst.
1123         (pointer_int_sum): Use integer_zerop.
1124         (build_component_addr): Use bit_position.
1125         
1126 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
1127
1128         * typeck.c (require_complete_type): Don't assume size_zero_node.
1129         (complete_type_or_else): Likewise.
1130
1131 2000-03-16  Steven Grady <grady@digitaldeck.com>
1132             Jason Merrill  <jason@casey.cygnus.com>
1133
1134         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
1135
1136 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
1137
1138         * decl2.c (grokfield): Bail out if type is error_mark_node.
1139
1140 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
1141
1142         * tinfo2.cc (__ptr_to_member_data): Rename to ...
1143         (__pointer_to_member_data): ... here. Adjust.
1144         * rtti.c (create_tinfo_types): Adjust.
1145
1146 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
1147
1148         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
1149         * decl.c (ref_desc_type_node): Undocument.
1150         * rtti.c (ptr_ref_initializer): Rename to ...
1151         (ptr_initializer): ... here. Adjust comments.
1152         (ptmd_initializer): Fix comment thinko.
1153         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
1154         (create_tinfo_types): Remove ref_desc_type_node init.
1155         * tinfo2.cc (__reference_type_info): Remove.
1156
1157 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
1158
1159         * decl.c (cp_finish_decl): Remove obsolete comment.
1160         
1161         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
1162
1163 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
1164
1165         * cp-tree.h: Tweak documentation.
1166         * class.c (build_vbase_pointer_fields): Layout the fields, too.
1167         (avoid_overlap): Remove.
1168         (get_binfo_offset_as_int): New function.
1169         (dfs_serach_base_offsets): Likewise.
1170         (layout_nonempty_base_or_field): Likewise.
1171         (build_base_field): Layout fields here.  Avoid placing two objects
1172         of the same type at the same address, under the new ABI.
1173         (build_base_fields): Adjust accordingly.
1174         (create_vtable_ptr): Return the new field, but don't attach it to
1175         TYPE_FIELDS.
1176         (remove_base_field): Remove.
1177         (remove_base_fields): Remove.
1178         (layout_basetypes): Adjust accordingly.
1179         (layout_class_type): Call layout_field for each field, rather than
1180         just making a wholesale call to layout_type.
1181
1182 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
1183
1184         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
1185
1186 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
1187
1188         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
1189
1190         * except.c (dtor_nothrow): New fn.
1191         (do_pop_exception): Use it.  Take type parm.
1192         (push_eh_cleanup): Take type parm.
1193         (expand_start_catch_block): Pass it.
1194         (build_eh_type_type_ref): Accept null type.
1195
1196 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
1197
1198         * cp-tree.h (revert_static_member_fn): Change prototype.
1199         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
1200         (grok_op_properties): Likewise.
1201         (start_function): Likewise.
1202         (revert_static_member_fn): Simplify.
1203         * pt.c (check_explicit_specialization): Adjust call to
1204         revert_static_member_fn.
1205
1206 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
1207
1208         * cp-tree.h (scope_kind): New type.
1209         (tmpl_spec_kind): Likewise.
1210         (declare_pseudo_global_level): Remove.
1211         (pseudo_global_level_p): Rename to template_parm_scope_p.
1212         (pushlevel): Remove declaration.
1213         (begin_scope): New function.
1214         (finish_scope): Likewise.
1215         (current_tmpl_spec_kind): Likewise.
1216         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
1217         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
1218         Add template_spec_p.
1219         (toplevel_bindings_p): Adjust.
1220         (declare_pseudo_global_level): Remove.
1221         (pseudo_global_level_p): Rename to template_parm_scope_p.
1222         (current_tmpl_spec_kind): New function.
1223         (begin_scope): Likewise.
1224         (finish_scope): Likewise.
1225         (maybe_push_to_top_level): Adjust.
1226         (maybe_process_template_type_declaration): Likewise.
1227         (pushtag): Likewise.
1228         (pushdecl_nonclass_level): Likewise.
1229         (lookup_tag): Likewise.
1230         (grokfndecl): Handle member template specializations.  Share
1231         constructor and non-constructor code.
1232         * decl2.c (check_classfn): Handle member template specializations.
1233         * pt.c (begin_template_parm_list): Use begin_scope.
1234         (begin_specialization): Likewise.
1235         (end_specialization): Likewise.
1236         (check_explicit_specialization): Use current_tmpl_spec_kind.
1237         Handle member template specializations.
1238         (end_template_decl): Use finish_scope.  Remove call to
1239         get_pending_sizes.
1240         (push_template_decl_real): Remove bogus error message.
1241         (tsubst_decl): Fix typo in code contained in comment.
1242         (instantiate_template): Handle member template specializations.
1243         (most_general_template): Likewise.
1244         
1245 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
1246
1247         * lex.c (whitespace_cr): Compress consecutive calls to warning().
1248         (do_identifier): Ditto for error().
1249
1250         * pt.c (convert_nontype_argument): Ditto for cp_error().
1251         (convert_template_argument): Ditto for cp_pedwarn().
1252
1253 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
1254
1255         * exception.cc (__check_null_eh_spec): New fn.
1256         * except.c (expand_end_eh_spec): Call it if the spec is throw().
1257
1258 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
1259
1260         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
1261         * except.c (expand_end_eh_spec): Add the return type.
1262         * rtti.c (throw_bad_cast): Add the parmtypes.
1263         (throw_bad_typeid): Likewise.
1264
1265         * semantics.c (expand_stmt): Only leave out rtl for unused
1266         artificials, and set DECL_IGNORED_P on them as well.
1267         * decl.c (wrapup_globals_for_namespace): Likewise.
1268
1269 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
1270
1271         * decl.c (maybe_commonize_var): Skip all artificial decls.
1272         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
1273
1274 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
1275
1276         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
1277         * cp-tree.h: Declare flag_enforce_eh_specs.
1278         * decl.c (store_parm_decls, finish_function): Check it.
1279
1280         C library functions don't throw.
1281         * Makefile.in (cfns.h): New target.
1282         (except.o): Depend on it.
1283         * Make-lang.in (cc1plus): Depend on cfns.gperf.
1284         * cfns.gperf: New file.
1285         * cfns.h: Generated.
1286         * except.c: Include it.
1287         (nothrow_libfn_p): New fn.
1288         * decl.c (grokfndecl): Use it.
1289         * cp-tree.h: Declare it.
1290         
1291         * decl.c (push_overloaded_decl_1, auto_function, 
1292         define_function): Lose.
1293         (build_library_fn_1): New static fn.
1294         (builtin_function): Use it.
1295         (get_atexit_node): Use build_library_fn_ptr.
1296         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
1297         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
1298         push_void_library_fn, push_throw_library_fn): New fns.
1299         * cp-tree.h: Declare them.
1300         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
1301         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
1302         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
1303         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
1304         * rtti.c (build_runtime_decl): Lose.
1305         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl, 
1306         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
1307         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
1308
1309         * call.c (build_call): Remove result_type parm.
1310         Call mark_used on unused artificial fns.
1311         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
1312
1313 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
1314
1315         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
1316         appropriate.
1317         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
1318         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
1319         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
1320         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
1321         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
1322         expand_generic_desc): Likewise.
1323
1324 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
1325
1326         * exception.cc (__cp_pop_exception): Cleanup the original object.
1327
1328 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
1329
1330         * decl.c (grok_op_properties): Merge conversion to void warning
1331         with other silly op warnings.
1332
1333 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
1334
1335         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
1336         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
1337
1338 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
1339
1340         * decl.c (cp_make_fname_decl): New function.
1341         (wrapup_globals_for_namespace): Don't emit unused static vars.
1342         (init_decl_processing): Remove comment about use of
1343         array_domain_type. Set make_fname_decl.
1344         (cp_finish_decl): Remove __FUNCTION__ nadgering.
1345         * semantics.c (begin_compound_stmt): Remove
1346         current_function_name_declared flagging.
1347         (expand_stmt): Don't emit unused local statics.
1348         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
1349         specially.
1350
1351 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
1352
1353         * typeck.c (convert_for_assignment): Don't look at array
1354         initializer.
1355         * call.c (convert_like_real): Likewise. 
1356
1357 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
1358
1359         Add initial support for '\uNNNN' specifier.
1360         * lex.c (read_ucs): New fn.
1361         (readescape, skip_white_space): Call it.
1362         (is_extended_char, is_extended_char_1): New fns.
1363         (utf8_extend_token): New fn, #if 0'd out.
1364         (real_yylex): Treat extended chars like letters.
1365
1366         * search.c (note_debug_info_needed): Walk the bases even if we 
1367         weren't deferring the type itself.
1368
1369 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1370
1371         * decl2.c (finish_objects): Constify a char*.
1372
1373         * method.c (emit_thunk): Likewise.
1374
1375 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
1376
1377         * typeck.c (dubious_conversion_warnings): Look through
1378         REFERENCE_TYPE.
1379
1380 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1381
1382         * class.c (dfs_modify_vtables): I is now unsigned.
1383         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
1384         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
1385         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
1386         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
1387         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
1388         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
1389         Call integer_all_onesp.
1390         * typeck2.c (process_init_constructor): Use compare_tree_int.
1391
1392         * lang-specs.h (as): Don't call if -syntax-only.
1393
1394 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
1395
1396         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
1397         RTL_EXPR_HAS_NO_SCOPE after all.
1398
1399 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
1400
1401         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
1402         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
1403         RTL_EXPR_HAS_NO_SCOPE.
1404
1405         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
1406         later.
1407         
1408         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
1409
1410 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
1411
1412         * call.c (convert_like): Macrofy.
1413         (convert_like_with_context): New macro.
1414         (convert_like_real): Renamed from convert_like.  Add calling
1415         context parameters, for diagnostics. Add recursive flag.  Call 
1416         dubious_conversion_warnings for outer conversion.
1417         (build_user_type_conversion): Use convert_like_with_context.
1418         (build_over_call): Likewise. Don't warn about dubious
1419         conversions here. Adjust convert_default_arg calls.
1420         (convert_default_arg): Add context parameters for diagnostics.
1421         Pass throught to convert_like_with_context.
1422         * cp-tree.h (convert_default_arg): Add context parameters.
1423         (dubious_conversion_warnings): Prototype new function.
1424         * typeck.c (convert_arguments): Adjust convert_default_arg call.
1425         (dubious_conversion_warnings): New function, broken
1426         out of convert_for_assignment. 
1427         (convert_for_assignment): Adjust.
1428
1429 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
1430
1431         * decl2.c (key_method): Break out from...
1432         (import_export_vtable, import_export_class): ...here.
1433
1434         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
1435         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
1436
1437         * search.c (note_debug_info_needed, dfs_debug_mark, 
1438         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
1439         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
1440
1441 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
1442
1443         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
1444         typos.
1445
1446 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
1447
1448         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
1449         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
1450         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
1451         (lang_type): Split gets_new into has_new and has_array_new.
1452         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1453         (TYPE_GETS_NEW): Split into ...
1454         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
1455         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
1456         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
1457         (build_op_new_call): Don't declare.
1458         (build_new_1): Likewise.
1459         * call.c (build_op_new_call): Remove.
1460         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
1461         instead of TYPE_NEEDS_DESTRUCTOR.
1462         (finish_struct_bits): Likewise.
1463         (add_implicitly_declared_members): Likewise.
1464         (check_field_decl): Likewise.
1465         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
1466         correctly under the new ABI.
1467         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
1468         instead of TYPE_NEEDS_DESTRUCTOR.
1469         (initialize_local_var): Likewise.
1470         (destroy_local_var): Likewise.
1471         (cp_finish_decl): Likewise.
1472         (register_dtor_fn): Likewise.
1473         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
1474         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
1475         TYPE_VEC_DELETE_TAKES_SIZE here.
1476         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
1477         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
1478         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1479         (finish_destructor_body): Likewise.
1480         (maybe_build_cleanup_1): Likewise.
1481         * decl2.c (do_static_destruction): Likewise.
1482         * init.c (build_new_1): Make it static.
1483         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1484         (expand_cleanup_for_base): Likewise.
1485         (get_cookie_size): New function.
1486         (build_new_1): Handle array-new cookies correctly under the new
1487         ABI.
1488         (build_vec_delete_1): Likewise.
1489         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1490         (build_delete): Likewise.
1491         (build_vec_delete): Handle array-new cookies correctly under the new
1492         ABI.
1493         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1494         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
1495         TYPE_HAS_ARRAY_NEW_OPERATOR.
1496         * ptree.c (print_lang_type): Check them.
1497         * search.c (context_for_name_lookup): Fix typo in comment.
1498         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1499         * tree.c (break_out_cleanups): Likewise.
1500         (build_cplus_array_test_1): Likewise.
1501         (cp_build_qualified_type_real): Likewise.
1502         * typeck.c (complete_type): Likewise.
1503         
1504         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
1505         the command-line, not the end.
1506         
1507 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
1508
1509         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
1510
1511 2000-03-02  Tom Tromey  <tromey@cygnus.com>
1512
1513         * cp-tree.h (build_java_class_ref): Declare.
1514         * init.c (build_java_class_ref): No longer static.
1515         * except.c (expand_throw): Generate a Java-style `throw' if the
1516         thrown object is a "Java" object.
1517         (initialize_handler_parm): Generate a Java-style lookup of
1518         exception info if the caught object is a "Java" object.
1519         (catch_language, catch_language_init): New globals.
1520         (decl_is_java_type): New function.
1521         (expand_start_catch_block): Don't call push_eh_info() or
1522         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
1523         class reference to build_catch_block.
1524
1525 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1526
1527         * typeck.c (comptypes): Treat sizetype like its language equivalent.
1528
1529 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
1530
1531         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
1532         to merge reference/pointer code and fix incorrect warnings.
1533
1534 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
1535
1536         * search.c (protected_accessible_p): Use context_for_name_lookup.
1537
1538         * init.c (construct_virtual_bases): Fix thinko.
1539         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
1540
1541 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
1542
1543         * decl.c (current_function_decl): Move to toplev.c.
1544
1545 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
1546
1547         * pt.c (fn_type_unification): Unify return type, whenever
1548         provided.
1549         (get_bindings_real): Only pass return type when necessary.
1550         Remove explicit return type check.
1551         * class.c (resolve_address_of_overloaded_function): Pass desired
1552         return type to fn_type_unification.
1553
1554 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1555
1556         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
1557         DECL_FIELD_SIZE.
1558         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
1559         DECL_FIELD_SIZE.
1560         * rtti.c (expand_class_desc): Likewise.
1561         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
1562         (THUNK_VCALL_OFFSET): Likewise.
1563         (THUNK_DELTA): Reflect changes in ../tree.h.
1564
1565 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
1566
1567         * search.c (protected_accessible_p): Also allow the access if
1568         the member is public in DERIVED.  Lose TYPE parm.
1569         (friend_accessible_p): Lose TYPE parm.
1570         (accessible_p): Adjust.
1571
1572 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1573
1574         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
1575         on things that are not sizes; ssize_binop deleted.
1576         Call size_diffop when appropriate.
1577         (dfs_build_vcall_offset_vtbl_entries): Likewise.
1578         (build_primary_vtable, build_secondary_vtable): Likewise.
1579         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
1580         Variable I is HOST_WIDE_INT.
1581         (get_vfield_offset): Pass proper types to size_binop.
1582         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
1583         (finish_struct_1): Likewise.
1584         (skip_rtti_stuff): Arg N is now pointer to signed.
1585         (layout_class_type): Use size_zero_node.
1586         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
1587         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
1588         * decl.c (complete_arry_type): Pass proper types to size_binop.
1589         (xref_basetypes): BINFO_OFFSET is sizetype.
1590         * error.c (dump_expr): Don't use size_binop non-sizes.
1591         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
1592         * init.c (construct_virtual_bases): Fix type error.
1593         (build_vec_delete_1): Pass proper type to size_binop and don't
1594         fold result.
1595         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
1596         * rtti.c (get_base_offset): Pass proper type to size_binop.
1597         * search.c (dfs_find_vbases): Fix type error.
1598         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
1599         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
1600         * tree.c (debug_binfo): Variable N is signed.
1601         Use HOST_WIDE_INT_PRINT_DEC.
1602         * typeck.c (comptypes): sizetype is same as equivalent integer type.
1603         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
1604         size_one_node and size_zero_node.
1605         (c_alignof): Use size_one_node.
1606         (build_component_addr): Pass proper types to size_binop.
1607         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
1608
1609 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
1610
1611         Implement class scope using-declarations for functions.
1612         * class.c (handle_using_decl): Call add_method for used functions.
1613         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
1614         (add_method): Used functions are hidden by local functions.
1615         (check_bases_and_members): Handle using-decls before finalizing
1616         CLASSTYPE_METHOD_VEC.
1617         * call.c (add_function_candidate): Add ctype parm; if non-zero,
1618         override the type of 'this' accordingly.
1619         (add_template_candidate, add_template_candidate_real): Add ctype parm.
1620         (convert_class_to_reference, build_user_type_conversion_1, 
1621         build_new_function_call, build_object_call, build_new_op,
1622         build_new_method_call): Pass ctype parm.
1623
1624         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
1625         the baselink.
1626         * call.c (convert_class_to_reference, build_user_type_conversion_1, 
1627         build_new_function_call, build_object_call, build_new_op,
1628         build_new_method_call, build_op_delete_call): Don't get basetype_path
1629         from a baselink.
1630         * typeck.c (build_component_ref): Likewise.
1631         * init.c (build_offset_ref): Likewise.
1632         (resolve_offset_ref): Don't call enforce_access.  
1633         Call build_scoped_ref.
1634         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
1635         would cause an error or if -pedantic.
1636         * class.c (alter_access): Lose binfo parm.
1637
1638 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
1639
1640         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
1641         types.
1642
1643 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
1644
1645         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
1646         pseudo_type_info creation into the std namespace
1647
1648 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
1649
1650         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
1651         (import_export_class): Remove declaration.
1652         * decl2.c (import_export_class): Make it static.
1653         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
1654         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
1655         EXPR_WITH_FILE_LOCATION.
1656         * lex.c (check_newline): Tweak filename/lineno setting.
1657         * semantics.c (begin_while_stmt): Fix typo in comment.
1658         
1659 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1660
1661         * lang-options.h (-fmessage-length=): Add missing option.
1662
1663         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
1664
1665 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
1666
1667         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
1668
1669 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
1670
1671         * optimize.c (expand_call_inline): Emit the return label before
1672         evaluating the return value.
1673
1674 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
1675
1676         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
1677         than duplicating functionality here.
1678         * optimize.c: Include input.h.
1679         (expand_call_inline): Use push_srcloc and pop_srcloc.
1680         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
1681         * parse.c: Regenerated.
1682         * Makefile.in (lex.o): Depend on input.h.
1683         (optimize.o): Likewise.
1684         
1685 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
1686
1687         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
1688         function type, rather than ICE.
1689
1690 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
1691
1692         * decl.c (grokdeclarator): Call decl_type_access_control.
1693         * parse.y (parse_end_decl): Don't call decl_type_access_control if
1694         decl is null.
1695
1696 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
1697
1698         * decl.c (decls_match): Remove obsolete static member nadgering.
1699
1700 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1701
1702         * decl.c (grokdeclarator): Change ANSI to ISO.
1703         * lex.c (consume_string, readescape, do_identifier): Likewise.
1704         (parse_float, real_yylex): Likewise.
1705         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
1706         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
1707         new_type_id, maybe_label_decls, simple_stmt, 
1708         for.init.statement): Likewise.
1709         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
1710         * semantics.c (finish_named_return_value): Likewise.
1711         * parse.c: Regenerate.
1712
1713 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
1714
1715         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
1716         (CPTI_CLASS_STAR_TYPE): Remove.
1717         (vtable_index_type): Likewise.
1718         (class_star_type_node): Remove.
1719         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
1720         (build_binary_op_nodefault): Remove.
1721         * call.c (build_new_op): Use build_binary_op instead of
1722         build_binary_op_nodefault.
1723         * decl.c (init_decl_processing): Remove class_star_type_node
1724         initialization.  Make delta_type_node ptrdiff_type_node under the
1725         new ABI.  Initialize vtable_index_type.
1726         (build_ptrmemfunc_type): Build different structures for the new
1727         ABI.
1728         (build_enumerator): Use build_binary_op instead of
1729         build_binary_op_nodefault.
1730         * method.c (build_overload_value): Mangle pointers-to-members
1731         appropriately under the new ABI.
1732         * typeck.c (build_array_ref): Use build_binary_op instead of
1733         build_binary_op_nodefault.
1734         (get_member_function_from_ptrfunc): Adjust for the new ABI.
1735         (build_binary_op_nodefault): Rename to ...
1736         (build_binary_op): ... this.  Remove old version.  Adjust for
1737         pointer-to-member comparisons under the new ABI.
1738         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
1739         (build_ptrmemfunc): Adjust for the new ABI.
1740         (expand_ptrmemfunc_cst): Likewise.
1741         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
1742         (pfn_from_ptrmemfunc): Adjust for the new ABI.
1743         
1744 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
1745
1746         * call.c (build_object_call): Compress consecutive calls to
1747         cp_error.
1748         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
1749         (build_op_delete_call): Adjust message formatting.
1750
1751         * class.c (check_bases): Compress consecutive calls to
1752         cp_pedwarn. 
1753         (finish_struct_anon): Say 'ISO C++'.
1754
1755         * decl.c (start_decl): Same here.
1756         (grok_reference_init): Likewise.
1757         (grokfndecl): Correct message formatting.
1758         (grokfndecl): Improve diagnostic.
1759         (check_static_variable_definition): Likewise. Say 'ISO C++'
1760         (compute_array_index_type): Say 'ISO C++'
1761         (create_array_type_for_decl): Compress consecutive calls to
1762         cp_error. 
1763         (grokdeclarator): Say 'ISO C++'
1764         (grok_op_properties): Likewise.
1765
1766         * decl2.c (delete_sanity): Clairify diagnostic.
1767         (check_member_template): Same here.
1768         (grok_function_init): Use consistent terminology.
1769
1770         * expr.c (do_case): Say 'ISO C++'
1771
1772         * friend.c (do_friend): Compress consecutive calls to warning.
1773         
1774 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
1775
1776         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
1777         * class.c (build_secondary_vtable): Reorganize.  Don't create a
1778         new vtable under the new ABI.
1779         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
1780         computing the size.
1781         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
1782         the initializing elements.
1783         (initialize_vtable): New function.
1784         (dfs_finish_vtbls): Use it.
1785         (dfs_accumulate_vtbl_inits): New function.
1786         (finish_vtbls): Merge primary and secondary vtables under the new
1787         ABI.
1788         (finish_struct_1): Remove redundant call to layout_vtable_decl.
1789         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
1790         aren't VAR_DECLs.
1791
1792         * class.c (build_vtable): New function, split out from ...
1793         (get_vtable_decl): ... here, and ...
1794         (build_secondary_vtable): ... here.
1795
1796         * pt.c (tsubst_decl): Fix formatting.
1797         
1798 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1799
1800         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
1801         (avoid_overlap, build_base_field): Likewise.
1802         (build_base_field, build_base_fields, is_empty_class): 
1803         Test DECL_SIZE with integer_zero.
1804         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
1805         * cp-tree.h (struct lang_type): New field size_unit.
1806         (CLASSTYPE_SIZE_UNIT): New macro.
1807         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
1808         (cp_finish_decl): Delete -Wlarger-than processing.
1809         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
1810         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
1811         * tree.c (make_binfo): binfo vector is one entry longer.
1812         (walk_tree): Walk DECL_SIZE_UNIT.
1813
1814 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
1815
1816         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
1817         comment.
1818         (build_vtable_entry): Don't assume all vtable entries are
1819         functions.
1820         (build_vtbl_initializer): Adjust accordingly.
1821         (get_vtable_decl): Fix formatting.
1822         
1823 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
1824
1825         * semantics.c (deferred_type_access_control): Walk the entire
1826         type_lookups list.
1827         (save_type_access_control): Rename from 
1828         initial_deferred_type_access_control.  Just remember the value.
1829         (decl_type_access_control): New fn.
1830         (begin_function_definition): Use deferred_type_access_control, after
1831         we've started the function.  Set type_lookups to error_mark_node.
1832         * parse.y (frob_specs, fn.def1): Adjust.
1833         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
1834         (parse_end_decl, parse_bitfield0, parse_method): New fns.
1835         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
1836         (after_type_component_declarator0): Likewise.
1837         (after_type_component_declarator): Likewise.
1838         (notype_component_declarator): Likewise.
1839         * cp-tree.h: Adjust.
1840
1841         * decl.c (redeclaration_error_message): Allow redeclaration of 
1842         namespace-scope decls.
1843
1844 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
1845
1846         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
1847
1848 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
1849
1850         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
1851         * decl2.c (grokclassfn): Likewise.
1852
1853         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
1854
1855         * decl2.c (lang_decode_option): Don't set default message length
1856         here.
1857         * lex.c (lang_init_options): Set it here.
1858
1859 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
1860
1861         Make DECL_CONTEXT mean the class in which a member function was
1862         declared, even for a virtual function.
1863         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
1864         (DECL_FRIEND_CONTEXT): New macro.
1865         (DECL_REAL_CONTEXT): Remove.
1866         (SET_DECL_FRIEND_CONTEXT): Likewise.
1867         (DECL_VIRTUAL_CONTEXT): Adjust.
1868         (DECL_CLASS_SCOPE_P): Use TYPE_P.
1869         (add_friends): Remove.
1870         (hack_decl_function_context): Likewise.
1871         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
1872         CP_DECL_CONTEXT.
1873         (build_over_call): Fix indentation.  Use DECL_CONTEXT
1874         instead of DECL_CLASS_CONTEXT.
1875         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
1876         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
1877         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
1878         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
1879         (build_base_field): Likewise.
1880         (finish_struct_1): Likewise.
1881         (build_self_reference): Likewise.
1882         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
1883         DECL_REAL_CONTEXT.
1884         (pushtag): Use decl_function_context, not
1885         hack_decl_function_context.
1886         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
1887         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
1888         (pushdecl): Remove bogus code.
1889         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
1890         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
1891         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
1892         Use decl_function_context, nothack_decl_function_context.
1893         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
1894         (grokdeclarator): Likewise.  Use decl_function_context, not
1895         hack_decl_function_context.
1896         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
1897         (start_function): Use DECL_FRIEND_CONTEXT, not
1898         DECL_CLASS_CONTEXT.  Use decl_function_context, not
1899         hack_decl_function_context.
1900         (finish_function): Use decl_function_context, not
1901         hack_decl_function_context.
1902         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
1903         DECL_CLASS_CONTEXT.
1904         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
1905         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
1906         (grokfield): Likewise.
1907         (finish_builtin_type): Likewise.
1908         (finish_vtable_vardec): Use decl_function_context, not
1909         hack_decl_function_context.
1910         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
1911         (start_static_initialization_or_destruction): Likewise.
1912         (finish_static_initialization_or_destruction): Likewise.
1913         (mark_used): Adjust logic for deciding when to synthesize methods.
1914         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
1915         DECL_REAL_CONTEXT.
1916         * error.c (dump_function_decl): Use DECL_CONTEXT, not
1917         DECL_CLASS_CONTEXT.
1918         * friend.c (is_friend): Likewise.
1919         (add_friends): Remove.
1920         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
1921         * lex.c (begin_definition_of_inclass_inline): Use
1922         decl_function_context, not hack_decl_function_context.
1923         (process_next_inline): Likewise.
1924         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
1925         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
1926         DECL_CLASSS_CONTEXT.
1927         (hack_identifier): Likewise.
1928         (synthesize_method):  Use decl_function_context, not
1929         hack_decl_function_context.
1930         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
1931         DECL_REAL_CONTEXT.
1932         (is_member_template): Use decl_function_context, not
1933         hack_decl_function_context.  Use DECL_CONTEXT, not
1934         DECL_CLASS_CONTEXT.
1935         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not 
1936         DECL_CLASS_CONTEXT.
1937         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
1938         DECL_REAL_CONTEXT.
1939         (push_template_decl_real): Likewise.
1940         (instantiate_class_template): Don't call add_friends.
1941         (tsubst_default_argument): Use DECL_CONTEXT, not
1942         DECL_REAL_CONTEXT.
1943         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
1944         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
1945         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
1946         DECL_CLASS_CONTEXT.
1947         * repo.c (repo_inline_used): Likewise.
1948         * search.c (current_scope): Adjust for new _CONTEXT macros.
1949         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
1950         DECL_REAL_CONTEXT.
1951         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
1952         (lookup_fnfields_here):Likewise.
1953         (check_final_overrider): Likewise.
1954         (init_vbase_pointers): Likewise.
1955         (virtual_context): Likewise.
1956         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
1957         (expand_body): Use decl_function_context, not
1958         hack_decl_function_context.
1959         * tree.c (hack_decl_function_context): Remove.
1960         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
1961         DECL_CLASS_CONTEXT.
1962         * typeck2.c (error_not_base_type): Likewise.
1963         
1964 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
1965
1966         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
1967
1968 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1969
1970         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
1971
1972 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
1973
1974         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
1975
1976 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
1977
1978         * decl2.c (lang_decode_option): Enable automatic line wrapping.
1979
1980 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
1981
1982         * parse.y (frob_specs): Split out...
1983         (parse_decl): From here.
1984         (fn.def2): Call initial_deferred_type_access_control.
1985         (after_type_component_declarator0): Call frob_specs.
1986         (notype_component_declarator0): Likewise.
1987         * search.c (friend_accessible_p): Nested classes are friends of their
1988         enclosing classes.
1989
1990 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
1991
1992         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
1993         used to create an implicit temporary.
1994
1995         * class.c (dfs_modify_vtables): Tweak calculation of functions to
1996         override.
1997
1998 2000-02-08  Nathan Sidwell  <nathan@acm.org>
1999
2000         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
2001         strip array element qualifiers too.
2002
2003 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
2004
2005         * decl.c (store_parm_decls): Don't build cleanups for parameters
2006         while processing_template_decl.
2007
2008 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
2009
2010         * cp-tree.h (struct saved_scope): Add incomplete field.
2011         (namespace_scope_incomplete): New macro.
2012         * decl.c (pushdecl): Use it.
2013         (hack_incomplete_structures): Use it.  See through artificial
2014         binding levels.
2015         (mark_saved_scope): Mark it.
2016
2017         Implement access control for nested types.
2018         * search.c (type_access_control): New fn.
2019         (accessible_p): Now we do perform access control for types.
2020         * semantics.c (deferred_type_access_control): New fn.
2021         (initial_deferred_type_access_control): New fn.
2022         (begin_function_definition): Call it.  Add lookups parm.
2023         * decl.c (struct binding_level): Add this_class field.
2024         (pushlevel_class): Set it.
2025         (mark_binding_level): Mark it.
2026         (lookup_name_real): Use it.  Call type_access_control.
2027         (mark_saved_scope): Mark lookups field.
2028         * cp-tree.h (flagged_type_tree): Add lookups field.
2029         (struct saved_scope): Add lookups field.
2030         (type_lookups): New macro.
2031         * parse.y (declmods): Now <ftype>.
2032         (parse_decl): Add lookups parm.  Call 
2033         initial_deferred_type_access_control.
2034         (lang_extdef): Clear type_lookups.
2035         (typed_declspecs, declmods, typespec): Set lookups field.
2036         (initdcl): Call deferred_type_access_control.
2037         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
2038         component_decl_1, named_parm): Adjust.
2039         * friend.c (is_friend): Nested classes are friends of their
2040         enclosing classes.
2041
2042         * class.c (currently_open_derived_class): New fn.
2043         * method.c (hack_identifier): Use it.
2044
2045         * lex.c (do_identifier): Remove obsolete code.
2046
2047         * parse.y (typed_typespecs): Propagate new_type_flag properly.
2048
2049 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
2050
2051         * tinfo.h: Remove apostrophes from C++ comment (xgettext
2052         thinks this file is plain C).
2053
2054 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2055
2056         * Makefile.in (call.o): Depend on $(EXPR_H).
2057
2058         * call.c: Include "expr.h".
2059
2060         * class.c (dump_class_hierarchy): Add prototype.
2061
2062         * search.c (dfs_get_pure_virtuals): Likewise.
2063
2064 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
2065
2066         * parse.y (simple_stmt): Allow :: token in asm parameter list.
2067         * parse.c: Rebuilt.
2068
2069 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
2070
2071         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
2072         Store it in DECL_FCONTEXT.
2073         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
2074
2075 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
2076
2077         * tinfo.h (old abi): #include "tconfig.h".
2078         * tinfo.cc (convert_to_base): Move into old abi section.
2079
2080 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
2081
2082         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
2083         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
2084         (BINFO_PRIMARY_BINFO): New macro.
2085         (BF_DELTA): Rename to ...
2086         (BV_DELTA): ... this.
2087         (BF_VCALL_INDEX): Rename to ...
2088         (BV_VCALL_INDEX): ... this.
2089         (BF_FN): Rename to ...
2090         (BV_FN): ... this.
2091         * class.c (build_vbase_path): Adjust for changes to reverse_path.
2092         (set_rtti_entry): Rename BF_ macros to BV_ variants.
2093         (modify_vtable_entry): Simplify.
2094         (add_virtual_function): Rename BF_ macros to BV_ variants.
2095         (build_vtable_initializer): Likewise.
2096         (get_class_offset_1): Remove.
2097         (dfs_get_class_offset): Likewise.
2098         (get_class_offset): Likewise.
2099         (dfs_find_final_overrider): New function.
2100         (find_final_overrider): Likewise.
2101         (modify_one_vtable): Remove.
2102         (dfs_find_base): New function.
2103         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
2104         find_final_overrider.
2105         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
2106         virtuals.
2107         (dfs_fixup_vtable_deltas): Remove.
2108         (override_one_vtable): Remove.
2109         (merge_overrides): Likewise.
2110         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
2111         unreal chilren of virtual bases.
2112         (finish_struct_1): Don't use merge_overrides.  Don't use
2113         dfs_fixup_vtable_deltas.
2114         * tree.c (reverse_path): Return a TREE_LIST, not a chain of 
2115         BINFOs.
2116         
2117 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
2118             Jason Merrill  <jason@yorick.cygnus.com>
2119
2120         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
2121
2122 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
2123
2124         * exception.cc (__throw_bad_typeid): Add missing std::.
2125
2126 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2127
2128         * cp-tree.h (make_thunk): PROTO -> PARAMS.
2129
2130 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
2131
2132         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
2133
2134         Runtime support for new-abi rtti.
2135         * inc/typeinfo (type_info::operator!=): Define in class.
2136         (type_info::before, type_info::name, type_info::operator==,
2137         type_info::operator!=): Define new ABI implementations.
2138         (type_info::is_pointer_p, type_info::is_function_p): Declare
2139         new virtual functions.
2140         (type_info::do_catch, type_info::do_upcast): Likewise.
2141         
2142         * tinfo.h (__base_class_info): Define new class.
2143         (__class_type_info): Likewise.
2144         (__si_class_type_info): Likewise.
2145         (__vmi_class_type_info): Likewise.
2146         (__dynamic_cast): Prototype.
2147         
2148         * tinfo.cc: Conditionalize old and new rtti mechanisms.
2149         (type_info::is_pointer_p): Define new function.
2150         (type_info::is_function_p): Likewise.
2151         (type_info::do_catch): Likewise.
2152         (type_info::do_upcast): Likewise.
2153         (vtable_prefix): New structure for vtable access.
2154         (adjust_pointer): Define new template function.
2155         (contained_p, public_p, virtual_p, contained_public_p,
2156         contained_nonpublic_p, contained_nonvirtual_p): Define new
2157         functions.
2158         (nonvirtual_base_type): New local variable.
2159         (__class_type_info::~__class_type_info): Define.
2160         (__si_class_type_info::~__si_class_type_info): Likewise.
2161         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
2162         (__class_type_info::do_catch): Define new function.
2163         (__class_type_info::do_upcast): Likewise.
2164         (__class_type_info::find_public_src): Likewise.
2165         (__class_type_info::do_find_public_src): Likewise.
2166         (__si_class_type_info::do_find_public_src): Likewise.
2167         (__vmi_class_type_info::do_find_public_src): Likewise.
2168         (__class_type_info::do_dyncast): Likewise.
2169         (__si_class_type_info::do_dyncast): Likewise.
2170         (__vmi_class_type_info::do_dyncast): Likewise.
2171         (__class_type_info::do_upcast): Likewise.
2172         (__si_class_type_info::do_upcast): Likewise.
2173         (__vmi_class_type_info::do_upcast): Likewise.
2174         (__dynamic_cast): Likewise.
2175         
2176         * tinfo2.cc (__fundamental_type_info): Define new class.
2177         (__pointer_type_info): Likewise.
2178         (__reference_type_info): Likewise.
2179         (__array_type_info): Likewise.
2180         (__function_type_info): Likewise.
2181         (__enum_type_info): Likewise.
2182         (__ptr_to_member_type_info): Likewise.
2183         (__fundamental_type_info::~__fundamental_type_info): Define.
2184         (__pointer_type_info::~__pointer_type_info): Likewise.
2185         (__reference_type_info::~__reference_type_info): Likewise.
2186         (__array_type_info::~__array_type_info): Likewise.
2187         (__function_type_info::~__function_type_info): Likewise.
2188         (__enum_type_info::~__enum_type_info): Likewise.
2189         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
2190         (__pointer_type_info::do_catch): Define new function.
2191         (__ptr_to_member_type_info::do_catch): Define new function.
2192         
2193         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
2194         (__is_pointer): Likewise.
2195
2196         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
2197
2198 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
2199
2200         * cp/class.c (build_vtable): Rename to build_primary_vtable.
2201         (prepare_fresh_vtable): Rename to build_secondary_vtable.
2202         (make_new_vtable): New function.
2203         (modify_vtable_entry): Handle generation of new vtables correctly.
2204         (modify_one_vtable): Remove unused parameter.
2205         (dfs_fixup_vtable_deltas): Likewise.
2206         (override_one_vtable): Use build_secondary_vtable.
2207         (finish_struct_1): Use build_primary_vtable and
2208         build_secondary_vtable.
2209         
2210 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
2211
2212         * cp/decl.c: Adjust variable names, comments, help strings.
2213
2214 2000-01-29  Nathan Sidwell  <nathan@acm.org>
2215
2216         * new2.cc (operator delete[]): Use operator delete, don't assume
2217         implementation.
2218
2219 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
2220
2221         * class.c (build_vtbl_initializer): Add argument to
2222         build_vtable_entry call.
2223
2224 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
2225
2226         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
2227         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
2228         (BF_DELTA): New macro.
2229         (BF_VCALL_INDEX): Likewise.
2230         (BF_FN): Likewise.
2231         (THUNK_VCALL_OFFSET): Likewise.
2232         (make_thunk): Change prototype.
2233         * class.c (build_vtable_entry): Integrate
2234         build_vtable_entry_for_fn.  Handle vcall indices.
2235         (build_vtable_entry_for_fn): Remove.
2236         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
2237         BF_VCALL_INDEX, BF_FN.
2238         (modify_vtable_entry): Integrate common code from
2239         modify_one_vtable and dfs_fixup_vtable_deltas.
2240         (add_virtual_function): Set BF_VCALL_INDEX.
2241         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
2242         and BF_FN.
2243         (modify_one_vtable): Simplify.
2244         (dfs_fixup_vtable_deltas): Likewise.
2245         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. 
2246         * method.c (make_thunk): Handle vcall indices.
2247         
2248 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
2249
2250         Compiler side new abi rtti (not enabled).
2251         * cp-tree.h (new_abi_rtti_p): New macro.
2252         (emit_support_tinfos): Prototype new function.
2253         (tinfo_decl_p): Likewise.
2254         (emit_tinfo_decl): Likwise.
2255         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
2256         macros.
2257         (doing_runtime): New local static.
2258         (init_rtti_processing): Add new-abi initializer.
2259         (get_tinfo_decl): Add new-abi logic.
2260         (tinfo_from_decl): Likewise.
2261         (build_dynamic_cast_1): Likewise.
2262         (qualifier_flags): New static function.
2263         (tinfo_base_init): Likewise.
2264         (generic_initializer): Likewise.
2265         (ptr_ref_initializer): Likewise.
2266         (ptmd_initializer): Likewise.
2267         (class_hint_flags): Likewise.
2268         (class_initializer): Likewise.
2269         (synthesize_tinfo_var): Likewise.
2270         (create_real_tinfo_var): Likewise.
2271         (create_pseudo_type_info): Likewise.
2272         (get_vmi_pseudo_type_info): Likewise.
2273         (create_tinfo_types): Likewise.
2274         (emit_support_tinfos): New global function.
2275         (tinfo_decl_p): New global predicate.
2276         (emit_tinfo_decl): New global function.
2277         * class.c (set_rtti_entry): Generalize for old and new rtti.
2278         (build_vtbl_initializer): Likewise.
2279         * decl2.c (finish_file): Likewise.
2280
2281 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
2282
2283         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
2284         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
2285
2286 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
2287
2288         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
2289         for scopes.
2290
2291 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
2292
2293         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
2294
2295 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
2296
2297         * optimize.c (calls_setjmp_r): Supply new argument
2298         to special_function_p.
2299
2300 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2301
2302         * call.c: PROTO -> PARAMS.
2303         * class.c: Likewise.
2304         * cp-tree.h: Likewise.
2305         * cvt.c: Likewise.
2306         * decl.c: Likewise.
2307         * decl.h: Likewise.
2308         * decl2.c: Likewise.
2309         * dump.c: Likewise.
2310         * errfn.c: Likewise.
2311         * error.c: Likewise.
2312         * except.c: Likewise.
2313         * expr.c: Likewise.
2314         * init.c: Likewise.
2315         * input.c: Likewise.
2316         * lex.c: Likewise.
2317         * lex.h: Likewise.
2318         * method.c: Likewise.
2319         * optimize.c: Likewise.
2320         * parse.y: Likewise.
2321         * pt.c: Likewise.
2322         * repo.c: Likewise.
2323         * rtti.c: Likewise.
2324         * search.c: Likewise.
2325         * semantics.c: Likewise.
2326         * spew.c: Likewise.
2327         * tree.c: Likewise.
2328         * typeck.c: Likewise.
2329         * typeck2.c: Likewise.
2330         * xref.c: Likewise.
2331
2332 2000-01-25  Richard Henderson  <rth@cygnus.com>
2333
2334         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
2335
2336 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
2337
2338         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
2339         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
2340         (struct vcall_offset_data_s): New type.
2341         (dfs_vcall_offset_queue_p): New function.
2342         (dfs_build_vcall_offset_vtbl_entries): Likewise.
2343         (build_vcall_offset_vtbl_entries): Likewise.
2344         (layout_vtable_decl): Likewise.
2345         (num_vfun_entries): Likewise.
2346         (num_extra_vtbl_entries): Add the entries for vcall offsets.
2347         (build_vtbl_initializer): Likewise.
2348         (dfs_finish_vtabls): Use layout_vtable_decl.
2349         (modify_one_vtables): Always duplicate vtables under the new ABI.
2350         (finish_struct_1): Use layout_vtable_decl.
2351         
2352 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2353
2354         * decl.c (member_function_or_else): Change third arg from a format
2355         specifier to an `enum overload_flags'.  Callers changed.
2356
2357 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
2358
2359         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
2360         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
2361         build_const_cast, get_delta_difference, check_return_expr): Avoid
2362         ANSI string concatenation usage.  
2363
2364 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
2365
2366         * class.c (layout_class_type): Put the fields required to make a
2367         class non-empty at the end, not the beginning, of the TYPE_FIELDs
2368         list.
2369
2370 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
2371
2372         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
2373         template.
2374
2375         * decl2.c (mark_used): Do instantiate inlines that have been
2376         explicitly instantiated.
2377
2378 2000-01-24  Richard Henderson  <rth@cygnus.com>
2379
2380         * call.c (build_over_call): Use expand_tree_builtin.
2381         * typeck.c (build_function_call_real): Likewise.
2382         (build_binary_op_nodefault): Handle unordered compares.
2383
2384 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
2385
2386         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
2387         cp_tree_index values.
2388         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
2389         New global node #defines for them.
2390         * rtti.c (call_void_fn): Replace with ...
2391         (build_runtime_decl): ... new static function.
2392         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
2393         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
2394         (build_dynamic_cast_1): Always produce correctly typed result.
2395         Explicitly produce type_info addresses. Use dynamic_cast_node.
2396         * exception.cc (__throw_bad_cast): Return `void *'.
2397         (__throw_bad_typeid): Return `const type_info &'.
2398
2399 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
2400
2401         * cp-tree.h (get_vtable_decl): Prototype new function.
2402         * class.c (get_vtable_decl): New function. Broken out from ...
2403         (build_vtable): ... here. Use it.
2404         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
2405         by get_vtable_decl.
2406
2407 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
2408
2409         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
2410         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
2411         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
2412         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
2413         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
2414         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
2415         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
2416         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
2417         (CPTI_TINFO_VAR_ID): New enumeration.
2418         (__tp_desc_type_node, __access_mode_type_node,
2419         __bltn_desc_type_node, __user_desc_type_node,
2420         __class_desc_type_node, __ptr_desc_type_node,
2421         __attr_desc_type_node, __func_desc_type_node,
2422         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
2423         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
2424         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
2425         enum_desc_type_node, class_desc_type_node,
2426         si_class_desc_type_node, vmi_class_desc_type_node,
2427         ptmd_desc_type_node, base_desc_type_node): New #defines.
2428         (tinfo_fn_id, tinfo_fn_type): Rename to ...
2429         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
2430         (tinfo_var_id): New enumeration.
2431         (DECL_TINFO_FN_P): Augment comment.
2432         * decl.c (cp_global_trees): Adjust documentation.
2433         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
2434         tinfo_decl_type and tinfo_var_id.
2435         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
2436         (build_typeid): Remove unused variable.
2437         (get_tinfo_var): Use tinfo_var_id.
2438         (tinfo_name): New static function.
2439         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
2440         (tinfo_from_decl): Likewise.
2441         (get_base_offset): New static function, broken out of
2442         expand_class_desc.
2443         (expand_si_desc): Use tinfo_name.
2444         (expand_class_desc): Likewise. Lose local static variable.
2445         Use base_desc_type_node. Use get_base_offset.
2446         (expand_ptr_desc): Use tinfo_name.
2447         (expand_attr_desc): Likewise.
2448         (expand_generic_desc): Likewise.
2449
2450         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
2451         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
2452
2453 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
2454
2455         * cp-tree.h (__eprintf): Remove declaration.
2456         * tree.c (__eprintf): Remove definition.
2457
2458 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
2459             Mark Mitchell  <mark@codesourcery.com>
2460
2461         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
2462         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
2463
2464 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
2465
2466         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
2467
2468 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
2469
2470         * cp-tree.h (register_dtor_fn): New function.
2471         * decl.c (destroy_local_static): Rename to ...
2472         (register_dtor_fn): ... this.  Give it external linkage.
2473         (expand_static_init): Use it.
2474         * decl2.c (do_static_initialization): Likewise, if using
2475         __cxa_atexit.
2476         (do_static_destruction): Check that __cxa_atexit is not in use.
2477         (finish_file): Don't call do_static_destruction if using
2478         __cxa_atexit.
2479
2480         * typeck.c (convert_arguments): Restore two-message error
2481         reporting.
2482         
2483 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
2484
2485         Remap dynamic cast hint values to be consistent across ABIs.
2486         * search.c (dynamic_cast_base_recurse): Remap generated value.
2487         (get_dynamic_cast_base_type): Adjust documentation.
2488         * tinfo.h (__user_type_info::dyncast): Likewise.
2489         (__user_type_info::find_public_subobj): Remap BOFF meaning.
2490         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
2491         (__class_type_info::do_dyncast): Likewise.
2492         (__class_type_info::do_find_public_subobj): Likewise.
2493         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.     
2494
2495 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
2496
2497         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
2498
2499         * typeck2.c (incomplete_type_error): Restore previous
2500         cp_error and cp_error_at call sequence.
2501         
2502 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
2503
2504         * class.c (dump_class_hierarchy): Make format agree with argument;
2505         cast pointer to unsigned long and print with %lx.
2506         
2507 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
2508
2509         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
2510         
2511         * typeck.c (composite_pointer_type, common_type,
2512         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
2513         build_function_call_real, convert_arguments,
2514         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
2515         build_unary_op, mark_addressable, build_compound_expr,
2516         build_static_cast, build_reinterpret_cast, build_const_cast,
2517         build_c_cast, build_modify_expr, get_delta_difference,
2518         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with 
2519         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
2520         into a single one.
2521         * typeck2.c (readonly_error, abstract_virtuals_error,
2522         process_init_constructor, check_for_new_type): Likewise.
2523
2524 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
2525
2526         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
2527         VAR_DECLs.
2528
2529 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
2530
2531         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
2532         (build_x_typeid): Likewise.
2533         (get_tinfo_fn): Likewise.
2534         (get_tinfo_fn_unused): Rename to ...
2535         (get_tinfo_decl): ... here.
2536         * rtti.c (build_headof): Replace logic error with assertion.
2537         (get_tinfo_fn_dynamic): Rename to ...
2538         (get_tinfo_decl_dynamic): ... here. Make static. Use
2539         complete_type_or_else.
2540         (build_x_typeid): Move into ...
2541         (build_typeid): ... here. Adjust call to
2542         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
2543         throw_bad_typeid expression.
2544         (get_tinfo_fn_unused): Rename to ...
2545         (get_tinfo_decl): ... here. Adjust comment.
2546         (get_tinfo_fn): Delete.
2547         (tinfo_from_decl): New static function.
2548         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
2549         (get_typeid): Use complete_type_or_else.
2550         (build_dynamic_cast_1): Adjust calls to
2551         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
2552         * parse.y (primary): Adjust call to build_typeid.
2553         * except.c (build_eh_type_type_ref): Adjust call to
2554         get_tinfo_decl. Mark as used.
2555         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
2556         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
2557         * parse.c: Regenerated.
2558
2559 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
2560
2561         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
2562         calling convention.
2563         (resolves_to_fixed_type_p): Document calling convention.
2564         * rtti.c (build_x_typeid): Initialize NONNULL.
2565
2566         * cp-tree.h (build_shared_int_cst): New function.
2567         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
2568         * class.c (modify_vtable_entry): Likewise.
2569         (add_virtual_function): Split out code to generated shared
2570         INTEGER_CSTs to build_share_int_cst.
2571         (modify_all_vtables): Handle all the overridden functions here.
2572         Add overridden functions from non-primary virtual bases to the
2573         primary vtable.
2574         (finish_struct_1): Adjust call to modify_all_vtables.  Add
2575         overridden functions from non-primary bases to the vtable.
2576         * tree.c (build_shared_int_cst): New function.
2577         
2578         * cp-tree.h (scratchalloc): Remove.
2579         (build_scratch_list): Likewise.
2580         * call.c (convert_class_to_reference): Replace build_scratch_list
2581         and build_expr_list with build_tree_list.
2582         (add_candidate): Replace scratchalloc with expralloc.  Note memory
2583         leak.
2584         (build_user_type_conversion_1):  Replace build_scratch_list
2585         and build_expr_list with build_tree_list.
2586         (build_new_op): Likewise.
2587         (build_op_delete_call): Likewise.
2588         (convert_like): Likewise.
2589         * cvt.c (ocp_convert): Likewise.
2590         * decl.c (start_decl): Likewise.
2591         (start_function): Likewise.
2592         (finish_destructor_body): Likewise.
2593         (maybe_build_cleanup_1): Likewise.
2594         * decl2.c (reparse_decl_as_expr): Likewise.
2595         * init.c (perform_member_init): Likewise.
2596         (expand_cleanup_for_base): Likewise.
2597         (build_builtin_delete_call): Likewise.
2598         (build_new_1): Likewise.
2599         (build_delete): Likewise.
2600         * method.c (do_build_assign_ref): Likewise.
2601         * parse.y (already_scoped_stmt): Likewise.
2602         (nontrivial_exprlist): Likewise.
2603         (net_initializer): Likewise.
2604         (initlist): Likewise.
2605         * parse.c: Regenerated.
2606         * rtti.c (build_x_typeid): Likewise.
2607         (build_dynamic_cast_1): Likewise.
2608         * typeck.c (build_x_compound_expr): Likewise.
2609         (build_static_cast): Likewise.
2610         (build_modify_expr): Likewise.
2611         
2612         * cp-tree.h (DECL_VINDEX): Add documentation.
2613         * class.c (build_vtable_entry): Likewise.
2614         (start_vtable): Add comment.
2615         (add_virtual_function): Replace pending_hard_virtuals with
2616         overridden_virtuals and pending_virtuals with new_virtuals.
2617         Replace redundant assignments with assertions.
2618         (check_for_override): Add comment.
2619         (check_bases_and_members): Replace pending_hard_virtuals with
2620         overridden_virtuals and pending_virtuals with new_virtuals.
2621         (create_vtbl_ptr): Likewise.
2622         (layout_class_type): Likewise.
2623         (finish_struct_1): Likewise.  Add comments.
2624         
2625 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
2626
2627         * class.c (finish_struct_1): Replace redundant code with
2628         assertions.
2629
2630         * cp-tree.h (flag_new_abi): Move.
2631         (flag_use_cxa_atexit): Likewise.
2632         (flag_honor_std): Likewise.
2633         (flag_rtti): Likewise.
2634         (vbase_offsets_in_vtable_p): Define.
2635         (vptrs_present_everywhere_p): Likewise.
2636         (TYPE_CONTAINS_VPTR_P): Likewise.
2637         (dfs_walk_real): Declare.
2638         * class.c (build_vbase_pointer_fields): Check
2639         vbase_offsets_in_vtable_p.
2640         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
2641         BINFO_VPTR_FIELD.
2642         (build_vbase_offset_vtbl_entries): Simplify.
2643         (build_vbase_offset_vtbl_entries): Adjust.
2644         (build_vbase_pointer): Add ability to look up vbase offsets in
2645         vtable. 
2646         (start_vtable): New function.
2647         (add_virtual_function): Use it.
2648         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
2649         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
2650         (build_vtbl_initializer): Take the type of the complete object as
2651         input.  Use it to correctly calculate vbase offsets.
2652         (dfs_finish_vtbls): Pass the complete type to
2653         build_vtbl_initializer.
2654         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
2655         (create_vtable_ptr): Create a vtable even if there are no
2656         new virtual functions, under the new ABI.
2657         (finish_struct_1): Likewise.
2658         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
2659         * decl.c (exapnd_static_init): Remove call to
2660         preserve_initializer.
2661         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
2662         vtables.
2663         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
2664         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
2665         (construct_virtual_bases): Don't initialize virtual base pointers
2666         under the new ABI.
2667         (build_aggr_init): Clean up comment.
2668         (expand_aggr_init_1): Likewise.
2669         * rtti.c (expand_class_desc): Store the virtual function table
2670         index where the vbase offset lives in the offset field.
2671         * search.c (dfs_walk_real): Make it global.
2672         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
2673         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
2674         
2675         * tinfo.h (USItype): Make it signed under the new ABI.
2676         * tinfo.cc (convert_to_base): New function.  Encapsulate base
2677         conversion logic here.
2678         (__class_type_info::do_upcast): Use it.
2679         (__class_type_info::do_dyncast): Likewise.
2680         (__class_type_info::do_find_public_subobj): Likewise.
2681         
2682         * init.c (construct_virtual_bases): Don't look up the addresses of
2683         virtual bases at run-time.
2684
2685         * class.c (build_vbase_pointer): Relocate.
2686         (build_vbase_pointer_fields): Likewise.
2687         (dfs_build_vbase_offset_vtbl_entries): Likewise.
2688         (build_vbase_offset_vtbl_entries): Likewise.
2689
2690         * decl.c (init_decl_processing): Complain if -fnew-abi
2691         -fno-vtable-thunks is used.
2692
2693         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
2694         flag_new_abi.
2695
2696 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
2697
2698         * cp-tree.h (num_extra_vtbl_entries): New function.
2699         (size_extra_vtbl_entries): Likewise.
2700         (dfs_vtable_path_unmark): Likewise.
2701         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
2702         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
2703         * class.c (num_extra_vtbl_entries): New function.
2704         (size_extra_vtbl_entries): Likewise.
2705         (dfs_build_vbase_offset_vtbl_entries): New function.
2706         (build_vbase_offset_vtbl_entries): Likewise.
2707         (build_vtbl_initializer): Use it.
2708         (finish_struct_1): Adjust vtable sizes (using
2709         num_extra_vtbl_entries).
2710         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
2711         THUNK_DECL is non-NULL before expanding it.
2712         * init.c (expand_virtual_init): Adjust the vtable pointer by
2713         size_extra_vtbl_entries before storing it.
2714         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
2715         Handle TREE_LIST parameters here, not in the dfs_* functions.
2716         (dfs_unmarked_real_bases_queue_p): Adjust.
2717         (dfs_marked_real_bases_queue_p): Likewise.
2718         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
2719         (dfs_vtable_path_marked_real_bases_queue_p): New function.
2720         (dfs_vtable_path_unmark): Likewise.
2721         
2722 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
2723
2724         * optimize.c (copy_body_r): Clear the operand three of a
2725         TARGET_EXPR when copying it.
2726
2727 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2728
2729         * method.c (build_decl_overload_real): Check whether we are in ::
2730         before returning __builtin_new/delete.
2731
2732 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
2733
2734         * pt.c (tsubst_friend_function): Improve comment.
2735         (instantiate_decl): Avoid crashing when a "nested" function is
2736         instantiated from the top level.
2737         
2738         * dump.c (dqeueue_and_dump): Dump
2739         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
2740
2741 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2742
2743         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
2744
2745 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
2746
2747         * g++spec.c (lang_specific_driver): Add -fnew-abi if
2748         ENABLE_NEW_GXX_ABI defined.
2749         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
2750         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
2751         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
2752
2753 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
2754
2755         * decl.c (start_cleanup_fn): Call pushdecl.
2756
2757         * call.c (convert_class_to_reference): Fix typos.
2758         (build_conditional_expr): Handle errors gracefully.
2759         * class.c (push_nested_class): Likewise.
2760         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
2761         (DECL_THIS_EXTERN): Use it.
2762         (DECL_THIS_STATIC): Likewise.
2763         * cvt.c (convert_to_void): Handle errors gracefully.
2764         (build_expr_type_conversion): Likewise.
2765         * decl.c (maybe_push_decl): Likewise.
2766         (start_decl_1): Likewise.
2767         (require_complete_types_for_parms): Likewise.
2768         * parse.y (structsp): Likewise.
2769         (base_class): Likewise.
2770         * parse.c: Regenerated.
2771         * pt.c (finish_member_template_decl): Likewise.
2772         * typeck.c (decay_conversion): Likewise.
2773         
2774         * cp-tree.h (dfs_skip_vbases): New function.
2775         (find_vbase_instance): Likewise.
2776         * class.c (determine_primary_base): Allow a nearly empty base to
2777         serve as a primary base class under the new ABI.
2778         (get_class_offset_1): Rename to ...
2779         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
2780         messages here.
2781         (get_class_offset): Use it.  Issue error messages here.
2782         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
2783         find the right copies of virtual bases.
2784         (fixup_vtable_deltas1): Rename to ...
2785         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
2786         bases as primary bases.
2787         (fixup_vtable_deltas): Remove.
2788         (override_one_vtable): Handle virtual bases as primary bases.
2789         (merge_overrides): Likewise.
2790         (finish_struct_1): Likewise.
2791         (dump_class_hierarchy): Dump primary-ness of bases as well.
2792         * search.c (mark_primary_bases): Use a pre-order traversal to
2793         handle primary virtual bases.
2794         (dfs_skip_vbases): New fiunction.
2795         (expand_upcast_fixups): Adjust to handle primary virtual bases.
2796         (fixup_virtual_upcast_offsets): Likewise.
2797         (fixup_all_virtual_upcast_offsets): Likewise.
2798         (dfs_find_vbase_instances): New function.
2799         (find_vbase_instance): Likewise.
2800         
2801 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
2802
2803         * lex.c (DIR_SEPARATOR): Delete macro.
2804
2805 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
2806  
2807        * decl2.c (lang_decode_option): Handle automatic line wrapping
2808        option.
2809         
2810 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
2811
2812         * friend.c (do_friend): Don't resolve scopes when processing
2813         template declarations, even if the qualifying scope doesn't
2814         involve template parameters.
2815
2816 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
2817
2818         * class.c (dfs_modify_vtables_queue_p): Remove.
2819         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
2820         and dfs_marked_real_bases_queue_p instead of
2821         dfs_modify_vtables_queue_p.
2822
2823         * class.c (build_vbase_path): Simplify.
2824         (dfs_propagate_binfo_offsets): New function.
2825         (propagate_binfo_offsets): Use it.
2826         (remove_base_field): Simplify.
2827         (dfs_set_offset_for_vbases): Remove.
2828         (dfs_set_offset_for_shared_vbases): New function.
2829         (dfs_set_offset_for_unshared_vbases): Likewise.
2830         (layout_virtual_bases): Use them.
2831         (layout_basetypes): Don't call propagate_binfo_offsets.
2832         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
2833         for the vbases.
2834         
2835         * class.c (build_base_field): New function, split out from ...
2836         (build_base_fields): ... here.  Use it.  Allocate primary bases
2837         first, under the new ABI.
2838         (get_vtable_entry): Remove.
2839         (remove_base_field): New function, split out from ...
2840         (remove_base_fields): ... here.  Adjust since primary bases come
2841         first under the new ABI.
2842         
2843         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
2844         (initialize_vtbl_ptrs): New function.
2845         (expand_indirect_vtbls_init): Change prototype.
2846         (convert_pointer_to_vbase): Declare.
2847         * init.c (expand_direct_vtbls_init): Remove.
2848         (dfs_initialize_vtbl_ptrs): New function.
2849         (initialize_vtbl_ptrs): Likewise.
2850         (emit_base_init): Use initialize_vtbl_ptrs.
2851         * search.c (convert_pointer_to_vbase): Make it global.
2852         (expand_indirect_vtbls_init): Remove vtable initialization code.
2853         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
2854         
2855         * class.c (dfs_finish_vtbls): New function.
2856         (finish_vtbls): Use it.
2857         (dump_class_hierarchy): New function.
2858         
2859         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
2860         (BINFO_VBASE_PRIMARY_P): New macro.
2861         (BINFO_VIRTUALS): Add to documentation.
2862         (SET_BINFO_PRIMARY_MARKED_P): Remove.
2863         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
2864         (dfs_mark_primary_bases_queue_p): Likewise.
2865         (dfs_unmarked_real_bases_queue_p): New function.
2866         (dfs_marked_real_bases_queue_p): Likewise.
2867         * search.c (dfs_mark_primary_bases): Adjust.
2868         (mark_primary_bases): Likewise.
2869         (get_shared_vbase_if_not_primary): New function.
2870         (dfs_unmarked_real_bases_queue_p): Likewise.
2871         (dfs_marked_real_bases_queue_p): Likewise.
2872         (dfs_get_pure_virtuals): Simplify.
2873         (get_pure_virtuals): Likewise.
2874         
2875 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2876
2877         * lex.c: Include tm_p.h.
2878
2879 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
2880
2881         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
2882
2883 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
2884
2885         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
2886         * pt.c (instantiate_decl): Defer comdat templates that might not be
2887         needed.
2888         
2889         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
2890         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
2891         (finish_file): Likewise.
2892
2893         * decl2.c (import_export_class): Undo 12/14 change.
2894
2895         * error.c (dump_decl): operator new, not operatornew.
2896
2897         * class.c (field_decl_cmp): A nontype is "greater" than a type.
2898         * search.c (lookup_field_1): Look for the last field with the
2899         desired name.
2900
2901 2000-01-05  Nathan Sidwell  <nathan@acm.org>
2902
2903         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
2904         FUNCTION_DECL.
2905
2906 2000-01-05  Nathan Sidwell  <nathan@acm.org>
2907
2908         * typeck.c (build_static_cast): Don't strip target qualifiers
2909         when casting from a class.
2910
2911 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2912
2913         * class.c (warn_hidden): Initialize variable `fndecl'.
2914
2915 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
2916
2917         * decl.c (flag_isoc9x): New variable to be able to use code in
2918         c-common.c.  For now always zero.
2919
2920 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
2921
2922         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
2923         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
2924         or unshare_base_binfos for virtual bases here.
2925         * search.c (dfs_get_vbase_types): Do it here.
2926         (get_vbase_types): Adjust.
2927         
2928 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
2929
2930         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
2931         (BINFO_PRIMARY_MARKED_P): Use flag 5.
2932         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
2933         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
2934         (unmark_primary_bases): Remove declaration.
2935         (unmarkedp): Declare.
2936         (dfs_vbase_unmark): Likewise.
2937         * class.c (determine_primary_base): Return immediately if there
2938         are no base classes.  Call mark_primary_bases here.
2939         (modify_all_direct_vtables): Remove.
2940         (modify_all_indirect_vtables): Remove.
2941         (dfs_modify_vtables_queue_p): New function.     
2942         (dfs_modify_vtables): New function.
2943         (modify_all_vtables): Use them.
2944         (build_base_fields): Build FIELD_DECLs for primary virtual base
2945         classes.
2946         (create_vtable_ptr): Don't call determine_primary_base here.
2947         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
2948         (dfs_set_offset_for_vbases): ... this.
2949         (layout_virtual_bases): Use it.
2950         (layout_class_type): Call determine_primary_base here.
2951         * search.c (unmarkedp): Make it global.
2952         (shared_marked_p): Simplify.
2953         (shared_unmarked_p): Likewise.
2954         (dfs_primary_bases_queue_p): Remove.
2955         (dfs_unmark_primary_bases): Likewise.
2956         (unmark_primary_bases): Likewise.
2957         (mark_primary_bases): Simplify.
2958         (get_pure_virtuals): Don't call mark_primary_bases here.
2959         (dfs_vbase_unmark): New function.
2960         (get_vbase_types): Simplify.
2961
2962         * class.c (struct base_info): Remove.
2963         (determine_primary_base): Take has_virtual_p rather than a
2964         base_info as input.  Don't calculate max_has_virtual.
2965         (finish_struct_bits): Remove max_has_virtual argument.
2966         (create_vtable_ptr): Remove max_has_virtual_p argument.
2967         (layout_virtual_bases): Remove max argument.
2968         (layout_basetypes): Likewise.
2969         (layout_class_type): Remove max_has_virtual_p argument.
2970         (finish_struct_1): Remove max_has_virtual.
2971
2972         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
2973         (layout_basetypes): Remove.
2974         * class.c (propagate_binfo_offsets): Moved here from tree.c.
2975         Update to handle primary virtual bases.
2976         (remove_base_fields): New function, split out from
2977         layout_basetypes.
2978         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
2979         (layout_virtual_bases): New function, split out from
2980         layout_basetypes.  Update to handle primary virtual bases.
2981         (layout_basetypes): Moved here from tree.c.  Use
2982         remove_base_fields and layout_virtual_bases.
2983         * search.c (dfs_mark_primary_bases_queue_p): New function.
2984         (mark_primary_bases): Use it.
2985         * tree.c (CEIL): Remove.
2986         (propagate_binfo_offsets): Remove.
2987         (layout_basetypes): Remove.
2988         
2989 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
2990
2991         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
2992         (BINFO_PRIMARY_MARKED_P): New macro.
2993         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
2994         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
2995         (mark_primary_bases): New function.
2996         (unmark_primary_bases): Likewise.
2997         * search.c (get_abstract_virtuals_1): Remove.
2998         (dfs_mark_primary_bases): New function.
2999         (mark_primary_bases): Likewise.
3000         (dfs_unmark_primary_bases): Likewise.
3001         (unmark_primary_bases): Likewise.
3002         (dfs_get_pure_virtuals): Likewise.
3003         
3004 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
3005
3006         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
3007         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
3008         (modify_one_vtable): Adjust.
3009         (fixup_vtable_deltas1): Likewise.
3010         (override_one_vtable): Likewise.
3011         * search.c (get_abstract_virtuals_1): Likewise.
3012         (get_pure_virtuals): Likewise.
3013         (expand_upcast_fixups): Likewise.
3014         * tree.c (debug_binfo): Likewise.
3015         
3016         * class.c (build_vtable): Don't return a value.  Don't rebuild
3017         vtables for bases that have already been handled.
3018         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
3019         already been handled.
3020         (modify_one_vtable): Adjust accordingly.
3021         (fixup_vtable_deltas1): Likewise.
3022         (finish_struct_1): Likewise.
3023
3024 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3025
3026         * call.c (build_new_method_call): Also check destructors.
3027
3028 1999-12-31  Mark Mitchell  <mark@codesourcery.com>
3029
3030         * cp-tree.h (VF_NORMAL_VALUE): Remove.
3031         * class.c (struct base_info): Remove vfield, vfields, and rtti.
3032         (set_primary_base): New function, split out from ...
3033         (finish_base_struct): ... here.  Rename to ...
3034         (determine_primary_base): ... this.  Simplify.
3035         (create_vtable_ptr): Tweak accordingly.
3036         (finish_struct_1): Simplify.
3037         
3038         * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
3039         (CLASSTYPE_N_BASECLASSES): Likewise.
3040         (BINFO_FOR_VBASE): New macro.
3041         (get_vbase_types): Change prototype.
3042         * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
3043         (prepare_fresh_vtable): Likewise.
3044         (finish_vtbls): Likewise.
3045         (get_class_offset_1): Likewise.
3046         (modify_all_indirect_vtables): Likewise.
3047         (build_vbase_pointer_fields): Likewise.
3048         * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
3049         * init.c (sort_base_init): Use BINFO_FOR_VBASE.
3050         (expand_member_init): Likewise.
3051         * search.c (get_base_distance): Likewise.
3052         (lookup_field_queue_p): Likewise.
3053         (virtual_context): Likewise.
3054         (get_vbase_types): Don't return a value.  Set
3055         CLASSTYPE_VBASECLASSES here.
3056         * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
3057         
3058 1999-12-30  Mark Mitchell  <mark@codesourcery.com>
3059
3060         * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
3061
3062 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
3063
3064         * class.c (create_vtable_ptr): Put the vtable at the beginning of
3065         the class, not the end, in the new ABI.
3066         * tree.c (propagate_binfo_offsets): Do the right thing for the new
3067         ABI.
3068
3069 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
3070
3071         * cp-tree.h (lang_type): Add nearly_empty_p.  Adjust dummy.
3072         (CLASSTYPE_NEARLY_EMPTY_P): New macro.
3073         * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
3074         (check_field_decls): Likewise.
3075         (check_bases_and_members): Likewise.
3076
3077 1999-12-28  Mark Mitchell  <mark@codesourcery.com>
3078
3079         * cp-tree.h (do_inline_function_hair): Remove.
3080         * class.c (layout_class_type): New function, split out from
3081         finish_struct_1.
3082         (fixup_pending_inline): Likewise.
3083         (fixup_inline_methods): New function.
3084         * method.c (fixup_pending_inline): Remove.
3085         (do_inline_function_hair): Likewise.
3086         
3087         * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
3088         new ABI.
3089         
3090         * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
3091         (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
3092         (CLASSTYPE_PURE_VIRTUALS): ... this.
3093         (lang_decl_flags): Replace abstract_virtual with pure_virtual.
3094         (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
3095         (DECL_PURE_VIRTUAL_P): ... this.
3096         (get_abstract_virtuals): Rename to ...
3097         (get_pure_virtuals): ... this.
3098         * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
3099         DECL_ABSTRACT_VIRTUAL_P.  Replace CLASSTYPE_ABSTRACT_VIRTUALS with
3100         CLASSTYPE_PURE_VIRTUALS.
3101         * class.c (build_vtable_entry): Likewise.
3102         (finish_struct_bits): Likewise.  Call get_pure_virtuals, not
3103         get_abstract_virtuals.
3104         (build_vtbl_initializer): Likewise.
3105         (override_one_vtable): Likewise.
3106         (check_methods): Likewise.
3107         * decl.c (duplicate_decls): Likewise.
3108         (redeclaration_error_message): Likewise.
3109         (lang_mark_tree): Likewise.
3110         * decl2.c (grok_function_init): Likewise.
3111         (import_export_vtable): Likewise.
3112         (import_expor_class): Likewise.
3113         * typeck2.c (abstract_virtuals_error): Likewise.
3114         * xref.c (GNU_xref_member): Likewise.
3115         * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
3116         
3117 1999-12-26  Zack Weinberg  <zack@wolery.cumb.org>
3118
3119         * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
3120         throughout.
3121
3122 1999-12-26  Mark Mitchell  <mark@codesourcery.com>
3123
3124         * decl.c (store_return_init): Use mode of old RTL generated for
3125         DECL_RESULT, not the mode of DECL_RESULT itself.
3126         * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
3127         for functions that used named return values.
3128         
3129 1999-12-24  Mark Mitchell  <mark@codesourcery.com>
3130
3131         * semantics.c (expand_body): Use
3132         note_deferral_of_defined_inline_function.
3133
3134 1999-12-22  Mark Mitchell  <mark@codesourcery.com>
3135
3136         * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
3137
3138 1999-12-22  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
3139
3140         * error.c (dump_decl): Support named return values.
3141
3142 1999-12-20  Mark Mitchell  <mark@codesourcery.com>
3143
3144         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
3145         (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
3146         (CLASSTYPE_PRIMARY_BINFO): Likewise.
3147         * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
3148         TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
3149         (check_bases_and_members): Set them here instead.
3150         (create_vtable_ptr): New function, split out from ...
3151         (finish_struct_1): ... here.  Use it.  Tidy.  Use
3152         CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
3153         * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
3154         the first field in the class.
3155         * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES.  Handle
3156         seeing TYPE_VFIELD as the first field in the class.
3157         
3158         * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
3159         (TYPE_POLYMORPHIC_P): ... this.
3160         (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
3161         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
3162         (TREE_CALLS_NEW): Remove.
3163         (TREE_MANGLED): Likewise.
3164         * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
3165         and TYPE_POLYMORPHIC_P.
3166         * class.c (check_bases): Likewise.
3167         (finish_base_struct): Likewise.
3168         (finish_struct_bits): Likewise.
3169         (check_for_override): Likewise.
3170         (finish_struct_1): Likewise.
3171         (get_vfield_name): Likewise.
3172         * decl.c (xref_basetypes): Likewise.
3173         * decl2.c (import_export_class): Likewise.
3174         (import_export_decl): Likewise.
3175         * error.c (dump_function_decl): Likewise.
3176         * pt.c (instantiate_class_template): Likewise.
3177         * repo.c (repo_inline_used): Likewise.
3178         * rtti.c (build_headof): Likewise.
3179         (get_tinfo_fn_dynamic): Likewise.
3180         (build_x_typeid): Likewise.
3181         (get_tinfo_var): Likewise.
3182         (build_dynamic_cast_1): Likewise.
3183         (synthesize_tinfo_fn): Likewise.
3184         * search.c (lookup_field_1): Likewise.
3185         (dfs_debug_mark): Likewise.
3186         (maybe_suppress_debug_info): Likewise.
3187         * typeck.c (build_component_ref): Likewise.
3188         (build_component_addr): Likewise.
3189         * typeck2.c (process_init_constructor): Likewise.
3190         
3191 1999-12-20  Nathan Sidwell  <nathan@acm.org>
3192
3193         * typeck.c (strip_all_pointer_quals): New static function.
3194         (build_static_cast): Use it. Don't use at_least_as_qualified_p.
3195
3196 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
3197
3198         * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
3199         (dso_handle_node): New macro.
3200         (flag_use_cxa_atexit): New variable.
3201         (declare_global_var): New function.
3202         (start_anon_func): Remove declaration.
3203         (end_anon_func): Likewise.
3204         * decl.c (get_atexit_node): New function, split out from
3205         destroy_local_static.  Handle flag_use_cxa_atexit.
3206         (get_dso_handle_node): Likewise.
3207         (start_cleanup_fn): Renamed from start_anon_func.  Moved here from
3208         except.c.  Handle flag_use_cxa_atexit.
3209         (end_cleanup_fn): Renamed from end_anon_func.  Moved here from
3210         except.c.
3211         (declare_global_var): New variable.
3212         (destroy_local_static): Handle flag_use_cxa_atexit.
3213         * decl2.c (flag_use_cxa_atexit): New variable.
3214         (lang_f_options): Likewise.
3215         * except.c (start_anon_func): Remove.
3216         (end_anon_func): Liekwise.
3217         * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
3218         * rtti.c (get_tinfo_var): Use declare_global_var.
3219
3220 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
3221
3222         * class.c (check_field_decls): Don't return a value.
3223         (avoid_overlap): Moved here from tree.c.
3224         (build_base_fields): Likewise.
3225         (check_bases): New function, split out from finish_base_struct.
3226         (check_bases_and_members): New function, split out from 
3227         finish_struct_1.
3228         (struct base_info): Remove cant_have_default_ctor,
3229         cant_have_const_ctor, cant_have_asn_ref.
3230         (finish_base_struct): Split semantic analysis into check_bases.
3231         (finish_struct_methods): Fix bogus assertion.
3232         (check_field_decls): Call finish_struct_anon here.
3233         (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
3234         (finish_struct_1): Use check_bases_and_members.  Reorganize.
3235         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
3236         (build_base_fields): Don't declare.
3237         * tree.c (avoid_overlap): Remove.
3238         (build_base_fields): Likewise.
3239         
3240         * optimize.c (struct inline_data): Remove scope_stmt.
3241         (remap_block): Don't use insert_block_after_note.  Don't update
3242         scope_stmt.
3243         (expand_call_inline): Don't update scope_stmt.
3244         (optimize_function): Don't initialize scope_stmt.
3245         * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
3246         NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
3247
3248 1999-12-15  Mark Mitchell  <mark@codesourcery.com>
3249
3250         * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
3251         out of the class, rather than taking them as parameters.
3252         (build_vbase_pointer_fields): Move here from tree.c.
3253         (build_vtbl_or_vbase_field): New function.
3254         (check_methods): Likewise.
3255         (remove_zero_width_bitfields): Likewise.
3256         (add_virtual_function): Use tree_cons instead of temp_tree_cons.
3257         (delete_duplicate_fields_1): Tidy.  Don't delete duplicate
3258         USING_DECLs here.
3259         (finish_struct_methods): Handle the case where there are no
3260         methods here.
3261         (get_basefndecls): Use tree_cons instead of temp_tree_cons.
3262         (check_field_decls): Call delete_duplicate_fields here.
3263         (finish_struct_1): Tidy.  Use check_methods and
3264         remove_zero_width_bitfields.
3265         * cp-tree.h (build_vbase_pointer_fields): Remove.
3266         * decl.c (grokdeclarator): Use tree_cons instead of
3267         temp_tree_cons.
3268         * decl2.c (qualified_lookup_using_namespace): Use tree_cons
3269         instead of temp_tree_cons.
3270         * lex.c (cons_up_default_function): Remove dead code.
3271         * method.c (fixup_pending_inline): New function, split out from ...
3272         (do_inline_function_hair): ... here.
3273         * tree.c (build_vbase_pointer_fields): Remove.
3274         
3275 1999-12-15  Jason Merrill  <jason@casey.cygnus.com>
3276
3277         * tree.c (walk_tree): Walk operand subtrees in forward order.
3278         * optimize.c (expand_call_inline): Likewise.
3279         (optimize_function): Initialize id->scope_stmt to something useful.
3280         (remap_block): Assume id->scope_stmt has a useful value.
3281
3282 1999-12-15  Nathan Sidwell  <nathan@acm.org>
3283
3284         * typeck.c (build_c_cast): Expand warning message. Move pointer
3285         alignment warning to after the cast. Don't warn about pointer
3286         alignment when given a pointer to incomplete.
3287
3288 1999-12-15  Richard Henderson  <rth@cygnus.com>
3289
3290         * cp-tree.h (make_aggr_type): Declare.
3291         * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
3292         (make_aggr_type): New.
3293
3294         * decl.c (build_typename_type, init_decl_processing): Use it.
3295         (build_ptrmemfunc_type, xref_tag): Likewise.
3296         * except.c (call_eh_info): Likewise.
3297         * init.c (init_init_processing): Likewise.
3298         * pt.c (process_template_parm, lookup_template_class): Likewise.
3299         * rtti.c (expand_class_desc): Likewise.
3300         * semantics.c (begin_class_definition, finish_typeof): Likewise.
3301         * tree.c (copy_template_template_parm): Likewise.
3302
3303 1999-12-15  Jason Merrill  <jason@yorick.cygnus.com>
3304
3305         * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
3306         sizeof (struct tree_common).
3307
3308 1999-12-14  Jason Merrill  <jason@casey.cygnus.com>
3309
3310         * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
3311         outermost block to point to the inlined function decl.
3312
3313         * error.c (dump_decl): operator==, not operator ==.
3314         (op_to_string): Likewise.
3315
3316         * decl.c (compute_array_index_type): Handle null name.
3317
3318         * decl2.c (ambiguous_decl): Fix to match comment.
3319         (lookup_using_namespace): Adjust.
3320
3321         * decl2.c (import_export_class): Don't ignore dllimport.
3322
3323 1999-12-14  Mark Mitchell  <mark@codesourcery.com>
3324
3325         * class.c (check_field_decls): Split out from ...
3326         (finish_struct_1): ... here.  Use it.  Tidy.
3327
3328         * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
3329         * optimize.c (copy_body_r): Pass it.
3330         * tree.c (remap_save_expr): Clear walk_subtrees for an
3331         already-handled SAVE_EXPR.
3332         (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
3333
3334         * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
3335         * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
3336
3337         * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
3338
3339 1999-12-14  Mumit Khan  <khan@xraylith.wisc.edu>
3340
3341         * class.c (finish_base_struct): Allow multiple COM base classes
3342         as well as non-COM bases as long as it's not the leftmost.
3343
3344 1999-12-13  Mumit Khan  <khan@xraylith.wisc.edu>
3345
3346         * lex.c (saving_parse_to_obstack): New global.
3347         (reinit_parse_for_block): Use.
3348         (reinit_parse_for_expr): Use.
3349         (check_newline): Use.
3350
3351 1999-12-13  Mark Mitchell  <mark@codesourcery.com>
3352
3353         * optimize.c (initialize_inlined_parameters): Take FN to which the
3354         parameters belong as an argument.
3355         (expand_call_inline): Expand calls into the parameter
3356         initializations before pushing the function onto the list of
3357         functions we are presently expanding.
3358
3359 1999-12-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3360
3361         * class.c (get_vtable_name): Use a literal format string and
3362         VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
3363         (prepare_fresh_vtable): Likewise.
3364
3365         * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
3366         VTABLE_NAME_FORMAT.
3367
3368         * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
3369
3370         * init.c (build_vec_init): Initialize variable `try_body'.
3371
3372         * lex.c (yyerror): Don't call a variadic function with a
3373         non-literal format string.
3374
3375         * optimize.c (optimize_function): Call memset, not bzero.
3376
3377         * pt.c (for_each_template_parm_r): Add static prototype.
3378
3379 1999-12-09  Andreas Jaeger  <aj@suse.de>
3380
3381         * except.c (expand_throw): Add static attribute to match
3382         prototype.
3383
3384         * Makefile.in (semantics.o): Add dependency on output.h.
3385         * semantics.c: Include output.h for declaration of
3386         make_function_rtl.
3387
3388 1999-12-09  Mark Mitchell  <mark@codesourcery.com>
3389
3390         * decl.c (init_decl_processing): Reenable inlining on trees.
3391         (finish_function): Likewise.
3392         * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
3393         * semantics.c (simplify_aggr_init_exprs): New function.
3394         (expand_body): Use it.
3395         * tree.c (walk_tree): Special-case TARGET_EXPRs since they
3396         sometimes present the same sub-tree twice.
3397         
3398         * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
3399         `csl'.
3400
3401         * semantics.c (finish_switch_cond): Do conversions here, not ...
3402         * typeck.c (c_expand_start_case): Here.
3403
3404         * semantics.c (do_poplevel): Remove unused variable.
3405         
3406 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
3407
3408         * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
3409         unless we're declaring the variable in question.
3410
3411 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
3412
3413         * decl.c (init_decl_processing): #if 0 last patch.
3414         (finish_function): Likewise.
3415
3416 1999-12-05  Mark Mitchell  <mark@codesourcery.com>
3417
3418         * decl.c (init_decl_processing): Set flag_inline_trees if
3419         !flag_no_inline.
3420
3421         * cp-tree.h (calls_setjmp_p): Declare.
3422         * decl.c (finish_function): Mark functions that call setjmp as
3423         uninlinable.
3424         * optimize.c (calls_setjmp_r): New function.
3425         (calls_setjmp_p): Likewise.
3426
3427 1999-12-04  Mark Mitchell  <mark@codesourcery.com>
3428
3429         * optimize.c (expand_call_inline): Wrap the expanded call in an
3430         EXPR_WITH_FILE_LOCATION node to get correct line numbers for
3431         inlined functions.
3432
3433         * optimize.c (inline_data): Remove fns_top.  Add scope_stmt.  Add
3434         in_target_cleanup_p.
3435         (remap_decl): New function.
3436         (remap_block): Likewise.
3437         (copy_scope_stmt): Likewise.
3438         (copy_body_r): Use remap_decl and copy_scope_stmt.
3439         (copy_body): Use VARRAY_TOP_TREE.
3440         (initialize_inlined_parameters): Likewise.
3441         (declare_return_variable): Likewise.
3442         (inlinable_function_p): Check flag_inline_trees.
3443         (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
3444         specially.  Use VARRAY_PUSH_TREE.  Create a BLOCK for the
3445         parameters of the inlined function.
3446         (optimize_function): Prevent recursion into partially complete
3447         functions.
3448         
3449         * cp-tree.def (SCOPE_STMT): Take one operand.
3450         * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
3451         (SCOPE_NULLIFIED_P): Redefine.
3452         (SCOPE_NO_CLEANUPS_P): New macro.
3453         (add_scope_stmt): Change prototype.
3454         * decl.c (poplevel): Tidy.  Warn about unused variables here.
3455         Record SCOPE_STMT_BLOCKs.
3456         (finish_function): Keep DECL_INITIAL for functions that might be
3457         inlined.
3458         * ir.texi: Document SCOPE_NO_CLEANUPS_P.
3459         * semantics.c: Include rtl.h.
3460         (add_scope_stmt): Return the new scope statement and, for an
3461         end-of-scope statement, its matching begin statement.  Don't set
3462         SCOPE_NULLIFIED_P.
3463         (do_pushlevel): Simplify, now that we are always
3464         function-at-a-time.
3465         (do_poplevel): Likewise.  Record SCOPE_STMT_BLOCKs.
3466         (expand_stmt): Don't call expand_start_bindings or
3467         expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
3468         * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
3469         SCOPE_NULLIFIED_P.
3470         * Makefile.in (semantics.o): Depend on RTL_H.
3471         
3472         * decl2.c (pending_statics_used): Make it a macro.
3473         (saved_inlines_used): Likewise.
3474         (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
3475         (mark_inline_for_output): Likewise.
3476         (ssdf_decls_used): Remove.
3477         (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
3478         (generate_ctor_or_dtor_function): Adjust accordingly.
3479         
3480 1999-11-24  Geoffrey Keating  <geoffk@cygnus.com>
3481             Greg McGary  <gkm@gnu.org>
3482
3483         * decl.c (duplicate_decls): Merge
3484         DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
3485         DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
3486
3487 1999-12-02  Mike Stump  <mrs@wrs.com>
3488
3489         * init.c (perform_member_init): Handle parse errors better.
3490
3491 1999-12-01  Mark Mitchell  <mark@codesourcery.com>
3492
3493         * cp-tree.h (min_tree_cons): Remove.
3494         (scratch_ovl_cons): Likewise.
3495         * decl.c (saveable_obstack): Don't declare.
3496         (duplicate_decls): Tweak error-message.
3497         (initialize_local_var): Explicitly mark the definition as static.
3498         (finish_function): Call permanent_allocation, just so
3499         that the middle-end sees the obstacks it expects.
3500         (mark_cp_function_context): Likewise.
3501         * init.c (build_new): Don't use min_tree_cons.
3502         * lex.c (permanent_obstack): Don't declare.
3503         (current_obstack, saveable_obstack): Likewise.
3504         * spew.c (current_obstack, saveable_obstack): Likewise.
3505         * tree.c (current_obstack, saveable_obstack): Likewise.
3506         (scratch_ovl_cons): Remove.
3507         (build_min_nt): Don't mess with obstacks.
3508         (build_min): Likewise.
3509         (min_tree_cons): Remove
3510         * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
3511         (build_x_function_call): Likewise.
3512         (build_c_cast): Don't use min_tree_cons.
3513         
3514 1999-11-29  Mark Mitchell  <mark@codesourcery.com>
3515
3516         * pt.c (tsubst_decl): Robustify.
3517
3518 1999-11-27  Mark Mitchell  <mark@codesourcery.com>
3519
3520         * decl2.c (finish_file): Call expand_body for inline functions
3521         that will be written out but that do not yet have RTL.
3522         * semantics.c (expand_body): Do not generate RTL For inline
3523         functions that do not yet need to be written out.
3524
3525 1999-11-25  Mark Mitchell  <mark@codesourcery.com>
3526
3527         * Make-lang.in (CXX_SRCS): Add optimize.c.  
3528         * Makefile.in (CXX_OBJS): Add optimize.o.
3529         (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
3530         (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
3531         (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
3532         (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
3533         (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
3534         (dump.o): Likewise.
3535         (optimize.o): New target.  
3536         * class.c: Don't include splay-tree.h.
3537         * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.  
3538         * cp-tree.h: Include splay-tree.h.
3539         (DECL_UNINLINABLE): New macro.
3540         (CTOR_BEGIN_P, CTOR_END_P): New macros.
3541         (flag_inline_trees): New variable.
3542         (local_variable_p): New function.
3543         (nonstatic_local_decl_p): Likewise.
3544         (optimize_function): Likewise.
3545         (cplus_unsave_expr_now): Remove.
3546         (copy_tree_r): Declare.
3547         (remap_save_expr): Likewise.  
3548         * decl.c (local_variable_p): Don't
3549         make it static.
3550         (local_variable_p_walkfn): New function.
3551         (make_rtl_for_local_static): Remove code to try to avoid writing
3552         out static constants.
3553         (emit_local_var): Fix indentation.
3554         (nonstatic_local_decl_p): New function.
3555         (check_default_argument): Use local_variable_p_walkfn, not
3556         local_variable_p, when walking the tree.
3557         (start_function): Set the DECL_CONTEXT for automatically generated
3558         labels.
3559         (finish_constructor_body): Use CTOR_STMT to mark the end of a
3560         constructor.  
3561         * decl2.c: Don't include splay-tree.h.
3562         (flag_inline_trees): Define.  
3563         * dump.c: Don't include
3564         splay-tree.h.  
3565         * except.c (expand_end_catch_block): Fix comment formatting.
3566         (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
3567         (expand_throw): Tidy comment.  
3568         * init.c (build_vec_delete_1): Use create_temporary_var.  
3569         * lex.c (cplus_tree_code_type): Make it static.
3570         (cplus_tree_code_length): Likewise.
3571         (cplus_tree_code_name): Likewise.  
3572         * optimize.c: New file.  
3573         * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
3574         with computed gotos.
3575         (setup_vtbl_ptr): Mark the beginnings of constructors with
3576         CTOR_STMT.
3577         (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
3578         (expand_body): Call optimize_function.  Save bodies if we're doing
3579         inlining on trees.
3580         * tree.c: Don't include splay-tree.h.  Include insn-config.h and
3581         integrate.h.
3582         (copy_tree_r): Make it public.
3583         (statement_code_p): New function.
3584         (mark_local_for_remap_r): Likewise.
3585         (cp_usave_r): Likewise.
3586         (cp_unsave): Likewise.
3587         (build_cplus_new): Set DECL_CONTEXT for temporary variables.
3588         (walk_tree): Walk into `s' class nodes.  Walk statement chains.
3589         (copy_tree_r): Handle 's' class nodes.  Restore chains for
3590         statements.  Nullify scopes.  Don't copy types.
3591         (init_tree): Set lang_unsave to cp_unsave.
3592         (remap_save_expr): Define.
3593         * ir.texi: Document CTOR_STMT.
3594         
3595 1999-11-24  Jason Merrill  <jason@casey.cygnus.com>
3596
3597         * search.c (note_debug_info_needed): Do perform this optimization
3598         for dwarf2.  
3599         (maybe_suppress_debug_info): Likewise.  Start by clearing
3600         TYPE_DECL_SUPPRESS_DEBUG.
3601
3602 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
3603
3604         * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
3605
3606         * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
3607
3608 1999-11-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3609
3610         * decl.c (pushdecl, grokdeclarator): Don't call a variadic
3611         function with a non-literal format string.
3612
3613         * lex.c (do_identifier): Likewise.
3614
3615         * typeck.c (build_unary_op): Likewise.
3616
3617 1999-11-23  Mark Mitchell  <mark@codesourcery.com>
3618
3619         * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
3620
3621 1999-11-22  Mark Mitchell  <mark@codesourcery.com>
3622
3623         * cp-tree.def (CTOR_COMPLETE): New tree node.
3624         * decl.c (finish_constructor_body): Add it, to mark the end of the
3625         constructor.
3626         (finish_function): Don't call end_protect_partials here.
3627         * ir.texi (CTOR_COMPLETE): Document it.
3628         * semantics.c (expand_stmt): Handle it.
3629         
3630         * cp-tree.def (FUNCTION_NAME): New tree node.
3631         * cp-tree.h (current_function_name_declared): Tweak documentation.
3632         (lang_decl_flags): Add pretty_function_p, adjust dummy.
3633         (DECL_PRETTY_FUNCTION_P): New macro.
3634         * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
3635         etc., in a template function.  Use at_function_scope_p instead of
3636         expanding it inline.
3637         * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
3638         specially.
3639         (tsubst): Handle FUNCTION_NAME.
3640         (tsubst_copy): Likewise.
3641         (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
3642         etc. in instantiation.
3643         * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
3644         even in template functions.
3645         (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
3646         conditional scope at the top of a destructor.
3647         
3648         * error.c (dump_function_decl): Use `[ with ... ]' syntax for
3649         specializations too.
3650
3651 1999-11-22  Nathan Sidwell  <nathan@acm.org>
3652
3653         * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
3654         when actually negative.
3655
3656         * typeck.c (convert_for_assignment): Expand comment about
3657         strange NULL check, moved from ...
3658         (convert_for_initialization): ... here. Remove unneeded
3659         code.
3660
3661 1999-11-21  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
3662
3663         * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
3664         * init.c (build_vec_delete, build_vec_delete_1): Likewise.
3665         Always destruct virtual bases of array components, but never
3666         delete them.
3667         (build_vec_init): Adjust invocations.
3668         (build_delete): Likewise.
3669         * decl2.c (delete_sanity): Likewise.
3670
3671 1999-11-19  Nathan Sidwell  <nathan@acm.org>
3672
3673         * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
3674         * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
3675         * decl2.c (grok_method_quals): Accept `restrict' as applying to
3676         the object pointer. Return such qualifiers.
3677         (grokclassfn): Apply this pointer qualifiers. Cleanup unused
3678         variables.
3679
3680 1999-11-18  Mark Mitchell  <mark@codesourcery.com>
3681
3682         * except.c (expand_end_catch_block): Fix typo.
3683         (expand_exception_blocks): Simplify.  Don't call
3684         expand_leftover_cleanups.
3685
3686 1999-11-15  Jason Merrill  <jason@casey.cygnus.com>
3687
3688         * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
3689         * pt.c (tsubst, case INTEGER_TYPE): Call it.  
3690         Check uses_template_parms.
3691
3692         * class.c (finish_struct): If we're a local class in a template
3693         function, add a TAG_DEFN.
3694         * pt.c (lookup_template_class): If this is a local class in a
3695         template function, call pushtag.
3696         (tsubst_expr, case TAG_DEFN): Handle classes, too.
3697
3698         Emit debug info with the vtable.
3699         * search.c (maybe_suppress_debug_info): New function...
3700         * class.c (finish_struct_1): ...split out from here.
3701         * cp-tree.h: Declare it.
3702         * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
3703         if we're writing out the vtable.
3704         * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, 
3705         note_debug_info_needed): #if 0 out.
3706
3707 1999-11-14  Mark Mitchell  <mark@codesourcery.com>
3708
3709         * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
3710         * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
3711         TREE_PERMANENT.
3712         * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
3713         * decl2.c (lookup_arg_dependent): Use it.
3714         
3715         * cp-tree.h (cp_finish_decl): Change prototype.
3716         (finish_static_data_member_decl): Likewise.
3717         (push_permanent_obstack): Remove declaration.
3718         (push_expression_obstack): Likewise.
3719         (push_scratch_obstack): Likewise.
3720         (DECL_TEMPLATE_PARM_P): Robustify.
3721         (SET_DECL_TEMPLATE_PARM_P): New macro.
3722         * class.c (add_method): Don't manipulate obstacks.
3723         (finish_vtbls): Likewise.
3724         * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
3725         * decl.c (binding_for_name): Don't manipulate obstacks.
3726         (maybe_push_to_top_level): Likewise.
3727         (pop_from_top_level): Likewise.
3728         (duplicate_decls): Likewise.
3729         (pushdecl): Likewise.
3730         (implicitly_declare): Likewise.
3731         (build_typename_type): Likewise.
3732         (start_decl): Likewise.
3733         (cp_finish_decl): Likewise.
3734         (finish_decl): Likewise.
3735         (destroy_local_static): Likewise.
3736         (expand_static_init): Likewise.
3737         (complete_array_type): Likewise.
3738         (grokvardecl): Likewise.
3739         (build_ptrmemfnc_type): Likewise.
3740         (grokdeclarator): Likewise.
3741         (xref_tag): Likewise.
3742         (xref_basetypes): Likewise.
3743         (start_enum): Likewise.
3744         (finish_enum): Likewise.
3745         (start_function): Likewise.
3746         (finish_function): Likewise.
3747         (start_method): Adjust call to cp_finish_decl.
3748         * decl2.c (finish_static_data_member_decl): Don't manipulate
3749         obstacks.
3750         (grokfield): Likewise.
3751         (grokbitfield): Likewise.
3752         (get_temp_name): Likewise.
3753         (get_sentry): Likewise.
3754         (fnish_file): Likewise.
3755         (lookup_arg_dependent): Likewise.
3756         * except.c (call_eh_info): Likewise.
3757         (push_eh_info): Likewise.
3758         (do_pop_exception): Likewise.
3759         (initialize_handler_parm): Likewise.
3760         (expand_end_eh_spec): Likewise.
3761         (alloc_eh_object): Likewise.
3762         (expand_throw): Likewise.
3763         * expr.c (extract_scalar_init): Likewise.
3764         * init.c (build_java_class_ref): Likewise.
3765         * lex.c (get_time_identifier): Likewise.
3766         (snarf_defarg): Likewise.
3767         (add_defarg_fn): Likewise.
3768         (is_global): Simplify.
3769         (do_identifier): Don't check TREE_PERMANENT.
3770         * method.c (emit_thunk): Don't manipulate obstacks.
3771         * parse.y (condition): Adjust call to cp_finish_decl.
3772         (primary): Likewise.
3773         (initdcl): Likewise.
3774         (initdcl0_innards): Likewise.
3775         (nomods_initdcl0): Likewise.
3776         * pt.c (push_inline_template_parms_recursive): Use
3777         SET_DECL_TEMPLATE_PARM_P.
3778         (process_template_parm): Likewise.
3779         (lookup_template_class): Don't manipulate obstacks.
3780         (instantiate_class_template): Adjust call to
3781         finish_static_data_member_decl.
3782         (tsubst_decl): Don't manipulate obstacks.
3783         (tsubst_expr): Likewise.
3784         (instantiate_template): Likewise.
3785         (instantiate_decl): Adjust calls to cp_finish_decl.
3786         * rtti.c (call_void_fn): Don't manipulate obstacks.
3787         (get_tinfo_var): Likewise.
3788         (get_tinfo_fn_unused): Likewise.
3789         (build_dynamic_cast_1): Likewise.
3790         (expand_si_desc): Likewise.
3791         (expand_class_desc): Likewise.
3792         (expand_ptr_desc): Likewise.
3793         (expand_attr_desc): Likewise.
3794         (expand_generic_desc): Likewise.
3795         (synthesize_tinfo_fn): Likewise.
3796         * search.c (expand_upcast_fixups): Likewise.
3797         * semantics.c (finish_asm_stmt): Likewise.
3798         (finish_named_return_value): Likewise.
3799         (begin_class_definition): Likewise.
3800         (finish_class_definition): Likewise.
3801         (finish_typeof): Likewise.
3802         * tree.c (build_cplus_method_type): Likewise.
3803         (reverse_path): Likewise.
3804         (copy_template_template_parm): Likewise.
3805         (build_expr_ptr_wrapper): Likewise.
3806         (push_expression_obstack): Remove.
3807         (push_permanent_obstack): Likewise.
3808         * typeck.c (mark_addressable): Likewise.
3809         
3810 1999-11-13  Mark Mitchell  <mark@codesourcery.com>
3811
3812         * call.c (build_conditional_expr): Use build_target_expr_with_type.
3813         (convert_like): Likewise.
3814         (build_over_call): Likewise.
3815         * cp-tree.h (build_target_expr): Remove.
3816         (build_target_expr_with_type): New function.
3817         * cvt.c (build_up_reference): Use get_target_expr.
3818         * decl.c (build_target_expr): Move to ...
3819         * tree.c (build_target_expr): Here.  Make it static.
3820         (build_target_expr_with_type): New function.  Set DECL_CONTEXT on
3821         the temporary VAR_DECLs.
3822         (get_target_expr): Use it.
3823
3824 1999-11-13  Jason Merrill  <jason@yorick.cygnus.com>
3825
3826         * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
3827         * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
3828         * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
3829         * class.c (set_rtti_entry): Use it.
3830
3831 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
3832
3833         * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
3834         here.
3835         * semantics.c (finish_expr_stmt): Call it here instead.  Move
3836         default_conversion logic to semantic-analysis time.
3837
3838 1999-11-12  Jason Merrill  <jason@yorick.cygnus.com>
3839
3840         * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
3841
3842 Fri Nov 12 12:56:32 MST 1999    Diego Novillo <dnovillo@cygnus.com>
3843
3844         * init.c (init_init_processing): Re-instated Nov 11 patch after
3845         approval.
3846
3847 Fri Nov 12 10:42:02 MST 1999    Diego Novillo <dnovillo@cygnus.com>
3848
3849         * init.c (init_init_processing): Undo patch from Nov 11, 1999.
3850         Patch had not been approved yet.
3851
3852 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
3853
3854         * decl.c (compute_array_index_type): New function, split out from
3855         grokdeclarator.
3856         (create_array_type_for_decl): Likewise.
3857         (grokdeclarator): Use them.
3858
3859         * semantics.c (expand_stmt): Don't suspend_momentary or
3860         resume_momentary.
3861
3862 Thu Nov 11 12:42:11 MST 1999    Diego Novillo <dnovillo@cygnus.com>
3863
3864         * init.c (init_init_processing): Header information for
3865         arrays allocated via `new' should have the same alignment used by
3866         malloc.
3867
3868 1999-11-10  Mark Mitchell  <mark@codesourcery.com>
3869
3870         * error.c (dump_function_name): Don't crash if given a friend
3871         pseudo-instantiation.
3872
3873         * cp-tree.h (build_enumerator): Change prototype.
3874         * decl.c (enum_next_value): Remove.
3875         (enum_overflow): Likewise.
3876         (init_decl_processing): Don't register enum_next_value as a root.
3877         (start_enum): Clear TYPE_VALUES for a redefined enum.
3878         (finish_enum): Reset the type of enumeration constants.
3879         (build_enumerator): Fix indentation.  Don't copy CONST_DECLs when
3880         we don't need to.  Maintain the TYPE_VALUES list and look there
3881         for the previously defined enumeration constant.  Let enumeration
3882         constants have the type of their values until the enumeration type
3883         is complete.
3884         * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
3885         (structsp): Adjust.
3886         * parse.c: Regenerated.
3887         * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
3888         
3889 Wed Nov 10 12:43:21 1999  Philippe De Muyter  <phdm@macqel.be>
3890                           Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3891
3892         * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
3893
3894 1999-11-09  Mark Mitchell  <mark@codesourcery.com>
3895
3896         * cp-tree.h (language_function): Remove x_last_dtor_insn and
3897         x_last_parm_cleanup_insn.
3898         * decl.c (last_dtor_insn): Remove.
3899         (last_parm_cleanup_insn): Likewise.
3900         (expand_start_early_try_stmts): Don't set them.
3901         (store_parm_decls): Likewise.
3902         (save_function_data): Or save them.
3903         (mark_lang_function): Or mark them.
3904
3905 1999-11-08  Mark Mitchell  <mark@codesourcery.com>
3906
3907         * decl.c (store_parm_decls): Generate cleanup code at
3908         semantic-analysis time.  Destroy objects in the correct order.
3909
3910 1999-11-07  Mark Mitchell  <mark@codesourcery.com>
3911
3912         * cp-tree.h (begin_new_placement): Remove.
3913         (finish_new_placement): Likewise.
3914         * class.c (finish_struct_1): Don't suspend_momentary or
3915         resume_momentary.
3916         * decl.c (grokdeclarator): Likewise.
3917         (maybe_build_cleanup_1): Likewise.
3918         * except.c (push_eh_cleanup): Likewise.
3919         (build_terminate_handler): Likewise.
3920         * init.c (build_new_1): Likewise.
3921         * parse.y (parse_decl): Change prototype.
3922         (initdecls, notype_initdecls, initdcl): Don't return int.
3923         (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
3924         (.begin_new_placement): Remove.
3925         (.finish_new_placement): Likewise.
3926         (nonmomentary_expr): Likewise.
3927         (suspend_mom): Likewise.
3928         (condition): Don't suspend_momentary, resume_momentary, or keep
3929         track of need to resume.
3930         (unary_expr): Likewise.
3931         (new_placement): Likewise.
3932         (decl): Likewise.
3933         (structsp): Likewise.
3934         (new_type_id): Likewise.
3935         (maybe_parmlist): Likewise.
3936         (direct_after_type_declaration): Likewise.
3937         (direct_new_declarator): Likewise.
3938         (direct_abstract_declaration): Likewise.
3939         * parse.c: Regenerated.
3940         * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
3941         * semantics.c (begin_new_placement): Remove.
3942         (finish_new_placement): Likewise.
3943         
3944 1999-11-05  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3945
3946         * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
3947         (DECL_TEMPLATE_INFO): Use it.
3948         * decl.c (warn_extern_redeclared_static): Do nothing for
3949         TEMPLATE_DECLs.
3950         * decl2.c (mark_used): Explicitly check for function or variable.
3951         * semantics.c (finish_unary_op_expr): Check whether result is also
3952         an INTEGER_CST.
3953
3954 1999-11-05  Mark Mitchell  <mark@codesourcery.com>
3955
3956         * Makefile.in (typeck2.o): Depend on output.h.
3957         * typeck2.c: Include output.h.
3958
3959         * decl.c (flag_ansi): Remove declaration.
3960
3961         * pt.c (tinst_level_tick): Make it static.
3962         (last_template_error_tick): Likewise.
3963         
3964         * cp-tree.h (mapcar): Remove declaration.
3965         (search_tree): Likewise.
3966         (walk_tree_fn): New typedef.
3967         (walk_tree): New function.
3968         * tree.c (bot_manip): Change prototype.  Adjust to be called via
3969         walk_tree.
3970         (bot_replace): Likewise.
3971         (no_linkage_helper): Likewise.
3972         (copy_tree_r): New function.
3973         (search_tree): Rename, and adjust, to become ...
3974         (walk_tree): New function.
3975         (mapcar): Remove.
3976         (target_remap): Remove.
3977         (target_remap_count): Likewise.
3978         (break_out_target_exprs): Use walk_tree.
3979         * decl.c (local_variable_p): Change prototype.
3980         (check_default_argument): Use walk_tree.
3981         * pt.c (for_each_template_parm_r): New function, split out from ...
3982         (for_each_template_parm): Here.  Use it, via walk_tree.
3983         
3984 1999-11-03  Mark Mitchell  <mark@codesourcery.com>
3985
3986         * class.c (check_bitfield_decl): New function, split out from
3987         finish_stuct_1.
3988         (check_field_decl): Likewise.  Recursively examine members of
3989         anonymous structs.
3990         (finish_struct_1): Use them.
3991         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
3992         
3993 1999-11-02  Mark Mitchell  <mark@codesourcery.com>
3994
3995         * decl.c (grokfndecl): Remove dead code.
3996
3997         * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
3998
3999 1999-11-02  Scott Snyder  <snyder@fnal.gov>
4000
4001         * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
4002         IMAGPART_EXPR.
4003         * pt.c (tsubst_copy): Likewise.
4004
4005 1999-11-01  Jason Merrill  <jason@yorick.cygnus.com>
4006
4007         * decl2.c (maybe_make_one_only): Always make things comdat on
4008         ELF targets, too.
4009
4010 1999-10-31  Mark Mitchell  <mark@codesourcery.com>
4011
4012         * decl.c (finish_function): Call free_after_parsing for functions
4013         we are not immediately turning into RTL.
4014
4015 1999-10-31  Brendan Kehoe  <brendan@cygnus.com>
4016
4017         * cp-tree.h (flag_dump_translation_unit): Add decl.
4018
4019 Sat Oct 30 22:42:50 1999  Stephen L Moshier <moshier@mediaone.net>
4020
4021         * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
4022
4023 1999-10-30  Mark Mitchell  <mark@codesourcery.com>
4024
4025         * decl.c (pop_cp_function_context): Don't call free on a NULL
4026         pointer.
4027         * semantics.c: Include ggc.h.
4028         (expand_body): Do garbage-collection after processing a template
4029         function.  Clear DECL_SAVED_TREE after generating RTL for a
4030         function.
4031         * Makefile.in (semantics.o): Depend on ggc.h.
4032         
4033 1999-10-29  Mark Mitchell  <mark@codesourcery.com>
4034
4035         * cp-tree.h (make_typename_type): Change prototype.
4036         * decl.c (make_typename_type): Only complain if so requested.
4037         * parse.y (nested_name_specifier): Adjust calls.
4038         (typename_sub0): Likewise.
4039         (typename_sub1): Likewise.
4040         * parse.c: Regenerated.
4041         * pt.c (convert_template_argument): Pass complain to
4042         make_typename_type.
4043         (tsubst): Likewise.
4044         
4045 1999-10-28  Mark Mitchell  <mark@codesourcery.com>
4046
4047         * semantics.c (finish_handler): End the scope of the handler
4048         before attaching it to the statement-tree.
4049
4050 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
4051
4052         * rtti.c (build_dynamic_cast_1): Give a better error message for
4053         an attempt to dynamic_cast from a non-polymorphic type.
4054
4055 1999-10-27  Mark Mitchell  <mark@codesourcery.com>
4056
4057         * cp-tree.h (make_temp_vec): Remove.
4058         (make_scratch_vec): Likewise.
4059         * call.c (add_function_candidate): Use make_tree_vec.
4060         (add_conv_candidate): Likewise.
4061         (build_builtin_candidate): Likewise.
4062         (add_template_candidate_real): Likewise.
4063         * class.c (resolve_address_of_overloaded_function): Likewise.
4064         * decl.c (start_function): Don't fool with the momentary obstack.
4065         (finish_function): Likewise.
4066         * init.c (expand_direct_vtbls_init): Likewise.
4067         (begin_init_stmts): Likewise.
4068         (finish_init_stmts): Likewise.
4069         * pt.c (add_to_template_args): Use make_tree_vec.
4070         (check_explicit_specialization): Likewise.
4071         (coerce_template_parms): Likewise.
4072         (lookup_template_class): Don't fool with the momentary obstack.
4073         (instantiate_class_template): Likewise.
4074         (tsubst_template_arg_vector): Use make_tree_vec.
4075         (tsubst_aggr_type): Don't fool with the momentary obstack.
4076         (tsubst_decl): Likewise.  Use make_tree_vec.
4077         (try_one_overload): Likewise.
4078         (try_class_unification):  Don't fool with the momentary obstack.
4079         (get_bindings_real): Use make_tree_vec.
4080         (set_mangled_name_for_template_decl): Likewise.
4081         * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
4082         * semantics.c (finish_expr_stmt): Likewise.
4083         (finish_do_stmt): Likewise.
4084         (finish_for_expr): Likewise.
4085         (finish_switch_cond): Likewise.
4086         (do_pushlevel): Likewise.
4087         (do_poplevel): Likewise.
4088         * tree.c (make_temp_vec): Remove.
4089         
4090         * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.  Dump
4091         CLEANUP_P for a TRY_BLOCK.
4092         * ir.texi: Document SAVE_EXPR.
4093
4094 Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
4095
4096         * call.c (build_over_call):  Check that the built-in function is
4097         of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
4098         * typeck.c (build_function_call_real): Similarly. 
4099
4100 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
4101
4102         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
4103         remember_end_note.
4104
4105 1999-10-24  Mark Mitchell  <mark@codesourcery.com>
4106
4107         * decl.c (push_overloaded_decl_1): Use pushdecl.
4108         
4109         * decl.c (auto_function): Replace #ifdef'd __inline with just
4110         plain inline.
4111         * lex.c (my_get_run_time): Likeise.
4112         (yyprint): Likewise.
4113         (identifier_type): Likewise.
4114         * method.c (start_squangling): Likewise.
4115         (end_squangling): Likewise.
4116         (icat): Likewise.
4117         (old_backref_index): Likewise.
4118         (flush_repeats): Likewise.
4119         (issue_ktype): Likewise.
4120         * parse.y (empty_parms): Likewise.
4121         * parse.c: Regenerated.
4122         
4123 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
4124
4125         * dump.c (dequeue_and_dump): Replace several uses of
4126         queue_and_dump_index with dump_child.
4127
4128 1999-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4129
4130         * expr.c: Include tm_p.h.
4131
4132 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
4133
4134         * cp-tree.h (SCOPE_PARTIAL_P): New macro.
4135         (pushlevel_temporary): Remove.
4136         (add_scope_stmt): New function.
4137         * decl.c (pushlevel_temporary): Remove.
4138         (poplevel): Use add_scope_stmt.
4139         (start_decl_1): Likewise.
4140         * semantics.c (add_scope_stmt): New function.
4141         (do_pushlevel): Use it.
4142         (do_poplevel): Use it.
4143         (expand_stmt): Check SCOPE_PARTIAL_P.
4144         
4145         * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
4146         * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
4147         * expr.c (cplus_expand_expr): Expand it.
4148         * ir.texi: Document EMPTY_CLASS_EXPR.
4149         
4150 1999-10-20  Mark Mitchell  <mark@codesourcery.com>
4151
4152         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
4153         parameters as having namespace scope.
4154
4155 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
4156
4157         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
4158         (mangling_flags): New type.
4159         (build_overload_int): Change prototype.
4160         (build_overload_value): Likewise.
4161         (numeric_output_need_bar): Improve comment.
4162         (mangle_expression): New function, broken out from ...
4163         (build_overload_int): Here.
4164         (build_overload_value): Adjust for use of mangling flags.  Don't
4165         warn about real-valued template parameters here.  Do handle
4166         complex expressions involving real-valued template parameters.
4167         (build_template_parm_names): Encase non-type template parameters
4168         in underscores, if necessary.
4169         (process_overload_item): Remove conditional on
4170         PARM_CAN_BE_ARRAY_TYPE.
4171
4172 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
4173
4174         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
4175
4176         * ir.texi: Clean up documentation of RETURN_INIT.
4177         
4178 1999-10-15  Greg McGary  <gkm@gnu.org>
4179
4180         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
4181         (lang_init): Set default for flag_bounds_check if still "unspecified".
4182
4183 1999-10-13  Andrew Haley  <aph@cygnus.com>
4184
4185         * class.c (finish_struct_1): Force alignment of non-bitfields to
4186         BITS_PER_UNIT.
4187
4188 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
4189
4190         * typeck2.c (process_init_constructor): Handle empty constructors.
4191
4192 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
4193
4194         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
4195
4196         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
4197         array error.
4198
4199 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
4200
4201         * decl.c (make_rtl_for_local_static): Don't create register RTL
4202         for addressable constants.
4203
4204 1999-10-13  Nathan Sidwell  <nathan@acm.org>
4205
4206         * cp-tree.h (build_x_va_arg): Prototype new function.
4207         * call.c (build_x_va_arg): Define it.
4208         * parse.y (unary_expr): Call build_x_va_arg.
4209         
4210         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
4211         * call.c (convert_type_from_ellipsis): Define it.
4212         * decl.c (init_decl_processing): Set lang_type_promotes_to.
4213
4214         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
4215
4216 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
4217
4218         * class.c (fixed_type_or_null): Always set *nonnull.
4219
4220 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4221
4222         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
4223         __GNUC__ and __GNUC_MINOR__.
4224
4225 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
4226
4227         * cp-tree.h (make_rtl_for_local_static): New function.  
4228         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
4229         local statics ...
4230         (make_rtl_for_local_static): Here.
4231         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
4232         
4233 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4234
4235         * method.c: Include tm_p.h.
4236
4237 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
4238
4239         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
4240         * lex.c (cp_make_lake_type): Likewise.
4241         * tree.c (init_tree): Init make_lang_type_fn.
4242         
4243 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
4244
4245         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
4246         paramter.
4247         
4248         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
4249         local statics if we don't really have them.
4250
4251         * ir.texi: Improve documentation for STMT_EXPR.  Describe
4252         CLEANUP_POINT_EXPR.
4253
4254 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
4255
4256         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
4257
4258 1999-10-07  Greg McGary  <gkm@gnu.org>
4259
4260         * class.c (finish_struct_1): Use simpler method of
4261         removing elements of a singly-linked list which doesn't
4262         lose for classes without data members.
4263
4264 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
4265
4266         * friend.c (make_friend_class): Robustify.
4267
4268         * semantics.c (finish_object_call_expr): Reject calls to template
4269         types.
4270
4271 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
4272
4273         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
4274
4275         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
4276         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
4277         CLASSTYPE_VFIELD.
4278         * class.c (get_vfield_offset): Likewise.
4279         (finish_base_struct): Likewise.
4280         (modify_one_vtable): Likewise.
4281         (fixup_vtable_deltas): Likewise.
4282         (finish_struct_1): Likewise.
4283         * init.c (expand_virtual_init): Likewise.
4284         * search.c (lookup_field_1): Likewise.
4285         (expand_upcast_fixups): Likewise.
4286         * typeck.c (build_component_ref): Likewise.
4287         (build_binary_op_nodefault): Likewise.
4288         
4289         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
4290         * ir.texi: Document TYPE_VFIELD.
4291
4292 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
4293
4294         * decl.c (grokdeclarator): Only warn about non-zero arrays if
4295         !in_system_header (linux socketbits.h can give this for
4296         __cmsg_data, which is using a GNU extension).
4297
4298 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
4299
4300         * decl2.c (start_static_storage_duration_function): Push the
4301         function declaration so it ends up in namespace scope.
4302
4303         * dump.c (DUMP_CHILDREN): Remove.
4304         (DUMP_BINFO): Adjust.
4305         (struct dump_node_info): Remove dump_children_p.
4306         (queue_and_dump_type): Remove dump_children_p parameter.
4307         (queue): Don't set dump_children_p.
4308         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
4309         queue_and_dump_index.
4310         (dequeue_and_dump): Unconditionally print children.  Adjust calls
4311         to functions mentioned above.
4312         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
4313         
4314         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
4315         * dump.c (dequeue_and_dump): Dump them.
4316         
4317         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
4318
4319         * decl.c (start_function): Set current_in_charge_parm for
4320         constructors, too, where appropriate.
4321         * search.c (fixup_all_virtual_upcast_offsets): New function.
4322         (expand_indirect_vtbls_init): Use it.
4323         
4324 1999-10-04  Nathan Sidwell  <nathan@acm.org>
4325
4326         * decl2.c (grok_alignof): Don't decay lvalues.
4327         
4328         * init.c (build_new): Remove unused variable.
4329
4330 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
4331
4332         * cp-tree.h (struct language_function): Remove static_labelno.
4333         (static_labelno): Remove macro.
4334         * method.c (build_overload_nested_name): Make static_labelno
4335         static here.
4336         
4337         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
4338         to decide whether or not a function is defined.
4339
4340         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
4341         situations where make_node will do it automatically.
4342         * decl.c (grok_reference_init): Likewise.
4343         (expand_static_init): Likewise.
4344         (do_static_initialization): Likewise.
4345         * init.c (perform_member_init): Likewise.
4346         (expand_aggr_init_1): Likewise.
4347         (build_new_1): Likewise.
4348         * method.c (do_build_copy_constructor): Likewise.
4349         (do_build_assign_ref): Likewise.
4350         * search.c (expand_upcast_fixups): Likewise.
4351         * semantics.c (finish_stmt_expr): Likewise.
4352         * typeck.c (build_unary_op): Likewise.
4353         (check_return_expr): Likewise.
4354
4355 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
4356
4357         * init.c (build_vec_delete_1): Fold COND_EXPRs.
4358
4359 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
4360
4361         * cp-tree.def (VEC_INIT_EXPR): Remove.
4362         * cp-tree.h (struct stmt_tree): New type.
4363         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
4364         x_stmt_tree.
4365         (class_cache_firstobj): Remove.
4366         (struct language_function): Remove stmts_are_full_exprs_p,
4367         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
4368         (current_stmt_tree): New macro.
4369         (last_tree): Adjust.
4370         (last_expr_type): Likewise.
4371         (doing_semantic_analysis_p): Simplify.
4372         (stmts_are_full_exprs_p): Adjust.
4373         (begin_tree): Remove prototype.
4374         (end_tree): Likewise.
4375         (begin_stmt_tree): Change prototype.
4376         (finish_stmt_tree): Likewise.
4377         (building_stmt_tree): Simplify.
4378         * decl.c (mark_stmt_tree): New function.
4379         (mark_saved_scope): Use it.
4380         (start_function): Rearrange slightly to call begin_stmt_tree 
4381         earlier.
4382         (save_function_data): Tweak.
4383         (finish_function): Adjust call to finish_stmt_tree.
4384         (mark_lang_function): Use mark_stmt_tree.
4385         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
4386         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
4387         (build_vec_init): Remove creation of stand-in intializer.
4388         * pt.c (begin_tree): Remove.
4389         (end_tree): Likewise.
4390         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
4391         (begin_compound_stmt): Handle a compound-statement outside of a
4392         function.
4393         (begin_stmt_expr): Handle a statement-expression outsidef of a
4394         function.
4395         (finish_stmt_expr): Likewise.
4396         (begin_class_definition): Don't call begin_tree.
4397         (finish_inline_definitions): Don't call end_tree.
4398         (begin_stmt_tree): Take a pointer to tree, not a function as input.
4399         (finish_stmt_tree): Likewise.
4400         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
4401         (mapcar): Likewise.
4402         
4403         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
4404         * parse.c: Regenerated.
4405         
4406         * dump.c (dqueue_and_dump): Dump bitfieldness.
4407         
4408         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
4409         bitfields, rather than DECL_BIT_FIELD.
4410         * ir.texi: Document how to tell whether or not a field is a
4411         bitfield.
4412         
4413         * lex.c (make_lang_type): Fix typo in comment.
4414
4415 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
4416
4417         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
4418
4419 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
4420
4421         * pt.c (tsubst_decl): If the type of a template instantiation is
4422         bogus, so is the whole instantiation.
4423
4424 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
4425
4426         * decl.c (initialize_local_var): Handle static variables here.
4427         (cp_finish_decl): Tweak handling of function-scope static
4428         variables.
4429         * semantics.c (expand_stmt): Handle DECL_STMTs for static
4430         variables.
4431
4432         * method.c (emit_thunk): Don't crash when -fsyntax-only.
4433
4434         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
4435         global_dtor_p.  Add init_priority.
4436         (DECL_ACCESS): Adjust accordingly.
4437         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
4438         (GLOBAL_INIT_PRIORITY): Likewise.
4439         * decl.c (lang_mark_tree): Adjust accordingly.
4440         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
4441         and GLOBAL_INIT_PRIORITY.
4442         * dump.c (dequeue_and_dump): Print them.
4443         * ir.texi: Document them.
4444
4445         * decl2.c (struct priority_info_s): Remove initialization_sequence
4446         and destruction_sequence.
4447         (start_static_storage_duration_function): Return the body of the
4448         function.  Convert for function-at-a-time mode.
4449         (generate_inits_for_priority): Remove.
4450         (finish_static_storage_duration_function): Change prototype.
4451         Adjust for function-at-a-time mode.
4452         (do_static_initialization): Likewise.
4453         (do_static_destruction): Likewise.
4454         (do_static_initialization_and_destruction): Remove.
4455         (start_static_initialization_or_destruction): New function.
4456         (finish_static_initialization_or_destruction): Likewise.
4457         (get_priority_info): Don't manipulation initialization_sequence or
4458         destruction_sequence.
4459         (prune_vars_needing_no_initialization): New function.
4460         (write_out_vars): Likewise.
4461         (finish_file): Use the various new functions instead of the old.
4462         
4463 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
4464
4465         * cp-tree.h (warn_float_equal): Declare.
4466         * decl2.c (warn_float_equal): Define.
4467         (lang_decode_option): Recognize -W[no-]float-equal.
4468         * typeck.c (build_binary_op_nodefault): Conditionally warn
4469         about equality tests of floating point types.
4470
4471 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
4472
4473         Support normal type_info-based EH mechanisms with -fno-rtti.
4474         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
4475         (build_eh_type_type_ref): Likewise.
4476         (build_eh_type): Remove.
4477         (expand_throw): Call build_eh_type_type, not build_eh_type.
4478         * decl2.c (import_export_decl): Don't associate the tinfo fn with
4479         the vtable if -fno-rtti.
4480         * decl.c (init_decl_processing): Always init_rtti_processing.
4481
4482         * rtti.c (get_typeid): Don't complain about -fno-rtti.
4483
4484         * class.c (class_cache_obstack, class_obstack): Remove.
4485         (init_class_processing): Don't initialize class_obstack.
4486         (push_cache_obstack): Remove.
4487         (pushclass): Don't call it.
4488         * cp-tree.h: Remove prototype for push_cache_obstack.
4489         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
4490         (pushlevel_class): Don't push_decl_level.
4491         (poplevel_class): Don't pop_stack_level.
4492         (push_class_level_binding): Don't push_cache_obstack.
4493         (init_decl_processing): Don't intialize decl_obstack.
4494         * search.c (push_class_decls): Don't push_cache_obstack.
4495         * tree.c (list_hash_add): Put hash node on permanent_obstack.
4496         (hash_tree_cons): Don't mess with obstacks.
4497         (print_lang_statistics): Don't print stats for class_obstack and
4498         decl_obstack.
4499
4500 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
4501
4502         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
4503         * ir.texi: Document DECL_EXTERNAL.
4504
4505         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
4506         * ir.texi: Document THUNK_DECLs.
4507
4508         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
4509         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
4510         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
4511         * error.c (dump_template_bindings): Remove unused parameter.
4512         Handle multiple levels of template parameters.
4513         (dump_template_decl): Use `parms', not `args', for template
4514         parameters.  Fix thinko.
4515         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
4516         flags to dump_template_bindings.
4517         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
4518         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
4519         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
4520         (tsubst_copy): Clarify variable name.
4521         (most_general_template): Robustify.
4522         
4523 1999-09-29  Nathan Sidwell  <nathan@acm.org>
4524
4525         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
4526         to change primary template rendering.
4527
4528 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
4529
4530         * cp-tree.h (UPT_TEMPLATE): Remove.
4531         (UPT_PARMS): Likewise.
4532         (DECL_NEEDED_P): New macro.
4533         * decl2.c (finish_vtable_vardecl): Use it.
4534         (finish_objects): Don't crash with -fsyntax-only.
4535         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
4536         -fsyntax-only.
4537         * pt.c (tsubst_friend_function): Remove FIXME that talks about
4538         obstacks.
4539         (tsubst_expr): Correct handling of function try-blocks.
4540         * semantics.c: Include flags.h.
4541         (expand_body): Don't do RTL generation if -fsyntax-only.
4542         * Makefile.in (semantics.o): Depends on flags.h.
4543         
4544 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
4545
4546         * pt.c (most_general_template): Adjust declaration.
4547
4548         * cp-tree.h: (most_general_template): Declare.
4549
4550         * error.c (dump_template_value): Rename to ...
4551         (dump_template_argument): This.
4552         (dump_template_argument_list): New function.
4553         (dump_type): Use it.
4554         (dump_template_parameter): New function.
4555         (dump_template_decl): Use it.
4556         (dump_template_bindings): New function.
4557         (dump_function_decl): Use it. Pretty print function template
4558         instantiations.
4559
4560 1999-09-28  Nathan Sidwell  <nathan@acm.org>
4561
4562         * decl.c (grokdeclarator): Distinguish parameter context for
4563         diagnostics. Tidy up missing type diagnostic.
4564         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
4565
4566 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
4567
4568         * ir.texi: Improve documentation for TARGET_EXPR.
4569
4570 1999-09-27  Nathan Sidwell  <nathan@acm.org>
4571
4572         Augment stringification of trees.
4573         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
4574         (fndecl_as_string, type_as_string_real, args_as_string,
4575         code_as_string, language_as_string, parm_as_string,
4576         op_as_string, assop_as_string, cv_as_string): Remove.
4577         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
4578         (context_as_string): Declare new function.
4579         * error.c (cp_printers): Move definition.
4580         (OB_UNPUT): Remove.
4581         (OB_END_TEMPLATE_ID): Adjust.
4582         (interesting_scope_p): Remove.
4583         (dump_scope): New static function.
4584         (dump_qualifiers): Adjust prototype, reimplement.
4585         (dump_template_value): Use tree_string_flags.
4586         (dump_type_real): Move back to dump_type.
4587         (dump_type): Adjust prototype. Use tree_string_flags.
4588         (dump_aggr_type): Likewise. Use dump_template_parms.
4589         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
4590         Return pad flag.
4591         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
4592         (dump_simple_decl): Likewise.
4593         (dump_decl): Likewise. Use dump_template_decl.
4594         (dump_template_decl): New static function broken out of dump_decl.
4595         (dump_function_decl): Adjust prototype. Use tree_string_flags.
4596         (dump_parameters): Likewise. Prefix space.
4597         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
4598         (dump_function_name): Likewise. Use dump_template_parms.
4599         (dump_template_parms): New static function broken out of
4600         dump_function_name.
4601         (dump_expr_list): Adjust prototype. Use tree_string_flags.
4602         (dump_expr): Likewise.
4603         (fndecl_as_string): Removed
4604         (type_as_string_real): Removed
4605         (dump_binary_op): Adjust prototype. Use tree_string_flags.
4606         (dump_unary_op): Likewise.
4607         (type_as_string): Likewise.
4608         (expr_as_string): Likewise.
4609         (decl_as_string): Likewise.
4610         (context_as_string): New function.
4611         (lang_decl_name): Adjust.
4612         (decl_to_string): New static print callback.
4613         (expr_to_string): Likewise.
4614         (fndecl_to_string): Likewise.
4615         (code_as_string): Renamed to ...
4616         (code_to_string): ... here. Adjust.
4617         (language_as_string): Renamed to ...
4618         (language_to_string): ... here. Adjust.
4619         (parm_as_string): Renamed to ...
4620         (parm_to_string): ... here.
4621         (op_as_string): Renamed to ...
4622         (op_to_string): ... here.
4623         (assop_as_string): Renamed to ...
4624         (assop_to_string): ... here.
4625         (type_to_string): New static print callback.
4626         (args_as_string): Renamed to ...
4627         (args_to_string): ... here. Adjust.
4628         (cv_as_string): Renamed to ...
4629         (cv_to_string): ... here. Adjust.
4630         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
4631         (print_template_context): Likewise.
4632
4633 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
4634
4635         * cp-tree.h (expand_throw): Remove prototype.
4636         * except.c (expand_throw): Make it static.  Use tree-generation
4637         functions, rather than RTL-generation functions.
4638         (build_throw): Use it.
4639         * expr.c: Include except.h.
4640         (cplus_expand_expr): Don't call expand_throw here.
4641         * Makefile.in (expr.o): Depend on except.h.
4642         * ir.texi: Update documentation for THROW_EXPR.
4643         
4644         * decl.c (start_function): Set x_dont_save_pending_sizes rather
4645         than calling get_pending_sizes.
4646         * init.c (build_new): Don't save and restore
4647         immediate_size_expand; instead, assert that it has the expected
4648         value already.
4649
4650 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4651
4652         * lex.c (compiler_error): Add missing call to va_end().
4653
4654 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
4655
4656         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
4657         * ir.texi: Document RESULT_DECL and DECL_RESULT.
4658
4659         * cp-tree.h (check_return_expr): New function.
4660         * decl.c (finish_constructor_body): New function.
4661         (pushdecl): Put global friend functions in namespace binding
4662         level, not the class binding level.
4663         (finish_destructor_body): Make sure the dtor_label is always
4664         defined.  Fix typo in comment.
4665         (finish_function): Move generation of constructor-termination code
4666         to semantic-analysis time.  Move generation of implicit `main'
4667         return value to semantic-analysis time.
4668         * semantics.c (finish_return_stmt): Generate goto's to
4669         ctor_label/dtor_label here.  Use check_return_expr to do semantic
4670         analysis on the returned expression.
4671         * typeck.c (maybe_warn_about_returning_address_of_local): New
4672         function split out from c_expand_return.
4673         (check_return_expr): Likewise.
4674         (c_expand_return): Just generate the RTL for the return.
4675         
4676 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
4677
4678         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
4679         (cleanup_type): Likewise.
4680         (search_tree): Change prototype.
4681         * decl.c (local_variable_p): Adjust for new interface to
4682         search_tree.
4683         (check_default_argument): Likewise.
4684         * error.c (dump_expr): Handle INIT_EXPR.
4685         * except.c (expand_throw): Don't make cleanup_type a local static.
4686         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
4687         * init.c (build_new): Call build_new_1 directly, rather than
4688         building a NEW_EXPR.
4689         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
4690         processing file-scope initializers.
4691         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
4692         * tree.c: Include splay-tree.h
4693         (no_linkage_helper): Adjust for new interface to search_tree.
4694         (search_tree): Pass around pointers to tree nodes, rather than the
4695         nodes themselves.  Handle VEC_INIT_EXPR.
4696         (no_linkage_check): Adjust for new interface to search_tree.
4697         (mapcar): Handle VEC_INIT_EXPR.
4698         (target_remap): New variable.
4699         (bot_manip): Use it.
4700         (bot_replace): New function.
4701         (break_out_target_exprs): Use it to remap all variables used in a
4702         default argument expression.
4703         * typeck.c (build_modify_expr): Don't crash when outside a
4704         function and presented with an INIT_EXPR assignment
4705         * Makefile.in (tree.o): Depend on splay-tree.h.
4706
4707 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
4708
4709         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
4710         DECL_BUILT_IN.
4711         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
4712         callers changed.
4713         Set the builtin's DECL_BUILT_IN_CLASS.
4714
4715 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
4716
4717         * decl.c (pushdecl): Don't make local declarations of extern
4718         variables give the variable a DECL_CONTEXT for the function.
4719         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
4720         Don't accidentally make RTL for local declarations.
4721         (emit_local_var): Handle declarations with asm-specifiers here.
4722         
4723 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
4724
4725         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
4726         STMT_IS_FULL_EXPR_P.
4727
4728         * cp-tree.h (language_function): Add cannot_inline.
4729         * decl.c (start_function): Restore current_function_cannot_inline
4730         from the saved value.
4731         (save_function_data): Save current_function_cannot_inline.
4732         * decl2.c (start_objects): Change prototype.  Build the function
4733         in function-at-a-time mode.
4734         (finish_objects): Likewise.
4735         (generate_ctor_or_dtor_function): Adjust accordingly.
4736         
4737         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
4738         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
4739         Don't call expand_anon_union_decl here
4740         * semantics.c (exapnd_stmt): Call it here, instead.
4741         * typeck.c (mark_addressable): Addressed variables are implicitly
4742         used.
4743         
4744 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4745
4746         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
4747         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
4748         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
4749         * cp-tree.h: Add tree checking macros to various tree access
4750         macros. 
4751         * ptree.c (print_lang_decl): Test for function or variable
4752         before accessing template info.
4753
4754 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
4755
4756         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
4757         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
4758         * decl2.c (lang_f_options): Add -fshort-wchar.
4759         * cp-tree.h: Declare flag_short_wchar.
4760         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
4761         int' for wchar_t.
4762
4763 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4764
4765         * ir.texi: Fix formatting errors and typos.
4766
4767 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
4768
4769         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
4770
4771         * decl.c (pushdecl): Do create a binding for extern "C" functions,
4772         but not for their DECL_ASSEMBLER_NAMEs.
4773         (lookup_name_current_level): Fix formatting.
4774         (xref_tag): Likewise.
4775         * decl2.c (start_objects): Mark static constructors and
4776         destructors as used.
4777
4778 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
4779
4780         * decl.c (define_case_label): Don't crash if we're not in a switch.
4781
4782         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
4783         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
4784         for unsupported flags.
4785
4786 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
4787
4788         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
4789         Accept and warn about -fthis-is-variable.
4790
4791 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
4792
4793         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
4794         CLEANUP_STMT, and SCOPE_STMT.
4795
4796         * decl2.c (lang_decode_option): Adjust, in the wake of recent
4797         changes to option processing.
4798
4799 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4800
4801         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
4802         function pointer from pmfs with no object given.
4803         (convert_for_assignment): Do not return error when converting
4804         pmfs.
4805
4806 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
4807
4808         * lex.c (internal_filename): New variable.
4809         (INTERNAL_FILENAME): New macro.
4810         (init_parse): Allocate internal_filename and mark as root.  Use it
4811         instead of a string constant.
4812
4813 1999-09-21  Nathan Sidwell  <nathan@acm.org>
4814
4815         Reimplement dynamic cast and catch matching.
4816         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
4817         * search.c (dynamic_cast_base_recurse): New function.
4818         (get_dynamic_cast_base_type): New function for dynamic cast.
4819         * rtti.c (build_dynamic_cast_1): Determine source and target
4820         class relationship. Call __dynamic_cast_2.
4821         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
4822         (__user_type_info::dyncast): New dynamic cast dispatcher.
4823         (__user_type_info::sub_kind): New nested enumeration.
4824         (__user_type_info::contained_p): sub_kind predicate.
4825         (__user_type_info::contained_public_p): Likewise.
4826         (__user_type_info::contained_nonpublic_p): Likewise.
4827         (__user_type_info::contained_nonvirtual_p: Likewise.
4828         (__user_type_info::upcast_result): New nested struct.
4829         (__user_type_info::dyncast_result): New nested struct.
4830         (*::do_upcast): New catch function.
4831         (*::do_dyncast): New dynamic cast function.
4832         (__user_type_info::find_public_subobj): New dynamic cast
4833         helper dispatcher.
4834         (*::do_find_public_subobj): New dynamic cast helper function.
4835         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
4836         (__user_type_info::dyncast): Define dynamic cast dispatcher.
4837         (*::do_upcast): Define catch function.
4838         (*::do_dyncast): Define dynamic cast function.
4839         (*::do_find_public_subobj): Define dynamic cast helper function.
4840         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
4841         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
4842         (__dynamic_cast_2): New dynamic cast runtime.
4843
4844 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
4845
4846         * cp-tree.h (finish_stmt_expr): Change prototype.
4847         * expr.c (cplus_expand_expr): Adjust call accordingly.
4848         * init.c (finish_init_stmts): Likewise.
4849         * parse.y (primary): Likewise.
4850         * pt.c (tsubst_copy): Likewise.
4851         * semantics.c (finish_stmt_expr): Don't take two parameters.
4852         Don't remove generated BLOCKs from the block-tree.
4853
4854         Remove support for assigning to `this'.
4855         * NEWS: Note that fact.
4856         * class.c (build_vbase_path): Don't check flag_this_is_variable.
4857         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
4858         (language_function): Remove assigns_this, just_assigned_this, and
4859         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
4860         (base_init_expr): Remove.
4861         (current_vcalls_possible_p): New macro.
4862         (vtbls_set_up_p): Likewise.
4863         (emit_base_init): Change prototype.
4864         * decl.c (finish_destructor_body): New function, split out from
4865         finish_function.
4866         (current_function_assigns_this): Remove.
4867         (current_function_just_assigned_this): Likewise.
4868         (start_function): Don't set them.
4869         (finish_function): Don't check them.  Don't emit
4870         base-initialization code here.  Generate code for destructors when
4871         doing semantic analysis.
4872         (finish_stmt): Don't check current_function_just_assigned_this.
4873         * decl2.c (lang_f_options): Remove this-is-variable.
4874         (lang_decode_option): Likewise.
4875         (grokclassfn): Don't check flag_this_is_variable.
4876         * init.c (emit_base_init): Return the expression generated.
4877         (construct_virtual_bases): Don't push/pop obstacks.  Fix
4878         typo.
4879         (build_new_1): Don't check flag_this_is_variable.
4880         (get_temp_regvar): Don't set DECL_REGISTER.
4881         (build_vec_init): Don't call use_variable.
4882         * lang-options.h: Remove "-fthis-is-variable" and
4883         "-fno-this-is-variable".
4884         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
4885         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
4886         expand_expr_stmt.
4887         * semantics.c (finish_expr_stmt_real): Rename to ...
4888         (finish_expr_stmt): This.  Remove assigned_this parameter.
4889         (begin_if_stmt): Call do_pushlevel before starting the statement.
4890         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
4891         blocks.
4892         (setup_vtbl_ptr): Emit initialization code for bases and members
4893         at semantic-analysis time.  Emit code to initialize vtables in
4894         destructors here.
4895         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
4896         Don't handle CTOR_INITIALIZER any more.
4897         * typeck.c (build_modify_expr): Don't check for assignments to
4898         this.
4899         (c_expand_return): Don't suggest assigning to `this'.
4900         
4901         * Makefile.in (decl.o): Depend on RTL_H.
4902         (decl2.o): Likewise.
4903         (class.o): Likewise.
4904         (call.o): Likewise.
4905         (method.o): Likewise.
4906         (search.o): Likewise.
4907         (tree.o): Likewise.
4908         (pt.o): Likewise.
4909
4910         * decl.c (duplicate_decls): When a builtin function is redeclared
4911         as static, make sure it is mangled correctly.
4912
4913         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
4914         detail about the statement-tree.
4915         
4916 1999-09-20  Nathan Sidwell  <nathan@acm.org>
4917
4918         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
4919
4920 1999-09-20  Nick Clifton  <nickc@cygnus.com>
4921
4922         * decl2.c (lang_decode_option): Extend comment.
4923
4924 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
4925
4926         * typeck.c: Include "tm_p.h".
4927
4928 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
4929
4930         * ir.texi: New file.
4931
4932 1999-09-19  Paul Burchard <burchard@pobox.com>
4933
4934         * semantics.c (expand_stmt): Initialize return value.
4935
4936 1999-09-18  Paul Burchard <burchard@pobox.com>
4937
4938         * gxxint.texi: G++ now implements namespaces.
4939         
4940 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
4941
4942         * decl.c (pop_label): Don't warn about unused labels more than
4943         once.
4944         * semantics.c (finish_goto_stmt): Always marked used labels as
4945         used.
4946
4947         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
4948         even when the declaration is external.
4949         (cp_finish_decl): Adjust call to layout_var_decl.
4950         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
4951
4952 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4953
4954         * typeck.c (get_member_function_from_ptrfunc): Always consider
4955         virtuality inside member pointer.
4956
4957 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
4958
4959         Turn on function-at-a-time processing.  
4960         * cp-tree.h (doing_semantic_analysis_p): New macro.
4961         (SF_DEFAULT): Define to zero, not SF_EXPAND.
4962         (start_handler_parms): Change prototype.
4963         (expand_start_catch_block): Likewise.
4964         (expand_end_catch_block): Likewise.
4965         (expand_start_eh_spec): Likewise.
4966         (expand_end_eh_spec): Declare.
4967         (finish_handler_parms): Change prototype.
4968         (begin_catch_block): Declare.
4969         (finish_handler): Change prototype.
4970         (do_pushlevel): Declare.
4971         (do_poplevel): Likewise.  
4972         * decl.c (pushlevel): Don't create
4973         binding levels when not doing semantic analysis.
4974         (poplevel): Don't pop them.
4975         (pushdecl): Assert that we are never called when not doing
4976         semantic analysis.
4977         (pushdecl_top_level): Use push_to_top_level.
4978         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
4979         label when expanding.
4980         (cp_finish_decl): Only inject for-scope variables when doing
4981         semantic analysis.  Add comments.
4982         (start_handler_parms): Return the handler parm.
4983         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
4984         already set.  Reinitialize from saved function data if available.
4985         Don't pushlevel when not doing semantic analysis.
4986         (store_parm_decls): Only generate RTL when expanding.  Only
4987         pushdecl when doing semantic analysis.  Set
4988         current_eh_spec_try_block if appropriate.
4989         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
4990         Combine common code.  Don't poplevel when not doing semantic
4991         analysis.
4992         (push_cp_function_context): Don't expand functions without an
4993         explicit call to expand_body.
4994         (mark_lang_function): Make eh_spec_try_block and
4995         x_scope_stmt_stack.  
4996         * except.c (expand_end_eh_spec): Don't
4997         declare.
4998         (process_start_catch_block): Likewise.
4999         (push_eh_cleanup): Use finish_decl_cleanup.
5000         (initialize_handler_parm): New function.
5001         (expand_start_catch_block): Use it.
5002         (expand_end_catch_block): Use tree-generation functions, not
5003         RTL-generation functions.
5004         (expand_start_eh_spec): Likewise.
5005         (expand_end_eh_spec): Likewise.
5006         (expand_exception_blocks): Simplify.
5007         (start_anon_func): Use do_pushlevel.
5008         (end_anon_func): Use do_poplvel.  Call expand_body for the
5009         function.  
5010         * expr.c (do_case): Don't call define_case_label.  
5011         * init.c (create_temporary_var): Set DECL_CONTEXT for local
5012         variables.  
5013         * method.c (emit_thunk): Call expand_body for the
5014         thunk.
5015         (sythesize_method): Likewise.  
5016         * parse.y (handler_args): Give it ttype.
5017         (eat_saved_input): Call expand_body.
5018         (base_init): Use do_pushlevel.
5019         (pending_inline): Call expand_body.
5020         (handler): Adjust calls to finish_handler_parms and
5021         finish_handler.
5022         (handler_args): Don't call expand_start_catch_block.  Return the
5023         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
5024         * parse.c: Regenerated.
5025         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
5026         * semantics.c (do_pushlevel): Give it external linkage.  Build
5027         SCOPE_STMTs.
5028         (do_poplevel): Likewise.
5029         (finish_case_label): Call define_case_label when doing semantic
5030         analysis.
5031         (finish_goto_stmt): Create RTL for labels.
5032         (finish_function_try_block): Set in_function_try_handler
5033         unconditionally.
5034         (finish_function_handler_sequence): Unset it.
5035         (finish_handler_parms): Use expand_start_catch_block even when
5036         building a statement-tree.
5037         (begin_catch_block): New function.
5038         (finish_handler): Move a little RTL-generation logic here.
5039         (finish_decl_cleanup): Allow cleanups for empty declarations.
5040         (finish_named_return_value): Don't pushdecl when not doing
5041         semantic analysis.
5042         (expand_stmt): Don't do semantic analysis for variable
5043         declarations.  Handle START_CATCH_STMT.  Call expand_label
5044         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
5045         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
5046         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
5047         RETURN_INIT and function try blocks.
5048         
5049         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
5050         x_scope_stmt_stack.  Add x_in_charge_parm.
5051         (current_eh_spec_try_block): New macro.
5052         (current_scope_stmt_stack): Likewise.
5053         (current_in_charge_parm): Likewise.
5054         * decl.c (start_function): Initialize current_in_charge_parm.
5055         (finish_function): Use current_in_charge_parm rather than looking
5056         up __in_chrg.
5057         * search.c (expand_indirect_vtbls_init): Likewise.
5058
5059         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
5060         (TRY_BLOCK): Likewise.
5061         (HANDLER): Likewise.
5062         (START_CATCH_STMT): New tree node.
5063         (SCOPE_STMT): Likewise.
5064         * cp-tree.h (SCOPE_BEGIN_P): New macro.
5065         (SCOPE_NULLIFIED_P): Likewise.
5066         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
5067         (struct lang_decl): Add saved_language_function.
5068         (DECL_PENDING_INLINE_INFO): Adjust documentation.
5069         (DECL_PENDING_INLINE_P): New macro.
5070         (TYPE_TI_ARGS): Fix typo in comment.
5071         (DECL_SAVED_TREE): Add to documentation.
5072         (DECL_SAVED_FUNCTION_DATA): New macro.
5073         (START_CATCH_TYPE): Likewise.
5074         (SCOPE_END_P): New macro.
5075         (declare_parm_level): Don't declare.
5076         * decl.c (mark_lang_function): New function, split out from
5077         mark_cp_function_context.
5078         (save_function_data): New function.
5079         (declare_parm_level): Remove.
5080         (finish_function): Use save_function_data to squirrel away
5081         important stuff for later use.
5082         (mark_cp_function_context): Use mark_function_data.
5083         (lang_mark_tree): Likewise.
5084         * lex.c (begin_definition_of_inclass_inline): Set
5085         DECL_PENDING_INLINE_P.
5086         (store_pending_inline): Clear it.
5087         * pt.c (tsubst_decl): Likewise.
5088
5089 1999-09-17  Nathan Sidwell  <nathan@acm.org>
5090
5091         * call.c (perform_implicit_conversion): Deal with error_mark_node.
5092
5093 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
5094
5095         * decl.c (warn_extern_redeclared_static): Don't get confused by
5096         static member functions.
5097         (duplicate_decls): Merge DECL_THIS_STATIC.
5098
5099         * decl.c (expand_static_init): Make sure assignments to local
5100         statics actually occur.
5101
5102 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
5103
5104         * cp-tree.h (poplevel_class): Declare.
5105         * class.c (popclass): Use poplevel_class, not poplevel.
5106         * decl.c (poplevel_class): Don't make it static.  Don't return a
5107         value.
5108         (poplevel): Don't call poplevel_class; abort in a class
5109         binding level is seen.
5110         * semantics.c (finish_translation_unit): Use pop_everything.
5111         * parse.y (member_init): Allow errors.
5112         (pending_inline): Call finish_function.
5113         * parse.c: Regenerated.
5114         * Makefile.in (CONFLICTS): Adjust.
5115
5116 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
5117         
5118         * error.c: Reduce code duplication.
5119         (dump_template_value): New function.
5120         (dump_type_real): Use it.
5121         (dump_decl): Likewise.
5122         (dump_function_name): Likewise.
5123         (dump_function_decl): Don't be too talkative about function return
5124         type variety.
5125
5126 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5127
5128         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
5129
5130         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
5131
5132 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
5133
5134         * decl2.c (finish_file): Also call check_global_declarations for
5135         the pending_statics list.
5136
5137 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
5138
5139         * lex.c (cp_pragma_implementation): Allow #pragma implementation
5140         in header files.
5141
5142 1999-09-15  Richard Henderson  <rth@cygnus.com>
5143
5144         * lex.c (mark_impl_file_chain): Follow the next chain.
5145
5146 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
5147
5148         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
5149         problems with extern "C" functions redeclared as static.
5150         (duplicate_decls): When a builtin is redeclared static, make the
5151         new function have internal linkage.
5152         
5153 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
5154
5155         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
5156         * pt.c (tsubst_copy): Likewise.
5157         * tree.c (search_tree): Likewise.
5158         (mapcar): Likewise.
5159
5160 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5161
5162         * typeck2.c (ack): Don't declare progname.
5163
5164 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
5165
5166         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
5167         filenames with ggc_alloc_string.
5168
5169 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
5170
5171         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
5172         TARGET_EXPR.
5173         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
5174         the TARGET_EXPR.
5175         * cvt.c (build_up_reference): Likewise.
5176         * tree.c (build_cplus_new): Likewise.
5177         (get_target_expr): Likewise.
5178         
5179 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
5180
5181         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
5182
5183 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
5184
5185         * cp-tree.h (build_target_expr): New function.
5186         * call.c (build_conditional_expr): Use build_target_expr.
5187         (convert_like): Likewise.
5188         (build_over_call): Likewise.
5189         * cvt.c (build_up_reference): Likewise.
5190         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
5191         (destroy_local_var): Here.
5192         (build_target_expr): New function.
5193         * tree.c (build_cplus_new): Use it.
5194         (get_target_expr): Likewise.
5195
5196 1999-09-13  Nathan Sidwell  <nathan@acm.org>
5197
5198         * typeck.c (expr_sizeof): Don't decay arrays and functions.
5199         Remove misleading comment.
5200         (build_compound_expr): Don't decay arrays.
5201
5202 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
5203
5204         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
5205         class rvalues again.
5206
5207 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5208
5209         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
5210
5211         * g++spec.c: Include gcc.h.
5212         (lang_specific_driver): Constify a char*.  Call xcalloc, not
5213         xmalloc/bzero.  All calls to the function pointer parameter now
5214         explicitly call `fatal'.
5215
5216 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
5217
5218         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
5219         * cvt.c (ocp_convert): Complete the from and destination types.
5220         Adjust warning about functions always being `true' in conditionals.
5221         * decl.c (duplicate_decls): Don't play funny games with abort.
5222         * error.c (dump_expr): Handle OVERLOADs.
5223         * spew.c (probe_obstack): Remove.
5224         * typeck.c (condition_conversion): Use perform_implicit_conversion.
5225         
5226 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
5227
5228         * cp-tree.h (auto_function, define_function): Adjust prototypes.
5229         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
5230         changed.
5231         (auto_function): Likewise, for CODE arg.
5232         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
5233         (builtin_function): ... here.
5234
5235 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
5236
5237         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
5238         (init_decl_processing): Don't set TREE_PERMANENT for the
5239         error_mark_node.
5240         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
5241         (grokdeclarator): Likewise.
5242         (grokparms): Don't check TREE_PERMANENT when building up lists.
5243         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
5244         (mark_inline_for_output): Likewise.
5245         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
5246         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
5247         * lex.c (check_newline): Don't check ggc_p; it is always one.
5248         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
5249         * spew.c (yylex): Don't copy_node or probe_obstacks for
5250         non-permanent CONSTANTs and STRINGs.
5251         * tree.c (build_cplus_array_type_1): Don't fuss with
5252         TREE_PERMANENT on ARRAY_TYPEs.
5253         
5254         * cp-tree.def (CLEANUP_STMT): New node.
5255         * cp-tree.h (language_function): Add name_declared.
5256         (current_function_name_declared): New macro.
5257         (CLEANUP_DECL): New macro.
5258         (CLEANUP_EXPR): Likewise.
5259         (emit_local_var): Likewise.
5260         (finish_decl_cleanup): New function.
5261         * cvt.c (build_up_reference): Simplify.
5262         (ocp_convert): Remove dead code.
5263         * decl.c (start_decl): Remove call to add_decl_stmt.
5264         (grok_reference_init): Adjust, to handle bindings temporaries to
5265         references.  Remove dead code.
5266         (initialize_local_var): Don't generate RTL for
5267         declarations here, or build cleanups here.  Don't fuss with
5268         obstacks.  Replace expand_start_target_temps calls with explicit
5269         setting of stms_are_full_exprs_p.
5270         (destroy_local_var): New function.
5271         (emit_local_var): Likewise.
5272         (cp_finish_decl): Use them, as appropriate.
5273         (start_function): Announce template functions.
5274         (store_parm_decls): Don't call declare_function_name here.
5275         (finish_stmt): Don't start emit base-initialization code when just
5276         building the statement-tree.
5277         * init.c (create_temporary_var): Move add_decl_stmt call ...
5278         (get_temp_regvar): Here.
5279         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
5280         cp_finish_decl would expect.  Don't call add_decl_stmt.
5281         * semantics.c (begin_compound_stmt): Call declare_function_name,
5282         if appropriate.
5283         (finish_decl_cleanup): New function.
5284         (expand_stmt): Use emit_local_var to output variables.          
5285         (expand_body): Set current_funtion_name_declared.
5286         
5287 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
5288
5289         * cp-tree.h (finish_cleanup_try_block): New function.
5290         * semantics.c (finish_cleanup_try_block): Add comment.
5291
5292 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
5293
5294         * cp-tree.h: Delete declarations for all tree nodes now moved to
5295         global_trees.
5296         * decl.c: Delete their definitions.
5297         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
5298         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
5299         provide defaults.
5300         (init_decl_processing): Call build_common_tree_nodes and
5301         build_common_tree_nodes_2 instead of building their nodes here.
5302         Don't add gc roots for them.
5303
5304 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
5305
5306         * cp-tree.h (language_function): Rename expanding_p to
5307         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
5308         (expanding_p): Adjust accordingly.
5309         (TREE_VIA_PRIVATE): Fix typo in comment.
5310         (DECL_REFERENCE_SLOT): Remove.
5311         (SET_DECL_REFERENCE_SLOT): Likewise.
5312         * decl.c (named_label_uses): Adjust. Remove chicken comment.
5313         (push_overloaded_decl): Don't truncate the chain of bindings when
5314         adding an overloaded function.
5315         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
5316         (initialize_local_var): Fix typo in comment.
5317         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
5318         * decl2.c (start_objects): Make the fact that we are expanding
5319         the generated function right away explicit.
5320         (start_static_storage_duration_function): Likewise.
5321         (finish_file): Fix typo in comment.
5322         * init.c (build_vec_init): Correct bugs in handling cleanups.
5323         * semantics.c (maybe_convert_cond): New function.
5324         (FINISH_COND): Always store the condition, even if there's
5325         a declaration.
5326         (finish_if_stmt_cond): Use maybe_convert_cond.
5327         (finish_while_stmt_cond): Likewise.
5328         (finish_do_stmt): Likewise.
5329         (finish_for_cond): Likewise.
5330         (expand_cond): Adjust.
5331         
5332         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
5333         * init.c (perform_member_init): Remove obstack machinations.
5334         (expand_cleanup_for_base): Likewise.
5335         (finish_init_stmts): Mark the statement-expression as used.
5336         * method.c (emit_thunk): Use tree-generating functions, not
5337         RTL.
5338         (do_build_copy_constructor): Likewise.
5339         (do_build_assign_ref): Likewise.
5340         (synthesize_method): Likewise.  Keep track of line numbers.
5341         * pt.c (tsubst_expr): Handle various kinds of try blocks.
5342         * semantics.c (expand_stmts): Remove.
5343         (begin_function_try_block): Set FN_TRY_BLOCK_P.
5344         (finish_function_try_block): Be careful rechaining 
5345         function try blocks.
5346         (expand_stmt): Loop through all the statements at a given level.
5347         (exapnd_body): Be careful with line-numbers here too.  Prepare for
5348         being called directly from the parser.
5349
5350         * cp-tree.h (finish_function): Adjust prototype.
5351         * decl.c (finish_function): Return the function compiled.
5352         * pt.c (instantiate_decl): Don't play games with obstacks.
5353         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
5354         (search_tree): Likewise.
5355         * typeck.c: Fix typo in comment.
5356         * typeck2.c (store_init_value): Add comment.
5357
5358         * cp-tree.h (CPTI_ATEXIT): New macro.
5359         (atexit_node): Likewise.
5360         * decl.c (destroy_local_static): New function, broken out from ...
5361         (expand_static_init): Here.
5362
5363         * rtti.c (get_tinfo_var): These should always be global
5364         (expand_si_desc): Use tree, not RTL, functions to generate code.
5365         (expand_class_desc): Likewise.
5366         (expand_ptr_desc): Likewise.
5367         (expand_attr_desc): Likewise.
5368         (expand_generic_desc): Likewise.
5369         (synthesize_tinfo_fn): Likewise.
5370
5371 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
5372
5373         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
5374         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
5375         RECHAIN_STMTS. 
5376         (RECHAIN_STMST_FROM_CHAIN): Likewise.
5377
5378         * parse.y (simple_stmt): Fix typo in last change.
5379
5380         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
5381         (STMT_IS_FULL_EXPR_P): Likewise.
5382         (STMT_LINENO_FOR_FN_P): Likewise.
5383         (prep_stmt): New function.
5384         (building_stmt_tree): Tweak for safety.
5385         * pt.c (tsubst_expr): Use prep_stmt throughout.
5386         (add_tree): Move it to semantics.c
5387         * semantics.c (add_tree): Move it here.
5388         (finish_expr_stmt_real): New function.
5389         (finish_expr_stmt): Use it.
5390         (finish_if_stmt_cond): Use FINISH_COND.
5391         (finish_while_stmt_cond): Likewise.
5392         (finish_for_cond): Likewise.
5393         (finish_stmt_tree): Tweak line-number handling.
5394         (prep_stmt): New function.
5395         (expand_stmt): Use it.
5396         
5397         * cp-tree.h (begin_switch_stmt): Adjust prototype.
5398         (finish_switch_cond): Likewise.
5399         * parse.y (simple_stmt): Adjust accordingly.
5400         * parse.c: Regenerated.
5401         * pt.c (tsubst_expr): Adjust accordingly.
5402         * semantics.c (expand_cond): New function.
5403         (FINISH_COND): New macro.
5404         (begin_switch_stmt): Build the SWITCH_STMT here.
5405         (finish_switch_stmt_cond): Not here.
5406         (expand_stmt): Adjust calls to begin_switch_stmt and
5407         finish_switch_cond.  Use expand_cond throughout.
5408
5409         * dump.c (dequeue_and_dump): Dump types for constants.
5410         Describe DECL_ARG_TYPE more intuitively.
5411         Handle ARRAY_REF.
5412
5413         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
5414         (lang_cleanup_tree): Remove.
5415         * lex.c (make_lang_type): Use ggc_alloc to allocate
5416         TYPE_LANG_SPECIFIC.
5417
5418         Reorganize per-function data.
5419         * cp-tree.h (saved_scope): Add function_decl, bindings.
5420         (language_function): Rename binding_level to bindings.
5421         (cp_function_chain): Use the current_function, not the
5422         outer_function_chain.
5423         (current_class_ptr): Make it work, even when there's no 
5424         current function.
5425         (current_class_ref): Likewise.
5426         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
5427         macros.
5428         (clear_temp_name): Remove.
5429         * decl.c (check_function_type): New function, broken out from
5430         start_function.
5431         (current_binding_level): Adjust definition.
5432         (pushlevel): Simplify.
5433         (poplevel): Don't use named_label_uses when we're outside
5434         a function scope.
5435         (mark_saved_scope): Mark function_decl and bindings.
5436         (maybe_push_to_top_level): Don't unconditionally push a new
5437         function context.  Save bindings and the current_function_decl.
5438         Don't clear named_labels.
5439         (pop_from_top_level): Pop function context if appropriate.
5440         (init_decl_processing): Set init_lang_status and free_lang_status,
5441         rather than save_lang_status and restore_lang_status.
5442         (start_function): Take SF_* flags.  Don't clear per-function data.
5443         Reorder and simplify to use new per-function data code.  Add
5444         asserts.
5445         (store_parm_decls): Don't call init_function_start here.
5446         (finish_function): Adjust for new handling of per-function data.
5447         (push_cp_function_context): Simplify.
5448         (mark_cp_function_context): Change binding_level to bindings.
5449         * decl2.c (clear_temp_name): Remove.
5450         (start_objects): Use SF flags to start_function.
5451         (start_static_storage_duration_function): Likewise.
5452         * except.c (start_anon_func): Remove redundant calls to 
5453         push_function_context_to.  Use SF flags to start function.
5454         (end_anon_func): Remove redundant call to pop_function_context
5455         from.
5456         * lex.c (reinit_parse_for_function): Don't initialize per-function 
5457         data.
5458         * method.c (emit_thunk): Clear current_function after calling
5459         assemble_end_function.  Use SF flags for start_function.
5460         (synthesize_method): Use SF flags for start_function.
5461         * parse.c: Regenerated.
5462         * parse.y (fn.defpen): Likewise.
5463         (pending_inline): Clear current_function, even if something goes
5464         wrong.
5465         * pt.c (instantiate_decl): Use SF flags to start_function.
5466         Don't save and restore expanding_p.
5467         (add_tree): Handle the case where we are outside any function.
5468         (end_tree): Likewise.
5469         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
5470         * semantics.c (begin_function_definition): Likewise.
5471         (expand_body): Likewise.
5472         
5473 1999-09-09  Nathan Sidwell  <nathan@acm.org>
5474
5475         * cp-tree.h (convert_to_void): Prototype new function.
5476         (require_complete_type_in_void): Remove prototype.
5477         * cvt.c (convert_to_void): New function.
5478         (ocp_convert): Use convert_to_void.
5479         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
5480         expressions.
5481         * typeck.c (require_complete_type_in_void): Remove function.
5482         (build_compound_expr): Use convert_to_void.
5483         (build_static_cast): Likewise.
5484         (build_c_cast): Likewise.
5485         * semantics.c (finish_expr_stmt): Do not decay full expressions.
5486         
5487         * typeck.c (build_x_compound_expr): Add FIXME.
5488
5489 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
5490
5491         * cp-tree.h (scratch_tree_cons): Remove.
5492         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
5493         and perm_tree_cons with plain tree_cons.
5494         * class.c: Likewise.
5495         * decl.c: Likewise.
5496         * decl2.c: Likewise.
5497         * except.c: Likewise.
5498         * expr.c: Likewise.
5499         * init.c: Likewise.
5500         * lex.c: Likewise.
5501         * method.c: Likewise.
5502         * parse.y: Likewise.
5503         * pt.c: Likewise.
5504         * repo.c: Likewise.
5505         * rtti.c: Likewise.
5506         * search.c: Likewise.
5507         * typeck.c: Likewise.
5508         * parse.c: Regenerated.
5509         * tree.c (build_srcloc): Simplify.
5510         
5511 1999-09-08  Bruce Korb  autogen@linuxbox.com
5512
5513         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
5514
5515 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
5516
5517         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
5518         Remove next.
5519         (LANG_DECL_PERMANENT): Remove.
5520         * decl.c (duplicate_decls): Don't mess about with obstacks trying
5521         to free memory.
5522         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
5523         * lex.c (free_lang_decl_chain): Remove.
5524         (build_lang_decl): Don't use obstacks.
5525         (retrofit_lang_decl): Likewise.
5526         (copy_lang_decl): Likewise.
5527
5528         * cp-tree.h (saved_scope): Remove old_binding_level and 
5529         function_decl.  Tidy up.
5530         * decl.c (mark_saved_scope): Don't set them.
5531         (maybe_push_to_top_level): Clear memory.
5532
5533         * decl.c (layout_var_decl): Change prototype.  Don't complete
5534         types for external objects.
5535         (check_initializer): Likewise.  Tidy.
5536         (initialize_local_var): Complete types here.
5537         (cp_finish_decl): Not here.  Reorganize a little.
5538         (grokvardecl): Don't complete types here.
5539
5540         * decl.c (start_function): Clear last_dtor_insn and
5541         last_parm_cleanup_insn. 
5542         (push_cp_function_context): Just copy over a little of
5543         the old context, not all of it.
5544
5545         * cp-tree.h (copy_to_permanent): Remove.
5546         (permanent_p): Likewise.
5547         * decl.c (building_typename_type): Don't use copy_to_permanent.
5548         (start_decl): Likewise.
5549         (grok_reference_init): Likewise.
5550         (cp_finish_decl): Likewise.
5551         * init.c (build_new_1): Don't use mapcar.
5552         (build_vec_delete_1): Don't use copy_to_permanent.
5553         (build_vec_init): Likewise.
5554         * parse.y (primary): Likewise.
5555         * parse.c: Regenerated.
5556         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
5557         (lookup_template_class): Likewise.
5558         (tsubst_friend_function): Likewise.
5559         (instantiate_class_template): Likewise.
5560         (tsubst_decl): Likewise.
5561         (tsubst): Likewise.
5562         (instantiate_template): Likewise.
5563         (unify): Likewise.
5564         * rtti.c (get_tinfo_fn): Likewise.
5565         (build_dynamic_cast): Likewise.
5566         * semantics.c (finish_if_stmt_cond): Likewise.
5567         (finish_while_stmt_cond): Likewise.
5568         (finish_do_stmt): Likewise.
5569         (finish_for_cond): Likewise.
5570         (finish_for_expr): Likewise.
5571         (finish_cleanup): Likewise.
5572         (add_decl_stmt): Likewise.
5573         (finish_named_return_value): Likewise.
5574         (finish_qualified_call_expr): Likewise.
5575         * tree.c (perm_manip): Remove.
5576         (build_exception_variant): Don't use copy_to_permanent.
5577         (permanent_p): Remove.
5578         (copy_to_permament): Remove.
5579         (build_min_nt): Don't use copy_to_permanent.
5580         (build_min): Likewise.
5581         (min_tree_cons): Likewise.
5582         * typeckc.c (build_static_cast): Likewise.
5583         (build_reinterpret_cast): Likewise.
5584         (build_const_cast): Likewise.
5585         
5586 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
5587
5588         * decl.c (ggc_p): Set it to 1.
5589         (mark_saved_scope): Add prototype.
5590
5591 1999-09-07  Richard Henderson  <rth@cygnus.com>
5592
5593         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
5594         * typeck.c (self_promoting_args_p): Delete.
5595
5596 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
5597
5598         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
5599         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
5600
5601 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
5602
5603         * Makefile.in (tree.o): Depend on ggc.h.
5604         * class.c (make_method_vec): Remove.
5605         (free_method_vec): Likewise.
5606         (free_method_vecs): Remove.
5607         (add_method): Don't use them.
5608         * cp-tree.def (PTRMEM_CST): Make it longer.
5609         (TEMPLATE_PARM_INDEX): Make it shorter.
5610         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
5611         (template_parm_index): Remove RTL field.
5612         (ptrmem_cst): Add RTL field.
5613         (finish_function): Removed parameter.
5614         (process_next_inline): Change prototype.
5615         (init_cplus_unsave): Rename to init_tree.
5616         (binding_init): Remove.
5617         * decl.c (free_binding_nodes): Remove.
5618         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
5619         (pop_binding): Don't use free_binding_nodes.
5620         (free_binding_vecs): Remove.
5621         (store_bindings): Don't use them.
5622         (pop_from_top_level): Likewise.
5623         (lookup_namespace_name): Simplify.
5624         (build_typename_type): Don't use obstack_free.
5625         (unqualified_namespace_lookup): Simplify.
5626         (lookup_name_real): Simplify.
5627         (start_function): Remove comment about leaks.
5628         (finish_function): Removed nested parameter.  Call
5629         expand_end_bindings even when building_stmt_tree.
5630         Call ggc_push_context and ggc_pop_context around
5631         rest_of_compilation, if necessary.
5632         (mark_cp_function_context): Handle a NULL language-context.
5633         (lang_mark_false_label_stack): Fix typo.
5634         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
5635         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
5636         pointer to method types.
5637         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
5638         * decl2.c (finish_objects): Adjust call to finish_function.
5639         (finish_static_store_duration_function): Likewise.
5640         (do_nonmember_using_decl): Remove call to binding_init.
5641         * except.c (end_anon_func): Adjust call to finish_function.
5642         * lex.c (mark_impl_file_chain): New function.
5643         (init_parse): Call init_tree, not init_cplus_unsave.
5644         Add GC roots.
5645         (cp_pramga_interface): Use xmalloc, not permalloc.
5646         (cp_pragma_implementation): Likewise.
5647         (begin_definition_of_inclass_inline): Simplify.
5648         (process_next_inline): Adjust prototype.
5649         (do_scoped_id): Don't call binding_init.
5650         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
5651         * method.c (emit_thunk): Adjust call to finish_function.
5652         (synthesize_method): Likewise.
5653         * parse.y (%union): Add a new `pi' variant.
5654         (PRE_PARSED_FUNCTION_DECL): Use it.
5655         (fn.defpen): Likewise.
5656         (fndef): Adjust call to finish_function.
5657         * pt.c (instantiate_decl): Likewise.
5658         * rtti.c (syntheisze_tinfo_fn): Likewise.
5659         * semantics.c (expand_body): Likewise.
5660         * tree.c: Include ggc.h.
5661         (mark_list_hash): New function.
5662         (binding_init): Remove.
5663         (init_cplus_unsave): Rename to ...
5664         (init_tree): This.  Add GC roots.
5665         
5666 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
5667
5668         Get ready for garbage collection.
5669         * Makefile.in (CXX_TREE_H): Add varray.h
5670         (lex.o): Depend on ggc.h.
5671         (decl.o): Likewise.
5672         (decl2.o): Likewise.
5673         (method.o): Likewise.
5674         (search.o): Likewise.
5675         (pt.o): Likewise.
5676         (repo.o): Likewise.
5677         * class.c: Include ggc.h.
5678         (current_class_name): Remove.
5679         (current_class_type): Likewise.
5680         (current_access_specifier): Likewise.
5681         (previous_class_type): Likewise.
5682         (previous_class_values): Likewise.
5683         (class_cache_firstobj): Likewise.
5684         (current_lang_base): Likewise.
5685         (current_lang_stack): Likewise.
5686         (current_lang_stacksize): Likewise.
5687         (lang_name_c): Likewise.
5688         (lang_name_cplusplus): Likewise.
5689         (lang_name_java): Likewise.
5690         (current_lang_name): Likewise.
5691         (base_layout_decl): Likewise.
5692         (access_default_node): Likewise.
5693         (access_public_node): Likewise.
5694         (access_protected_node): Likewise.
5695         (access_private_node): Likewise.
5696         (access_default_virtual_node): Likewise.
5697         (access_public_virtual_node): Likewise.
5698         (access_protected_virtual_node): Likewise.
5699         (access_private_virtual_node): Likewise.
5700         (signed_zero_node): Likewise.
5701         (init_class_processing): Don't build base_layout_decl.
5702         (push_lang_context): Adjust now that current_lang_base is a varray.
5703         (pop_lang_context): Likewise.
5704         * cp-tree.h: Include varray.h.
5705         (cp_global_trees): Add access_default, access_public,
5706         access_protected, access_private, access_default_virtual,
5707         access_public_virtual, access_protected_virtual,
5708         access_private_virtual, ctor_identifier, delta2_identifier, 
5709         delta_identifier, dtor_identifier, in_charge_identifier,
5710         index_identifier, nelts_identifier, this_identifier,
5711         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
5712         lang_name_c, lang_name_cplusplus, lang_name_java,
5713         empty_except_spec, null, jclass, minus_one, terminate.
5714         (saved_scope): Move here from decl.c.  Define globals in terms of
5715         saved_scope: current_namespace, current_class_name,
5716         current_class_type, current_access_specifier, current_lang_stack,
5717         current_lang_base, current_lang_name, current_function_parms,
5718         current_template_parms, processing_template_decl,
5719         processing_specialization, processing_explicit_instantiation,
5720         previous_class_type, previous_class_values, class_cache_firstobj.
5721         (scope_chain): New variable.
5722         (init_pt): New function.
5723         * decl.c (current_namespace): Remove.
5724         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
5725         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
5726         (delta_identifier, delta2_identifier): Likewise.
5727         (pfn_or_delta2_identifier, tag_identifier): Likewise
5728         (vt_off_identifier, empty_except_spec, null_node): Likewise.
5729         (current_function_parms, current_lang_base): Remove.
5730         (current_lang_stack, previous_class_values): Remove.
5731         (class_binding_level): Macroize.
5732         (saved_scope): Remove.
5733         (current_saved_scope): Rename to scope_chain.
5734         (mark_saved_scope): Adjust for new scope structure.
5735         (maybe_push_to_top_level): Likewise.
5736         (pop_from_top_level): Likewise.
5737         (duplicate_decls): Adjust now that current_lang_base is a varray.
5738         (build_typename_type): Call ggc_add_tree_hash_table_root.
5739         (init_decl_processing): Call init_pt.  Call push_to_top_level to
5740         set up globals.  Add GC roots.
5741         (xref_basetypes): Adjust now that current_lang_base is a varray.
5742         * decl.h (this_identifier): Remove.
5743         (in_charge_identifier): Likewise.
5744         * decl2.c: Don't include varray.h.
5745         (current_namespace): Remove.
5746         (init_decl2): Add GC roots.
5747         * except.c (Terminate): Remove. 
5748         (init_exception_processing): Use terminate_node instead.
5749         (build_terminate_handler): Likewise.
5750         * init.c (nc_nelts_field_id): Remove.
5751         (minus_one): Likewise.
5752         (init_init_processing): Use minus_one_node and nelts_identifier
5753         instead.  Add GC roots.
5754         (jclass_node): Remove.
5755         (build_new_1): Use nelts_identifier.
5756         (build_vec_init): Likewise.
5757         (build_vec_delete): Likewise.
5758         * lex.c: Include ggc.h.
5759         (defarg_fn): Move declaration early.
5760         (defarg_parms): Likewise.
5761         (init_parse): Add GC roots.
5762         (handle_cp_pragma): Remove redundant declaration of
5763         pending_vtables.
5764         * method.c: Include ggc.h.
5765         (btypelist): Make it a varray.  All uses changed.
5766         (ktypelist): Likewise.
5767         (init_method): Add GC roots.
5768         * pt.c: Don't include varray.h.  Include ggc.h.
5769         (current_template_parms): Remove.
5770         (processing_template_decl): Likewise.
5771         (processing_specialization): Likewise.
5772         (processing_explicit_instantiation): Likewise.
5773         (init_pt): New function.
5774         * repo.c: Include ggc.h.
5775         (init_repo): Add GC roots.
5776         * search.c: Don't include varray.h.
5777         (_vptr_name): Remove.
5778         (lookup_field_1): Use vtpr_identifier instead.
5779         (expand_indirect_vtbls_init): Remove redundant declaration of
5780         in_charge_identifier.
5781         (init_search_processing): Use vptr_identifier.
5782         
5783 1999-09-05  Richard Henderson  <rth@cygnus.com>
5784             Bernd Schmidt <bernds@cygnus.co.uk>
5785             Mark Mitchell  <mark@codesourcery.com>
5786
5787         * Makefile.in (parse.o): Depend on ggc.h.
5788         (decl2.o): Depend on ggc.h.
5789         (init.o): Depend on ggc.h.
5790         * cp-tree.h (init_decl2): Declare.
5791         (cp_parse_init): Likewise.
5792         * decl.c (ggc_p): Define to zero.
5793         (mark_saved_scope): New function.
5794         (init_decl_processing): Call cp_parse_init, and cp_decl2.
5795         Register GC roots.
5796         (expand_static_init): Add GC roots.
5797         * decl2.c: Include ggc.h.
5798         (init_decl2): New function.
5799         * init.c: Include ggc.h.
5800         (init_init_processing): Add GC roots.
5801         * parse.y: Include ggc.h.
5802         (cp_parse_init): New function.
5803         
5804 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
5805
5806         * decl.c (init_decl_processing): Set mark_lang_status.
5807         (lang_mark_false_label_stack): Adjust prototype.
5808         * decl2.c (grok_function_init): Remove extraneous declaration of
5809         abort_fndecl.
5810
5811         * Make-lang.in (cc1plus): Remove dependency on GGC.
5812         * Makefile.in (OBJS): Don't mention ggc-simple.o.
5813         (OBJDEPS): Don't mention ggc-simple.o.
5814
5815         * Make-lang.in (cc1plus): Depend on $(GGC).
5816         * Makefile.in (OBJS): Add ggc-simple.o.
5817         (OBJDEPS): Likewise.
5818         * cp-tree.h (language_function): Rename members to `x_' versions;
5819         we now have x_named_labels, x_ctor_label, x_dtor_label,
5820         x_base_init_list, x_member_init_list, x_base_init_expr,
5821         x_current_class_ptr, x_current_class_ref, x_last_tree,
5822         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
5823         x_result_rtx. 
5824         (dtor_label, ctor_label, current_base_init_list,
5825         current_member_init_list, base_init_expr, current_class_ptr,
5826         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
5827         * decl.c: Include ggc.h.
5828         (last_dtor_insn): Adjust to use x_ names.
5829         (last_parm_cleanup_insn): Likewise.
5830         (original_result_rtx): Likewise.
5831         (named_labels): Likewise.
5832         (mark_binding_level): New function.
5833         (mark_cp_function_context): Likewise.
5834         (mark_false_label_stack): Likewise.
5835         (lang_mark_tree): Likewise.
5836         (lang_cleanup_tree): Likewise.
5837         
5838 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
5839
5840         * Makefile.in (CXX_TREE_H): Include function.h.
5841         (decl.o): Don't depend on function.h.
5842         (decl2.o): Likewise.
5843         (typeck.o): Likewise.
5844         (init.o): Likewise.
5845         (method.o): Likewise.
5846         * cp-tree.h: Include function.h.
5847         (cp_function): Rename to language_function.  Remove next.
5848         (cp_function_chain): Make it a macro, not a variable.
5849         (push_cp_function_context): Don't declare.
5850         (pop_cp_function_context): Likewise.
5851         * decl.c: Don't include function.h.
5852         (push_cp_function_context): Make it static.  Make it suitable for
5853         a save_lang_status callback.
5854         (pop_cp_function_context): Likewise.
5855         (maybe_push_to_top_level): Call push_function_context_to, not
5856         push_cp_function_context.
5857         (pop_from_top_level): Call pop_function_context_from, not
5858         pop_cp_function_context.
5859         (init_decl_processing):  Set save_lang_status and
5860         restore_lang_status.  Call push_function_context_to, not
5861         push_cp_function_context.
5862         (cp_function_chain): Remove.
5863         * decl2.c: Don't include function.h.
5864         * except.c: Don't include function.h.
5865         (start_anon_func): Call push_function_context_to, not
5866         push_cp_function_context.
5867         (end_anon_func):  Call pop_function_context_from, not
5868         pop_cp_function_context.
5869         * init.c: Don't include function.h.
5870         * lex.c (begin_definition_of_inclass_inline): Call
5871         push_function_context_to, not push_cp_function_context. 
5872         (process_next_inline):  Call pop_function_context_from, not
5873         pop_cp_function_context.
5874         * method.c: Don't include function.h.
5875         (synthesize_method): Call push_function_context_to, not
5876         push_cp_function_context.  Call pop_function_context_from, not
5877         pop_cp_function_context.
5878         * typeck.c: Don't include function.h.
5879         
5880         * decl.c (expand_static_init): Tweak handling of static
5881         initializations for objects without constructors.
5882
5883 1999-09-03  Nathan Sidwell  <nathan@acm.org>
5884
5885         * typeck.c (build_indirect_ref): Reject dereference of pointer to
5886         void.
5887
5888 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
5889
5890         * cp-tree.h (cp_function): Move here, from decl.c.
5891         (cp_function_chain): Declare.
5892         (dtor_label): New macro, instead of variable.
5893         (ctor_label): Likewise.
5894         (current_base_init_list): Likewise.
5895         (current_member_init_list): Likewise.
5896         (base_init_expr): Likewise.
5897         (current_class_ptr): Likewise.
5898         (current_class_ref): Likewise.
5899         (last_tree): Likewise.
5900         (last_expr_type): Likewise.
5901         (current_function_returns_value): Likewise.
5902         (current_function_returns_null): Likewise.
5903         (current_function_just_assigned_this): Likewise.
5904         (current_function_parms_stored): Likewise.
5905         (temp_name_counter): Likewise.
5906         (static_labelno): Likewise.
5907         (expanding_p): Likewise.
5908         (stmts_are_full_exprs_p): Likewise.
5909         (in_function_try_handler): Likewise.
5910         (lang_type): Remove nested type_flags.  All uses changed.
5911         * call.c (ctor_label): Remove.
5912         (dtor_label): Likewise.
5913         * class.c (current_class_ptr): Remove.
5914         (current_class_ref): Likewise.
5915         * decl.c (static_labelno): Remove.
5916         (dtor_label): Likewise.
5917         (last_dtor_insn): New macro, instead of variable.
5918         (last_parm_cleanup_insn): Likewise.
5919         (original_result_rtx): Likewise.
5920         (in_function_try_handler): Remove.
5921         (named_label_uses): New macro, instead of variable.
5922         (named_labels): Likewise.
5923         (current_function_returns_value): Remove.
5924         (current_function_returns_null): Likewise.
5925         (current_function_assigns_this): New macro, instead of variable.
5926         (current_function_just_assigned_this): Likewise.
5927         (current_binding_level): Likewise.
5928         (init_decl_processing): Call push_cp_function_context.
5929         (cp_function): Move to cp-tree.h
5930         (cp_function_chain): Make it global.
5931         (temp_name_counter): Remove.
5932         (push_cp_function_context): Simplify.
5933         (pop_cp_function_context): Likewise.
5934         * decl2.c (temp_name_counter): Remove.
5935         * init_c (current_base_init_list): Likewise.
5936         (current_member_init_list): Likewise.
5937         (base_init_expr): Likewise.
5938         * method.c (static_labelno): Likewise.
5939         * pt.c (last_tree): Likewise.
5940         * semantics.c (expanding_p): Likewise.
5941         (stmts_are_full_exprs_p): Likewise.
5942         (last_expr_type): Likewise.
5943         * typeck.c (dtor_label): Likewise.
5944         (ctor_label): Likewise.
5945         
5946 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
5947
5948         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
5949         (arg_assoc_class): Use arg_assoc_template_arg for template
5950         arguments. 
5951         (arg_assoc): Likewise.
5952         * pt.c (mangle_class_name_for_template): Allow member template
5953         template arguments.
5954
5955 1999-09-02  Nathan Sidwell  <nathan@acm.org>
5956
5957         * call.c (build_conditional_expr): Warn on enum mismatches.
5958         (convert_arg_to_ellipsis): Move non-pod check to after
5959         conversion.
5960
5961 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5962
5963         * gxx.gperf (hash, is_reserved_word): Add prototypes.
5964
5965         * init.c (build_vec_init): Initialize variable `try_block'.
5966
5967         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
5968         Likewise for bzero/memset.
5969         (token_getch, token_put_back): Add static prototypes.  Remove
5970         `inline' from the definitions.
5971         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
5972
5973 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
5974
5975         * cp-tree.h (lang_type): Move align into type_flags.
5976         (CLASSTYPE_ALIGN): Adjust accordingly.
5977         * call.c (direct_reference_binding): Remove misleading comment.
5978
5979 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5980
5981         * parse.y (language_string): Constify.
5982
5983 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5984
5985         * repo.c (getpwd): Don't prototype.
5986         * xref.c (getpwd): Likewise
5987
5988 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5989
5990         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
5991         Remove hacks for stuff which now comes from libiberty.
5992
5993 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
5994
5995         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
5996
5997 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
5998
5999         * cp-tree.h (begin_init_stmts): Declare.
6000         (finish_init_stmts): Likewise.
6001         * cvt.c (build_up_reference): Wrap the declaration of a temporary
6002         in a statement-expression so that we will see it when expanding
6003         tree structure later.
6004         * init.c (begin_init_stmts): Don't make it static.
6005         (finish_init_stmts): Likewise.
6006
6007         * cp-tree.h (start_handler_parms): New function.
6008         (expand_start_catch_block): Take only one parameter.
6009         (start_handler_parms): New function.
6010         * decl.c (start_handler_parms): Define it.
6011         * except.c (process_start_catch_block): Take only one parameter.
6012         Don't call grokdeclarator here.
6013         (expand_start_catch_block): Don't call grokdeclarator here,
6014         either.
6015         * parse.y (handler_args): Adjust call to
6016         expand_start_catch_block.  Use start_handler_parms.
6017         * pt.c (push_template_decl_real): Make permanent lists have
6018         permanent elements.
6019         (tsubst_expr): Adjust calls to expand_start_catch_block
6020         appropriately.
6021         * semantics.c (expand_stmt): Likewise.
6022         
6023 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
6024
6025         * pt.c (push_template_decl_real): Use template declaration from
6026         class type if it exists.
6027
6028 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
6029
6030         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
6031         (maybe_inject_for_scope_var): Declare it.
6032         (initialize_local_var): Likewise.
6033         * decl.c (maybe_inject_for_scope_var): Make it global.
6034         (initialize_local_var): Likewise.  Move cleanup handling here,
6035         from cp_finish_decl.
6036         (make_rtl_for_nonlocal_decl): Use
6037         push_obstacks_nochange/pop_obstacks, rather than
6038         end_temporary_allocation/resume_temporary_allocation.
6039         (cp_finish_decl): Try to complete the type of a variable when it
6040         is declared.  Move cleanup-handling to initialize_local_var.
6041         (expand_static_init): Use tree-building code, rather than
6042         RTL-building code.
6043         * decl2.c (get_temp_name): Assert non-initializedness of
6044         temporaries.
6045         * init.c (create_temporary_var): Move RTL-assigning code to ...
6046         (get_temp_regvar): Here.
6047         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
6048         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
6049         call initialize_local_var to generate initialization code.
6050         
6051 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6052
6053         * cp-tree.h (fndecl_as_string, type_as_string,
6054         type_as_string_real, args_as_string, decl_as_string,
6055         expr_as_string, code_as_string, language_as_string,
6056         parm_as_string, op_as_string, assop_as_string, cv_as_string,
6057         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
6058
6059         * errfn.c (cp_printer): Likewise.
6060
6061         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
6062         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
6063         cp_file_of, code_as_string, language_as_string, parm_as_string,
6064         op_as_string, assop_as_string, args_as_string, cv_as_string):
6065         Likewise.
6066
6067         * tree.c (lang_printable_name): Likewise.
6068
6069 1999-08-28  Richard Henderson  <rth@cygnus.com>
6070
6071         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
6072
6073 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
6074
6075         * cp-tree.h (strip_array_types): New function.
6076         * decl.c (maybe_deduce_size_from_array_init): New function, split
6077         out from cp_finish_decl.
6078         (layout_var_decl): Likewise.
6079         (maybe_commonize_var): Likewise.
6080         (maybe_inject_for_scope_var): Likewise.
6081         (initialize_local_var): Likewise.
6082         (build_cleanup_on_safe_obstack): Likewise.
6083         (check_initializer): Likewise.
6084         (make_rtl_for_nonlocal_decl): Likewise.
6085         (cp_finish_decl): Use them.
6086         * typeck.c (strip_array_types): New function.
6087         
6088         * cp-tree.def (LABEL_STMT): New tree node.
6089         * cp-tree.h (LABEL_STMT_LABEL): New macro.
6090         (shadow_label): Remove.
6091         (declare_local_label): New function.
6092         (finish_label_decl): Likewise.
6093         * decl.c (make_label_decl): New function, split out from
6094         lookup_label.
6095         (shadowed_labels): Remove.
6096         (binding_level): Add shadowed_labels.
6097         (clear_binding_level): Remove.
6098         (push_binding_level): Just bzero the new binding level.
6099         (pushlevel): Fix indentation.
6100         (pop_label): New function.
6101         (pop_labels): Likewise, split out from poplevel.
6102         (poplevel): Pop local labels.  Use pop_labels.
6103         (maybe_push_to_top_level): Don't clear shadowed_labels.
6104         (lookup_label): Use make_label_decl.
6105         (shadow_label): Remove.
6106         (declare_local_label): New function.
6107         (define_label): Simplify.
6108         (start_function): Don't clear shadowed_labels.
6109         (cp_function): Remove shadowed_labels.
6110         (push_cp_function_context): Don't save shadowed_labels.
6111         (pop_cp_function_context): Don't restore it.
6112         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
6113         * parse.y (label_decl): Use finish_label_decl.
6114         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
6115         declarations.
6116         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
6117         building_stmt_tree.
6118         (finish_label_decl): New function.
6119         (expand_stmt): Handle LABEL_STMTs and local label declarations.
6120         
6121 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
6122
6123         * decl.c (lookup_label): Build labels on the permanent obstack
6124         when building statement trees.  Don't build RTL for labels when
6125         building statement trees.
6126         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
6127         building statement trees.
6128         (finish_label_stmt): Likewise.
6129         (expand_stmt): Adjust accordingly.
6130         * pt.c (tsubst_expr); Likewise.
6131         (do_decl_instantiation): Robustify.
6132         
6133         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
6134         * tree.c (build_cplus_new): Set it.
6135         * expr.c (cplus_expand_expr): Use it.
6136         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
6137         
6138         * decl.c (store_parm_decls): Reset immediate_size_expand.
6139         (finish_function): Likewise.
6140         
6141         * tree.c (cplus_unsave_expr_now): Don't return a value.
6142
6143         * semantics.c (do_poplevel): Always initialize the return value.
6144
6145 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
6146
6147         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
6148         * tree.h (cplus_unsave_expr_now) : Same.
6149
6150 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
6151
6152         * decl.c (grokdeclarator): Amend comment.
6153         * except.c (expand_start_catch_block): Call push_template_decl for
6154         catch-block parameters.
6155         * method.c (synthesize_method): Build an empty compound statement
6156         for the body of a constructor.
6157
6158 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
6159
6160         * tree.c (cp_build_qualified_type_real): If we're asking for the
6161         same quals we already have, just return.
6162
6163 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
6164
6165         * cp-tree.def (SUBOBJECT): New tree node.
6166         * cp-tree.h (CLEANUP_P): New macro.
6167         (SUBOBJECT_CLEANUP): Likewise.
6168         (keep_next_level): Add parameter.
6169         (get_temp_regvar): Don't declare.
6170         (emit_base_init): Remove parameter.
6171         (expand_aggr_init): Rename to build_aggr_init.
6172         (expand_vec_init): Rename to build_vec_init.
6173         (do_pushlevel): Remove.
6174         (do_poplevel): Likewise.
6175         (finish_cleanup): New function.
6176         (finish_subobject): Likewise.
6177         (stmts_are_full_exprs_p): New variable.
6178         * decl.c (keep_next_level): Add parameter.
6179         (cp_finish_decl): Use build_aggr_init, not
6180         expand_aggr_init.  Use finish_expr_stmt to expand the code.
6181         (expand_static_init): Use tree-generating, not RTL-generating,
6182         functions to handle the initialization.
6183         (start_function): Remove dead code.  Always have a momentary
6184         obstack inside the function, even before hitting the first curly
6185         brace.
6186         (cplus_expand_expr_stmt): Move calls to
6187         expand_{start,end}_target_temps into semantics.c.
6188         (cp_function): Add stmts_are_full_exprs_p.
6189         (push_cp_function_context): Save it.
6190         (pop_cp_function_context): Restore it.
6191         * decl2.c (get_temp_regvar): Move to init.c.
6192         (do_static_initialization): Use build_{aggr,vec}_init.
6193         (do_static_destruction): Fix typo in comment.
6194         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
6195         * except.c (expand_throw): Use create_temporary_var.
6196         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
6197         * init.c (expand_vec_init_try_block): Remove.
6198         (expand_vec_init_catch_clause): Likewise.
6199         (get_temp_regvar): New function.
6200         (begin_init_stmts): Likewise.
6201         (finish_init_stmts): Likewise.
6202         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
6203         structure here.
6204         (emit_base_init): Likewise.  Remove unused parameter.
6205         (expand_virtual_init): Likewise.
6206         (expand_cleanup_for_base): Use finish_subobject.
6207         (expand_aggr_vbase_init_1): Simplify.
6208         (construct_virtual_bases): Use tree-generating functions to build
6209         up initialization.
6210         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
6211         (expand_default_init): Likewise.
6212         (expand_aggr_init_1): Likewise.
6213         (expand_vec_init): Rename to build_vec_init.
6214         * method.c (do_build_copy_constructor): Use tree-generating
6215         functions.  Don't call clear_last_expr.
6216         (do_build_assign_ref): Likewise.
6217         (synthesize_method): Call clear_last_expr here.
6218         * parse.y (base_init): Don't call clear_last_expr here.
6219         (nodecls): Likewise.
6220         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
6221         * semantics.c (do_pushlevel): Move to here.
6222         (do_poplevel): Likewise.
6223         (stmts_are_full_exprs_p): New variable.
6224         (finish_expr_stmt): Handle logic for temoprary cleanup here.
6225         (finish_for_stmt): Use finish_expr_stmt.
6226         (finish_cleanup): New function.
6227         (finish_function_try_block): Fix indentation.
6228         (finish_subobject): New function.
6229         (setup_vtbl_ptr): Call keep_next_level here.
6230         (finish_stmt_expr): Handle a block with no scope inside the
6231         statement-expression.
6232         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
6233         SUBOBJECT.
6234         * tree.c (search_tree): Handle INIT_EXPR.
6235         (mapcar): Likewise.
6236         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
6237         * typeck2.c (store_init_value): Change expand_aggr_init to
6238         build_aggr_init in comment.
6239         
6240 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
6241
6242         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
6243
6244 1999-08-25  Nathan Sidwell  <nathan@acm.org>
6245
6246         * decl2.c (handle_class_head): Be graceful about additional
6247         scope qualifiers. Adjust comments to reflect reality.
6248
6249 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
6250
6251         * call.c (build_conditional_expr): Fix typo.
6252         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
6253         lvalue before trying to mess with the sides.
6254
6255         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
6256
6257 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
6258
6259         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
6260
6261 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
6262
6263         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
6264         Return arbitrary pointer or NULL.
6265         (check_eh_spec): Call __throw_type_match_rtti_2.
6266         * tinfo.h (*::dcast): Return int.  Add valp parm.
6267         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
6268         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
6269         (__throw_type_match_rtti): Now just a wrapper.
6270
6271         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
6272         (init_exception_processing): Don't initialize them.
6273
6274 1999-08-23  Paul Burchard <burchard@pobox.com>
6275
6276         * decl.c (check_default_argument): Fix typo.
6277
6278 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
6279
6280         * cp-tree.def (STMT_EXPR): Fix typo in node name.
6281
6282         * dump.c (dump_next_stmt): New function.
6283         (dequeue_and_dump): Use it.
6284         
6285         * pt.c (tsubst_copy): Make sure to initialize return value for a
6286         STMT_EXPR, even when processing_template_decl.
6287         * semantics.c (finish_stmt_expr): A statement-expression whose
6288         last statement is not an expression-statement has type `void'.  
6289         
6290 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
6291
6292         * semantics.c (finish_stmt_expr): Fix typo in comment.
6293         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
6294         (mapcar): Likewise.
6295         * init.c (build_vec_delete_1): Make the children of a permanent
6296         BIND_EXPR permanent.
6297         * pt.c (register_specialization): Don't register a specialization
6298         more than once.
6299         
6300 1999-08-18  Andrew Haley  <aph@cygnus.com>
6301
6302         * method.c (process_overload_item): Call build_mangled_C9x_name ()
6303         for all integer parameter types larger than long long.
6304
6305 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
6306
6307         * pt.c (redeclare_class_template): Merge default template
6308         arguments in both directions.
6309
6310         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
6311         compiler_error message.
6312
6313 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
6314
6315         * cp-tree.h: Declare flag_use_repository.
6316         * pt.c (do_decl_instantiation): Don't complain about duplicate
6317         instantiation with -frepo.
6318         (do_type_instantiation): Likewise.
6319
6320         * pt.c (push_template_decl_real): Complain about everything
6321         that isn't a valid template.
6322
6323         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
6324         affect inlines.
6325
6326 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
6327
6328         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
6329         * decl2.c (build_expr_from_tree): Handle it.
6330         * error.c (dump_expr): Likewise.
6331         * pt.c (for_each_template_parm): Likewise.
6332         (tsubst_copy): Likewise.
6333         * tree.c (search_tree): Likewise.
6334         * semantics.c (finish_pseudo_destructor_call): Create it.
6335         
6336 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
6337
6338         * search.c (setup_class_bindings): Robustify.
6339         * typeck.c (common_type): Use same_type_p, not pointer equality,
6340         to compare types.
6341
6342         * cp-tree.h (build_lang_field_decl): Remove.
6343         * class.c (build_vtable): Replace calls to build_lang_field_decl
6344         with build_lang_decl.
6345         (prepare_fresh_vtable): Likewise.
6346         (finish_struct_1): Likewise.
6347         (init_class_processing): Likewise.
6348         * decl.c (push_using_decl): Likewise.
6349         (init_decl_processsing): Likewise.
6350         (grokvardecl): Likewise.
6351         (build_ptrmemfunc_type): Likewise.
6352         (grokdeclarator): Likewise.
6353         (build_enumerator): Likewise.
6354         * decl2.c (grok_x_components): Likewise.
6355         (do_class_using_decl): Likewise.
6356         * except.c (call_eh_info): Likewise.
6357         * init.c (init_init_processing): Likewise.
6358         * rtti.c (expand_class_decl): Likewise.
6359         * tree.c (build_base_fields): Likewise.
6360         (build_vbase_pointer_fields): Likewise.
6361         * lex.c (build_lang_decl): Build declarations on the permanent
6362         obstack if we're building statmeent trees.
6363         (retrofit_lang_decl): Handle both the full lang_decl and also the
6364         smaller lang_decl_flags here.
6365         (build_lang_field_decl): Remove.
6366         * pt.c (push_template_decl_real): Issue errors for variable
6367         declarations that are not static members.
6368
6369 1999-08-18  Richard Henderson  <rth@cygnus.com>
6370
6371         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
6372         (mapcar): Likewise.
6373
6374 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
6375
6376         * cp-tree.h (back_end_hook): New variable.
6377         * decl2.c (back_end_hook): Define it.
6378         (finish_file): If it's non-NULL, call it.
6379
6380         * decl.c (add_decl_to_level): New function.
6381         (push_local_binding): Use it.
6382         (find_binding): Fix typo in comment.
6383         (pushdecl): Use add_decl_to_level.  Put templates on the
6384         corresponding namespace-scope binding levels.
6385         * dump.c (dequeue_and_dump): Print the specializations of a
6386         template.
6387         * pt.c (push_template_decl_real): Don't push a template multiple
6388         times.
6389
6390 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
6391
6392         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
6393         (CALL_DECLARATOR_QUALS): Likewise.
6394         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
6395         * decl.c (grokdeclarator): Adjust to use them.
6396         * decl2.c (grokfield): Likewise.
6397         (reparse_absdcl_as_casts): Likewise.
6398         * lex.c (make_call_declarator): Likewise.
6399         (set_quals_and_spec): Likewise.
6400         * pt.c (tsubst): Likewise.
6401         * tree.c (mapcar): Remove special hack to handle third operand of
6402         a CALL_EXPR.
6403
6404 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
6405
6406         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
6407         * class.c (build_vtable): Use build_lang_field_decl to build the
6408         VAR_DECLs for vtables.
6409         (prepare_fresh_vtable): Likewise.
6410         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
6411         CAN_HAVE_FULL_LANG_DECL_P.
6412         (push_using_decl): Use build_lang_decl to build USING_DECLs.
6413         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
6414         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
6415         (build_lang_field_decl): Likewise.
6416         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
6417         to copy.
6418         
6419         * cp-tree.def (STMT_EXPR): New tree node.
6420         * cp-tree.h (STMT_EXPR_STMT): New macro.
6421         (store_return_init): Change prototype.
6422         (finish_named_return_value): New function.
6423         (expand_stmt): Likewise.
6424         (expand_body): Likewise.
6425         (begin_stmt_tree): Likewise.
6426         (finish_stmt_tree): Likewise.
6427         (expanding_p): New variable.
6428         (last_expr_type): Likewise.
6429         (building_stmt_tree): New macro.
6430         * decl.c (start_function): Use building_stmt_tree, not
6431         processing_template_decl, where appropriate.
6432         (store_parm_decls): Likewise.
6433         (store_return_init): Move most of the body to semantics.c.
6434         (finish_function): Use building_stmt_tree.
6435         (finish_stmt): Clear last_expr_type here.
6436         (cp_function): Add expanding_p, last_tree, last_expr_type.
6437         (push_cp_function_context): Save them.
6438         (pop_cp_function_context): Restore them.
6439         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
6440         * error.c (dump_expr): Handle STMT_EXPR.
6441         * except.c (expand_start_catch_block): Use building_stmt_tree.
6442         Use add_decl_stmt.
6443         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
6444         (do_case): Move add_tree call to semantics.c.
6445         * parse.y (return_init): Use finish_named_return_value.
6446         (for.init.statement): Use finish_expr_stmt.
6447         * parse.c: Regenerated.
6448         * pt.c (do_pushlevel): Move to semantics.c.
6449         (do_poplevel): Likewise.
6450         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
6451         (tsubst_expr): Don't expand all the way to RTL here.  Handle
6452         RETURN_INIT and CTOR_INITIALIZER.
6453         (instantiate_decl): Call expand_body after tsubst'ing into
6454         DECL_SAVED_TREE.
6455         * semantics.c (expand_stmts): New function.
6456         (expanding_p): New variable.
6457         (last_expr_type): Likewise.
6458         (finish_expr_stmt): Use building_stmt_tree.
6459         (begin_if_stmt): Likewise.
6460         (finish_if_stmt_cond): Likewise.
6461         (finish_then_clause): Likewise.
6462         (begin_else_clause): Likewise.
6463         (finish_else_clause): Likewise.
6464         (begin_while_stmt): Likewise.
6465         (finish_while_stmt_cond): Likewise.
6466         (finish_while_stmt): Likewise.
6467         (finish_do_body): Likewise.
6468         (finish_do_stmt): Likewise.
6469         (finish_return_stmt): Likewise.
6470         (begin_for_stmt): Likewise.
6471         (fnish_for_init_stmt): Likewise.
6472         (finish_for_cond): Likewise.
6473         (finish_for_expr): Likewise.
6474         (finish_for_stmt): Likewise.
6475         (finish_break_stmt): Likewise.
6476         (finish_continue_stmt): Likewise.
6477         (finish_switch_cond): Likewise.
6478         (finish_switch_stmt): Likewise.
6479         (finish_case_label): Call add_tree here if necessary.
6480         (finish_goto_statement): Use building_stmt_tree.
6481         (begin_try_block): Likewise.
6482         (begin_function_try_block): Likewise.
6483         (finish_try_block): Likewise.
6484         (finish_function_try_block): Likewise.
6485         (finish_handler_sequence): Likewise.
6486         (finish_function_handler_sequence): Likewise.
6487         (begin_handler): Likewise.
6488         (finish_handler_parms): Likewise.
6489         (finish_handler): Likewise.
6490         (begin_compound_stmt): Likewise.
6491         (finish_compound_stmt): Likewise.
6492         (finish_asm_stmt): Likewise.
6493         (finish_label_stmt): Likewise.
6494         (finish_named_return_value): New function.
6495         (setup_vtbl_ptr): Moved here from decl2.c.
6496         (do_pushlevel): Moved here from pt.c.
6497         (do_poplevel): Likewise.
6498         (begin_stmt_expr): Use building_stmt_tree.
6499         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
6500         when building_stmt_tree.
6501         (begin_stmt_tree): New function.
6502         (finish_stmt_tree): Likewise.
6503         (expand_stmt): Likewise.
6504         (expand_body): Likewise.
6505         * tree.c (build_cplus_method_type): Make sure the argument types
6506         end up on the same obstack as the METHOD_TYPE.
6507         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
6508         THROW_EXPR, STMT_EXPR.
6509         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
6510         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
6511         sorry, if an unsupported node is encountered.
6512         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
6513         (c_expand_return): Don't call add_tree here.
6514         
6515 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
6516
6517         * pt.c (check_default_tmpl_args): Don't check in local scopes.
6518         (tsubst_decl): Make sure the declaration is on a saveable
6519         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
6520         variable.
6521         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
6522         
6523 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
6524
6525         Speed up Koenig lookup.
6526         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
6527         to return namespaces we've looked at.
6528         * decl2.c (lookup_using_namespace): Likewise.
6529         (add_function): Don't call ovl_member.
6530         (lookup_arg_dependent): Initialize k.namespaces to the list of 
6531         namespaces seen in unqualified lookup.
6532         * call.c (equal_functions): Move here from tree.c.
6533         (joust): Use it to handle duplicate candidates.
6534         * tree.c (ovl_member): Use ==.
6535
6536 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
6537
6538         * cp-tree.def (DECL_STMT): Make it smaller.
6539         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
6540         (lang_decl): ... here.  Add next.
6541         (DECL_SAVED_TREE): Adjust accordingly.
6542         (DECL_IMPLICIT_TYPEDEF_P): New macro.
6543         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
6544         (DECL_STMT_DECL): Likewise.
6545         (create_implicit_typedef): New function.
6546         (maybe_push_decl): Likewise.
6547         (tsubst_default_argument): New function.
6548         (at_function_scope_p): Likewise.
6549         (add_decl_stmt): Likewise.
6550         (push_permanent_obstack): Likewise.
6551         * call.c (convert_default_arg): Use tsubst_default_argument.
6552         * class.c (add_method): Use push_permanent_obstack.
6553         (build_self_reference): Create a TEMPLATE_DECL for the
6554         self-reference, if necessary.
6555         * decl.c (pseudo_global_level_p): Only look at the current binding
6556         level.
6557         (push_binding): Use push_permanent_obstack.
6558         (create_implicit_typedef): New function.
6559         (pushtag): Use it.
6560         (duplicate_decls): Use push_permanent_obstack.
6561         (maybe_push_decl): New function.
6562         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
6563         (start_decl_1): Remove dead code.
6564         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
6565         pseudo_global_level_p.
6566         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
6567         template.
6568         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
6569         pseudo_global_level_p.
6570         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
6571         a template.
6572         (get_sentry): Use push_permanent_obstack.
6573         * dump.c (dequeue_and_dump): Enable DECL_STMT.
6574         * except.c (call_eh_info): Use push_permanent_obstack.
6575         (build_eh_type_ref): Likewise.
6576         (do_pop_exception): Likewise.
6577         (expand_eh_spec): Likewise.
6578         (alloc_eh_object): Likewise.
6579         (expand_throw): Likewise.
6580         * init.c (build_java_class_ref): Likewise.
6581         * lex.c (get_time_identifier): Likewise.
6582         (free_lang_decl_chain): Correct type.
6583         (retrofit_lang_decl): Adjust accordingly.
6584         (build_lang_field_decl): Likewise.
6585         * lex.h (free_lang_decl_chain): Likewise.
6586         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
6587         * parse.c: Regenerated.
6588         * pt.c (tsubst_default_arguments): New function.
6589         (retrieve_local_specialization): Likewise.
6590         (register_local_specialization): Likewise.
6591         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
6592         pseudo_global_level_p to determine whether or not a template is
6593         primary.
6594         (lookup_template_class): Likewise.  Use create_implicit_typedef.
6595         (instantiate_class_template): Call tsubst_default_arguments for
6596         member functions, if appropriate.
6597         (tsubst_default_argument): New function.
6598         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
6599         * search.c (at_function_scope_p): New function.
6600         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
6601         (finish_label_stmt): Likewise.
6602         (add_decl_stmt): New function.
6603         (begin_class_definition): Likewise.
6604         (finish_typeof): Likewise.
6605         * tree.c (copy_template_template_parm): Likewise.
6606         (copy_to_permanent): Likewise.
6607         (push_permanent_obstack): Define.
6608         (mark_addressable): Use it.
6609         * typeck.c (mark_addressable): Likewise.
6610         
6611 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
6612
6613         * cp-tree.h (init_cplus_unsave): New.
6614         (cplus_unsave_expr_now): New.
6615         * lex.c (init_parse): Call init_cplus_unsave.
6616         * tree.c (init_cplus_unsave): New.
6617         (cplus_unsave_expr_now): New.
6618
6619 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
6620
6621         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
6622         decl_constant_value to simplify array bounds.
6623
6624 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
6625
6626         * lang-options.h: Add -fms-extensions.
6627         * cp-tree.h: Declare flag_ms_extensions.
6628         * decl2.c: Define it.
6629         * class.c (instantiate_type): Don't complain about taking the address
6630         of a bound member function if -fms-extensions.
6631         * typeck.c (build_unary_op): Likewise.
6632         * decl.c (grokdeclarator): Or about implicit int.
6633         * init.c (resolve_offset_ref): Or about implicit '&'.
6634
6635 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
6636
6637         * cp-tree.h (minimal_parse_mode): Remove.
6638         (finish_label_stmt): New function.
6639         * decl.c (saved_scope): Remove minimal parse mode.
6640         (maybe_push_to_top_level): Don't save it.
6641         (pop_from_top_level): Don't restore it.
6642         (define_label): Split out template-handling code to semantics.c.
6643         (start_decl): Don't use minimal_parse_mode.
6644         (cp_finish_decl): Likewise.
6645         (start_function): Don't increment it.
6646         (store_return_init): Don't use it.
6647         (finish_function): Don't decrement it.
6648         * parse.y (label_colon): Use finish_label_stmt throughout.
6649         * parse.c: Regenerated.
6650         * pt.c (minimal_parse_mode): Don't define it.
6651         (tsubst_expr): Use finish_label_stmt.
6652         * semantics.c (finish_label_stmt): New function.
6653
6654         * dump.c (queue): Be careful when computing bitmasks.
6655         (dequeue_and_dump): Describe binfos as binfos, not as
6656         vectors.
6657         
6658         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
6659         throughout.     
6660         * parse.c: Regenerated.
6661         
6662         * Make-lang.in (CXX_SRCS): Remove sig.c.
6663         * Makefile.in (CXX_OBJS): Remove sig.o.
6664         (sig.o): Remove.
6665         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
6666         (CPTI_SIGNATURE_TYPE): Likewise.
6667         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
6668         (opaque_type_node): Likewise.
6669         (signature_type_node): Likewise.
6670         (sigtable_entry_type): Likewise.
6671         (flag_handle_signatures): Likewise.
6672         (lang_type): Remove is_signature, is_signature_pointer,
6673         is_signature_reference, has_opaque_typedecls,
6674         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
6675         signature_pointer_to, signature_reference_to.
6676         (IS_SIGNATURE): Remove.
6677         (SET_SIGNATURE): Remove.
6678         (CLEAR_SIGNATURE): Remove.
6679         (IS_SIGNATURE_POINTER): Remove.
6680         (IS_SIGNATURE_REFERENCE): Remove.
6681         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
6682         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
6683         (CLASSTYPE_SIGNATURE): Remove.
6684         (SIGNATURE_TYPE): Remove.
6685         (SIGNATURE_METHOD_VEC): Remove.
6686         (SIGNATURE_POINTER_TO): Remove.
6687         (SIGNATURE_REFERENCE_TO): Remove.
6688         (lang_decl_flags): Remove is_default_implementation.  Rename
6689         memfunc_pointer_to to saved_tree.
6690         (IS_DEFAULT_IMPLEMENTATION): Remove.
6691         (DECL_MEMFUNC_POINTER_TO): Remove.
6692         (DECL_MEMFUNC_POINTING_TO): Remove.
6693         (DECL_SAVED_TREE): Adjust definition.
6694         (tag_types): Remove signature_type_node.
6695         (SIGNATURE_FIELD_NAME): Remove.
6696         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
6697         (SIGNATURE_OPTR_NAME): Likewise.
6698         (SIGNATURE_SPTR_NAME): Likewise.
6699         (SIGNATURE_POINTER_NAME): Likewise.
6700         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
6701         (SIGNATURE_REFERENCE_NAME): Likewise.
6702         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
6703         (SIGTABLE_PTR_TYPE): Likewise.
6704         (SIGTABLE_NAME_FORMAT): Likewise.
6705         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
6706         (SIGTABLE_TAG_NAME): Likewise.
6707         (SIGTABLE_VB_OFF_NAME): Likewise.
6708         (SIGTABLE_VT_OFF_NAME): Likewise.
6709         (finish_base_specifiers): Change prototype.
6710         (build_signature_pointer_type): Remove.
6711         (build_signature_reference_type): Remove.
6712         (build_signature_pointer_constructor): Remove.
6713         (build_signature_method_call): Remove.
6714         (build_optr_ref): Likewise.
6715         (append_signature_fields): Likewise.
6716         (signature_error): Likewise.
6717         * call.c (build_this): Remove signature support.
6718         (build_over_call): Likewise.
6719         (build_new_method_call): Likewise.
6720         * class.c (add_implicitly_declared_members): Likewise.
6721         (finish_struct_1): Likewise.
6722         (finish_struct): Likewise.
6723         * cvt.c (cp_convert_to_pointer): Likewise.
6724         (convert_to_pointer_force): Likewise.
6725         (ocp_convert): Likewise.
6726         * decl.c (sigtable_decl_p): Remove.
6727         (init_decl_processing): Remove support for signatures.
6728         (cp_finish_decl): Likewise.
6729         (grokdeclarator): Likewise.
6730         (grokparms): Likewise.
6731         (xref_tag): Likewise.
6732         (start_function): Likewise.
6733         (start_method): Likewise.
6734         * decl2.c (finish_sigtable_vardecl): Remove.
6735         (flag_handle_signatures): Remove.
6736         (lang_f_options): Remove handle-signatures.
6737         (grokfield): Remove support for signatures.
6738         (grokbitfield): Likewise.
6739         (finish_file): Likewise.
6740         (reparse_absdcl_as_casts): Likewise.
6741         * error.c (dump_type_real): Likewise.
6742         (dump_function_decl): Likewise.
6743         * friend.c (make_friend_class): Likewise.
6744         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
6745         * hash.h: Regenerated.
6746         * init.c (build_new_1): Remove support for signatures.
6747         * lang-options.h: Remove -fhandle-signatures,
6748         -fno-handle-signatures. 
6749         * lex.c (init_parse): Remove support for signatures.
6750         (yyprint): Likewise.
6751         * lex.h (rid): Remove RID_SIGNATURE.
6752         * method.c (build_decl_overload_real): Remove support for
6753         signatures. 
6754         (hack_identifier): Likewise.
6755         * parse.y (base_class): Likewise.
6756         (base_class.1): Likewise.
6757         (access_specifier): Likewise.
6758         * search.c (lookup_member): Likewise.
6759         * semantics.c (finish_qualified_object_call_expr): Likewise.
6760         (finish_template_type_parm): Likewise.
6761         (begin_class_definition): Likewise.
6762         (finish_base_specifier): Likewise.
6763         * sig.c: Remove.
6764         * tree.c (build_cplus_method_type): Remove support for signatures.
6765         * typeck.c (require_complete_type): Likewise.
6766         (c_sizeof): Likewise.
6767         (c_alignof): Likewise.
6768         (build_object_ref): Likewise.
6769         (build_component_ref): Likewise.
6770         (build_indirect_ref): Likewise.
6771         (build_c_cast): Likewise.
6772         (build_modify_expr): Likewise.
6773         (convert_for_initialization): Likewise.
6774         * typeck2.c (signature_error): Remove.
6775         (store_init_value): Remove support for signatures.
6776         (digest_init): Likewise.
6777         (build_x_arrow): Likewise.
6778         (build_functional_cast): Likewise.
6779         * xref.c (GNU_xref_decl): Likewise.
6780         
6781 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
6782
6783         * lex.c (do_identifier): Remove unnecessary lookup of class field.
6784
6785 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
6786
6787         * decl2.c (set_decl_namespace): Do not complain about non-matching
6788         decls if processing a template.
6789
6790 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
6791
6792         * decl.c (build_ptrmemfunc_type): Handle qualified
6793         pointer-to-member types here.
6794         * tree.c (cp_build_qualified_type_real): Simplify handling here.
6795
6796 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6797
6798         * lex.c (lang_identify): Likewise.
6799
6800 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
6801
6802         * Makefile.in: Update dependencies.
6803         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
6804         NULL_RTX.
6805         * decl.c: Include "function.h"
6806         (cleanup_label, return_label): Delete declarations.
6807         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
6808         (finish_function): Rename last_parm_insn variable to
6809         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
6810         * decl2.c: Include "function.h".
6811         (rtl_expr_chain): Delete declaration.
6812         * method.c: Include "function.h"
6813         * tree.c (build_vbase_pointer_fields): Don't initialize
6814         DECL_SAVED_INSNS with NULL_RTX.
6815         * typeck.c: Include "function.h"
6816
6817 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
6818
6819         * semantics.c (begin_function_try_block, finish_function_try_block,
6820         finish_function_handler_sequence): New fns.
6821         * parse.y (function_try_block): Use them.
6822         * pt.c (instantiate_decl): Likewise.
6823
6824         * cp-tree.h: Declare in_function_try_handler.
6825         * decl.c: Define it.
6826         (start_function): Clear it.
6827         (struct cp_function, push_cp_function_context): Save it.
6828         (pop_cp_function_context): Restore it.
6829         * parse.y (function_try_block): Set and clear it.
6830         * except.c (expand_end_catch_block): Rethrow if we reach the end
6831         of a function-try-block handler in a ctor or dtor.
6832         * typeck.c (c_expand_return): Complain about returning from a
6833         function-try-block handler of a ctor.
6834
6835         * parse.y (function_try_block): Call end_protect_partials
6836         before expand_start_all_catch.
6837
6838 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
6839
6840         * decl.c (struct binding_level): Add eh_region field.
6841         (push_binding_level): Set it.
6842         (define_label): Complain about jumping into an EH block.
6843
6844         * ptree.c (print_lang_type): Print the real type of a PMF.
6845         Print what exceptions a fn type throws.
6846
6847 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6848
6849         * class.c (count_fields, add_fields_to_vec): Add static prototype.
6850
6851         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
6852         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
6853         char*.
6854
6855         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
6856         Constify a char*.
6857
6858         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
6859         char*.
6860
6861         * dump.c (queue_and_dump_index, dump_int, dump_string,
6862         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
6863         a char*.
6864         (dump_stmt): Add static prototype.
6865
6866         * errfn.c (cp_thing): Constify a char*.
6867
6868         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
6869         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
6870         dump_expr): Constify a char*.
6871
6872         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
6873         read_line_number): Add static prototype.
6874         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
6875         (real_yylex): Move label `letter' into the scope where it is used.
6876
6877         * method.c (build_mangled_template_parm_index, build_overload_int,
6878         build_decl_overload_real, get_id_2): Constify a char*.
6879
6880         * search.c (check_final_overrider): Make static.
6881
6882         * typeck.c (composite_pointer_type): Constify a char*.
6883
6884 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
6885
6886         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
6887         we're looking at a class.
6888
6889         * decl.c (lookup_name_real): Set the complain flag if we're
6890         looking for a namespace member.
6891
6892         * lex.c (real_yylex): We can have a number with no digits.
6893
6894         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
6895
6896         * search.c (binfo_from_vbase): New fn.
6897         * cp-tree.h: Declare it.
6898         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
6899         from pointer to member of virtual base.  
6900         * typeck.c (get_delta_difference): Likewise.
6901
6902 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
6903
6904         * pt.c (tsubst): Use build_index_type to build in-template array
6905         index type.  Fixes g++.oliva/dwarf1.C.
6906         * decl.c (grokdeclarator): Likewise, just for consistency, as it
6907         doesn't seem to trigger the bug without it.
6908
6909 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
6910
6911         * typeck2.c (add_exception_specifier): Use complete_type.
6912
6913 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
6914
6915         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
6916         (dump_binary_op): Bulletproof.
6917         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
6918         * tree.c (search_tree): Don't enumerate all the nodes of classes
6919         `1', `2', and `<'; handle them generically.  Don't be sorry about
6920         "unrecognized tree codes"; just abort.
6921         (no_linkage_check): Don't do linkage checks for templates.
6922         
6923         * tree.c (cp_build_qualified_type_real): Handle
6924         pointer-to-member-function types correctly.
6925
6926 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
6927
6928         * decl.c (pushdecl): Only give an error for shadowing a parm 
6929         from *this* function.
6930
6931 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
6932
6933         * typeck2.c: Update URLs and mail addresses.
6934
6935 1999-08-04  Nathan Sidwell  <nathan@acm.org>
6936
6937         * cp-tree.h (empty_except_spec): New global var.
6938         (compexcepttypes): Remove prototype.
6939         (comp_except_specs): Prototype new global function.
6940         (add_exception_specifier): Prototype new global function.
6941         * decl.c (empty_except_spec): Define new global var.
6942         (duplicate_decls): Use comp_except_specs, reword error message.
6943         (init_decl_processing): Initialize empty_except_spec.
6944         Adjust build_exception_variant calls.
6945         * parse.y (exception_specification_opt): Use empty_except_spec.
6946         (ansi_raise_identifier): Call check_for_new_type.
6947         (ansi_raise_identifiers): Use add_exception_specifier.
6948         * pt.c (tsubst): Use add_exception_specifier to build exception
6949         specifier.
6950         * search.c (check_final_overrider): New static function, broken
6951         out of get_matching_virtual. Check throw specifiers, reword
6952         diagnostics.
6953         (get_matching_virtual): Use check_final_overrider.
6954         * tree.c (build_exception_variant): Use comp_except_specs.
6955         * typeck.c (compexcepttypes): Remove.
6956         (comp_except_types): New static function, helper for
6957         comp_except_specs. Compare two types as exception specifiers.
6958         (comp_except_specs): New global function, compare two exception
6959         specifiers.
6960         (comptypes): Adjust for comp_except_specs.
6961         * typeck2.c (add_exception_specifier): New global function.
6962         
6963         * class.c (check_for_override): Reword error message.
6964
6965 1999-08-03  Nathan Sidwell  <nathan@acm.org>
6966
6967         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
6968         * cp-tree.h (struct lang_type): Added non_pod_class flag.
6969         (CLASSTYPE_NON_POD_P): New macro to access it.
6970         * class.c (finish_struct_1): Determine non-PODness.
6971         Check for arrays of pointers (-Weffc++).
6972         Remove array inspection duplicated code.
6973         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
6974         Use CLASSTYPE_NON_POD_P.
6975
6976 1999-08-03  Nathan Sidwell  <nathan@acm.org>
6977
6978         * class.c (duplicate_tag_error): Preserve template information.
6979
6980 1999-08-03  Nathan Sidwell  <nathan@acm.org>
6981
6982         * decl.c (start_enum): Show location of previous definition.
6983         * parse.y (enumlist_opt): New reduction.
6984         (structsp): Simplify enum rules to use enumlist_opt.
6985
6986 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
6987
6988         * lex.c (yyprint): Handle PFUNCNAME.
6989
6990         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
6991         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
6992
6993 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
6994
6995         * decl.c (start_decl): Set attributes before duplicate_decls call.
6996
6997 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
6998
6999         * Make-lang.in (CXX_SRCS): Add dump.c.
7000         * Makefile.in (CXX_OBJS): Add dump.o.
7001         (dump.o): New target.
7002         * cp-tree.h (DECL_CONV_FN_P): Document.
7003         (DECL_OVERLOADED_OPERATOR_P): New function.
7004         (TYPE_PTRMEM_CLASS_TYPE): New macro.
7005         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
7006         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
7007         (ASM_VOLATILE_P): New macro.
7008         (STMT_LINENO): Likewise.
7009         (cp_namespace_decls): New function.
7010         (dump_node_to_file): New function.
7011         * decl.c (cp_namespace_decls): New function.
7012         (walk_namespaces_r): Use it.
7013         (wrapup_globals_for_namespace): Likewise.
7014         * decl2.c (flag_dump_translation_unit): New variable.
7015         (lang_decode_option): Handle -fdump-translation-unit.
7016         (finish_file): If flag_dump_translation_unit is set, dump the
7017         translation unit.
7018         * dump.c: New file.
7019         * lang-options.h: Add -fdump-translation-unit.
7020         * pt.c (tsubst_template_parms): Robustify.
7021         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
7022         (tsubst_expr): Use STMT_LINENO.
7023         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
7024         for invalid cv-qualifiers even while building templates.
7025         
7026 1999-08-02  Richard Henderson  <rth@cygnus.com>
7027
7028         * call.c: Include defaults.h instead of expr.h.
7029         * decl.c: Likewise.
7030         * pt.c: Likewise.
7031         * typeck.c: Include defaults.h.
7032
7033 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
7034
7035         * lex.c (errorcount, sorrycount): Don't declare.
7036         * repo.c (errorcount, sorrycount): Likewise.
7037         * typeck2.c (errorcount, sorrycount): Likewise.
7038
7039 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
7040
7041         * call.c (convert_default_arg, build_over_call): Change all uses of
7042         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
7043         Ensure expr.h is included.
7044         * decl.c (grokparams): Ditto.
7045         * pt.c (tsubst_decl): Ditto.
7046         * typeck.c (convert_arguments): Ditto.
7047
7048 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
7049
7050         * class.c (mark_overriders): Fix order of args to overrides.
7051         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
7052         functions with the same name.
7053
7054 1999-08-02  Richard Henderson  <rth@cygnus.com>
7055
7056         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
7057
7058 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
7059
7060         * call.c (build_conditional_expr): Fix typo in comment.
7061
7062 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
7063
7064         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
7065         case_stack; use in_control_zone_p.
7066         * typeck.c (c_expand_return): Likewise.
7067
7068 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
7069
7070         * except.c (catch_clauses): Delete declaration.
7071
7072 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
7073
7074         * call.c (build_conditional_expr): Call convert_from_reference to
7075         avoid reference/non-reference type confusion.  Fix typo.
7076
7077 1999-07-30  Richard Henderson  <rth@cygnus.com>
7078
7079         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
7080         * cp-tree.h (initializer_constant_valid_p): Remove.
7081
7082 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
7083
7084         * call.c (conditional_conversion): Don't build BASE_CONVs for
7085         conversions between things that have the same type.
7086         (build_conditional_expr): Tweak.
7087         (convert_like): Some BASE_CONVs really do require the generation
7088         of code.
7089         
7090         * init.c (perform_member_init): Don't go through build_modify_expr
7091         for simple initializations.
7092
7093 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
7094
7095         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
7096         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
7097         virtual functions and MI.  Simplify.
7098
7099         * method.c: Remove prototype for largest_union_member.
7100         * pt.c (determine_specialization): Fix uninitialized warning.
7101         * lex.c (real_yylex): Likewise.
7102
7103 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
7104
7105         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
7106         here too.
7107
7108         * cp-tree.h (BINFO_VIRTUALS): Document new format.
7109         * class.c (modify_one_vtable): Change prototype accordingly.
7110         (modify_all_vtables): Likewise.
7111         (modify_all_direct_vtables): Likewise.
7112         (modify_all_indirect_vtables): Likewise.
7113         (build_vtable_entry_for_fn): New function.
7114         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
7115         (modify_vtable_entry): Likewise.
7116         (add_virtual_function): Likewise.
7117         (build_vtbl_initializer): New function.
7118         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
7119         (fixup_vtable_deltas1): Likewise.
7120         (fixup_vtable_deltas): Likewise.
7121         (override_one_vtable): Likewise.
7122         (finish_struct_1): Likewise.
7123
7124         * error.c (dump_expr): Likewise.
7125         * search.c (get_abstract_virtuals_1): Likewise.
7126         (get_abstract_virtuals): Likewise.
7127         (expand_upcast_fixups): Likewise.
7128         * tree.c (debug_binfo): Likewise.
7129         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
7130         __pure_virtual here.
7131         
7132 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
7133
7134         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
7135         as per 1999-07-26 change.
7136
7137         * typeck.c (c_sizeof): Don't allow non-static data members.
7138         (expr_sizeof): Likewise.
7139
7140 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
7141
7142         * input.c (feed_input): Only touch lineno and input_filename
7143         if !USE_CPPLIB.  Save the old values before setting the new ones.
7144
7145         * input.c (feed_input): Add file, line parms.
7146         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
7147         (real_yylex): Check linemode before input_redirected().
7148
7149         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
7150         from op new to warning.
7151
7152 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
7153
7154         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
7155         * call.c: All uses changed.
7156         * typeck.c: Likewise.
7157
7158 1999-07-26  Nathan Sidwell  <nathan@acm.org>
7159
7160         * exception.cc (__cplus_type_matcher): Match __eh_matcher
7161         prototype.
7162
7163 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
7164
7165         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
7166         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
7167         (strip_top_quals): Declare.
7168         (ncp_convert): Likewise.
7169         (type_after_usual_arithmetic_converions): Likewise.
7170         (composite_pointer_type): Likewise.
7171         * call.c (strip_top_quals): Don't make it static.
7172         (promoted_arithmetic_type_p): New function.
7173         (conditional_conversion): Likewise.
7174         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
7175         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
7176         for converting a type to itself.
7177         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
7178         (implicit_conversion): Make sure the from and to types are
7179         complete.
7180         (add_builtin_candidate): Correct handling of ?: operator.
7181         (add_builtin_candidates): Improve documentation.
7182         (build_conditional_expr): New function.
7183         (can_convert): Implement in terms of can_convert_arg.
7184         (ncp_convert): New function.
7185         * typeck.c (type_after_usual_arithmetic_conversions): New
7186         function, split out from common_type.
7187         (composite_pointer_type): New function, split out from
7188         build_conditional_expr.
7189         (common_type): Use type_after_usual_arithmetic_conversions.
7190         Remove redundant attribute merging.
7191         (comptypes): Tidy.  Handle COMPLEX_TYPE.
7192         (build_binary_op_nodefault): Use null_ptr_cst_p.
7193         (build_conditional_expr): Remove.
7194         (convert_for_assignment): Use new conversion functions.
7195         
7196         * cp-tree.h (abstract_virtuals_error): Change declaration.
7197         * typeck2.c (abstract_virtuals_error): Check to see if an error
7198         ocurred, and return a boolean value accordingly.
7199         (build_functional_cast): Adjust accordingly.
7200         * class.c (finish_struct_1): Likewise.
7201         * cvt.c (ocp_convert): Likewise.
7202         * decl.c (cp_finish_decl): Likewise.
7203         (grokparams): Likewise.
7204         (grok_op_properties): Likewise.
7205         (start_function): Likewise.
7206         * init.c (build_new_1): Likewise.
7207
7208         * pt.c (unify): Don't get confused by pointers-to-member functions.
7209
7210         * search.c (build_cplus_new): Robustify.
7211         
7212 1999-07-24  Richard Henderson  <rth@cygnus.com>
7213
7214         * gxx.gperf (__builtin_va_arg): New.
7215         * parse.y (VA_ARG): New token.
7216         (unary_expr): Recognize it.
7217
7218 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
7219
7220         * g++FAQ.texi: Deleted per Joe Buck's request.
7221         * Makefile.in: Corresponding changes.
7222
7223 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
7224
7225         * lex.c: Sync with C frontend.
7226         (whitespace_cr): New fn.
7227         (skip_white_space): Use it.
7228         (init_parse): Reorder.
7229         (yyprint): Support CONSTANT.
7230         (pragma_getc, pragma_ungetc): Bring back.
7231         (read_line_number): Change in_system_header directly.
7232         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
7233         (parse_float): Update to C version.
7234         (yylex): Handle '$' under the letter case.
7235         Remove looking_for_typename handling.
7236         Support hex floating point constants.
7237         Follow C's lead for choosing type of integer constants.
7238         Rearrange stuff to match C frontend.
7239         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
7240         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
7241
7242 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
7243
7244         * call.c (reference_binding): Tweak.
7245         (mayble_handle_implicit_object): Use direct_reference_binding to
7246         create the right implicit conversion sequence.
7247
7248 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
7249
7250         * pt.c (convert_nontype_argument): Don't call decl_constant_value
7251         if we're converting to a reference type.
7252
7253         * call.c (NEED_TEMPORARY_P): New macro.
7254         (standard_conversion): Set it, for derived-to-base conversions.
7255         (reference_related_p): New function.
7256         (reference_compatible_p): Likewise.
7257         (convert_class_to_reference): Likewise.
7258         (direct_reference_binding): Likewise.
7259         (reference_binding): Rework for standards-compliance.
7260         (convert_like): Adjust accordingly.
7261         (maybe_handle_ref_bind): Simplify; the right conversion sequences
7262         are now built up in reference_binding.
7263         (initialize_reference): New function.
7264         * cp-tree.h (ICS_USER_FLAG): Document.
7265         (ICS_THIS_FLAG): Likewise.
7266         (ICS_BAD_FLAG): Likewise.
7267         (NEED_TEMPORARY_P): Likewise.
7268         (cp_lvalue_kind): New type.
7269         (real_lvalue_p): Return it.
7270         * error.c (dump_expr): Provide more accurate representation for
7271         AGGR_INIT_EXPRs.
7272         * init.c (expand_default_init): Do not try to perform implicit
7273         conversions for a brace-enclosed initializer.
7274         * search.c (lookup_conversions): Document.
7275         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
7276         appropriately.
7277         (real_lvalue_p): Adjust accordingly.
7278         (lvalue_p): Likewise.
7279         (build_cplus_new): Don't allow the creation of an abstract class.
7280         * typeck.c (convert_for_initialization): Use initialize_reference.
7281         
7282 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
7283
7284         * lex.c (real_yylex) : Correct the test for overflow when lexing
7285         integer literals.
7286
7287 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
7288
7289         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
7290         not DECL_BUILT_IN, to determine if a function is internally declared.
7291         (duplicate_decls): Likewise.  Improve handling of builtins.
7292         (push_overloaded_decl): Remove special handling of builtins.
7293
7294         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
7295
7296         * decl.c (grokdeclarator): Pull out decl_constant_value in
7297         templates, too.
7298
7299         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
7300         * cp-tree.h, pt.c, semantics.c: Adjust.
7301         * method.c (largest_union_member): Remove.
7302
7303         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
7304
7305         * lex.c (token_getch, token_put_back): New fns.
7306         (real_yylex): Use them.
7307
7308         * lex.c (lang_init): Generalize.
7309         (lang_init_options): Tell cpplib this is C++.
7310         (nextchar): Remove.  Replace uses with put_back.
7311         (skip_white_space): Handle linemode here.  Optimize for cpplib.
7312         (extend_token_buffer_to): New fn.
7313         (extend_token_buffer): Use it.
7314         (read_line_number, check_newline): Just deal with tokens.
7315         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
7316         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
7317         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
7318         * parse.y (PAREN_STAR_PAREN): Remove.
7319         * input.c: Don't use the putback machinery with cpplib.
7320         (sub_getch): Fold back into getch.
7321         (getch): Don't handle linemode here.
7322         (feed_input): Unget any text in the token buffer.
7323
7324         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
7325         nextyychar, nextyylval): Remove.
7326
7327 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
7328             Jason Merrill  <jason@yorick.cygnus.com>
7329
7330         * lex.c (indent_level): New variable.
7331         (init_parse): Set cpp_token to CPP_DIRECTIVE.
7332         (consume_string): Make this smart about USE_CPPLIB.
7333         (yyungetc): Use put_back function.
7334         (pragma_getc, pragma_ungetc): Functions deleted.
7335         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
7336         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
7337         pragma_ungetc.
7338         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
7339         Also, clean up cases where we redundantly set token_buffer[0].
7340         (read_line_number): New fn.
7341         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
7342         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
7343         (sub_getch): Conditionalize out code that's not appropriate if
7344         USE_CPPLIB.
7345         (put_back): Rewrite in case USE_CPPLIB is defined.
7346         (input_redirected): Ditto.
7347
7348 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
7349
7350         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
7351         c_global_trees and accessor macros defined in c-common.h.
7352         (cp_tree_index): New enumeration.
7353         (cp_global_trees): Declare new array.  Add accessor macros for it, and
7354         delete declarations of tree nodes replaced by it.
7355         (builtin_function): Delete macro, add declaration for new function.
7356         Include c-common.h.
7357         * decl.c: Delete definitions for tree nodes that were replaced by
7358         cp_global_trees and c_global_trees.
7359         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
7360         to generate the common builtins here.
7361         (builtin_function): New function.
7362         * decl2.c (abort_fndecl): Delete declaration.
7363         * except.c (expand_builtin_return_address): Delete declaration.
7364         (builtin_return_address_fndecl): Delete variable.
7365         (const_ptr_type_node): Delete declaration.
7366         * lex.c (cons_up_default_function): Delete declaration of
7367         void_list_node.
7368         * parse.y (void_list_node): Delete declaration.
7369         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
7370         Delete variables.
7371         (const_string_type_node): Delete declaration.
7372         * search.c (abort_fndecl): Delete declaration.
7373         * Makefile.in: Update dependencies.
7374
7375 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
7376
7377         * pt.c (check_default_tmpl_args): Move test for missing default
7378         arguments here, from ...
7379         (end_template_parm_list): Here.
7380
7381 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
7382
7383         * decl.c (lookup_nested_type): Remove.
7384         (pushtag): Don't call it.
7385
7386 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
7387
7388         * Makefile.in (INTERFACE): Bump to 2.
7389
7390 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
7391         
7392         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
7393         instructions to gcc.gnu.org.  Removed e-mail address.
7394
7395 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
7396
7397         * pt.c (determine_specialization): Tighten error-checking.
7398         (end_template_parm_list): Likewise.
7399
7400 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
7401
7402         * pt.c (check_default_tmpl_args): Handle friends defined in the
7403         class just like member functions defined in the class.
7404
7405 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
7406             Jason Merrill  <jason@yorick.cygnus.com>
7407
7408         * cp-tree.h (struct lang_decl): Added field for storing sorted
7409         FIELD_DECLs (used in TYPE_DECLs).
7410         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
7411         (DECL_SORTED_FIELDS): New macro.
7412         * class.c (method_name_cmp): New function.
7413         (finish_struct_methods): Modified to support sorting and searching
7414         methods.
7415         (finish_struct_anon): Changed code in inner loop to use ELT rather 
7416         than UELT (which required an extra indirection for every reference).
7417         (field_decl_cmp): New function to support sorting FIELD_DECLs.
7418         (finish_struct_1): Sort fields.
7419         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
7420         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
7421         Also, switch to using array indexing rather than a changing pointer.
7422         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
7423         DECL_SORTED_FIELDS.
7424
7425 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
7426
7427         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
7428         casts in system headers or extern "C" blocks.
7429
7430         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
7431         errors to pedwarn.
7432
7433 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
7434
7435         * decl2.c (write_virtuals): Deleted declaration.
7436         * cp-tree.h (write_virtuals): Deleted extern declaration.
7437         * class.c (finish_struct_1): Removed #if 0'd code that mentions
7438         write_virtuals.
7439         * semantics.c (begin_class_definition): Rewrite code to not depend
7440         on write_virtuals.
7441
7442         * lex.c (cp_pragma_interface): New function.
7443         (cp_pragma_implementation): Likewise.
7444         (handle_cp_pragma): Call them.
7445
7446         * typeck.c (comptypes): Simplify C code in look_hard.
7447
7448         * xref.c (PALLOC): Use xcalloc, not calloc.
7449         (SALLOC): Use xmalloc, not malloc.
7450
7451         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
7452
7453         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
7454         is NO_DEBUG.
7455
7456         * decl.c (duplicate_decls): If a redeclaration doesn't match the
7457         initial declaration, then don't save the inline info and by all
7458         means don't mark the function as a builtin function.
7459
7460         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
7461         CURRENT_CLASS_TYPE is 0.
7462
7463         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
7464         NULL_TREE.
7465
7466         * ptree.c (print_lang_type): Added vtable-needs-writing.
7467
7468 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
7469
7470         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
7471
7472 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
7473
7474         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
7475         Merged into c-common.
7476
7477 1999-07-05  Dave Brolley  <brolley@cygnus.com>
7478
7479         * lex.c (errorcount): Declare it.
7480         (finish_parse): Update errorcount for when using CPPLIB.
7481
7482 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
7483
7484         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
7485         parameters.
7486         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
7487         * decl.c (push_class_binding): Use it.
7488         (lookup_name_real): Likewise.
7489
7490 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
7491
7492         * cp-tree.h (widest_integer_literal_type_node,
7493         widest_unsigned_literal_type) : New.
7494         * decl.c (widest_integer_literal_type_node,
7495         widest_unsigned_literal_type) : New.
7496         (init_decl_processing): Handle/use the two new types.
7497         * lex.c (real_yylex): Same.
7498         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
7499         Same. 
7500
7501 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
7502
7503         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
7504         to anonymous cv-qualified types.
7505
7506 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
7507
7508         * lex.c (real_yylex) : Change integer literal overflow handling to
7509         be like c-lex.c.
7510
7511         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
7512
7513 1999-06-28  Richard Henderson  <rth@cygnus.com>
7514
7515         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
7516
7517 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
7518
7519         * error.c (dump_type_real): Handle TREE_LIST again.
7520
7521         * typeck.c (comp_target_parms): Don't complain about 
7522         converting from () to (...) if !flag_strict_prototype.
7523
7524         * decl.c (grokdeclarator): Update the names of all variants when
7525         de-anonymizing.
7526
7527 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
7528
7529         * init.c (expand_aggr_vbase_init): Rename to
7530         construct_virtual_bases.  Conditionalize construction here, 
7531         rather than ...
7532         (emit_base_init): Here.
7533
7534 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
7535
7536         * semantics.c (finish_asm_stmt): Apply decay conversions to
7537         input operands.
7538
7539         * decl.c (expand_static_init): When building an anonymous function
7540         for use with atexit, compute its body before and after entering
7541         the function.
7542
7543         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
7544         EXIT_EXPR.
7545         
7546 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
7547
7548         * init.c (expand_aggr_vbase_init): Add flag parameter.
7549         (build_partial_cleanup_for): Remove, inlining into ..
7550         (expand_cleanup_for_base): ... here.  Take flag parameter.
7551         (emit_base_init): Pass the in_chrg parameter to
7552         emit_aggr_vbase_init. 
7553         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
7554         
7555 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
7556
7557         * decl2.c (import_export_decl): Use same_type_p, rather than
7558         relying on pointer-equality for types.
7559
7560         * method.c (do_build_copy_constructor): Simplify.
7561
7562         * call.c (build_method_call): Remove bogus code for two-argument
7563         delete.
7564         * init.c (build_new_1): Expand on comment, and remove dead code.
7565
7566         * init.c (expand_cleanup_for_base): New function, split out
7567         from ...
7568         (emit_base_init): Here.
7569         (expand_aggr_vbase_init): Use it.
7570
7571 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
7572
7573         * cp-tree.h (class_cache_firstobj): Declare.
7574         (maybe_push_cache_obstack): Rename to push_cache_obstack.
7575         * class.c (permanent_obstack): Remove declaration.
7576         (class_cache_firstobj): Make it global.
7577         (add_method): Don't use permanent_obstack directly.
7578         (pushclass): Only free the class_cache_obstack if we know how far
7579         back to free it.
7580         (maybe_push_cache_obstack): Rename to push_cache_obstack.
7581         * decl.c: Remove dead comment.
7582         (saved_scope): Add class_cache_firstobj.
7583         (push_to_top_level): Save it.
7584         (pop_from_top_level): Restore it.
7585         (push_class_level_binding): Use push_cache_obstack, not
7586         maybe_push_cache_obstack.
7587         * search.c (push_class_decls): Likewise.
7588         
7589 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7590
7591         * pt.c (tsubst_friend_function): Push into namespace of friend
7592         function before pushdecl'ing it.
7593
7594 1999-06-14  Nathan Sidwell  <nathan@acm.org>
7595
7596         * call.c (build_new_op): Remove REF_BIND from all operands.
7597
7598 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
7599
7600         * init.c (build_new_1): Look up operator delete even if there was
7601         no explicit new placement.
7602
7603 1999-06-08  Nathan Sidwell  <nathan@acm.org>
7604
7605         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
7606         of ...
7607         (build_throw): ... here. Call it.
7608         (process_start_catch_block): Call it.
7609
7610 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
7611
7612         * search.c (convert_pointer_to_single_level): Reimplement without
7613         using get_binfo.
7614
7615 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
7616
7617         * method.c (is_back_referenceable_type): Back-reference bools when
7618         not squangling.
7619
7620 1999-06-07  Dave Brolley  <brolley@cygnus.com>
7621
7622         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
7623         * input.c (putback_buffer): New structure type.
7624         (putback): Replaces putback_char member.
7625         (putback): Replaces putback_char static variable.
7626         (feed_input): Use putback.
7627         (end_input): Use putback.
7628         (sub_getch): Use putback.
7629         (put_back): Use putback.
7630
7631 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
7632
7633         * decl.c (grokdeclarator): Fix typo in last change.
7634
7635 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
7636
7637         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
7638         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
7639
7640 1999-06-04  Nathan Sidwell  <nathan@acm.org>
7641
7642         * except.c (build_throw): Check throw expression validity.
7643
7644 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
7645
7646         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
7647         just because flag_signed_bitfields is false.
7648
7649 1999-06-03  Nathan Sidwell  <nathan@acm.org>
7650
7651         * semantics.c (begin_class_definition): Update the struct's
7652         location here ...
7653         * class.c (finish_struct): ... rather than here.
7654
7655         * decl.c (make_typename_type): Don't rely on uninitialized
7656         variable.
7657
7658 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7659
7660         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
7661
7662 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
7663
7664         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
7665         and friends rather than messing with current_obstack directly.
7666         (cp_build_qualified_type_real): Rework ARRAY_TYPE
7667         allocation to match practice throughout the rest of the 
7668         compiler.
7669
7670 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
7671
7672         * lex.c (make_lang_type): Create TYPE_BINFO for
7673         TEMPLATE_TYPE_PARMs just like for non-template types.
7674
7675         * decl.c (start_decl): Move checks on initialization to ...
7676         (cp_finish_decl): Here.  Tidy formatting slightly.
7677
7678 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
7679
7680         * decl.c (add_binding): Don't complain about a redeclaration of a
7681         semantically identical typedef in a local scope.
7682
7683 1999-05-28  Nathan Sidwell  <nathan@acm.org>
7684
7685         * decl.c (complete_array_type): Allocate off same obstack. Fix
7686         DO_DEFAULT comment to match reality.
7687
7688         * friend.c (make_friend_class): Fix diagnostic typo.
7689
7690 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
7691
7692         * decl.c (lookup_namespace_name): Handle getting a
7693         TEMPLATE_ID_EXPR.
7694         (expand_static_init): Don't call pushdecl for implicitly declared
7695         `atexit' used to register destructors.
7696
7697 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
7698
7699         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
7700         intialize a vtable.
7701
7702         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
7703         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
7704         by combining TEMPLATE_INFO and LEVEL into a single union.
7705         (DECL_TEMPLATE_INFO): Reformat.
7706         (DECL_SAVED_TREE): Document.
7707         (DECL_TEMPLATE_INJECT): Remove.
7708         * class.c (finish_struct): Remove code to deal with
7709         DECL_TEMPLATE_INJECT. 
7710
7711         * decl.c (maybe_process_template_type_declaration): Handle all new
7712         types in templates uniformly.
7713         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
7714         DECL_CONTEXT.
7715         * pt.c (lookup_template_class): Inject template instantiations of
7716         forward-declarations.
7717         (instantiate_class_template): Remove code processing
7718         DECL_TEMPLATE_INJECT.
7719         
7720         * pt.c (lookup_template_class): Tweak lookup to find member
7721         templates.
7722
7723         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
7724         ASM_CV_QUAL.
7725         * semantics.c (finish_asm_stmt): Make strings permanent if they're
7726         used in a template.
7727         
7728 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
7729
7730         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
7731         parts of pointer to data member types.
7732
7733 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
7734
7735         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
7736         and then make it look like `abort'.  Just use `abort' instead.
7737         
7738         * typeck.c (build_static_cast): Don't allow static_casts that cast
7739         away constness.
7740         (casts_away_constness_r): New function.
7741         (casts_away_constness): Likewise.
7742
7743         * decl.c (lookup_tag): Remove code no longer needed after
7744         name-lookup improvements.
7745         * decl2.c (handle_class_head): Make error-recovery more robust.
7746         * friend.c (make_friend_class): Reject templated typename types.
7747         * lex.c (is_global): A template parameter isn't global.
7748         * parse.y (class_head): Robustify.
7749         * parse.c: Regenerated.
7750         
7751 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
7752
7753         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
7754         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
7755         
7756         * cp-tree.h (push_nested_namespace): Declare.
7757         (pop_nested_namespace): Likewise.
7758         * decl.c (push_nested_namespace): New function.
7759         (pop_nested_namespace): Likewise.
7760         * pt.c (instantiate_class_template): Use them.
7761
7762         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
7763
7764         * cp-tree.h (cplus_expand_constant): Declare.
7765         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
7766         converted from one pointer-to-object type to another.
7767         * expr.c (cplus_expand_constant): Don't make it static.
7768         * typeck.c (build_component_ref): Don't crash when presented with
7769         a component which is a TEMPLATE_DECL.
7770         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
7771         cast from a pointer-to-member constant to its own type does not
7772         result in a valid non-type template argument.
7773
7774 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
7775             Nathan Sidwell  <nathan@acm.org>
7776         
7777         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
7778         * cp-tree.h: Fix typo in documentation on pointers-to-members.
7779         (cp_build_qualified_type): Make it a macro.
7780         (cp_build_qualified_type_real): Declare.
7781         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
7782         problem with template parameters and restrict-qualification.
7783         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
7784         * hash.h: Regenerated.
7785         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
7786         the enumeration.
7787         (NORID): Remove definition.
7788         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
7789         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
7790         (fn_type_unification): Check that the function type resulting from
7791         the deduction is legal.
7792         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
7793         (unify): Use cp_build_qualified_type_real.
7794         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
7795         (cp_build_qualified_type): Rename to ...
7796         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
7797         and modify appropriately.
7798         
7799         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
7800         reveal optimization opportunities.
7801
7802         * pt.c (tsubst): Don't issue error messages when we're not
7803         complaining, even if we see a qualified function type.
7804         (check_cv_quals_for_unify): Don't allow a qualified function
7805         type.
7806
7807 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
7808
7809         * class.c (instantiate_type): Downgrade errors for object-dependent
7810         memfn refs to pedwarn.
7811
7812 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
7813
7814         * decl.c (grokdeclarator): Don't treat [] as indicating a
7815         zero-sized array in a typedef.
7816
7817         * call.c (build_object_call): Don't look at DECL_NAME for a type.
7818         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
7819         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
7820
7821         * pt.c (for_each_template_parm): Rework to match documentation.
7822         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
7823
7824 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
7825
7826         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
7827
7828         * class.c (finish_base_struct): Allow non-COM bases for COM classes
7829         except at the leftmost position.
7830         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
7831         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
7832         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
7833
7834         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
7835         (build_cplus_new): Make sure that what we return is of the right type.
7836
7837 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
7838
7839         * cp-tree.h (make_ptrmem_cst): New function.
7840         * expr.c (cplus_expand_constant): Split out from ...
7841         (cplus_expand_expr): Here.  Use cplus_expand_constant.
7842         (init_cplus_expand): Set lang_expand_constant.
7843         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
7844
7845         * tree.c (make_ptrmem_cst): Define.
7846         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
7847         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
7848
7849 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
7850
7851         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
7852
7853         * decl2.c (start_static_storage_duration_function): Fix comment.
7854         (finish_file): Create static storage duration functions lazily.
7855
7856 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
7857
7858         Implement anonymous structs.
7859         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
7860         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
7861         * class.c (finish_struct_1): Remove redundant check for anon struct.
7862         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
7863         (check_tag_decl): Check for anonymous struct here.
7864         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
7865         * init.c (sort_member_init, emit_base_init): Handle getting fields
7866         as well as names in current_member_init_list.
7867         (perform_member_init): Handle getting an anon aggr.
7868         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
7869         (do_build_copy_constructor): Likewise.
7870
7871 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
7872
7873         * tree.c (cp_build_qualified_type): Don't allow qualified function
7874         types.
7875
7876 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
7877
7878         * gxxint.texi: Fix typo.
7879
7880 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
7881
7882         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
7883         * class.c (finish_struct_1): Use CLASS_TYPE_P.
7884         * ptree.c (print_lang_type): Likewise.
7885         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
7886         IS_AGGR_TYPE_CODE.
7887         * typeck2.c (digest_init): Likewise.
7888
7889 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
7890
7891         * call.c (joust): Compare the types of the conv ops, not the
7892         target types of the conversions.
7893
7894 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
7895
7896         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
7897         was not given.
7898
7899 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
7900
7901         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
7902         * decl.c (grokfndecl): Don't allow inline declarations of friend
7903         template specializations, or friend template specializations with
7904         default arguments.
7905         * pt.c (tsubst): Handle substitution into array types that does
7906         not yield a fixed upper bound, even when not processing a
7907         template.
7908         (tsubst_copy): Deal with the fact that the second operand to a
7909         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
7910         * search.c (marked_pushdecls_p): Don't descend into
7911         TEMPLATE_TYPE_PARMs and the like.
7912         (unmarked_pushdecls_p): Likewise.
7913         
7914         * call.c (build_over_call): Don't throw away
7915         initializations/copies of empty classes; use MODIFY_EXPR and
7916         INIT_EXPR as for non-empty classes.
7917         * class.c (finish_struct_1): Put the padding byte for an empty
7918         class on the TYPE_NONCOPIED_PARTS list for the class.
7919
7920 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
7921
7922         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
7923         indicate a reference to a field that is a qualified name.
7924
7925 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
7926
7927         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
7928         ASM_OUTPUT_CONSTRUCTOR.
7929
7930         * friend.c (do_friend): Add attrlist arg.  Remove support for
7931         getting a non-decl as 'decl'.
7932         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
7933         rtl.
7934         (grokdeclarator): Adjust.
7935         * cp-tree.h: Adjust.
7936
7937 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
7938
7939         * cp-tree.h (permanent_p): New function.
7940         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
7941         possibly complex tree node.
7942         * tree.c (mapcar): Adjust comments, and follow coding standards in
7943         conditional.
7944         (permanent_p): New function.
7945
7946 1999-05-13  Per Bothner  <bothner@cygnus.com>
7947
7948         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
7949         primitive Java types, if we actually see `extern "Java"'.
7950
7951 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
7952
7953         * lang-specs.h: Pass -$ to the preprocessor.
7954
7955 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
7956
7957         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
7958         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
7959         (resolve_offset_ref): Don't handle a raw baselink.
7960         * cvt.c (build_expr_type_conversion): Likewise.
7961         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
7962         convert_for_initialization): Likewise.
7963         * class.c (instantiate_type): Handle seeing a baselink under an
7964         OFFSET_REF.
7965         * error.c (dump_expr): Likewise.        
7966         * pt.c (for_each_template_parm): Likewise.
7967         (resolve_overloaded_unification): Likewise.
7968         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
7969         * typeck.c (expr_sizeof): Also complain about other permutations
7970         of overloaded functions.
7971
7972 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
7973
7974         * init.c (resolve_offset_ref): Don't return a raw method.
7975         Use BASELINK_P.
7976         * typeck.c (decay_conversion): Don't handle a raw method.
7977         Resolve all OFFSET_REFs.
7978         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
7979         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
7980         same_type_p for pmf bits.  Don't use build_binary_op to compare
7981         raw pointers to methods.
7982         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
7983         to decide when to call resolve_offset_ref.
7984         (build_c_cast, convert_for_initialization): Likewise.
7985         * cvt.c (build_expr_type_conversion): Likewise.
7986
7987 1999-05-06  Nathan Sidwell  <nathan@acm.org>
7988
7989         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
7990
7991 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
7992
7993         * decl2.c (start_objects): Don't let static constructors and
7994         destructors get inlined.
7995
7996         * parse.y (nested_name_specifier): Make sure ordinary types are
7997         complete, just like template types.
7998         * parse.c: Regenerated.
7999
8000         * pt.c (check_explicit_specialization): Improve error messages.
8001
8002 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8003
8004         * typeck.c (string_conv_p): Use same_type_p to check whether we
8005         try to convert between char and wchar_t.
8006
8007 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
8008
8009         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
8010         lookup to error_mark_node here.
8011         (lookup_member): Revise documentation.  Add comments.  Don't set
8012         the TREE_TYPE to error_mark_node here, and don't build up an extra
8013         TREE_LIST for ambiguous lookups.
8014         (setup_class_bindings): Adjust accordingly.
8015         (push_class_decls): Revise out-of-date comments.
8016         
8017         * typeck.c (build_const_cast): Tighten checks for legality.
8018
8019 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8020
8021         * init.c (build_member_call): Lookup names coming from
8022         namespace-scoped LOOKUP_EXPR.
8023
8024 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
8025
8026         * gxxint.texi: Add documentation for 'I'.
8027
8028 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8029
8030         * tinfo.cc (operator==): Qualify type_info with std::.
8031
8032 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
8033
8034         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
8035         (DECL_COMDAT): Remove definition.
8036
8037 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
8038
8039         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
8040         change.
8041
8042 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
8043
8044         * class.c (build_vtable): Use build_lang_decl when building
8045         vtables, not just build_decl.
8046         (prepare_fresh_vtable): Likewise.
8047         * decl.c (wrapup_globals_for_namespace): Mark vtables as
8048         DECL_EXTERNAL when calling wrapup_global_declarations.
8049         * decl2.c (priority_info_s): Add initializations_p and
8050         destructions_p members.
8051         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
8052         when deciding what vtables to write out.
8053         (ssdf_decls): New variable.
8054         (ssdf_decls_used): Likewise.
8055         (start_static_storage_duration_function): Deal with being called
8056         multiple times.  Avoid inlining this function.
8057         (generate_inits_for_priority): Deal with reuse of priority map.
8058         (get_priority_info): Clear initializations_p and destructions_p.
8059         (do_static_initialization): Tweak comment.
8060         (do_static_destruction): Likewise.  Fix condition on sentries for
8061         destruction.
8062         (generate_ctor_or_dtor_function): Call all of the static storage
8063         duration functions.
8064         (generate_ctor_or_dtor_function_for_priority): Check
8065         initializations_p and destructions_p to see what priorities need
8066         initialization functions.
8067         (finish_file): Rework to generate multiple static storage duration
8068         functions, rather than just one.
8069
8070         * typeck.c (build_const_cast): Tweak last change to handle
8071         templates correctly.
8072
8073         * typeck.c (build_const_cast): Disallow use of const_cast to
8074         anything but a pointer or reference type.
8075
8076 1999-04-30  Nathan Sidwell  <nathan@acm.org>
8077
8078         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
8079         signature type.
8080
8081 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
8082
8083         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
8084         (finish_file): Indent comments properly.
8085
8086 1999-04-29  Richard Henderson  <rth@cygnus.com>
8087
8088         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
8089         (do_static_destruction): Likewise.
8090
8091 1999-04-29  Nathan Sidwell  <nathan@acm.org>
8092
8093         * cp-tree.h (TYPE_NOTHROW_P): New macro.
8094         * decl2.c (delete_sanity): Warn on deleting void *.
8095         * init.c (build_new_1): Use TYPE_NOTHROW_P.
8096         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
8097         throwing operator new.
8098
8099 1999-04-28  Nathan Sidwell  <nathan@acm.org>
8100
8101         * cp-tree.h (build_component_addr): Remove prototype.
8102         * typeck.c (build_component_addr): Make static. Remove MSG
8103         argument.
8104         (build_component_addr): Remove MSG parameter, clean up
8105         comment.
8106         (build_x_function_call): Use cp_error.
8107         (build_unary_op): Adjust call of build_component_addr.
8108
8109 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
8110
8111         * pt.c (tsubst_friend_class): Check for NULL.
8112
8113 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
8114
8115         * search.c (binfo_for_vtable): Initialize bfvi.var.
8116
8117 1999-04-27  Nathan Sidwell  <nathan@acm.org>
8118
8119         * rtti.c (build_x_typeid): Check rtti is enabled.
8120
8121 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
8122
8123         * search.c (is_subobject_of_p): Make sure we're looking at the
8124         right baseclasses.
8125
8126 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
8127
8128         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
8129
8130 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
8131
8132         * decl2.c (finish_file): Tweak handling of extern inlines so that
8133         they are not unnecessarily put out.
8134
8135         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
8136         such as base classes.
8137
8138 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
8139
8140         * tree.c (build_exception_variant): Fix typo: use the chain of U,
8141         not trying V, while cycling through U.
8142
8143 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
8144
8145         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
8146         preserves_first_arg.  Enlarge dummy accordingly.
8147         (DECL_TINFO_FN_P): New macro.
8148         (SET_DECL_TINFO_FN_P): Likeiwse.
8149         (DECL_RETURNS_FIRST_ARG): Remove.
8150         (DECL_PRESERVES_THIS): Likewise.
8151         (DECL_INIT_PRIORITY): New macro.
8152         (finish_struct_1): Change prototype.
8153         (cat_namespace_levels): Remove prototype.
8154         (vtable_decl_p): New prototype.
8155         (vtype_decl_p): Likewise.
8156         (sigtable_decl_p): Likewise.
8157         (walk_globals_pred): New typedef.
8158         (walk_globals_fn): Likewise.
8159         (walk_globals): New prototype.
8160         (walk_namespaces_fn): New typedef.
8161         (walk_namespaces): New prototype.
8162         (wrapup_globals_for_namespace): Likewise.
8163         (walk_vtables): Remove prototype.
8164         (walk_sigtables): Likewise.
8165         (instantiate_pending_templates): New prototype.
8166         * class.c (finish_struct_1): Don't return a value.
8167         * decl.h (pending_statics): Remove declaration.
8168         * decl.c (walk_namespaces_r): New function.
8169         (walk_globals_r): Likewise.
8170         (vtable_decl_p): Likewise.
8171         (vtype_decl_p): Likewise.
8172         (sigtable_decl_p): Likewise.
8173         (walk_namespaces): Likewise.
8174         (walk_globals_data): New type.
8175         (walk_globals): New function.
8176         (wrapup_globals_for_namespace): Likewise.
8177         (expand_static_init): Remove assertion.  Remove redundancy in
8178         conditional.  Don't put static data members in static_aggregates
8179         Tidy.
8180         (finish_function): Remove redundancy in conditional.  Don't set
8181         DECL_RETURNS_FIRST_ARG.
8182         (cat_namespace_levels): Remove.
8183         * decl2.c: Include splay-tree.h and varray.h.
8184         (priority_info_s): New structure.
8185         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
8186         conventions.
8187         (prune_vtable_vardecl): Likewise.
8188         (finish_sigtable_vardecl): Likewise.
8189         (setup_initp): Remove.
8190         (do_dtors): Remove.
8191         (do_ctors): Remove.
8192         (start_static_storage_duration_function): New function.
8193         (generate_inits_for_priority): Likewise.
8194         (finish_static_storage_duration_function): Likewise.
8195         (get_priority_info): Likewise.
8196         (do_static_initialization): Likewise.
8197         (do_static_destruction): Likewise.
8198         (do_static_initialization_and_destruction): Likewise.
8199         (generate_ctor_or_dtor_function): Likewise.
8200         (generate_ctor_and_dtor_functions_for_priority): Likewise.
8201         (pending_statics): Make it a varray.
8202         (pending_statics_used): New variable.
8203         (saved_inlines): Make it a varray.
8204         (saved_inlines_used): New variable.
8205         (finish_static_data_member): Change method of updating
8206         pending_statics.
8207         (mark_inline_for_output): Remove #if 0'd code.  Change method of
8208         updating saved_inlines.
8209         (walk_vtables): Remove.
8210         (walk_sigtables): Likewise.
8211         (import_export_decl): Use DECL_TINFO_FN_P.
8212         (pending_templates): Remove declaration.
8213         (maybe_templates): Likewise.
8214         (static_aggregates_initp): Likewise.
8215         (setup_initp): Likewise.
8216         (finish_objects): Simplify.
8217         (INITIALIZE_P_IDENTIFIER): New macro.
8218         (PRIORITY_IDENTIFIER): New macro.
8219         (SSDF_IDENTIFIER): New macro.
8220         (initialize_p_decl): New variable.
8221         (priority_decl): Likewise.
8222         (ssdf_decl): Likewise.
8223         (priority_info_map): Likewise.
8224         (finish_file): Recode output of static intializers and other
8225         file-scope finalization tasks.
8226         * error.c (OB_END_TEMPLATE_ID): New macro.
8227         (dump_type_real): Use it.
8228         (dump_decl): Likewise.
8229         (dump_function_name): Likewise.
8230         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
8231         interface.
8232         (check_newline): Use walk_globals, not walk_vtables.
8233         * pt.c (pending_tempalte_expansions): Remove.
8234         (set_vardecl_interface_info): Likewise.
8235         (pending_templates): Make static.
8236         (maybe_templates): Likewise.
8237         (instantiate_class_template): Adjust call to finish_struct_1.
8238         (instantiate_pending_templates): New function.
8239         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
8240         * tree.c (static_aggregates_initp): Remove.
8241         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
8242         instead.
8243         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
8244
8245         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
8246         with the RTL code RETURN.
8247         * hash.h: Regenerated.
8248         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
8249         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
8250         * parse.c: Regenerated.
8251         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
8252         it.
8253         (inline_parm_levels): New variable.
8254         (inline_parm_levels_used): Likewise.
8255         (maybe_begin_member_template_processing): Update them.
8256         (maybe_end_member_template_processing): Use them, rather than
8257         guessing how many levels to pop.
8258
8259         * decl.c (make_typename_type): Tighten error-checking.
8260
8261 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
8262
8263         * cp-tree.h (build_binary_op): Remove unneeded parameter.
8264         * class.c (build_vrable_entry_ref): Adjust call to
8265         build_binary_op.
8266         * decl.c (expand_static_init): Likewise.
8267         (grokdeclarator): Likewise.
8268         (finish_function): Likewise.
8269         * decl2.c (delete_sanity): Likewise.
8270         (do_dtors): Likewise.
8271         (do_ctors): Likewise.
8272         * error.c (dump_type_suffix): Likewise.
8273         * expr.c (cplus_expand_expr): Likewise.
8274         * init.c (resolve_offset_ref): Likewise.
8275         (build_new): Likewise.
8276         (build_new_1): Likewise.
8277         (build_vec_delete_1): Likewise.
8278         (expand_vec_init_catch_clause): Likewise.
8279         (build_delete): Likewise.
8280         * pt.c (tsubst): Likewise.
8281         * rtti.c (synthesize_tinfo_fn): Likewise.
8282         * search.c (expand_upcast_fixups): Likewise.
8283         (expand_direct_vtbls_init): Likewise.
8284         * typeck.c (get_member_function_from_ptrfunc): Likewise.
8285         (build_binary_op_nodefault): Likewise.
8286         (point_int_sum): Likewise.
8287         (pointer_diff): Likewise.
8288         (build_unary_op): Likewise.
8289         (build_modify_expr): Likewise.
8290         (get_delta_difference): Likewise.
8291         (build_ptrmemfunc): Likewise.
8292         (expand_ptrmemfunc_cst): Likewise.
8293
8294 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
8295
8296         * decl.c (grokfndecl): Always call cplus_decl_attributes.
8297         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
8298
8299 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
8300
8301         * cp-tree.h (finish_static_data_member_decl): New function.
8302         * decl2.c (finish_static_data_member_decl): Split out from ...
8303         (grokfield): Here.
8304         * pt.c (instantiate_class_template): Use it here instead of
8305         trying to fake it.
8306         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
8307         finish_static_data_member_decl will do that.  Explicit set
8308         DECL_EXTERNAL to match non-template processing.
8309
8310 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
8311
8312         * cp-tree.h (finish_class_definition): Add parameter.
8313         * parse.y (structsp): Use it.  Don't call pop_scope here.
8314         * parse.c: Regenerated.
8315         * semantics.c (finish_class_definition): Pop it here.
8316
8317 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
8318
8319         * decl.c (xref_tag): Revise handling of nested template
8320         declarations.
8321         * pt.c (check_explicit_specialization): Tweak handling of friend
8322         templates in template classes.
8323         (tsubst_friend_class): Handle friend declarations for nested
8324         member template classes.
8325
8326 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
8327
8328         * class.c (finish_struct): Remove unused variable.
8329         (pushclass): Likewise.
8330         (invalidate_class_lookup_cache): Likewise.
8331         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
8332         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
8333         doesn't get obliterated.
8334         (make_typename_type): Handle template classes correctly.
8335
8336         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
8337         (storetags): Declare.
8338         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
8339         (pushclass): Likewise.  Use storetags to install tag declarations,
8340         not pushtag.
8341         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
8342         * decl.c (storetags): Make it global.
8343         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
8344         implicit typename declaration.
8345         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
8346         * method.c (hack_identifier): Likewise.
8347         * search.c (lookup_member): Likewise.
8348
8349         * decl.c (warn_about_implicit_typename_lookup): New function.
8350         (lookup_name_real): Use it.  Rework handling of implicit typename
8351         extension.
8352
8353 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
8354
8355         * cp-tree.h (lookup_nested_field): Remove.
8356         * class.c (push_nested_class): Handle UNION_TYPEs.
8357         (pop_nested_class): Likewise.
8358         * decl.c (lookup_name_real): Don't call lookup_nested_field.
8359         (start_decl): Use push_nested_class, not just pushclass.
8360         (cp_finish_decl): Use pop_nested_class, not just popclass.
8361         * search.c (lookup_nested_field): Remove.
8362
8363         * cp-tree.h (lang_type): Add documentation.
8364         * decl2.c (handle_class_head): Create template declarations here,
8365         as appropriate.
8366         * parse.y (class_head): Return whether or not we entered a new
8367         scope, as well as the type named.
8368         (named_class_head): Likewise.
8369         (named_complex_class_head_sans_basetype): Likewise.
8370         (structsp): Adjust accordingly.  Pop scope when required.
8371         * parse.c: Regenerated.
8372         * pt.c (check_default_tmpl_args): Robustify.
8373         (redeclare_class_template): Likewise.
8374         (instantiate_class_template): An instantiation of an
8375         anonymous union is itself an anonymous union.
8376         * semantics.c (begin_class_definition): Don't create template
8377         declarations here.
8378
8379 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
8380
8381         * parse.y (after_type_declarator_intern): New nonterminal.
8382         (after_type_declarator): Use it.
8383         (direct_after_type_declarator): Likewise.  Move above
8384         nonnested_type to fix reduce/reduce conflict resolution.
8385         (declmods): Reducing from just 'attributes' has EMPTY precedence.
8386         * Makefile.in (CONFLICTS): Update.
8387
8388         * decl.c (define_label): Downgrade error for jumping over a
8389         non-POD decl to pedwarn.
8390
8391 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
8392
8393         * cp-tree.h (popclass): Change declaration.
8394         (pop_nested_class): Likewise.
8395         (poplevel_class): Remove declaration.
8396         * call.c (convert_default_argument): Pass no arguments to
8397         popclass.
8398         * class.c (finish_struct_1): Likewise.
8399         (finish_struct): Likewise.
8400         (popclass): Remove argument.  Simplify code accordingly.
8401         (pop_nested_class): Likewise.
8402         * decl.c (poplevel_class): Declare it here, and make it static.
8403         (poplevel): Handle class scopes.
8404         (poplevel_class): Don't take an rgument.  Simplify.
8405         (pop_everything): Pass no arguments to pop_nested_class.
8406         (cp_finish_decl): Pass no arguments to popclass.
8407         (grokdeclarator): Pass no arguments to pop_nested_class.
8408         (finish_function): Likewise.
8409         * decl2.c (grokfield): Likewise.
8410         (pop_scope): Pass no arguments to popclass.
8411         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
8412         * pt.c (instantiate_class_template): Move call to pushclass, and
8413         document.  Pass no arguments to popclass.
8414         (regenerate_decl_from_template): Likewise.
8415
8416 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
8417
8418         * typeck.c (build_unary_op): Handle taking the address of a unique
8419         bound non-static member function.
8420
8421 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8422
8423         * lang-options.h (-Wdeprecated): New flag.
8424         * decl2.c (warn_deprecated): New flag.
8425         (lang_decode_option): Deprecated this-is-variable,
8426         external-templates, alt-external-templates.
8427         Support -Wdeprecated.
8428         * errfn.c (cp_deprecated): New function.
8429
8430 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
8431
8432         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
8433         of the decls themselves.
8434
8435         * pt.c (tsubst_function_type): Copy attributes over.
8436
8437         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
8438         and com_interface.
8439         * cp-tree.h: Add prototype.
8440         * decl.c (init_decl_processing): Set valid_lang_attribute.
8441
8442 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
8443
8444         * class.c (finish_struct_1): Look at the const-ness of the field's
8445         type, not the TREE_READONLY-ness of the declaration.
8446         * method.c (synthesize_method): Likewise.
8447         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
8448         creating new declarations.
8449
8450 1999-04-13  Mike Stump  <mrs@wrs.com>
8451
8452         * decl2.c (import_export_decl): Because vtables always reference
8453         virtual functions, even if they are inlined, don't allow
8454         -fno-implement-inlines to not emit them, instead, emit them with
8455         the vtable.
8456         * decl.c (start_function): Likewise.
8457
8458 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
8459
8460         * cp-tree.h (struct lang_type): Add com_interface.
8461         (CLASSTYPE_COM_INTERFACE): New macro.
8462         * class.c (set_rtti_entry): COM interface classes have no RTTI
8463         entries in their vtables; adjust.
8464         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
8465         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
8466         finish_struct_1): Likewise.
8467         * decl2.c (mark_vtable_entries): Likewise.
8468         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
8469         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
8470         expand_upcast_fixups): Likewise.
8471         * tree.c (debug_binfo): Likewise.
8472
8473         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
8474         * typeck.c (comptypes): If we get it, ignore attributes.
8475         * class.c (instantiate_type): Use BASELINK_P.  Change complain
8476         parameter to flags; 2 means ignore attributes.
8477         * call.c (build_op_delete_call): Pass it.
8478
8479         * decl.c (xref_tag): Only complain once about using a typedef-name
8480         with 'struct'.  Downgrade to pedwarn.
8481
8482         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
8483
8484         * parse.y (absdcl_intern): New nonterminal.
8485         (absdcl, direct_abstract_declarator): Use it.
8486
8487         * pt.c (lookup_template_class): Look through implict typename.
8488
8489 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
8490
8491         * friend.c (add_friend): Deal gracefully with error_mark_node.
8492         * method.c (build_overload_value): Handle pointers-to-members as
8493         template parameters.
8494
8495         * decl.c (push_binding): Fix typo in comment.
8496
8497 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
8498
8499         * error.c (dump_type_real): If a typename is a template-id, put
8500         out the template arguments.
8501         (dump_expr): Handle TEMPLATE_ID_EXPR.
8502         * pt.c (lookup_template_class): Now that full arguments are
8503         available everywhere, remove code that tried to guess them.
8504
8505 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
8506
8507         * decl.c (make_typename_type): Complain if we don't find a type
8508         when trying to make a typename type for a non-template type.
8509
8510 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
8511
8512         * decl.c (start_decl): Pass attributes to grokdeclarator.
8513         (grokdeclarator): Handle attributes on constructor-syntax
8514         initializers.
8515
8516 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
8517
8518         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
8519         don't have types.
8520
8521         * search.c (template_self_reference_p): Tweak.
8522
8523 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
8524
8525         * init.c (build_offset_ref): Don't build yet another weird data
8526         structure to describe overloaded functions.
8527
8528 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
8529
8530         * cp-tree.h (BASELINK_P): New macro.
8531         (SET_BASELINK_P): Likewise.
8532         * init.c (build_member_call): Remove needless assignment in if
8533         statement.
8534         * search.c (lookup_field_r): Fix handling when we are looking
8535         specifically for a type; these are not hidden by functions and
8536         variables.
8537         (lookup_member): Use SET_BASELINK_P.
8538         * tree.c (is_overloaded_fn): Use BASELINK_P.
8539         (really_overloaed_fn): Likewise.
8540         (get_first_fn): Likewise.
8541
8542 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
8543
8544         * decl.c (lookup_name_current_level): Tweak, and improve
8545         documentation.
8546
8547         * class.c (maybe_fixup_vptrs): Remove declaration.
8548         (build_class_init_list): Likewise.
8549         * decl.c (pushdecl_class_level): Call check_template_shadow here
8550         ...
8551         (push_class_level_binding): ... not here.
8552         * search.c (dfs_push_type_decls): Only avoid
8553         template-self-reference TYPE_DECLs if they are from base classes.
8554
8555 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
8556
8557         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
8558         nodes.  Tidy.
8559
8560 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
8561
8562         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
8563         (finish_struct_1): Don't call build_class_init_list.
8564
8565 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
8566
8567         * tinfo.h (__class_type_info): Fix illegal declaration.
8568
8569         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
8570         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
8571         (IDENTIFIER_CLASS_VALUE): Improve documentation.
8572         (is_properly_derived_from): Declare.
8573         (invalidate_class_lookup_cache): Likewise.
8574         (maybe_maybe_note_name_used_in_class): Likewise.
8575         (note_name_declared_in_class): Likewise.
8576         (push_using_decl): Remove duplicate declaration.
8577         (id_in_current_class): Remove declaration.
8578         (push_class_binding): Change prototype.
8579         (clear_identitifer_class_values): Declare.
8580         * call.c (is_properly_derived_from): Make it global.
8581         (build_new_function_call): Be careful about updating candidates.
8582         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
8583         asked to make illegal calls.
8584         * class.c: Include splay-tree.h.
8585         (class_stack_node): Add names_used slot.
8586         (check_member_decl_is_same_in_complete_scope): Remove.
8587         (add_method): Fix comment.  Push the declaration into class
8588         scope.
8589         (finish_struct_1): When popping the class, pop the bindings too.
8590         Remove check for data member/function member conflict.
8591         (finish_struct): Remove calls to
8592         check_member_decl_is_same_in_complete_scope.  Change calls to
8593         popclass.
8594         (pushclass): Clear names_used in the class stack entry.
8595         Use invalidate_class_lookup_cache to remove cached entries, rather
8596         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
8597         before entering a new class.  Remove dead code.  Don't mess with
8598         current_function_decl when pushing declarations.
8599         (invalidate_class_lookup_cache): New function, split out from ...
8600         (popclass): Here.  Clean up names_used on our way out.
8601         (instantiate_type): Adjust.
8602         (build_self_reference): Don't push the declaration here.
8603         (maybe_note_name_used_in_class): New function.
8604         (note_name_declared_in_class): Likewise.
8605         * decl.c (add_binding): Change prototype.
8606         (find_class_binding_level): New function.
8607         (innermost_nonclass_level): Likewise.
8608         (current_binding_level): Update documentation.
8609         (inner_binding_level): Remove.  Replace with current_binding_level
8610         throughout.
8611         (push_binding_level): Remove special handling of
8612         class_binding_level.
8613         (pop_binding_level): Likewise.  Use find_class_binding_level.
8614         (suspend_binding_level): Likewise.
8615         (global_bindings_p): Use innermost_nonclass_level.
8616         (toplevel_bindings_p): Likewise.
8617         (namespace_bindings_p): Likewise.
8618         (pseudo_global_level_p): Likewise.
8619         (push_binding): Clear INHERITED_VALUE_BINDING_P.
8620         (add_binding): Check for illegal multiple declarations.  Return a
8621         value indicating whether or not the new binding was legal.
8622         (push_local_binding): Skip over class binding levels.  Check
8623         return value from add_binding.
8624         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
8625         note_name_declared_in_class.
8626         (pushlevel_class): Remove "fake out the rest of the compiler"
8627         code.
8628         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
8629         (clear_identifier_class_values): New function.
8630         (pop_from_top_level): Use it.
8631         (pop_everything): Tweak.
8632         (maybe_process_template_type_declaration): Don't push the
8633         declaration for the template here.
8634         (pushtag): Don't push tag declarations into class scope here.
8635         (pushdecl): Apply DeMorgan's law for readability.
8636         (pushdecl_class_level): Remove special-case code for
8637         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
8638         (push_class_level_bindng): Deal with inherited bindings.
8639         (lookup_name_real): Remove special-case code for
8640         TYPE_BEING_DEFINED, and some implicit typename magic.
8641         (grokdeclarator): Handle COMPONENT_REF for a template function.
8642         (build_enumerator): Don't call pushdecl_class_level here.
8643         (id_in_current_class): Remove.
8644         * decl2.c (grokfield): Don't call pushdecl_class_level or
8645         check_template_shadow.
8646         * errfn.c (cp_file_of): Don't declare.
8647         (cp_line_of): Likewise.
8648         * error.c (dump_decl): Handle an OVERLOAD.
8649         (cp_file_of): Likewise.
8650         (cp_line_of): Likewise.
8651         * init.c (build_member_call): Handle a COMPONENT_REF.
8652         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
8653         pushdecl_class_level.
8654         * method.c (hack_identifier): Build COMPONENT_REFs for references
8655         to member templates as well as member functions.  Remove dead
8656         code.
8657         * parse.y (left_curly): Remove.
8658         (nonnested_type): Call maybe_note_name_used_in_class, not
8659         pushdecl_class_level.
8660         * parse.c: Regenerated.
8661         (nested_name_specifier_1): Likewise.
8662         * pt.c (check_explicit_specialization): Adjust, for robustness.
8663         (check_template_shadow): Handle OVERLOADs.
8664         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
8665         TEMPLATE_DECL, if appropriate.
8666         * search.c (envelope_add_decl): Remove.
8667         (dfs_pushdecls): Likewise.
8668         (dfs_compress_decls): Likewise.
8669         (dfs_push_decls): New function.
8670         (dfs_push_type_decls): Likewise.
8671         (setup_class_bindings): Likewise.
8672         (template_self_reference_p): Likewise.
8673         (lookup_field_r): Use it.
8674         (looup_member): Remove old comment.  Deal with ambiguity.
8675         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
8676         and remove envelope processing.
8677         * semantics.c (begin_class_definition): Let pushclass push
8678         declarations for base classes.
8679         (finish_member_declaration): Push declarations into class scope.
8680         * typeck.c (build_component_ref): Just put an OVERLOAD into the
8681         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
8682         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
8683         * Makefile.in (class.o): Depend on splay-tree.h.
8684
8685 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
8686
8687         * cvt.c (convert_pointer_to_real): Use same_type_p.
8688         * typeck.c (comp_target_types): Use same_type_p.
8689
8690 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
8691
8692         * semantics.c (begin_inline_definitions,
8693         finish_inline_definitions): Rename from finish_default_args and
8694         begin_inline_definitions, respectively, to something that isn't a
8695         total lie.  :)
8696         * parse.y (structsp): Adjust.
8697
8698         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
8699         (list_hash_lookup): Likewise.
8700         (hash_tree_chain): Adjust.
8701         * pt.c (tsubst): Adjust.
8702         (tsubst_arg_types): Use plain hash_tree_cons.
8703         * cp-tree.h (hash_tree_cons_simple): Lose.
8704         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
8705
8706 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8707
8708         * Makefile.in (hash.h): Generate using gperf language 'C', not
8709         'KR-C', so gperf uses the `const' keyword on strings.
8710
8711         * gxx.gperf (resword): Const-ify a char*.
8712
8713 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
8714
8715         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
8716         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
8717         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
8718         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
8719         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
8720         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
8721         tree.c: Adjust.
8722
8723 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
8724
8725         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
8726
8727 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
8728
8729         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
8730
8731 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
8732
8733         * cp-tree.h (add_friend): Declare.
8734         (add_friends): Likewise.
8735         * friend.c (add_friend): Make it global.  Don't add to
8736         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
8737         (add_friends): Make it global.
8738         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
8739         befriending class is a template.
8740         * parse.y (component_decl_1): Fix typo in comment.
8741         * parse.c: Regenerated.
8742         * pt.c (instantiate_class_template): Use add_friend and
8743         add_friends rather that duplicating some of their functionality
8744         here.
8745
8746 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
8747
8748         * call.c (build_field_call): Unify 'this' and non-'this' cases.
8749
8750         * typeck.c (build_indirect_ref): Check for 'this' sooner.
8751
8752 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8753
8754         * call.c (op_error): Const-ify a char*.
8755         (add_candidate, source_type, add_warning): Add static prototype.
8756         (print_z_candidates): Const-ify a char*.
8757
8758         * class.c (resolve_address_of_overloaded_function,
8759         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
8760         (get_vtable_name, finish_struct_1): Const-ify a char*.
8761
8762         * cvt.c (convert_to_reference): Likewise.
8763
8764         * decl.c (redeclaration_error_message, record_builtin_type,
8765         record_unknown_type, member_function_or_else, bad_specifiers):
8766         Likewise.
8767         (find_binding, select_decl, unqualified_namespace_lookup,
8768         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
8769         Add static prototype.
8770         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
8771         implicitly_declare, record_builtin_java_type, define_function,
8772         grok_op_properties, tag_name): Const-ify a char*.
8773
8774         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
8775         (define_function, finish_builtin_type): Const-ify a char*.
8776         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
8777         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
8778         (file_name_nondirectory): Const-ify a char*.
8779         (init_filename_times): Don't prototype.
8780         (compiler_error): Prototype.
8781         (yyerror, init_repo): Const-ify a char*.
8782         (build_srcloc): Don't prototype.
8783         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
8784         Const-ify a char*.
8785         (warn_for_assignment): Don't prototype.
8786         (convert_for_initialization, readonly_error, check_for_new_type,
8787         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
8788         Const-ify a char*.
8789
8790         * decl2.c (acceptable_java_type, output_vtable_inherit,
8791         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
8792         merge_functions, decl_namespace, validate_nonmember_using_decl,
8793         do_nonmember_using_decl): Add static prototype.
8794         (lang_f_options): Const-ify a char*.
8795         (finish_builtin_type): Likewise.
8796         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
8797         prototype.
8798
8799         * errfn.c: Include cp-tree.h.
8800         (cp_thing): Add static prototype.
8801         (compiler_error): Don't protoptype.
8802         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
8803         passing it to `cp_thing'.
8804
8805         * error.c (interesting_scope_p): Add static prototype.
8806
8807         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
8808         a char*.
8809
8810         * init.c (compiler_error): Don't prototype.
8811         (member_init_ok_or_else): Const-ify a char*.
8812         (build_java_class_ref): Add static prototype.
8813
8814         * lex.c (compiler_error): Don't prototype.
8815         (get_time_identifier, interface_strcmp, extend_token_buffer,
8816         handle_cp_pragma): Const-ify a char*.
8817         (is_global, init_filename_times): Add static prototype.
8818         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
8819         (compiler_error): Change from fixed args to variable args.
8820         (yyerror): Const-ify a char*.
8821
8822         * parse.y (cond_stmt_keyword): Const-ify a char*.
8823         (parse_decl): Add static prototype.
8824
8825         * pt.c (template_args_equal, print_template_context): Likewise.
8826         (print_candidates, check_default_tmpl_args): Const-ify a char*.
8827         (instantiate_class_template): Likewise.
8828
8829         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
8830
8831         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
8832         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
8833
8834         * search.c (lookup_field_info, lookup_member): Likewise.
8835         (lookup_member): Cast the first argument of `bzero' to a PTR.
8836
8837         * sig.c (compiler_error): Don't prototype.
8838         (build_signature_pointer_or_reference_nam): Const-ify a char*.
8839         (get_sigtable_name, build_member_function_pointer): Likewise.
8840
8841         * tree.c (compiler_error): Don't prototype.
8842         (no_linkage_helper, build_srcloc): Add static prototype.
8843         (build_vbase_pointer_fields): Const-ify a char*.
8844         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
8845
8846         * typeck.c (compiler_error): Don't prototype.
8847         (convert_for_assignment): Const-ify a char*.
8848         (comp_cv_target_types): Add static prototype.
8849         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
8850         build_component_addr, build_unary_op, convert_for_initialization):
8851         Const-ify a char*.
8852
8853         * typeck2.c (ack): Add static prototype and change from fixed args
8854         to variable args.
8855         (readonly_error, check_for_new_type): Const-ify a char*.
8856
8857         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
8858         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
8859         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
8860         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
8861         gen_assign, GNU_xref_member): Const-ify a char*.
8862
8863 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8864
8865         * gxxint.texi: Remove old discussion on copying virtual bases.
8866
8867 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
8868
8869         * Make-lang.in: Remove all references to g++.o/g++.c.
8870         Link g++ from gcc.o.
8871
8872 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
8873
8874         * decl2.c (comdat_linkage): Treat vtables like functions.
8875
8876 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
8877
8878         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
8879
8880 1999-03-25  Nathan Sidwell  <nathan@acm.org>
8881
8882         * decl.c (init_decl_processing): Add `signed' type as a synonym
8883         for `int'.
8884
8885 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
8886
8887         * typeck.c (common_type): Handle cv-qual unification for pointers
8888         to members.
8889
8890         * decl.c (unqualified_namespace_lookup): Return error_mark_node
8891         on error.
8892         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
8893         * lex.c (do_identifier): If we got error_mark_node, call
8894         lookup_name again.
8895
8896 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8897
8898         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
8899         classes.
8900
8901 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
8902
8903         * decl.c (lookup_name_real): Do nested field lookup regardless of
8904         TYPE_BEING_DEFINED.
8905
8906 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
8907
8908         * cp-tree.h (lang_type): Remove has_assignment and
8909         has_real_assignment.  Add befriending_classes.
8910         (TYPE_HAS_ASSIGNMENT): Remove.
8911         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
8912         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
8913         (lang_decl): Document.
8914         (DECL_BEFRIENDING_CLASSES): New macro.
8915         (FRIEND_NAME): Move declaration to more obvious location.
8916         (FRIEND_DECLS): Likewise.
8917         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
8918         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
8919         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
8920         (grok_op_properties): Likewise.
8921         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
8922         (add_friend): Likewise.  Don't do weird things with assignment
8923         operators.  Update DECL_BEFRIENDING_CLASSES.
8924         (add_friends): Don't do weird things with assignment operators.
8925         (make_friend_class): Likewise.  Update
8926         CLASSTYPE_BEFRIENDING_CLASSES.
8927         * pt.c (instantiate_class_template): Don't set
8928         TYPE_HAS_ASSIGNMENT.
8929         (tsubst_copy): Substitute the TREE_TYPE for more unary
8930         expressions.
8931         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
8932         * search.c (protected_accessible_p): New function.
8933         (friend_accessible_p): Likewise.
8934         (accessible_p): Use them.
8935
8936 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
8937
8938         * pt.c (convert_nontype_argument): Don't create things that aren't
8939         PTRMEM_CSTs when applying a qualification conversion to a
8940         PTRMEM_CST.
8941
8942 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
8943
8944         * Makefile.in (OBJS): Don't mention hash.o.
8945         (OBJDEPS): Likewise.
8946
8947 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
8948
8949         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
8950         * decl.c (expand_static_init): Make sure we don't add any after
8951         then.
8952
8953         * decl.c (cp_finish_decl): Move intelligence about handling
8954         DECL_COMDAT for variables from here...
8955         * decl2.c (comdat_linkage): ...to here.
8956         (maybe_make_one_only): Tweak.
8957         (import_export_decl): Call comdat_linkage for variables, too.
8958         (finish_file): Handle template statics properly.
8959
8960 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
8961
8962         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
8963         Document internals of pointer-to-member-functions.
8964         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
8965         (PFN_FROM_PTRMEMFUNC): Likewise.
8966         (build_type_conversion): Remove unused parameter.
8967         (build_ptrmemfunc1): Declare.
8968         (expand_ptrmemfunc_cst): New function.
8969         (delta2_from_ptrmemfunc): Likewise.
8970         (pfn_from_ptrmemfunc): Likewise.
8971         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
8972         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
8973         (convert_to_reference): Remove unused parameter to
8974         build_type_conversion.
8975         (ocp_convert): Likewise.
8976         (build_user_type_conversion): Likewise.
8977         * error.c (dump_expr): Handle NULL pointer-to-member functions.
8978         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
8979         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
8980         open when handling pointer-to-member functions.
8981         * pt.c (convert_nontype_argument): Clean up error messages.  Be
8982         more stringent with pointers-to-members.
8983         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
8984         (build_unary_op): Tidy ever-so-slightly.
8985         (build_conditional_expr): Remove extra parameter to
8986         build_type_conversion.
8987         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
8988         we're using.
8989         (expand_ptrmemfunc_cst): Define.
8990         (delta2_from_ptrmemfunc): Likewise.
8991         (pfn_from_ptrmemfunc): Likewise.
8992
8993 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
8994
8995         * init.c (build_member_call): Handle template-id expressions
8996         correctly.
8997         * typeck.c (build_x_function_call): Likewise.
8998
8999 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
9000
9001         * friend.c (make_friend_class): Avoid core dump when
9002         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
9003
9004 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
9005
9006         * decl.c (start_function): Suppress normal linkage heuristics
9007         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
9008
9009 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
9010
9011         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
9012         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
9013
9014 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9015
9016         * parse.y (named_complex_class_head_sans_basetype):
9017         Do not push a scope for error_mark_node.
9018         (maybe_base_class_list): Likewise.
9019
9020         * decl.c (start_decl): Check for error_mark_node as a type.
9021         Detected by g++.brendan/array-refs.C.
9022         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
9023         (maybe_build_cleanup_1): Likewise.  Detected by
9024         g++.jason/incomplete1.C.
9025
9026         * tree.c (build_dummy_object): Use void_zero_node instead of the
9027         error_mark_node.
9028         (is_dummy_object): Check for such a node.
9029         Detected by g++.bob/inherit1.C
9030
9031 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
9032
9033         * method.c (old_backref_index): Split out...
9034         (flush_repeats): From here.  Rename back from try_old_backref.
9035         (build_mangled_name): Put back some old-style repeat handling.
9036
9037 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9038
9039         * lex.c: Don't include setjmp.h.
9040         (parse_float): New static function.
9041         (pf_args): New struct.
9042         (real_yylex): Use them in call to `do_float_handler'.
9043
9044 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
9045
9046         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
9047         * tree.c (layout_basetypes): Not here.
9048         * search.c (dfs_search): Remove; no longer used.
9049
9050 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
9051
9052         * decl2.c (validate_nonmember_using_decl): Issue sensible
9053         error-messages on bogus qualifiers.
9054
9055 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
9056
9057         * call.c (add_function_candidate): Fix uninitialized variable.
9058
9059         * Makefile.in (search.o): Add dependency on varray.h.
9060
9061 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
9062
9063         * decl.c (duplicate_decls): Use same_type_p.
9064         * method.c (try_old_backref): Renamed from flush_repeats.  Use
9065         same_type_p.  Don't try to handle repeats.  Return success.
9066         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
9067         calls from old-style code, too.
9068         (check_ktype): Use same_type_p.
9069         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
9070         (build_qualified_name): Simplify logic.
9071         (process_overload_item): Strip typedefs and quals at the top.
9072         (build_mangled_name_for_type_with_Gcode): Remove call to
9073         type_canonical_variant.
9074         (build_mangled_name): Likewise.  Remove support for old-style
9075         repeats, which have been disabled since 2.7.2.  Don't mess with
9076         TREE_USED.
9077         (build_decl_overload_real): Don't mess with TREE_USED.
9078
9079 1999-03-13  Nathan Sidwell  <nathan@acm.org>
9080
9081         * error.c (cp_printers): Add 'F' escape character.
9082         (dump_type_real): Remove TREE_LIST (fnargs) printing.
9083         Functionality moved to dump_parameters.
9084         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
9085         (dump_function_decl): Extend meaning of V parameter.  Use
9086         dump_parameters and dump_exception_spec.
9087         (dump_parameters): New static function.
9088         (dump_exception_spec): New static function.
9089         (fndecl_as_string): Change argument semantics.  Use
9090         dump_function_decl directly.
9091
9092         * sig.c (build_signature_table_constructor): Use cp_error.
9093
9094 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9095
9096         * semantics.c (finish_switch_cond): Handle error cases gracefully.
9097         Detected by g++.law/enum5.C.
9098
9099         * typeck.c (build_modify_expr): Check for errors after resolving
9100         offsets.  Detected by g++.brendan/static1.C.
9101
9102         * decl.c (complete_array_type): Ignore initial_value if it is an
9103         error.  Detected by g++.benjamin/17930.C.
9104
9105         * typeck2.c (process_init_constructor): Return error if one argument
9106         is in error.  Detected by g++.benjamin/13478.C.
9107
9108 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9109
9110         * decl.c (select_decl): Allow class templates when we need types.
9111         * decl2.c (ambiguous_decl): Likewise.
9112
9113 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
9114
9115         * lex.c (do_identifier): Correct call to enforce_access.
9116         * search.c (accessible_p): Tweak comment.
9117
9118 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
9119
9120         * semantics.c (begin_class_definition): Call build_self_reference.
9121         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
9122
9123         * search.c (assert_canonical_unmarked): Fix typo in prototype.
9124
9125         * search.c (dfs_canonical_queue): New function.
9126         (dfs_assert_unmarked_p): Likewise.
9127         (assert_canonical_unmarked): Likewise.
9128         (access_in_type): Use it.
9129         (accessible_p): Likewise.  Walk the whole tree when umarking.
9130
9131         * sig.c (build_signature_table_constructor): Use accessible_p
9132         instead of compute_access.
9133
9134 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
9135
9136         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
9137
9138 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
9139
9140         * cp-tree.h (flag_access_control): Declare.
9141         (TREE_VIA_PPUBLIC): Document.
9142         (DECL_NONSTATIC_MEMBER_P): New macro.
9143         (enforce_access): Return an indication of whether or not access
9144         was permitted.
9145         (build_self_reference): Change prototype.
9146         (compute_access): Replace with ...
9147         (accessible_p): New function.
9148         (dfs_walk): Change prototype.
9149         (dfs_unmark): Likewise.
9150         (markedp): Likewise.
9151         * call.c (enforce_access): Use accessible_p.
9152         * class.c (build_self_reference): Insert the declaration into the
9153         list of members for this type, and make it public.
9154         * decl.c (xref_basetypes): Avoid ill-timed recursion.
9155         * init.c (build_offset_ref): Use lookup_member, not three separate
9156         name-lookups.  Call enforce_access rather than checking for
9157         illegal accesses here.
9158         (resolve_offset_ref): Likewise.
9159         * lex.c (do_identifier): Likewise.
9160         * method.c (hack_identifier): Likewise.
9161         * parse.y (self_reference): Remove.
9162         (opt_component_decl_list): Don't use it.
9163         * parse.c: Regenerated.
9164         * pt.c (print_candidates): Generalize to handle lists of
9165         overloaded functions.
9166         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
9167         not set.
9168         (get_template_base): Use new calling convention for dfs_walk.
9169         * search.c: Include varray.h.  Add prototypes.
9170         (dfs_walk): Accept a data pointer to pass to the work functions.
9171         All callers changed.  All work functions changed.
9172         (breadth_first_search): Rename to bfs_walk, and make consistent
9173         with dfs_walk.
9174         (dfs_walk_real): New function.
9175         (canonical_binfo): New function.
9176         (context_for_name_lookup): Likewise.
9177         (shared_marked_p): Likewise.
9178         (shared_unmarked_p): Likewise.
9179         (lokup_field_queue_p): Likewise.
9180         (lookup_field_r): Generalize to handle both functions and fields.
9181         (lookup_field): Just call lookup_member.
9182         (lookup_fnfields): Likewise.
9183         (lookup_member): Move body of lookup_field here and generalize.
9184         (dfs_accessible_queue_p): Likewise.
9185         (dfs_accessible_p): Likewise.
9186         (dfs_access_in_type): Likewise.
9187         (access_in_type): Likewise.
9188         (compute_access): Remove, and replace with ...
9189         (accessible_p): New function.
9190         (vbase_types): Remove.
9191         (vbase_decl_ptr_intermediate): Likewise.
9192         (vbase_decl_ptr): Likewise.
9193         (vbase_init_result): Likewise.
9194         (closed_envelopes): Likewise.
9195         (bvtable): Likewise.
9196
9197 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
9198
9199         * call.c (add_function_candidate): Check for proper number of args
9200         before checking the validity of those args.
9201
9202 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
9203
9204         * cp-tree.h (struct lang_type): Add anon_union field.
9205         (ANON_UNION_TYPE_P): Use it instead of examining type.
9206         (SET_ANON_UNION_TYPE_P): New macro.
9207         * decl.c (check_tag_decl): Use it.
9208
9209         * search.c (compute_access): Handle non-type contexts earlier, and
9210         handle NULL_TREE.
9211
9212         * tree.c (build_exception_variant): Use copy_to_permanent.
9213
9214         * decl2.c (setup_initp): Give statics with no priority the default
9215         priority here.
9216         (do_dtors, do_ctors, finish_file): Remove special handling of
9217         non-prioritized statics.
9218
9219 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
9220
9221         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
9222         * decl.c (make_typename_type): Don't issue an error if an
9223         immediate lookup fails; it migt be resolved later.
9224         * friend.c (is_friend): Add comment.
9225         * search.c (breadth_first_search): Add POSTFN and DATA
9226         parameters.  Tidy.  All callers changed.
9227         (lookup_field_queue_p): New function.
9228         (lookup_field_r): Likewise.
9229         (lookup_field_post): Likewise.
9230         (lookup_field): Use them, via breadth_first_search, instead of
9231         duplicating logic.
9232         (compute_access): Robustify.
9233         (lookup_fnfield_info): New structure.
9234
9235 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
9236
9237         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
9238
9239 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
9240
9241         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
9242         cc happy.
9243
9244         * decl2.c (import_export_class): Also return if
9245         CLASSTYPE_INTERFACE_ONLY is set.
9246
9247 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9248
9249         * decl.c (push_overloaded_decl): Only overwrite the old binding if
9250         there was one.
9251         * decl2.c (do_local_using_decl): Fix loop termination.
9252
9253 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
9254
9255         * cp-tree.h (determine_specialization): Don't declare.
9256         * pt.c (determine_specialization): Make it static.  Eliminate
9257         complain parameter.  Note that decl is always non-NULL now, and
9258         simplify accordingly.
9259
9260         * decl.c (maybe_push_to_top_level): Always call
9261         push_cp_function_context.
9262         (pop_from_top_level): Always call pop_cp_function_context.
9263
9264 1999-02-26  Nathan Sidwell  <nathan@acm.org>
9265
9266         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
9267         diagnostics.
9268         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
9269         * init.c (build_new_1): Extra arg to complete_type_or_else.
9270         (build_delete): Likewise.
9271         * typeck.c (require_complete_type): Likewise.
9272         (pointer_int_sum): Likewise.
9273         (pointer_diff): Likewise.
9274         (build_component_ref): Likewise.
9275
9276         * typeck2.c (incomplete_type_error): Always use cp_error.
9277         Show declaration of undefined type, if appropriate.
9278         Deal with UNKNOWN_TYPE nodes.
9279
9280         * typeck.c (require_complete_type): Use TYPE_SIZE as
9281         size_zero_node to mean incomplete type.
9282         (require_complete_type_in_void): New function.
9283         (build_compound_expr): Call complete_type_in_void for LHS.
9284         (build_c_cast): Call complete_type_in_void for void cast.
9285         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
9286         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
9287         require_complete_type_in_void.  Call it.
9288         * cp-tree.h (require_complete_type_in_void): Prototype new function.
9289
9290         * typeck.c (convert_arguments): Use alternative format for
9291         function decls.  Don't require_complete_type here.  Simplify
9292         diagnostic printing.
9293         (convert_for_initialization): Don't require_complete_type on RHS yet.
9294         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
9295
9296         * call.c (build_over_call): Cope with qualified void return type.
9297         * semantics.c (finish_call_expr): Likewise.
9298         * typeck.c (build_function_call_real): Likewise.
9299         (c_expand_return): Likewise.
9300         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
9301
9302         * call.c (print_z_candidates): Use alternate print format, to be
9303         consistent with (pt.c) print_candidates.
9304         * method.c (hack_identifier): List candidate members.
9305         * search.c (lookup_field): Build ambiguous list, and show it, if
9306         ambiguous.
9307
9308 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
9309
9310         * typeck.c (decay_conversion): Don't confuse constant array
9311         variables with their initializers.
9312
9313         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
9314         merging decls.
9315         * pt.c (regenerate_decl_from_template): Tweak for clarity.
9316         (instantiate_decl): Mark a decl instantiated before regenerating
9317         it to avoid recursion.
9318         * tree.c (mapcar): Don't call decl_constant_value unless we know
9319         something is TREE_READONLY_DECL_P.
9320
9321         * class.c (check_for_override): Don't stop checking when we find
9322         the first overridden function.  Delete #if 0'd code.
9323         * search.c (get_matching_virtual): Likewise.
9324
9325 1999-02-25  Richard Henderson  <rth@cygnus.com>
9326
9327         * lang-specs.h: Define __FAST_MATH__ when appropriate.
9328
9329 1999-02-24  Mike Stump  <mrs@wrs.com>
9330
9331         * typeck.c (convert_for_assignment): Allow boolean integral constant
9332         expressions to convert to null pointer.
9333
9334 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9335
9336         * decl.c (lookup_namespace_name): Resolve namespace aliases.
9337
9338         * class.c (push_nested_class): Allow namespaces.
9339
9340         * decl2.c (set_decl_namespace): Add friendp parameter.
9341         * decl.c (grokfndecl): Pass it.
9342         (grokvardecl): Likewise.
9343         * cp-tree.h: Change declaration.
9344
9345 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
9346
9347         * pt.c (tsubst): Allow an array of explicit size zero.
9348
9349 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
9350
9351         * errfn.c: Change varargs code to look like toplev.c.
9352
9353         * method.c (process_modifiers): Don't prepend 'U' for char or
9354         wchar_t.
9355
9356 1999-02-20  Craig Burley  <craig@jcb-sc.com>
9357
9358         * Make-lang.in (cplib2.ready): Don't consider updating
9359         cplib2 stuff if the current directory isn't writable, as
9360         it won't work (such as during a `make install').
9361
9362 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
9363
9364         * decl2.c (start_objects): Make file scope constructors and
9365         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
9366         ASM_OUTPUT_DESTRUCTOR are defined.
9367
9368 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
9369
9370         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
9371         (fn_type_unification): Adjust prototype.
9372         (lookup_fnfields_1): Declare.
9373         * call.c (add_template_candidate_real): Adjust call to
9374         fn_type_unification.
9375         * class.c (add_method): Don't allow duplicate declarations of
9376         constructors or destructors.
9377         (resolve_address_of_overloaded_function): Remove unused variable.
9378         Adjust call to fn_type_unification.
9379         * decl.c (grokfndecl): Be more robust in the face of illegal
9380         specializations.
9381         * decl2.c (check_classfn): Remove hokey handling of member
9382         templates.
9383         * pt.c (determine_specialization): Improve comments.  Adjust to
9384         handle template argument deduction as per the standard.
9385         (check_explicit_specialization): Fix comment spacing.  Handle
9386         type-conversion operators correctly.  Improve error-recovery.
9387         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
9388         (get_bindings_real): Simplify handling of static members.
9389         * search.c (lookup_fnfields_1): Make it have external linkage.
9390         * typeck.c (compparms): Fix comment.
9391         (build_unary_op): Don't try to figure out which template
9392         specialization is being referred to when when the address-of
9393         operator is used with a template function.
9394
9395 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9396
9397         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
9398         keyword to match an analogous change at the top level.
9399
9400         * tree.c (lvalue_or_else): Likewise.
9401
9402 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
9403
9404         * decl.c (xref_basetypes): Comment.
9405         * pt.c (instantiate_class_template): Use xref_basetypes.
9406
9407 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
9408
9409         * cp-tree.h (tsubst): Change prototype.
9410         (tsubst_expr): Likewise.
9411         (tsubst_copy): Likewise.
9412         (type_unification): Remove prototype.
9413         * call.c (convert_default_arg): Adjust call to tsubst_expr.
9414         * class.c (resolve_address_of_overloaded_function): Just use
9415         fn_type_unification.
9416         * decl.c (grokdeclarator): Adjust call to tsubst.
9417         * method.c (build_template_parm_names): Likewise.
9418         * pt.c (GTB_VIA_VIRTUAL): New macro.
9419         (GTB_IGNORE_TYPE): Likewise.
9420         (resolve_overloaded_unification): Add `complain' parameter.
9421         (try_one_overload): Likewise.
9422         (tsubst_template_arg_vector): Likewise.
9423         (tsubst_template_parms): Likewise.
9424         (tsubst_aggr_type): Likewise.
9425         (tsubst_arg_types): Likewise.
9426         (tsubst_call_declarator_parms): Likewise.
9427         (unify): Remove explicit_mask.
9428         (type_unification_real): Likewise.
9429         (get_template_base_recursive): Likewise.
9430         (coerce_template_template_parms): Provide prototype.
9431         (tsubst_function_type): Likewise.
9432         (try_class_unification): New function.
9433         All callers changed to use new complain parameter.
9434         (get_template_base): Use try_class_unification.
9435         (unify): Adjust handling of classes derived from template types.
9436         (fn_type_unification): Substitute explicit arguments before
9437         unification.
9438
9439 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
9440
9441         * decl.c (pushdecl): Remove dead code.
9442
9443 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
9444
9445         * decl2.c (finish_objects): Fix code I missed in previous change.
9446
9447 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
9448
9449         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
9450         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
9451
9452         * pt.c (maybe_process_partial_specialization): Complain about
9453         'template <>' on non-specialization.
9454
9455 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
9456
9457         * decl.c (grokdeclarator): Catch wierd declarators.
9458         * decl2.c (finish_file): Don't abort because of namespace parsing
9459         failure.
9460         (check_decl_namespace): Remove.
9461
9462 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
9463
9464         * cp-tree.h (get_template_base): Don't declare.
9465         (dfs_walk): Declare.
9466         (dfs_unmark): Likewise.
9467         (markedp): Likewise.
9468         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
9469         targs to get_template_base.
9470         (get_template_base_recursive): Move here from search.c.  Check to
9471         see that the base found can be instantiated to form the desired
9472         type.
9473         (get_template_base): Likewise.
9474         (get_class_bindings): Simplify.
9475         * search.c (get_template_base_recursive): Move to pt.c.
9476         (get_template_base): Likewise.
9477         (markedp): Make it global.
9478         (dfs_walk): Likewise.
9479         (dfs_unmark): Likewise.
9480
9481 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
9482
9483         * pt.c (maybe_process_partial_specialization): Complain about
9484         specialization in wrong namespace.
9485         * tree.c (decl_namespace_context): New fn.
9486
9487 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
9488
9489         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
9490         * pt.c (coerce_template_template_parms): Handle nested
9491         template template parameters.
9492
9493 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
9494
9495         * typeck2.c: Update email addresses.
9496
9497 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
9498
9499         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
9500         turned off.
9501
9502 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
9503
9504         * lex.c (retrofit_lang_decl): Split out...
9505         (build_lang_decl): From here.
9506         * decl.c (pushdecl): Call it for functions generated by the middle
9507         end that don't have DECL_LANG_SPECIFIC.
9508         * cp-tree.h: Declare it.
9509
9510         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
9511         (start_objects, finish_objects): Only use special
9512         init_priority code if the user specified a priority.
9513         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
9514         objects.
9515
9516 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
9517
9518         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
9519         mkstemp.o.  Get them from libiberty now.
9520         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
9521
9522 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
9523
9524         * decl2.c (lang_decode_option): Use read_integral_parameter.
9525
9526 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
9527
9528         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
9529         before calling complete_type_or_else.
9530
9531 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9532
9533         * input.c (inline): Don't define, its handled by system.h.
9534
9535 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
9536
9537         * decl2.c: Don't define flag_no_ident here.  Don't process
9538         -f(no-)ident here.
9539         * cp-tree.h: Don't declare flag_no_ident here.
9540         * lang-specs.h: Map -Qn to -fno-ident.
9541
9542 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
9543
9544         * cp-tree.h (struct tree_binding): Replace scope field with a union.
9545         (BINDING_SCOPE): Adjust.
9546         * decl.c (BINDING_LEVEL): Adjust.
9547
9548 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
9549
9550         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
9551         member constants.
9552
9553         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
9554         a ctor initializer.
9555
9556         * tree.c (equal_functions): Fix name in prototype.
9557
9558         * decl.c (push_local_binding): Add FLAGS argument.
9559         (pushdecl, push_overloaded_decl): Pass it.
9560         * decl2.c (do_local_using_decl): Likewise.
9561         * cp-tree.h: Adjust prototype.
9562         * decl.c (poplevel): Fix logic.
9563
9564         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
9565         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
9566         (cat_namespace_levels): Don't loop forever.
9567
9568 1999-01-25  Richard Henderson  <rth@cygnus.com>
9569
9570         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
9571
9572 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
9573
9574         * class.c (resolve_address_of_overloaded_function): Mark the
9575         chosen function used.
9576
9577         * call.c (build_call): Make sure that a function coming in has
9578         been marked used already.
9579         * decl.c (expand_static_init): Call mark_used instead of
9580         assemble_external.
9581         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
9582         alloc_eh_object, expand_throw): Likewise.
9583         * init.c (build_builtin_delete_call): Likewise.
9584         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
9585         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
9586         expand_generic_desc): Likewise.
9587
9588 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9589
9590         * tree.c (equal_functions): New function.
9591         (ovl_member): Call it.
9592
9593 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
9594
9595         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
9596
9597 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9598
9599         * decl.c (decls_match): Return 1 if old and new are identical.
9600         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
9601
9602 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
9603
9604         * decl.c (start_function): Make member functions one_only on windows.
9605         * decl2.c (import_export_decl): Likewise.
9606
9607         * decl.c (grokdeclarator): Don't complain about implicit int in
9608         a system header.  Change same-name field check to not complain in
9609         a system header instead of within extern "C".
9610
9611 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
9612
9613         * cp-tree.h (PUSH_GLOBAL): New macro.
9614         (PUSH_LOCAL): Likewise.
9615         (PUSH_USING): Likewise.
9616         (namespace_bindings_p): Declare.
9617         (push_overloaded_decl): Likewise.
9618         * decl.c (push_overloaded_decl): Don't make it static.  Check for
9619         illegal declarations after using declarations here.
9620         (namespace_bindings_p): Likewise.
9621         (duplicate_decls): Don't consider declarations from different
9622         namespaces to be the same.
9623         (pushdecl): Use symbolic PUSH_ constants in calls to
9624         push_overloaded_decl.
9625         (push_overloaded_decl_1): Likewise.
9626         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
9627         (do_nonmember_using_decl): Check for illegal using declarations
9628         after ordinary declarations here.
9629         (do_local_using_decl): Call pushdecl to insert declarations.
9630
9631 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
9632
9633         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
9634
9635 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
9636
9637         * tree.c (build_cplus_array_type_1): Don't call build_array_type
9638         for types involving template parameters.
9639
9640         * cp-tree.h (PARM_DECL_EXPR): Delete.
9641         (convert_default_arg): Change prototype.
9642         (check_default_argument): Declare.
9643         (search_tree): Likewise.
9644         * call.c (convert_default_arg): Take the function to which the
9645         default argument belongs as a parameter, and do any necessary
9646         instantiation here, instead of ...
9647         (build_over_call): Here.
9648         * decl.c (local_variable_p): New function.
9649         (check_default_argument): Likewise, split out and tidied from ...
9650         (grokparms): Here.
9651         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
9652         * pt.c (tsubst_call_declarator_parms): New function.
9653         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
9654         with CALL_EXPRs, rather than trying to be clever.
9655         (tsubst): Use tsubst_call_declarator_parms.
9656         * tree.c (search_tree): Don't make it static.
9657         * typeck.c (convert_arguments): Use new interface to
9658         convert_default_arg.
9659
9660 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
9661
9662         * error.c (dump_function_decl): Don't print the argument types for
9663         a function when the verbosity level is negative.
9664
9665         * call.c (build_over_call): Check format attributes at call-time.
9666
9667         * pt.c (tsubst_copy): Fix comment.
9668         (unify): Don't allow unification with variable-sized arrays.
9669
9670         * semantics.c (finish_stmt_expr): When processing a template make
9671         the BIND_EXPR long-lived.
9672
9673 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
9674
9675         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
9676         (import_export_vtable): Not here.
9677
9678 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
9679
9680         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
9681         non-static member function.
9682
9683 1999-01-18  Nathan Sidwell  <nathan@acm.org>
9684
9685         * class.c (instantiate_type): Only diagnose illegal address of member
9686         function if complaining.
9687
9688         * decl.c (lookup_name_real): Remove duplicate code.
9689
9690 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
9691
9692         * tree.c (copy_template_template_parm): Use permanent_obstack.
9693
9694 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
9695
9696         * pt.c (unify): Remove restrictions on deduction of argument
9697         of template template parameters.
9698
9699 1999-01-18  Nathan Sidwell  <nathan@acm.org>
9700
9701         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
9702
9703         * class.c (resolve_address_of_overloaded_function): Show list of
9704         all candidates, when none of them match.
9705
9706 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
9707
9708         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
9709         definition of 'casting away const' in reinterpret_cast<>.
9710
9711 1999-01-18  Graham  <grahams@rcp.co.uk>
9712
9713         * cvt.c: Add include for decl.h, remove extern for
9714         static_aggregates which is now provided by decl.h.
9715
9716         * Makefile.in (cvt.o): Add dependency for decl.h and missing
9717         dependencies for convert.h and flags.h.
9718
9719 1999-01-18  Nathan Sidwell  <nathan@acm.org>
9720
9721         * decl2.c (do_dtors): Set current location to that of the
9722         decl, for sensible diagnostics and debugging.
9723         (check_classfn): Issue `incomplete type' error, if
9724         class is not defined.
9725
9726 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
9727
9728         * cp-tree.h: Add prototype for bound_pmf_p.
9729
9730 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
9731             Manfred Hollstein <manfred@s-direktnet.de>
9732
9733         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
9734         -Wreturn-type.
9735
9736 1999-01-16  Nathan Sidwell  <nathan@acm.org>
9737
9738         * cp-tree.h (struct lang_type): Added has_mutable flag.
9739         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
9740         (TYPE_HAS_MUTABLE_P): New macro to read it.
9741         (cp_has_mutable_p): Prototype for new function.
9742         * class.c (finish_struct_1): Set has_mutable from members.
9743         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
9744         it contains a mutable.
9745         * typeck.c (cp_has_mutable_p): New function.
9746
9747 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
9748
9749         * pt.c (process_template_parm): Ignore top-level qualifiers on
9750         non-type parameters.
9751
9752         * decl.c (start_function): Use current_function_parms in the call
9753         to require_complete_type_for_parms, not the probably empty
9754         DECL_ARGUMENTS.
9755
9756 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
9757
9758         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
9759
9760         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
9761         that we don't suppress the other copies.
9762         * lex.c (handle_cp_pragma): Likewise.
9763
9764 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
9765
9766         * decl.c (grokdeclarator): Undo 1998-12-14 change.
9767         * tree.c (build_cplus_array_type_1): Likewise.
9768         * pt.c (instantiate_class_template): Remove misleading comment.
9769         (tsubst_aggr_type): Substitute if there are template parameters,
9770         regardless of whether or not they use template arguments.
9771         (unify): Likewise, but for unification.
9772
9773 1999-01-12  Richard Henderson  <rth@cygnus.com>
9774
9775         * cp-tree.h (flag_permissive): Declare extern.
9776
9777 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
9778
9779         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
9780         here.
9781         (lang_type): Add is_partial_instantiation.  Decrease width of
9782         dummy.
9783         (PARTIAL_INSTANTIATION_P): New macro.
9784         (OPERATOR_TYPENAME_P): Remove.
9785         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
9786         OPERATOR_TYPENAME_P.
9787         (grok_op_properties): Likewise.
9788         * friend.c (do_friend): Handle friends that are member functions
9789         correctly.
9790         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
9791         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
9792         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
9793         any more partial instantiation than is absolutely necessary for
9794         implicit typename.  Set PARTIAL_INSTANTIATION_P.
9795         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
9796         * semantics.c (begin_class_definition): Handle partial
9797         specializations of a type that was previously partially
9798         instantiated.
9799
9800 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
9801
9802         * g++spec.c (LIBSTDCXX): Provide default definition.
9803         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
9804
9805 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9806
9807         * Make-lang.in (g++.o): Depend on prefix.h.
9808
9809 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
9810
9811         * tree.c (bound_pmf_p): New fn.
9812         * typeck.c (build_c_cast): Use it.
9813
9814         * decl.c (grok_op_properties): Use same_type_p.
9815
9816 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9817
9818         * Makefile.in (cvt.o): Depend on toplev.h.
9819
9820         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
9821
9822         * cvt.c: Include toplev.h.
9823
9824         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
9825         definitions.
9826
9827         * init.c (expand_vec_init): Initialize variable `itype'.
9828
9829         * lex.c (yyerror): Cast the argument passed to a ctype function to
9830         an unsigned char.
9831
9832         * method.c (build_mangled_C9x_name): Wrap prototype and definition
9833         in "HOST_BITS_PER_WIDE_INT >= 64".
9834
9835         * typeck.c (build_binary_op): Mark parameter `convert_p' with
9836         ATTRIBUTE_UNUSED.
9837
9838 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
9839
9840         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
9841         * tree.c (build_exception_variant): Don't crash on empty throw
9842         specs.
9843
9844 1998-12-18  DJ Delorie  <dj@cygnus.com>
9845
9846         * cvt.c (convert_to_reference): Check for both error_mark_node
9847         and NULL_NODE after call to convert_for_initialization.
9848
9849 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
9850
9851         * error.c (interesting_scope_p): New fn.
9852         (dump_simple_decl): Use it.
9853         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
9854         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
9855
9856 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
9857
9858         * class.c (resolve_address_of_overloaded_function): Do conversion
9859         to correct type here, rather than ...
9860         (instantiate_type): Here.
9861
9862         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
9863         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
9864         (decl_template_parm_p): Remove.
9865         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
9866         parameter.
9867         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
9868         * pt.c (push_inline_template_parms_recursive): Set it.
9869         (decl_template_parm_p): Remove.
9870         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
9871         (process_template_parm): Set it.
9872
9873 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
9874
9875         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
9876         if configured with cpplib.
9877
9878 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
9879
9880         * decl.c (poplevel): Make sure ns_binding is initialized.
9881
9882         * decl.c (finish_function): Undo inadvertent change in previous
9883         patch.
9884
9885 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
9886
9887         * class.c (pushclass): Tweak handling of class-level bindings.
9888         (resolve_address_of_overloaded_function): Update pointer-to-member
9889         handling.
9890         (instantiate_type): Likewise.
9891         * cvt.c (cp_convert_to_pointer): Likewise.
9892         * decl.c (pop_binding): Take the DECL to pop, not just the name.
9893         Deal with `struct stat' hack.
9894         (binding_level): Add to documentation.
9895         (push_binding): Clear BINDING_TYPE.
9896         (add_binding): New function.
9897         (push_local_binding): Use it.
9898         (push_class_binding): Likewise.
9899         (poplevel): Adjust calls to pop_binding.
9900         (poplevel_class): Likewise.
9901         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
9902         declarations to current binding level.
9903         (push_class_level_binding): Likewise.
9904         (push_overloaded_decl): Adjust handling of OVERLOADs in local
9905         bindings.
9906         (lookup_namespace_name): Don't crash when confronted with a
9907         TEMPLATE_DECL.
9908         (lookup_name_real): Do `struct stat' hack in local binding
9909         contexts.
9910         (build_ptrmemfunc_type): Adjust documentation.
9911         (grokdeclarator): Don't avoid building real array types when
9912         processing templates unless really necessary.
9913         (finish_method): Adjust calls to pop_binding.
9914         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
9915         not reparse_decl_as_expr.
9916         (build_expr_from_tree): Deal with a template-id as the function to
9917         call in a METHOD_CALL_EXPR.
9918         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
9919         (maybe_adjust_types_For_deduction): Don't do peculiar things with
9920         METHOD_TYPEs here.
9921         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
9922         pointer-to-member types where necessary.
9923         * tree.c (build_cplus_array_type_1): Don't avoid building real
9924         array types when processing templates unless really necessary.
9925         (build_exception_variant): Compare the exception lists correctly.
9926
9927 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
9928
9929         * cp-tree.def (CPLUS_BINDING): Update documentation.
9930         * cp-tree.h (LOCAL_BINDING_P): New macro.
9931         (lang_identifier): Rename local_value to bindings.
9932         (tree_binding): Make `scope' of type `void*', not `tree'.
9933         (BINDING_SCOPE): Update documentation.
9934         (IDENTIFIER_LOCAL_VALUE): Remove.
9935         (IDENTIFIER_CLASS_VALUE): Document.
9936         (IDENTIFIER_BINDING): New macro.
9937         (IDENTIFIER_VALUE): Likewise.
9938         (TIME_IDENTIFIER_TIME): Likewise.
9939         (TIME_IDENTIFIER_FILEINFO): Likewise.
9940         (IMPLICIT_TYPENAME_P): Likewise.
9941         (set_identifier_local_value): Remove.
9942         (push_local_binding): New function.
9943         (push_class_binding): Likewise.
9944         * class.c (pushclass): Update comments; use push_class_binding.
9945         * decl.c (set_identifier_local_value_with_scope): Remove.
9946         (set_identifier_local_value): Likewise.
9947         (push_binding): New function.
9948         (pop_binding): Likewise.
9949         (binding_level): Update documentation.  Remove shadowed.
9950         (BINDING_LEVEL): New macro.
9951         (free_binding_nodes): New variable.
9952         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
9953         BLOCK_VARs when doing for-scope extension.  Remove effectively
9954         dead code.
9955         (pushlevel_class): Tweak formatting.
9956         (poplevel_class): Adjust for new name-lookup scheme.
9957         (print_binding_level): Likewise.
9958         (store_bindings): Likewise.
9959         (pushdecl): Likewise.
9960         (pushdecl_class_level): Likewise.
9961         (push_class_level_binding): Likewise.
9962         (push_overloaded_decl): Update comments.  Adjust for new
9963         name-lookup scheme.
9964         (lookup_name_real): Likewise.
9965         (lookup_name_current_level): Likewise.
9966         (cp_finish_decl): Likewise.
9967         (require_complete_types_for_parms): Likewise.  Remove misleading
9968         #if 0'd code.
9969         (grok_parms): Likewise.  Don't call
9970         require_complete_types_for_parms here.
9971         (grok_ctor_properties): Don't treat templates as copy
9972         constructors.
9973         (grop_op_properties): Or as assignment operators.
9974         (start_function): Document.  Adjust for new name-lookup scheme.
9975         (finish_function): Likewise.
9976         * decl2.c (do_local_using_decl): Use push_local_binding.
9977         * lex.c (begin_definition_of_inclass_inline): New function, split
9978         out from ...
9979         (do_pending_inlines): Here, and ...
9980         (process_next_inline): Here.
9981         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
9982         (init_filename_times): Likewise.
9983         (extract_interface_info): Likewise.
9984         (ste_typedecl_interface_info): Likewise.
9985         (check_newline): Likewise.
9986         (dump_time_statistics): Likewise.
9987         (handle_cp_pragma): Likewise.
9988         (do_identifier): Adjust for new name-lookup scheme.
9989         * parse.y (function_try_block): Return ctor_initializer_opt value.
9990         (fndef): Use it.
9991         (fn.defpen): Pass appropriate values to start_function.
9992         (pending_inline): Use functor_try_block value, and pass
9993         appropriate values to finish_function.
9994         * pt.c (is_member_template): Update documentation; remove handling
9995         of FUNCTION_DECLs.  As per name, this function should deal only in
9996         TEMPLATE_DECLs.
9997         (decl_template_parm_p): Change name of olddecl parameter to decl.
9998         (check_template_shadow): Adjust for new name-lookup scheme.
9999         (lookup_template_class): Likewise.
10000         (tsubst_decl): Tweak so as not to confuse member templates with
10001         copy constructors and assignment operators.
10002         (unify): Handle UNION_TYPEs.
10003         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
10004         (lang_print_xnode): Adjust for new name-lookup scheme.
10005         * typeck.c (mark_addressable): Likewise.
10006         (c_expand_return): Likewise.
10007
10008 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
10009
10010         * decl.c (grokdeclarator): Allow field with same name as class
10011         in extern "C".
10012
10013         * decl.c (lookup_name_real): Don't limit field lookup to types.
10014         * class.c (check_member_decl_is_same_in_complete_scope): No error
10015         if icv and x are the same.
10016         * lex.c (do_identifier): Tweak error message.
10017
10018 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
10019
10020         * decl.c (start_enum): Use push_obstacks, not
10021         end_temporary_allocation.
10022         (finish_enum): Call pop_obstacks.
10023
10024 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
10025
10026         * class.c (instantiate_type): Return error_mark_node rather than
10027         junk.
10028
10029 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
10030
10031         * cp-tree.h (most_specialized_instantiation): New function.
10032         (print_candidates): Likewise.
10033         * class.c (validate_lhs): Remove.
10034         (resolve_address_of_overloaded_function): New function, split out
10035         and then substantially reworked, from ...
10036         (instantiate_type): Use it.  Simplify.
10037         * cvt.c (convert_to_reference): Complain when caller has indicated
10038         that's the right thing to do.  Don't crash if instantiate_type
10039         fails.
10040         * pt.c: Substitute `parameters' for `paramters' throughout.
10041         (print_candidates): Don't make it static.
10042         (most_specialized_instantiation): Split out from ...
10043         (most_specialized): Here.
10044
10045 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
10046
10047         * lex.c (lang_init_options): Initialize cpplib.
10048         * decl2.c (parse_options,cpp_initialized): Removed.
10049         (lang_decode_option): Move initialization of cpplib to
10050         lang_init_options.
10051
10052 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
10053
10054         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
10055         well as the TYPE_DECL, when a typedef name is assigned to a
10056         previously anonymous type.
10057
10058 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
10059
10060         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
10061         __cp_eh_info for getting the eh info pointer.  Add table_index to
10062         field list.
10063         (push_eh_cleanup): Don't increment 'handlers' data field.
10064         (process_start_catch_block): Don't set the 'caught' field.
10065
10066         * cp/exception.cc (CP_EH_INFO): New macro for getting the
10067         exception info pointer within library routines.
10068         (__cp_eh_info): Use CP_EH_INFO.
10069         (__start_cp_handler): Get exception info pointer, set caught field,
10070         and increment the handlers field.  Avoids this being done by handlers.
10071         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
10072         (uncaught_exception): Use CP_EH_INFO macro.
10073
10074 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
10075
10076         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
10077
10078 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
10079
10080         * lex.c (check_newline): Add support for \ as `natural'
10081         characters in file names in #line to be consistent with #include
10082         handling.  We support escape processing in the # 1 "..." version of
10083         the command.  See also support in cp/lex.c.
10084
10085 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
10086
10087         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
10088         structure.
10089
10090 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
10091
10092         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
10093
10094         * error.c (dump_simple_decl): Also print namespace context.
10095         (dump_function_decl): Likewise.
10096
10097         * decl2.c (ambiguous_decl): Don't print old value if it's
10098         error_mark_node.
10099
10100         * decl.c (lookup_name_real): Fix handling of local types shadowed
10101         by a non-type decl.  Remove obsolete code.
10102         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
10103
10104         * lang-options.h: Add -fpermissive.
10105         * decl2.c: Likewise.
10106         * cp-tree.h: Add flag_permissive.
10107         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
10108         were specified, set flag_pedantic_errors.
10109         * call.c (build_over_call): Turn dropped qualifier messages
10110         back into pedwarns.
10111         * cvt.c (convert_to_reference): Likewise.
10112         * typeck.c (convert_for_assignment): Likewise.
10113
10114 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
10115
10116         * decl2.c (coerce_new_type): Use same_type_p.
10117         (coerce_delete_type): Likewise.
10118
10119         * call.c (check_dtor_name): Return 1, not error_mark_node.
10120
10121 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
10122
10123         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
10124         if MULTIPLE_SYMBOL_SPACES.
10125
10126         * pt.c (check_template_shadow): New fn.
10127         * decl2.c (grokfield): Use it.
10128         * decl.c (pushdecl): Likewise.
10129         (pushdecl_class_level): Likewise.
10130         (start_method): Likewise.
10131         (xref_tag): Don't try to use 't' if we're defining.
10132
10133         * call.c (check_dtor_name): Just return an error_mark_node.
10134         * pt.c (lookup_template_class): Complain about using non-template here.
10135         * parse.y (apparent_template_type): Not here.
10136
10137         * pt.c (check_explicit_specialization): Complain about specialization
10138         with C linkage.
10139
10140         * lang-options.h: Add -f{no-,}implicit-inline-templates.
10141
10142         * pt.c (convert_nontype_argument): Don't assume that any integer
10143         argument is intended to be a constant-expression.
10144
10145 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
10146
10147         * class.c (handle_using_decl): Fix comment.  Don't lookup
10148         constructors in base classes.
10149         (validate_lhs): Fix typo in comment.
10150         * search.c (lookup_field_1): Don't return a USING_DECL.
10151
10152         * cp-tree.h (DECL_ACCESS): Improve documentation.
10153
10154         * decl.c (expand_static_init): Don't set the initialization-done
10155         flag until the initialization is done.
10156
10157 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
10158
10159         * decl2.c (validate_nonmember_using_decl): Complain about using
10160         declarations for class members.
10161
10162 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
10163
10164         * typeck2.c (process_init_constructor): Use same_type_p.
10165
10166         * decl.c (check_tag_decl): Don't warn about null decl inside a
10167         class.
10168
10169         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
10170         UNIFY_ALLOW_NONE.
10171         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
10172         (resolve_overloaded_unification): Strip baselinks.
10173
10174 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10175
10176         * g++spec.c: Don't prototype xmalloc.
10177
10178 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
10179
10180         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
10181
10182         * decl.c (check_tag_decl): Do complain about null friend decl at
10183         file scope.
10184
10185 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
10186
10187         * lex.c (make_lang_type): Clear the whole struct lang_type, not
10188         only the first multiple of sizeof (int).
10189
10190 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
10191
10192         * decl.c (start_decl): An explicit specialization of a static data
10193         member is only a definition if it has an initializer.
10194
10195         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
10196         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
10197         cp_finish_decl.
10198         * init.c (expand_default_init): Check for DIRECT_BIND instead of
10199         DECL_ARTIFICIAL.
10200
10201         * call.c (build_over_call): Use build_decl.
10202
10203         * except.c (expand_throw): Just use convert, not
10204         build_reinterpret_cast.
10205
10206         * lex.c (handle_generic_pragma): Use token_buffer.
10207
10208         * decl.c (check_tag_decl): Don't complain about null friend decl.
10209
10210 1998-11-24  Dave Pitts  <dpitts@cozx.com>
10211
10212         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
10213         first position.
10214         * lex.c (check_newline): Use ISALPHA.
10215         (readescape): Use ISGRAPH.
10216         (yyerror): Use ISGRAPH.
10217
10218 1998-11-24  Nathan Sidwell  <nathan@acm.org>
10219
10220         * search.c (get_abstract_virtuals): Do not use initial
10221         CLASSTYPE_ABSTRACT_VIRTUALS.
10222         * typeck2.c (abstract_virtuals_error): Show location of abstract
10223         declaration.
10224         * call.c (build_new_method_call): Use
10225         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
10226         * class.c (finish_struct_bits): Don't bother working out whether
10227         get_abstract_virtuals will do anything, just do it.
10228
10229 1998-11-24  Graham  <grahams@rcp.co.uk>
10230
10231         * typeck.c (build_component_ref): Remove unused statement.
10232
10233 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
10234
10235         * class.c (add_method): Catch invalid overloads.
10236
10237         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
10238         * search.c (lookup_conversions): Handle getting real OVERLOADs.
10239         (add_conversions): Likewise.  Revert last change.
10240         * call.c (add_conv_candidate): Pass totype to add_candidate instead
10241         of fn.  Don't add a new candidate if the last one was for the same
10242         type.
10243         (print_z_candidates): Handle getting a type as a function.
10244         (joust): If we got two conversion candidates to the same type,
10245         just pick one.
10246         (build_object_call): Lose 'templates'.
10247         (build_user_type_conversion_1): Handle getting real OVERLOADs.
10248
10249 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
10250
10251         * typeck2.c (process_init_constructor): If there are elements
10252         that don't have initializers and they need to have constructors
10253         run, supply them with initializers.
10254
10255         * class.c (finish_struct_1): A class with a 0-width bitfield is
10256         still empty.
10257
10258 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
10259
10260         * pt.c (instantiate_class_template): Don't try to figure out what
10261         specialization to use for a partial instantiation.  Correct
10262         typos in a couple of comments.  Avoid calling uses_template_parms
10263         multiple times.
10264
10265 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
10266
10267         * method.c (process_overload_item): Add call to
10268         build_mangled_C9x_name for intTI_type_nodes.
10269         (build_mangled_C9x_name): Add prototype, define.
10270         * decl.c (init_decl_processing): Add names for
10271         TImode_type_node.
10272
10273 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
10274
10275         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
10276
10277         * class.c (finish_struct_1): Set things up for 0-width bitfields
10278         like we do for others.
10279
10280         * decl.c (check_tag_decl): New fn.
10281         (shadow_tag): Split out from here.
10282         * decl2.c (grok_x_components): Call it.
10283
10284 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
10285
10286         * decl.c: Lose warn_about_return_type.
10287         (grokdeclarator): Always complain about implicit int, except for
10288         `main () { ... }'.
10289
10290         * decl.c (tag_name): New fn.
10291         (xref_tag): Complain about using typedef-name after class-key.
10292
10293         * init.c (expand_vec_init): Also keep going if from_array.
10294
10295         * tree.c (is_overloaded_fn): Also handle the output of
10296         build_offset_ref.
10297
10298         * decl.c (grokdeclarator): Use constructor_name when comparing
10299         field name against enclosing class.
10300         * class.c (finish_struct_anon): Likewise.
10301
10302 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
10303
10304         * decl.c (poplevel): Remove code to handle KEEP == 2.
10305         (finish_function): Don't confuse BLOCK-order when
10306         processing a destructor.
10307
10308 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
10309
10310         * decl.c (require_complete_types_for_parms): Call layout_decl
10311         after we've completed the type.
10312
10313 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10314
10315         * decl2.c (validate_nonmember_using_decl): Allow using templates
10316         from the global namespace.
10317
10318 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
10319
10320         Handle specifying template args to member function templates.
10321         * tree.c (build_overload): Always create an OVERLOAD for a template.
10322         * search.c (add_conversions): Handle finding an OVERLOAD.
10323         * decl2.c (check_classfn): Likewise.
10324         * lex.c (identifier_type): See through a baselink.
10325         * parse.y (do_id): Don't call do_identifier if we got a baselink.
10326         * class.c (instantiate_type, case TREE_LIST): Recurse.
10327
10328         * decl.c (grokdeclarator): Allow a boolean constant for array
10329         bounds, odd as that sounds.
10330
10331         * pt.c (unify): Be more strict about non-type parms, except for
10332         array bounds.
10333         (UNIFY_ALLOW_INTEGER): New macro.
10334
10335 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
10336
10337         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
10338
10339 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
10340
10341         * semantics.c (begin_class_definition): Call
10342         maybe_process_partial_specialization before push_template_decl.
10343         Don't call push_template_decl for a specialization.
10344         * search.c (lookup_field): Do return a member template class.
10345         * decl2.c (handle_class_head): Handle member template classes.
10346
10347         * decl.c (grokdeclarator): A parm type need not be complete.
10348
10349         * pt.c (convert_nontype_argument): Fix thinko.
10350
10351 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
10352
10353         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
10354         (global_delete_fndecl): New variable.
10355         * decl.c (global_delete_fndecl): Define it.
10356         (init_decl_processing): Set it.
10357         * init.c (build_builtin_delete_call): Use it.
10358         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
10359         nodes.
10360
10361 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
10362
10363         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
10364         type.
10365
10366         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
10367         * call.c (build_object_call): Also support references to functions.
10368         * typeck.c (convert_for_initialization): Don't decay a function
10369         if the target is a reference to function.
10370
10371         * search.c (add_conversions): Get all the overloads from a class.
10372
10373         * decl.c (grok_ctor_properties): Complain about any constructor
10374         that will take a single arg of the class type by value.
10375
10376         * typeck2.c (build_functional_cast): Can't create objects of
10377         abstract classes this way.
10378         * cvt.c (ocp_convert): Likewise.
10379
10380         * decl.c (grokfndecl): Member functions of local classes are not
10381         public.
10382
10383 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
10384
10385         * Make-lang.in (cc1plus): Add dependency on hash.o.
10386
10387 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
10388
10389         * search.c (get_abstract_virtuals): Complain about virtuals with
10390         no final overrider.
10391         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
10392         with no final overrider.
10393         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
10394         on virtuals with no final overrider.
10395
10396         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
10397
10398         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
10399         after layout_type.
10400
10401         * friend.c (do_friend): Don't set_mangled_name_for_decl.
10402
10403         * class.c (finish_struct_anon): Complain about non-fields.
10404         * decl2.c (build_anon_union_vars): Likewise.
10405
10406         * decl.c (grokdeclarator): Normal data members can't have the same
10407         name as the class, either.
10408         * class.c (finish_struct_anon): Neither can members of an
10409         anonymous union.
10410
10411 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
10412
10413         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
10414         (TYPE_BINFO): Likewise.
10415         (IS_AGGR_TYPE): Tweak.
10416         (SET_IS_AGGR_TYPE): New macro.
10417         (CLASS_TYPE_P): Tweak.
10418         (lang_type): Group mark bitfields together.  Remove linenum.
10419         (CLASSTYPE_SOURCE_LINE): Remove macro.
10420         (CLASSTYPE_MARKED_N): New macro.
10421         (SET_CLASSTYPE_MARKED_N): Likewise.
10422         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
10423         (CLASS_TYPE_MARKED_*): Use them.
10424         (SET_CLASSTYPE_MARKED_*): Likewise.
10425         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
10426         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
10427         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
10428         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
10429         * class.c (class_cache_obstack): New variable.
10430         (class_cache_firstobj): Likewise.
10431         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
10432         (pushclass): Free the cache, when appropriate.
10433         (popclass): Tidy.
10434         (maybe_push_cache_obstack): Use class_cache_obstack.
10435         * decl.c (include hash.h).
10436         (typename_hash): New function.
10437         (typename_compare): Likewise.
10438         (build_typename_type): Check the hash table to avoid creating
10439         duplicates.
10440         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
10441         (grokdeclarator): Use CLASS_TYPE_P.
10442         (xref_basetypes): Likewise.
10443         (start_function): Likewise.  Don't put current_class_ref on the
10444         permanent obstack.
10445         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
10446         and TYPE_TI_ARGS.
10447         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
10448         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
10449         fields for types other than class types.  Do clear TYPE_ALIAS_SET
10450         for types other than class types, though.
10451         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
10452         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10453         * pt.c (process_template_parm): Don't set
10454         CLASSTYPE_GOT_SEMICOLON.
10455         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10456         Coerce arguments on the momentary obstack.
10457         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10458         (instantiate_class_template): Calculate template arguments on the
10459         momentary obstack.  Tidy.
10460         (tsubst_template_arg_vector): Use make_temp_vec.
10461         (tsubst_aggr_type): Put template arguments on the momentary
10462         obstack.
10463         (tsubst_decl): Likewise.
10464         (tsubst): Copy the array bounds index to the permanent obstack
10465         before building index types.  Use new macros.
10466         (unify): Use new macros.
10467         (do_type_instantiation): Likewise.
10468         * search.c (lookup_fnfields_1): Use new macros.
10469         (dfs_pushdecls): Build envelopes on the cache obstack.
10470         (dfs_compress_decls): Use new macros.
10471         (push_class_decls): Build on the cache obstack.
10472         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
10473         * sign.c (build_signature_pointer_or_reference_type): Use
10474         SET_IS_AGGR_TYPE.
10475         * tree.c (make_binfo): Check CLASS_TYPE_P.
10476         (copy_template_template_parm): Adjust.
10477         (make_temp_vec): Use push_expression_obstack.
10478         * typeck.c (complete_type): Use new macros.
10479         (comptypes): Likewise.
10480
10481 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
10482
10483         * pt.c (tsubst): Add diagnostics for invalid array, reference
10484         and pointer to member types.
10485
10486 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
10487
10488         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
10489
10490         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
10491         Simplify.
10492
10493         * parse.y (structsp): Fix cut-and-paste error.
10494
10495         * init.c (build_new): Complain about non-integral size.
10496
10497         * parse.y (unary_expr): Complain about defining types in sizeof.
10498
10499         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
10500
10501         * rtti.c (build_x_typeid): Complain about typeid without
10502         including <typeinfo>.
10503         (get_typeid): Likewise.  Complain about typeid of incomplete type.
10504         (get_tinfo_fn_dynamic): Likewise.
10505         (get_typeid_1): Not static anymore.
10506         * except.c (build_eh_type_type): Use get_typeid_1.
10507
10508         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
10509         ambiguous or private bases.  Fix warning for reference cast.
10510
10511 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
10512
10513         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
10514         * decl.c (duplicate_decls): Remove special-case code to deal with
10515         template friends, and just do the obvious thing.
10516         * pt.c (register_specialization): Tweak for clarity, and also to
10517         clear DECL_INITIAL for an instantiation before it is merged with a
10518         specialization.
10519         (check_explicit_specialization): Fix indentation.
10520         (tsubst_friend_function): Handle both definitions in friend
10521         declaration and outside friend declarations.
10522         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
10523         (regenerate_decl_from_template): Tweak accordingly.
10524         (instantiate_decl): Likewise.
10525
10526 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
10527
10528         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
10529         member function reference to error.
10530         * cvt.c (ocp_convert): Complain about converting an overloaded
10531         function to void.
10532
10533         * init.c (build_offset_ref): Just return a lone static member
10534         function.
10535
10536         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
10537         not internal ones.
10538
10539         * typeck.c (build_binary_op_nodefault): Improve error handling.
10540
10541         * decl.c (grokfndecl): Complain about making 'main' a template.
10542
10543         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
10544
10545         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
10546         TYPE_DECL in a template.
10547
10548 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
10549
10550         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
10551
10552         * decl.c (struct cp_function): Add named_label_uses.
10553         (push_cp_function_context): Save it.
10554         (pop_cp_function_context): Restore it.
10555         (define_label): Also complain about jumping into the scope of
10556         non-POD objects that don't have constructors.
10557         * tree.c (pod_type_p): New fn.
10558
10559         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
10560         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
10561         (get_tinfo_fn): Not here.
10562         * repo.c (repo_get_id): Abort if we get called for an incomplete
10563         type.
10564
10565 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
10566
10567         * except.c (expand_throw): Make sure first argument to
10568         __cp_push_exception is of type `void*' to avoid spurious error
10569         messages.
10570
10571 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
10572
10573         * pt.c (try_one_overload): Take orig_targs again.  Only check for
10574         mismatches against them; we don't care what a previous call found.
10575         (resolve_overloaded_unification): Adjust.
10576
10577         * search.c (lookup_field): Don't return anything for a non-type
10578         field from a dependent type.
10579         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
10580         in an array declarator.
10581         (start_decl): Push into the class before looking for the field.
10582
10583 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
10584
10585         * method.c (build_overload_value): Handle REFERENCE_TYPE.
10586
10587 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10588
10589         * decl.c (grokdeclarator): Allow namespace-scoped members if they
10590         are friends.
10591
10592 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
10593
10594         * pt.c (tsubst_decl): Don't mess with the global value of an
10595         un-mangled DECL_ASSEMBLER_NAME.
10596
10597 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
10598
10599         * decl.c (init_decl_processing): Remove CYGWIN conditional
10600         since CYGWIN is now able to deal with trapping signals.
10601
10602 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10603
10604         * cp-tree.h: Don't include gansidecl.h.
10605         * exception.cc: Include gansidecl.h (since we don't include config.h)
10606         * g++spec.c: Don't include gansidecl.h.
10607
10608 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
10609
10610         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
10611         size of dummy.
10612         (DECL_DEFINED_IN_CLASS_P): New macro.
10613         (TEMPLATE_PARMS_FOR_INLINE): Document.
10614         (check_static_variable_definition): New function.
10615         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
10616         appropriate.
10617         (check_static_variable_definition): Split out from ...
10618         (grokdeclarator): Here.
10619         * pt.c (check_default_tmpl_args): New function, split out from ...
10620         (push_template_decl_real): Here.
10621         (instantiate_template): Fix comment.
10622
10623 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
10624
10625         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
10626         (CP_TYPE_VOLATILE_P): Likewise.
10627         (CP_TYPE_RESTRICT_P): Likewise.
10628
10629 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
10630
10631         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
10632
10633 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
10634
10635         * class.c (instantiate_type): Be more helpful.
10636
10637         * decl2.c (import_export_decl): Call import_export_class.
10638
10639         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
10640         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
10641         * pt.c (tsubst_copy): Likewise.
10642
10643 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
10644
10645         * init.c (expand_vec_init): Fix off-by-one error.
10646
10647 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
10648
10649         * parse.y (apparent_template_type): New type.
10650         (named_complex_class_head_sans_basetype): Use it.
10651         * Makefile.in (CONFLICTS): One new conflict.
10652         * parse.c: Regenerated.
10653
10654 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
10655
10656         * cp-tree.h (COMPARE_STRICT): New macro.
10657         (COMPARE_BASE): Likewise.
10658         (COMPARE_RELAXED): Likewise.
10659         (COMPARE_REDECLARATION): Likewise.
10660         (same_type_p): Likewise.
10661         (same_or_base_type_p): Likewise.
10662         * call.c (standard_conversion): Use them, in place of comptypes
10663         with numeric arguments.
10664         (reference_binding): Likewise.
10665         (convert_like): Likewise.
10666         (build_over_call): Likewise.
10667         (is_subseq): Likewise.
10668         (is_properly_derived_from): Likewise.
10669         (compare_ics): Likewise.
10670         (joust): Likewise.
10671         * class.c (delete_duplicate_fields_1): Likewise.
10672         (resolves_to_fixed_type_p): Likewise.
10673         (instantiate_type): Likewise.  Remove #if 0'd code.
10674         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
10675         (pushdecl): Likewise.
10676         (lookup_name_real): Likewise.
10677         (grokdeclarator): Likewise.  Check for illegal array declarations.
10678         (grokparms): Likewise.
10679         (grok_op_properties): Likewise.
10680         * decl2.c (check_classfn): Likewise.
10681         * friend.c (is_friend): Likewise.
10682         (make_friend_class): Likewise.
10683         * init.c (expand_aggr_init): Likewise.
10684         (expand_vec_init): Likewise.
10685         * pt.c (is_member_template_class): Remove declaration.
10686         (is_specialization_of): Use COMPARE_* and new macros.
10687         (comp_template_parms): Likewise.
10688         (convert_nontype_argument): Likewise.
10689         (coerce_template_template_parms): Likewise.
10690         (template_args_equal): Likewise.
10691         (lookup_template_class): Likewise.
10692         (type_unification_real): Likewise.
10693         (unify): Likewise.
10694         (get_bindings_real): Likewise.
10695         * search.c (covariant_return_p): Likewise.
10696         (get_matching_virtual): Likewise.
10697         * sig.c (match_method_types): Likewise.
10698         * tree.c (vec_binfo_member): Likewise.
10699         (cp_tree_equal): Likewise.
10700         * typeck.c (common_type): Likewise.
10701         (comp_array_types): Likewise.  Get issues involving unknown array
10702         bounds right.
10703         (comptypes): Update comments.  Use new flags.
10704         (comp_target_types): Use new macros.
10705         (compparms): Likewise.
10706         (comp_target_parms): Likewise.
10707         (string_conv_p): Likewise.
10708         (build_component_ref): Likewise.
10709         (build_indirect_ref): Likewise.
10710         (build_conditional_expr): Likewise.
10711         (build_static_cast): Likewise.
10712         (build_reinterpret_cast): Likewise.
10713         (build_const_cast): Likewise.
10714         (build_modify_expr): Likewise.
10715         (convert_for_assignment): Likewise.
10716         (comp_ptr_ttypes_real): Likewise.
10717         (ptr_reasonably_similar): Likewise.
10718         (comp_ptr_ttypes_const): Likewise.
10719
10720 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
10721
10722         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
10723
10724 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
10725
10726         * decl2.c (delete_sanity): Pass integer_zero_node, not
10727         integer_two_node, to build_vec_delete.
10728         * init.c (build_array_eh_cleanup): Remove.
10729         (expand_vec_init_try_block): New function.
10730         (expand_vec_init_catch_clause): Likewise.
10731         (build_vec_delete_1): Don't deal with case that auto_delete_vec
10732         might be integer_two_node anymore.
10733         (expand_vec_init): Rework for initialization-correctness and
10734         exception-correctness.
10735         * typeck2.c (process_init_constructor): Make mutual exclusivity
10736         of cases more obvious.
10737
10738 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
10739
10740         * decl.c (lookup_name_real): OK, only warn if not lexing.
10741         Simplify suggested fix.
10742
10743         * cp-tree.h (IDENTIFIER_MARKED): New macro.
10744         * search.c (lookup_conversions): Use breadth_first_search.
10745         (add_conversions): Avoid adding two conversions to the same type.
10746         (breadth_first_search): Work with base binfos, rather
10747         than binfos and base indices.
10748         (get_virtual_destructor): Adjust.
10749         (tree_has_any_destructor_p): Adjust.
10750         (get_matching_virtual): Adjust.
10751
10752         * pt.c (push_template_decl_real): Generalize check for incorrect
10753         number of template parms.
10754         (is_member_template_class): #if 0.
10755
10756 1998-10-29  Richard Henderson  <rth@cygnus.com>
10757
10758         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
10759         last.
10760
10761 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
10762
10763         * lex.c: Call check_newline from lang_init always.  After
10764         calling cpp_start_read, set yy_cur and yy_lim to read from the
10765         cpplib token buffer.
10766
10767 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
10768
10769         * class.c (instantiate_type): Don't consider templates for a normal
10770         match.
10771
10772         * class.c (finish_struct_1): Don't complain about non-copy
10773         assignment ops in union members.
10774
10775         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
10776         (prepare_fresh_vtable): Likewise.
10777         (finish_struct_1): Don't call import_export_class.
10778         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
10779         (finish_prevtable_vardecl): Lose.
10780         (finish_file): Don't call it.
10781         * pt.c (instantiate_class_template): Likewise.
10782         * cp-tree.h: Remove it.
10783
10784         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
10785         * decl.c (finish_function): Not here.
10786         (start_function): Do set DECL_INITIAL.
10787
10788         * pt.c (push_template_decl_real): Complain about default template
10789         args for enclosing classes.
10790
10791         * call.c (add_function_candidate): Treat conversion functions
10792         as coming from the argument's class.
10793         * cp-tree.h (DECL_CONV_FN_P): New fn.
10794         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
10795         * class.c (add_method): Use DECL_CONV_FN_P.
10796         * decl2.c (check_classfn): Likewise.
10797         * error.c (dump_function_name): Likewise.
10798         (dump_function_decl): Likewise.
10799         * pt.c (fn_type_unification): Likewise.
10800         * search.c (add_conversions): Likewise.
10801
10802 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
10803
10804         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
10805         * method.c (hack_identifier): Also check for using RESULT_DECL
10806         from outer context.
10807
10808 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
10809
10810         * decl.c (grokdeclarator): Use type_quals, rather than constp,
10811         consistently.
10812
10813 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
10814
10815         * call.c (standard_conversion): instantiate_type here.
10816         (reference_binding): And here.
10817         (implicit_conversion): Not here.
10818         (build_op_delete_call): No need to cons up an OVERLOAD.
10819         * cvt.c (cp_convert_to_pointer): instantiate_type here.
10820         (convert_to_reference): And here.
10821         * decl.c (grok_reference_init): Not here.
10822         (grokparms): Or here.
10823         * typeck2.c (digest_init): Or here.
10824         * typeck.c (decay_conversion): Take the address of overloaded
10825         functions, too.
10826         (require_instantiated_type): Lose.
10827         (convert_arguments): Don't handle unknown types here.
10828         (build_c_cast): Likewise.
10829         (build_binary_op): Gut.
10830         (build_conditional_expr): Don't require_instantiated_type.
10831         (build_modify_expr): Likewise.
10832         (build_static_cast): Don't instantiate_type.
10833         (build_reinterpret_cast): Likewise.
10834         (build_const_cast): Likewise.
10835         (convert_for_initialization): Likewise.
10836         (build_ptrmemfunc): Use type_unknown_p.
10837         (convert_for_assignment): Also do default_conversion on overloaded
10838         functions.  Hand them off to ocp_convert.
10839
10840 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
10841
10842         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
10843         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
10844
10845         * class.c (finish_struct_1): Use build_cplus_array_type to build
10846         array types.
10847         * decl.c (init_decl_processing): Likewise.
10848         * except.c (expand_end_eh_spec): Likewise.
10849         * search.c (expand_upcast_fixups): Simplify very slightly.
10850
10851 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
10852
10853         * decl.c (grokdeclarator): Complain about a variable using
10854         constructor syntax coming back null from start_decl.
10855
10856         * friend.c (make_friend_class): Complain about trying to make
10857         a non-class type a friend.
10858
10859         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
10860         (start_function): Not here.
10861
10862 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
10863
10864         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
10865
10866 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
10867
10868         * typeck2.c (process_init_constructor): Only skip anonymous fields
10869         if they are bitfields.
10870
10871         * cp-tree.def (TYPEOF_TYPE): New code.
10872         * error.c (dump_type_real): Handle it.
10873         * pt.c (tsubst): Likewise.
10874         * tree.c (search_tree): Likewise.
10875         * semantics.c (finish_typeof): New fn.
10876         * parse.y (typespec): Use it.
10877         * cp-tree.h: Declare it.
10878
10879 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
10880
10881         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
10882
10883 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
10884
10885         * typeck.c (convert_arguments): Don't handle pmf references
10886         specially.
10887
10888         * init.c (build_member_call): Don't try to convert to the base type
10889         if it's ambiguous or pedantic.
10890
10891         * typeck2.c (check_for_new_type): Only depend on pedantic for
10892         C-style casts.
10893
10894 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
10895
10896         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
10897         non-converting constructors.
10898
10899 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10900
10901         * gxxint.texi: Correct documentation for n, N, Q, and B.
10902
10903 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10904
10905         * parse.y (condition): Convert VAR_DECL from reference to indirect
10906         reference.
10907
10908 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
10909
10910         * exception.cc (__cp_pop_exception): Free the original exception
10911         value, not the potentially coerced one.
10912
10913 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
10914
10915         * Makefile.in (hash.h): Run gperf when necessary.
10916
10917         * cp-tree.h (CP_TYPE_READONLY): Remove.
10918         (CP_TYPE_VOLATILE): Likewise.
10919         (CP_TYPE_QUALS): New macro.
10920         (CP_TYPE_CONST_P): Likewise.
10921         (CP_TYPE_VOLATILE_P): Likewise.
10922         (CP_TYPE_RESTRICT_P): Likewise.
10923         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
10924         (cp_build_type_variant): Rename to ...
10925         (cp_build_qualified_type): New function.
10926         (c_apply_type_quals_to_decl): Declare.
10927         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
10928         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
10929         (cp_type_qual_from_rid): New function.
10930         (compparms): Remove unused parameter.  All callers changed.
10931         (cp_type_quals): New function.
10932         (at_least_as_qualified_p): Likewise.
10933         (more_qualified_p): Likewise.
10934
10935         * call.c (standard_conversion): Replace calls to
10936         cp_build_type_variant with cp_build_qualified_type.  Use
10937         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
10938         compare them.  Use CP_TYPE_* macros to check qualifiers.
10939         (reference_binding): Likewise.
10940         (implicit_conversion): Likewise.
10941         (add_builtin_candidates): Likewise.
10942         (build_over_call): Likewise.
10943         * class.c (overrides): Compare all qualifiers, not just `const',
10944         on method declarations.
10945         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
10946         (convert_pointer_to_real): Likewise.
10947         (type_promotes_to): Likewise.
10948         * decl.c (check_for_uninitialized_const_var): New function.
10949         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
10950         (cp_finish_decl): Use check_for_uninitialized_const_var.
10951         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
10952         handle `restrict'.
10953         (grok_ctor_properties): Likewise.
10954         (grok_op_properties): Likewise.
10955         (start_function): Likewise.
10956         (rever_static_member_fn): Likewise.
10957         * decl2.c (grok_method_quals): Likewise.
10958         (grokfield): Likewise.
10959         * error.c (dump_readonly_or_volatile): Rename to ...
10960         (dump_qualifiers): New function.  Handle `restrict'.
10961         (dump_type_real): Use it.
10962         (dump_aggr_type): Likewise.
10963         (dump_type_prefix): Likewise.
10964         (dump_type_suffix): Likewise.
10965         (dump_function_decl): Likewise.
10966         (cv_as_string): Likewise.
10967         * gxx.gperf: Add __restrict and __restrict__.
10968         * gxxint.texi: Document `u' as used for `__restrict', and a few
10969         other previously undocumented codes.
10970         * hash.h: Regenerated.
10971         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
10972         (build_member_call): Likewise.
10973         (build_new_1): Likewise.
10974         * lex.c (init_parse): Add entry for RID_RESTRICT.
10975         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
10976         (cp_type_qual_from_rid): Define.
10977         * lex.h (enum rid): Add RID_RESTRICT.
10978         * method.c (process_modifiers): Deal with `restrict'.
10979         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
10980         * parse.c: Regenerated.
10981         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
10982         (tsubst_aggr_type): Likewise.
10983         (tsubst): Likewise.
10984         (check_cv_quals_for_unify): Likewise.
10985         (unify): Likewise.
10986         * rtti.c (init_rtti_processing): Likewise.
10987         (build_headof): Likewise.
10988         (get_tinfo_var): Likewise.
10989         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
10990         (expand_class_desc): Likewise.
10991         (expand_attr_desc): Likewise.
10992         (synthesize_tinfo_fn): Likewise.
10993         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
10994         (get_matching_virtual): Likewise.
10995         (expand_upcast_fixups): Likewise.
10996         * sig.c (build_signature_pointer_or_reference_name): Take
10997         type_quals, not constp and volatilep.
10998         (build_signature_pointer_or_reference_type): Likewise.
10999         (match_method_types): More CP_TYPE_QUALS conversion, etc.
11000         (build_signature_pointer_constructor): Likewise.
11001         (build_signature_method_call): Likewise.
11002         * tree.c (build_cplus_array_type): Likewise.
11003         (cp_build_type_variant): Rename to ...
11004         (cp_build_qualified_type): New function.  Deal with `__restrict'.
11005         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
11006         (build_exception_variant): Likewise.
11007         (mapcar): Likewise.
11008         * typeck.c (qualif_type): Likewise.
11009         (common_type): Likewise.
11010         (comptypes): Likewise.
11011         (comp_cv_target_types): Likewise.
11012         (at_least_as_qualified_p): Define.
11013         (more_qualified_p): Likewise.
11014         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
11015         (compparms): Likewise.
11016         (inline_conversion): Likewise.
11017         (string_conv_p): Likewise.
11018         (build_component_ref): Likewise.
11019         (build_indirect_ref): Likewise.
11020         (build_array_ref): Likewise.
11021         (build_unary_op): Likewise.
11022         (build_conditional_expr): Likewise.
11023         (build_static_cast): Likewise.
11024         (build_c_cast): Likewise.
11025         (build_modify_expr): Likewise.
11026         (convert_For_assignment): Likewise.
11027         (comp_ptr_ttypes_real): Likewise.
11028         (cp_type_quals): New function.
11029
11030 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
11031
11032         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
11033         (CP_TYPE_VOLATILE): Likewise.
11034         * decl.c (grokdeclarator): Use them.
11035         * tree.c (canonical_type_variant): Likewise.
11036
11037 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11038
11039         * parse.y (named_class_head): Push into class while parsing the
11040         base class list.
11041         * decl2.c (push_scope, pop_scope): New functions.
11042         * cp-tree.h: Declare them.
11043         * init.c (build_new_1): Delay cleanup until end of full expression.
11044
11045 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
11046
11047         * typeck.c (build_component_ref): Use of a type here is an error.
11048
11049 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
11050
11051         Revamp references to member functions.
11052         * method.c (hack_identifier): Call build_component_ref for a
11053         reference to a member function.
11054         * typeck.c (build_component_ref): Only return a single function
11055         if it's static.  Otherwise, return a COMPONENT_REF.
11056         (build_x_function_call): Handle a COMPONENT_REF.
11057         (build_unary_op): Handle all unknown-type things.
11058         * decl2.c (arg_assoc): Handle COMPONENT_REF.
11059         * class.c (instantiate_type): Complain if the function we get is a
11060         nonstatic member function.  Remove code for finding "compatible"
11061         functions.
11062         * pt.c (tsubst_copy): Handle NOP_EXPR.
11063         * tree.c (build_dummy_object): New fn.
11064         (maybe_dummy_object): New fn.
11065         (is_dummy_object): New fn.
11066         * cp-tree.h: Declare them.
11067         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
11068         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
11069         * init.c (build_member_call): Use maybe_dummy_object and
11070         is_dummy_object.
11071         (build_offset_ref): Use maybe_dummy_object.
11072         (resolve_offset_ref): Use is_dummy_object.
11073         * typeck.c (build_x_function_call): Call build_dummy_object.
11074         (unary_complex_lvalue): Call is_dummy_object.
11075
11076         * typeck.c (build_component_addr): Make sure field is a field.
11077
11078         * call.c (build_new_op): Delete obsolete code.
11079
11080         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
11081
11082 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11083
11084         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
11085         std if std is ignored.
11086
11087 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
11088
11089         * decl.c (grokvardecl): Fix thinko.
11090
11091         * decl.c (grokdeclarator): Embedded attrs bind to the right,
11092         not the left.
11093
11094         * parse.y (fn.def2): Fix 'attrs' format.
11095
11096 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
11097
11098         * Makefile.in (CONFLICTS): Update.
11099         * parse.y (expr_or_declarator_intern): New rule.
11100         (expr_or_declarator, direct_notype_declarator, primary,
11101         functional_cast): Use it.
11102         (notype_declarator_intern): New rule.
11103         (notype_declarator, complex_notype_declarator): Use it.
11104
11105 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
11106
11107         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
11108         (grokvardecl): Likewise.
11109
11110 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11111
11112         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
11113         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
11114
11115         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
11116
11117         * pt.c (process_partial_specialization): Cast 1st argument of
11118         `bzero' to (PTR).
11119
11120         * tree.c (build_base_fields): Cast `base_align' to (int) when
11121         comparing against one.
11122
11123 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
11124
11125         * decl.c (lookup_name_real): Handle template parameters for member
11126         templates where said parameters have the same name as the
11127         surrounding class.
11128
11129         * decl.c (expand_static_init): Build cleanups before entering the
11130         anonymous function used to do them to avoid access-checking
11131         confusion.
11132
11133         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
11134         accidentally removed by previous change, and make DECL_RTL here.
11135         * class.c (add_method): Don't make DECL_RTL here.
11136
11137         * pt.c (for_each_template_parm): Don't examine uninstantiated
11138         default arguments.
11139
11140 1998-10-16  Dave Brolley  <brolley@cygnus.com>
11141
11142         * lex.c (real_yylex): Fix unaligned access of wchar_t.
11143
11144 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
11145
11146         * class.c (add_method): Fix documentation to reflect previous
11147         changes.  Check for duplicate method declarations here.
11148         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
11149         correctly; such things never match.
11150         (grokfndecl): Don't look for duplicate methods here.
11151         * decl2.c (check_classfn): Don't assume names are mangled.
11152         Don't add bogus member function declarations to a class before the
11153         class type is complete.
11154         (grokfield): Reformat error message.
11155         * method.c (set_mangled_name_for_decl): Don't mangle names while
11156         processing_template_decl.
11157
11158 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
11159
11160         * typeck.c (build_indirect_ref): Complain about a pointer to data
11161         member, too.
11162         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
11163         data member.
11164         * init.c (resolve_offset_ref): Don't undo the above.
11165
11166         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
11167         (struct lang_decl_flags): Add `bitfield'.
11168         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
11169         DECL_BIT_FIELD.
11170         * decl2.c (grokbitfield, grok_alignof): Likewise.
11171         * init.c (build_offset_ref): Likewise.
11172         * typeck.c (build_component_addr, expr_sizeof): Likewise.
11173         * cvt.c (build_up_reference): Don't crash if taking the address
11174         returns error_mark_node.
11175
11176         * decl.c (grokfndecl): Also check ctype when checking for ::main().
11177
11178 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
11179
11180         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
11181         Do mangling here.
11182         (grokdeclarator): Instead of here.
11183         * friend.c (do_friend): Lose special handling of ::main and
11184         __builtin_*.
11185         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
11186
11187         * spew.c (yylex): Clear looking_for_typename if we got
11188         'enum { ... };'.
11189
11190 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
11191
11192         * class.c (maybe_warn_about_overly_private_class): Improve error
11193         messages for class with only private constructors.
11194
11195         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
11196         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
11197         (build_typename_type): New function.
11198         * decl.c (build_typename_type): Broken out from ...
11199         (make_typename_type): Use it.
11200         * search.c (lookup_field): Likewise.
11201
11202 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11203
11204         * pt.c (convert_nontype_argument): Check against type_referred_to.
11205         * decl.c (grokvardecl): Check for declarator name before building
11206         DECL_ASSEMBLER_NAME.
11207
11208 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
11209
11210         * pt.c (lookup_template_class): Add comment.
11211         (instantiate_class_template): Don't mark the _TYPE node for
11212         member class templates as an instantiation.
11213
11214 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
11215
11216         * decl.c (grokfndecl): Fix my thinko.
11217
11218 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
11219
11220         * tinfo2.cc (fast_compare): Remove.
11221         (before): Just use strcmp.
11222         * tinfo.cc (operator==): Just use strcmp.
11223
11224 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
11225
11226         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
11227         declarations.
11228
11229 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
11230
11231         * cp-tree.h (specializations_of_same_template_p): Remove.
11232         * search.c (get_template_base): Don't use it.
11233         (get_template_base_recursive): Likewise.
11234         * pt.c (specializations_of_same_template_p): Remove.
11235         (unify): Don't use it.
11236         (lookup_template_class): Find the correct parent when setting
11237         CLASSTYPE_TI_TEMPLATE.
11238
11239 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
11240
11241         * tinfo.cc (operator==): Always compare names.
11242
11243 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
11244
11245         * decl.c (start_function): Fix cut-and-paste error.
11246
11247 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
11248
11249         * inc/typeinfo: Add #pragma interface.
11250         (operator!=): Just call operator==.
11251         * tinfo.cc: Add #pragma implementation.
11252         (operator==): Move from inc/typeinfo and tinfo2.cc.
11253         Check __COMMON_UNRELIABLE instead of _WIN32.
11254
11255         * typeck2.c (my_friendly_abort): Add URL.
11256
11257 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
11258
11259         * decl.c (start_method): Added extra parameter for attributes.
11260         * cp-tree.h (start_method): Update prototype.
11261         * parse.y (fn.def2): Update start_method parameter list.
11262
11263 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
11264
11265         * cp-tree.h (specializations_of_same_template_p): Declare.
11266         * pt.c (specializations_of_same_template_p): New function.
11267         (unify): Use it.
11268         * search.c (get_template_base): Use it.
11269         (get_template_base_recursive): Likewise.
11270
11271 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
11272
11273         * decl2.c (start_objects): Add new variable `joiner' and
11274         initialize it properly.
11275
11276 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
11277
11278         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
11279         change to vtable types.
11280
11281         * cvt.c (ocp_convert): Avoid infinite recursion caused by
11282         1998-10-03 change.
11283
11284 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
11285
11286         * pt.c (resolve_overloaded_unification): New fn.
11287         (try_one_overload): Likewise.
11288         (unify): Don't fail on unknown type.
11289         (type_unification_real): Likewise.  Use resolve_overloaded_unification
11290         to handle an overloaded argument.
11291         (template_args_equal): Split out...
11292         (comp_template_args): From here.
11293         (determine_specialization): Also allow a template with more
11294         parms than were explicitly specified.
11295         * cp-tree.h: Add template_args_equal.
11296         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
11297
11298 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
11299
11300         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
11301         change.
11302
11303 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
11304
11305         * typeck.c (unsigned_type): Only return TItype nodes when
11306         HOST_BITS_PER_WIDE_INT is >= 64 bits.
11307         (signed_type): Likewise.
11308         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
11309         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
11310         (init_decl_processing): Only create TItype nodes when
11311         HOST_BITS_PER_WIDE_INT is >= 64 bits.
11312         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
11313         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
11314
11315 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11316
11317         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
11318         (gxx.gperf): Update comments describing invocation flags.
11319         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
11320
11321 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
11322
11323         * class.c (finish_struct_1): Add commentary on previous change.
11324
11325         * cp-tree.h (vtbl_ptr_type_node): New variable.
11326         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
11327         already of the right type.
11328         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
11329         Simplify code to grow vtable.
11330         * decl.c (vtbl_ptr_type_node): Define.
11331         (init_decl_processing): Initialize it.
11332
11333 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
11334
11335         * cp-tree.def (PTRMEM_CST): New tree node.
11336         * cp-tree.h (ptrmem_cst): New type.
11337         (lang_type): Remove local_typedecls.
11338         (dummy): Increase to 12 bits from 11.
11339         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
11340         (PTRMEM_CST_CLASS): New macro.
11341         (PTRMEM_CST_MEMBER): Likewise.
11342         (current_access_specifier): New variable.
11343         (current_class_type): Remove duplicate declaration.
11344         (finish_struct): Change prototype.
11345         (unreverse_member_declarations): New function.
11346         (pushdecl_class_level): Change prototype.
11347         (grok_enum_decls): Remove.
11348         (fixup_anonymous_union): New function.
11349         (grok_x_components): Change prototype.
11350         (tsubst_chain): Remove.
11351         (finish_member_template_decl): Likewise.
11352         (check_explicit_specialization): Fix indentation.
11353         (finish_class_definition): Change prototype.
11354         (finish_member_class_template): Likewise.
11355         (finish_member_declaration): New function.
11356         (check_multiple_declarators): Likewise.
11357         * class.c (class_stack_node_t): New type.
11358         (current_class_base): Remove.
11359         (current_class_stack): Change type.
11360         (current_access_specifier): New variable.
11361         (grow_method): Remove.
11362         (check_member_decl_is_same_in_complete_scope): Break out from
11363         finish_struct.
11364         (make_method_vec): New function.
11365         (free_method_vec): Likewise.
11366         (add_implicitly_declared_members): Break out from finish_struct_1.
11367         (free_method_vecs): New variable.
11368         (add_method): Rework for direct use from parser.
11369         (handle_using_decl): Watch for NULL_TREE while iterating through
11370         CLASSTYPE_METHOD_VEC.
11371         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
11372         just do some error-checking.
11373         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
11374         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
11375         (finish_struct): Change prototype.  Simplify; fields and methods
11376         are already set up at this point.
11377         (init_class_processing): Set up current_class_stack.
11378         (pushclass): Save current_access_specifier.
11379         (popclass): Restore it.
11380         (currently_open_class): Simplify.
11381         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
11382         * decl.c (saved_scope): Add access_specifier.
11383         (maybe_push_to_top_level): Save it.
11384         (pop_from_top_level): Restore it.
11385         (maybe_process_template_type_declaration): Use
11386         finish_member_declaration.
11387         (pushtag): Likewise.
11388         (pushdecl_class_level): Don't return a value.
11389         (fixup_anonymous_union): Break out from grok_x_components.
11390         (shadow_tag): Use it.
11391         (xref_tag): Complain about using an elaborated type specifier to
11392         reference a template type parameter or typedef name.
11393         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
11394         (current_local_enum): Remove.
11395         (build_enumerator): Call finish_member_declaration.
11396         (grok_enum_decls): Remove.
11397         * decl2.c (grok_x_components): Simplify.
11398         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
11399         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
11400         (merge_functions): Add to comment.
11401         (arg_assoc_type): Prototype.
11402         (arg_assoc): Pass as many arguments as there are parameters.
11403         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
11404         OFFSET_REF.
11405         * expr.c (cpls_expand_expr): Remove dead code.  Handle
11406         PTRMEM_CST.
11407         * friend.c (do_friend): Lookup friends when in nested classes.
11408         Change comments.
11409         * init.c (build_offset_ref): Do lookup even for classes that are
11410         only partially defined.
11411         (decl_constant_value): Remove dead code.
11412         * method.c (build_overload_value): Remove hack where by TYPE was
11413         not a TYPE.  Handle PTRMEM_CST.
11414         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
11415         should go.
11416         * parse.y (components, notype_components, component_decl,
11417         component_decl_1, component_declarator, component_declarator0):
11418         Now all are itype rather than ttype.  Rework to add members to
11419         classes on the fly.
11420         (typesqpecqual_reserved): Use check_multiple_declarators.
11421         (structsp): Update class to finish_class_definition.
11422         (do_xref_defn): Unsplit into named_class_head.
11423         (access_specifier): Set current_access_specifier.
11424         * pt.c (set_current_access_from_decl): New function.
11425         (finish_member_template_decl): Don't take the parameters.
11426         (comp_template_args): Make more robust.
11427         (lookup_template_class): Don't use current_local_enum.
11428         (for_each_template_parm): Handle PTRMEM_CST.
11429         (instantiate_class_template): Use set_current_access_from_decl,
11430         finish_member_declaration and unreverse_member_declarations.  Set
11431         lineno/input_filename before generating implicit member functions.
11432         (type_unification_real): Don't assume back-unification happens
11433         only for the last argument.
11434         (regenerate_decl_from_template): Call pushclass a bit earlier.
11435         (tsubst_chain): Remove.
11436         (tsubst_enum): Use set_current_access_from_decl.
11437         (set_mangled_name_for_template_decl): Fix indentation.
11438         * search.c (lookup_fnfields_1): Change iteration through
11439         CLASSTYPE_METHOD_VEC.
11440         (dfs_pushdecls): Likewise.
11441         (dfs_compress_decls): Likewise.
11442         (add_conversions): Likewise.
11443         * semantics.c (finish_class_definition): Don't take components.
11444         Change call to finish_struct.
11445         (finish_member_declaration): New function.
11446         (finish_member_class_template): Don't take template parameters.
11447         Change call to grok_x_components.  Call finish_member_template_decl.
11448         (check_multiple_declarators): New function.
11449         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
11450         a passed in fieldlist.
11451         * tree.c (search_tree): Handle PTRMEM_CST.
11452         (mapcar): Likewise.
11453         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
11454         INTEGER_CSTs, for pointer-to-data members.
11455
11456         * call.c (resolve_args): Resolve template specializations, if
11457         possible.
11458
11459 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11460
11461         * Makefile.in (spew.o): Depend on toplev.h.
11462
11463         * call.c (compare_ics): Initialize variables `deref_from_type2',
11464         `deref_to_type1' and `deref_to_type2'.
11465
11466         * except.c (get_eh_type): Hide prototype and definition.
11467         (process_start_catch_block_old): Remove unused static prototype.
11468
11469         * pt.c (tsubst_decl): Initialize variable `argvec'.
11470
11471         * spew.c: Include toplev.h.
11472
11473 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
11474
11475         * pt.c (instantiate_decl): Do save and restore file position.
11476
11477 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11478
11479         * method.c (build_decl_overload_real): Clear
11480         numeric_output_need_bar after __.
11481
11482 1998-10-05  Nathan Sidwell  <nathan@acm.org>
11483
11484         * call.c (build_new_method_call): Issue 'incomplete type' error,
11485         if class is not defined.
11486
11487 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11488
11489         * call.c (build_object_call): Move declaration of variable
11490         `fn' into the scope where it is used.  Don't access variable
11491         `fn' when it is uninitialized, instead use `fns'.
11492
11493 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
11494
11495         * errfn.c (cp_thing): Print buf as a string not as a printf format
11496         to avoid problems with the operator%.  Consequently, `%%' sequences
11497         in format are copied as `%' in buf.
11498
11499 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
11500
11501         * pt.c (pop_tinst_level): Call extract_interface_info.
11502         (instantiate_decl): Don't save and restore file position.
11503
11504         * decl.c (cp_finish_decl): Make statics in extern inlines and
11505         templates common, if possible and the target doesn't support weak
11506         symbols.
11507
11508         * decl.c (grokdeclarator): Remove redundant calls to
11509         build_type_variant and some duplicated code.
11510         * sig.c (build_signature_reference_type): Only take the type parm.
11511         (build_signature_pointer_type): Likewise.
11512         * tree.c (build_cplus_method_type): Adjust.
11513         * cp-tree.h: Update.
11514
11515 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
11516
11517         * call.c (build_over_call): Make pedwarns about dropped qualifiers
11518         into full-fledged errors.
11519         * cvt.c (convert_to_reference): Likewise.
11520         * typeck.c (convert_for_assignment): Likewise.
11521
11522         * search.c (expand_upcast_vtables): In addition to unsetting
11523         TREE_READONLY, remove top-level const type qualifier.
11524
11525 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
11526
11527         * class.c (current_class_ptr, current_class_ref): Clarify
11528         documentation.
11529         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
11530         NOP type conversions.
11531         * decl.c (decls_match): Use comptypes directly; ignore
11532         qualifiers on the DECL.
11533         (duplicate_decls): Remove qualifier checks on DECL.
11534         (grokdeclarator): Make the type built up include top-level
11535         qualifiers.
11536         * decl2.c (do_dtors): Fix spelling error.
11537         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
11538         when printing type information.
11539         * init.c (build_new_1): Add documentation.  Deal with the fact
11540         that type of allocated memory now contains qualifiers.
11541         * lex.c (is_global): Improve error-recovery.
11542         * sig.c (build_member_function_pointer): Don't cast away const
11543         on fields of sigtable_entry_type.
11544         * tree.c (lvalue_type): Don't look at top-level qualifiers on
11545         expressions.
11546         * typeck.c (decay_conversion): Likewise.
11547         (build_component_ref): Make sure the type of the COMPONENT_REF
11548         contains top-level qualifiers, as appropriate.  Improve
11549         error-handling.
11550         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
11551         (build_array_ref): Likewise.
11552         (build_unary_op): Improve error-recovery.
11553         (unary_complex_lvalue): Make taking the address a bound member
11554         function an error, not a sorry.
11555         (build_conditional_expr): Look at the type qualifiers, not the
11556         qualifiers on the expression itself.
11557
11558 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
11559
11560         * decl2.c (merge_functions): Remove duplicates.
11561
11562         * decl2.c: Add -f{no-,}implicit-inline-templates.
11563         (import_export_decl): Check it.
11564
11565         * decl.c (lookup_name_real): Template parms also take precedence
11566         over implicit typename.  Only warn if yylex.
11567
11568         * typeck.c (build_conditional_expr): Only fold if ifexp is an
11569         INTEGER_CST.
11570
11571         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
11572         instead of linkage.
11573
11574 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
11575
11576         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
11577         * class.c (build_vbase_pointer): Use it.
11578         * rtti.c (expand_class_desc): Likewise.
11579         * tree.c (build_vbase_pointer_fields): Likewise.
11580
11581 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
11582
11583         * decl.c (start_decl): Add invocation of
11584         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
11585         (start_function): Add invocation of
11586         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
11587
11588         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
11589         HANDLE_GENERIC_PRAGMAS.
11590
11591 1998-09-28  Anthony Green  <green@cygnus.com>
11592
11593         * semantics.c (finish_asm_stmt): Always permit volatile asms.
11594
11595 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
11596
11597         * decl.c (grokdeclarator): Tighten checks for invalid
11598         destructors.  Improve error-messages and error-recovery.
11599         * decl2.c (check_classfn): Don't assume that mangled destructor
11600         names contain type information.
11601
11602 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
11603
11604         * search.c (get_base_distance): Remove assert.
11605
11606         * decl2.c (build_anon_union_vars): Don't process a field with no
11607         name.
11608         (finish_anon_union): Also complain about local anon unions with no
11609         members.
11610
11611 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11612
11613         * decl.c (lookup_namespace_name): If the name is a namespace,
11614         return it immediately.
11615
11616 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11617
11618         * cp-tree.h (define_case_label): Remove unused parameter.
11619         (check_java_method): Likewise.
11620         (grokclassfn): Likewise.
11621         (expand_aggr_init): Likewise.
11622         (build_x_delete): Likewise.
11623         (maybe_end_member_template_processing): Likewise.
11624         (unshare_base_binfos): Add prototype.
11625         (string_conv_p): Likewise.
11626         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
11627
11628         * cvt.c (build_up_reference): Remove unused parameter
11629         `checkconst', all callers changed.
11630         (build_type_conversion): Mark parameter `code' with
11631         ATTRIBUTE_UNUSED.
11632         (build_expr_type_conversion): Initialize variable `conv'.
11633
11634         * decl.c (push_namespace): Initialize variable `d'.
11635         (define_case_label): Remove unused parameter `decl', all callers
11636         changed.
11637
11638         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
11639         `argc' with ATTRIBUTE_UNUSED.
11640         (grokclassfn): Remove unused parameter `cname', all callers
11641         changed.
11642         (check_java_method): Likewise for parameter `ctype'.
11643         (copy_assignment_arg_p): Mark parameter `virtualp' with
11644         ATTRIBUTE_UNUSED.
11645         (finish_prevtable_vardecl): Likewise for parameter `prev'.
11646
11647         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
11648
11649         * init.c (expand_aggr_init_1): Remove unused parameter
11650         `alias_this', all callers changed.
11651         (expand_aggr_init): Likewise.
11652         (expand_default_init): Likewise.
11653         (build_new_1): Initialize variable `susp'.
11654         (build_x_delete): Remove unused parameter `type', all callers
11655         changed.
11656
11657         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
11658         ATTRIBUTE_UNUSED.
11659         (readescape): Use (unsigned) value in shift.
11660         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
11661         comparing to a signed quantity.
11662
11663         * pt.c (maybe_end_member_template_processing): Remove unused
11664         parameter `decl', all callers changed.
11665         (check_explicit_specialization): Add braces around empty body in
11666         an else-statement.
11667         (current_template_args): Initialize variable `args'.
11668         (lookup_template_class): Likewise for variable `prev_local_enum'.
11669         (tsubst_decl): Likewise for variable `r'.
11670         (set_mangled_name_for_template_decl): Initialize variable
11671         `context'.
11672
11673         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
11674         Likewise for variable `i'.
11675         (yylex): Initialize variable `trrr'.
11676
11677         * typeck.c (compparms): Mark variable `strict' with
11678         ATTRIBUTE_UNUSED.
11679
11680         * xref.c (simplify_type): Cast argument of ctype function to
11681         `unsigned char'.
11682
11683 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
11684
11685         * cp-tree.h (language_lvalue_valid): Remove.
11686         * decl.c (grokdeclarator): Don't disallow references to functions.
11687         * tree.c (lvalue_p_1): New function, combining duplicated
11688         code from ...
11689         (lvalue_p): Use it.
11690         (real_lvalue_p): Likewise.
11691         * typeck.c (language_lvalue_valid): Remove.
11692         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
11693         they don't have TREE_READONLY set.
11694         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
11695
11696 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11697
11698         * spew.c (yylex): Give diagnostic.
11699         * hash.h (is_reserved_word): Add export.
11700         * gxx.gperf: Likewise.
11701         * lex.h (rid): Add RID_EXPORT.
11702         * lex.c (init_parse): Likewise.
11703
11704 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
11705
11706         * friend.c (do_friend): Make warning a full sentence.
11707
11708 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
11709
11710         * parse.y (component_decl_list): Improve error-recovery.
11711
11712 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11713
11714         * decl.c (make_typename_type): Move error to point where name
11715         variable can be used by dump_type.
11716
11717 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
11718
11719         * decl.c (grokfndecl): Improve error-recovery.
11720         * decl2.c (grokfield): Likewise.
11721         * pt.c (finish_member_template_decl): Likewise.
11722
11723 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11724
11725         * method.c (hack_identifier): Finding multiple members is always
11726         an error.
11727
11728 1998-09-21  Per Bothner  <bothner@cygnus.com>
11729
11730         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
11731
11732 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
11733
11734         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
11735
11736 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
11737
11738         * class.c (maybe_warn_about_overly_private_class): Reformat.
11739
11740 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
11741
11742         * exception.cc (__cplus_type_matcher): Realign some code.
11743
11744 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
11745
11746         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
11747         (tinfo2.o): Likewise.
11748         (exception.o): Likewise.
11749         (new.o): Likewise.
11750         (opnew.o): Likewise.
11751         (opnewnt.o): Likewise.
11752         (opvnew.o): Likewise.
11753         (opvnewnt.o): Likewise.
11754         (opdel.o): Likewise.
11755         (opdelnt.o): Likewise.
11756         (opvdel.o): Likewise.
11757         (opvdelnt.o): Likewise.
11758
11759 1998-09-16  Richard Henderson  <rth@cygnus.com>
11760
11761         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
11762
11763 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
11764
11765         * call.c (build_field_call): Handle static data members too.
11766
11767         * typeck.c (comptypes): When comparing pointer types, check
11768         whether referred types match even in strictest modes.
11769
11770 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
11771
11772         * cp-tree.h: Revert previous change.
11773         (finish_struct_methods): Remove declaration.
11774         * class.c: Revert previous change.
11775         (maybe_warn_about_overly_private_class): New function.
11776         (finish_struct_methods): Declare here, and make static.  Remove
11777         unnecessary parameters.  Tidy slightly.  Use
11778         maybe_warn_about_overly_private_class.
11779         (finish_struct_1): Adjust.  Remove check for private constructors,
11780         now done elsewhere.
11781         (finish_struct): Adjust.
11782
11783 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
11784
11785         * except.c (expand_start_catch_block): No need to check for new
11786         exception model.
11787         (process_start_catch_block_old): Deleted.
11788         (process_start_catch_block): Add call to start_decl_1().
11789         (expand_end_catch_block): Add call to end_catch_handler().
11790         * exception.cc (__cplus_type_matcher): Only check the exception
11791         language if there is an exception table.
11792
11793 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
11794
11795         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
11796         as used to prevent conflicts with virtual function tables.
11797
11798 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
11799
11800         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
11801         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
11802         * class.c (maybe_class_too_private_p): New function.
11803         (finish_struct_methods): Use it.
11804         (finish_struct_1): Likewise.
11805         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
11806         appropriate.
11807
11808         * pt.c (check_specialization_scope): Fix spelling error.
11809         (check_explicit_specialization): Remove code to handle explicit
11810         specializations in class scope; they are now correctly diagnosed
11811         as errors.
11812
11813 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
11814
11815         * decl.c (pushdecl): Don't copy types if the
11816         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
11817         type.
11818
11819 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
11820
11821         * class.c (get_enclosing_class): New function.
11822         (is_base_of_enclosing_class): Likewise.
11823         * cp-tree.h (get_enclosing_class): Declare.
11824         (is_base_of_enclosing_class): Likewise.
11825         * pt.c (coerce_template_parms): Use them.
11826
11827 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
11828
11829         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
11830         null to decide whether to use it.
11831
11832         * error.c (dump_type_real): Handle NAMESPACE_DECL.
11833         * parse.y (base_class.1): Avoid crash on error.
11834
11835 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11836
11837         * decl.c (make_typename_type): If context is a namespace, the code
11838         is in error.
11839
11840 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
11841
11842         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
11843
11844 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
11845
11846         * cp-tree.h (anonymous_namespace_name): Declare.
11847         * decl.c: Define it.
11848         (push_namespace): Use anonymous_namespace_name, rather than local
11849         static anon_name.
11850         * error.c (dump_decl): If a namespace is named
11851         anonymous_namespace_name, call it {anonymous}.
11852
11853         * decl.c (grokparms): Distinguish between references and pointers
11854         in error message.
11855
11856 1998-09-08  Richard Henderson  <rth@cygnus.com>
11857             Mark Mitchell  <mark@markmitchell.com>
11858
11859         * pt.c (process_partial_specialization): Consistently allocate
11860         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
11861         tpd.parms, where appropriate.
11862
11863 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
11864
11865         * Makefile.in (INCLUDES): Update after recent toplevel gcc
11866         reorganizations.
11867
11868 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
11869
11870         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
11871         * class.c (finish_struct): Remove hackery to deal with explicit
11872         specializations in class scope.
11873         * decl.c (grokfndecl): Improve error-recovery.
11874         * decl2.c (grokfield): Likewise.
11875         * pt.c (check_specialization_scope): New function.
11876         (begin_specialization): Call it.
11877         (process_partial_specialization): New function, split out from
11878         push_template_decl.  Check partial specializations more
11879         stringently.
11880         (push_template_decl): Call it.
11881         (check_explicit_specialization): Don't attempt to handle explicit
11882         specializations in class scope.
11883         (template_parm_data): Document.  Add current_arg and
11884         arg_uses_template_parms.
11885         (mark_template_parm): Set it.
11886         (tsubst_arg_types): Remove unused variable.
11887         * semantics.c (begin_class_definition): Tweak.
11888
11889 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
11890
11891         * inc/typeinfo (type_info::type_info(const char*)): Make
11892         `explicit'.
11893
11894         * cp-tree.h (hash_tree_cons_simple): New macro.
11895         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
11896         (coerce_template_parms): Use make_temp_vec, instead of
11897         make_tree_vec.  Document this behavior.
11898         (lookup_template_class): Likewise.
11899         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
11900         Remove dead code (and add assertion to check its deadness).  Fix
11901         bug w.r.t. exception specifications.
11902
11903 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
11904
11905         * decl2.c (import_export_vtable): Always make artificials comdat.
11906         (import_export_decl): Likewise.
11907         * pt.c (mark_decl_instantiated): Likewise.
11908
11909 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
11910
11911         * cp-tree.h (finish_globally_qualified_member_call_expr):
11912         Rename to ...
11913         (finish_qualified_call_expr).
11914         * semantics.c: Likewise.
11915         * parse.y (primary): Use it.
11916         * method.c (hack_identifier): Remove redundant code.
11917
11918         * init.c (resolve_offset_ref): Call convert_from_reference to
11919         handle members of reference type.  Improve error recovery.
11920
11921 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
11922
11923         * cp-tree.h: Declare warn_nontemplate_friend.
11924         * decl2.c (lang_decode_option): Set.
11925         * lang-options.h: Add -Wnon-template-friend.
11926         * friend.c (do_friend): Use to toggle non-template function warning.
11927
11928 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
11929
11930         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
11931         corresponding INTEGER_CSTs when processing_template_decl.
11932         * pt.c (tsubst_enum): Tweak accordingly.
11933
11934 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11935
11936         * decl.c (pushdecl_class_level): Add warning here.
11937         (pushdecl): Tweak.
11938
11939 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
11940
11941         * cvt.c (convert_pointer_to_real): Tidy.
11942         * search.c (get_base_distance_recursive): Simplify.
11943         (get_base_distance): Likewise.
11944
11945         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
11946         parms.
11947
11948 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
11949
11950         * lex.c (check_newline):  Call HANDLE_PRAGMA before
11951         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
11952         if unknown pragmas are encountered.
11953         (handle_sysv_pragma): Interpret return code from
11954         handle_pragma_token ().  Return success/failure indication rather
11955         than next unprocessed character.
11956         (pragma_getc): New function: retrieves characters from the
11957         input stream.  Defined when HANDLE_PRAGMA is defined.
11958         (pragma_ungetc): New function: replaces characters back into the
11959         input stream.  Defined when HANDLE_PRAGMA is defined.
11960
11961 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
11962
11963         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
11964         * class.c (build_vtable_entry_ref): Likewise.
11965
11966 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
11967
11968         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
11969         * decl2.c (import_export_decl): Likewise.
11970         * pt.c (instantiate_decl): Use it.
11971
11972 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
11973
11974         * decl.c (lookup_name_real): Also do implicit typename thing for
11975         artificial TYPE_DECLs.
11976         * search.c (lookup_field): Likewise.
11977         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
11978         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
11979         (enter_scope_of): Extract type from implicit typename.
11980         (begin_class_definition): Likewise.
11981         * lex.c (identifier_type): Handle implicit typename when checking
11982         for SELFNAME.
11983
11984         * cp-tree.h: Declare flag_strict_prototype.
11985         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
11986         -fstrict-prototype.
11987         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
11988         specified, set it to the value of pedantic.
11989
11990 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
11991
11992         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
11993
11994 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
11995
11996         * decl.c (finish_enum): Handle member enums of classes declared in
11997         template functions.
11998
11999         * decl2.c (grok_x_components): Strip attributes before calling
12000         groktypename.
12001
12002 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
12003
12004         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
12005         -fenum-int-equivalence and -fno-nonnull-objects.
12006         * class.c (check_for_override): Remove support for -fall-virtual.
12007         (finish_struct_1): Likewise.
12008         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
12009         * typeck.c (build_binary_op_nodefault): Likewise.
12010         * cvt.c (ocp_convert): Likewise.
12011         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
12012         * class.c (build_vbase_path): Likewise.
12013
12014 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
12015
12016         * Makefile.in (INTERFACE): New, set to 1.
12017
12018 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
12019
12020         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
12021         comparing with global_namespace.
12022         (dump_aggr_type): Likewise.
12023
12024         * decl.c (grokfndecl): Issue error on declaration of friend
12025         templates with explicit template arguments.
12026
12027         * pt.c (convert_template_argument): New function, split out
12028         from...
12029         (coerce_template_parms): Here.
12030         (tsubst): Attempt better error-recovery.
12031
12032 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
12033
12034         * pt.c (decl_template_parm_p): Add checks for
12035         TEMPLATE_TEMPLATE_PARM.
12036
12037 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
12038
12039         * lex.c (do_identifier): Fix thinko in previous change.
12040
12041 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
12042
12043         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
12044         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
12045
12046 1998-08-28  Richard Henderson  <rth@cygnus.com>
12047
12048         Add support for discarding unused virtual functions.
12049         * lang-options.h: Add -fvtable-gc.
12050         * cp-tree.h: Add flag_vtable_gc.
12051         * decl2.c (output_vtable_inherit): New fn.
12052         (finish_vtable_vardecl): Call it.
12053         * class.c (build_vtable_entry_ref): New fn.
12054         (build_vtbl_ref): Call it.
12055
12056 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
12057
12058         * cp-tree.h (build_enumerator): Take the enumeration type as a
12059         parameter.
12060         * decl.c (finish_enum): Don't set the TREE_TYPE for the
12061         enumeration constant values if we're processing_template_decls.
12062         Don't set the type for the CONST_DECLs either; that's done in
12063         build_enumerator.
12064         (build_enumerator): Take the enumeration type as a
12065         parameter.
12066         * lex.c (do_identifier): Don't resolve enumeration constants while
12067         processing template declarations, even if they happen to be
12068         TEMPLATE_PARM_INDEXs.
12069
12070         * parse.y (current_enum_type): New variable.
12071         (primary): Don't allow statement-expression in local classes just
12072         as we don't in global classes.
12073         (structsp): Use current_enum_type.
12074         (enum_list): Likewise.
12075         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
12076         finish_enum; they no longer occur.
12077
12078         * cp-tree.h (finish_base_specifier): New function.
12079         * parse.y (base_class): Use it.
12080         * semantics.c (finish_base_specifier): Define it.
12081
12082         * parse.y (structsp): Warn on use of typename outside of template
12083         declarations.
12084
12085 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
12086
12087         * lex.c (handle_cp_pragma): Remove #pragma vtable.
12088         * lang-options.h: Remove +e options.
12089         * decl2.c (lang_decode_option): Likewise.
12090         (import_export_vtable): Don't check write_virtuals.
12091         (finish_vtable_vardecl, finish_file): Likewise.
12092         * search.c (dfs_debug_mark): Likewise.
12093         * semantics.c (begin_class_definition): Likewise.
12094         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
12095
12096         * call.c (build_over_call): Check flag_elide_constructors.
12097         * decl2.c: flag_elide_constructors defaults to 1.
12098         * typeck.c (convert_arguments): Remove return_loc parm.
12099         (build_function_call_real): Adjust.
12100
12101         * search.c: Tear out all mi_matrix and memoize code.
12102         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
12103         * lang-options.h: Remove documentation for -fhandle-exceptions,
12104         -fmemoize-lookups and -fsave-memoized.
12105         * cp-tree.h: Lose mi_matrix and memoize support.
12106         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
12107         * class.c: Lose struct class_level.
12108         (pushclass, popclass): Lose memoize support.
12109         * init.c (build_offset_ref): Likewise.
12110
12111         Never change BINFO_INHERITANCE_CHAIN.
12112         * init.c (emit_base_init): Change modification of
12113         BINFO_INHERITANCE_CHAIN to an assert.
12114         * search.c (get_base_distance_recursive): Likewise.
12115         (get_base_distance): Likewise.
12116         (lookup_member): Likewise.
12117         (convert_pointer_to_single_level): Likewise.
12118         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
12119         (lookup_fnfields): Likewise.
12120         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
12121         (unshare_base_binfos): Don't call propagate_binfo_offsets.
12122         (layout_basetypes): Call propagate_binfo_offsets instead of
12123         unshare_base_binfos.
12124         * decl.c (xref_basetypes): Call unshare_base_binfos.
12125         * pt.c (instantiate_class_template): Likewise.
12126         * tree.c (reverse_path): Remove 'copy' parm; always make a
12127         temporary copy.
12128         * class.c (build_vbase_path): Just call it.
12129         * search.c (compute_access): Likewise.  Don't re-reverse.
12130
12131 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
12132
12133         * class.c (build_vbase_path): Use reverse_path.
12134         (finish_base_struct): Move warnings for inaccessible bases to
12135         layout_basetypes.
12136         (modify_one_vtable): Remove check of TREE_USED (binfo).
12137         (fixup_vtable_deltas1): Likewise.
12138         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
12139         (xref_tag): Remove binfos parameter.
12140         (make_binfo): Remove chain parameter.
12141         (reverse_path): Add copy parameter.
12142         * decl.c (init_decl_processing): Change calls to xref_tag.
12143         (xref_tag): Remove binfos parameter.
12144         (xref_basetypes): Change calls to make_binfo.
12145         * decl2.c (grok_x_components): Change calls to xref_tag.
12146         (handle_class_head): Likewise.
12147         * friend.c (do_friend): Likewise.
12148         * lex.c (make_lang_type): Change calls to make_binfo.
12149         * parse.y (structsp): Change calls to xref_tag.
12150         (named_complex_class_head_sans_basetype): Likewise.
12151         (named_class_head): Likewise.
12152         * rtti.c (init_rtti_processing): Likewise.
12153         * search.c (compute_access): Change calls to reverse_path.
12154         (dfs_get_vbase_types): Change calls to make_binfo.
12155         (get_vbase_types): Remove dead code.
12156         * tree.c (unshare_base_binfos): Change calls to make_binfo.
12157         (layout_basetypes): Warn here about inaccessible bases.
12158         (make_binfo): Remove chain parameter.
12159         (reverse_path): Add copy parameter.
12160
12161 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
12162
12163         * class.c: #if 0 complete_type_p.
12164         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
12165         * method.c (process_overload_item): Likewise.
12166         * typeck.c (comp_target_types): Likewise.
12167
12168         Stop sharing binfos for indirect virtual bases.
12169         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
12170         (layout_basetypes): Likewise.
12171         (unshare_base_binfos): Copy vbases, too.
12172         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
12173         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
12174         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
12175         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
12176         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
12177         reference to BINFO_VIA_PUBLIC.
12178         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
12179         (push_class_decls): Use them.
12180         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
12181         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
12182
12183 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
12184
12185         * decl.c (build_enumerator): Set DECL_CONTEXT for the
12186         CONST_DECLs.
12187
12188 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
12189
12190         * cp-tree.h (finish_enum): Change prototype.
12191         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
12192         VALUES parameter.  Don't try to compute mins/maxs if
12193         processing_template_decl.
12194         * parse.y (structsp): Use new calling sequence for finish_enum.
12195         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
12196         (lookup_template_class): Remove unused variables.  Tweak.
12197         Register enums on instantiation list before substituting
12198         enumeration constants.
12199         (tsubst_decl): Remove unused variables.
12200         (regenerate_decl_from_template): Likewise.
12201
12202         * decl.c (duplicate_decls): Don't obliterate the
12203         DECL_TEMPLATE_INFO for a template if we're not replacing it with
12204         anything.
12205
12206         * lex.c (do_identifier): Fix typo in comment.
12207
12208 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12209
12210         * errfn.c: Remove stdarg.h/varargs.h.
12211         * tree.c: Likewise.
12212
12213 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
12214
12215         * pt.c (tsubst_copy): Only do typename overloading on an
12216         IDENTIFIER_NODE that happens to look like a typename if it actually
12217         has a type for us to use.
12218
12219 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
12220
12221         * typeck.c (comp_cv_target_types): Split out...
12222         (comp_target_types): From here.  Don't allow cv-qual changes under
12223         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
12224         (build_ptrmemfunc): Pass 1 to nptrs.
12225         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
12226
12227 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
12228
12229         * search.c (dependent_base_p): Don't compare a binfo to
12230         current_class_type; use the TREE_TYPE of the binfo instead.
12231
12232         * cp-tree.h (CLASS_TYPE_P): Revise definition.
12233
12234 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
12235
12236         * decl.c (duplicate_decls): Don't complain about different
12237         exceptions from an internal decl even if pedantic.
12238
12239         * typeck.c (convert_for_assignment): Converting from pm of vbase
12240         to derived is an error, not a sorry.
12241
12242         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
12243         * class.c (fixed_type_or_null): Rename from
12244         resolves_to_fixed_type_p.  Return the dynamic type of the
12245         expression, if fixed, or null.
12246         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
12247         does not match the static type.
12248         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
12249         resolves_to_fixed_type_p again.
12250
12251 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
12252
12253         * pt.c (tsubst_decl): Move special case code for dealing with
12254         tricky friend templates here from ...
12255         (regenerate_decl_from_template): Here.
12256
12257 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
12258
12259         * decl.c (start_decl): Remove redundant linkage check.
12260
12261 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
12262
12263         * typeck.c (c_expand_return): Handle the case that valtype
12264         is wider than the functions return type.
12265
12266 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
12267
12268         * cp-tree.h (CLASS_TYPE_P): New macro.
12269         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
12270         * pt.c (process_template_parm): Undo previous change.
12271
12272 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
12273
12274         * cp-tree.h: Declare.
12275         * pt.c (decl_template_parm_p): New function.
12276         * decl.c (pushdecl): Check decls for redeclaring template parms.
12277         (xref_tag): Make redeclaration an error, print decl.
12278         * decl2.c (grokfield): Check field_decls for redeclaration as well.
12279
12280 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
12281
12282         * parse.y (primary): Fix up the type of string constants.
12283
12284 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
12285
12286         * typeck.c (convert_for_initialization): Move check for odd uses
12287         of NULL to avoid duplicate warnings.
12288
12289 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
12290
12291         * tree.c (lvalue_type): Fix for arrays.
12292         * typeck.c (string_conv_p): New fn.
12293         (convert_for_assignment): Use it.
12294         (build_unary_op): Use lvalue_type.
12295         * call.c (standard_conversion, convert_like): Use string_conv_p.
12296         (add_function_candidate): Use lvalue_type.
12297         * cvt.c (convert_to_reference): Likewise.
12298         * decl2.c (lang_decode_option): Ignore -traditional.
12299         * decl.c (init_decl_processing): flag_writable_strings inhibits
12300         flag_const_strings.
12301
12302 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
12303
12304         * lang-options.h (lang_options): Add fconst-strings to the list
12305         of valid options.
12306         * decl2.c (lang_f_options, lang_decode_option): Likewise.
12307
12308 1998-08-24  Nathan Sidwell  <nathan@acm.org>
12309
12310         * lex.c (real_yylex): Don't warn about long long constants if
12311         we're allowing long long.
12312
12313 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12314
12315         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
12316         accessing bindings directly.
12317
12318         * search.c (my_tree_cons): Reimplement.
12319
12320         * lang-specs.h: Remove __HONOR_STD.
12321         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
12322
12323 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
12324
12325         * decl.c (grokdeclarator): Complain about in-class initialization
12326         of aggregates and/or references.
12327         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
12328         TEMPLATE_TYPE_PARMs.
12329
12330         * decl2.c (grok_array_decl): Add comment.
12331         (mark_used): Don't instantiate an explicit instantiation.
12332         * friend.c (make_friend_class): Remove bogus comment.  Fix check
12333         for partial specializations.
12334         * pt.c (check_explicit_specialization): Don't
12335         SET_DECL_EXPLICIT_INSTANTIATION here.
12336         (mark_decl_instantiated): Or here.
12337         (do_decl_instantiation): Do it here, instead.  Add checks for
12338         duplicate explicit instantiations, etc.  Tidy.
12339         (do_type_instantiation): Likewise.
12340         (instantiate_decl): Improve comments.  Complain about explicit
12341         instantiations where no definition is available.
12342
12343         * cp-tree.h (ansi_null_node): Remove.
12344         * call.c (build_over_call): Warn about converting NULL to an
12345         arithmetic type.
12346         * cvt.c (build_expr_type_conversion): Likewise.  Use
12347         null_ptr_cst_p instead of expanding it inline.
12348         * decl.c (ansi_null_node): Remove.
12349         (init_decl_processing): Make null_node always have integral type.
12350         * except.c (build_throw): Warn about converting NULL to an
12351         arithmetic type.
12352         * lex.c (init_parse): Remove handling of ansi_null_node.
12353         * pt.c (type_unification_real): Don't convert NULL to void* type.
12354         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
12355         (convert_for_assignment): Warn about converting NULL to an
12356         arithmetic type.
12357         (convert_for_initialization): Likewise.
12358
12359 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
12360
12361         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
12362         * pt.c (coerce_template_parms): Use no_linkage_check.
12363         * decl.c (grokvardecl): Likewise.
12364         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
12365
12366         * method.c (process_overload_item): Remove useless code.
12367
12368 1998-08-20  Per Bothner  <bothner@cygnus.com>
12369
12370         Handle new'ing of Java classes.
12371         * init.c (build_class_classref):  New function.
12372         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
12373         constructor does not return this;  don't need to exception-protect.
12374
12375         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
12376         * decl2.c (acceptable_java_type):  Handle template-derived types.
12377
12378 1998-08-20  Per Bothner  <bothner@cygnus.com>
12379
12380         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
12381
12382 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
12383
12384         * decl.c (duplicate_decls): Always merge the old and new patterns
12385         for templates, regardless of whether or not the new one has
12386         DECL_INITIAL.  Don't throw away specializations.  Merge
12387         DECL_SAVED_TREE.
12388         * pt.c (tsubst_decl): Use the right pattern when calculating the
12389         complete args for a new template instance.
12390         (do_decl_instantiation): Fix typo in comment.
12391         (regenerate_decl_from_template): Deal with tricky friend template
12392         case.
12393         (instantiate_decl): Likewise.
12394
12395 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
12396
12397         * init.c (build_builtin_delete_call): Add missing assemble_external
12398         call.
12399
12400 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
12401
12402         * parse.y (notype_unqualified_id): Also accept ~A<int>.
12403
12404 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
12405
12406         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
12407         arithmetic.
12408         * except.c (build_throw): Warn when NULL is thrown, even with
12409         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
12410         thrown expression.
12411
12412         * cp-tree.h (ansi_null_node): New variable.
12413         * decl.c (ansi_null_node): New variable.
12414         (init_decl_processing): Initialize its type.
12415         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
12416         for null_node in non-ANSI mode.
12417         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
12418         place of null_node to avoid spurious errors.
12419
12420 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
12421
12422         * cp-tree.h (enter_scope_of): New function.
12423         * parse.y (complex_direct_notype_declarator): Use it.
12424         * semantics.c (enter_scope_of): New function.
12425
12426 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
12427
12428         * decl.c (grokparms): No, here.
12429
12430         * decl.c (grokdeclarator): Catch parm with pointer to array of
12431         unknown bound here...
12432         * method.c (process_overload_item): ...not here.
12433
12434         * gxxint.texi: Remove obsolete documentation of overloading code.
12435
12436         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
12437         * class.c (finish_struct_bits): Likewise.
12438
12439         * tree.c (lvalue_type): Fix for arrays.
12440         * typeck.c (build_unary_op): Use lvalue_type.
12441         * call.c (add_function_candidate): Likewise.
12442         * cvt.c (convert_to_reference): Likewise.
12443
12444         * decl2.c (lang_decode_option): Ignore -traditional.
12445
12446         * init.c (build_offset_ref): Don't mess with error_mark_node.
12447         * lex.c (do_scoped_id): Use cp_error.
12448
12449         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
12450
12451 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
12452
12453         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
12454
12455 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
12456
12457         * cp-tree.h (set_identifier_local_value): Provide prototype.
12458
12459         * decl2.c (do_namespace_alias): Remove unused variables `binding'
12460         and `old'.
12461
12462 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
12463
12464         * Makefile.in: Rename BBISON to BISON so that it can be properly
12465         inherited from the parent makefile.
12466
12467 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
12468
12469         * lang-options.h: Add -finit-priority.
12470         * decl2.c: Likewise.  Check flag_init_priority instead of
12471         USE_INIT_PRIORITY.
12472
12473         * decl2.c (setup_initp): New fn.
12474         (start_objects, finish_objects, do_ctors): Handle init_priority.
12475         (do_dtors, finish_file): Likewise.
12476
12477 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
12478
12479         * pt.c (tsubst_copy): Hush warning.
12480
12481         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
12482
12483 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
12484
12485         * pt.c (print_template_context): Don't abort when instantiating a
12486         synthesized method.
12487
12488         * decl.c (grokdeclarator): Issue errors on namespace qualified
12489         declarators in parameter lists or in class scope.
12490
12491 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
12492
12493         * pt.c (check_explicit_specialization): Don't abort on bogus
12494         explicit instantiations.
12495
12496 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
12497
12498         * typeck.c (require_complete_type): Use complete_type_or_else.
12499         (complete_type_or_else): Always return NULL_TREE on failure, as
12500         documented.
12501
12502         * pt.c (tsubst_aggr_type): Prototype.
12503         (tsubst_decl): New function, split out from tsubst.  Set
12504         input_filename and lineno as appropriate.
12505         (pop_tinst_level): Restore the file and line number saved in
12506         push_tinst_level.
12507         (instantiate_class_template): Set input_filename and lineno as
12508         appropriate.
12509         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
12510         context for a TYPENAME_TYPE is complete.
12511
12512         * decl2.c (grokbitfield): Issue errors on bitfields declared with
12513         function type.
12514         (do_dtors): As in do_ctors, pretend to be a member of the same
12515         class as a static data member while generating a call to its
12516         destructor.
12517
12518         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
12519         conversions, even in complex virtual base class hierarchies.
12520
12521 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
12522
12523         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
12524         (TYPE_TEMPLATE_INFO): Likewise.
12525         (SET_TYPE_TEMPLATE_INFO): Likewise.
12526         (ENUM_TI_TEMPLATE): Likewise.
12527         (ENUM_TI_ARGS): Likewise.
12528         (lookup_nested_type_by_name): Remove.
12529         * decl.c (maybe_process_template_type_declaration): Handle enums.
12530         (start_enum): Don't check for primary-template enum declarations
12531         here.
12532         (finish_enum): Clean up, document.  Make sure template enum
12533         constants get the correct type.
12534         (build_enumerator): Copy initializers for template enumerations,
12535         too.
12536         (grok_enum_decls): Document.
12537         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
12538         better.  Build LOOKUP_EXPRs for local variables, even if they are
12539         TREE_PERMANENT.
12540         * pt.c (tsubst_enum): Remove field_chain parameter.
12541         (template_class_depth): Include the depth of surrounding function
12542         contexts.
12543         (push_template_decl): Check for primary-template enum declarations
12544         here.  Deal with enumeration templates.
12545         (lookup_template_class): Likewise.
12546         (for_each_template_parm): Likewise.
12547         (instantiate_class_template): Don't call tsubst_enum directly,
12548         call tsubst instead, to instantiate enums.  Deal with all
12549         field_chain issues here, not in tsubst_enum.
12550         (lookup_nested_type_by_name): Remove.
12551         (tsubst_aggr_type): Revise handling of enumeration types.
12552         (tsubst): Likewise.
12553         (tsubst_copy): Likewise.
12554         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
12555
12556 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
12557
12558         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
12559         uses template parameters.
12560         * method.c (build_template_parm_names): Use the full set of
12561         template arguments for tsubst'ing.
12562         (build_overload_identifier): Pass the full set of template
12563         arguments to build_template_parm_names, not just the
12564         innermost_args.
12565         * pt.c (TMPL_ARGS_DEPTH): Define using
12566         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
12567         (NUM_TMPL_ARGS): New macro.
12568         (add_outermost_template_args): Deal with the case where the outer
12569         args will be completely discarded.
12570         (coerce_template_parms): Use the full set of template arguments
12571         for tsubst'ing.  Simplify.  Add some asserts.  Improve
12572         error messages.
12573         (lookup_template_class): Pass the full set of template arguments
12574         to coerce_template_parms.
12575         (tsubst): Add assertion.
12576         (do_type_instantiation): Don't instantiate member template
12577         classes.
12578
12579         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
12580         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
12581
12582 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
12583
12584         * method.c (set_mangled_name_for_decl): Change return type to void.
12585
12586         * decl.c (lookup_name_real): A namespace-level decl takes priority
12587         over implicit typename.  Avoid doing the same lookup twice.
12588
12589         * search.c (dependent_base_p): New fn.
12590         (dfs_pushdecls, dfs_compress_decls): Use it.
12591
12592         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
12593         virtual functions if the type doesn't have any.
12594
12595 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
12596
12597         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
12598         uses template parameters.
12599
12600 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
12601
12602         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
12603         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
12604         * lex.c (do_identifier): Don't use a second argument, or a type,
12605         when building LOOKUP_EXPRs.
12606         (do_identifier): Likewise.
12607         (do_scoped_id): Likewise.
12608         * method.c (hack_identifier): Improve error message.
12609         * pt.c (lookup_template_function): Don't needlessly call
12610         copy_to_permanent or build_min.
12611         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
12612         necessary.
12613         (do_decl_instantiation): Improve error message.
12614         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
12615         (build_min): Copy the type to the permanent obstack, too.
12616
12617 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
12618
12619         * init.c (init_init_processing): Remove BI* handling.
12620         (build_builtin_call): Remove.
12621         (build_builtin_delete_call): New fn.
12622         (build_delete): Use it.
12623
12624 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
12625
12626         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
12627         (maybe_check_template_type): New function.
12628         * decl.c (maybe_process_template_type_declaration): New function,
12629         split out from pushtag  Call maybe_check_template_type.
12630         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
12631         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
12632         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
12633         * pt.c (template_class_depth_real): Generalization of ...
12634         (template_class_depth): Use it.
12635         (register_specialization): Use duplicate_decls for duplicate
12636         declarations of specializations.
12637         (maybe_check_template_type): New function.
12638         (push_template_decl_real): Fix comment.
12639         (convert_nontype_argument): Likewise.
12640         (lookup_template_class): Likewise.  Avoid an infinite loop on
12641         erroneous code.
12642         (tsubst_friend_function): Fix comment.
12643         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
12644         an IDENTIFIER_NODE.
12645         * semantics.c (begin_function_definition): Use
12646         reset_specialization to note that template headers don't apply
12647         directly to declarations after the opening curly for a function.
12648
12649 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
12650
12651         * decl.c (push_overloaded_decl): Use current_namespace instead of
12652         DECL_CONTEXT (decl) to determine where we go.
12653
12654         * decl.c (lookup_name_real): Fix typo.
12655
12656 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
12657
12658         * friend.c (is_friend): Be lenient with member functions to deal
12659         with nested friends.
12660
12661 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
12662
12663         * class.c (finish_struct_1): Convert integer_zero_node to
12664         ssizetype before passing it to set_rtti_entry.
12665         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
12666         of any size to a pointer.
12667
12668 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
12669
12670         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
12671         (build_template_decl_overload): Remove.
12672         (set_mangled_name_for_decl): New function.
12673         (innermost_args): Remove is_spec parameter.
12674         (most_specialized, most_specialized_class): Remove declarations.
12675         (lookup_template_class): Add entering_scope parameter.
12676         (maybe_process_partial_specialization): New function.
12677         (finish_template_decl): Likewise.
12678         (finish_template_type): Likewise.
12679         * class.c (finish_struct): Clean up processing of member template
12680         specializations.
12681         * decl.c (pushtag): Fix formatting.
12682         (lookup_tag): Improve handling of pseudo-global levels.
12683         (make_typename_type): Adjust call to lookup_template_class.
12684         (shadow_tag): Use maybe_process_partial_specialization.
12685         (xref_tag): Improve handling of member friends.
12686         (start_function): Call push_nested_class before
12687         push_template_decl.  Don't call push_template_decl for
12688         specializations.
12689         * decl2.c (grok_x_components): Don't call xref_tag for
12690         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
12691         (grokclassfn): Use set_mangled_name_for_decl.
12692         (arg_assoc_class): Adjust call to innermost_args.
12693         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
12694         * error.c (dump_function_name): Improve printing of template
12695         function names.
12696         * friend.c (is_friend): Don't compare types of decls to determine
12697         friendship, unless flag_guiding_decls.
12698         (make_friend_class): Partial specializations cannot be friends.
12699         (do_friend): Use set_mangled_name_for_decl.  Call
12700         push_template_decl_real instead of push_template_decl.
12701         * method.c (build_decl_overload_real): Remove prototype.  Give it
12702         external linkage.
12703         (build_overload_identififer): Adjust call to innermost_args.
12704         (build_template_decl_overload): Remove.
12705         (set_mangled_name_for_decl): New function.
12706         * parse.y (.finish_template_type): New non-terminal.
12707         (template_def): Use finish_template_decl.  Use template_extdef
12708         instead of extdef.
12709         (template_extdef, template_datadef): New non-terminals, containing
12710         only those rules for things which can be templates.
12711         (datadef): Tidy.
12712         (template_type, self_template_type): Use .finish_template_type.
12713         (named_class_head): Use maybe_process_partial_specialization.
12714         * pt.c (mangle_class_name_for_template): Remove context parameter.
12715         (get_class_bindings): Remove outer_args parameter.
12716         (complete_template_args): Remove.
12717         (add_outermost_template_args): New function.
12718         (register_specialization): Return the specialization.
12719         (unregister_specialization): New function.
12720         (tsubst_template_parms): Likewise.
12721         (most_specialized, most_specialized_class): Prototype here as
12722         static.
12723         (original_template): Rename to most_general_template.
12724         (tsubst_template_parms): New function.
12725         (set_mangled_name_for_template_decl): Likewise.
12726         (TMPL_ARGS_DEPTH): New macro.
12727         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
12728         (TMPL_ARGS_LEVEL): New macro.
12729         (SET_TMPL_ARGS_LEVEL): Likewise.
12730         (TMPL_ARG): Likewise.
12731         (SET_TMPL_ARG): Likewise.
12732         (TMPL_ARGS_DEPTH): Likewise.
12733         (finish_member_template_decl): Use finish_template_decl.
12734         (maybe_process_partial_specialization): New function, split out
12735         from tsubst.
12736         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
12737         (maybe_begin_member_template_processing): Use new macros.
12738         (is_member_template): Likewise.
12739         (is_member_template_class): Likewise.
12740         (add_to_template_args): Likewise.  Deal with multiple levels of
12741         args.
12742         (maybe_process_partial_specialization): New function.
12743         (retrieve_specialization): Add consistency check.
12744         (determine_specialization): Return full argument list.
12745         (check_explicit_specialization): Tweak friend handling.  Use full
12746         argument lists.  Simplify.
12747         (current_template_args): Use new macros.
12748         (push_template_decl_real): Change ill-named mainargs to specargs.
12749         Check that a partial specialization actually specializes at least
12750         one parameter.   Improve friend handling.  Modify for full
12751         template arguments.
12752         (classtype_mangled_name): Don't mangle the names of
12753         specializations.
12754         (lookup_template_class): Add entering_scope parameter.  Use it to
12755         avoid finding a template type when an instantiation is required.
12756         Simplify.  Use full template arguments.
12757         (tsubst_friend_function): Use unregister_specialization.  Use new
12758         macros.  Use full template arguments.
12759         (tsubst_friend_class): Substitute, using tsubst_template_parms,
12760         into the template parameters before passing them to
12761         redeclare_class_template.
12762         (instantiate_class_template): Simplify.  Use full template
12763         arguments.  Adjust calls to get_class_bindings.  Use
12764         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
12765         (innermost_args): Use new macros.
12766         (tsubst_aggr_type): New function, split out from tsubst.
12767         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
12768         conventions for lookup_template_class.  Refine handling of partial
12769         instantiations.   Remove calls to complete_template_args.
12770         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
12771         and set_mangled_name_for_template_decl.
12772         (tsubst_copy): Use tsubst_aggr_type.
12773         (instantiate_template): Use full template arguments.
12774         (more_specialized): Improve formatting.
12775         (more_specialized_class): Adjust calls to get_class_bindings.
12776         (get_bindings_real): Don't call complete_template_args.
12777         (most_specialized): Don't overwrite input; create a new list.
12778         (most_specialized_class): Use most_general_template.
12779         (regenerate_decl_from_template): Use unregister_specialization.
12780         Use full template arguments.
12781         (instantiate_decl): Use full template arguments.
12782         (set_mangled_name_for_template_decl): New function.
12783         * semantics.c (begin_class_definition): Use
12784         maybe_process_partial_specialization.
12785         (finish_member_class_template): New function.
12786         (finish_template_decl): Likewise.
12787         (finish_template_type): Likewise.
12788         (typeck.c): Don't crash after issuing a compiler_error.
12789         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
12790
12791 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
12792
12793         * typeck2.c (build_functional_cast): Handle default-initialization.
12794
12795         * call.c (build_over_call): Pass 1 to popclass.
12796
12797         * parse.y (direct_notype_declarator): Add precedence declaration
12798         to notype_unqualified_id case.
12799         * Makefile.in (EXPECT): Adjust.
12800
12801         * tree.c (ovl_member): Fix for single function in OVL.
12802
12803 1998-07-27  Dave Brolley  <brolley@cygnus.com>
12804
12805         * c-lex.c (yylex): Fix boundary conditions in character literal and
12806         string literal loops.
12807
12808 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
12809
12810         * decl.c (lookup_name_real): OK, do return the from_obj value
12811         unless got_object depends on template parms.
12812
12813         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
12814
12815         * pt.c (coerce_template_parms): Also complain about local enums.
12816
12817         * cp-tree.h: Add prototype for set_identifier_local_value.
12818         * decl.c (set_identifier_local_value_with_scope): Make static,
12819         prototype.
12820         * search.c (covariant_return_p): Likewise.
12821         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
12822
12823         * call.c (build_method_call): Only pull out the type of a destructor
12824         if it's a template type parm.
12825         * decl.c (lookup_name_real): Never return the from_obj value.
12826
12827 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
12828
12829         * except.c (process_start_catch_block_old): Call start_decl_1 for
12830         catch parm.
12831         * decl.c (start_decl_1): Avoid duplicate error.
12832
12833         * init.c (expand_default_init): Only perform the initialization if
12834         it will do something.
12835
12836 1998-07-23  H.J. Lu  (hjl@gnu.org)
12837
12838         * parse.y (base_class): Check for invalid base class.
12839
12840 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
12841
12842         * decl2.c (import_export_template): Fold in...
12843         (import_export_class): ...to here.  Handle dllimport/export.
12844
12845         * class.c (build_vtable): Pass at_eof to import_export_vtable.
12846         (prepare_fresh_vtable): Likewise.
12847         * decl2.c (import_export_class): Split out...
12848         (finish_prevtable_vardecl): From here.
12849         * class.c (finish_struct_1): Call import_export_class if at_eof.
12850
12851         * decl.c (start_function): #if 0 mysterious code I wrote and have
12852         forgotten why.
12853         * rtti.c (get_tinfo_fn): If this is for a class type, set
12854         DECL_CONTEXT.
12855
12856 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
12857
12858         * inc/exception: Change terminate and unexpected to ().
12859
12860         * parse.y (named_class_head_sans_basetype_defn): A
12861         named_class_head_sans_basetype followed by '{' or ':' is a defn.
12862
12863 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
12864
12865         * tree.c (canonical_type_variant): New fn to handle arrays.
12866         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
12867         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
12868         * method.c (process_overload_item): Use build_overload_value for
12869         arrays.
12870
12871 1998-07-20  Dave Brolley  <brolley@cygnus.com>
12872
12873         * lex.c (mbchar.h): #include it.
12874         (GET_ENVIRONMENT): New macro.
12875         (init_parse): Set character set based on LANG environment variable.
12876         (real_yylex): Handle multibyte characters in character literals.
12877         (real_yylex): Handle multibyte characters in string literals.
12878
12879 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
12880
12881         * lex.c (do_identifier): Look for class value even if we don't
12882         have a global value.  Do implicit declaration if parsing is 2.
12883         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
12884         lookup.
12885
12886 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
12887
12888         * decl.c (pushtag): Revert previous change.
12889         * pt.c (lookup_template_class): Don't put out debugging
12890         information for types that use template parameters.
12891
12892         * decl.c (pushtag): Don't put out debugging information for
12893         compiler-generated typedefs.
12894
12895         * error.c (dump_type_real): Don't crash when presented with
12896         intQI_type_node or the like.
12897
12898         * semantics.c (finish_translation_unit): Fix spelling error in
12899         comment.
12900
12901 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
12902
12903         * decl.c (lookup_name_real): Pull out single function here.
12904         (select_decl): Not here.
12905         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
12906
12907         * decl.c (qualify_lookup): Tweak again.
12908
12909         * pt.c (lookup_template_class): Don't mess with the context of the
12910         instantiation.
12911         * decl2.c (current_decl_namespace): Remove special handling for
12912         templates.
12913
12914         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
12915         a member template specialization.
12916
12917         * tree.c (ovl_member): Use decls_match to compare functions.
12918         * decl.c (decls_match): Check the context of a function.
12919
12920         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
12921         in Koenig lookup support rules.
12922         * semantics.c (finish_call_expr): Handle the new cases.
12923
12924         * typeck.c (build_x_function_call): Handle overloaded methods.
12925
12926         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
12927
12928 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
12929
12930         * semantics.c (finish_object_call_expr): Revert previous change.
12931         * call.c (build_new_method_call): Likewise.  Instead, convert
12932         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
12933
12934 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
12935
12936         * decl.c (qualify_lookup): Handle templates.
12937
12938         * decl2.c (do_using_directive): Don't pass ancestor.
12939         * decl.c (push_using_directive): Calculate ancestor.
12940
12941         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
12942         * decl.c (pushdecl): Move type shadowing handling from here...
12943         (duplicate_decls): ...to here.
12944         * decl.c (set_identifier_local_value_with_scope): New fn.
12945         (pushdecl): Use it.
12946         (set_identifier_local_value, lookup_type_current_level): New fns.
12947         * decl2.c (do_local_using_decl): Handle types and binding level
12948         stuff properly.
12949
12950         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
12951         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
12952         (lookup_namespace_name): Likewise.
12953         * typeck.c (build_unary_op): Not here anymore.
12954
12955         * decl2.c (do_class_using_decl): Make sure we get an identifier.
12956         * class.c (handle_using_decl): Ignore TYPE_DECLs.
12957
12958         * decl.c (qualify_lookup): New fn.
12959         (lookup_name_real): Use it.
12960
12961 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12962
12963         * decl2.c (add_using_namespace): When directly using a namespace
12964         that was indirect before, promote it.
12965
12966         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
12967         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
12968         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
12969         * decl.c (select_decl): Replace two flag parameters by one.
12970         (unqualified_namespace_lookup): Likewise, pass flag.
12971         (lookup_flags): New function.
12972         (lookup_name_real): Compute flags, pass them.
12973         (lookup_namespace_name): Call with zero-flag.
12974         * decl2.c (ambiguous_decl): Add flag parameter, complain only
12975         according to flags.
12976         (lookup_using_namespace, qualified_lookup_using_namespace):
12977         Add flag parameter, pass them through.
12978         * lex.c (do_scoped_id): Call with zero-flag.
12979
12980 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
12981
12982         * typeck.c (convert_for_assignment): Use comptypes.
12983
12984 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
12985
12986         * semantics.c (finish_object_call_expr): Move test for the
12987         function called being a TYPE_DECL to ...
12988         * call.c (build_new_method_call): Here.
12989
12990 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
12991
12992         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
12993         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
12994
12995         * lex.c (looking_for_typename): Don't initialize.
12996
12997         * decl2.c (ambiguous_decl): Clarify error message.
12998
12999         * decl.c (push_using_directive): Iterate over namespaces used
13000         indirectly.
13001
13002 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13003
13004         * decl2.c (add_using_namespace): Iterate over namespaces used
13005         indirectly.
13006
13007         * decl.c (lookup_name_real): Accept namespace aliases as locals.
13008         (cat_namespace_levels): Ignore aliases.
13009         (duplicate_decls): Ignore duplicate aliases.
13010         * decl2.c (do_namespace_alias): Process block level namespace
13011         aliases.  Store alias with pushdecl.  Remove odr errors.
13012         * parse.y (namespace_alias): New non-terminal.
13013         (extdef): Use it.
13014
13015 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
13016
13017         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
13018         Handle TEMPLATE_TYPE_PARM.
13019         (arg_assoc): Rewrite.
13020
13021         * pt.c (complete_template_args): Don't look at the context unless
13022         we have to.
13023
13024         * method.c (build_decl_overload_real): Fix namespace handling.
13025
13026         * typeck.c (build_unary_op): Extract a lone function from an
13027         OVERLOAD.
13028
13029         * call.c (build_scoped_method_call): Handle getting a namespace
13030         for basetype in a destructor call.
13031         (check_dtor_name): Handle enums.
13032
13033         * parse.y (using_directive): New nonterminal.
13034         (extdef, simple_stmt): Use it.
13035
13036 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13037
13038         * decl2.c (add_function): Move error message ...
13039         (arg_assoc_namespace): ... from here.
13040
13041 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
13042
13043         * parse.y (namespace_qualifier): Fix multiple level handling.
13044         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
13045         (arg_assoc): Don't skip the first argument of a function.
13046
13047 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
13048
13049         * search.c (my_tree_cons): Clean up.
13050
13051 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
13052
13053         * call.c (joust): Don't warn about "confusing" conversions to the
13054         same type.
13055
13056 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13057
13058         * class.c (push_nested_class): Complain about namespaces.
13059         * decl.c (start_decl): Enter the object's namespace.
13060         (cp_finish_decl): Leave it.
13061         (grokdeclarator): Likewise.
13062         * decl2.c (check_decl_namespace): New function.
13063         (finish_file): Call it.
13064         * parse.y (complex_direct_notype_declarator): Set complexity
13065         of namespace-qualified ids to -1, enter the namespace.
13066
13067         * method.c (build_template_decl_overload): Expect _DECL as first
13068         parameter.  Put context temporarily into current_namespace.
13069         * pt.c (check_explicit_specialization): Change caller.
13070         (tsubst): Likewise.
13071
13072         * init.c (build_offset_ref): Call mark_used and
13073         convert_from_reference for namespace members.
13074
13075 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13076
13077         * search.c (my_tree_cons): The bitfield is at index 2.
13078
13079 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
13080
13081         * lang-options.h: Format changed to work with new --help support
13082         in gcc/toplev.c
13083
13084 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13085
13086         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
13087         Do Koenig lookup in CALL_EXPR.
13088         (arg_assoc): Handle error_mark.
13089         * lex.c (is_global): New function.
13090         (do_identifier): Expect arguments for Koenig lookup.
13091         * parse.y (primary): Add rules for calls of unqualified function calls.
13092         (do_id): Change call of do_identifier.
13093         * pt.c (finish_stmt_expr): Likewise.
13094         * semantics.c (finish_id_expr): Likewise.
13095         (finish_call_expr): Add integer parameter to indicate
13096         argument-dependent lookup.
13097
13098         * decl.c (struct binding_level): New field using_directives.
13099         (push_using_decl): Not sorry anymore.
13100         (push_using_directive): New function.
13101         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
13102         (unqualified_namespace_lookup): New function, code from ...
13103         (lookup_name_real): ... here.
13104         * decl2.c (lookup_using_namespace): Pass using list instead of
13105         initial scope.
13106         (validate_nonmember_using_decl): New function.
13107         (do_nonmember_using_decl): New function.
13108         (do_toplevel_using_decl): Use them.
13109         (do_local_using_decl): New function.
13110         (do_using_directive): Support block-level directives.
13111         * parse.y (simple_stmt): Support using declarations and
13112         directives.
13113         (namespace_qualifier, namespace_using_decl): New non-terminals.
13114
13115         * xref.c (classname): New function.
13116         (GNU_xref_hier): Change class and base parameters to tree.
13117         * decl.c (xref_baseypes): Change caller.
13118         * friend.c (make_friend_class): Likewise.
13119
13120 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
13121
13122         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
13123         comparison.
13124
13125         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
13126         template template parameter, record its use.
13127         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
13128         its template arguments if exists.
13129
13130         * pt.c (coerce_template_template_parms): New function equivalent
13131         to coerce_template_parms when IS_TMPL_PARM is true.
13132         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
13133         all callers changed.
13134
13135         (coerce_template_parms): Access ARGLIST properly when creating a
13136         new vector.  Only accept implicit TYPE_DECL as valid argument for
13137         a template template parameter when it is a base class of
13138         current_class_type.  Don't display error message when COMPLAIN is
13139         false.
13140
13141 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
13142
13143         * repo.c (get_base_filename): Use file_name_nondirectory.
13144         (open_repo_file): Likewise.
13145         * cp-tree.h (file_name_nondirectory): Add prototype.
13146
13147 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
13148
13149         * friend.c (do_friend): Pull the identifier out of declarator.
13150         Use cp_error and friends.
13151         * decl2.c (qualified_lookup_using_namespace): Fix call to
13152         purpose_member.
13153         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
13154         (grokvardecl): Use DECL_CLASS_SCOPE_P.
13155         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
13156         * class.c (warn_hidden): Fix for OVERLOAD.
13157         From grahams@rcp.co.uk:
13158         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
13159         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
13160
13161 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
13162
13163         * g++.1 (-traditional): Remove duplicated documentation.
13164
13165 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
13166
13167         * method.c (flush_repeats): Add nrepeats parameter.
13168         (issue_nrepeats): Likewise.
13169         (is_back_referenceable_type): New function.  Don't back-reference
13170         TEMPLATE_TYPE_PARMs as well as simple types like integers.
13171         (build_mangled_name_for_type): Likewise.
13172         (build_mangled_name_for_type_with_Gcode): Likewise.
13173         (lasttype): Remove.
13174         (nrepeats): Likewise.
13175         (Nrepeats): Likewise.
13176         (start_squangling): Don't clear the variables removed above.
13177         (end_squangling): Likewise.
13178         (flush_repeats): Tidy.  Use nrepeats parameter rather than
13179         Nrepeats global.
13180         (issue_nrepeats): Likewise, but with nrepeats global.  Use
13181         is_backreferenceable_type.
13182         (build_overload_nested_name): Tidy.  Add comment.  Use
13183         build_mangled_name_for_type.
13184         (build_underscore_int): Comment.
13185         (build_overload_scope_ref): Use build_mangled_name_for_type.
13186         (build_overload_int): Likewise.
13187         (build_template_template_parm_names): Tidy.
13188         (build_template_parm_names): Use build_mangled_name_for_type.
13189         (build_overload_identifier): Add comments.
13190         (build_mangled_name_for_type_with_Gcode): Split out from
13191         build_mangled_name.
13192         (build_mangled_name_for_type): Use it.
13193         (build_mangled_name): Rework to use build_mangled_name_for_type
13194         and to not use global nrepeats/Nrepeats.  Tidy.
13195         (process_modifiers): Tidy.
13196         (check_btype): Use is_backreferenceable_type.  Add comment.
13197         Rename `node' to `type'.
13198         (process_overload_item): Set numeric_output_need_bar here.
13199         Use build_mangled_name_for_type.  Tidy.
13200         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
13201         build_mangled_name_for_type.
13202
13203         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
13204         for TYPE_DECLs.
13205
13206 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
13207
13208         * cp-tree.h (warn_long_long): Define.
13209         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
13210         warning "ANSI C++ does not support `long long'".
13211         * decl2.c (warn_long_long): Define.
13212         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
13213
13214 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
13215
13216         * decl.c (xref_tag): Handle attributes between 'class' and name.
13217         * parse.y (aggr): Likewise.
13218         * semantics.c (finish_class_definition): Likewise.
13219         * Makefile.in (EXPECTED): Adjust.
13220
13221         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
13222         * decl2.c: Define them.
13223         (lang_decode_option): Handle them.
13224         * lang-options.h: Add -foptional-diags.
13225         * class.c (finish_struct): Don't complain about multiple meanings of
13226         name if -fno-optional-diags.
13227         * decl.c (pushdecl_class_level): Likewise.
13228         * lex.c (real_yylex): Check warn_multichar.
13229
13230 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
13231
13232         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
13233
13234         * tree.c (make_binfo): Fix length.
13235
13236 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
13237
13238         * decl2.c (lang_decode_option): Remove warn_template_debugging.
13239         * lang-options.h: Likewise.
13240
13241 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13242
13243         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
13244         (process_start_catch_block): Likewise for variables
13245         `false_label_rtx', `call_rtx' and `return_value_rtx'.
13246
13247 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
13248
13249         * tree.c (build_srcloc): Make sure we allocate this node on the
13250         permanent obstack.
13251
13252 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
13253
13254         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
13255         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
13256         (lang_specific_driver): Only add -lm automatically if need_math is
13257         nonzero.
13258
13259 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
13260
13261         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
13262
13263 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13264
13265         * Makefile.in (EXPR_H): New dependency variable.
13266         (decl2.o): Depend on $(EXPR_H).
13267         (typeck.o): Likewise.
13268         (init.o): Likewise.
13269         (expr.o): Likewise.
13270
13271 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
13272
13273         * decl.c (start_enum): Put local enums on permanent_obstack.
13274
13275 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
13276
13277         * cp-tree.h (c_get_alias_set): Declare.
13278         * decl.c (init_decl_processing): Set lang_get_alias_set.
13279
13280 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
13281
13282         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
13283         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
13284         flag for all function decls which are in the exception table.
13285         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
13286         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
13287         code is emitted for any referenced rtti function.
13288
13289 1998-06-25  Dave Brolley  <brolley@cygnus.com>
13290
13291         * lang-specs.h: Use new | syntax to eliminate
13292         string concatenation.
13293
13294 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
13295
13296         * cp-tree.h (CP_DECL_CONTEXT): New macro.
13297         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
13298         * method.c (build_overload_nested_name): Likewise.
13299         * sig.c (build_signature_pointer_or_reference_type): Don't set
13300         DECL_CONTEXT.
13301
13302 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13303
13304         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
13305         * cp-tree.h (FROB_CONTEXT): New macro.
13306         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
13307         * decl.c (namespace_binding): Replace NULL_TREE with
13308         global_namespace.
13309         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
13310         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
13311         Likewise.
13312         * decl.c (pushtag): Use FROB_CONTEXT.
13313         (pushdecl, make_typename_type, define_function, grokdeclarator):
13314         Likewise.
13315         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
13316         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
13317         Likewise.
13318         * decl2.c (decl_namespace): Return global_namespace if no context.
13319         * method.c (build_overload_nested_name): Expect null as context.
13320         * pt.c (mangle_class_name_for_template): Do nothing for null
13321         contexts.
13322         (lookup_template_class): Allow for null id_context.
13323
13324 1998-06-25  Richard Henderson  <rth@cygnus.com>
13325
13326         * method.c (emit_thunk): Set current_function_is_thunk for the
13327         ASM_OUTPUT_MI_THUNK case as well.
13328
13329 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
13330
13331         * exception.cc (__cplus_type_matcher): Get a match_info pointer
13332         instead of an exception table entry as a parameter.
13333
13334 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
13335
13336         * parse.y (function_try_block): Don't call start_catch_handler.
13337         * except.c (call_eh_info): Remove coerced field from declaration.
13338         (build_eh_type_type_ref): New function to create an address of a
13339         rtti function for the new style exception tables.
13340         (expand_start_catch_block): Split function, this contains the
13341         common part.
13342         (process_start_catch_block_old): New function to perform the rest
13343         of expand_start_catch_block under old style exceptions.
13344         (process_start_catch_block_old): New function to perform the rest
13345         of expand_start_catch_block under new style exceptions.
13346         (expand_end_catch_block): Only pop the false label off the stack under
13347         the old style of exceptions.
13348         * semantics.c (finish_try_block): Don't call start_catch_handler.
13349         * exception.cc (struct cp_eh_info): Add original_value field.
13350         (__cplus_type_matcher): Perform type matching on the original exception
13351         value, and if we have a match, set the current value.
13352         (__cp_push_exception): Set the original exception value.
13353
13354 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
13355
13356         * call.c (joust): Fix confusing conversion warning.
13357
13358         * call.c (build_op_delete_call): Add placement parm.  Check
13359         LOOKUP_SPECULATIVELY.
13360         * cp-tree.h, decl2.c, init.c: Adjust.
13361         * decl.c (finish_function): Use it.
13362
13363         * pt.c (tsubst): Diagnose creating void fields or variables.
13364
13365 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13366
13367         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
13368
13369         * cp-tree.h (check_dtor_name): Add prototype.
13370
13371         * init.c (expand_member_init): Remove unused variables
13372         `ptr_type_node', `parm' and `rval'.
13373
13374         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
13375         in call to fprintf.
13376         (lang_print_xnode): Likewise.
13377
13378         * typeck2.c (enum_name_string): Cast argument to sprintf to long
13379         and use %ld specifier.
13380
13381         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
13382         specifier in call to fprintf.
13383         (GNU_xref_member): Cast argument to sprintf to int.
13384
13385 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13386
13387         * typeck2.c (pop_init_level): Warn about implicit zero initialization
13388         of struct members.
13389
13390 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13391
13392         * cp-tree.h: Prototype function `check_java_method'.
13393
13394 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
13395
13396         * class.c (finish_struct): Make conflicting use of id a pedwarn.
13397         * decl.c (pushdecl_class_level): Likewise.
13398
13399 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
13400
13401         * pt.c (convert_nontype_argument): Issue an error when presented
13402         with an integer (real) constant that cannot be simplified to an
13403         INT_CST (REAL_CST).
13404
13405         * cp-tree.h (c_get_alias_set): Remove declaration added in
13406         1998-06-13 change that should never have been checked in.
13407
13408 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
13409
13410         * typeck.c (build_binary_op_nodefault): Change % in format strings
13411         to %%.
13412
13413         * decl.c (grokvardecl): Don't build_static_name for decls that
13414         aren't at namespace scope.
13415
13416         * init.c (perform_member_init): Catch default-initialization of
13417         references.
13418
13419 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
13420
13421         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
13422
13423 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
13424
13425         * method.c (hack_identifier): Complain about getting a namespace
13426         or class template.
13427         * typeck.c (decay_conversion): Remove check for namespaces.
13428         * typeck2.c (incomplete_type_error): Likewise.
13429         * parse.y (template_arg): Add PTYPENAME expansion.
13430
13431 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
13432
13433         * decl.c (grokvardecl): Don't build external assembler names for
13434         TYPENAMEs in other namespaces as there is no declarator.
13435         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
13436         info from DECL_CONTEXT if it is NULL.
13437
13438 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
13439
13440         * call.c (check_dtor_name): Split out.
13441         (build_scoped_method_call): Use it.
13442         (build_method_call): Use it.
13443         * init.c (build_offset_ref): Use it.
13444
13445         * typeck.c (build_static_cast): Fix handling of pointers to members.
13446
13447         * decl.c (finish_function): Just return nothing from a constructor.
13448         * typeck.c (c_expand_return): Complain about returning a void
13449         expression from a destructor.
13450
13451 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
13452
13453         * class.c (alter_access): Accept a BINFO explaining how to get
13454         from the entity whose accessed is being altered to the type doing
13455         the altering.
13456         (handle_using_decl): New function containing code split out from ...
13457         (finish_struct_1): Here.
13458
13459         * cp-tree.h (complete_type_or_else): Declare.
13460         * init.c (build_new_1, build_delete): Use it.
13461         * typeck.c (require_complete_type): Use complete_type, rather than
13462         expanding it inline.
13463         (complete_type_or_else): New function.
13464         (build_component_ref): Use it.
13465         (pointer_int_sum): Make sure the type pointed to is complete.
13466         (pointer_diff): Likewise.
13467
13468         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
13469         types.
13470
13471         * search.c (get_matching_virtual): Note that member templates
13472         cannot override virtual functions.
13473
13474 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
13475
13476         * pt.c (check_explicit_specialization): If DECLARATOR turned into
13477         an error_mark_node from lookup_template_function, return the same.
13478         (determine_specialization): Also make sure TEMPLATE_ID isn't an
13479         error_mark_node, before we try to read its operands.
13480         * decl.c (grokdeclarator): If we got an error_mark_node from
13481         check_explicit_specialization, just return it right back.
13482
13483 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
13484
13485         * class.c (instantiate_type): Don't treat template-ids that don't
13486         specify any template arguments as equivalent to ordinary
13487         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
13488         pointer-to-members for member templates.  Tidy slightly.
13489         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
13490         * init.c (build_offset_ref): Handle template-ids like ordinary
13491         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
13492         offset part of the OFFSET_REF.
13493         * typeck.c (build_unary_op): Change check for unknown types to
13494         look for OFFSET_REFs, not SCOPE_REFs.
13495
13496 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
13497
13498         * pt.c (is_member_template_class): New function.
13499         (push_template_decl_real): Use it.
13500
13501 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
13502
13503         * friend.c (do_friend): Add support for nested classes using
13504         member functions of the enclosing class as friends.
13505
13506 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
13507
13508         * call.c (convert_default_arg): Make global, not static.
13509         (convert_arg_for_ellipsis): Split out from ...
13510         (build_over_call): Here.
13511         * cp-tree.h (convert_default_arg); Declare.
13512         (convert_arg_to_ellipsis): Likewise.
13513         (do_member_init): Remove.
13514         * init.c (do_member_init): Remove; this code is dead.
13515         (expand_member_init): Remove much of this code; it is dead.
13516         * typeck.c (convert_arguments): Use convert_default_arg and
13517         convert_arg_for_ellipsis, rather than duplicating here.
13518
13519         * call.c (convert_like): Don't fail silently if
13520         build_user_type_conversion fails.  Always return error_mark_node
13521         for failure.
13522
13523 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
13524
13525         * search.c (covariant_return_p): Complain about ambiguous base.
13526
13527         * typeck.c (build_component_ref): Diagnose ref to nested type.
13528
13529 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
13530
13531         * decl.c (grokparms): Check that INIT isn't an error_mark_node
13532         before giving error about invalid type for default arg.
13533
13534 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
13535
13536         * call.c (build_method_call): Fix thinko.
13537
13538 1998-06-10  Dave Brolley  <brolley@cygnus.com>
13539
13540         * decl2.c (lang_decode_option): New argc/argv interface.
13541         * cp-tree.h (lang_decode_option): New argc/argv interface.
13542         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
13543         specified for cpplib-enabled compilers.
13544         * lex.c (lang_init): Don't check_newline for cpplib.
13545         (init_parse): Don't initialize cpplib here.
13546
13547 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
13548
13549         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
13550         piece before checking DECL_MUTABLE_P.
13551
13552 1998-06-10  John Carr  <jfc@mit.edu>
13553
13554         * tree.c (debug_binfo): Make printf format match arguments.
13555
13556         * error.c (OB_PUTI): Make printf format match arguments.
13557
13558 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
13559
13560         * init.c (perform_member_init): Handle default-initialization.
13561
13562         * except.c (build_throw): Handle throwing NULL.
13563
13564         * typeck.c (build_x_function_call): Use resolve_offset_ref.
13565
13566         * search.c (compute_access): Only strip an anonymous union
13567         for a FIELD_DECL.
13568
13569         * call.c (add_builtin_candidates): Tweak.
13570
13571         * cvt.c (build_expr_type_conversion): Restore code for conversion
13572         from class types.
13573         * decl2.c (delete_sanity): Use it.  Clean up.
13574
13575         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
13576
13577 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
13578
13579         * typeck.c (c_expand_return): Don't warn about void expressions on
13580         return statements in functions returning void.
13581
13582 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
13583
13584         * pt.c (fn_type_unification): Revise documentation.  Tidy.
13585         (type_unification): Likewise.
13586
13587 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
13588
13589         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
13590         expand_end_catch.
13591         * parse.y (function_try_block): Rename expand_start_catch, and delete
13592         expand_end_catch.
13593         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
13594         expand_end_catch.
13595
13596 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
13597
13598         * search.c (lookup_member): New fn.
13599         * class.c (finish_struct_1): Use it.
13600         * decl.c (lookup_name_real): Use it.
13601
13602 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13603
13604         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
13605
13606         * cp-tree.h: Add prototype for `maybe_print_template_context' and
13607         `maybe_make_one_only'.
13608
13609         * decl.c (auto_function): Remove unused variable `decl'.
13610
13611         * decl2.c: Include dwarf2out.h and dwarfout.h.
13612
13613         * lex.c: Remove redundant declarations of `set_float_handler' and
13614         `asm_out_file'.
13615
13616 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
13617
13618         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
13619         time flag.  Call __cp_eh_info instead of __cp_exception_info.
13620         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
13621         (__cp_exception_info): Return offset into cp_eh_info structure to
13622         match what use to be the start of this structure.
13623         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
13624         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
13625         compile time flag.
13626         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
13627         __cp_eh_info instead of __cp_exception_info.
13628
13629 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
13630
13631         * decl.c (cp_finish_decl): Disable inlining of extern inlines
13632         with static variables.
13633
13634 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
13635
13636         * init.c (build_offset_ref): Correct previous change to use build,
13637         not build_min.
13638
13639 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
13640
13641         * class.c (instantiate_type): Handle pointer-to-members where the
13642         member is a template.
13643         * init.c (build_offset_ref): Likewise.
13644         * typeck.c (build_unary_op): Likewise.
13645
13646 1998-06-07  Richard Henderson  <rth@cygnus.com>
13647
13648         * lex.c (lang_init_options): New function.
13649         (lang_init): Remove flag_exceptions == 2 hack.
13650
13651 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
13652
13653         * search.c (envelope_add_decl): Tweak for implicit typename.
13654
13655         * call.c (joust): Also warn about confusing conversion op/constructor
13656         overload resolution.
13657
13658         * spew.c (yylex): Also return the TYPE_DECL if got_object.
13659         Don't clear got_object after '~'.
13660         * call.c (build_scoped_method_call): Tweak destructor handling.
13661         (build_method_call): Likewise.
13662         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
13663         TYPE_MAIN_VARIANT for destructors.
13664         * semantics.c (finish_object_call_expr): Complain about calling a
13665         TYPE_DECL.
13666
13667 1998-06-05  Per Bothner  <bothner@cygnus.com>
13668
13669         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
13670         Define - update needed by gcc.c change.
13671
13672 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
13673
13674         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
13675
13676 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
13677
13678         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
13679         * decl.c (lookup_name_real): Add namespaces_only parameter.
13680         If set, return only NAMESPACE_DECLs.
13681         (select_decl): Likewise.
13682         (identifier_type_value): Give additional parameter.
13683         (lookup_name_nonclass): Likewise.
13684         (lookup_name): Likewise.
13685         (find_binding): Skip namespace aliases.
13686         (binding_for_name): Likewise.
13687         (push_namespace): Check for namespace aliases.
13688         (lookup_name_namespace_only): New function.
13689         (begin_only_namespace_names, end_only_namespace_names): New functions.
13690         * decl2.c (set_decl_namespace): Skip namespace aliases.
13691         (do_using_directive): Likewise.
13692         (do_namespace_alias): Produce namespace aliases, fix alias
13693         redeclaration.
13694         * error.c (dump_decl): Support SCOPE_REF.
13695         * parse.y (extdef): Wrap lookup with namespace_only for namespace
13696         aliases and using declarations.
13697
13698 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
13699
13700         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
13701
13702         * error.c (dump_expr): Clean up NEW_EXPR case.
13703
13704 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13705
13706         Suggested by Brendan Kehoe
13707         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
13708         treat it as using ::decl.
13709
13710         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
13711
13712         * tree.c (mapcar): Support NEW_EXPR.
13713
13714         * error.c (dump_expr): Support NEW_EXPR.
13715
13716 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
13717
13718         * method.c (make_thunk): Use overload machinery to make name.
13719         * search.c (covariant_return_p): New fn.
13720         (get_matching_virtual): Use it.
13721
13722         * init.c (build_new_1): Fix check for void.
13723
13724 1998-06-01  Per Bothner  <bothner@cygnus.com>
13725
13726         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
13727         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
13728         java_int_type_node, java_long_type_node, java_float_type_node,
13729         java_double_type_node, java_char_type_node, java_boolean_type_node):
13730         New "primitive" types, with predefined names __java_byte etc.
13731         (record_builtin_java_type):  New function.
13732         (init_decl_processing):  Make Java types with record_builtin_java_type.
13733         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
13734         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
13735         (grokfndecl):  Call check_java_method for Java classes.
13736         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
13737         (process_overload_item):  Match types against specific
13738         java_XX_type_node types, rather than using is_java_type.
13739         * class.c (finish_struct_1):  Don't add default copy constructor
13740         or operator= if TYPE_FOR_JAVA.
13741         (pop_lang_conext):  Restore strict_prototyp proper if Java.
13742         * decl2.c (acceptable_java_type, check_java_method):  New functions.
13743         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
13744         (tsubst):  Move common statement after if statement.
13745         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
13746
13747 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
13748
13749         * pt.c (for_each_template_parm): Use first_rtl_op.
13750
13751         * tree.c (build_cplus_array_type_1): Also check index_type for
13752         template parms.
13753
13754 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
13755
13756         * pt.c (tsubst): Always copy BINFO_BASETYPES.
13757
13758 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
13759
13760         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
13761         TYPE_SIZE_UNIT too.
13762
13763 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
13764
13765         * decl.c (grokdeclarator): Don't complain about in-class
13766         initialization of static consts if we don't really know the type
13767         of the variable.
13768
13769 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
13770
13771         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
13772         * method.c (build_destructor_name): New fn.
13773         * decl2.c (maybe_retrofit_in_chrg): Split out...
13774         (grokclassfn): From here.  Reorganize.
13775         * decl.c (grok_ctor_properties): Make sure ctors for types with
13776         vbases have the in_chrg parm.
13777         * pt.c (instantiate_class_template): Update
13778         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
13779         grok_*_properties.
13780         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
13781
13782 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
13783
13784         * pt.c (instantiate_decl): Make test for whether or not static
13785         variables should be instantiated early match its comment.
13786
13787 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
13788
13789         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
13790         a member.
13791         (start_function): Call check_default_args.
13792         * decl2.c (grokfield): Don't call check_default_args.
13793         (check_default_args): Use cp_error_at.
13794         * lex.c (do_pending_defargs): Call check_default_args.
13795
13796 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
13797
13798         * call.c (build_method_call): Make sure get_type_value returns
13799         something before we try to use its TYPE_MAIN_VARIANT.
13800         (build_scoped_method_call): Likewise.
13801
13802 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
13803
13804         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
13805         initialize an array.
13806
13807         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
13808         DECL_VIRTUAL_P.
13809
13810         * friend.c (do_friend): Clarify template warning.
13811
13812 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
13813
13814         * decl.c (shadow_label): Don't treat decls as identifiers.
13815         (maybe_push_to_top_level): Clear shadowed_labels.
13816
13817         * pt.c (instantiate_decl): Reset lineno and filename after calling
13818         regenerate_decl_from_template.
13819
13820         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
13821         error_mark_node.
13822
13823 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
13824
13825         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
13826
13827 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13828
13829         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
13830         (convert_nontype_argument): Handle cases when nontype template
13831         parameters become classes after substitution.
13832
13833 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
13834
13835         * friend.c (is_friend): Use comptypes, rather than == to compare
13836         types.  Modify for new representation of template friends.
13837         (make_friend_class): Likewise.
13838         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
13839         (instantiate_class_template): Deal with template friends.
13840
13841         * decl.c (store_parm_decls): Remove redundant call to
13842         expand_main_function.
13843
13844 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13845
13846         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
13847         DECL_USE_TEMPLATE.
13848
13849 1998-05-26  Per Bothner  <bothner@cygnus.com>
13850
13851         * language_as_string:  Handle lang_java.
13852
13853 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
13854
13855         * decl.c (pushdecl): Don't copy the type_decl.
13856
13857 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13858
13859         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
13860         current_class_type.
13861         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
13862
13863         * parse.y (complex_direct_notype_declarator): Use $1 to access
13864         scope of notype_qualified_id.
13865
13866 1998-05-26  Dave Brolley  <brolley@cygnus.com>
13867
13868         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
13869         (init_parse): Initialize cpplib interface.
13870
13871         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
13872         empty continuation.
13873
13874 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
13875
13876         * decl.c (pushtag): Avoid crashing on erroneous input.
13877
13878 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13879
13880         * decl.c (push_namespace): Only produce one unique name for
13881         anonymous namespaces.
13882         (get_unique_name): Remove.
13883
13884 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
13885
13886         * call.c (tourney): Don't do any extra comparisons.
13887
13888         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
13889
13890         * cp-tree.h (processing_template_parmlist): Declare.
13891         * decl.c (pushtag): Don't call push_template_decl when we
13892         shouldn't.
13893         * pt.c (processing_template_parmlist): New variable.
13894         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
13895         (complete_template_args): Use it.
13896         (add_to_template_args): Likewise.
13897         (innermost_args): Likewise.
13898         (tsubst): Likewise.
13899         (begin_template_parm_list): Use processing_template_parmlist.
13900         (end_template_parm_list): Likewise.
13901
13902         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
13903         * decl.c (grokdeclarator): Use it.
13904         * decl2.c (grok_x_components): Likewise.
13905         * init.c (initializing_context): Likewise.
13906         * method.c (do_build_copy_constructor): Likewise.
13907         (do_build_assign_ref): Likewise.
13908         * search.c (compute_access): Likewise.
13909         * typeck.c (build_component_ref): Likewise.
13910
13911         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
13912         unnamed type a typedef name "for linkage purposes".
13913
13914         * pt.c (lookup_template_class): Don't look at
13915         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
13916
13917         * method.c (build_overload_int): Handle error cases gracefully.
13918
13919         * pt.c (instantiate_decl): Handle static member variables
13920         correctly.
13921
13922         * pt.c (tsubst): Use the tsubst'd type when producing new
13923         TEMPLATE_PARM_INDEX nodes.
13924
13925 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
13926
13927         * tree.c (cp_tree_equal): Handle pointers to member functions.
13928
13929         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
13930         sure the type of the REF_BIND is a reference type.
13931         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
13932         target_type for clarity.
13933
13934         * parse.y (xcond): Move call to condition_conversion ...
13935         * semantics.c (finish_for_cond): Here.
13936         * parse.c: Regenerated.
13937
13938 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
13939
13940         * decl.c (push_namespace): Namespaces have type void.
13941         * typeck2.c (incomplete_type_error): Complain about namespace
13942         used as expression.
13943         * typeck.c (decay_conversion): Likewise.
13944
13945 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13946
13947         * error.c (dump_expr): Support namespaces.
13948
13949 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
13950
13951         * cp-tree.def: Add SRCLOC.
13952         * cp-tree.h: Add struct tree_srcloc and accessor macros.
13953         * tree.c (build_srcloc, build_srcloc_here): New fns.
13954         * pt.c (add_pending_template): Use build_srcloc_here.
13955         (push_tinst_level): Update last_template_error_tick before erroring.
13956         (instantiate_decl): Restore lineno and input_filename before
13957         calling add_pending_template.
13958         * decl2.c (finish_file): Set up lineno and input_filename for
13959         pending templates.
13960
13961 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
13962
13963         * decl.c (lang_print_error_function): New fn.
13964         (init_decl_processing): Set print_error_function to use it.
13965         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
13966
13967         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
13968         ICS_BAD_FLAG.
13969
13970         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
13971         copy-initialization.
13972
13973         * class.c (build_vtable_entry): Use int_fits_type_p.
13974         (build_vtable): Pass a signed offset to build_vtable_entry.
13975         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
13976         set_rtti_entry): Likewise.
13977
13978 1998-05-22  Per Bothner  <bothner@cygnus.com>
13979
13980         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
13981         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
13982
13983 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
13984
13985         * pt.c (print_template_context): Use fprintf instead of cp_error.
13986
13987         * pt.c (determine_specialization): Just return an error_mark_node.
13988         Also print the decl we want in error messages.  If we complain,
13989         return error_mark_node.
13990         (tsubst_friend_function): Set lineno and input_filename so
13991         error messages will be useful.
13992         (instantiate_template): Just return an error_mark_node.
13993         (check_explicit_specialization): Don't mess with a returned
13994         error_mark_node.
13995
13996         * pt.c (print_template_context): Add new argument.
13997         (maybe_print_template_context): New fn.
13998         (push_tinst_level): Increment tinst_level_tick.
13999         (pop_tinst_level): Likewise.
14000         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
14001         xrealloc instead of xmalloc.
14002
14003         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
14004
14005 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
14006
14007         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
14008         if the template we looked up is the same as the one we already
14009         have.
14010
14011 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
14012
14013         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
14014         (cpp_reader,parse_in): Add for cpplib.
14015         (check_newline): Call handle_sysv_pragma with new interface.
14016         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
14017
14018         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
14019         (sub_getch): Call GETC for cpplib.
14020
14021         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
14022         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
14023
14024         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
14025
14026 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
14027
14028         * decl2.c (maybe_make_one_only): New fn.
14029         (import_export_vtable): Use it.
14030         (import_export_decl): Likewise.
14031         * pt.c (mark_decl_instantiated): Likewise.
14032
14033 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
14034
14035         * decl2.c (find_representative_member): Rename to ...
14036         (build_anon_union_vars): New function.
14037         (finish_anon_union): Fix stupidity of previous change.
14038
14039 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
14040
14041         * decl.c (grokfndecl): Handle definition of specialization in
14042         friend declaration.
14043
14044         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
14045
14046 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
14047
14048         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
14049         to look for type declarations.
14050         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
14051         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
14052         (finish_member_class_template): Declare.
14053         * decl.c (pushtag): Put member class templates on the
14054         CLASSTYPE_TAGS list, just as for ordinary member classes.
14055         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
14056         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
14057         IDENTIFIER_NAMESPACE_VALUEs.
14058         * parse.y (component_decl): Move code to ...
14059         * semantics.c (finish_member_class_template): New function.
14060         Don't put member class templates on the list of components for a
14061         class.
14062         * parse.c: Regenerated.
14063         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
14064         In fact, don't use DECL_CONTEXT at all here.
14065
14066 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
14067
14068         * decl.c (record_unknown_type): New function.
14069         (init_decl_processing): Call it for the unknown and global type
14070         nodes.
14071
14072 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
14073
14074         * decl2.c (find_representative_member): New function.
14075         (finish_anon_union): Use it.
14076
14077         * cp-tree.h (MAIN_NAME_P): New macro.
14078         (DECL_MAIN_P): Likwise.
14079         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
14080         (grokfndecl): Use the new macros.
14081         (grokdeclarator): Likewise.
14082         (start_function): Likewise.
14083         (store_parm_decls): Likewise.
14084         (finsh_function): Likewise.
14085         * friend.c (do_friend): Likewise.
14086         * typeck.c (build_function_call_real): Likewise.
14087         (build_unary_op): Likewise.
14088
14089 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
14090
14091         * decl2.c (start_objects, finish_objects, do_dtors,
14092         do_ctors): Split out from...
14093         (finish_file): ...here.
14094
14095 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
14096
14097         * tree.c (is_overloaded_fn): Don't abort on placeholders from
14098         push_class_decls.
14099
14100 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
14101
14102         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
14103
14104         * error.c (dump_expr): Handle an ARROW_EXPR.
14105
14106 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
14107
14108         * decl.c (saveable_obstack): Declare.
14109         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
14110         declare, if necessary.
14111
14112 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
14113
14114         * call.c (compare_qual): Remove.
14115         (is_subseq): Tweak.
14116         (is_properly_derived_from): New function.
14117         (maybe_handle_ref_bind): Likewise.
14118         (maybe_handle_implicit_object): Likewise.
14119         (compare_ics): Modify substantially to bring into conformance with
14120         the standard.
14121         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
14122         (comp_cv_qualification): Declare.
14123         (comp_cv_qual_signature): Likewise.
14124         * typeck.c (comp_cv_qualification): Likewise.
14125         (comp_cv_qual_signature): Likewise.
14126
14127 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14128
14129         * Makefile.in (parse.o): Depend on toplev.h.
14130
14131         * class.c (typecode_p): Remove prototype and definition.
14132
14133         * cp-tree.h (currently_open_class, is_empty_class, member_p):
14134         Add prototype.
14135
14136         * decl.c (push_overloaded_decl_top_level): Remove prototype and
14137         definition.
14138
14139         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
14140         in call to `cp_thing'.
14141         (cp_warning): Likewise for function pointer `warning'.
14142
14143         * except.c (do_function_call): Remove prototype and definition.
14144         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
14145
14146         * method.c (is_java_type): Add prototype and make it static.
14147
14148         * parse.y: Include toplev.h.
14149
14150         * pt.c (type_unification): Remove unused variable `arg'.
14151         (instantiate_decl): Likewise for `save_ti'.
14152
14153         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
14154
14155 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
14156
14157         * init.c (build_member_call): Handle template_ids.
14158         * parse.y (primary): Add global_scope template_id.
14159
14160 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
14161
14162         * decl2.c (get_sentry): Use end_temporary_allocation.
14163         Don't declare permanent_obstack.
14164
14165 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
14166
14167         * parse.y (.finish_new_placement): New non-terminal.
14168         (unary_expr, new_type_id): Use it.
14169         * parse.c: Regenerated.
14170
14171 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
14172
14173         * pt.c (redeclare_class_template): Say where the original definition
14174         of the template-parameter's default argument appeared.
14175
14176 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
14177
14178         * call.c (build_over_call): Tweak empty class handling.
14179
14180         * decl.c (make_typename_type): Use currently_open_class.
14181
14182         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
14183
14184 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
14185
14186         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
14187         for a type unless it is one.
14188
14189         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
14190
14191 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
14192
14193         * Makefile.in (program_transform_name, objdir): Define.
14194
14195         * Makefile.in (BISON): Use bison from the build tree if it exists.
14196         (FLEX): Likewise.
14197
14198 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
14199
14200         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
14201
14202         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
14203
14204 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
14205
14206         * call.c (build_scoped_method_call): Likewise.
14207
14208 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
14209
14210         * init.c (build_new_1): Call suspend_momentary around the creation
14211         of values that must be saved for exception handling.
14212         * parse.y (.build_new_placement): New non-terminal.
14213         (unary_expr, new_placement): Use it.
14214         * parse.c: Regenerated.
14215
14216 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
14217
14218         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
14219         old and new types.
14220
14221         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
14222         canonical type.
14223
14224         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
14225
14226 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
14227
14228         * decl.c (start_decl): Revert problem change.
14229
14230         * Makefile.in (CONFLICTS): Fix.
14231
14232 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14233
14234         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
14235
14236 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
14237
14238         * class.c (finish_struct_1): Use BINFO_SIZE.
14239
14240         * decl.c (start_decl): Use 'tem'.
14241
14242 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
14243
14244         * exception.cc: Include eh-common.h.
14245         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
14246         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
14247         (__cp_push_exception): Initialize eh_info struct as well.
14248         * except.c: Remove local structs and include eh-common.h.
14249         (init_exception_processing): Set language and version codes.
14250         (call_eh_info): Add presence of eh_info to runtime description of
14251         struct cp_eh_info.
14252         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
14253         * semantics.c (finish_try_block): Call start_catch_block() and
14254         end_catch_block().
14255         * parse.y (function_try_block): Call start_catch_block() and
14256         end_catch_block().
14257
14258 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
14259
14260         * typeck.c (original_type): New function.
14261         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
14262         to see if they're actually the same.
14263         * cp-tree.h (original_type): Declare.
14264
14265 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14266
14267         * Makefile.in (lex.o): Depend on output.h.
14268
14269         * call.c (add_function_candidate): Remove unused variable `cand'.
14270         (add_conv_candidate): Likewise.
14271         (build_builtin_candidate): Likewise.
14272
14273         * cp-tree.h: Add prototype for `types_overlap_p'.
14274
14275         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
14276
14277         * decl2.c (merge_functions): Remove unused variables `tmp' and
14278         `tempn'.
14279
14280         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
14281         (code_as_string): Likewise.
14282         (language_as_string): Likewise.
14283         (parm_as_string): Likewise.
14284         (op_as_string): Likewise.
14285         (assop_as_string): Likewise.
14286         (cv_as_string): Likewise.
14287
14288         * lex.c: Include output.h.
14289
14290         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
14291
14292         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
14293         ATTRIBUTE_UNUSED.
14294
14295         * tinfo.cc (__class_type_info::dcast): Change the type of variable
14296         `i' from int to size_t.
14297
14298         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
14299         ATTRIBUTE_UNUSED.
14300
14301 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
14302
14303         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
14304         DECL_NAMESPACE_SCOPE_P.
14305         (lang_decl_name): Likewise.
14306         * pt.c (tsubst_friend_function, tsubst): Likewise.
14307         * decl.c (pushdecl, redeclaration_error_message, start_decl,
14308         cp_finish_decl, start_function): Likewise.
14309         * class.c (finish_struct_1): Likewise.
14310         * call.c (build_over_call): Likewise.
14311         (compare_ics): Use DERIVED_FROM_P.
14312
14313 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
14314
14315         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
14316         * method.c (build_mangled_name): Use it.
14317         (build_decl_overload_real): Likewise.
14318
14319         * error.c (dump_simple_decl): New function, broken out from ...
14320         (dump_decl): Use it.
14321
14322 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
14323
14324         * ptree.c (lang_print_xnode): Add missing `break'.
14325
14326         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
14327
14328         * call.c (add_template_candidate): Adjust for changes to
14329         fn_type_unification.
14330         (add_template_candidate_real): Likewise.
14331         (add_template_conv_candidate): Likewise.
14332         (build_user_type_conversion_1): Likewise.
14333         (build_new_function_call): Likewise.
14334         (build_object_call): Likewise.
14335         (build_new_op): Likewise.
14336         (build_new_method_call): Likewise.
14337         * class.c (instantiate_type): Likewise.
14338         * cp-tree.h (unification_kind_t): New type.
14339         (fn_type_unification): Adjust prototype.
14340         (type_unificaiton): Likewise.
14341         * pt.c (UNIFY_ALLOW_NONE): New macro.
14342         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
14343         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
14344         (UNIFY_ALLOW_DERIVED): Likewise.
14345         (unify): Change prototype.
14346         (maybe_adjust_types_for_deduction): New function.
14347         (check_cv_quals_for_unify): Likewise.
14348         (determine_specialization): Adjust.
14349         (fn_type_unification): Likewise.
14350         (type_unification): Likewise.
14351         (type_unification_real): Likewise.  Use
14352         maybe_adjust_types_for_deduction.  Fix mishandling of
14353         back-unification of template functions passed as arguments.  Pass
14354         appropriate combination of UNIFY_ALLOW_* to unify.
14355         (unify): Remove unused NTPARMS parameter.  Use
14356         check_cv_quals_for_unify.  Remove bogus code that allowed
14357         too-generous unification in order to adhere more closely to standard.
14358         (get_bindings_real): Adjust.
14359         (get_class_bindings): Likewise.
14360
14361         * method.c (build_overload_identifier): Only use the innermost
14362         template arguments when mangling.
14363         * pt.c (tsubst_template_argument_vector): New function.
14364         (complete_template_args): Deal with the situation where the
14365         extra_args contain more than one level of arguments.
14366         (lookup_template_class): Deal with member template classes, which
14367         may have more than one level of arguments.
14368         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
14369         Improve handling of member template classes.  Use
14370         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
14371         tsubst_template_argument_vector where appropriate.
14372         (regenerate_decl_from_template): Break out from ...
14373         (instantiate_decl): Here.
14374
14375         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
14376         * parse.h: Regenerated.
14377         * parse.c: Really regenerated.
14378
14379         * cp-tree.h (finish_unary_op_expr): New function.
14380         (finish_id_expr): Likewise.
14381         (begin_new_placement): Likewise.
14382         (finish_new_placement): Likewise.
14383         (finish_declarator): Likewise.
14384         (finish_translation_unit): Likewise.
14385         (finish_parmlist): Likewise.
14386         (begin_class_definition): Likewise.
14387         (finish_class_definition): Likewise.
14388         (finish_default_args): Likewise.
14389         (finish_inline_definitions): Likewise.
14390         * parse.y (GCC_ASM_KEYWORD): Remove.
14391         (TYPENAME_ELLIPSIS): Likewise.
14392         * parse.c: Regenerated.
14393         Use new functions in semantics.c in the actions for many rules.
14394         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
14395         * hash.h: Regenerated.
14396         * semantics.c (finish_expr_stmt): Allow NULL expr.
14397         (finish_unary_op_expr): New function, containing
14398         code previously in parse.y.
14399         (finish_id_expr): Likewise.
14400         (begin_new_placement): Likewise.
14401         (finish_new_placement): Likewise.
14402         (finish_declarator): Likewise.
14403         (finish_translation_unit): Likewise.
14404         (finish_parmlist): Likewise.
14405         (begin_class_definition): Likewise.
14406         (finish_class_definition): Likewise.
14407         (finish_default_args): Likewise.
14408         (finish_inline_definitions): Likewise.
14409
14410 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
14411
14412         * typeck.c (build_c_cast): Don't decay arrays and functions to
14413         pointer type when converting to a class type.
14414
14415 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
14416
14417         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
14418         (DECL_CLASS_SCOPE_P): Likewise.
14419
14420 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
14421
14422         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
14423         * decl2.c (constructor_name_full): Likewise.
14424
14425 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
14426
14427         * tree.c (mapcar): Add OVERLOAD support.
14428
14429         * init.c (resolve_offset_ref): We must use basetype_path before we
14430         destroy it with a call to convert_pointer_to.
14431
14432 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
14433
14434         * class.c (currently_open_class): New fn.
14435         * decl.c (lookup_name_real): Use it.
14436         * search.c (lookup_field): Likewise.
14437
14438 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
14439
14440         * cp-tree.def (OVERLOAD): New node.
14441         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
14442         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
14443         (NAMESPACE_BINDING): Remove.
14444         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
14445         namespace_binding.
14446         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
14447         Define.
14448         (tree_overload): New struct.
14449         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
14450         (REAL_IDENTIFIER_TYPE_VALUE): Define.
14451         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
14452         (lang_decl_flags): Remove in_namespace.
14453         (lang_decl): Remove chain.
14454         (DECL_CHAIN, DECL_NAMESPACE): Remove.
14455         (flag_honor_std): Declare extern.
14456         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
14457         namespace_binding, set_namespace_binding,
14458         lookup_function_nonclass, cat_namespace_levels,
14459         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
14460         scratch_ovl_cons, ovl_member, build_overload): Declare.
14461         (decl_list_length, get_namespace_id, current_namespace_id,
14462         overloaded_globals_p): Remove.
14463         (lookup_using_namespace, qualified_lookup_using_namespace): Change
14464         return type.
14465         (push_scratch_obstack): New macro.
14466         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
14467         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
14468         convs, fns.
14469         (build_new_function_call): Iterate using OVL_CHAIN.
14470         Print DECL_NAME in when reporting ambiguities.
14471         (build_object_call): Iterate using OVL_NEXT for fns, convs.
14472         (build_new_op): Call lookup_function_nonclass.
14473         Iterate using OVL_NEXT.
14474         (build_op_delete_call): Change detection of members.
14475         Do not wrap TREE_LIST around fields and single global functions.
14476         (build_over_call): Don't push a class level if the context is a
14477         namespace.
14478         (build_new_method_call): Iterate using OVL_NEXT.
14479         * class.c (add_method): Chain overloaded members using
14480         build_overload.  Remove copying of method.
14481         (grow_method): When iterating through the obstack, expect OVERLOAD
14482         nodes.  Chain overload members.
14483         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
14484         nodes in call to get_baselinks.
14485         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
14486         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
14487         fdecls that are OVERLOAD nodes.
14488         (validate_lhs): New function.
14489         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
14490         code.  Use DECL_NAME in error messages.  Split code between global
14491         and member function processing.
14492         * decl.c (global_type_node): New static variable.
14493         (in_std): New global.
14494         (struct binding_level): New field usings.
14495         (resume_binding_level): Assert that we are not in a class.
14496         (toplevel_bindings_p): Just check for namespace_p or
14497         pseudo_global.
14498         (resume_level): Remove.
14499         (find_binding): New function.
14500         (binding_for_name): Call it.
14501         (namespace_binding, set_namespace_binding): New functions.
14502         (push_namespace): Associate binding level with new namespace,
14503         resume_binding_level for existing namespace.  Remove old code.
14504         Fake std by counting.
14505         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
14506         (maybe_push_to_top_level): Save current namespace.
14507         (pop_from_top_level): Restore saved namespace.
14508         (pop_namespace): Call suspend_binding_level.  Remove old code.
14509         (cat_namespace_levels): New function.
14510         (set_identifier_type_value_with_scope): For namespace bindings,
14511         set BINDING_TYPE, and use global_type_node.
14512         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
14513         (identifier_type_value): New function.
14514         (pushtag): If no context, use current_namespace.
14515         (duplicate_decls): Don't process DECL_CHAIN.
14516         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
14517         already set.  Never reset it to NULL_TREE.  Lookup global variables
14518         in their namespace.  Push overloaded templates if they are on
14519         namespace level.
14520         (pushdecl_namespace_level): New function.
14521         (pushdecl_top_level): Implement using pushdecl_namespace_level.
14522         (pushdecl_using_decl): New function.
14523         (overloaded_globals_p): Remove.
14524         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
14525         them.  Use namespace_binding and set_namespace_value.
14526         (redeclaration_error_message): Complain if the declarations come
14527         from different namespaces.
14528         (lookup_tag): On namespace level, look in the BINDING_TYPE.
14529         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
14530         old code.
14531         (select_decl): New function.
14532         (lookup_name_real): Call it for qualified and unqualified lookup.
14533         Pass tree_bindings from the stack.
14534         If prefer_type is 1, also accept namespaces.
14535         (lookup_function_nonclass): New function.
14536         (init_decl_processing): Set the binding level of the global
14537         namespace to global_binding_level.
14538         Build a proper type list for __builtin_apply.
14539         Initialize std_node to "fake std" if flag_honor_std is set.
14540         Initialize global_type_node.
14541         Allocated bad_alloc in namespace std if flag_honor_std.
14542         (define_function): Set the DECL_CONTEXT to the current_namespace.
14543         (start_decl): A namespace is not considered as a context here.  If
14544         the DECL_CONTEXT is a namespace, push the decl.
14545         (cp_finish_decl): Check for namespaces used as initializers.
14546         (grokfndecl): Add namespace parameter.  Remove processing of
14547         DECL_CHAIN.
14548         (grokvardecl): Add namespace parameter.
14549         (grokdeclarator): Process SCOPEs that are namespaces.  For
14550         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
14551         (start_function): Check for contexts that are namespaces.
14552         Set context for declarations that have not been pushed.
14553         (store_parm_decls): Check for ::main only.
14554         (finish_function): Likewise.
14555         (start_method): Check for contexts that are namespaces.
14556         (start_method): Remove DECL_CHAIN processing.
14557         * decl2.c (flag_honor_std): Declare.
14558         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
14559         (decl_namespace_list): New static global.
14560         (grok_x_components): Ignore namespaces as type contexts.
14561         (check_classfn): Expect OVERLOAD nodes.
14562         (grokfield): Remove DECL_CHAIN processing.
14563         (finish_file): Call cat_namespace_levels.
14564         (merge_functions): New function.
14565         (ambiguous_decl): Rewrite.
14566         (lookup_using_namespace): Produce tree_bindings.
14567         (qualified_lookup_using_namespace): Likewise.
14568         (set_decl_namespace, decl_namespace, current_decl_namespace,
14569         push_decl_namespace, pop_decl_namespace): New functions.
14570         (arg_lookup): New struct.
14571         (add_function, arg_assoc_namespace, arg_assoc_class,
14572         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
14573         New functions.
14574         (get_namespace_id, current_namespace_id): Remove.
14575         (do_toplevel_using_decl): Rewrite.
14576         (do_class_using_decl): Complain about namespace qualifiers.
14577         (do_using_directive): Sorry if not on namespace level.  Complain
14578         about unknown namespaces.
14579         * error.c (dump_aggr_type): Check for namespace contexts.
14580         * except.c (init_exception_processing): Push terminate into std.
14581         * friend.c (is_friend): A namespace is not a context, here.
14582         * init.c (expand_member_init): Remove DECL_CHAIN processing.
14583         (build_offset_ref): Process OVERLOAD nodes.
14584         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
14585         * lex.c (identifier_type): Loop using OVL_CHAIN.
14586         (see_typename): Set looking_for_typename to 2.
14587         (real_yylex): Likewise.
14588         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
14589         (do_scoped_id): Expect OVERLOAD nodes.
14590         Change calling convention for qualified_lookup_using_namespace.
14591         (build_lang_decl): Don't set in_namespace anymore.
14592         * method.c (typevec_size): New global.
14593         (build_overload_nested_name): Return if global_namespace.
14594         Otherwise, always expect a declaration context.
14595         (build_qualified_name): Likewise.
14596         Make sure we don't write beyond typevec_size.
14597         (build_decl_overload_real): Likewise.
14598         Allocate one extra slot for the namespace.
14599         (hack_identifier): Mark code dead.
14600         Process OVERLOAD and NAMESPACE_DECL nodes.
14601         * parse.y (program): Pop namespaces until in global namespace.
14602         (extdef): In a using-declaration, don't discard the identifier if
14603         there is no declaration.
14604         (left_curly): Ignore type contexts which are namespaces.
14605         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
14606         used as scope.
14607         * pt.c (template_class_depth): Expect types to be namespaces.
14608         (determine_specialization): Simplify by expecting OVERLOAD nodes.
14609         (push_template_decl): Push into namespace level.
14610         Reset ctx if it is a namespace.
14611         Set DECL_CONTEXT to current_namespace if not set already.
14612         Ignore real contexts that are namespaces.
14613         (mangle_class_name_for_template): Skip global_namespace.
14614         Mangle other namespaces as declarations.
14615         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
14616         (lookup_template_class): Push into namespace of context.
14617         If the context is a namespace, set it to global_namespace.
14618         Use id_context for mangling.
14619         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
14620         (tsubst_friend_function): Ignore namespace contexts.
14621         Push into namespace level.
14622         (tsubst): Handle NAMESPACE_DECL nodes.
14623         Remove DECL_CHAIN processing.
14624         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
14625         * ptree.c (print_lang_identifier): Print bindings.
14626         (lang_print_xnode): Print OVERLOAD nodes.
14627         * rtti.c (init_rtti_processing): Push type_info into std.
14628         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
14629         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
14630         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
14631         lookup_fnfields_here): Likewise.
14632         Process all nodes, instead of going through TREE_CHAIN.
14633         * sig.c (build_signature_pointer_or_reference_type): Set context
14634         to global_namespace.
14635         (build_signature_table_constructor): Expect OVERLOAD nodes.
14636         * spew.c (yylex): Save old setting of looking_for_typename.
14637         * tree.c (decl_list_length): Remove.
14638         (binding_init): New function.
14639         (count_functions): Rewrite.
14640         (is_overloaded_fn): Expect OVERLOAD nodes.
14641         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
14642         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
14643         ovl_member): New functions.
14644         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
14645         (type_unknown_p): Likewise.
14646         (require_instantiated_type): Likewise.
14647         (build_component_ref): Declare code dead.
14648         (build_x_function_call): Create and expect OVERLOAD nodes.
14649         (build_function_call_real): Check for ::main only.
14650         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
14651         (convert_for_assignment): Check for TREE_LIST before accessing
14652         TREE_VALUE.
14653         * decl.c (duplicate_decls): Check for namespace bindings instead
14654         of global bindings.
14655         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
14656         lookup_name_current_level, start_decl, xref_tag,
14657         finish_enum): Likewise.
14658         * init.c (build_offset_ref): Likewise.
14659         * search.c (lookup_field): Likewise.
14660         (lookup_fnfields): Likewise.
14661         (dfs_debug_mark): Likewise.
14662         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
14663         (poplevel_class, pop_from_top_level): Likewise.
14664         * decl2.c (finish_method): Likewise.
14665         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
14666         * decl.c (record_builtin_type): Likewise.
14667         (init_decl_processing, grokfndecl): Likewise.
14668         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
14669         (make_lang_type): Likewise.
14670         * parse.y (make_thunk): Likewise.
14671         * pt.c (tsubst): Likewise.
14672         * tree.c (debug_binfo): Likewise.
14673         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
14674         tinfo2.cc, inc/new.h: Add std qualifications.
14675         * inc/new: Wrap with namespace std if __HONOR_STD.
14676         * inc/typeinfo: Likewise.
14677
14678 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
14679
14680         * call.c (build_user_type_conversion_1): Handle second_conv
14681         properly for templates.
14682
14683 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
14684
14685         * method.c (build_decl_overload_real): Set TREE_USED flag to
14686         zero for build_type_variants nodes as well.
14687
14688 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
14689
14690         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
14691
14692 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
14693
14694         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
14695         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
14696         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
14697         xref.o): Add toplev.h dependencies.
14698
14699 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
14700
14701         * errfn.c (cp_error, cp_warning): Remove declarations for
14702         error and warning respectively.
14703
14704 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14705
14706         * error.c: Convert to using ctype macros defined in system.h.
14707         * method.c: Likewise.
14708         * xref.c: Likewise.
14709         * lex.c: Likewise.  Also remove redundant system header stuff.
14710
14711 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
14712
14713         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
14714         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
14715         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
14716         xref.c: Add include of toplev.h.
14717
14718 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
14719
14720         * tree.c (perm_manip): Also regenerate the RTL of an extern.
14721         (copy_to_permanent): Use end_temporary_allocation.
14722
14723 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
14724
14725         * init.c (expand_vec_init): The initialization of each array
14726         element is a full-expression.
14727
14728 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
14729
14730         * method.c (build_mangled_name): Add a call to build_type_variant
14731         to get the right type.
14732
14733 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
14734
14735         * Makefile.in: Add .SUFFIXES.
14736
14737         * cp-tree.def: Remove NAMESPACE_DECL.
14738
14739 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
14740
14741         * call.c (build_over_call): Do evaluate arg even if it has empty
14742         class type.
14743         * decl.c (start_function): Don't push a member function.
14744
14745 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
14746
14747         * Makefile.in (g++FAQ.info): Put -o option before input file.
14748
14749 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
14750
14751         * gxxint.texi: Add info for squangling codes K and B.
14752
14753 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
14754
14755         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
14756         the expression in templates.
14757         (finish_stmt_expr): Likewise.
14758
14759 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
14760
14761         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
14762
14763 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
14764
14765         * decl.c (maybe_push_to_top_level): Always clear
14766         current_template_parms and processing_template_decl.
14767         (pushtag): Remove check of current_class_type and some comments,
14768         since maybe_push_to_top_level no longer creates confusion.
14769
14770 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
14771
14772         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
14773         (DECL_CLASS_TEMPLATE_P): Likewise.
14774         (DECL_PRIMARY_TEMPLATE): Likewise.
14775         (PRIMARY_TEMPLATE_P): Use it.
14776         (push_template_decl_real): New function.
14777         (redeclare_class_template): Take new template parameters as
14778         input.
14779         (is_specialization_of): New function.
14780         (comp_template_args): Declare.
14781         * decl.c (pushtag): Handle friend template classes.
14782         (xref_tag): Likewise.  Use new calling convention for
14783         redeclare_class_template.
14784         * decl2.c (grok_x_components): Handle friend templates.
14785         * friend.c (is_friend): Use is_specialization_of where
14786         appropriate.  Deal with friend class templates.
14787         (make_friend_class): Let a class template be friends with itself.
14788         * pt.c (comp_template_args): Remove declaration.
14789         (tsubst_friend_class): New function.
14790         (push_template_decl_real): New function.
14791         (push_template_decl): Use it.
14792         (redeclare_class_template): Adjust for new calling convention.
14793         (comp_template_args): Give it external linkage.
14794         (instantiate_class_type): Use tsubst_friend_class to deal
14795         with friend templates.
14796         * typeck.c (comptypes): Use comp_template_args, rather than
14797         expanding it inline.
14798         * parse.y (component_decl): Handle a nested template type
14799         like other component type declarations.
14800
14801         * pt.c (check_explicit_specialization): Handle overloaded
14802         constructors correctly.
14803
14804         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
14805         (lookup_template_class): Use it.
14806
14807 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
14808
14809         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
14810         * cp-tree.h: Add WRAPPER support.
14811         * call.c (add_candidate): Split out from add_*_candidate fns.
14812         (build_over_call): Take the candidate instead of function and args.
14813         Enforce access control here.  Emit overload warnings here.
14814         (add_warning): New fn.
14815         (joust): Add WARN parm.  If not set, call add_warning instead of
14816         printing a warning.  Re-enable some warnings.
14817         (tourney): Pass it.
14818         (convert_like): Adjust.
14819         (build_new_op): Adjust.
14820         (build_new_function_call): Adjust.
14821         (build_user_type_conversion_1): Adjust.
14822         (USER_CONV_FN): Adjust.
14823         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
14824         build_int_wrapper): New fns.
14825
14826 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
14827
14828         * pt.c (unify): Fix typo in previous change.
14829
14830 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
14831
14832         * error.c (dump_type_real): Declare canonical_name.
14833
14834         * typeck.c (comp_target_types): Fix PMFs.
14835
14836 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
14837
14838         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
14839         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
14840         TEMPLATE_DECL.
14841
14842         * pt.c (tsubst): Decrease the template-level of
14843         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
14844         TEMPLATE_PARM_INDEX.
14845         (template_decl_level): New function.
14846         (unify): Make sure to record unifications for template
14847         parameters, even when the parameters exactly match the arguments.
14848         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
14849         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
14850         aren't from the level we're currently working on.
14851
14852 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
14853
14854         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
14855
14856         * decl2.c (check_member_template): Set DECL_IGNORED for member
14857         class templates, too.
14858
14859         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
14860
14861 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14862
14863         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
14864
14865 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
14866
14867         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
14868         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
14869         (init_decl_processing): Handle TI types.
14870         * typeck.c (unsigned_type, signed_type): Handle TI types.
14871
14872 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
14873
14874         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
14875         New local added_libraries.  Increment count when add library to
14876         arglist.
14877
14878 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
14879
14880         * cp-tree.h (type_as_string_real): New function.
14881         * pt.c (mangle_class_name_for_template): Use it.
14882         * error.c (dump_aggr_type): Change prototype.
14883         (dump_type_prefix): Likewise.
14884         (dump_type_suffix): Likewise.
14885         (dump_type_real): Convert from dump_type.  If desired, the
14886         "canonica" name of a typedef, i.e., the name of the underlying
14887         type, can be printed.
14888         (dump_type): Call dump_type_real.
14889
14890 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
14891
14892         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
14893
14894         * typeck.c (comp_target_types): Tweak pedantic case.
14895         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
14896         Return -1 or 1 instead of 1 or 2.
14897         (compparms): Remove STRICT handling.
14898         (convert_for_assignment): Fix handling of pmfs.
14899
14900 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
14901
14902         * typeck.c (comp_target_types): Handle references like pointers.
14903         (comp_target_parms): Note that return code from comp_target_types
14904         can be negative to indicate failure.
14905
14906 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14907
14908         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
14909         which requires a working target compiler to build.
14910
14911 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
14912
14913         * tree.c (avoid_overlap): Add prototype.
14914
14915         * spew.c (num_tokens): Add prototype.
14916         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
14917
14918         * search.c (dfs_check_overlap): Add prototype.
14919         (dfs_no_overlap_yet): Likewise.
14920
14921         * pt.c (original_template): Add prototype.
14922         (inline_needs_template_parms): Likewise.
14923         (push_inline_template_parms_recursive): Likewise.
14924         (retrieve_specialization, register_specialization): Likewise.
14925         (print_candidates, reduce_template_parm_level): Likewise.
14926         (build_template_decl, mark_template_parm): Likewise.
14927         (tsubst_friend_function, get_bindings_real): Likewise.
14928
14929         * method.c (start_squangling): Add prototype.
14930         (end_squangling, check_ktype, issue_ktype): Likewise.
14931         (build_overloaded_scope_ref, check_btype): Likewise.
14932         (build_mangled_template_parm_index): Likewise.
14933
14934         * lex.c (init_cpp_parse): Add prototype.
14935         (handle_cp_pragma, handle_sysv_pragma): Likewise.
14936         (reduce_cmp, token_cmp): Likewise.
14937
14938         * except.c (call_eh_info): Add prototype.
14939         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
14940         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
14941
14942         * decl2.c (is_namespace_ancestor): Add prototype.
14943         (namespace_ancestor, add_using_namespace): Likewise.
14944         (ambiguous_decl): Likewise.
14945
14946         * decl.c (indent): Add prototype.
14947
14948         * call.c (add_template_candidate_real): Add prototype.
14949
14950 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
14951
14952         * decl2.c (build_expr_from_tree): Just return a PMF.
14953
14954 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
14955
14956         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
14957         when doing initializations.
14958
14959         * pt.c (unify): Use comptypes to compare type args.
14960
14961 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
14962
14963         * decl.c (duplicate_decls): Fix check for when it's safe to free
14964         the new decl.
14965
14966         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
14967         to type_as_string.
14968
14969 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
14970
14971         * pt.c (build_template_parm_index): Add prototype.
14972
14973         * search.c (my_tree_cons): Don't clear words outside the
14974         newly allocated node.
14975
14976 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
14977
14978         * lex.c (init_parse): Now returns char* containing the filename.
14979
14980 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
14981                           Jeff Law   <law@cygnus.com>
14982
14983         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
14984         than a pointer.
14985
14986 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14987
14988         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
14989
14990 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
14991
14992         * decl.c (duplicate_decls): Don't warn for redundant decls if
14993         friend: let add_friend take care of it.
14994
14995 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
14996
14997         * sig.c (build_signature_pointer_constructor): Don't set
14998         TREE_HAS_CONSTRUCTOR for a signature pointer.
14999         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
15000         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
15001         here, too.
15002         * typeck.c (build_unary_op): Only allow taking the address of a
15003         real constructor.
15004         * typeck2.c (digest_init): Simplify.
15005         (store_init_value): Don't pedwarn about using { } for pmfs.
15006
15007 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
15008
15009         * cp-tree.h (start_decl):  Update prototype.
15010         * decl.c (start_decl):  Like the C version, new parameters
15011         for the attributes.  Call cplus_decl_attributes here,
15012         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
15013         (grokdeclarator):  Pass NULL for new start_decl arguments.
15014         * pt.c (tsubst_expr):  Likewise.
15015         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
15016         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
15017         * lex.c (build_lang_decl): Add lang_name_java.
15018         * class.c (push_lang_context): Add lang_name_java.
15019         * method.c (build_mangled_name): Check for is_java_type.
15020
15021 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
15022
15023         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
15024         * call.c (build_scoped_method_call): Check for TREE_CODE for
15025         VOID_TYPE instead of type ==  void_type_node.
15026         (build_method_call): Likewise.
15027         * decl.c (lookup_name_real): Likewise.
15028         (grokdeclarator): Likewise.
15029         (start_decl): Likewise.
15030         (grokparms): Likewise.
15031         (start_function): Likewise.
15032         (finish_function): Likewise.
15033         (start_method): Likewise.
15034
15035 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
15036
15037         * lex.c (finput): New variable.
15038         (init_cpp_parse):  Renamed from init_parse.
15039         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
15040         (finish_parse): New function.
15041         * cp-tree.h (init_lex, init_parse): Remove declarations.
15042
15043 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
15044
15045         * call.c (build_call): Still evaluate the actual argument.
15046         * class.c (is_empty_class): Update for -fnew-abi.
15047
15048         * decl2.c: -fnew-abi implies -fsquangle.
15049
15050         * method.c (do_build_assign_ref): Don't do anything to copy
15051         an empty class.
15052         (do_build_copy_constructor): Likewise.
15053         * call.c (build_over_call): Likewise.
15054
15055 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
15056
15057         * tree.c (avoid_overlap): Return a value.
15058
15059 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
15060
15061         * method.c (check_btype): Add missing argument to xrealloc.
15062         (check_ktype): Likewise.
15063
15064 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
15065
15066         Implement empty base optimization.
15067         * class.c (finish_struct_1): Add vbase fields earlier.  Set
15068         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
15069         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
15070         (types_overlap_p): New fn.
15071         * tree.c (avoid_overlap): New fn.
15072         (build_base_fields): Use it to avoid overlapping empty bases.
15073         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
15074
15075         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
15076
15077         Re-implement allocation of base class subobjects.
15078         * tree.c (unshare_base_binfos): New fn.
15079         (layout_basetypes): Use it.  Now handles offsets of both virtual and
15080         non-virtual bases, after layout_type.
15081         (layout_vbasetypes): Remove.
15082         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
15083         (build_vbase_pointer_fields): Split out from old layout_basetypes.
15084         * class.c (finish_base_struct): Lose offset handling code.
15085         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
15086         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
15087         * cp-tree.h: Adjust.
15088
15089 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
15090
15091         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
15092         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
15093         * class.c (duplicate_tag_error): Likewise.
15094         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
15095         * tree.c (layout_vbasetypes): Update from layout_record, remove
15096         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
15097         (layout_basetypes): Likewise.
15098
15099 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
15100
15101         * class.c, Make sure system.h is included just after config.h.
15102         Delete lingering stdio and errno references too.
15103         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
15104
15105 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
15106
15107         * friend.c (is_friend): Fix access control for local classes.
15108
15109         * class.c (is_empty_class): New fn.
15110         * call.c (build_call): Don't pass empty class objects to a function.
15111
15112 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
15113
15114         * call.c (build_over_call): Do name resolution for default
15115         arguments of function templates in the scope of the templates.
15116
15117 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
15118
15119         * call.c: Include system.h.  Remove includes, declarations and
15120         defines provided by system.h.
15121         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
15122         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
15123         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
15124         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
15125         * typeck2.c, xref.c: Likewise.
15126         * Makefile.in: Dependencies updated as appropriate.
15127         * Make-lang.in: Likewise.
15128
15129 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
15130
15131         * pt.c (fn_type_unification): Allow incomplete unification without
15132         an immediate error message.
15133
15134 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
15135
15136         * tree.c (member_p): New fn.
15137         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
15138         initializing class members.
15139
15140         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
15141         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
15142
15143         * call.c (build_method_call): Handle non-scoped destructors, too.
15144         * pt.c (tsubst_copy): Likewise.
15145
15146         * pt.c (print_template_context): Split out...
15147         (push_tinst_level): ...from here.
15148
15149         * friend.c (is_friend): Don't pass a type to decl_function_context.
15150
15151         * typeck.c (convert_for_initialization): Always hand off
15152         conversions to class type.
15153
15154 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
15155
15156         * friend.c (is_friend): Local classes have the same access as the
15157         enclosing function.
15158
15159 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
15160
15161         * typeck.c (expand_target_expr): Delete dead function.
15162
15163         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
15164
15165         * repo.c (save_string): Delete dead function.
15166
15167         * method.c (thunk_printable_name): Delete dead function.
15168
15169         * lex.c (yynextch): Delete dead function.
15170
15171         * expr.c (tree_extract_aggr_init): #if 0 out.
15172
15173         * except.c (do_unwind): Delete dead function.
15174         (easy_expand_asm): Likewise.
15175
15176         * cvt.c (build_conversion_type_1): Delete dead function.
15177
15178         * cp-tree.h (push_expression_obstack): Declare.
15179
15180         * call.c (source_type): #if 0 out.
15181
15182         * class.c (alter_access): Remove unused label.  Add braces
15183         around empty else clause.
15184
15185         * lex.c (yyprint): Fix argument to printf.
15186
15187 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
15188
15189         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
15190
15191         * pt.c (instantiate_class_template): Make sure template
15192         arguments are permanent.
15193         * init.c (resolve_offset_ref): Don't go looking around in
15194         template types.
15195
15196         * semantics.c: Add routines to handle expressions, and some
15197         declaration processing.
15198         * parse.y: Use them.
15199         (current_class_depth): Move declaration to cp-tree.h.
15200         * parse.c: Regenerated.
15201         * cp-tree.h: Use them.
15202         (current_class_depth): Declare.
15203         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
15204
15205 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
15206
15207         * error.c (dump_decl): Be a bit more explicit with template
15208         type arguments, when verbose.
15209
15210 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
15211
15212         * inc/exception: Reorder closing braces.
15213
15214 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
15215
15216         * pt.c (redeclare_class_template): New function.
15217         * cp_tree.h (redeclare_class_template): Declare it.
15218         * decl.c (xref_tag): Use it.
15219
15220 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
15221
15222         * call.c (build_over_call): Check IS_AGGR_TYPE, not
15223         TYPE_LANG_SPECIFIC.
15224         * typeck.c (convert_arguments): Likewise.
15225
15226         * decl.c (grokdeclarator): Remove const and volatile from type after
15227         setting constp and volatilep.
15228
15229         * class.c (finish_struct_1): Don't warn about bool bitfield larger
15230         than one bit.
15231
15232 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
15233
15234         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
15235
15236 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
15237
15238         * call.c (build_object_call): Complain about ambiguous operator(),
15239         rather that crashing.
15240         (build_new_op): Likewise.
15241         (build_op_delete_call): Likewise.
15242
15243 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
15244
15245         * cvt.c (perform_qualification_conversions): Use comp_target_types
15246         instead of comp_ptr_ttypes.
15247
15248 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
15249
15250         * cp-tree.h (enforce_access): Declare.
15251         * call.c (enforce_access): Make it extern, not static.
15252         * class.c (alter_access): Use enforce_access; modify code for ISO
15253         compliance, rather than ARM rules.
15254
15255 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15256
15257         * cp-tree.h: Fix typo.
15258
15259 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
15260
15261         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
15262         if (aggregate_value_p (type)).
15263
15264         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
15265
15266 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
15267
15268         * tree.c (mapcar): When dealing with a DECL, use it's constant
15269         value, if any.
15270         * pt.c (lookup_template_class): Don't mangle the names of template
15271         classes whose arguments are unknown.
15272
15273         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
15274
15275 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
15276
15277         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
15278
15279 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
15280
15281         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
15282         boolean_type_node to 1.
15283
15284 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
15285
15286         * error.c (dump_expr): Remove unused variable `l'.
15287
15288         * pt.c (for_each_template_parm): New function, created by
15289         converting uses_template_parms.
15290         (tree_fn_t): New typedef.
15291         (uses_template_parms): Use it.
15292         (mark_template_parm): New function.
15293         (push_template_decl): Check that the argument list of a partial
15294         specialization uses all the template parameters.
15295
15296         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
15297         with it; we might want it for debugging.
15298         * cp-tree.h (type_unification): Change interface.
15299         * class.c (finish_struct_1): Skip nested template types, just like
15300         ordinary nested types.
15301         (instantiate_type): Use new interface to type_unification.
15302         * lex.c (init_lex): Add __sz as opname for sizeof.
15303         * method.c (build_overload_scope_ref): New function.
15304         (build_overload_int): Handle complex expressions.  Set
15305         numeric_output_need_bar if necessary.
15306         (build_overload_value): Handle non-PARM_DECL nodes; this
15307         routine is now used by build_overload_int.  Remove some
15308         assignments to numeric_output_need_bar.  Use
15309         build_overload_scope_ref.
15310         (build_qualified_name): Note that some template mangled names end
15311         with digits, and set numeric_output_need_bar appropriately.  Use
15312         build_underscore_int.
15313         * pt.c (unify): Change interface.
15314         (type_unification_real): Likewise.
15315         (determine_specialization): Use new interfaces.
15316         (tsubst): Deal gracefully with situations in which the argument
15317         vector is not fully filled.
15318         (fn_type_unification): Use new interfaces.
15319         (type_unification): Likewise.  Remove NOP_EXPR hack.
15320         (type_unification_real): Likewise.
15321         (unify): Likewise.  Deal with unification of complex expressions.
15322
15323 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
15324
15325         * pt.c (complete_template_args): Initialize skip properly.
15326
15327         * decl.c (make_typename_type): Revert.
15328         (make_implicit_typename): Remove.
15329         (lookup_name_real): Don't call it.  Call lookup_field if we see a
15330         TYPE_DECL from a template base.
15331         * search.c (lookup_field): Do implicit typename stuff.
15332
15333 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
15334                           Geoff Noer    <noer@cygnus.com>
15335
15336         * Makefile.in: Various fixes for building cygwin32 native toolchains.
15337         * Make-lang.in: Likewise.
15338
15339 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15340
15341         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
15342
15343 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
15344
15345         * decl.c (make_implicit_typename): Rewrite removed code.
15346         (make_typename_type): Call it if the type we look up comes from
15347         a base that uses template parms.
15348
15349         * pt.c (complete_template_args): Rewrite.
15350         (tsubst, FUNCTION_DECL): Use it.
15351
15352 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
15353
15354         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
15355         c_expand_asm_operands () if output_operands, input_operands or
15356         clobbers is not NULL_TREE.
15357
15358 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15359
15360         * pt.c (complete_template_args): New function.
15361         (get_bindings): Deal with specializations of function templates
15362         with return type containing parameters from outer class
15363         templates.
15364         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
15365         substitute arguments and compose a new type.
15366
15367 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
15368
15369         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
15370         FUNCTION_DECLs.
15371
15372 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
15373
15374         * decl.c (make_implicit_typename): Lose useless code.
15375
15376         * call.c (standard_conversion): Handle A* -> const A* properly.
15377
15378         * pt.c (get_bindings_real): Rename from get_bindings.  Add
15379         check_rettype parm.
15380         (get_bindings): Pass 1.
15381         (get_bindings_overload): Pass 0.
15382
15383 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
15384
15385         * pt.c (check_explicit_specialization): When reverting a static
15386         member function, also remove the `this' parameter from
15387         last_function_parms.
15388
15389 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
15390
15391         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
15392         a function context.
15393
15394         * decl.c (store_bindings): Use free_binding_vecs.
15395         (pop_from_top_level): Likewise.
15396
15397 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
15398
15399         * decl.c (make_implicit_typename): Only change the type of a
15400         TYPENAME_TYPE.
15401
15402 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
15403
15404         * semantics.c: New file, containing routines to perform the
15405         semantic phase of parsing.
15406         * parse.y: Use it.
15407         * pt.c (tsubst_expr): Likewise.
15408         * cp-tree.h: Declare the various functions in semantics.c.
15409         Provide macros to access _STMT tree nodes.
15410         * cp-tree.def: Add ASM_STMT tree node.
15411         * Makefile.in, Make-lang.in: Add dependencies on and for
15412         semantics.c.
15413
15414 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
15415
15416         * pt.c (push_template_decl): Only check primary templates.
15417
15418         * pt.c (check_explicit_specialization): Complain about default args
15419         in explicit specialization.
15420
15421         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
15422         constructor_declarator.
15423
15424 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
15425
15426         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
15427         has no overloaded operator ->.
15428
15429         * call.c (build_field_call): Don't crash when presented with a
15430         field that is actually a nested type.
15431
15432         * decl.c (pushtag): Deal with friend class injection in local
15433         classes.
15434
15435         * call.c (build_object_call): Don't crash if OBJ is a
15436         pointer-to-member-function.
15437
15438 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
15439
15440         * pt.c (push_template_decl): Complain about template with C linkage,
15441         anonymous template class.
15442
15443 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
15444
15445         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
15446         * search.c: Likewise.
15447
15448         * lex.c (do_pending_defargs): Only call
15449         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
15450
15451         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
15452
15453 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
15454
15455         * parse.y: Deal with CONSTRUCTORS in new_initializers.
15456
15457 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
15458
15459         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
15460         closely mimics the behavior in parse.y.
15461         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
15462         into a compound statement.
15463
15464 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
15465
15466         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
15467         * pt.c (inline_needs_template_parms): New fn.
15468         (original_template): New fn.
15469         (push_inline_template_parms_recursive): New fn.
15470         (maybe_begin_member_template_processing): Use them.
15471         (maybe_end_member_template_processing): Likewise.
15472         (is_member_or_friend_template): Rename to is_member_template.
15473         Member functions of local classes are never member templates.
15474
15475 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15476
15477         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
15478         added in the class scope to catch redefinition error.
15479
15480         * pt.c (reduce_template_parm_level): Also copy
15481         the DECL_TEMPLATE_PARMS field.
15482
15483 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
15484
15485         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
15486         reduced-level template type parameter.
15487
15488 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
15489
15490         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
15491         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
15492         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
15493         * decl.c (duplicate_decls): Propagate it.
15494         * typeck2.c (abstract_virtuals_error): Use two loops to emit
15495         abstract virtual functions and virtual functions which need a
15496         final overrider separately.
15497
15498 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
15499
15500         * lang-specs.h: Properly put brackets around array elements in
15501         initializer.
15502
15503         * typeck.c (build_binary_op_nodefault): Correctly place parens around
15504         && and || in expression.
15505
15506 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
15507
15508         * call.c (default_parm_conversions): Remove prototype definition.
15509         (build_method_call): Remove unused variable result.
15510
15511         * cvt.c (ocp_convert): Remove unused variable conversion.
15512
15513         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
15514
15515         * except.c (do_unwind): #if 0 definition of unused variables fcall
15516         and next_pc.
15517
15518         * expr.c (extract_scalar_init): #if 0 prototype and function
15519         definition.
15520
15521         * init.c (expand_aggr_init_1): Remove unused variable init_type.
15522         (build_new_1): Remove unused variable t.
15523
15524         * pt.c (instantiate_class_template): Remove unused variable newtag;
15525         cast called function return value to void.
15526         (do_decl_instantiation): Remove unused variables name and fn.
15527
15528         * tree.c (get_type_decl): Add default return to shut up compiler from
15529         complaining control reaches end of non-void function.
15530
15531         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
15532
15533 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
15534
15535         * call.c (default_parm_conversions): Remove prototype definition.
15536         (build_method_call): Remove unused variable result.
15537         (build_over_call): Add default case in enumeration switch.
15538
15539 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
15540
15541         * decl2.c (lang_decode_option): Change j's type to size_t.
15542
15543         * tree.c (layout_vbasetypes): record_align and desired_align are of
15544         type unsigned int; const_size and nonvirtual_const_size likewise.
15545
15546 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
15547
15548         * parse.y (new_initializer): Make sure all initializers are
15549         lists.
15550
15551 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
15552
15553         * decl2.c (import_export_decl): Mark tinfo functions for
15554         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
15555
15556 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
15557
15558         * method.c: Fix typo.
15559
15560 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15561
15562         * method.c: Include "system.h" to get stdlib.h, stdio.h,
15563         ctype.h, string.h, etc.
15564         (issue_nrepeats): Add default case in enumeration switch.
15565         (check_btype): Likewise.
15566         (process_overload_item): Likewise.
15567
15568         * Makefile.in (method.o): Depend on system.h.
15569
15570 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
15571
15572         * lex.c (do_scoped_id): Fix parenthesizing.
15573
15574 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
15575
15576         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
15577         FLAG_RTTI is unset, initialize type info machinery and continue
15578         with FLAG_RTTI enabled.
15579         (get_typeid): Likewise.
15580
15581 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
15582
15583         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
15584         from B.
15585
15586 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
15587
15588         * pt.c (finish_member_template_decl): Deal more gracefully with
15589         invalid declarations.
15590
15591 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
15592
15593         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
15594         cp-tree.h: Clean up more old overloading code, old RTTI code, and
15595         some formatting quirks.
15596
15597         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
15598         method.c, pt.c, ptree.c, typeck.c: Remove support for
15599         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
15600         * class.h: Remove.
15601         * Makefile.in: Adjust.
15602
15603         * pt.c (unify): Don't allow reduced cv-quals when strict.
15604
15605         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
15606         *type_unification* and unify.
15607
15608 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
15609
15610         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
15611         (nested_name_specifier): And add it before this use.
15612         (typename_sub0): And this use.  Also add use without the keyword.
15613         (typename_sub1): Likewise.
15614         * pt.c (instantiate_class_template): Don't actually instantiate
15615         anything if our type uses template parms.
15616
15617 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
15618
15619         * decl.c (start_function): Don't call temporary_allocation for a
15620         nested function.
15621
15622 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
15623
15624         * pt.c (instantiate_class_template): Don't mess with friends if
15625         our type uses template parms.
15626
15627 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
15628
15629         * parse.y (nested_name_specifier): Use explicit_template_type.
15630         (typename_sub): Allow a template_type, an explicit_template_type,
15631         or an implicit template type at the end.
15632         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
15633         * decl.c (make_typename_type): Handle template-id where the name
15634         is a TEMPLATE_DECL.
15635         * call.c (build_scoped_method_call): Handle member template
15636         destructor call.
15637         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
15638         destructor is represented by the type.
15639
15640         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
15641         * parse.y (nested_name_specifier): Add 'template' case.
15642         (explicit_template_type): New rule.
15643         (typename_sub): Use it.
15644         * decl.c (make_typename_type): Handle getting a template-id for NAME.
15645         * pt.c (tsubst): Likewise.
15646
15647 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
15648
15649         * pt.c (add_to_template_args): Fix thinko.
15650         (instantiate_class_template): Call it later.
15651
15652         * pt.c (get_class_bindings): Add outer_args parm.
15653         (most_specialized_class): Likewise.
15654         (instantiate_class_template): Pass it.
15655         (more_specialized_class): Likewise.
15656         (lookup_template_class): Get context from template if none
15657         was specified.
15658         (finish_member_template_decl): Don't do anything with a
15659         partial specialization.
15660         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
15661         AGGREGATE_TYPE_P.
15662         * class.c (finish_struct): Member class templates have already been
15663         checked for name clashes.
15664         * decl.c (pushdecl_with_scope): Handle pushing at class level.
15665
15666 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
15667
15668         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
15669         (tsubst, *_PARM): Support multiple levels of template classes.
15670         (instantiate_class_template): Look up the pattern from the
15671         original template.
15672         (lookup_template_class): Handle getting a template for d1.
15673         (push_template_decl): Correct setting of 'primary'.
15674         (reduce_template_parm_level): Add 'levels' parm.
15675         (finish_member_template_decl): Support member class templates.
15676         (template_class_depth): Handle multiple levels.
15677         * parse.y (component_decl_1, fn.def2): Remove member template case.
15678         (component_decl): Add member template cases.
15679         * decl2.c (check_member_template): We now handle member template
15680         classes.
15681         * decl.c (pushtag): Handle member templates.
15682         * method.c (do_inline_function_hair): Don't touch
15683         IDENTIFIER_GLOBAL_VALUE.
15684         * init.c (build_offset_ref): If name isn't an identifier, just
15685         return it.
15686         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
15687
15688         * typeck.c (get_delta_difference): Do adjust for conversions to
15689         and from virtual base.
15690
15691 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
15692
15693         * typeck.c (get_delta_difference): Give hard error for conversion
15694         from virtual base.
15695
15696         * cp-tree.h: Tweak formatting.
15697
15698 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
15699
15700         * decl.c (push_namespace): Handle redeclaration error.
15701
15702         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
15703         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
15704         (NAMESPACE_BINDING): New macro.
15705         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
15706         * *.c: Use them.
15707
15708         * pt.c (push_template_decl): Use innermost_args.
15709
15710         * decl.c (get_unique_name): Tweak from earlier in the name.
15711
15712 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15713
15714         * cp-tree.def: Add CPLUS_BINDING node.
15715         * cp-tree.h (tree_binding): New struct.
15716         (BINDING_SCOPE, BINDING_VALUE): New macros.
15717         (current_namespace, global_namespace): Declare extern.
15718         (struct lang_decl_flags): New field in_namespace.
15719         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
15720         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
15721         (TREE_INDIRECT_USING): New macro.
15722         * decl2.c (current_namespace, global_namespace): Declare.  The
15723         value is a NAMESPACE_DECL now, not a TREE_LIST.
15724         (is_namespace_ancestor, namespace_ancestor): New static functions.
15725         (add_using_namespace, ambiguous_decl): Likewise.
15726         (lookup_using_namespace): New support function for lookup_name.
15727         (qualified_lookup_using_namespace): New support function for
15728         do_scoped_id and lookup_namespace_name.
15729         (get_namespace_id): Mark as obsolete.
15730         (current_namespace_id): Likewise.
15731         (do_namespace_alias): Implement.
15732         (do_using_directive): Implement as call to add_using_namespace.
15733         * decl.c (binding_for_name): New function.
15734         (push_namespace, pop_namespace): Implement.
15735         (push_decl): Don't install a FUNCTION_DECL in the global branch.
15736         (lookup_namespace_name): Implement using qualified lookup.
15737         (lookup_name_real): For global scoping, lookup in
15738         global_namespace.  For namespace scoping, lookup in given
15739         namespace.  For unscoped lookup, iterate over namespace,
15740         considering using directives.
15741         (init_decl_processing): Initialize global_namespace.
15742         (grokvardecl): Build assembler name as static name for globals.
15743         (grokdeclarator): Remove old namespace mangling.
15744         (xref_tag): When installing a global binding for the
15745         tag, make sure we have an identifier.
15746         * method.c (build_overload_nested_name): Mangle namespaces.
15747         (build_qualified_name): Likewise.
15748         (build_decl_overload_real): Likewise.
15749         * lex.c (build_lang_decl): Set namespace for new declaration to
15750         current_namespace.
15751         (do_scoped_id): Find global names in global or current
15752         namespace, or using qualified namespace lookup, depending on
15753         context.
15754         * init.c (build_member_call): When scope is namespace, use
15755         build_x_function_call instead.
15756         (build_offset_ref): When scope is namespace, collapse processing
15757         to lookup_namespace_name instead.
15758         * error.c (dump_decl): Support NAMESPACE_DECL.
15759         * decl.c (pushdecl): Bind globals to current namespace.
15760         (push_overloaded_decl): Likewise.
15761         (lookup_tag): Likewise.
15762         (lookup_name_current_level): Likewise.
15763         (xref_tag): Likewise.
15764         (start_function): Likewise.
15765         * lex.c (do_identifier): Likewise.
15766         (identifier_typedecl_value): Likewise.
15767         (real_yylex): Likewise.
15768         * method.c (do_inline_function_hair): Likewise.
15769         * parse.y (unscoped): Likewise.
15770         * pt.c (check_explicit_specialization): Likewise.
15771         (lookup_template_class): Likewise.
15772         * rtti.c (call_void_fn): Likewise.
15773         * sig.c (build_sigtable): Likewise.
15774         * ptree.c (lang_print_xnode): New function.
15775
15776 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
15777
15778         * pt.c (instantiate_class_template): Don't instantiate if pedantic
15779         and the args use template parms.
15780
15781         * pt.c (push_tinst_level): If the instantiation uses template parms,
15782         fail silently.
15783         * decl.c (xref_basetypes): Do call complete_type for basetypes
15784         that involve template parameters.
15785
15786 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
15787
15788         * typeck2.c (process_init_constructor): Fix labeled init check.
15789
15790 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
15791
15792         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
15793         argument to tsubst and friends.
15794
15795         * pt.c (tsubst, FUNCTION_DECL): Tidy.
15796
15797         * typeck.c (build_x_function_call): Handle static member function
15798         templates like non-templates.  Handle friend templates like normal
15799         function templates.
15800         * pt.c (tsubst, *_PARM): Don't use orig_level.
15801         (get_bindings): Don't call add_to_template_args.
15802         (instantiate_template): Likewise.
15803         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
15804         * ptree.c (print_lang_type): Print index/level for template parms.
15805
15806 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
15807
15808         * Make-lang.in (cc1plus): Note that cc1plus depends on
15809         cp/cp-tree.h and cp/cp-tree.def.
15810
15811         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
15812         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
15813         position in a template parameter list.
15814         * cp-tree.h (template_parm_index): New structure, used as the tree
15815         structure for a TEMPLATE_PARM_INDEX.
15816         (TEMPLATE_PARM_IDX): New macro.
15817         (TEMPLATE_PARM_LEVEL): Likewise.
15818         (TEMPLATE_PARM_DESCENDANTS): Likewise.
15819         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
15820         (TEMPLATE_PARM_DECL): Likewise.
15821         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
15822         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
15823         (TEMPLATE_TYPE_DECL): Likewise.
15824         (TEMPLATE_CONST_IDX): Remove.
15825         (TEMPLATE_CONST_LEVEL): Likewise.
15826         (TEMPLATE_CONST_SET_INFO): Likewise.
15827         (TEMPLATE_TYPE_SET_INFO): Likewise.
15828         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
15829         node.
15830         (TEMPLATE_TYPE_LEVEL): Likewise.
15831         * decl.c (decls_match): Call comp_template_parms, rather than
15832         expanding it inline.
15833         (duplicate_decls): If two template declarations are being merged,
15834         then their TEMPLATE_INFOs should be merged as well.
15835         (grokfndecl): Save template-id information when declaring a friend
15836         with explicit template arguments.  Pass arguments to
15837         check_explicit_specialization via correct convention; at some
15838         point check_explicit_specialization changed, but these call-sites
15839         did not.
15840         (grokdeclarator): Tidy up slightly.
15841         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
15842         two template functions with the same DECL_ASSEMBLER_NAME the same,
15843         since the names are not yet mangled.
15844         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
15845         TEMPLATE_CONST_PARM.
15846         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
15847         decl for a non-type parameter, rather than printing `<tparm ...>'.
15848         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
15849         (do_friend): Deal with template friends.
15850         * lex.c (do_pending_inlines): Call
15851         maybe_begin_member_template_processing, rather than
15852         conditionally calling begin_member_template_processing.
15853         (process_next_inline): Likewise.  Call
15854         maybe_end_member_template_processing, rather than
15855         conditionally calling end_member_template_processing.
15856         (do_pending_defargs): Likewise.
15857         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
15858         TEMPLATE_CONST_PARM.
15859         * method.c (build_mangled_template_parm_index): New function.
15860         (build_overload_value): Use it.
15861         (build_overload_name): Likewise.
15862         * pt.c (finish_member_template_decl): Allow friend declarations.
15863         (template_class_depth): New function.
15864         (is_member_template): Rename, and modify, to become...
15865         (is_member_or_friend_template): New function.
15866         (end_member_template_processing): Rename, and modify, to become...
15867         (maybe_end_member_template_processing).
15868         (build_template_parm_index): New function.
15869         (reduce_template_parm_level): New function.
15870         (process_template_parm): Modify to use build_template_parm_index.
15871         (push_template_decl): Deal with friend templates.
15872         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
15873         TEMPLATE_CONST_PARM.
15874         (tsubst_friend_function): New function.
15875         (instantiate_class_template): Generate the DECL_FRIENDLIST
15876         for a new instantiation by using tsubst_friend_function rather
15877         than just tsubst.
15878         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
15879         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
15880         appropriate new macros.  Use reduce_template_parm_level to
15881         generate lower-level template parameters.  Handle tsubst'ing into
15882         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
15883         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
15884         templates.  Similarly for the template parameters for a new
15885         template.
15886         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
15887         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
15888         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
15889         (get_bindings): Call add_to_template_args if necessary.
15890         (instantiate_decl): Handle instantiations of friend templates.
15891         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
15892         TEMPLATE_TYPE_PARM as a list of fields; it's not!
15893         * spew.c (yylex): Do a little manual constant propagation to
15894         clarify the code.
15895
15896 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
15897
15898         * error.c: Include sys/types.h.
15899
15900 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
15901
15902         * method.c (build_mangled_name): Start CPP directives in column zero.
15903
15904 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
15905
15906         * typeck2.c (process_init_constructor): Sorry about non-trivial
15907         labeled initializers.
15908         * parse.y (initlist): Re-enable labeled initializers.
15909
15910 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15911
15912         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
15913         all callers changed.  Rely on the new parameter instead of arg
15914         being a TREE_LIST when determine whether we are working inside
15915         template template parameter.  Clean up is_type test.
15916
15917 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
15918
15919         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
15920         * typeck2.c (initializer_constant_valid_p): Allow conversions
15921         between pointers and references.
15922
15923 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
15924
15925         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
15926         if pedantic || warn_pointer_arith.
15927
15928 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15929
15930         * pt.c (unify): Handle TEMPLATE_DECL.
15931
15932 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
15933
15934         * cp-tree.h (strip_attrs): Remove decl.
15935
15936 1998-02-18  Doug Evans  <devans@cygnus.com>
15937
15938         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
15939         Update olddecl's attributes too.
15940         (strip_attrs): Remove function.
15941         * typeck.c (common_type): Call merge_machine_type_attributes.
15942
15943 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
15944
15945         * parse.y (initdcl0_innards): New grammar symbol.
15946         (nomods_initdecls, nomods_initdcl0): Change type from itype to
15947         none, since the resulting value is never used.
15948         (parse_decl): New function.
15949         (datadef): Remove redundant actions.
15950         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
15951         * parse.c: Regenerated.
15952
15953 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
15954
15955         * parse.y (simple_stmt): Use getdecls() to check for decl.
15956
15957 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
15958
15959         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
15960         macros.
15961         (c++.install-common): Install c++filt properly as native or as cross
15962         variant.
15963         (c++.uninstall): Add c++filt.
15964
15965 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
15966
15967         * call.c (standard_conversion): Fix multi-level ptr conversions.
15968
15969 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
15970
15971         * init.c (build_new): Propagate error_mark_node up.
15972
15973 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
15974
15975         * parse.y (simple_stmt): If the condition isn't a declaration,
15976         start the controlled block after the test.
15977
15978 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
15979
15980         * call.c (build_over_call): Convert builtin abs, labs and fabs to
15981         tree-codes.
15982         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
15983         builtins.
15984
15985 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
15986
15987         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
15988
15989 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
15990
15991         * cp-tree.h: Add access_protected_virtual_node.
15992         * class.c (init_class_processing): Initialize it.
15993         * decl.c (xref_basetypes): Use it.
15994         * parse.y (base_class_access_list): Likewise.
15995
15996         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
15997         (c++.install-common): Install c++filt.
15998
15999 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16000
16001         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
16002
16003 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
16004
16005         * call.c (reference_binding): Use comptypes when comparing
16006         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
16007
16008 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
16009
16010         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
16011         (really_overloaded_fn): Move check here from is_overloaded_fn.
16012         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
16013
16014 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
16015
16016         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
16017         conversions.
16018
16019 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
16020
16021         * cp-tree.h (push_template_decl): Return the decl passed in, or an
16022         equivalent duplicate.
16023         * decl.c (pushtag): Use the return value from push_template_decl.
16024         (duplicate_decls): When duplicating a template declaration, merge
16025         the DECL_TEMPLATE_RESULTs as well.
16026         (make_implicit_typename): Don't try to dive into typename types to
16027         find a context for making a new implicit typename.
16028         (start_decl): Use the return value from push_template_decl.
16029         (grokdeclarator): Complain about declarations list `const operator
16030         int'.  Since we don't correctly handle in-class initializations of
16031         non-static data members, complain about this (now illegal)
16032         practice.  Issue an error for initializations of non-const statics
16033         since that is illegal as well, and since we don't handle that case
16034         correctly either.
16035         (start_function): Use the return value from push_template_decl.
16036         (start_method): Likewise.
16037         * decl2.c (grokfield): Likewise.  Since the change to
16038         grokdeclarator ensures that all initialized fields are in fact
16039         static, remove a redundant test for TREE_PUBLIC.
16040         * parse.y (initlist): Disable labeled initializers since they do
16041         not work as per the documentation, and since they do not use the
16042         same syntax as the C front end.
16043         * pt.c (push_template_decl): Return the decl passed in, or an
16044         equivalent duplicate.
16045         (lookup_template_class): When searching in a nested context,
16046         use the right arguments.
16047         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
16048         * typeck.c (build_component_ref): Assign the correct type to the
16049         result of build_vfn_ref.
16050
16051 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
16052
16053         * pt.c (convert_nontype_argument): Fix typo.
16054         (check_explicit_specialization): Allow old-style specialization
16055         of class template members.
16056
16057 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
16058                           Manfred Hollstein  <manfred@s-direktnet.de>
16059
16060         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
16061         when deciding to override DECL_ASSEMBLER_NAME.
16062
16063 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
16064
16065         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
16066         * cp-tree.h (flag_do_squangling): Add declaration.
16067         * lang-options.h: Add -fsquangle and -fno-squangle.
16068         * method.c: Add macros and static variables for squangling.
16069         (build_overload_name): Rename to build_mangled_name, add logic for B
16070         compression, and split into process_modifiers and
16071         process_overload_item.
16072         (process_modifiers): New function, to handle constant, reference,
16073         and pointer types.
16074         (process_overload_item): New function, handles issue of type codes.
16075         (build_overload_name): New function, start squangling and call
16076         build_mangled_name.
16077         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
16078         (start_squangling): New function to initialize squangling structs.
16079         (end_squangling): New function to destroy squangling structs.
16080         (nrepeats): Rename variable to Nrepeats.
16081         (issue_nrepeats): New function for issuing 'n' type repeats.
16082         (check_ktype): New function to check for type K name compression.
16083         (build_overload_nested_name): Add a check for K name compression.
16084         (build_qualified_name): Add a check for K name compression and don't
16085         use DECL_ASSEMBLER_NAME when squangling is on.
16086         (check_btype): New function, checks for B type compression.
16087         (build_static_name, build_decl_overload_real): Initiate squangling.
16088         (build_typename_overload, build_overload_with_type): Initiate
16089         squangling
16090
16091 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
16092
16093         * method.c (make_thunk): Avoid name buffer overflow.
16094
16095 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
16096
16097         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
16098         don't define them yet.
16099
16100         * parse.y (nomods_initdcl0): Add constructor_declarator case.
16101
16102 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16103
16104         * config-lang.in (diff_excludes): Use basename only.
16105
16106 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
16107
16108         * tinfo2.cc: Add tinfo for signed char.
16109
16110 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
16111
16112         * search.c (compute_access): Handle protected constructors in derived
16113         classes as accessible.
16114
16115 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
16116
16117         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
16118         Call convert_from_reference sooner.
16119
16120 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
16121
16122         * cvt.c (ocp_convert): Obtain the constant values from constant
16123         decls even if the destination type is the same as the type of the
16124         decl.
16125
16126         * decl2.c (finish_file): Make sure that static inlines with
16127         definitions are not marked DECL_EXTERNAL before returning.
16128
16129 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
16130
16131         * decl.c: Lose arg_looking_for_template.
16132         (lookup_name_real): Likewise.
16133         * parse.y: Lose processing_template_arg, template_arg1.
16134         (primary): Likewise.
16135         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
16136
16137 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
16138
16139         * error.c (dump_decl): Fix type of default arguments for template
16140         template parameters and nontype template parameters.
16141         * parse.y (template_parm): Handle invalid default template
16142         template arguments here.
16143
16144         * parse.y (template_parm): Use template_arg instead of PTYPENAME
16145         for default template template argument.
16146         * pt.c (coerce_template_parms): Merge default template argument
16147         codes.  Can treat RECORD_TYPE as template name if it is implicitly
16148         created.  Fix argument index in error message.
16149         * typeck.c (comptypes): Merge template argument comparison codes in
16150         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
16151
16152 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
16153
16154         * lex.c (file_name_nondirectory): Also check for '/'.
16155
16156 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
16157
16158         * parse.y (primary): Deal with statement-expressions in
16159         templates.
16160         * pt.c (tsubst_copy): Handle BIND_EXPR.
16161         * tree.c (mapcar): Likewise.
16162
16163         * call.c (add_template_candidate_real): Pass extra parameter to
16164         fn_type_unification.
16165         * cp-tree.h (fn_type_unification): Add parameter.
16166         * pt.c (fn_type_unification): Add additional parameter to deal with
16167         static member functions.
16168         (get_bindings): Deal with static member functions.
16169
16170         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
16171         (revert_static_member_fn): Declare.
16172         * decl.c (revert_static_member_fn): Remove declaration.  Change
16173         linkage from internal to external.
16174         (cp_finish_decl): Deal with virtual functions in classes local to
16175         template functions.
16176         * decl2.c (finish_file): Don't forget to emit increment/decrement
16177         expressions in initializers for file-scope variables.
16178         * parse.y (typename_sub2): If the typename doesn't names a
16179         template, rather than a type, issue an error message.
16180         * pt.c (check_explicit_specialization): Handle specializations of
16181         static member functions.
16182         (coerce_template_parms): Handle offset references to lists of
16183         member functions.
16184         * search.c (note_debug_info_needed): Don't crash when handed a
16185         type which is being defined.
16186         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
16187         that can happen with some illegal code.
16188
16189 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16190
16191         * call.c (user_harshness): Initialize `code' to 0.
16192         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
16193         (null_ptr_cst_p): Add parentheses around && within ||.
16194         (standard_conversion): Likewise.
16195         (z_candidate): Likewise.
16196         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
16197         (build_object_call): Likewise for `mem_args'.
16198         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
16199         default case in enumeration switch.
16200
16201         * class.c (build_vtable_entry): Add explicit braces to avoid
16202         ambiguous `else'.
16203         (build_class_init_list): Likewise.
16204         (finish_struct_1): Initialize `width' to 0.
16205         (instantiate_type): Initialize `name' to NULL_TREE.  Add
16206         explicit braces to avoid ambiguous `else'.
16207
16208         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
16209         `else'.
16210
16211         * decl.c (grok_reference_init): Eliminate unused parameter, all
16212         callers changed.
16213         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
16214         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
16215         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
16216         (grokdeclarator): Add parentheses around && within ||.  Add
16217         explicit braces to avoid ambiguous `else'.
16218         (grokparms): Initialize `type' to NULL_TREE.
16219         (xref_tag): Remove unused label `just_return'.
16220         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
16221         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
16222         (hack_incomplete_structures): Add parentheses around assignment
16223         used as truth value.
16224
16225         * decl2.c (coerce_delete_type): Hide definition of `e3'.
16226
16227         * error.c: Include <stdlib.h>.
16228         (dump_expr): Change the type of `i' to size_t.  Remove unused
16229         label `error'.
16230
16231         * except.c (init_exception_processing): Remove unused variable `d'.
16232         (expand_throw): Likewise for `label'.
16233
16234         * friend.c (add_friends): Add explicit braces to avoid ambiguous
16235         `else'.
16236
16237         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
16238         (sort_base_init): Likewise for `binfo'.
16239         (expand_member_init): Likewise for `rval'.
16240         (build_member_call): Add parentheses around assignment used as
16241         truth value.
16242         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
16243         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
16244         `old_immediate_size_expand' to 0.
16245         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
16246         (build_vec_delete_1): Remove unused variable `block'.
16247         (expand_vec_init): Initialize `itype' to NULL_TREE.
16248
16249         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
16250         declaration of `index' and `rindex' with autoconf macros.
16251         (reinit_parse_for_expr): Remove unused variables
16252         `look_for_semicolon' and `look_for_lbrac'.
16253         (cons_up_default_function): Initialize `args' to NULL_TREE.
16254         (readescape): Initialize `firstdig' to 0.
16255         (real_yylex): Add parentheses around assignment used as truth value.
16256
16257         * method.c: Include <strings.h> if we don't have <string.h>.
16258         Protect declaration of `index' with autoconf macro.
16259
16260         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
16261         Initialize `type' to NULL_TREE.
16262         (structsp): Remove unused variable `id'.
16263
16264         * pt.c (coerce_template_parms): Add explicit braces to avoid
16265         ambiguous `else'.
16266         (lookup_template_class): Initialize `template' to NULL_TREE.
16267         (instantiate_class_template): Remove unused variable `name' and `e'.
16268         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
16269         (do_poplevel): Initialize `saved_warn_unused' to 0.
16270         (type_unification): Remove unused varable `parm'.
16271         (unify): Likewise for `j'.
16272
16273         * repo.c (init_repo): Add parentheses around assignment used as
16274         truth value.
16275         (finish_repo): Remove unused varable `p'.
16276
16277         * search.c (get_binfo): Initialize `type' to NULL_TREE.
16278         (get_base_distance): Likewise.
16279         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
16280         and `new_v' to NULL_TREE.
16281         (lookup_fnfields): Likewise for `rval_binfo_h'.
16282         (breadth_first_search): Add parentheses around assignment used as
16283         truth value.
16284         (get_template_base): Initialize `type' to NULL_TREE.
16285
16286         * sig.c (append_signature_fields): Initialize `last_mfptr' to
16287         NULL_TREE.
16288         (build_signature_table_constructor): Likewise for
16289         `last_rhs_field', `pfn' and `vt_off'.
16290         (build_sigtable): Likewise for `init'.
16291
16292         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
16293         (propagate_binfo_offsets): Likewise for `delta'.
16294         (hash_tree_cons): Initialize hashcode to 0.
16295         (can_free): Likewise for `size'.
16296         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
16297
16298         * typeck.c (convert_sequence): Hide prototype.
16299         (common_type): Add explicit braces to avoid ambiguous `else'.
16300         (comp_target_types): Likewise.
16301         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
16302         (build_function_call_real): Add explicit braces to avoid ambiguous
16303         `else'.
16304         (convert_arguments): Initialize `called_thing' to 0.
16305         (convert_for_initialization): Initialize `savew' and `savee' to 0.
16306
16307         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
16308         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
16309         (build_x_arrow): Likewise for `last_rval'.
16310
16311         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
16312
16313 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
16314
16315         * decl.c (init_decl_processing): Use set_sizetype.
16316         * decl2.c (sizetype): Don't declare.
16317         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
16318         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
16319         (build_component_addr, unary_complex_lvalue): Likewise.
16320         * rtti.c (expand_class_desc): Likewise.
16321         * class.c (get_vfield_offset): Likewise.
16322
16323 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
16324
16325         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
16326         early to avoid bogus error.  Handle overloaded function
16327         names provided as template arguments correctly.
16328         (coerce_template_parms): Don't mishandle overloaded functions when
16329         dealing with template template parameters.
16330         (lookup_template_class): Issue an error message, rather than
16331         crashing, when the TYPE_DECL provided is not a template type.
16332
16333 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
16334
16335         * class.c (instantiate_type): Don't just return a known type if
16336         it's wrong.
16337
16338 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
16339
16340         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
16341         since that code could never be reached.
16342
16343         * error.c (dump_decl): Avoid aborting in the midst of printing an
16344         error message about an illegal template declaration.
16345
16346         * parse.y (structsp): Print an error message, rather than crashing,
16347         when a class-head does not name a class.
16348
16349         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
16350         template arguments as a g++ extension.
16351
16352         * cp-tree.def (ALIGNOF_EXPR): New tree code.
16353         * decl2.c (grok_alignof): If processing_template_decl, just store
16354         the expression.
16355         * typeck.c (c_alignof): Likewise.
16356         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
16357         * error.c (dump_expr): Likewise.
16358         * pt.c (tsubst_copy): Likewise.
16359         * tree.c (cp_tree_equal): Likewise.
16360         * pt.c (uses_template_parms): Correctly determine whether or not a
16361         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
16362         folding can be done.
16363
16364         * cp-tree.h (grok_enum_decls): Remove type parameter.
16365         * decl.c (grok_enum_decls): Likewise.
16366         * decl2.c (grok_x_components): Call grok_enum_decls
16367         unconditionally, since it will do nothing if there is no
16368         current_local_enum.  Use the new calling sequence.
16369         * pt.c (tsubst_enum): Use the new calling sequence for
16370         grok_enum_decls.
16371
16372         * decl.c (start_function): Make member functions of local classes
16373         in extern inline functions have comdat linkage here...
16374         (grokdeclarator): Rather than here.
16375
16376 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
16377
16378         * pt.c (convert_nontype_argument): Use decl_constant_value.
16379
16380 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
16381
16382         * call.c (add_template_candidate_real): New function.
16383         (add_template_candidate): Use it.
16384         (add_template_conv_candidate): Likewise.
16385         (joust): Pass extra argument to more_specialized.
16386         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
16387         (is_local_class): Remove.
16388         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
16389         * cp-tree.h (is_local_class): Remove.
16390         (perform_array_to_pointer_conversion): Likewise.
16391         (finish_member_template_decl): Add.
16392         (check_explicit_specialization): Return a tree, not an int.
16393         (more_specialized): Take additional argument.
16394         (get_bindings): Likewise.
16395         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
16396         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
16397         (perform_array_to_pointer_conversion): Remove.
16398         * decl.c (saved_scope): Add processing_specialization,
16399         processing_explicit_instantiation fields.
16400         (maybe_push_to_top_level): Save them.
16401         (pop_from_top_level): Restore them.
16402         (grokfndecl): Use new return value from
16403         check_explicit_specialization.
16404         (start_decl): Don't check flag_guiding_decls before pushing
16405         decls.
16406         (cp_finish_decl): Remove previous (bogus) change.
16407         (grok_declarator): Use decl_function_context rather than
16408         is_local_class.
16409         * decl2.c (finish_file): Pass extra argument to get_bindings.
16410         (build_expr_from_tree): Let build_x_component_ref check
16411         validity of arguments rather than doing it here.
16412         * lex.c (cons_up_default_function): Remove code fooling with
16413         processing_specialization, processing_explicit_instantiation
16414         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
16415         * method.c (build_overload_identifier): Mangle local classes in
16416         template functions correctly.
16417         * parse.y (finish_member_template_decl): Move to pt.c.
16418         * pt.c (finish_member_template_decl): Moved here from parse.y.
16419         (print_candidates): New function.
16420         (determine_specialization): Change interface.  Properly look for
16421         most specialized versions of template candidates.
16422         (check_explicit_specialization): Fully process explicit
16423         instantiations.
16424         (push_template_decl): Avoid looking at CLASSTYPE fields in
16425         FUNCTION_DECLS.
16426         (determine_overloaded_function): Remove.
16427         (convert_nontype_argument): Change name from
16428         convert_nontype_parameter.  Use determine_overloaded_function
16429         instead of instantiate_type.
16430         (mangle_class_name_for_template): Handle type contexts as well as
16431         function contexts.
16432         (classtype_mangled_name): Likewise.
16433         (lookup_template_class): Likewise.
16434         (tsubst): Likewise.
16435         (more_specialized): Take explict template arguments as a
16436         parameter.
16437         (most_specialized): Likewise.
16438         (get_bindings): Likewise.  Check that return types match before
16439         proclaiming a function a match.
16440         (do_decl_instantiation): Remove code searching for function to
16441         instantiate; that is now done in check_explicit_specialization.
16442         (add_maybe_template): Pass extra argument to get_bindings.
16443         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
16444         implementation.
16445         * typeck.c (build_component_ref): Check for invalid arguments.
16446
16447 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
16448
16449         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
16450         return_target and call_target are equivalent.
16451
16452         * pt.c (type_unification_real): Just accept function parms that
16453         don't use any template parms.
16454
16455 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
16456
16457         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
16458         unset DECL_NOT_REALLY_EXTERN.
16459
16460         * parse.y (typename_sub*): Fix std::.
16461
16462 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
16463
16464         * error.c (dump_decl): Fix type default template args.
16465         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
16466
16467 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
16468
16469         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
16470         (file_name_nondirectory): Use.
16471
16472 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
16473
16474         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
16475         that are not really present.  Substitute default arguments in
16476         template template arguments.  Correctly convert TEMPLATE_DECL to
16477         TEMPLATE_TEMPLATE_PARM.
16478         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
16479         are no longer treated specially here.
16480         * parse.y (template_template_parm): Fix copy error.
16481         * decl.c (grokdeclarator): Warn about missing `typename' for nested
16482         type created from template template parameters.
16483         * parse.y (bad_parm): Likewise
16484
16485         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
16486         (push_nested_class): Likewise.
16487         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
16488         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
16489         (copy_template_template_parm): Declare.
16490         * decl.c (arg_looking_for_template): New variable.
16491         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
16492         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
16493         node if arg_looking_for_template is nonzero.
16494         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
16495         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
16496         (grokdeclarator): Handle TEMPLATE_DECL.
16497         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
16498         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
16499         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
16500         (dump_decl): Handle unnamed template type parameters.
16501         Handle template template parameters.
16502         (dump_function_name): Handle template template parameters.
16503         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
16504         Handle TEMPLATE_TEMPLATE_PARM.
16505         * method.c (build_template_template_parm_names): New function.
16506         (build_template_parm_names): Handle TEMPLATE_DECL.
16507         (build_overload_nested_name, build_overload_name):
16508         Handle TEMPLATE_TEMPLATE_PARM.
16509         * parse.y (maybe_identifier): New nonterminal.
16510         (template_type_parm): Use it.
16511         (template_template_parm, template_arg1): New nonterminal.
16512         (template_parm): Add template_template_parm rules.
16513         (template_arg): Set processing_template_arg.
16514         (template_arg1): Rules moved from template_arg.
16515         (primary, nonnested_type): Set arg_looking_for_template if we are
16516         processing template arguments.
16517         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
16518         (process_template_parm): Handle template template parameters.
16519         (coerce_template_parms, comp_template_args): Likewise.
16520         (mangle_class_name_for_template, lookup_template_class): Likewise.
16521         (uses_template_parms): Handle TEMPLATE_DECL and
16522         TEMPLATE_TEMPLATE_PARM.
16523         (current_template_args): Handle TEMPLATE_DECL.
16524         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
16525         * search.c (dfs_walk, dfs_record_inheritance):
16526         Handle TEMPLATE_TEMPLATE_PARM.
16527         * tree.c (copy_template_template_parm): New function.
16528         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
16529         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
16530
16531 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
16532
16533         * decl.c (start_decl): Don't allow duplicate definitions of static
16534         data members.
16535
16536         * call.c (build_user_type_conversion_1): Handle user-defined
16537         template conversion operators correctly.
16538
16539         * decl2.c (build_expr_from_tree): Issue an error message if the
16540         object in a COMPONENT_REF is a TEMPLATE_DECL.
16541
16542         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
16543
16544         * class.c (is_local_class): New function.
16545         * cp-tree.h (is_local_class): Declare it.
16546         (last_tree): Likewise.
16547         (begin_tree): Likewise.
16548         (end_tree): Likewise.
16549         (lookup_template_class): Change prototype.
16550         * decl.c (cp_finish_decl): Check for NULL where necessary.
16551         Consider FUNCTION_DECLS to declare objects with top-level binding,
16552         when calling make_decl_rtl.
16553         (grokdeclarator): Give members of local classes internal linkage.
16554         (start_function): Remove declaration of last_tree.
16555         (finish_function): Set flag_keep_inline_functions around call to
16556         rest_of_compilation if we are processing a member function in a
16557         local class.
16558         (start_method): Call push_template_decl for member functions of
16559         local classes in template functions.
16560         * decl2.c (import_export_decl): Don't give external linkage to
16561         instantiations of templates with internal linkage.
16562         * parse.y (last_tree): Remove declaration.
16563         (template_type): Pass extra parameter to lookup_template_class.
16564         (self_template_type): Likewise.
16565         (structsp): Move call to reset_specialization into left_curly.
16566         (left_curly): Call reset_specialization, and begin_tree.
16567         * pt.c (saved_trees): New variable.
16568         (mangle_class_name_for_template): Change prototype.  Use
16569         additional function context to name local classes in templates
16570         correctly.
16571         (classtype_mangled_name): Pass the context.
16572         (push_template_decl): Handle local classes and templates, and
16573         member functions for such classes.
16574         (convert_nontype_parameter): Fix handling of pointer-to-member
16575         constants.
16576         (lookup_template_class): Handle local classes in templates.
16577         (tsubst): Likewise.  Don't assume that template instantiations
16578         have external linkage; pay attention to the template declaration.
16579         (mark_decl_instantiated): Likewise.
16580         (begin_tree): New function.
16581         (end_tree): Likewise.
16582
16583         * decl.c (xref_basetypes): Don't call complete_type for basetypes
16584         that involve template parameters; that can lead to infinite
16585         recursion unnecessarily.
16586
16587         * pt.c (register_specialization): Do not register specializations
16588         that aren't ready to be registered yet.
16589         (check_explicit_specialization): Handle explicit specialization of
16590         constructors and destructors.
16591         (build_template_decl): New function.
16592         (push_template_delc): Handle out-of-class specializations of
16593         member templates.
16594
16595         * pt.c (check_explicit_specialization): Set up the template
16596         information before registering the specialization.
16597         (coerce_template_parms): Fix thinko.
16598         (tsubst): Handle specializations of member templates correctly.
16599
16600         * class.c (finish_struct_methods): Remove calls to
16601         check_explicit_specialization from here.
16602         (finish_struct): And insert them here.
16603         * cp-tree.h (perform_qualification_conversions): New function.
16604         (perform_array_to_pointer_conversion): Likewise.
16605         (begin_explicit_instantiation): Likewise.
16606         (end_explicit_instantiation): Likewise.
16607         (determine_specialization): Renamed from
16608         determine_explicit_specialization.
16609         (comp_template_parms): New function.
16610         (processing_explicit_instantiation): New variable.
16611         * cvt.c (perform_qualification_conversions): New function.
16612         (perform_array_to_pointer_conversion): Likewise.
16613         * decl.c (duplicate_decls): Don't consider template functions
16614         alike unless they have the same parameters.  Refine handling of
16615         instantiation/specialization mismatches.
16616         (start_decl): Don't call pushdecl for template specializations,
16617         since they don't affect overloading.
16618         (start_function): Likewise.
16619         (grokfndecl): Call check_explicit_specialization a little later.
16620         Don't call duplicate_decls for memberm template specializations.
16621         (grokdeclarator): Don't update template_count for classes that are
16622         themselves specializations.  Remove use of `2' as parameter to
16623         grokfndecl since that value isn't used.
16624         * lex.c (cons_up_default_function): Save and restore
16625         processing_explicit_instantiation around calls to grokfield.
16626         * parse.y (finish_member_template_decl): New function.
16627         (component_decl_1): Use it.
16628         (fn.def2): Likewise.
16629         (template_arg_list_opt): New nonterminal.
16630         (template_type): Use it.
16631         (self_template_type): Likewise.
16632         (template_id): Likewise.
16633         (object_template_id): Likewise.
16634         (notype_template_declarator): Likwise.
16635         (begin_explicit_instantiation): Likewise.
16636         (end_explicit_instantiation): Likewise.
16637         (explicit_instantiation): Use them.
16638         * pt.c (coerce_template_parms): Add parameters.
16639         (processing_explicit_instantiation): New variable.
16640         (convert_nontype_parameter): New function.
16641         (determine_overloaded_function): Likewise.
16642         (begin_explicit_instantiation): Likewise.
16643         (end_explicit_instantiation): Likewise.
16644         (retrieve_specialization): Likewise.
16645         (register_specialization): Likewise.
16646         (processing_explicit_specialization): Removed.
16647         (determine_specialization): Handle specializations of member
16648         functions of template class instantiations.
16649         (check_explicit_specialization): Refine to conform to standard.
16650         (comp_template_parms): New function.
16651         (coerce_template_parms): Call convert_nontype_parameter.
16652         (tsubst): Refine handling of member templates.  Use
16653         register_specialization.
16654         (instantiate_template): Use retrieve_specialization.
16655         (do_decl_instantiation): Likewise.
16656         (instantiate_decl): Likewise.
16657         (type_unification): Improve handling of explict template
16658         arguments.
16659         * tree.c (mapcar): Return error_mark_node, rather than aborting,
16660         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
16661         * typeck.c (build_unary_op): Call determine_specialization, rather
16662         than determine_explicit_specialization.
16663
16664 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
16665
16666         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
16667
16668 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
16669
16670         * error.c (dump_decl): For enum tags, output the tag, not its value.
16671
16672 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
16673
16674         * decl.c (init_decl_processing): Only call init_rtti_processing
16675         FLAG_RTTI is set.
16676
16677 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
16678
16679         * init.c (build_new_1): Split out from build_new.
16680         (build_new): Just return a NEW_EXPR.
16681         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
16682
16683         * decl2.c (get_temp_regvar): Tweak.
16684
16685         * cp-tree.h (TREE_CALLS_NEW): Comment out.
16686         * class.c (resolves_to_fixed_type_p): Remove use.
16687         * method.c (build_opfncall): Likewise.
16688         * call.c (build_new_op): Likewise.
16689
16690 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
16691
16692         * exception.cc (__eh_alloc, __eh_free): New fns.
16693         (__cp_push_exception, __cp_pop_exception): Use them.
16694         (__uncatch_exception): Call terminate here if no exception.
16695         * except.c (build_terminate_handler): New fn.
16696         (expand_start_catch_block): Use it.
16697         (expand_exception_blocks): Likewise.
16698         (alloc_eh_object): New fn.
16699         (expand_throw): Use it.  Protect exception init with terminate.
16700         * typeck.c (build_modify_expr): Remove code that ignores trivial
16701         methods.
16702
16703 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16704
16705         * call.c (add_builtin_candidate): Add default case in enumeration
16706         switch.
16707         (build_new_op): Likewise.
16708         (convert_like): Likewise.
16709         * cvt.c (build_expr_type_conversion): Likewise.
16710         * tree.c (real_lvalue_p): Likewise.
16711         (lvalue_p): Likewise.
16712         (cp_tree_equal): Likewise.
16713         * typeck.c (comptypes): Likewise.
16714         (build_component_ref): Likewise.
16715         (build_function_call_real): Likewise.
16716         (build_binary_op_nodefault): Likewise.
16717         (build_unary_op): Likewise.
16718         (build_modify_expr): Likewise.
16719         * typeck2.c (initializer_constant_valid_p): Likewise.
16720
16721 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
16722
16723         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
16724
16725 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
16726
16727         * pt.c (coerce_template_parms): Make sure to digest_init if
16728         possible.
16729
16730         * decl.c (duplicate_decls): Make the newdecl virtual if the
16731         olddecl was, just as is done with other attributes of olddecl.
16732
16733 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
16734
16735         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
16736         address of an OFFSET_REF.
16737
16738         * cp-tree.def: Add AGGR_INIT_EXPR.
16739         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
16740         AGGR_INIT_EXPR where appropriate.
16741         * expr.c (cplus_expand_expr): Likewise.  Simplify.
16742
16743         * decl2.c (finish_file): Remove call to register_exception_table.
16744
16745 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16746
16747         * pt.c (instantiate_class_template): Don't do injection when
16748         processing_template_decl is true, as pollutes current_binding_level
16749         for base classes.
16750
16751 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
16752
16753         * pt.c (maybe_fold_nontype_arg): Add prototype.
16754
16755 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
16756
16757         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
16758         * error.c (dump_expr): Likewise.
16759
16760 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
16761
16762         * typeck.c (build_function_call_real): Remove "inline called before
16763         definition" pedwarn.
16764
16765         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
16766
16767 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
16768
16769         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
16770
16771         * pt.c (type_unification_real): Change __null to type void* with
16772         a warning.
16773
16774 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
16775
16776         * call.c (implicit_conversion): Don't call
16777         build_user_type_conversion_1 with a NULL expr, since it will
16778         crash.
16779
16780         * pt.c (unify): Don't try to unify array bounds if either array is
16781         unbounded.
16782
16783 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
16784
16785         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
16786         Replace extern decls with casts.
16787
16788         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
16789         Update last_parm_cleanup_insn.
16790         (store_after_parms): Remove.
16791         * cp-tree.h: Adjust.
16792
16793 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
16794
16795         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
16796         (finish_file): Check DECL_COMDAT instead of weak|one_only.
16797         (import_export_vtable): Use make_decl_one_only instead of
16798         comdat_linkage for win32 tweak.
16799         (import_export_decl): Likewise.
16800         * pt.c (mark_decl_instantiated): Likewise.
16801
16802         * decl2.c (finish_file): Lose handling of templates in pending_statics.
16803
16804 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
16805
16806         * decl2.c (finish_file): Lose call to expand_builtin_throw.
16807         * except.c (expand_builtin_throw): Remove.
16808         * cp-tree.h: Remove ptr_ptr_type_node.
16809         * decl.c: Likewise.
16810
16811 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
16812
16813         * decl.c (ptr_ptr_type_node): Define.
16814         (init_decl_processing): Initialize it.
16815         * cp-tree.h: Declare it.
16816         * exception.cc (__cp_exception_info): Use __get_eh_info.
16817         (__cp_push_exception): Likewise.
16818         (__cp_pop_exception): Likewise.
16819
16820         From Scott Snyder <snyder@d0sgif.fnal.gov>:
16821         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
16822         saved_pc.
16823         (init_exception_processing): Removed saved_pc initialization.
16824
16825 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
16826
16827         * pt.c (instantiate_decl): Defer all templates but inline functions.
16828
16829 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
16830
16831         * init.c (expand_vec_init): Don't fold a list of parameters.
16832
16833         * decl.c (copy_args_p): Handle copy elision for types with virtual
16834         bases.
16835         * call.c (build_over_call): Likewise.
16836
16837 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
16838
16839         * pt.c (lookup_template_function): Copy the template arguments,
16840         not just the list containing them, to the permanent obstack.
16841
16842 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
16843
16844         * except.c (expand_start_catch_block): suspend_momentary for the
16845         terminate handler.
16846
16847         * error.c (dump_decl): Handle LOOKUP_EXPR.
16848
16849 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
16850
16851         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
16852         permanent obstack if we are processing a template decl.
16853         * typeck.c (build_static_cast): Likewise.
16854         (build_const_cast): Likewise.
16855         (build_reinterpret_cast): Likewise.
16856
16857         * pt.c (coerce_template_parms): Coerce some expressions, even
16858         when processing_template_decl.
16859
16860 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
16861
16862         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
16863         handling of pointer difference expressions.
16864
16865         * typeck.c (comp_target_types): Comparison of function/method types
16866         is independent of nptrs.
16867
16868 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
16869
16870         * pt.c (tsubst): Avoid creating pointer to reference and
16871         reference to reference types.
16872
16873 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
16874
16875         * parse.y (do_id): New nonterminal.
16876         (template_id): Use it.
16877
16878 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
16879
16880         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
16881         * spew.c (yylex): Don't do_identifier here.
16882         * decl2.c (build_expr_from_tree): Revert last change.
16883
16884         * decl2.c (build_expr_from_tree): Expand the name for a method call.
16885         * parse.y (object_template_id): Don't try to take the DECL_NAME.
16886
16887 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
16888
16889         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
16890         alloc_expr.
16891         * call.c (build_op_delete_call): Adjust.
16892
16893         * except.c (expand_end_catch_block): Lose rethrow region.
16894         (expand_start_catch_block): Likewise.
16895         (expand_end_catch_block): Don't expand_leftover_cleanups.
16896
16897 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16898
16899         * pt.c (tsubst): Remove tree_cons call (places redundant info into
16900         DECL_TEMPLATE_INSTANTIATION).
16901
16902 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
16903
16904         * tree.c (is_overloaded_fn): Handle getting a fn template.
16905         (really_overloaded_fn): Likewise.
16906         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
16907         * pt.c (check_explicit_specialization): Tweak.
16908         (determine_explicit_specialization): Tweak.
16909
16910         * tree.c, cp-tree.h (get_target_expr): New fn.
16911
16912 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
16913
16914         * pt.c (check_explicit_specialization): Fix misspelling in
16915         diagnostic: `preceeded'.
16916         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
16917         `conversiona'.
16918
16919 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
16920
16921         * pt.c (determine_explicit_specialization): Avoid an internal
16922         error for bad specializations.
16923
16924         * method.c (build_overload_value): Handle SCOPE_REF.
16925
16926 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
16927
16928         * class.c (prepare_fresh_vtable): Enable even more complex MI
16929         vtable names.
16930
16931 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
16932
16933         * exception.cc (__check_eh_spec): Optimize a bit.
16934
16935         * exception.cc (__cp_pop_exception): Lose handler arg.
16936         * except.c (do_pop_exception): Likewise.
16937         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
16938         (expand_end_catch_block): Likewise.
16939
16940 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
16941
16942         * pt.c (check_explicit_specialization): Complain about using a
16943         template-id for a non-specialization.
16944
16945 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
16946
16947         * repo.c: Prototype rindex only if needed.
16948         * xref.c: Likewise.
16949
16950 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
16951
16952         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
16953
16954 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
16955
16956         * typeck.c (build_const_cast): Handle references here instead of
16957         handing off to convert_to_reference.
16958
16959         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
16960         TerminateFunctionCall.
16961         (init_exception_processing): Likewise.  Terminate et al are now
16962         the fns, not ADDR_EXPRs.
16963         (various): Lose redundant assemble_external calls.
16964         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
16965
16966         * cp-tree.h (struct lang_decl_flags): Add comdat.
16967         (DECL_COMDAT): New macro.
16968         * decl.c (duplicate_decls): Propagate it.
16969         (cp_finish_decl): Handle it.
16970         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
16971
16972         * class.c: Remove static pending_hard_virtuals.
16973         (add_virtual_function): Take pointers to pending_virtuals
16974         and pending_hard_virtuals.
16975         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
16976
16977 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
16978
16979         * decl2.c (import_export_vtable): If we support one_only but not
16980         weak symbols, mark instantiated template vtables one_only.
16981         (import_export_decl): Likewise for tinfo functions.
16982         (finish_vtable_vardecl): Also write out vtables from explicitly
16983         instantiated template classes.
16984         * pt.c (mark_class_instantiated): Revert last change.
16985
16986         * except.c (expand_throw): Call mark_used on the destructor.
16987
16988 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
16989
16990         * lex.c (lang_init): Enable flag_exceptions by default if no
16991         command line switch was specified.
16992
16993 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
16994
16995         * pt.c (unify): Handle `void' template parameters in
16996         specializations.
16997
16998 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
16999
17000         * rtti.c (build_dynamic_cast): Handle template case here.
17001         (build_dynamic_cast_1): Not here.
17002
17003         * typeck2.c (digest_init): Make copies where appropriate.
17004
17005         * decl2.c (delete_sanity): resolve_offset_ref.
17006
17007         * except.c: Call terminate without caching so many bits.
17008
17009         * except.c (expand_start_catch_block): Fix catching a reference
17010         to pointer.
17011
17012 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
17013
17014         * init.c (build_new): Copy size to the saveable obstack.
17015
17016         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
17017         TRY_CATCH_EXPR for now.
17018
17019 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
17020
17021         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
17022         has DECL_LANG_SPECIFIC.
17023
17024         * exception.cc (struct cp_eh_info): Add handlers field.
17025         (__cp_push_exception): Initialize it.
17026         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
17027         (__throw_bad_exception): Remove.
17028         * except.c (call_eh_info): Add handlers field.
17029         (get_eh_handlers): New fn.
17030         (push_eh_cleanup): Increment handlers.
17031
17032 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
17033
17034         * except.c (expand_start_eh_spec): Use the try/catch code.
17035         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
17036         doing everything inline.
17037         (init_exception_processing): throw_type_match now takes
17038         const void pointers.
17039         * exception.cc (__check_eh_spec): New fn.
17040         * inc/exception: Neither terminate nor unexpected return.
17041         * decl.c: Make const_ptr_type_node public.
17042         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
17043
17044         * except.c (expand_start_catch_block): We only need the rethrow
17045         region for non-sjlj exceptions.
17046         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
17047
17048 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
17049
17050         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
17051         (various.o): Likewise.
17052         * inc/new: Add placement deletes.  Add throw specs for default new.
17053         * new.cc (set_new_handler): Move here from libgcc2.
17054         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
17055         (new): Move from libgcc2.  Throw bad_alloc.
17056         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
17057         * decl.c (init_decl_processing): Update exception specs on new and
17058         delete.
17059
17060         * method.c (build_decl_overload_real): Don't mess with global
17061         placement delete.
17062
17063         * init.c (build_new): Check for null throw spec, not nothrow_t.
17064
17065         * decl.c (duplicate_decls): Don't complain about different exceptions
17066         from an internal declaration.
17067
17068         * call.c (build_op_delete_call): Fix check for member fns again.
17069
17070         * decl2.c (import_export_decl): Interface hackery affects
17071         virtual synthesized methods.
17072
17073 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
17074
17075         * decl.c (start_decl): Don't just complain about a mismatched
17076         scope, fix it.
17077
17078         * decl.c (make_implicit_typename): Handle case where t is not
17079         actually from context.
17080         * tree.c (get_type_decl): Lose identifier case.
17081         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
17082         * parse.y (nonnested_type): Just use lookup_name.
17083         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
17084
17085 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
17086
17087         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
17088         T was built in C language context (for example, by
17089         output_func_start_profiler).
17090
17091 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
17092
17093         * decl.c (make_implicit_typename): New fn.
17094         (lookup_name_real): Use it.  Use current_class_type as the context.
17095
17096 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
17097
17098         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
17099
17100 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
17101
17102         * friend.c (do_friend): Warn about non-template friends in templates.
17103
17104         * call.c (build_op_delete_call): Fix handling of inherited delete.
17105
17106         * search.c (dfs_record_inheritance): Ignore template type parms.
17107
17108 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
17109
17110         * call.c (build_new_op): Fix copy error.
17111         (build_op_new_call): New fn.
17112         (build_op_delete_call): New fn.
17113         * cp-tree.h: Declare them.
17114         * init.c (build_new): Use them.  Support placement delete.
17115         (build_x_delete): Use build_op_delete_call.
17116         (build_delete): Likewise.
17117         * decl2.c (delete_sanity): Likewise.
17118         (coerce_delete_type): Don't complain about placement delete.
17119
17120 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
17121
17122         * call.c (build_new_function_call): Remove unused 'obj' parm.
17123         * cp-tree.h, typeck.c: Adjust.
17124
17125         * init.c (build_new): Make the cleanup last longer.
17126         (expand_vec_init): Call do_pending_stack_adjust.
17127
17128 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
17129
17130         * pt.c (do_type_instantiation): Fix typo.
17131         (mark_class_instantiated): If we support one_only but not weak
17132         symbols, don't mark this as known.
17133
17134         * init.c (build_new): Handle vec delete in EH cleanup.
17135
17136 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
17137
17138         * call.c (build_method_call): Call complete_type before checking
17139         for destructor.
17140
17141 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
17142
17143         * decl.c (add_block_current_level): Delete.
17144         * init.c (build_vec_delete_1): Delete build_block and
17145         add_block_current_level calls.
17146
17147 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
17148
17149         * init.c (build_new): Handle freeing allocated memory when the
17150         constructor throws.
17151
17152         * call.c (build_new_method_call): Fix flags arg.
17153
17154         * pt.c (do_type_instantiation): Don't try to instantiate
17155         member templates.
17156         (mark_decl_instantiated): If we support one_only but not
17157         weak symbols, mark this one_only.
17158         * decl2.c (import_export_vtable): Don't defer handling of vtables
17159         if MULTIPLE_SYMBOL_SPACES.
17160
17161 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
17162
17163         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
17164
17165 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
17166
17167         * except.c (do_pop_exception): Return a value.
17168
17169 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
17170
17171         * call.c (build_new_method_call): Handle getting a
17172         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
17173         if we got template parms.
17174         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
17175         not just the args.
17176         * decl2.c (build_expr_from_tree): Tweak last change.
17177         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
17178         (maybe_fold_nontype_arg): Split out from tsubst_copy.
17179         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
17180
17181 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
17182
17183         * pt.c (tsubst_copy): Handle explicit template arguments in
17184         function calls.
17185         * typeck.c (build_x_function_call): Likewise.
17186         * decl2.c (build_expr_from_tree): Lookup function name if it
17187         hasn't been done.
17188
17189         * pt.c (tsubst): Instantiate template functions properly when
17190         template parameter does not appear in function arguments and return
17191         type.
17192         (comp_template_args): Handle member templates required by tsubst.
17193
17194 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
17195
17196         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
17197         previous change.
17198
17199 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
17200
17201         * pt.c (coerce_template_parms): Tweak error message.
17202
17203         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
17204         return type defaults to `int', even if there are storage-class
17205         specifiers.
17206
17207 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
17208
17209         Complete nested exception support.
17210         * except.c (do_pop_exception): Split out...
17211         (push_eh_cleanup): From here.  Handle the EH region by hand.
17212         (expand_start_catch_block): Add a new level for the catch parm.
17213         Move the rethrow region outside the two cleanup regions.
17214         Protect the initializer for the catch parm with terminate.
17215         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
17216         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
17217         popping off the middle of the stack.
17218         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
17219         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
17220         (build_cplus_new): Only wrap CALL_EXPRs.
17221         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
17222         the constructor call.
17223
17224 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17225
17226         * Make-lang.in (c++.distdir): Make inc subdirectory.
17227
17228 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
17229
17230         * decl2.c (finish_file): Put back some code.
17231
17232 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
17233
17234         * decl2.c (finish_file): Remove redundant code.
17235         * method.c (emit_thunk): Don't let the backend defer generic thunks.
17236
17237 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
17238
17239         * except.c (call_eh_info): Split out...
17240         (push_eh_info): From here.
17241         (expand_builtin_throw): Use it.
17242         (expand_start_catch_block): Move region start back.
17243
17244 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
17245
17246         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
17247         (real_yylex): Record wide strings using target endianness, not host.
17248
17249 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
17250
17251         * repo.c (rindex): Add decl unconditionally.
17252         (get_base_filename, open_repo_file): Don't cast rindex.
17253         * xref.c (rindex): Add decl unconditionally.
17254         (index): Remove unused decl.
17255         (open_xref_file): Don't cast rindex.
17256
17257 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
17258
17259         * class.c (build_vbase_path): Propagate the result type properly.
17260
17261 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
17262
17263         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
17264         remaining use of saved_throw_type with a call to get_eh_type.
17265
17266 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
17267
17268         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
17269         (file_name_nondirectory): New function, doing the same as the macro.
17270         (set_typedecl_interface_info): Use it instead of the macro.
17271         (check_newline): Likewise.
17272         (handle_cp_pragma): Likewise.
17273
17274         * repo.c (get_base_filename): Cast result of rindex to char*.
17275         (open_repo_file): Likewise.
17276         * xref.c (open_xref_file): Likewise.
17277         * error.c (dump_char): Make its arg int, not char.
17278
17279         * except.c (push_eh_info): Pass the number of fields - 1 down, not
17280         the exact number of fields.
17281
17282 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
17283
17284         Support for nested exceptions.
17285         * tinfo2.cc (__is_pointer): New fn.
17286         * exception.cc (struct cp_eh_info): Define.
17287         (__cp_exception_info, __uncatch_exception): New fns.
17288         (__cp_push_exception, __cp_pop_exception): New fns.
17289         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
17290         Lose empty_fndecl.
17291         (init_exception_processing): Likewise.  __eh_pc is now external.
17292         (push_eh_info): New fn.
17293         (get_eh_{info,value,type,caught}): New fns.
17294         (push_eh_cleanup): Just call __cp_pop_exception.
17295         (expand_start_catch_block): Use push_eh_info.  Start the eh region
17296         sooner.
17297         (expand_end_eh_spec): Use push_eh_info.
17298         (expand_throw): Call __cp_push_exception to set up the exception info.
17299         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
17300         when we rethrow.
17301         (expand_builtin_throw): Don't refer to empty_fndecl.
17302
17303 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
17304
17305         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
17306
17307 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
17308
17309         * method.c (build_template_parm_names, build_decl_overload_real):
17310         Add static to definitions.
17311         * pt.c (add_to_template_args, note_template_header,
17312         processing_explicit_specialization, type_unification_real): Likewise.
17313         ({determine,check}_explicit_specialization): Use a single string for
17314         error messages.
17315
17316 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
17317
17318         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
17319         (expand_end_catch_block): Likewise.
17320         (expand_end_eh_spec): Likewise.
17321
17322 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
17323
17324         * decl.c (duplicate_decls): Handle template specializations
17325         correctly.
17326         * error.c (dump_function_name): Fix printing of specializations of
17327         member functions that are not member templates.
17328         * cp-tree.h (processing_specialization): Make global.
17329         * pt.c (processing_specialization): Likewise.
17330         * lex.c (cons_up_default_function): Save and restore
17331         processing_specialization to avoid confusion.
17332
17333 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
17334
17335         * decl.c (init_decl_processing): Give null_node unknown* type.
17336         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
17337         (common_type): Likewise.
17338         * error.c (args_as_string): Recognize null_node.
17339
17340 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17341
17342         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
17343         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
17344
17345         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
17346
17347         * Make-lang.in (g++): Include prefix.o.
17348
17349 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
17350
17351         * pt.c (determine_explicit_specialization): Initialize "dummy"
17352         to keep Purify quiet.
17353
17354 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
17355
17356         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
17357         (build_overload_int): Not here.
17358
17359 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
17360
17361         * class.c (build_type_pathname): Remove.
17362         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
17363
17364 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
17365
17366         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
17367         &&label GNU extension.
17368
17369 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
17370
17371         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
17372         so as to avoid incorrect manglings.
17373         * method.c (build_decl_overload_real): Don't mangle return types
17374         for constructors.
17375
17376 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
17377
17378         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
17379         scratch_tree_cons): Define as macros for now.
17380         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
17381         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
17382         typeck2.c: Use them and the expression_obstack variants.
17383
17384 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
17385
17386         * decl.c (store_return_init): Allow classes with explicit ctors to
17387         be used with the named return values extension.
17388
17389 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
17390
17391         * pt.c (instantiate_decl): Fix previous change.
17392
17393 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
17394
17395         * pt.c (tsubst): Fix thinko.
17396         (instantiate_decl): Really use the original template.
17397
17398         * call.c (build_new_method_call): Use simple constructor_name for
17399         error messages.
17400
17401 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
17402
17403         * method.c (build_underscore_int): Don't use ANSI specific
17404         features.
17405
17406 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
17407
17408         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
17409         for our key method; it might have been inlined by -O3.
17410
17411 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
17412
17413         * decl.c (make_typename_type): Do not try to call lookup_field for
17414         non-aggregate types.
17415
17416 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
17417
17418         * typeck.c (build_reinterpret_cast): Tweak.
17419
17420 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
17421
17422         * typeck.c (build_reinterpret_cast): Converting a void pointer
17423         to function pointer with a reinterpret_cast produces a warning
17424         if -pedantic is issued.
17425
17426 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
17427
17428         * typeck.c (c_expand_return): Don't warn about returning a
17429         reference-type variable as a reference.
17430
17431 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
17432
17433         * method.c (build_static_name): Fix typo.
17434
17435 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
17436
17437         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
17438         OLDDECL before we try to do DECL_USE_TEMPLATE.
17439
17440 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
17441
17442         * decl.c (duplicate_decls): Don't warn about template instances.
17443
17444         * typeck.c (mark_addressable): Lose ancient code that unsets
17445         DECL_EXTERNAL.
17446
17447         * pt.c (do_decl_instantiation): Lose support for instantiating
17448         non-templates.
17449
17450         * call.c (build_new_function_call): Fix handling of null explicit
17451         template args.
17452         (build_new_method_call): Likewise.
17453
17454 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
17455
17456         * method.c (build_underscore_int): Fix typo.
17457
17458 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
17459
17460         * tree.c (print_lang_statistics): #if 0 call to
17461         print_inline_obstack_statistics until its definition is checked in.
17462
17463 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
17464
17465         * decl2.c (finish_file): Move dump_tree_statistics to end.
17466
17467         * pt.c (instantiate_decl): Look for the original template.
17468         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
17469         of member templates.
17470
17471 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
17472
17473         * Makefile.in (g++FAQ.*): New rules.
17474         (CONFLICTS): Update.
17475         * g++FAQ.texi: Moved from libg++.
17476
17477         * parse.y (PFUNCNAME): Only specify the type once.
17478
17479 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
17480
17481         * lex.c (real_yylex): Clean up the code to fully behave the way
17482         the c-lex.c parser does for complex and real numbers.
17483
17484 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
17485
17486         * method.c (build_decl_overload_real): Reformat.
17487
17488 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
17489
17490         * method.c (synthesize_method): If at_eof, determine our linkage.
17491
17492 1997-09-29  Paul Eggert  <eggert@twinsun.com>
17493
17494         * lex.c (real_yylex): Treat `$' just like `_', except issue a
17495         diagnostic if !dollars_in_ident or if pedantic.
17496
17497         * lang-specs.h (@c++): -ansi no longer implies -$.
17498
17499         * decl2.c (lang_decode_option):
17500         -traditional and -ansi now do not mess with
17501         dollars_in_ident.
17502
17503 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
17504
17505         * Makefile.in (parse.o, decl.o): Also depend on
17506         $(srcdir)/../except.h $(srcdir)/../output.h.
17507         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
17508         $(srcdir)/../except.h $(srcdir)/../output.h.
17509         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
17510         ../insn-codes.h.
17511
17512         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
17513
17514         * expr.c (cplus_expand_expr): Make it static.
17515
17516         * decl2.c, init.c, typeck.c: Include "expr.h".
17517         (expand_expr): Use proper values when calling the function.
17518
17519 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
17520
17521         * lang-options.h: New -Wold-style-cast flag.
17522         * cp-tree.h (warn_old_style_cast): New variable.
17523         * decl2.c (warn_old_style_cast): Likewise.
17524         (lang_decode_option): Support -Wold-style-cast.
17525         (reparse_absdcl_as_casts): Produce old-style-cast warning.
17526
17527 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
17528
17529         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
17530         TREE_USED, reset value based on already_used.
17531
17532         * init.c (expand_member_init): Revert change.
17533
17534 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
17535
17536         * cp-tree.h, decl.c, decl2.c, pt.c:
17537         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
17538
17539         * decl2.c (lang_decode_option): Add missing ;.
17540
17541 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
17542
17543         * friend.c (do_friend): Disable injection for all template-derived
17544         decls.
17545         * decl2.c (lang_decode_option): Handle -fguiding-decls.
17546         * parse.y (notype_template_declarator): New nonterminal.
17547         (direct_notype_declarator): Use it.
17548         (complex_direct_notype_declarator): Likewise.
17549         (object_template_id): Accept any kind of identifier after TEMPLATE.
17550         (notype_qualified_id): Don't add template declarators here.
17551
17552 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
17553
17554         * call.c (add_template_candidate): Add explicit_targs parameter.
17555         (build_scoped_method_call): Use it.
17556         (build_overload_call_real): Likewise.
17557         (build_user_type_conversion_1): Likewise.
17558         (build_new_function_call): Likewise.
17559         (build_object_call): Likewise.
17560         (build_new_op): Likewise.
17561         (build_new_method_call): Likewise.
17562         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
17563         (build_new_method_call): Likewise.
17564
17565         * class.c (finish_struct_methods): Add specialization pass to
17566         determine which methods were specializing which other methods.
17567         (instantiate_type): Handle TEMPLATE_ID_EXPR.
17568
17569         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
17570
17571         * cp-tree.h (name_mangling_version): New variable.
17572         (flag_guiding_decls): Likewise.
17573         (build_template_decl_overload): New function.
17574         (begin_specialization): Likewise.
17575         (reset_specialization): Likewise.
17576         (end_specialization): Likewise.
17577         (determine_explicit_specialization): Likewise.
17578         (check_explicit_specialization): Likewise.
17579         (lookup_template_function): Likewise.
17580         (fn_type_unification): Add explicit_targs parameter.
17581         (type_unification): Likewise.
17582
17583         * decl.c (duplicate_decls): Add smarts for explicit
17584         specializations.
17585         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
17586         specializations.
17587         (grokfndecl): Call check_explicit_specialization.
17588
17589         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
17590         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
17591         (check_classfn): Handle specializations.
17592
17593         * error.c (dump_function_name): Print specialization arguments.
17594
17595         * friend.c (do_friend): Don't call pushdecl for template
17596         instantiations.
17597
17598         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
17599
17600         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
17601         and -fno-guiding-decls.
17602
17603         * lex.c (identifier_type): Return PFUNCNAME for template function
17604         names.
17605
17606         * method.c (build_decl_overload_real): New function.
17607         (build_template_parm_names): New function.
17608         (build_overload_identifier): Use it.
17609         (build_underscore_int): New function.
17610         (build_overload_int): Use it.  Add levels for template
17611         parameters.
17612         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
17613         (build_overload_nested_names): Handle template type parameters.
17614         (build_template_decl_overload): New function.
17615
17616         * parse.y (YYSTYPE): New ntype member.
17617         (nested_name_specifier): Use it.
17618         (nested_name_specifier_1): Likewise.
17619         (PFUNCNAME): New token.
17620         (template_id, object_template_id): New non-terminals.
17621         (template_parm_list): Note specializations.
17622         (template_def): Likewise.
17623         (structsp): Likewise.
17624         (fn.def2): Handle member template specializations.
17625         (component_decl_1): Likewise.
17626         (direct_notype_declarator): Handle template-ids.
17627         (component_decl_1): Likewise.
17628         (direct_notype_declarator): Handle template-ids.
17629         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
17630
17631         * pt.c (processing_specializations): New variable.
17632         (template_header_count): Likewise.
17633         (type_unification_real): New function.
17634         (processing_explicit_specialization): Likewise.
17635         (note_template_header): Likewise.
17636         (is_member_template): Handle specializations.
17637         (end_template_decl): Call reset_specialization.
17638         (push_template_decl): Handle member template specializations.
17639         (tsubst): Likewise.
17640         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
17641         (instantiate_template): Handle specializations.
17642         (instantiate_decl): Likewise.
17643         (fn_type_unification): Handle explicit_targs.
17644         (type_unification): Likewise.  Allow incomplete unification
17645         without an error message, if allow_incomplete.
17646         (get_bindings): Use new calling sequence for fn_type_unification.
17647
17648         * spew.c (yylex): Handle PFUNCNAME.
17649
17650         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
17651         (really_overloaded_fn): Likewise.
17652         (get_first_fn): Handle function templates.
17653
17654         * typeck.c (build_x_function_call): Use really_overloaded_fn.
17655         Handle TEMPLATE_ID_EXPR.
17656         (build_x_unary_op): Likewise.
17657         (build_unary_op): Likewise.
17658         (mark_addressable): Templates whose address is taken are marked
17659         as used.
17660
17661 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
17662
17663         * decl.c (init_decl_processing): Declare __builtin_constant_p as
17664         accepting any kind of type, not only int.
17665
17666 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
17667
17668         * search.c (get_matching_virtual): Notice virtual bases when sorrying
17669         about covariant returns.
17670
17671         * parse.y (member_init): Also imply typename here.  Remove ancient
17672         extension for initializing base members.
17673
17674 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
17675
17676         Handle multi-level typenames and implicit typename in base list.
17677         * parse.y (typename_sub{,[0-2]}): New rules.
17678         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
17679         (nonnested_type): New rule.
17680         (complete_type_name): Use it.
17681         (base_class.1): Use typename_sub and nonnested_type.
17682         (nested_name_specifier): Don't elide std:: here.
17683         * decl.c (make_typename_type): Handle getting a type for NAME.
17684         (lookup_name_real): Turn std:: into :: here.
17685
17686         Rvalue conversions were removed in London.
17687         * call.c (is_subseq): Don't consider lvalue transformations.
17688         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
17689         (joust): Re-enable ?: kludge.
17690
17691 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
17692
17693         * decl.c (start_function): Up warning of no return type to be a
17694         pedwarn.
17695
17696 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
17697
17698         * init.c (expand_member_init): Don't set TREE_USED.
17699         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
17700         set,don't clear TREE_USED wholesale.
17701
17702 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
17703
17704         * call.c (build_over_call): Do require_complete_type before
17705         build_cplus_new.
17706
17707 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
17708
17709         * search.c (lookup_field): Call complete_type in all cases.
17710
17711         * decl.c (finish_function): Just warn about flowing off the end.
17712
17713 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
17714
17715         * decl.c (grokparms): Don't bash a permanent list node if we're
17716         in a function.
17717
17718 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
17719
17720         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
17721
17722 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
17723
17724         * call.c (build_new_op): Give better error for syntactically
17725         correct, but semantically invalid, use of undeclared template.
17726
17727         * call.c (compare_qual): Handle pmfs.
17728
17729         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
17730         after the exception spec.
17731
17732 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
17733
17734         * call.c (null_ptr_cst_p): Integer type, not integral type.
17735
17736         * call.c (joust): Disable warnings until they can be moved to the
17737         right place.
17738
17739 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
17740
17741         * Makefile.in, config-lang.in:  Convert to autoconf.
17742
17743 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
17744
17745         * decl.c (lookup_name_real): Add implicit 'typename' to types from
17746         base classes.
17747
17748         * pt.c (most_specialized_class): Fix typo.
17749         (tsubst): Move constant folding to TREE_VEC case.
17750
17751 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
17752
17753         * pt.c (do_poplevel): Don't warn about unused local variables
17754         while processing_template_decl since we don't always know whether
17755         or not they will need constructing/destructing.
17756
17757         * pt.c (uses_template_parms): Check the values of an enumeration
17758         type to make sure they don't depend on template parms.
17759
17760         * decl.c (make_typename_type): Don't lookup the field if the
17761         context uses template parms, even if we're not
17762         processing_template_decl at the moment.
17763
17764         * pt.c (coerce_template_parms): Avoid looking at the
17765         TYPE_LANG_DECL portion of a typename type, since there won't be
17766         one.
17767         (tsubst): Do constant folding as necessary to make sure that
17768         arguments passed to lookup_template_class really are constants.
17769
17770 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
17771
17772         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
17773         * decl2.c (finish_file): Only register exception tables if we
17774         need to.
17775
17776         * decl.c (init_decl_processing): Add __builtin_[fs]p.
17777
17778 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
17779
17780         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
17781
17782 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
17783
17784         * error.c (dump_decl): Avoid crashing when presented with a
17785         uninitialized constant, as can occur with a template parameter.
17786         (dump_expr): Make sure that there are enough levels of
17787         current_template_parms before we start diving through them.
17788
17789 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
17790
17791         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
17792         c-typeck.c.
17793
17794 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
17795
17796         * except.c (expand_throw): Call build_delete for all
17797         exception types, not just objects with destructors.
17798
17799 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
17800
17801         * decl.c (current_local_enum): Remove static.
17802         * pt.c (tsubst_enum): Save and restore value of current_local_enum
17803         in case template is expanded in enum decl.
17804         (instantiate_class_template): Use new tsubst_enum signature.
17805         (tsubst_expr): Likewise.
17806
17807 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
17808
17809         * pt.c (begin_member_template_processing): Take a function as
17810         argument, not a set of template arguments.  Use the template
17811         parameters, rather than the arguments.  Handle non-type parameters
17812         correctly.  Push a binding level for the parameters so that multiple
17813         member templates using the same parameter names can be declared.
17814         (end_member_template_processing): Pop the binding level.
17815         (push_template_decl): Mark member templates as static when
17816         appropriate.
17817
17818         * lex.c (do_pending_inlines): Pass the function, not its template
17819         arguments, to begin_member_template_processing.
17820         (process_next_inline): Likewise.
17821         (do_pending_defargs): Likewise.
17822
17823         * error.c (dump_expr): Obtain the correct declaration for a
17824         TEMPLATE_CONST_PARM.
17825
17826         * call.c (add_template_conv_candidate): New function.
17827         (build_object_call): Handle member templates, as done in the other
17828         build_ functions.
17829
17830 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
17831
17832         * decl.c (replace_defag): Undo previous change.
17833         * lex.c (do_pending_defargs): Deal with member templates.
17834
17835         * pt.c (is_member_template): Avoid crashing when passed a
17836         non-function argument.
17837
17838 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
17839
17840         * class.c (grow_method): Remove check for redeclaration.
17841
17842 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
17843
17844         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
17845         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
17846         (PRIMARY_TEMPLATE_P): Use it.
17847         * call.c (build_overload_call_real): Use it.
17848         * class.c (instantiate_type): Likewise.
17849         * decl.c (decls_match): Likewise.
17850         * method.c (build_overload_identifier): Likewise.
17851         * pt.c (push_template_decl): Likewise.
17852         (classtype_mangled_name): Likewise.
17853         (lookup_template_class): Likewise.
17854
17855         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
17856         DECL_NTPARMS to conform to usage elsewhere.
17857         * call.c (add_template_candidate): Likewise.
17858         * class.c (instantiate_type): Likewise.
17859         * pt.c (instantiate_template): Likewise.
17860         (get_bindings): Likewise.
17861
17862         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
17863         is_member_template.
17864
17865         * pt.c (unify): Undo changes to allow multiple levels of template
17866         parameters.
17867         (type_unification): Likewise.
17868         (fn_type_unification): Likewise.
17869         (get_class_bindings): Likewise.
17870         * cp-tree.h (Likewise).
17871
17872         * decl.c (replace_defarg): Check that the type of the default
17873         parameter does not invlove a template type before complaining
17874         about the initialization.
17875
17876         * error.c (dump_expr): Deal with template constant parameters in
17877         member templates correctly.
17878
17879         * pt.c (is_member_template): Deal with class specializations
17880         correctly.
17881         (tsubst): Handle "partial instantiation" of member templates
17882         correctly.
17883
17884 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
17885
17886         * pt.c (type_unification): Change calling sequence to allow for
17887         multiple levels of template parameters.
17888         (tsubst_expr): Likewise.
17889         (tsubst): Likewise.
17890         (tsubst_copy): Likewise.
17891         (instantiate_template): Likewise.
17892         (unify): Likewise.
17893         * call.c (build_overload_call_real): Use it.
17894         (add_builtin_candidate): Use it.
17895         (build_new_method_call): Use it.
17896         * class.c (instantiate_type): Use it.
17897         * decl.c (grokdeclarator): Use it.
17898         * decl2.c (finish_file): Use it.
17899         * method.c (build_overload_identifier): Use it.
17900
17901         * call.c (add_template_candidate):  Add additional parameter for
17902         the function return type.  Call fn_type_unification istead of
17903         type_unification.
17904         (build_user_type_conversion_1): Handle member templates.
17905         (build_new_function_call): Likewise.
17906         (build_new_op): Likewise.
17907         (build_new_method_call): Likewise.
17908
17909         * class.c (grow_method): Don't give an error message indicating
17910         that two member templates with the same name are ambiguous.
17911         (finish_struct): Treat member template functions just like member
17912         functions.
17913
17914         * cp-tree.h (check_member_template): Add declaration.
17915         (begin_member_template_processing): Likewise.
17916         (end_member_template_processing): Likewise.
17917         (fn_type_unification): Likewise.
17918         (is_member_template): Likewise.
17919         (tsubst): Change prototype.
17920         (tsubst_expr): Likewise.
17921         (tsubst_copy): Likewise.
17922         (instantiate_template): Likewise.
17923         (get_bindings): Likewise.
17924
17925         * decl.c (decls_match): Handle multiple levels of template
17926         parameters.
17927         (pushdecl): Handle template type params just like other type
17928         declarations.
17929         (push_class_level_binding): Return immediately if the
17930         class_binding_level is NULL.
17931         (grokfndecl): If check_classfn() returns a member_template, use
17932         the result of the template, not the template itself.
17933
17934         * decl2.c (check_member_template): New function.  Check to see
17935         that the entity declared to be a member template can be one.
17936         (check_classfn): Allow redeclaration of member template functions
17937         with different types; the new functions can be specializations or
17938         explicit instantiations.
17939
17940         * error.c (dump_decl): Handle multiple levels of template
17941         parameters.
17942         (dump_function_decl): Update to handle function templates.
17943
17944         * lex.c (do_pending_inlines): Set up template parameter context
17945         for member templates.
17946         (process_next_inline): Likewise.
17947
17948         * method.c (build_overload_identifier): Adjust for multiple levels
17949         of template parameters.
17950
17951         * parse.y (fn.def2): Add member templates.
17952         (component_decl_1): Likewise.
17953
17954         * pt.c (begin_member_template_processing): New function.
17955         (end_member_template_processing): Likewise.
17956         (is_member_template): Likewise.
17957         (fn_type_unification): Likewise.
17958         (current_template_parms): Return a vector of all the template
17959         parms, not just the innermost level of parms.
17960         (push_template_decl): Deal with the possibility of member
17961         templates.
17962         (lookup_template_class): Likewise.
17963         (uses_template_parms): Likewise.
17964         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
17965         TEMPLATE_CONST_PARM to deal with multiple levels of template
17966         arguments.   Add processing of TEMPLATE_DECL to produce new
17967         TEMPLATE_DECLs from old ones.
17968         (do_decl_instantiation): Handle member templates.
17969
17970         * search.c (lookup_fnfields_1): Handle member template conversion
17971         operators.
17972
17973         * tree.c (cp_tree_equal): Check the levels, as well as the
17974         indices, of TEMPLATE_CONST_PARMs.
17975
17976         * typeck.c (comptypes): Check the levels, as well as the indices,
17977         fo TEMPLATE_TYPE_PARMs.
17978         (build_x_function_call): Treat member templates like member
17979         functions.
17980
17981 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
17982
17983         * typeck.c (c_expand_return): Always convert_for_initialization
17984         before checking for returning a pointer to local.
17985
17986         * pt.c (type_unification): If strict and the function parm doesn't
17987         use template parms, just compare types.
17988
17989 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
17990
17991         * method.c (build_overloaded_value): Replace direct call
17992         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
17993
17994 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
17995
17996         * typeck.c (convert_arguments): Don't arbitrarily choose the first
17997         of a set of overloaded functions.
17998
17999 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
18000
18001         * lex.c (real_yylex): Don't elide __FUNCTION__.
18002
18003         * method.c (build_overload_value): Add in_template parm.
18004         (build_overload_int): Likewise.
18005         (build_overload_identifier): Pass it.
18006
18007         * decl.c (duplicate_decls): Don't bash a previous template
18008         definition with a redeclaration.
18009
18010         * pt.c (unify): float doesn't match double.
18011
18012         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
18013         TYPE_DECL.  Handle getting non-template types.
18014         * parse.y (explicit_instantiation): Use typespec instead of
18015         aggr template_type.
18016
18017 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
18018
18019         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
18020
18021 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
18022
18023         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
18024         (compare_ics): Likewise.
18025
18026 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
18027
18028         * call.c (joust): Warn about choosing one conversion op over
18029         another because of 'this' argument when the other return type is
18030         better.
18031         (source_type): New fn.
18032
18033         * call.c (build_new_op): Strip leading REF_BIND from first operand
18034         to builtin operator.
18035
18036         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
18037         use its RTL.
18038
18039 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
18040
18041         * call.c (null_ptr_cst_p): Remove support for (void*)0.
18042
18043 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
18044
18045         * typeck.c (expand_target_expr): Make definition match declaration.
18046
18047         * class.c (get_basefndecls): Make definition match declaration.
18048
18049 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
18050
18051         * input.c (sub_getch): Eventually give up and release the input file.
18052
18053         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
18054         right place.
18055
18056         * call.c (joust): Tweak message.
18057
18058 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
18059
18060         * error.c (type_as_string): Put const/volatile on template type
18061         parameters where appropriate.
18062
18063 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
18064
18065         * call.c (strictly_better): Make arguments unsigned ints.
18066
18067 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
18068
18069         * lex.c (real_yylex): Refer to __complex instead of complex.
18070
18071 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
18072
18073         * lex.c (real_yylex): Don't use getc directly.
18074
18075 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
18076
18077         * call.c (is_subseq): Don't try to be clever.
18078
18079 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
18080
18081         * parse.y, pt.c: Include "except.h".
18082         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
18083         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
18084         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
18085         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
18086         prototyping.
18087
18088 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
18089
18090         * decl2.c (mark_vtable_entries): Instead of replacing pure
18091         virtuals with a reference to __pure_virtual, copy the decl and
18092         change the RTL.
18093
18094 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
18095
18096         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
18097
18098         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
18099
18100         * pt.c (instantiate_class_template): Call repo_template_used
18101         before finish_prevtable_vardecl.
18102
18103         * call.c (is_subseq): New fn.
18104         (compare_ics): Use it.
18105
18106         * repo.c (finish_repo): Don't crash on no args.
18107
18108         * parse.y (named_complex_class_head_sans_basetype): Handle
18109         explicit global scope.
18110         * decl2.c (handle_class_head): New fn.
18111
18112         * pt.c (unify): Add CONST_DECL case.
18113
18114 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18115
18116         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
18117
18118         * cp-tree.h (report_type_mismatch): Add prototype.
18119         * call.c (build_overload_call_real): Remove erroneous fourth
18120         argument to report_type_mismatch.
18121         (build_user_type_conversion_1): Remove erroneous second arg to
18122         tourney.
18123         (build_new_function_call): Likewise.
18124         (build_object_call): Likewise.
18125         (build_new_op): Likewise.
18126         (build_new_method_call): Likewise.
18127
18128 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
18129
18130         * error.c (dump_decl): Don't bother processing a function with no
18131         DECL_LANG_SPECIFIC.
18132
18133         * method.c (emit_thunk): Call init_function_start in the macro case.
18134
18135 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
18136
18137         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
18138         defined and used to set flag_vtable_thunks.
18139
18140 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
18141
18142         * parse.y: Don't clear the inlines from their obstack until they've
18143         all been processed.
18144
18145         * decl.c (duplicate_decls): Don't complain about exception
18146         specification mismatch if flag_exceptions is off.
18147
18148 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
18149
18150         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
18151
18152 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
18153
18154         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
18155         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
18156         Include <stdio.h> before include files that formerly used STDIO_PROTO.
18157
18158         * decl.c, g++spec.c, lex.c, method.c, repo.c:
18159         Include "config.h" first, as per autoconf manual.
18160
18161 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
18162
18163         * decl.c (duplicate_decls): Tweak wording.
18164         * lex.c (do_pending_defargs): Don't die if we see a default arg
18165         that isn't a DEFAULT_ARG.
18166         * error.c (dump_expr): Handle DEFAULT_ARG.
18167
18168         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
18169         * lang-options.h: Add -fhandle-exceptions.
18170
18171         * class.c (build_vtable): Vtables are artificial.
18172         (prepare_fresh_vtable): Likewise.
18173
18174 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
18175
18176         * cvt.c (ocp_convert): After converting to the target type, set
18177         LOOKUP_NO_CONVERSION.
18178
18179         * call.c (joust): Warn about potentially confusing promotion rules
18180         with -Wsign-promo.
18181         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
18182
18183 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
18184
18185         * exception.cc: Declare __terminate_func with noreturn attribute.
18186
18187 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
18188
18189         * parse.y: Break out eat_saved_input, handle errors.
18190         (function_try_block): Use compstmt instead of compstmt_or_error.
18191
18192 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
18193
18194         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
18195
18196 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
18197
18198         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
18199         existence of cc1plus check whether $(LANGUAGES) contains C++.
18200
18201 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
18202
18203         * method.c (do_build_copy_constructor): When copying an anonymous
18204         union member loop around to handle nested anonymous unions.  Use
18205         the offset of the member relative to the outer structure, not the
18206         union.
18207
18208 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
18209
18210         * call.c (resolve_args): New fn.
18211         (build_new_function_call): Use it.
18212         (build_object_call): Likewise.
18213         (build_new_method_call): Likewise.
18214
18215 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
18216
18217         * call.c (build_over_call): tsubst all default parms from templates.
18218
18219 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
18220
18221         * decl.c (struct cp_function): Add static_labelno.
18222         (push_cp_function_context): Save it.
18223         (pop_cp_function_context): Restore it.
18224
18225 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
18226
18227         * typeck.c (build_component_ref_1): Convert from reference.
18228
18229 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18230
18231         * parse.y (current_declspecs, prefix_attributes): Initialize to
18232         NULL_TREE.
18233
18234         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
18235         before we try to force it to be a TREE_LIST.
18236         (decl): Make sure $1.t is non-nil.
18237
18238 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
18239
18240         * pt.c (uses_template_parms): Handle template first-parse codes.
18241
18242         * decl.c (cp_finish_decl): Only warn about user-defined statics.
18243
18244 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
18245
18246         * pt.c (unify): Handle BOOLEAN_TYPE.
18247
18248         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
18249         * pt.c (tsubst): Don't set it.
18250         * call.c (build_over_call): Use uses_template_parms.
18251
18252 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
18253
18254         * method.c (build_overload_nested_name): Use static_labelno
18255         instead of var_labelno.
18256         (build_qualified_name): New fn.
18257         (build_overload_name): Split out from here.
18258         (build_static_name): Use build_qualified_name.
18259         * decl.c (cp_finish_decl): Statics in extern inline functions
18260         have comdat linkage.
18261         (start_function): Initialize static_labelno.
18262
18263 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
18264
18265         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
18266         before "all member functions in class [] are private".
18267
18268 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
18269
18270         * lex.c (do_scoped_id): convert_from_reference.
18271         * init.c (build_offset_ref): Likewise.
18272
18273 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
18274
18275         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
18276
18277 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
18278
18279         * typeck.c (get_member_function_from_ptrfunc): Promote index
18280         before saving it.
18281
18282 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
18283
18284         * tree.c (layout_basetypes): Move non-virtual destructor warning.
18285         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
18286
18287 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
18288
18289         * decl.c (grokdeclarator): Call add_defarg_fn for the function
18290         type, too.
18291         * lex.c (add_defarg_fn): Adjust.
18292         (do_pending_defargs): Adjust.  Don't skip the first parm.
18293
18294 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
18295
18296         * decl.c (build_enumerator): Global enumerators are also readonly.
18297
18298         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
18299         (build_dynamic_cast): Call it and convert_from_reference.
18300
18301         * lex.c (add_defarg_fn): New fn.
18302         (snarf_defarg): Don't add to defarg_types.
18303         (do_pending_defargs): Lose defarg_types.  All fns we process now
18304         have defargs.
18305         * decl.c (grokfndecl): Call add_defarg_fn.
18306
18307         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
18308         * cp-tree.def: Add DEFAULT_ARG.
18309         * spew.c (yylex): Call snarf_defarg as appropriate.
18310         * parse.y: New tokens DEFARG and DEFARG_MARKER.
18311         (defarg_again, pending_defargs, defarg, defarg1): New rules.
18312         (structsp): Use pending_defargs.
18313         (parms, full_parm): Use defarg.
18314         * lex.c (init_lex): Initialize inline_text_firstobj.
18315         (do_pending_inlines): Never pass the obstack to feed_input.
18316         (process_next_inline): Call end_input instead of restore_pending_input.
18317         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
18318         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
18319         * input.c (end_input): New fn.
18320         (sub_getch): At the end of some fed input, just keep returning EOF
18321         until someone calls end_input.
18322         Remove 'obstack' field from struct input_source.
18323         * decl.c (grokparms): Handle DEFAULT_ARG.
18324         (replace_defarg): New fn.
18325         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
18326
18327 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
18328
18329         * call.c (implicit_conversion): If nothing else works, try binding
18330         an rvalue to a reference.
18331
18332 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
18333
18334         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
18335         ifndef for Cygwin32 to include SIGSEGV.
18336
18337 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
18338
18339         * class.c (finish_struct_1): Only complain about pointers without
18340         copy stuff if there are any constructors.
18341
18342         * rtti.c (build_dynamic_cast): Call complete_type on the types.
18343
18344         * decl.c (grokfndecl): If the function we chose doesn't actually
18345         match, die.
18346
18347         * decl2.c (grokclassfn): Don't specify 'const int' for the
18348         artificial destructor parm.
18349
18350         * pt.c (type_unification): If we are called recursively, nothing
18351         decays.
18352
18353 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
18354
18355         * decl.c (init_decl_processing): Stop trying to catch signals
18356         other than SIGABRT since the Cygwin32 library doesn't support
18357         them correctly yet.  This fixes a situation in which g++ causes
18358         a hang on SIGSEGVs and other such signals in our Win32-hosted
18359         tools.
18360
18361 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
18362
18363         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
18364
18365 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
18366
18367         * typeck2.c (store_init_value): Always return the value if our
18368         type needs constructing.
18369
18370         * method.c (hack_identifier): Convert class statics from
18371         reference, too.
18372
18373 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
18374
18375         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
18376
18377 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
18378
18379         * typeck.c (c_expand_return): Make sure we clean up temporaries at
18380         the end of return x;
18381
18382 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18383
18384         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
18385
18386 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
18387
18388         * except.c (expand_builtin_throw): Add support
18389         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
18390
18391 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
18392
18393         * repo.c (extract_string): Null-terminate.
18394
18395         * cp-tree.h (TI_SPEC_INFO): New macro.
18396         (CLASSTYPE_TI_SPEC_INFO): New macro.
18397         * pt.c (push_template_decl): Correctly determine # of template parms
18398         for partial specs.
18399
18400         * call.c (compare_ics): Really fix 'this' conversions.
18401
18402         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
18403         non-template fn.
18404
18405         * pt.c (push_template_decl): Complain about mismatch in # of
18406         template parms between a class template and a member template.
18407
18408 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
18409
18410         * method.c (synthesize_method): You can't call
18411         function_cannot_inline_p after finish_function.
18412         * decl.c (finish_function): Turn on flag_inline_functions and turn
18413         off DECL_INLINE before handing a synthesized method to the
18414         backend.
18415
18416 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
18417
18418         * method.c (synthesize_method): Remove July 30 change to never set
18419         DECL_INLINE if at_eof.
18420
18421 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
18422
18423         * xref.c (GNU_xref_member): Ensure that the node has a
18424         decl_lang_specific part before checking DECL_FRIEND_P.
18425
18426 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
18427
18428         * pt.c (instantiate_class_template): Diagnose non-class types used
18429         as bases.
18430
18431 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
18432
18433         * typeck.c (build_conditional_expr): Use convert_for_initialization
18434         instead of convert_and_check.
18435
18436 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18437
18438         * parse.y (typespec): Don't pedwarn for typeof.
18439
18440 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
18441
18442         * repo.c (finish_repo): Only check changes if we would write a
18443         repo file.
18444
18445         * call.c (compare_ics): Fix handling of 'this' conversions.
18446
18447         * pt.c (do_decl_instantiation): Support static data too.  Rename
18448         from do_function_instantiation.
18449         * cp-tree.h: Adjust.
18450         * parse.y: Adjust.
18451
18452         * repo.c (extract_string): New fn.
18453         (get_base_filename): Use it.
18454         (init_repo): Compare old args with current args.
18455
18456 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
18457
18458         * Makefile.in, Make-lang.in: Protect C-ls with a comment
18459         character, idea from Paul Eggert <eggert@twinsun.com>.
18460
18461 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
18462
18463         * typeck.c (c_expand_return): Be more persistent in looking for
18464         returned temps.
18465
18466         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
18467         pointer to reference.
18468
18469         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
18470
18471 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
18472
18473         * init.c (build_member_call, build_offset_ref):
18474         Use do_scoped_id instead of do_identifier.
18475
18476         * cvt.c (convert): Remove bogosity.
18477
18478 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18479
18480         * cvt.c (build_up_reference): Do checks of ARGTYPE and
18481         TARGET_TYPE before trying to use get_binfo.
18482
18483 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
18484
18485         * cvt.c (build_up_reference): Call get_binfo to get access control.
18486
18487         * decl2.c (import_export_decl): If we don't support weaks, leave
18488         statics undefined.
18489
18490 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
18491
18492         * except.c (expand_builtin_throw): Add support for machines that
18493         cannot access globals after throw's epilogue when
18494         -fno-sjlj-exceptions is used.
18495
18496 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
18497
18498         * parse.y: 'std::' becomes '::'.
18499         * lex.c (real_yylex): Remove 'namespace' warning.
18500         * init.c (build_member_call): Ignore 'std::'.
18501         (build_offset_ref): Likewise.
18502         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
18503         (do_toplevel_using_decl): Ignore 'using std::whatever'.
18504         * decl.c (push_namespace): Just sorry.
18505         (pop_namespace): Nop.
18506         (init_decl_processing): Declare std namespace.
18507
18508 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
18509
18510         * search.c (push_class_decls): A name which ambiguously refers to
18511         several instantiations of the same template just refers to the
18512         template.
18513
18514 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
18515
18516         * decl.c (build_enumerator): Fix problem with unsigned long
18517         enumerated values being smashed to ints, causing overflow
18518         when computing next enumerated value (for enum values around
18519         MAX_VAL).
18520
18521 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
18522
18523         * typeck.c (build_component_ref): Only call mark_used on a decl.
18524
18525 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18526
18527         * typeck.c (build_c_cast): Make the check for a ptr to function
18528         more specific before possible default_conversion call.
18529
18530 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
18531
18532         * except.c (expand_exception_blocks): Simplify and fix and make
18533         sure we don't end a region in a sequence, as expand_end_bindings
18534         doesn't like it.
18535
18536 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
18537
18538         * except.c (init_exception_processing): Mark terminate as not
18539         returning so that the optimizer can optimize better.
18540
18541 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
18542
18543         * cvt.c (convert): Don't do any extra work, if we can avoid it
18544         easily.
18545
18546 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
18547
18548         * *.[chy]: Change cp_convert to ocp_convert, change convert to
18549         cp_convert.  convert is now reserved for the backend, and doesn't
18550         have the semantics a frontend person should ever want.
18551
18552 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
18553
18554         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
18555         Lose -traditional support.
18556
18557 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
18558
18559         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
18560
18561         * parse.y (self_reference): Do it for templates, too.
18562         * class.c (pushclass): Don't overload_template_name; the alias
18563         generated by build_self_reference serves the same purpose.
18564
18565         * tree.c (list_hash): Make static, take more args.
18566         (list_hash_lookup): Likewise.
18567         (list_hash_add): Make static.
18568         (list_hash_canon): Lose.
18569         (hash_tree_cons): Only build a new node if one isn't already in the
18570         hashtable.
18571         (hash_tree_chain): Use hash_tree_cons.
18572         * cp-tree.h: Adjust.
18573         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
18574         of calling lookup_name.
18575
18576 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
18577
18578         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
18579         doesn't refer to the CONST_DECLs.
18580
18581 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
18582
18583         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
18584         is bigger.
18585         (expand_class_desc): Convert the last argument to a sizetype.
18586
18587 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18588
18589         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
18590         __real__): Add reswords.
18591         * hash.h: Regenerate.
18592         * lex.h (rid): Add RID_COMPLEX.
18593         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
18594         * lex.c (init_lex): Add building of RID_COMPLEX.
18595         (real_yylex): General cleanup in line with what c-lex.c also has,
18596         sans the cruft for traditional; add handling of SPEC_IMAG, complex
18597         types, and imaginary numeric constants.
18598         * parse.y (REALPART, IMAGPART): Add tokens.
18599         (unary_expr): Add REALPART and IMAGPART rules.
18600         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
18601         * decl.c (complex_{integer,float,double,long}_type_node): Define
18602         types.
18603         (init_decl_processing): Set up the types.
18604         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
18605         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
18606         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
18607         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
18608         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
18609         COMPLEX_TYPE case.
18610         * method.c (build_overload_name): Add handling of the different
18611         COMPLEX_TYPEs, prefixing them with `J'.
18612         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
18613         as a template parm.
18614         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
18615         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
18616         (mapcar): Handle COMPLEX_CST.
18617         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
18618         (common_type): Add code for complex types.
18619         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
18620         (convert_for_assignment): Likewise.
18621         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
18622
18623 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
18624
18625         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
18626         tsubst_expr, as it might try to do overload resolution.
18627
18628 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
18629
18630         * pt.c (instantiate_class_template): Oops.
18631
18632 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
18633
18634         * cp-tree.def: Add TAG_DEFN.
18635         * pt.c (tsubst_enum): New fn.
18636         (instantiate_class_template): Use it.
18637         (tsubst_expr): Support TAG_DEFN.
18638         (tsubst): Support local enums.
18639         (tsubst_copy): Likewise.
18640         * decl.c (finish_enum): Likewise.
18641         (start_enum): If this is a local enum, switch to permanent_obstack.
18642
18643 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
18644
18645         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
18646         (finish_function): Put the base init code for constructors just
18647         after the parm cleanup insns.
18648         (struct cp_function): Add last_parm_cleanup_insn.
18649         (push_cp_function_context): Likewise.
18650         (pop_cp_function_context): Likewise.
18651
18652 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
18653
18654         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
18655
18656 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18657
18658         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
18659         for THUNK_FNDECL before we switch to temporary allocation.
18660
18661 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
18662
18663         * call.c (build_new_op): Handle null arg2 for ?:.
18664
18665 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
18666
18667         * except.c (expand_exception_blocks): Ensure that we flow through
18668         the end of the exception region for the exception specification.
18669         Move exception region for the exception specification in, so that
18670         it doesn't protect the parm cleanup.  Remove some obsolete code.
18671         * decl.c (store_parm_decls): Likewise.
18672         (finish_function): Likewise.
18673
18674 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
18675
18676         * init.c (build_new): Fix nothrow handling.
18677
18678 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18679
18680         * init.c (emit_base_init): Don't warn about the initialization
18681         list for an artificial member.
18682
18683 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18684
18685         * expr.c (do_case): Handle !START case for the error msg.
18686
18687 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
18688
18689         * decl2.c, lang-options.h: New option -Weffc++.
18690         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
18691         to -Weffc++.
18692
18693         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
18694         to MULTIPLE_SYMBOL_SPACES.
18695
18696 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
18697
18698         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
18699
18700         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
18701
18702         * typeck.c (c_expand_return): Don't complain about returning void
18703         to void in an artificial function.
18704         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
18705         don't set DECL_RESULT, set DECL_ARTIFICIAL.
18706         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
18707
18708 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
18709
18710         * init.c (init_decl_processing): Add support for setjmp/longjmp based
18711         exception handling.
18712         * except.c (init_exception_processing): Likewise.
18713         (expand_end_catch_block): Likewise.
18714         (expand_exception_blocks): Likewise.
18715         (expand_throw): Likewise.
18716         * exception.cc (__default_terminate): Likewise.
18717
18718         * init.c (perform_member_init): Use new method of expr level
18719         cleanups, instead of cleanups_this_call and friends.
18720         (emit_base_init): Likewise.
18721         (expand_aggr_vbase_init_1): Likewise.
18722         (expand_vec_init): Likewise.
18723         * decl.c (cp_finish_decl): Likewise.
18724         (expand_static_init): Likewise.
18725         (store_parm_decls): Likewise.
18726         (cplus_expand_expr_stmt): Likewise.
18727         * decl2.c (finish_file): Likewise.
18728
18729         * Make-lang.in (exception.o): Ok to compile with -O now.
18730
18731         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
18732         we know it will be done later by the backend.
18733
18734         * decl2.c (lang_f_options): Remove support for short temps.
18735         * lang-options.h: Likewise.
18736
18737 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
18738
18739         * tree.c (varargs_function_p): New fn.
18740         * method.c (emit_thunk): Replace broken generic code with code to
18741         generate a heavyweight thunk function.
18742
18743 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
18744
18745         * pt.c (process_template_parm): pedwarn about floating-point parms.
18746
18747         * decl.c (grokdeclarator): inline no longer implies static.
18748
18749         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
18750
18751 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
18752
18753         * class.c (check_for_override): The signature of an overriding
18754         function is not changed.
18755
18756         * call.c (build_over_call): Move setting of conv into the loop.
18757         Note: this change, along with the related changes of the 18th thru
18758         the 20th of April, fix an infinite loop problem in conversions.
18759
18760 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
18761
18762         * call.c (build_user_type_conversion_1): Really ignore rvalue
18763         conversions when looking for a REFERENCE_TYPE.
18764
18765         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
18766         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
18767         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
18768         (build_unary_op): Likewise.
18769         * call.c (build_over_call): See through a CONVERT_EXPR around the
18770         ADDR_EXPR for on a temporary.
18771         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
18772         the ADDR_EXPR for a local variable.
18773
18774 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
18775
18776         * call.c (build_user_type_conversion_1): If we're trying to
18777         convert to a REFERENCE_TYPE, only consider lvalue conversions.
18778         (build_new_function_call): Print candidates.
18779         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
18780         (reference_binding): Binding a temporary of a reference-related type
18781         is BAD.
18782
18783 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18784
18785         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
18786         * tinfo2.cc (type_info::before): Likewise.
18787
18788 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
18789
18790         * call.c (implicit_conversion): Oops.
18791
18792 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
18793
18794         * call.c (implicit_conversion): Try to find a reference conversion
18795         before binding a const reference to a temporary.
18796
18797 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
18798
18799         * exception.cc (__default_unexpected): Call terminate by default,
18800         so that if the user overrides terminate, the correct function will
18801         be called.
18802
18803 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
18804
18805         * parse.y (left_curly): Avoid trying to use any fields of
18806         error_mark_node, as there aren't any.
18807
18808 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
18809
18810         * lex.c (do_identifier): Avoid breaking on overloaded methods
18811         as default arguments.
18812
18813 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
18814
18815         * call.c (add_template_candidate): Initialize the variable "dummy".
18816
18817 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
18818
18819         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
18820         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
18821
18822 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18823
18824         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
18825         (debug_binfo): Delete decl, not needed.
18826
18827         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
18828         promotes_to_aggr_type): Delete fns.
18829         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
18830         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
18831         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
18832
18833         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
18834
18835         * friend.c (is_friend_type): Delete fn.
18836         * cp-tree.h (is_friend_type): Delete decl.
18837
18838         * decl.c (original_result_rtx, double_ftype_double,
18839         double_ftype_double_double, int_ftype_int, long_ftype_long,
18840         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
18841         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
18842
18843         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
18844         fwd decls.
18845         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
18846
18847         * decl.c (pushdecl_nonclass_level): #if 0, unused.
18848         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
18849
18850         * lex.c (reinit_lang_specific): #if 0, unused.
18851         * cp-tree.h (reinit_lang_specific): #if 0 decl.
18852
18853         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
18854         * cp-tree.h (revert_static_member_fn): Delete decl.
18855
18856         * class.c (root_lang_context_p): Delete fn.
18857         * cp-tree.h (root_lang_context_p): Delete decl.
18858
18859         * decl.c (set_current_level_tags_transparency): #if 0, unused.
18860         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
18861
18862         * lex.c (set_vardecl_interface_info): Make static.
18863         * cp-tree.h (set_vardecl_interface_info): Delete decl.
18864
18865         * call.c (find_scoped_type): Make static.
18866         * cp-tree.h (find_scoped_type): Delete decl.
18867
18868         * search.c (convert_pointer_to_vbase): Make static.
18869         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
18870
18871         * decl.c (const_ptr_type_node): Likewise.
18872         * cp-tree.h (const_ptr_type_node): Delete decl.
18873
18874         * typeck.c (common_base_type): Make static.
18875         * cp-tree.h (common_base_types): Delete erroneous decl.
18876
18877         * pt.c (classtype_mangled_name): Make static.
18878         * cp-tree.h (classtype_mangled_name): Delete decl.
18879
18880         * lex.c (check_newline): Make static.
18881         * cp-tree.h (check_newline): Delete decl.
18882
18883         * typeck.c (build_x_array_ref): Delete fn, same idea as
18884         grok_array_decl.
18885         * cp-tree.h (build_x_array_ref): Delete decl.
18886
18887         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
18888         copy_lang_decl.
18889         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
18890
18891         * class.c (build_vtable_entry): Make static.
18892         * cp-tree.h (build_vtable_entry): Delete decl.
18893
18894         * class.c (build_vbase_pointer): Make static.
18895         * cp-tree.h (build_vbase_pointer): Delete decl.
18896
18897         * sig.c (build_sptr_ref): Add forward decl and make static.
18898         * cp-tree.h (build_sptr_ref): Delete decl.
18899
18900         * call.c (build_new_method_call): Add forward decl and make static.
18901         * cp-tree.h (build_new_method_call): Delete decl.
18902
18903         * call.c (build_object_call): Make static.
18904         * class.c (check_for_override, complete_type_p, mark_overriders):
18905         Likewise.
18906         * decl.c (cp_function_chain): Likewise.
18907         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
18908         Likewise.
18909         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
18910         Likewise.
18911         * tree.c (build_cplus_array_type_1): Likewise.
18912         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
18913         (comp_target_parms): Likewise.
18914
18915         * init.c (build_builtin_call): Make static.
18916         * cp-tree.h (build_builtin_call): Delete decl.
18917
18918         * typeck.c (binary_op_error): Delete decl.
18919         * cp-tree.h (binary_op_error): Likewise.
18920
18921 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18922
18923         * call.c (build_method_call): Compare against error_mark_node
18924         directly, rather than the ERROR_MARK tree code.
18925         * cvt.c (cp_convert): Likewise.
18926         * decl.c (print_binding_level): Likewise.
18927         (duplicate_decls): Likewise.
18928         (grokdeclarator): Likewise.
18929         (grokdeclarator): Likewise.
18930         * init.c (expand_aggr_init_1): Likewise.
18931         (decl_constant_value): Likewise.
18932         * method.c (build_opfncall): Likewise.
18933         (hack_identifier): Likewise.
18934         * typeck.c (build_modify_expr): Likewise.
18935
18936         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
18937
18938 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
18939
18940         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
18941
18942         * pt.c (coerce_template_parms): Add new error message.
18943
18944         * method.c (build_overload_value): Implement name mangling for
18945         floating-point template arguments.
18946
18947         * method.c (build_overload_int, icat, dicat): Fix mangling of template
18948         arguments whose absolute value doesn't fit in a signed word.
18949
18950 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18951
18952         * friend.c: New file; put all of the friend stuff in here.
18953         * init.c: Instead of here.
18954         * Makefile.in (CXX_OBJS): Add friend.o.
18955         (friend.o): Add dependencies.
18956         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
18957
18958 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
18959
18960         * call.c (build_scoped_method_call): Complain if the scope isn't a
18961         base.
18962
18963 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
18964
18965         * parse.y (left_curly): Don't crash on erroneous type.
18966
18967         * init.c (build_delete): Fix type of ref.
18968
18969 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
18970
18971         * search.c (get_vbase_1): Renamed from get_vbase.
18972         (get_vbase): Wrapper, now non-static.
18973         (convert_pointer_to_vbase): Now static.
18974
18975         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
18976         * init.c (build_delete): Pass one.
18977         (build_partial_cleanup_for): Use build_scoped_method_call.
18978         * decl.c (finish_function): Pass a binfo.
18979
18980 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
18981
18982         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
18983
18984         * typeck.c (build_c_cast): Lose other reference to flag.
18985
18986         * call.c (build_field_call): Don't look for [cd]tor_identifier.
18987         * decl2.c (delete_sanity): Remove meaningless use of
18988         LOOKUP_HAS_IN_CHARGE.
18989         * decl.c (finish_function): Use build_scoped_method_call instead
18990         of build_delete for running vbase dtors.
18991         * init.c (build_delete): Call overload resolution code instead of
18992         duplicating it badly.
18993
18994 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
18995
18996         * call.c (build_over_call): Call mark_used before trying to elide
18997         the call.
18998
18999         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
19000
19001 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19002
19003         * typeck.c (build_modify_expr): Always pedwarn for a cast to
19004         non-reference used as an lvalue.
19005
19006 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
19007
19008         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
19009
19010 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
19011
19012         * parse.y (handler): Fix template typo.
19013
19014 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
19015
19016         * error.c (lang_decl_name): New fn.
19017         * tree.c (lang_printable_name): Use it.
19018
19019 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
19020
19021         * g++spec.c: Include config.h so that we can catch bzero #defines
19022         from the config file.
19023
19024 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
19025
19026         * new1.cc: Include a declaration for malloc, to avoid warning, and
19027         avoid lossing on systems that require one (ones that define malloc
19028         in xm.h).
19029
19030 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
19031
19032         * decl2.c (max_tinst_depth): New variable.
19033         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
19034         option.
19035         * pt.c (max_tinst_depth): Variable moved.
19036         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
19037         as legal.
19038
19039 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
19040
19041         * decl.c (xref_basetypes): Allow a base class that depends on
19042         template parms to be incomplete.
19043
19044         * decl2.c (build_expr_from_tree): Support typeid(type).
19045         * rtti.c (get_typeid): Support templates.
19046         (expand_si_desc, expand_class_desc): Fix string length.
19047         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
19048
19049 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
19050
19051         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
19052
19053         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
19054
19055 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
19056
19057         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
19058         smashes together template and non-template decls of the same
19059         signature.
19060
19061 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
19062
19063         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
19064
19065 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19066
19067         * decl.c (duplicate_decls): Next route, pedwarn about different
19068         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
19069
19070 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19071
19072         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
19073         (struct lang_type): Delete has_default_implementation member.
19074         Increase dummy to 21.
19075         * decl.c (start_method): Delete usage.
19076
19077         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
19078         store_after_parms, start_decl_1, auto_function): Add decls.
19079         (get_arglist_len_in_bytes, declare_implicit_exception,
19080         have_exceptions_p, make_type_decl, typedecl_for_tag,
19081         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
19082         build_component_type_expr, cplus_exception_name,
19083         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
19084         * call.c (build_this): Make static.
19085         (is_complete): Likewise.
19086         (implicit_conversion): Likewise.
19087         (reference_binding): Likewise.
19088         (standard_conversion): Likewise.
19089         (strip_top_quals): Likewise.
19090         (non_reference): Likewise.
19091         (build_conv): Likewise.
19092         (user_harshness): Likewise.
19093         (rank_for_ideal): Likewise.
19094         * decl.c (start_decl_1): Delete forward decl.
19095         (push_decl_level): Make static.
19096         (resume_binding_level): Make static.
19097         (namespace_bindings_p): Make static.
19098         (declare_namespace_level): Make static.
19099         (lookup_name_real): Make static.
19100         (duplicate_decls): Make static.  Take register off NEWDECL and
19101         OLDDECL parm decls.
19102         * decl2.c (get_sentry): Make static.
19103         (temp_name_p): Delete fn.
19104         * except.c (auto_function): Delete decl.
19105         * lex.c (handle_{cp,sysv}_pragma): Make static.
19106         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
19107         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
19108         * pt.c (tsubst_expr_values): Make static.
19109         * rtti.c (combine_strings): Delete decl.
19110
19111 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
19112
19113         * pt.c (push_template_decl): Handle getting a typedef.
19114
19115         * call.c (build_new_function_call): Complain about void arg.
19116
19117 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19118
19119         * decl.c (duplicate_decls): Give pedwarn of different exceptions
19120         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
19121
19122 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
19123
19124         * except.c (expand_throw): Don't expand the cleanup tree here,
19125         since we are not going to write the rtl out.  Fixes problem with
19126         -g -O on SPARC.
19127
19128 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
19129
19130         * Make-lang.in: Add $(exeext) as necessary.
19131
19132 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
19133
19134         * parse.y (handler_seq): Must have at least one catch clause.
19135
19136 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
19137
19138         * call.c (add_builtin_candidate): Restore ?: hack.
19139
19140         * decl.c (grok_op_properties): More warnings.
19141
19142 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19143
19144         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
19145         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
19146
19147         * decl.c (duplicate_decls): Scale back to a warning, and only do
19148         'em if -pedantic.
19149
19150 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
19151
19152         * decl.c (duplicate_decls): pedwarn mismatched exception
19153         specifications.
19154
19155 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
19156
19157         * call.c (build_new_method_call): Don't display the invisible
19158         argument for controlling virtual bases.
19159
19160 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
19161
19162         * new: Add nothrow new and delete, bad_alloc and throw specifications
19163         for delete.
19164         * decl.c (init_decl_processing): Add throw specification for delete.
19165         * new.cc (nothrow): Define.
19166         * lex.c (real_yylex): Removing warning that throw and friends are
19167         keywords.
19168         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
19169         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
19170         * Make-lang.in: Add new{1,2}.{cc,o}.
19171
19172 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
19173
19174         * lex.c (cons_up_default_function): Fix return type of synth op=.
19175
19176         * init.c (emit_base_init): Add warnings for uninitialized members
19177         and bases.
19178
19179         * decl.c (xref_basetypes): Add warning for non-polymorphic type
19180         with destructor used as base type.
19181
19182         * decl.c (grok_op_properties): Add warning for op= returning void.
19183         * typeck.c (c_expand_return): Add warning for op= returning anything
19184         other than *this.
19185
19186         * class.c (finish_struct_1): Add warning for class with pointers
19187         but not copy ctor or copy op=.
19188
19189         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
19190         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
19191         (instantiate_template): If -fexternal-templates, add this
19192         instantiation to pending_templates.
19193
19194         * decl2.c (copy_assignment_arg_p): Disable old hack to support
19195         Booch components.
19196
19197 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
19198
19199         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
19200
19201 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
19202
19203         * call.c (standard_conversion): Handle getting references.  Tack
19204         on RVALUE_CONV here.  Do it for non-class types, too.
19205         (reference_binding): Pass references to standard_conversion.
19206         (implicit_conversion): Likewise.
19207         (add_builtin_candidate): Disable one ?: kludge.
19208         (convert_like): Handle RVALUE_CONVs for non-class types.
19209         (joust): Disable the other ?: kludge.
19210
19211 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19212
19213         * decl.c (init_decl_processing): Add code to build up common
19214         function types beforehand, to avoid creation then removal of
19215         things already in the hash table.
19216
19217 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
19218
19219         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
19220         the arguments.
19221
19222         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
19223         current_template_parms.
19224
19225 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
19226
19227         * search.c (lookup_field): Don't return a function, check want_type.
19228
19229 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19230
19231         * init.c (build_new): Make sure PLACEMENT has a type.
19232
19233 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
19234
19235         * init.c (build_new): Support new (nothrow).
19236
19237 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
19238
19239         * pt.c (instantiate_decl): Also do push_to_top_level before setting
19240         up DECL_INITIAL.
19241
19242         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
19243         * pt.c (tsubst): Defer instantiation of default args.
19244         * call.c (build_over_call): Until here.
19245
19246 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19247
19248         * search.c (lookup_field): Make sure we have an
19249         IDENTIFIER_CLASS_VALUE before we try to return it.
19250
19251 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19252
19253         * call.c (build_method_call): Delete unused var PARM.
19254         (build_overload_call_real): Likewise.
19255         (build_object_call): Delete unused var P.
19256         (build_new_op): Likewise.
19257         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
19258         var definitions, which are never used.
19259         (shadow_tag): Delete unused var FN.
19260         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
19261         * init.c (build_new): Delete unused var ALLOC_TEMP.
19262         * method.c (hack_identifier): Delete unused var CONTEXT.
19263         (do_build_copy_constructor): Delete unused var NAME.
19264         (synthesize_method): Delete unused var BASE.
19265         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
19266         * rtti.c (build_headof): Delete unused var VPTR.
19267         (get_typeid): Delete unused var T.
19268         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
19269         and ORIG_OP2.
19270         (build_ptrmemfunc): Delete unused vars U and NINDEX.
19271         * typeck2.c (build_functional_cast): Delete unused var BINFO.
19272
19273 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
19274
19275         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
19276         things in a type being defined.
19277         * decl.c (finish_enum): Reverse the values so that they are in
19278         the correct order.
19279
19280         * pt.c (instantiate_class_template): Don't initialize
19281         BINFO_BASETYPES until the vector is filled out.
19282         (unify): Don't abort on conflicting bindings, just fail.
19283         (instantiate_decl): Do push_tinst_level before any tsubsting.
19284
19285         * method.c (build_overload_value): Handle getting a
19286         TEMPLATE_CONST_PARM for a pointer.
19287
19288 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
19289
19290         * init.c (expand_member_init): Don't give 'not a base' error for
19291         templates.
19292
19293         * pt.c (instantiate_decl): Call import_export_decl later.
19294
19295         * pt.c (instantiate_class_template): Return a value.
19296
19297         * parse.y (extension): New rule for __extension__.
19298         (extdef, unary_expr, decl, component_decl): Use it.
19299
19300 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
19301
19302         * class.c (base_binfo): Remove unused base_has_virtual member.
19303         (finish_base_struct): Likewise.
19304         (finish_struct_1): Likewise.
19305
19306 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
19307
19308         * search.c (expand_upcast_fixups): Fix bogus code generation
19309         problem where the generated code uses the wrong index into the
19310         runtime built vtable on the stack.  Old code could clobber random
19311         stack values.
19312
19313 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
19314
19315         * init.c (perform_member_init): Make sure the partial EH cleanups
19316         live on the function_obstack.
19317
19318 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
19319
19320         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
19321         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
19322
19323 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
19324
19325         * decl.c (grokvardecl): Avoid ANSI style initialization.
19326
19327 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
19328
19329         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
19330
19331 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
19332
19333         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
19334
19335 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19336
19337         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
19338         arguments we compare against.  Start the count of I at 1, not 0,
19339         since argv[0] is still the command.
19340
19341 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
19342
19343         * lang-specs.h: Accept .cp as an C++ extension.
19344
19345 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19346
19347         * cp-tree.h (ptr_reasonably_similar): Add decl.
19348
19349 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19350
19351         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
19352         pointer.  New local SPECBITS with the parm's value.
19353         (grokdeclarator): Pass &specbits down.
19354
19355         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
19356         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
19357
19358         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
19359         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
19360
19361         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
19362         not an error_mark_node.
19363
19364 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
19365
19366         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
19367         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
19368
19369 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
19370
19371         * decl.c (grokdeclarator): When giving an anonymous struct a name,
19372         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
19373         not affected).
19374
19375         * typeck2.c (build_m_component_ref): If component is a pointer
19376         to data member, resolve the OFFSET_REF now.
19377
19378         * call.c (convert_like): Don't go into infinite recursion.
19379
19380         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
19381
19382         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
19383         * tree.c (layout_basetypes): And on the vbase ptr.
19384
19385 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
19386
19387         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
19388         CHAR_TYPE_SIZE so bool is always the same size as another type.
19389
19390         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
19391
19392 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
19393
19394         * decl2.c (grok_x_components): Remove synthesized methods from
19395         TYPE_METHODS of an anonymous union, complain about member
19396         functions.
19397         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
19398         anonymous unions.
19399         (finish_function): Just clear the DECL_RTL of our arguments.
19400
19401 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
19402
19403         * decl2.c (finish_file): Emit DWARF debugging info for static data
19404         members.
19405
19406         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
19407
19408 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
19409
19410         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
19411         IDENTIFIER_NODE.
19412
19413 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
19414
19415         * Make-lang.in (g++-cross$(exeext)): Fix typo.
19416
19417 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19418
19419         Make the g++ driver now be a standalone program, rather than one
19420         that tries to run the gcc driver after munging up the options.
19421         * Make-lang.in (g++.c, g++spec.o): New rules.
19422         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
19423         added.
19424         (g++$(exeext)): New rule, based on xgcc rule.
19425         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
19426         * g++spec.c: New file.
19427         * g++.c: Removed file.
19428
19429 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
19430
19431         * cvt.c (build_up_reference): Arrange for any temporary values
19432         that have been keep in registers until now to be put into memory.
19433
19434 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19435
19436         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
19437         that make -j3 bootstrap works better.
19438
19439 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
19440
19441         * decl.c (pushtag): Do pushdecl for anon tags.
19442
19443 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
19444
19445         * typeck.c (c_expand_return): Fix logic.
19446         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
19447
19448 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
19449
19450         * g++.c (main): Make sure arglist has a final NULL entry.  Add
19451         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
19452         stdin/stdout of the invoked program are redirected to
19453         nowheresville.
19454
19455 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
19456
19457         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
19458
19459 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
19460
19461         * init.c (resolve_offset_ref): Handle obj.vfn better.
19462         * typeck.c (build_component_ref): Set TREE_TYPE on result from
19463         build_vfn_ref.
19464
19465 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
19466
19467         * typeck.c (convert_for_assignment): Also handle anachronistic
19468         implicit conversions from (::*)() to cv void*.
19469         * cvt.c (cp_convert_to_pointer): Likewise.
19470
19471 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
19472
19473         * lex.c (handle_cp_pragma): Fix bogus warning.
19474
19475 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
19476
19477         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
19478         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
19479
19480 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
19481
19482         * class.c (finish_struct_1): Support DWARF2_DEBUG.
19483         * search.c (dfs_debug_mark): Likewise.
19484         * decl2.c (finish_vtable_vardecl): Likewise.
19485         * decl.c (pushtag, finish_enum): Likewise.
19486         * lex.c (check_newline): Use debug_* instead of calling *out
19487         functions directly.
19488
19489 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19490
19491         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
19492         on some picky hosts.
19493
19494 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
19495
19496         * class.c (finish_struct_1): A class has a non-trivial copy
19497         constructor if it has virtual functions.
19498
19499         * cvt.c (cp_convert): Always call a constructor.
19500
19501         * call.c (reference_binding): Still tack on a REF_BIND
19502         for bad conversions.
19503         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
19504
19505         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
19506         (c_expand_return): Likewise.
19507         * typeck2.c (digest_init): Likewise for { }.
19508         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
19509         * cvt.c (cp_convert): Handle failure better.
19510
19511 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19512
19513         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
19514         of GCC be path-relative.
19515
19516 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
19517
19518         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
19519         it does need choose-temp.o and pexecute.o.
19520
19521 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19522
19523         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
19524         that we still use it.
19525         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
19526
19527 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
19528
19529         * init.c (expand_default_init): Avoid calling constructors to
19530         initialize reference temps.
19531
19532         * cvt.c (convert_to_reference): Fix.
19533
19534 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
19535
19536         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
19537         (convert_to_reference): Likewise.
19538         * typeck.c (convert_for_initialization): Likewise.
19539         * init.c (expand_default_init): Likewise.
19540         (expand_aggr_init_1): Likewise.
19541         * cp-tree.h (CONV_NONCONVERTING): Lose.
19542         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
19543         * *.c: Adjust.
19544         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
19545
19546 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
19547
19548         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
19549
19550 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
19551
19552         * init.c (expand_aggr_init_1): Don't crash on non-constructor
19553         TARGET_EXPR.
19554
19555 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19556
19557         * g++.c: Include gansidecl.h.
19558         (VPROTO, PVPROTO, VA_START): Delete.
19559         (choose_temp_base_try, choose_temp_base, perror_exec,
19560         run_dos) [__MSDOS__]: Delete fns.
19561         (pfatal_with_name): Delete fn.
19562         (temp_filename): Declare like in gcc.c.
19563         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
19564         (error_count, signal_count): Define.
19565         (error): Delete both definitions.
19566         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
19567         (pfatal_pexecute): Add fn from gcc.c.
19568         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
19569         code to use the pexecute stuff also used by gcc.c.
19570         (MIN_FATAL_STATUS): Define.
19571         * Make-lang.in (g++): Add dependency on and linking with
19572         choose-temp.o and pexecute.o.
19573
19574         * cp-tree.h: Include gansidecl.h.
19575         (STDIO_PROTO): Delete #undef/#define.
19576         * cvt.c (NULL): Delete #undef/#define.
19577         * expr.c (NULL): Likewise.
19578         * init.c (NULL): Likewise.
19579         * rtti.c (NULL): Likewise.
19580         * xref.c (NULL): Likewise.
19581
19582         * cp-tree.h (build_user_type_conversion): Add prototype.
19583         * call.c (build_user_type_conversion): Delete prototype.  Correct
19584         decl of FLAGS arg to be an int.
19585         * cvt.c (build_user_type_conversion): Likewise.
19586
19587 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
19588
19589         * cp-tree.def: Add TRY_BLOCK and HANDLER.
19590         * except.c (expand_start_catch_block): Support templates.
19591         * parse.y (try_block, handler_seq): Likewise.
19592         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
19593
19594 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
19595
19596         * pt.c (current_template_args): New fn.
19597         (push_template_decl): Use it.
19598         * decl.c (grokdeclarator): Use it.
19599
19600         * decl2.c (build_expr_from_tree): Dereference ref vars.
19601
19602         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
19603         the decl-specifier-seq.
19604
19605         * decl.c (grok_op_properties): Don't force the type of a conversion
19606         op to be complete.  Don't warn about converting to the same type
19607         for template instantiations.
19608
19609         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
19610         methods.
19611
19612 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
19613
19614         * typeck.c (get_delta_difference): Remove previous bogusness.
19615         Don't give errors if force is set.
19616
19617 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
19618
19619         * decl2.c (finish_file): Don't emit debug info.
19620         * decl.c (pushdecl): Lose obsolete code.
19621         (grokdeclarator): Still do the long long thing after complaining.
19622         * search.c (note_debug_info_needed): Don't do anything if we're in a
19623         template.
19624         * method.c (synthesize_method): For non-local classes,
19625         push_to_top_level first.
19626
19627 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
19628
19629         * typeck.c (get_delta_difference): Add no_error parameter.
19630         (build_ptrmemfunc): Call get_delta_difference with no_error set;
19631         we don't want error messages when converting unrelated
19632         pointer-to-member functions.
19633
19634 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
19635
19636         * error.c (dump_expr): Improve the wording on error messages that
19637         involve pointer to member functions.
19638
19639 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
19640
19641         * cvt.c (cp_convert_to_pointer): Move code for conversions from
19642         (::*)() to void* or (*)() up a bit, so that we can convert from
19643         METHOD_TYPEs as well.
19644
19645 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
19646
19647         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
19648         There are no 'member' types.
19649         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
19650         (build_x_typeid): Handle errors.
19651
19652 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
19653
19654         * typeck.c (convert_for_assignment): Handle anachronistic implicit
19655         conversions from (::*)() to void* or (*)().
19656         * cvt.c (cp_convert_to_pointer): Likewise.
19657         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
19658         conversions from here.
19659         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
19660         * lang-options.h: Likewise.
19661         * decl2.c (warn_pmf2ptr): Define.
19662         * cp-tree.h: Declare it.
19663         * typeck2.c (digest_init): Allow pmfs down into
19664         convert_for_initialization.
19665
19666 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
19667
19668         * typeck.c (c_expand_return): Fix for returning overloaded fn.
19669
19670 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
19671
19672         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
19673         * decl.c (grok_reference_init): Pass DIRECT_BIND.
19674         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
19675         DIRECT_BIND.
19676         * call.c (convert_like): Don't pass INDIRECT_BIND.
19677         * typeck.c (convert_arguments): Likewise.
19678         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
19679
19680 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
19681
19682         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
19683         similar code in build_up_ref.
19684         * cvt.c (build_up_reference): Drastically simplify.
19685
19686 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
19687
19688         * typeck.c (signed_or_unsigned_type): If the given type already
19689         as the correct signedness, then just return it.
19690
19691         * typeck.c ({un,}signed_type): If can't do anything, call
19692         signed_or_unsigned_type.
19693
19694 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
19695
19696         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
19697         current_class_type is NULL.
19698
19699 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
19700
19701         * class.c (finish_struct_1): Avoid empty structs by adding a field
19702         so layout_type gets the mode right.
19703
19704         * typeck.c (c_expand_return): Drastically simplify.
19705
19706 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
19707
19708         * typeck.c (decay_conversion): Handle overloaded methods.
19709
19710 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
19711
19712         * call.c (build_over_call): A TARGET_EXPR has side-effects.
19713
19714 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
19715
19716         * cvt.c (convert_to_pointer_force): Add code to support pointer to
19717         member function to pointer to function conversions.
19718         * init.c (resolve_offset_ref): Add code to allow faked up objects,
19719         ignoring them if they are not used, and giving an error, if they
19720         are needed.
19721         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
19722         code, and so that we can give an error, if we needed an object,
19723         and one was not provided.
19724         (build_c_cast): Don't call default_conversion when we want to
19725         convert to pointer to function from a METHOD_TYPE.
19726
19727 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
19728
19729         * Make-lang.in (cplib2.ready): Fix logic.
19730
19731         * decl.c (shadow_tag): Only complain about non-artificial function
19732         members.
19733
19734         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
19735
19736 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
19737
19738         * expr.c (cplus_expand_expr): Pre-tweak call_target like
19739         expand_inline_function would.
19740
19741         * pt.c (mark_decl_instantiated): If extern_p, call
19742         mark_inline_for_output.
19743
19744 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
19745
19746         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
19747         pmd conversions.
19748
19749         * typeck.c (get_delta_difference): Fix wording, as we can be used
19750         for pointer to data members.
19751
19752 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
19753
19754         * pt.c (tsubst): If the function decl isn't a member of this
19755         template, return a copy of the decl (including copying the
19756         lang-specific part) so we don't hose ourselves later.
19757
19758 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
19759
19760         * class.c (finish_struct): Remove DWARF-specific tag handling.
19761         * decl.c (pushtag): Likewise.
19762         (finish_function): Always clear DECL_ARGUMENTS on function decls with
19763         no saved RTX.
19764         * decl2.c (finish_file): Emit DWARF debugging info for static data
19765         members.
19766
19767 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
19768
19769         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
19770         isn't the same as the new one before we whack it.
19771
19772 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
19773
19774         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
19775         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
19776         warn_traditional and warn_strict_prototypes; remove ancient
19777         'overload' code; remove references to flag_traditional.
19778
19779 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
19780
19781         * input.c (sub_getch): Handle 8-bit characters in string literals.
19782
19783 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
19784
19785         * tree.c (mapcar): Handle CONSTRUCTORs.
19786         (copy_to_permanent): Handle expression_obstack properly.
19787
19788         * Make-lang.in (cplib2.txt): Also depend on the headers.
19789
19790         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
19791         INT_TYPE_SIZE.
19792         (expand_class_desc): Use USItype for offset field.
19793         * tinfo.h (struct __class_type_info): Likewise.
19794
19795         * method.c (build_overload_int): TYPE_PRECISION should be applied
19796         to types.
19797
19798 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
19799
19800         * call.c (build_new_op): A COND_EXPR involving void must be a
19801         builtin.
19802
19803 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19804
19805         * typeck.c (build_x_component_ref): New fn.
19806         (build_object_ref): Use it.
19807         * parse.y (primary): Use it.
19808         * decl2.c (build_expr_from_tree): Use it.
19809         * cp-tree.h: Declare it.
19810
19811         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
19812         * error.c (dump_type_suffix): Handle variable arrays.
19813
19814 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19815
19816         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
19817
19818 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
19819
19820         * decl.c (lookup_name_real): Don't try to look up anything in a
19821         TYPENAME_TYPE.
19822
19823         * tinfo2.cc (__throw_type_match_rtti): Oops.
19824
19825 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19826
19827         * Make-lang.in (exception.o): Use -fno-PIC for now.
19828
19829 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
19830
19831         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
19832         calling them.
19833         (get_tinfo_fn_dynamic): Extracted from build_typeid.
19834         * tinfo2.cc (__dynamic_cast): Adjust.
19835
19836         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
19837         (build_x_typeid): Likewise.
19838
19839         * parse.y: Call build_x_typeid instead of build_typeid.
19840         * cp-tree.def: Add TYPEID_EXPR.
19841         * pt.c (tsubst_copy): Handle typeid.
19842         * decl2.c (build_expr_from_tree): Likewise.
19843         * rtti.c (build_x_typeid): Throw bad_typeid from here.
19844         (build_typeid): Not here.
19845         * cp-tree.h: Declare build_x_typeid.
19846
19847 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
19848
19849         * call.c (convert_like): Pull out constant values.
19850
19851         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
19852
19853 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
19854
19855         * decl.c (init_decl_processing): Create short int types before
19856         creating size_t in case a machine description needs to use
19857         unsigned short for size_t.
19858
19859 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
19860
19861         * Make-lang.in (exception.o): Turn off pic.
19862
19863         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
19864         type, multi-level ptr conversions.
19865
19866         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
19867         (throw_bad_cast): Use it.
19868         (throw_bad_typeid): New fn.
19869         (build_typeid): Throw bad_typeid as needed.
19870         Use build_call.
19871         (synthesize_tinfo_fn): Handle functions and arrays before checking
19872         for cv-quals.
19873
19874         * Remove .h from standard C++ headers, add new.h, move into inc
19875         subdirectory.
19876
19877         * exception*: Remove pointer from object, constructors.  Add
19878         default exception::what that uses type_info::name.  Add
19879         __throw_bad_typeid.
19880
19881         * init.c (build_new): Don't add a cookie to new (void *) T[2].
19882
19883 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
19884
19885         * Make-lang.in: Building C++ code depends on cc1plus.
19886
19887 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19888
19889         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
19890         a HOST_WIDE_INT, not a tree.
19891
19892 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
19893
19894         * exception.cc: Don't include <stdlib.h>.
19895
19896         * Make-lang.in (c++.clean): Remove cplib2.*.
19897
19898 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
19899
19900         * parse.y (component_decl_1, component_costructor_declarator case):
19901         Pass attributes/prefix_attributes in tree list.
19902
19903 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
19904
19905         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
19906
19907 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
19908
19909         * lex.c (do_identifier): Don't do deferred lookup in a template
19910         header.
19911
19912         * typeck2.c (store_init_value): Oops.
19913
19914         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
19915         New files for C++ lang-support library.
19916         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
19917         (CXX_LIB2FUNCS): Define.
19918         And rules for building the C++ lang-support code.
19919         * config-lang.in (headers): Define.
19920         (lib2funcs): Define.
19921
19922 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
19923
19924         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
19925         digest_init.
19926         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
19927         * typeck2.c (store_init_value): Check for initializing pmf with { }
19928         here.
19929         (process_init_constructor): Not here.
19930
19931 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
19932
19933         * pt.c (begin_template_parm_list): Increment
19934         processing_template_decl here.
19935         (end_template_parm_list): Not here.
19936         (process_template_parm): No need to add 1 to it now.
19937         * *.c: Use processing_template_decl instead of current_template_parms
19938         to check for being in a template.
19939
19940         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
19941         (tsubst_copy): Handle CONSTRUCTOR.
19942         (instantiate_decl): Set up context properly for variables.
19943         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
19944         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
19945
19946 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19947
19948         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
19949
19950 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
19951
19952         * method.c (make_thunk): Call comdat_linkage before setting the
19953         TREE_CODE.
19954
19955         * decl2.c (comdat_linkage): Use make_decl_one_only.
19956         (import_export_decl): Likewise.
19957         * decl.c (init_decl_processing): Check supports_one_only instead of
19958         SUPPORTS_WEAK.
19959
19960 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
19961
19962         * decl2.c (grokfield): Tighten checking for access decls.
19963
19964         * decl.c (make_typename_type): Resolve references to
19965         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
19966         (lookup_name_real): Types that depend on a template parameter get
19967         an implicit 'typename' unless they're in the current scope.
19968         (start_decl_1): We don't care about incomplete types that depend
19969         on a template parm.
19970         (grokdeclarator): Resolve 'typename's in the type specifier that
19971         refer to members of the current scope.
19972
19973         * call.c (build_over_call): Remove 'inline called before
19974         definition' diagnostic.
19975         (build_method_call): Likewise.
19976         * decl.c (duplicate_decls): Downgrade 'used before declared
19977         inline' to a warning, only with -Winline.
19978
19979 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
19980
19981         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
19982
19983 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
19984
19985         * call.c (build_method_call): When calling a signature
19986         default implementation, as in other cases, let instance_ptr simply
19987         be instance.
19988
19989 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
19990
19991         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
19992
19993 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
19994
19995         * except.c (expand_start_catch_block): Add a pushlevel so that -g
19996         works on hppa and SPARC.
19997
19998 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19999
20000         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
20001
20002 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
20003
20004         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
20005         before testing whether it's a signature.
20006
20007 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
20008
20009         * call.c (build_new_method_call): Don't complain about signature
20010         pointers and references not being an aggr type.
20011         (build_this): If a signature pointer or reference was passed in,
20012         just return it.
20013         (build_new_method_call): If instance is a signature pointer, set
20014         basetype to the signature type of instance.
20015         * sig.c (build_signature_method_call): Deleted basetype and
20016         instance parameters, they can be found as the DECL_CONTEXT of
20017         function and as the first argument passed in.
20018         * cp-tree.h: Changed declaration of build_signature_method_call.
20019         * call.c (build_method_call): Deleted first two arguments in call
20020         of build_signature_method_call.
20021         (build_over_call): Added call to build_signature_method_call.
20022
20023 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
20024
20025         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
20026         target_expr.
20027
20028 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20029
20030         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
20031
20032 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
20033
20034         * except.c (expand_start_try_stmts): Move to except.c in the backend.
20035         (expand_end_try_stmts): Remove.
20036
20037         * init.c (perform_member_init): Use add_partial_entry () instead
20038         of directly manipulating lists.
20039         (emit_base_init): Likewise.
20040
20041 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
20042
20043         * except.c (expand_exception_blocks): Always make sure USE and
20044         CLOBBER insns that came at the end still do, the backend relies
20045         upon this.
20046
20047 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
20048
20049         * call.c (build_over_call): We can only use a TARGET_EXPR of the
20050         right type.
20051
20052 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
20053
20054         * cvt.c (convert_to_reference): Revert last change, don't complain
20055         about temp without target decl.
20056
20057 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
20058
20059         * decl.c (grokdeclarator): Don't core dump when void() is given.
20060
20061 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
20062
20063         * decl.c (copy_args_p): Don't crash.
20064
20065 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
20066
20067         * pt.c (tsubst): And support template args inside the exception
20068         specification.
20069
20070         * pt.c (tsubst): Add support for exception specifications in
20071         template functions.
20072
20073 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
20074
20075         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
20076         fields now.
20077         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
20078         (start_function): Likewise.
20079         (start_method): Likewise.
20080         (grokfield): Likewise.
20081         (make_call_declarator): Add throw spec parameter.
20082         (set_quals_and_spec): Add routine.
20083         * lex.c (set_quals_and_spec): Likewise.
20084         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
20085         * decl.c (shadow_tag): Eliminate the throw spec parameter to
20086         grokdeclarator.
20087         (groktypename): Likewise.
20088         (start_decl): Eliminate the throw spec parameter.  Eliminate the
20089         throw spec parameter to grokdeclarator.  Eliminate the throw spec
20090         field in DECL_STMT.
20091         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
20092         (grokfndecl): Remove useless set of raises.
20093         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
20094         the throw spec parameter to start_decl.  Pull the throw spec out
20095         of the call declarator.
20096         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
20097         (start_function): Eliminate the throw spec parameter.  Eliminate
20098         the throw spec parameter to grokdeclarator.
20099         (start_method): Likewise.
20100         * decl2.c (grokfield): Likewise.
20101         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
20102         (grokoptypename): Likewise.
20103         (finish_file): Eliminate the throw spec parameter to
20104         start_function.  Add throw spec to make_call_declarator.
20105         * except.c (init_exception_processing): Add throw spec to
20106         make_call_declarator.  Eliminate the throw spec parameter to
20107         start_decl.
20108         (expand_start_catch_block): Eliminate the throw spec parameter to
20109         grokdeclarator.
20110         (expand_builtin_throw): Add throw spec to make_call_declarator.
20111         Eliminate the throw spec parameter to start_function.
20112         (start_anon_func): Likewise.
20113         * lex.c (make_call_declarator): Add throw spec parameter.
20114         (set_quals_and_spec): New routine.
20115         (cons_up_default_function): Add throw spec to make_call_declarator.
20116         Eliminate the throw spec parameter to grokfield.
20117         * method.c (synthesize_method): Eliminate the throw spec parameter
20118         to start_function.
20119         * pt.c (process_template_parm): Eliminate the throw spec parameter
20120         to grokdeclarator.
20121         (tsubst): Add throw spec to make_call_declarator.
20122         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
20123         (do_function_instantiation): Eliminate the throw spec parameter to
20124         grokdeclarator.  Eliminate the throw spec parameter to
20125         start_function.
20126         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
20127         to start_function.
20128         * parse.y (datadef): Remove non-winning optimization.
20129         (decl): Likewise.
20130         (fndef): Remove ambiguous error productions uncovered by grammar
20131         fixing.
20132         (constructor_declarator): Add exception_specification_opt here.
20133         (component_constructor_declarator): Likewise.
20134         (direct_after_type_declarator): Likewise.
20135         (complex_direct_notype_declarator): Likewise.
20136         (direct_abstract_declarator): Likewise.
20137         (fn.def1): Remove exception_specification_opt.
20138         (fn.def2): Likewise.
20139         (condition): Likewise.
20140         (initdcl0): Likewise.
20141         (initdcl): Likewise.
20142         (notype_initdcl0): Likewise.
20143         (nomods_initdcl0): Likewise.
20144         (component_decl_1): Likewise.
20145         (component_declarator): Likewise.
20146         (after_type_component_declarator0): Likewise.
20147         (after_type_component_declarator): Likewise.
20148         (notype_component_declarator): Likewise.
20149
20150 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20151
20152         * call.c (build_over_call): Also use an INIT_EXPR when
20153         initializing anything from an rvalue.
20154
20155         * call.c (build_over_call): Call stabilize_reference when building
20156         an INIT_EXPR instead of calling the copy ctor.
20157
20158         * call.c (joust): Extend the previous change to all comparisons.
20159
20160         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
20161         NO_LINKAGE_HEURISTICS.
20162
20163         * decl2.c (finish_file): Emit any statics that weren't already.
20164
20165         * typeck.c (build_static_cast): Implement.
20166         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
20167         * decl.c (grokparms): Use can_convert_arg instead of
20168         implicit_conversion directly.
20169         (copy_args_p): New fn.
20170         * cvt.c (convert_to_reference): Don't complain about temp with
20171         static_cast.
20172         (build_up_reference): Handle TARGET_EXPRs.
20173         * call.c (build_over_call): Elide unnecessary temps.
20174         (can_convert*): Use new overloading code.
20175
20176 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
20177
20178         * call.c: Move TYPE_PTR*_MACROS ...
20179         * cp-tree.h: To here.
20180         * typeck.c (build_reinterpret_cast): Implement.
20181
20182         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
20183         ptr_complete_ob.
20184         (joust): If we're comparing a function to a builtin and the worst
20185         conversion for the builtin is worse than the worst conversion for the
20186         function, take the function.
20187
20188         * typeck.c (build_const_cast): Implement.
20189         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
20190         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
20191
20192 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
20193
20194         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
20195         too early.  Make sure we explode if exprtype turns out to be a
20196         NULL_TREE when it shouldn't be.
20197
20198 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
20199
20200         * cp-tree.h: New routine make_call_declarator.
20201         * lex.c (make_call_declarator): Define it.
20202         * except.c (init_exception_processing): Use it.
20203         (expand_builtin_throw): Likewise.
20204         (start_anon_func): Likewise.
20205         * decl2.c (finish_file): Likewise.
20206         * lex.c (cons_up_default_function): Likewise.
20207         * parse.y: Likewise.
20208         * pt.c (tsubst): Likewise.
20209
20210 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
20211
20212         * decl2.c (groktypefield): Remove unused code.
20213
20214 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
20215
20216         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
20217         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
20218         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
20219         nonempty_cv_qualifiers.
20220         * hash.h: Rebuild.
20221
20222         * lex.c (make_pointer_declarator): Change type_quals into
20223         cv_qualifiers.
20224         (make_reference_declarator): Likewise.
20225
20226 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
20227
20228         * decl.c (start_function): Only check interface_* for templates
20229         with flag_alt_external_templates.
20230
20231         * call.c (build_new_op): Check for comparison of different enum types.
20232         (build_over_call): Fix arg # output.
20233
20234         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
20235
20236 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
20237
20238         * call.c (build_new_op): Check for erroneous args.
20239
20240         * call.c (build_new_method_call): Add missing args to cp_error.
20241
20242         * tree.c (error_type): Don't print reference-to-array.
20243
20244         * typeck.c (convert_for_assignment): Don't say contravariance for
20245         removing const.
20246
20247 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
20248
20249         * call.c (build_over_call): Diagnose bad convs for `this'.
20250
20251         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
20252         on _ctor_arg.
20253
20254         * call.c (convert_like): Handle bad convs.
20255         (build_over_call): Handle bad convs better.
20256
20257         * decl2.c: -fansi-overloading is now the default.
20258
20259         * call.c (build_new_method_call): Check for erroneous args.
20260
20261         * pt.c (instantiate_class_template): Propagate
20262         TYPE_USES_MULTIPLE_INHERITANCE.
20263
20264 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
20265
20266         * call.c (enforce_access): Add static to routine.
20267
20268 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
20269
20270         * call.c (build_user_type_conversion_1): Fix bad handling.
20271         (compare_ics): Likewise.
20272
20273 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
20274
20275         * call.c (standard_conversion): Oops.
20276
20277 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
20278
20279         * g++.c: Update test for win32 (&& ! cygwin32).
20280
20281 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
20282
20283         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
20284         (ptr_reasonably_similar): New fn.
20285         * call.c (BAD_RANK): New rank.
20286         (ICS_BAD_FLAG): New macro.
20287         (standard_conversion): Handle almost-right pointer conversions.
20288         (reference_binding): Handle bad rvalue bindings.
20289         (add_*_candidate): Stuff.
20290         (build_over_call): Pass bad conversions to convert_for_initialization.
20291         (compare_ics): Handle bad convs.
20292         (joust): Likewise.
20293
20294 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
20295
20296         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
20297         integer_type_node when computing pointer offsets.
20298
20299 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
20300
20301         * tree.c (lvalue_type): New fn.
20302         (error_type): New fn.
20303         * call.c (op_error): Use error_type.
20304         (add_conv_candidate): Use lvalue_type.
20305         (add_builtin_candidates): Likewise.
20306         * error.c (args_as_string): Use error_type.
20307
20308 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
20309
20310         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
20311         (tsubst): Not here.
20312
20313         * decl.c (init_decl_processing): With -ansi, __null's type is the
20314         signed integral type with the same number of bits as a pointer.
20315         Introduce a new variable null_node for it.
20316         * cp-tree.h: Adjust.
20317         * call.c (null_ptr_cst_p): Adjust.
20318
20319 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
20320
20321         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
20322         optimize.
20323
20324 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
20325
20326         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
20327         fns of classes without virtual functions.
20328
20329         * call.c (add_function_candidate): Handle `this' specially.
20330         (compare_ics): Likewise.
20331
20332 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
20333
20334         * typeck.c (build_conditional_expr): Fix handling of __null.
20335
20336         * decl2.c (comdat_linkage): New fn.
20337         (import_export_vtable): Use it.
20338         (import_export_decl): Use it.
20339         * method.c (make_thunk): Use it.
20340
20341 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
20342
20343         * pt.c (end_template_decl): If we don't actually have parms, return.
20344         * parse.y (template_header): Accept 'template <>'.
20345
20346         * errfn.c: Allow 5 args.
20347
20348 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
20349
20350         * tree.c (make_temp_vec): New fn.
20351         * pt.c (push_template_decl): Handle partial specs.
20352         (instantiate_class_template): Likewise.
20353         (more_specialized): Use get_bindings.
20354         (more_specialized_class): New fn.
20355         (get_class_bindings): New fn.
20356         (most_specialized_class): New fn.
20357         (do_function_instantiation): List candidates for ambiguous case.
20358         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
20359         (shadow_tag): Call push_template_decl for partial specializations.
20360         * parse.y: Likewise.
20361         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
20362         DECL_TEMPLATE_MEMBERS.
20363         * call.c (print_z_candidates): Reduce duplication.
20364
20365 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
20366
20367         * decl2.c (lang_decode_option): Allow -fansi-overloading.
20368
20369 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
20370
20371         * pt.c (get_bindings): New fn.
20372         (most_specialized): Likewise.
20373         (do_function_instantiation): Use them.
20374         (add_maybe_template): New fn.
20375         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
20376         * call.c (build_new_op): Handle guiding decls.
20377         (build_new_function_call): Likewise.
20378         * decl2.c (finish_file): Likewise.
20379
20380         * decl2.c (mark_used): Do synthesis here.
20381         * call.c (build_method_call): Not here.
20382         (build_over_call): Or here.
20383         * typeck.c (build_function_call_real): Or here.
20384         * tree.c (bot_manip): Call mark_used on functions used in default
20385         args.
20386
20387 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
20388
20389         * decl2.c (import_export_vtable): Delete code that disabled vtable
20390         heuristic on systems with ASM_OUTPUT_EXTERNAL.
20391
20392 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
20393
20394         * typeck.c (build_x_function_call): Handle static call context
20395         better.
20396
20397         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
20398         the function, not its outer block.
20399
20400         * call.c (build_field_call): Pass fields on to build_opfncall
20401         regardless of TYPE_OVERLOADS_CALL_EXPR.
20402         (build_method_call): Pass on to build_new_method_call sooner.
20403
20404         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
20405         gives us.
20406         * class.c (instantiate_type): Don't put a POINTER_TYPE to
20407         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
20408         modifying it.
20409
20410 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
20411
20412         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
20413         (add_builtin_candidate): Don't take enums for ++.
20414         (build_new_method_call): Handle non-aggregates and field calls.
20415         Move new overloading code from...
20416         * cvt.c: Here.
20417
20418         * decl.c (grokparms): Don't check default args in templates.
20419
20420 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
20421
20422         * cvt.c (build_new_op): Fix args to build_unary_op.
20423         (add_builtin_candidates): Don't call type_promotes_to on float.
20424
20425         * decl.c (grokparms): Check the type of the default arg.
20426
20427         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
20428         returning NULL_TREE.
20429
20430         * typeck.c (build_x_binary_op): Avoid doing extra work.
20431         (build_x_unary_op): Likewise.
20432         (build_x_conditional_expr): Likewise.
20433         * cvt.c (build_over_call): Return.
20434         (add_builtin_candidate): Fix MEMBER_REF.
20435         (build_new_op): Likewise.
20436
20437 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
20438
20439         * method.c (build_overload_name): Put bug fix into code but leave
20440         disabled for now so we can be bug compatible with older releases
20441         that do repeats incorrectly.  In the future, we can enable it.
20442
20443 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
20444
20445         * cvt.c (convert_like): Don't call build_cplus_new twice.
20446
20447         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
20448         Control new overloading code with -fansi-overloading.
20449
20450 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
20451
20452         * cvt.c (build_over_call): Call build_cplus_new.
20453         * call.c (build_method_call): Likewise.
20454         * typeck.c (build_function_call_real): Likewise.
20455         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
20456         the COND_EXPR in a TARGET_EXPR so they use the same slot.
20457
20458         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
20459         recursive calls.
20460         * typeck.c (complete_type): Propagate
20461         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
20462
20463 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
20464
20465         * cvt.c (joust): More ?: kludging.  Sigh.
20466         (build_over_call): Don't try to synthesize global fns.
20467
20468         * search.c (lookup_conversions): Use binfo marking.
20469
20470 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
20471
20472         * search.c (build_mi_matrix): Use the correct value of cid
20473         when determining the new mi_size.
20474
20475 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
20476
20477         * cvt.c (add_builtin_candidates): Do consider type conversion ops
20478         for the first parms of += et al.
20479         (strip_top_quals): New fn.
20480         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
20481         (implicit_conversion): Likewise.
20482         (add_builtin_candidates): Be careful about arrays.
20483         (build_new_method_call): Handle vtable optimization.
20484
20485 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
20486
20487         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
20488         * cvt.c (reference_binding): Use it.
20489         (implicit_conversion): Use it.
20490         (add_builtin_candidate, COND_EXPR): Use it.
20491
20492         * cvt.c (build_new_function_call): Check for error args.
20493
20494         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
20495
20496         * gxx.gperf: Add __null.
20497         * hash.h: Regenerate.
20498         * lex.h: Add RID_NULL.
20499         * lex.c (init_lex): Create null_pointer_node here, stick it in
20500         RID_NULL.
20501         * decl.c (init_decl_processing): Still set its type here.
20502         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
20503         (convert_to_pointer_force): Likewise.
20504         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
20505         if (! pedantic).
20506         * call.c (convert_harshness): Use null_ptr_cst_p.
20507         * typeck.c (convert_for_assignment): Likewise.  Don't produce
20508         null_pointer_node.
20509
20510         * error.c (args_as_string): Handle lists of actual args, too.
20511         * cvt.c (null_ptr_cst): Support (void*)0 for now.
20512         (build_user_type_conversion_1): Improve diagnostics.
20513         (build_new_function_call): Likewise.
20514         (build_object_call): Likewise.
20515         (build_new_method_call): Likewise.  Move call before def diagnostic...
20516         (build_over_call): Here.
20517
20518         * cvt.c (build_new_method_call): Don't complain about no match if
20519         LOOKUP_SPECULATIVELY.
20520         (build_over_call): Fix 'this' for virtual fn.
20521         (build_new_method_call): Add diagnostic.
20522
20523 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20524
20525         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
20526         constructors to be passed in.
20527         (build_over_call): Likewise.
20528         (build_user_type_conversion_1): Pass them in.
20529         (convert_like): Likewise.
20530         (build_object_call): Handle overloaded conversions.
20531         (build_over_call): Pass the right args to build_vfn_ref.
20532         (standard_conversion): Fix pmf convs.
20533         (joust): Handle comparing statics and non-statics.
20534         (build_new_method_call): New fn.
20535         * call.c (build_method_call): Call it if NEW_OVER.
20536
20537 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
20538
20539         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
20540         %D instead.
20541
20542 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
20543
20544         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
20545         instead of just maybe_build_cleanup so that we deallocate the
20546         thrown object.
20547
20548 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20549
20550         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
20551         * cp-tree.h (finish_prevtable_vardecl): Add decl.
20552
20553 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
20554
20555         * pt.c (instantiate_class_template): Call complete_type.  Also, if
20556         we're at the end of the file and we just instantiated a template
20557         class with a vtable, call finish_prevtable_vardecl.
20558
20559         * error.c (dump_decl): Don't explode (or explode more gracefully
20560         as appropriate) if the object being dumped has a null type.
20561         (dump_expr): Likewise.
20562
20563         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
20564         by counting the number of nodes that we'll need before allocating
20565         the array.
20566         (lookup_fnfields): Fix comment.
20567         (breadth_first_search): Fix comment.
20568
20569 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
20570
20571         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
20572         TYPE_ALIGN.
20573         * class.c (finish_struct): Call cplus_decl_attributes here.
20574         (finish_struct_1): Not here.
20575         * cp-tree.h: Adjust.
20576
20577         * pt.c (type_unification): New parameter STRICT.
20578         (unify): If STRICT, don't allow cv addition or base deduction.
20579         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
20580
20581 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
20582
20583         * search.c (get_template_base{_recursive}): New fns.
20584         * pt.c (more_specialized): New fn.
20585         (do_function_instantiation): Use it.
20586         (unify): Handle base deduction.
20587         * cvt.c (joust): Use more_specialized.
20588         Don't arbitrarily choose between non-builtin candidates.
20589         (build_over_call): Call require_complete_type.
20590
20591         * decl.c (start_function): Statics are static even in a #pragma
20592         interface file.
20593
20594         * decl2.c (import_export_vtable): Disable vtable heuristic on
20595         systems with ASM_OUTPUT_EXTERNAL.
20596
20597         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
20598         (standard_conversion): No std conv to enum type.
20599
20600         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
20601         for ptm's.
20602
20603         * cvt.c (reference_binding): Bind directly to a base subobject of
20604         a class rvalue.
20605
20606         * cvt.c (build_new_op): Enforce access control.
20607
20608 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
20609
20610         * typeck2.c (process_init_constructor): When scanning the
20611         union for a named field, skip things that aren't FIELD_DECLs.
20612
20613         * method.c (synthesize_method): Don't scan fndecl's rtl if
20614         we're at the end of the file; just assume the function can't
20615         be inlined.
20616
20617 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20618
20619         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
20620         it failed.
20621
20622         * cvt.c (build_user_type_conversion_1): Handle overloaded
20623         conversion ops.
20624
20625         * cvt.c (add_builtin_candidates): Don't consider type conversion
20626         operators for the first parameter of operator=.
20627
20628 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
20629
20630         * typeck.c (complete_type): Only call layout_type if we're not
20631         expanding a template.
20632
20633 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
20634
20635         * cvt.c (compare_ics): Oops.
20636
20637         * cvt.c (op_error): Oops.
20638
20639         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
20640         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
20641         (build_conv): Use them.
20642         (implicit_conversion): Use them.
20643         (convert_like): Handle them.
20644         (build_new_op): Handle builtin COND_EXPR again.
20645         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
20646         in lists of types for COND_EXPR.
20647         (add_builtin_candidate): Add enum candidates for COND_EXPR.
20648
20649 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
20650
20651         * typeck.c (build_modify_expr): Always attempt to build a call to
20652         the assignment operator, even if we're using a default one.
20653         (convert_for_initialization): Call complete_type.
20654
20655 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
20656
20657         * cvt.c (reference_binding): A REF_BIND gets the reference type.
20658         (implicit_conversion): Likewise.
20659         (convert_like): Likewise.
20660         (compare_ics): Likewise.
20661         (compare_qual): Likewise.
20662         (print_z_candidates): Handle no candidates.
20663         (build_new_op): Don't handle builtin COND_EXPR for now.
20664
20665 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
20666
20667         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
20668
20669 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
20670
20671         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
20672
20673         * cvt.c (build_builtin_candidate): Oops.
20674         (build_new_op): Oops.
20675
20676         * method.c (build_opfncall): Pass COND_EXPR on.
20677         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
20678         (add_builtin_candidate{,s}): Likewise.
20679         (add_builtin_candidates): Likewise.
20680         (print_z_candidates, op_error, build_new_op): Likewise.
20681         (type_decays_to): New fn.
20682         * lex.c (init_lex): Just say ?: for COND_EXPR.
20683
20684 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20685
20686         * typeck.c (complete_type): Call layout_type rather than building
20687         a new array type.
20688
20689         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
20690         only use ptrdiff_t.
20691
20692 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
20693
20694         * cvt.c: Always compile the new overloading code (but don't use it).
20695         (implicit_conversion): Add a BASE_CONV when converting to
20696         the same class type.
20697         (convert_like): Handle BASE_CONV.
20698
20699 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20700
20701         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
20702         (add_builtin_candidate): Likewise.
20703
20704         NEW_OVER changes:
20705         * typeck.c (build_x_function_call): Try an operator function
20706         whenever we call an object of class type.
20707         * method.c (build_opfncall): Pass CALL_EXPRs through.
20708         * cvt.c (implicit_conversion): Do const-ref case first.
20709         (add_conv_candidate, build_object_call, op_error): New fns.
20710         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
20711         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
20712         builtin candidates.
20713         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
20714         Fall back on preincrement handling.  Use op_error.
20715         Handle warn_synth.
20716         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
20717         an error_mark_node.
20718         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
20719         properly.
20720
20721 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
20722
20723         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
20724
20725 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
20726
20727         * typeck.c (build_component_ref_1): Use build_component_ref
20728         instead of open coding it here.
20729
20730 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
20731
20732         * g++.c (main): Don't link with -lg++.
20733
20734         NEW_OVER changes:
20735         * cvt.c (convert_to_reference): Don't use convert_from_reference on
20736         result of build_type_conversion.
20737         (cp_convert): Only call build_method_call for ctors if
20738         build_type_conversion failed.
20739         (ptr_complete_ob): New function.
20740         (TYPE_PTR{,OB,MEM}_P): New macros.
20741         ({add,build}_builtin_candidate{,s}): New functions.
20742         (print_z_candidates): Handle builtins.
20743         (build_user_type_conversion_1): Don't use conversion fns for
20744         converting to a base type.
20745         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
20746         (build_user_type_conversion): Use convert_from_reference.
20747         (build_new_op): New function.
20748         (build_over_call): Fix handling of methods.
20749         (compare_ics): Handle AMBIG_CONV properly.
20750         * typeck2.c: Increment abort count.
20751         * method.c (build_opfncall): Forward most requests to build_new_op.
20752         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
20753
20754 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20755
20756         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
20757         invalid second argument to dump_expr_list.
20758
20759 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
20760
20761         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
20762
20763 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
20764
20765         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
20766         ASSEMBLE_EXTERNAL.
20767
20768 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
20769
20770         * typeck2.c (process_init_constructor): New pedwarn for using { }
20771         to initialize a pointer to member function.
20772         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
20773         we can avoid the new error.
20774
20775 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
20776
20777         * typeck.c (build_ptrmemfunc1): New function to hide details of
20778         pointer to member functions better.
20779
20780 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
20781
20782         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
20783         methods into the actual method, as we know the implied object is
20784         not used.
20785
20786 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20787
20788         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
20789         inside a system header.
20790
20791 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
20792
20793         * call.c (build_method_call): Call complete_type on the
20794         instance type.
20795
20796 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
20797
20798         * typeck.c (build_component_ref): Always build up an OFFSET_REF
20799         for obj_ptr->func so that we can know which object to use in a
20800         method call.
20801
20802 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
20803
20804         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
20805         around things.  Also improve maintainability.
20806
20807 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
20808
20809         * decl.c (grokdeclarator): Check for overflow when evaluating an
20810         array dimension.
20811
20812 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
20813
20814         * cvt.c (cp_convert): Don't check for ambiguity with constructor
20815         if NEW_OVER.
20816
20817         * typeck.c (build_x_function_call): Pass function overload
20818         questions to new overloading code if NEW_OVER.
20819         * init.c (expand_aggr_init_1): Only check for type conversion ops
20820         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
20821         Don't check for ambiguity with constructor if NEW_OVER.
20822         * cvt.c (convert_to_reference): Dereference the result of a type
20823         conversion operator.
20824         (build_conv): Propagate ICS_USER_FLAG.
20825         (implicit_conversion): Call instantiate_type.
20826         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
20827         (add_function_candidate): Fix cv-quals on argtype.
20828         (print_z_candidates): New function.
20829         (build_new_function_call): Call it.
20830         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
20831         consider non-converting constructors.
20832         Call print_z_candidates.
20833         Return an AMBIG_CONV for an ambiguous conversion.
20834         (build_user_type_conversion): Handle AMBIG_CONV.
20835         (convert_like): Fix test for building TARGET_EXPR.
20836         Call instantiate_type.
20837         Handle AMBIG_CONV and LVALUE_CONV.
20838         (build_over_call): Handle 0 args and ellipsis.
20839         * cp-tree.def: Add AMBIG_CONV.
20840
20841 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
20842
20843         * decl.c (lookup_name_real): If we find mem in obj when parsing
20844         `obj->mem', make sure we return the right value.
20845
20846 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
20847
20848         * search.c (get_base_distance): Call complete_type.
20849
20850 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
20851
20852         * decl.c (store_bindings): Make static.
20853
20854 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
20855
20856         * init.c (expand_aggr_init_1): Don't check type conversions if
20857         NEW_OVER.
20858
20859         * cvt.c (z_candidate): Put back template field.
20860         (add_function_candidate): Set it.
20861         (add_template_candidate): Likewise.
20862         (joust): Use it.
20863         (compare_qual): Handle references and pointers to members.
20864         (compare_ics): Handle reference bindings.
20865
20866         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
20867
20868 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
20869
20870         * call.c (compute_conversion_costs): Call complete_type.
20871
20872         * tree.c (vec_binfo_member): Use comptypes instead of comparing
20873         pointers, so we can handle template parameters.
20874
20875 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
20876
20877         * cvt.c (cp_convert_to_pointer): We have to call complete_type
20878         here; let's make it explicit instead of a side effect of an
20879         error check.
20880
20881 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
20882
20883         * cvt.c (z_candidate): Remove template field.
20884         (reference_binding): Handle binding to temporary.
20885         (implicit_conversion): Likewise.
20886         (add_function_candidate): Handle artificial constructor parms.
20887         Handle functions with too few parms.
20888         (add_template_candidate): New function.
20889         (build_user_type_conversion_1): Handle constructors.
20890         (convert_like): Likewise.
20891         (build_over_call): Likewise.
20892         (build_new_function_call): Support templates.
20893         (compare_ics): Fix reference, inheritance handling.
20894
20895 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
20896
20897         * decl.c: Add signed_size_zero_node.
20898         (init_decl_processing): Build it.
20899         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
20900         when we're trying to make a negative delta.
20901
20902 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20903
20904         Stop doing this damn index==strchr variable name confusion.
20905         * class.c (add_virtual_function): Change local var INDEX to be
20906         named IDX.
20907         (add_method): Likewise.
20908         * lex.c (print_parse_statistics): Likewise.
20909         * search.c (make_memoized_table_entry): Likewise.
20910         (lookup_fnfields_here): Likewise.
20911         (lookup_field): Likewise.
20912         (lookup_fnfields): Likewise.
20913         (get_baselinks): Likewise.
20914         * sig.c (build_signature_table_constructor): Likewise.
20915         (build_signature_method_call): Likewise.
20916         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
20917         (get_member_function_from_ptrfunc): Likewise.
20918         (build_ptrmemfunc): Change local var INDEX to be IDX.
20919         (c_expand_start_case): Likewise.
20920
20921 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
20922
20923         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
20924         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
20925         (convert_to_reference): Use build_type_conversion to convert to
20926         the reference type directly.
20927         (standard_conversion): Fix void* case, non-conversions.
20928         (reference_binding): Fix expr == 0 case, non-conversions.
20929         (convert_like): Support REF_BIND.
20930         (compare_qual): Split out from compare_ics.
20931         (compare_ics): Use it, handle icses with only a qual_conv.
20932
20933         * init.c (expand_vec_init): Don't crash if decl is NULL.
20934
20935 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
20936
20937         * mpw-config.in: New file, configury for Mac MPW.
20938         * mpw-make.sed: New file, makefile editing for MPW.
20939
20940 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20941
20942         * pt.c (instantiate_class_template): Call repo_template_used.
20943
20944         * search.c (lookup_conversions): Only lookup conversions in
20945         complete types.
20946
20947 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20948
20949         * cp-tree.def: Renamed from tree.def, to avoid confusion with
20950         gcc's tree.def.
20951         * cp-tree.h, lex.c: Include cp-tree.def.
20952         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
20953
20954 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
20955
20956         * init.c (build_vec_delete_1): Call complete_type.
20957
20958 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
20959
20960         * except.c (start_anon_func): Make sure anonymous functions are
20961         never external.
20962
20963 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
20964
20965         * decl.c (finish_function): If function_depth > 1, set nested.
20966
20967         * decl2.c (grokbitfield): Revert Bob's change.
20968         * class.c (finish_struct_1): Fix handling of named bitfield widths.
20969
20970 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
20971
20972         * pt.c (add_pending_template): Handle types.
20973         (lookup_template_class): With -fexternal-templates, just add the class
20974         to pending_templates instead of instantiating it now.
20975         * decl2.c (finish_file): Handle types in pending_templates.
20976
20977 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
20978
20979         * decl2.c (grokbitfield): Handle constant decls appropriately.
20980         Give an appropriate error message now instead of spewing core
20981         later.
20982
20983 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
20984
20985         * decl2.c: Don't turn on thunks by default for now.
20986
20987 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
20988
20989         * typeck.c (complete_type): Handle error_mark_node.
20990         (common_type, OFFSET_TYPE): Handle template_type_parms.
20991
20992 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
20993
20994         * pt.c (instantiate_decl): If at_eof, call import_export_decl
20995         regardless of DECL_INLINE.
20996
20997         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
20998
20999         * class.c (finish_struct_bits): Copy TYPE_SIZE.
21000
21001         * rtti.c (build_dynamic_cast): Support templates.
21002         * tree.def: Support DYNAMIC_CAST_EXPR.
21003         * pt.c (tsubst_copy): Likewise.
21004         * decl2.c (build_expr_from_tree): Likewise.
21005
21006 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
21007
21008         * typeck.c (build_static_cast): Support templates.
21009         (build_const_cast): Likewise.
21010         * tree.def: Support CONST/STATIC_CAST_EXPR.
21011         * pt.c (tsubst_copy): Likewise.
21012         * decl2.c (build_expr_from_tree): Likewise.
21013
21014 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
21015
21016         * decl2.c (finish_vtable_vardecl): Don't trust
21017         TREE_SYMBOL_REFERENCED for vtables of local classes.
21018
21019 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
21020
21021         * pt.c (tsubst_copy): Handle operator T.
21022
21023 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21024
21025         * init.c (build_delete): Move creation of PARMS inside test of
21026         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
21027
21028 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
21029
21030         * typeck.c (build_conditional_expr): Don't assume that
21031         the arguments to ?: are always pointers or records.
21032
21033 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
21034
21035         * decl2.c (import_export_decl): Still emit static/weak/comdat
21036         copies of inline template functions with -fno-implicit-templates.
21037
21038 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
21039
21040         * init.c (build_delete): Determine the complete basetype
21041         path to the destructor we're calling.
21042
21043 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
21044
21045         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
21046         initialize the enum, because we really and truly don't know where
21047         it came from.
21048         (start_enum): Don't copy integer_zero_node because
21049         build_enumerator will do it.
21050
21051 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
21052
21053         * decl.c (finish_function): Do access control on base destructors.
21054
21055         * pt.c (tsubst, case FUNCTION_DECL): Set up
21056         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
21057         hose us.
21058
21059 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
21060
21061         * cvt.c (build_up_reference): If we have already extended the
21062         lifetime of the temporary, don't try it again.
21063         * typeck.c (c_expand_return): Don't try and convert the return
21064         value twice when we want a reference, once is enough.
21065
21066 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
21067
21068         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
21069         LOOKUP_ONLYCONVERTING at all for now.
21070
21071         * search.c (add_conversions): Put the conversion function in
21072         TREE_VALUE, the basetype in TREE_PURPOSE.
21073         * cvt.c (build_type_conversion): Adjust.
21074         * cvt.c (build_expr_type_conversion): Adjust.
21075         * call.c (user_harshness): Adjust.
21076
21077 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
21078
21079         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
21080         backend's benefit.
21081
21082 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
21083
21084         * except.c (expand_start_catch_block): Add a dummy region, if we
21085         get an error, so that we can avoid core dumping later.
21086
21087 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
21088
21089         * cp-tree.h (OFFSET_REF): Remove.
21090         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
21091         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
21092         * init.c (expand_aggr_init_1): Likewise.
21093         (build_new): Likewise.
21094         * typeck.c (expand_target_expr): Likewise.
21095
21096 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
21097
21098         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
21099         TARGET_EXPR.
21100
21101 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
21102
21103         * cvt.c (build_up_reference): Redo how and when temporaries are
21104         created.
21105         * decl.c (grok_reference_init): Don't try and be smart about
21106         running cleanups.
21107
21108 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
21109
21110         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
21111         (TARGET_EXPR...), now that it has 4 arguments.
21112         * tree.c (build_cplus_new): Likewise.
21113
21114 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
21115
21116         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
21117
21118         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
21119         * decl.c (struct saved_scope): Remove named_labels,
21120         {base,member}_init_list.
21121         (maybe_push_to_top_level): Don't set them.  Call
21122         push_cp_function_context if appropriate.
21123         (pop_from_top_level): Likewise.
21124
21125         * method.c (do_build_assign_ref): Remove obsolete check of
21126         TYPE_HAS_ASSIGN_REF (basetype).
21127
21128         * decl.c (grokfndecl): Diagnose user definition of
21129         implicitly-declared methods.
21130
21131 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
21132
21133         * method.c (do_build_copy_constructor): Add code to give
21134         meaningful error messages instead of crashing.
21135         (do_build_assign_ref): Don't synthesize assignment operators for
21136         classes containing reference or const members.
21137
21138         * class.c (struct base_info): Remove cant_synth_copy_ctor
21139         and cant_synth_asn_ref.
21140         (finish_base_struct): Remove the code that tries to conditionalize
21141         synthesis of copy constructors & assignment operators based on
21142         access permissions.  Instead, let it fail when it tries to
21143         synthesize the copy constructor.  This will give meaningful error
21144         messages instead of silently generating code to perform a bitcopy.
21145
21146 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
21147
21148         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
21149         determining types for constant values.
21150
21151         * decl.c (struct named_label_list): Use instead of stuffing
21152         random items into a TREE_LIST node.
21153         (named_label_uses): Use the new struct.
21154         (poplevel): Likewise.
21155         (lookup_label): Likewise.
21156         (define_label): Add an error message to tell the user the line
21157         where the goto is located in addition to the destination of the
21158         goto.
21159         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
21160         named_label_uses.
21161         (finish_function): Likewise.
21162
21163         (start_decl): Complain about defining a static data member
21164         in a different type from which it was declared.
21165
21166 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
21167
21168         * cvt.c (build_expr_type_conversion): Adjust.
21169
21170 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
21171
21172         * call.c (build_method_call): Always convert 'this' to the
21173         appropriate type.
21174
21175         * search.c (add_conversions): Put the conversion function in
21176         TREE_VALUE, the type in TREE_PURPOSE.
21177         * cvt.c (build_type_conversion): Adjust.
21178         * call.c (user_harshness): Adjust.
21179
21180         * method.c (emit_thunk): Call temporary_allocation and
21181         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
21182
21183         * tree.c (build_cplus_array_type): Handle tweaking of
21184         TYPE_MAIN_VARIANT here.
21185         * typeck.c (common_type): Not here.
21186
21187         * typeck.c (complete_type): Only try to complete an array type if
21188         it has a domain.
21189
21190 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
21191
21192         * decl.c (grokvardecl): Call complete_type.
21193         (grokdeclarator): Call complete_type for PARM_DECLs.
21194
21195 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
21196
21197         * pt.c (instantiate_class_template): Re-set
21198         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
21199
21200 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
21201
21202         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
21203         smart enough to do it right.
21204         * tree.c (cp_expand_decl_cleanup): Likewise.
21205         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
21206         cp_expand_decl_cleanup.
21207         (store_parm_decls): Likewise.
21208         (hack_incomplete_structures): Likewise.
21209         * except.c (push_eh_cleanup): Likewise.
21210
21211 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
21212
21213         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
21214         frontend to the backend where it belongs.
21215         * tree.c (unsave_expr): Likewise.
21216         (unsave_expr_now): Likewise.
21217         * tree.def (UNSAVE_EXPR): Likewise.
21218         * cp-tree.h (unsave_expr): Likewise.
21219         (unsave_expr_now): Likewise.
21220
21221 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
21222
21223         * init.c (emit_base_init): Make sure the partial EH cleanups live
21224         on the function_obstack.
21225
21226 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
21227
21228         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
21229         when checking for pointer types.
21230
21231 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
21232
21233         * pt.c (instantiate_class_template): Remove obsolete check for
21234         access declarations.
21235
21236 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
21237
21238         * call.c (build_overload_call): Simplify calls to
21239         build_overload_call by removing last parameter.
21240         (build_method_call): Likewise.
21241         * cp-tree.h: Likewise.
21242         * method.c (build_opfncall): Likewise.
21243         * typeck.c (build_x_function_call): Likewise.
21244
21245 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
21246
21247         * call.c (default_parm_conversions): Factor out common code.
21248         (build_method_call): Use it.
21249         (build_overload_call_real): Use it.
21250
21251 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
21252
21253         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
21254         but pedwarn as the code is bogus.
21255         * typeck.c (decay_conversion): Likewise.
21256         (build_function_call_real): Use build_addr_func instead of
21257         default_conversion.  Don't allow pointer-to-method functions down
21258         here.
21259         (build_unary_op): Use real pointer-to-member functions instead of
21260         fake ones.
21261         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
21262         (convert_for_assignment): Removed some obsolete code.
21263         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
21264         build_x_function_call instead of current_class_ptr.  Only call
21265         digest_init once on an initializer, we do this just checking
21266         TREE_TYPE.
21267         (build_expr_from_tree): Pass current_class_ref to
21268         build_x_function_call instead of current_class_ptr.
21269         * init.c (build_member_call): Likewise.
21270         * pase.y: Likewise.
21271         * error.c (dump_expr): Handle OFFSET_REFs better.
21272         * pt.c (unify): Handle pointer-to-member functions better.
21273         * decl.c (finish_function): Clear out current_class_ref just like
21274         we do for current_class_ptr.
21275
21276         * typeck.c (get_delta_difference): Handle virtual bases better.
21277
21278 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
21279
21280         * sig.c (build_signature_table_constructor): Use the delta for
21281         the original basetype for this virtual function with thunks.
21282         (build_signature_method_call): We still need to adjust 'this'
21283         with thunks.
21284
21285 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
21286
21287         * call.c (build_addr_func): New routine.  Used to get the `real'
21288         address of a function or a method.  Needed to avoid getting a
21289         pointer-to-member function.
21290         (build_call): New routine to build CALL_EXPRs.
21291         (build_method_call): Use it.
21292         * cvt.c (convert_to_aggr): Likewise.
21293         * typeck.c (build_function_call_real): Likewise.
21294         * sig.c (build_signature_table_constructor): Use build_addr_func.
21295         * cp-tree.h (build_call, build_addr_func): Declare them.
21296
21297 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
21298
21299         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
21300         * parse.y: Remove uses of LOOKUP_AGGR.
21301
21302 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
21303
21304         * *.[chy]: Rename current_class_decl to current_class_ptr, and
21305         C_C_D to current_class_ref.
21306
21307 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
21308
21309         * call.c (convert_harshness): Tighten up pointer conversions.
21310
21311 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
21312
21313         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
21314         (finish_file): Likewise.
21315
21316 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
21317
21318         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
21319
21320         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
21321         code.
21322
21323 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
21324
21325         * decl2.c: Turn on thunks by default where supported.
21326
21327 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
21328
21329         * cp-tree.h (build_overload_call_maybe): Removed.
21330         * call.c (build_overload_call_real): Invert meaning of last arg to
21331         be require_complete.
21332         (build_overload_call): Likewise.
21333         * typeck.c (build_x_function_call): Use build_overload_call_real
21334         instead of build_overload_call_maybe.
21335
21336 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
21337
21338         * decl2.c (finish_file): Don't try to emit functions that haven't
21339         been compiled.
21340
21341 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
21342
21343         * decl2.c (finish_vtable_vardecl): Oops.
21344
21345         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
21346         Also store the bindings from previous_class_values.
21347         (pop_from_top_level): Restore them.
21348
21349 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
21350
21351         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
21352         symbol has been referenced.
21353         (finish_file): Re-join synthesis/vtable loop with inline emission
21354         loop, disable inlining when an inline is output.
21355
21356 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
21357
21358         * except.c (init_exception_processing): Setup saved_in_catch.
21359         (push_eh_cleanup): Reset __eh_in_catch.
21360         (expand_start_catch_block): Set __eh_in_catch.
21361
21362 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
21363
21364         * except.c (push_eh_cleanup): Add tracking for whether or not we
21365         have an active exception object.
21366         (expand_builtin_throw): Use it to make sure a rethrow without an
21367         exception object is caught.
21368
21369 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
21370
21371         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
21372         cache.
21373
21374 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
21375
21376         * decl2.c (finish_file): Also use sentries for vars with
21377         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
21378         created).
21379
21380         * lex.c (handle_cp_pragma): Disable #pragma
21381         interface/implementation if SUPPORTS_ONE_ONLY > 1.
21382
21383 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
21384
21385         * method.c (emit_thunk): Wrap default case in
21386         temporary/permanent_allocation.
21387
21388         * method.c (make_thunk): Use DECL_ONE_ONLY.
21389         (emit_thunk): Call assemble_end_function.
21390
21391 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
21392
21393         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
21394         (import_export_decl): Likewise.
21395         (finish_prevtable_vardecl): Disable vtable hack if
21396         SUPPORTS_ONE_ONLY > 1.
21397
21398 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
21399
21400         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
21401         PREDECREMENT_EXPRs take two arguments, not one.
21402
21403 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
21404
21405         * class.c (build_vtable_entry): Don't build thunks for abstract
21406         virtuals.
21407
21408         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
21409         frontend.
21410
21411 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
21412
21413         * class.c (set_rtti_entry): Use size_zero_node.
21414         (build_vtable): Likewise.
21415
21416 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
21417
21418         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
21419         (prepare_fresh_vtable): Likewise.
21420
21421 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
21422
21423         * method.c (emit_thunk): Call mark_used on the target function.
21424
21425         * call.c (build_method_call): Don't warn about pending templates.
21426
21427 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
21428
21429         * decl2.c (finish_file): Fix list walking logic.
21430
21431         * typeck2.c (check_for_new_type): Only warn if -pedantic.
21432
21433 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
21434
21435         * class.c (finish_struct_1): Remove old code for
21436         dont_allow_type_definitions.
21437         * cp-tree.h: Likewise.
21438         * spew.c: Make sure cp-tree.h is included before parse.h, so the
21439         definition of flagged_type_tree is found before it is used.
21440         * lex.c: Likewise.
21441         * parse.y: Added the ftype member to the type union, and changed a
21442         number of rules to use it instead of ttype.  Added calls to
21443         check_for_new_type() as appropriate.
21444         * typeck2.c (check_for_new_type): New function for checking
21445         if a newly defined type appears in the specified tree.
21446         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
21447         for check_for_new_type().
21448
21449 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
21450
21451         * decl2.c (finish_file): Only use a sentry if the decl is public.
21452
21453         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
21454         don't pass LOOKUP_ONLYCONVERTING.
21455
21456 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
21457
21458         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
21459         properly keeps track of const and volatile type modifiers.
21460
21461 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
21462
21463         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
21464         * pt.c (comp_template_args): Use it.
21465
21466         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
21467         assemble_external for artificial function decls.
21468
21469         * decl.c (cp_finish_decl): Oops.
21470
21471 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
21472
21473         * decl2.c (import_export_decl): Put static data member templates
21474         into common storage, or make them weak, depending on whether they
21475         are dynamically or statically initialized.
21476         (get_sentry): New function.
21477         (finish_file): Do import_export_decl for static data members before
21478         building the init/fini functions.  Don't init/fini a variable that's
21479         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
21480         push/pop_temp_slots.
21481         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
21482         expand_static_init thang.
21483         * method.c (get_id_2): New function.
21484
21485 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
21486
21487         * parse.y (empty_parms): Make sure we use C++-style prototypes
21488         when we're declaring member functions.
21489
21490 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
21491
21492         * Makefile.in (CONFLICTS): 16 s/r conflicts.
21493         * parse.y (self_template_type): New nonterminal.
21494
21495 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
21496
21497         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
21498         name.
21499         * parse.y (base_class.1): Allow 'typename foo::bar'.
21500
21501         * lex.c (check_newline): Remove #pragma code that plays with the
21502         input stream, since we now deal with tokens.  Clear nextchar when
21503         we're done.
21504         (handle_cp_pragma): Use real_yylex.
21505         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
21506         in one place.
21507
21508         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
21509
21510         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
21511
21512 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21513
21514         * parse.y: New token SELFNAME for potential constructor.
21515         * spew.c (yylex): Handle it.
21516         * lex.c (identifier_type): Produce it.
21517
21518         * parse.y (complete_type_name): In :: case, don't push class binding.
21519         (complex_type_name): Likewise.
21520
21521 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
21522
21523         * typeck.c (build_reinterpret_cast): Handle pointer to member
21524         functions.
21525
21526 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21527
21528         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
21529         pragmas.
21530         (check_newline): Put the vtable/unit/implementation/interface pragma
21531         code into handle_cp_pragma, replacing it with a call.
21532         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
21533         args.  Get the next token after handling the pragma token.
21534
21535 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
21536
21537         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
21538         (convert_to_pointer_force): Likewise.
21539
21540         * init.c (build_new): Fix array new without -fcheck-new.
21541
21542 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
21543
21544         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
21545         tree.c: Lose TYPE_NESTED_NAME.
21546
21547         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
21548         as identifiers.
21549
21550         * tree.def: Add VEC_INIT_EXPR.
21551         * expr.c (cplus_expand_expr): Handle it.
21552         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
21553         the extra file-scope symbol nastiness.
21554
21555 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
21556
21557         * method.c (make_thunk): Thunks are static.
21558         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
21559
21560         * decl2.c (mark_vtable_entries): Emit thunks as needed.
21561         (finish_file): Don't emit them here.
21562
21563 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
21564
21565         * rtti.c (build_dynamic_cast): Handle null pointers.
21566         (ifnonnull): New function.
21567
21568 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
21569
21570         * call.c (build_method_call): Remember the original basetype we
21571         were called with.  Give an error message instead of trying
21572         (incorrectly) to call a non-static member function through a
21573         non-inherited class.
21574
21575         * search.c (expand_upcast_fixups): Mark the new fixup as
21576         DECL_ARTIFICIAL.
21577
21578 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
21579
21580         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
21581
21582         * class.c (set_rtti_entry): Fix for thunks.
21583
21584         * decl2.c (import_export_decl): Still emit typeinfo fns for
21585         cv-variants of builtin types.
21586
21587         * rtti.c (expand_class_desc): Set up base_info_type_node here.
21588         (init_rtti_processing): Instead of here.
21589
21590 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
21591
21592         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
21593         (build_typeid): Only complain about taking dynamic typeid without
21594         -frtti.
21595
21596         * decl2.c: flag_rtti defaults to 1.
21597
21598         * rtti.c (get_tinfo_var): The general class case is now smaller.
21599         (init_rtti_processing): Pack the latter three fields of base_info
21600         into 32 bits.
21601
21602 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
21603
21604         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
21605
21606 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
21607
21608         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
21609         (push_memoized_context): Split out code to undefer pop_type_level to
21610         (clear_memoized_cache): here.
21611         (pop_memoized_context): We can only handle one layer of deferral of
21612         pop_type_level so clear the cache, if there was a previous level.
21613
21614 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
21615
21616         * rtti.c (init_rtti_processing): Build up base_info_type_node.
21617         (expand_class_desc): Use one pointer to an array of base_info
21618         structs, passed using a CONSTRUCTOR.
21619
21620 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
21621
21622         * class.c (build_vbase_path): Remove block extern for
21623         flag_assume_nonnull_objects here.
21624         (build_vfn_ref): Split out functionality into build_vtbl_ref.
21625         (build_vtbl_ref): New routine.
21626         (build_vtable): Set up rtti info here.
21627         (add_virtual_function): Note in CLASSTYPE_RTTI the best
21628         place where we can get the rtti pointers from to avoid having to
21629         search around for a place.
21630         (finish_base_struct): Likewise.
21631         (finish_struct_1): Likewise.  Never create totally new vtables
21632         with totally new vtable pointers for rtti.  Disable code to layout
21633         vtable pointers better until we want to break binary
21634         compatibility.
21635         * rtti.c (build_headof_sub): New routine to convert down to a
21636         sub-object that has an rtti pointer in the vtable.
21637         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
21638         maintainable.
21639         (build_dynamic_cast): Make sure we have saved it, if we need to.
21640         * search.c (dfs_init_vbase_pointers): Disable code that deals with
21641         a more efficient vtable layout, enable later.
21642         * call.c (flag_assume_nonnull_objects): Moved declaration to
21643         * cp-tree.h: here.  Declare build_vtbl_ref.
21644         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
21645         function calls that want a tree.
21646
21647 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
21648
21649         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
21650         other X subobjects in the most derived type.  Ack.
21651
21652         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
21653         get_typeid will do it for us.
21654         (get_typeid_1): Break out call-building for expand_*_desc to use.
21655         (get_typeid): Call it.
21656         (expand_*_desc): Likewise.
21657         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
21658         and void *.
21659         (init_decl_processing): Lose builtin_type_tdescs lossage.
21660         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
21661
21662 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
21663
21664         * pt.c (tsubst): When calling set_nested_typename, use
21665         TYPE_NESTED_NAME (current_class_type) instead of
21666         current_class_name.
21667
21668         * decl.c (pushdecl): Likewise.
21669         (pushdecl_class_level): Likewise.
21670         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
21671         set_nested_typename.
21672
21673 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
21674
21675         * rtti.c (synthesize_tinfo_fn): Handle arrays.
21676
21677         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
21678
21679 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
21680
21681         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
21682         (init_rtti_processing): Lose bad_cast_type.
21683         (build_dynamic_cast): Use throw_bad_cast.
21684
21685         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
21686
21687         * decl2.c (finish_file): Don't synthesize artificial functions
21688         that are external and not inline.
21689
21690         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
21691
21692         * decl2.c (finish_file): Handle having new inlines added to
21693         saved_inlines by synthesis.
21694
21695         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
21696
21697 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
21698
21699         RTTI rewrite to initialize nodes as needed, not require that
21700         users #include <typeinfo>, complete functionality and reduce wasted
21701         space.
21702         * rtti.c (init_rtti_processing): New fn.
21703         (build_typeid): The vtable entry is now a function.
21704         (get_tinfo_var): New fn.
21705         (get_tinfo_fn): Likewise.
21706         (get_typeid): Use it.
21707         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
21708         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
21709         points __rtti_*.
21710         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
21711         (synthesize_tinfo_fn): New fn.
21712         * method.c (build_t_desc_overload): Lose.
21713         (build_overload_with_type): More generic.
21714         * decl.c (init_decl_processing): Call init_rtti_processing.
21715         * class.c (set_rtti_entry): Use get_tinfo_fn.
21716         * decl2.c (mark_vtable_entries): Mark the rtti function.
21717         (finish_prevtable_vardecl): Don't build_t_desc.
21718         (import_export_decl): Handle tinfo functions.
21719         (finish_file): Likewise.
21720         * typeck.c (inline_conversion): New fn.
21721         (build_function_call_real): Use it.
21722         * cp-tree.h: Add decls.
21723
21724         * method.c (hack_identifier): Also convert component_refs from
21725         references.
21726
21727         * lex.c (cons_up_default_function): Use the type, not the name, in
21728         declspecs.
21729
21730         * decl2.c (import_export_vtable): Fix weak vtables.
21731
21732 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
21733
21734         * search.c (get_base_distance_recursive): Fix access checks for
21735         protected bases.
21736
21737 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21738
21739         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
21740         cp-tree.h.
21741         (convert_harshness): Add prototypes wrapped by PROTO.
21742         * decl2.c (grok_function_init): Likewise.
21743         (do_toplevel_using_decl): Change to void return type.
21744         * class.c (build_vtable_entry): Remove decl of make_thunk.
21745         (merge_overrides): Fix order of arg definitions.
21746         (finish_vtbls): Likewise.
21747         (fixup_vtable_deltas): Likewise.
21748         (modify_all_direct_vtables): Likewise.
21749         (modify_all_indirect_vtables): Likewise.
21750         * search.c (get_base_distance_recursive): Likewise.
21751         (get_abstract_virtuals_1): Likewise.
21752         (fixup_virtual_upcast_offsets): Likewise.
21753         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
21754         * init.c (perform_member_init): Fix order of arg definitions.
21755         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
21756         * cp-tree.h (make_thunk): Add decl.
21757         (overload_template_name, push_template_decl): Add decls.
21758         (do_toplevel_using_decl): Change to void return type.
21759         (vec_binfo_member): Add decl.
21760
21761 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21762
21763         * typeck.c (mark_addressable, convert_for_assignment,
21764         convert_for_initialization, pointer_int_sum, pointer_diff,
21765         unary_complex_lvalue): Add prototypes wrapped by PROTO.
21766         (convert_sequence): #if 0 fn decl, since definition also is.
21767
21768 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
21769
21770         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
21771         cast to pointer types for type searching.
21772
21773 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21774
21775         * typeck.c (get_delta_difference): Use cp_error, not error, in the
21776         case where BINFO == 0.
21777
21778 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
21779
21780         * call.c (build_method_call): Fix wording of error messages so
21781         constructors come out right.
21782
21783 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
21784
21785         * decl.c (push_overloaded_decl): Don't warn about hidden
21786         constructors when both the type and the function are declared
21787         in a system header file.
21788
21789 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
21790
21791         * class.c (finish_struct_1): Propagate the TYPE_PACKED
21792         flag for the type to the type's fields.
21793
21794 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21795
21796         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
21797
21798 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
21799
21800         * class.c (base_info, finish_base_struct): Replace
21801         needs_virtual_dtor with base_has_virtual.
21802
21803         (finish_struct_1): Remove the old code that tried to make default
21804         destructors virtual.  Use base_has_virtual when checking if we need
21805         to add a vtable entry for the rtti code.
21806
21807 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
21808
21809         * pt.c (push_template_decl): Complain about template decl with
21810         inappropriate declaration.
21811
21812 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
21813
21814         * typeck.c (build_x_unary_op): Remove bogus check for taking
21815         the address of a member function.
21816
21817 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
21818
21819         * parse.y (constructor_declarator): Only push the class if
21820         we are not already in the class.
21821
21822 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
21823
21824         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
21825         Add additional argument to INIT_CUMULATIVE_ARGS.
21826
21827 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
21828
21829         * decl.c (shadow_tag): Fix error about anon union with methods.
21830
21831         * parse.y (self_reference): Only generate a self-reference if this
21832         is a non-template class.
21833         (opt.component_decl_list): Only use it if it was generated.
21834
21835         * parse.y (component_decl_1): Use constructor_declarator.
21836         (fn.def2): Likewise.
21837         (notype_component_declarator0): Likewise.
21838
21839 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
21840
21841         * typeck.c (build_x_unary_op): Add checks for taking the address
21842         of a TARGET_EXPR or of a member function, and give appropriate
21843         warnings.
21844
21845 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
21846
21847         * pt.c (process_template_parm): Allow template type parms to be
21848         used as types for template const parms.
21849
21850 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
21851
21852         * init.c (expand_vec_init): Ensure the eh cleanups are on the
21853         function_obstack.
21854
21855 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
21856
21857         * decl.c (lookup_name_real): Be even more picky about the
21858         ambiguous lookup warning.
21859         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
21860         * parse.y (constructor_declarator): Rather than here.
21861
21862         * parse.y (constructor_declarator): New nonterminal.
21863         (fn.def1): Use it.
21864         (explicit_instantiation): Likewise.
21865
21866 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21867
21868         Add implicit declaration of class name at class scope.
21869         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
21870         * parse.y (self_reference): New nonterminal.
21871         (opt.component_decl_list): Use it.
21872         (fn.def1): Add nested_name_specifier type_name cases.
21873         * class.c (build_self_reference): New function.
21874         (finish_struct): Handle access_default later, move self-reference
21875         decl to the end.
21876         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
21877         * cp-tree.h: Adjust.
21878
21879         * pt.c (do_function_instantiation): Separate handling of member
21880         functions and non-member functions properly.
21881
21882 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
21883
21884         * pt.c (process_template_parm): Improve error for 'volatile class K'.
21885
21886         * class.c (finish_struct_1): Check the right slot for destructors.
21887
21888         * decl.c (start_enum): Complain about enum templates.
21889
21890 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
21891
21892         * init.c (resolve_offset_ref): Offset pointers to member data by one.
21893         * typeck.c (unary_complex_lvalue): Likewise.
21894
21895 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
21896
21897         * typeck.c (c_expand_return): Check for a returned local
21898         array name, similar to the check for an ADDR_EXPR.
21899
21900 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
21901
21902         * decl.c (cp_finish_decl): Don't build cleanups for static
21903         variables here.
21904
21905 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
21906
21907         * typeck.c (build_modify_expr): Fix error messages to be more
21908         accurate.
21909         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
21910         assignment operators.
21911         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
21912         assignment operators.
21913
21914 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
21915
21916         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
21917         give an error if initialized.  pedwarn about nested type with the
21918         same name as its enclosing class.
21919
21920         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
21921
21922         * typeck.c (require_complete_type): Be sure to instantiate the
21923         MAIN_VARIANT of the type.
21924
21925         * decl2.c (finish_file): Instantiate pending templates before
21926         processing static constructors and destructors.
21927
21928         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
21929         unless at_eof.
21930
21931 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
21932
21933         * decl2.c (delete_sanity): If error_mark_node is passed
21934         in as an expression, quit while we're ahead.
21935
21936         * decl.c (grokdeclarator): Give an error message if `friend'
21937         is combined with any storage class specifiers.
21938
21939 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
21940
21941         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
21942         definition of nonexistent nested type.
21943
21944         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
21945         not to say 'typedef'.
21946
21947 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21948
21949         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
21950         * search.c (dfs_walk, dfs_init_vbase_pointers,
21951         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
21952         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
21953
21954 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
21955
21956         * except.c (build_throw): Support minimal parse.
21957         * pt.c (tsubst_copy): Support THROW_EXPR.
21958         * decl2.c (build_expr_from_tree): Likewise.
21959
21960         * pt.c (mangle_class_name_for_template): Always allocate
21961         scratch_firstobj.
21962
21963 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
21964
21965         * cvt.c (cp_convert_to_pointer): Give an appropriate error
21966         when trying to cast from an incomplete type.
21967
21968 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21969
21970         * pt.c (instantiate_class_template): Don't bother setting up
21971         CLASSTYPE_TAGS explicitly, as the nested types will add
21972         themselves.
21973
21974 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
21975
21976         * decl.c (shadow_tag): Remove old error check for usage of
21977         an enum without a previous declaration.
21978         (xref_tag): Add error message about usage of enums without a
21979         previous declaration.
21980
21981 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
21982
21983         * lex.c (do_identifier): Only do name consistency check if we're
21984         parsing.
21985
21986         * pt.c (push_template_decl): Don't crash if we get a member defn
21987         that doesn't match.
21988
21989         * decl.c (xref_tag_from_type): New function to do an xref without
21990         always having to figure out code_type_node.
21991         * cp-tree.h: Declare it.
21992         * pt.c (instantiate_class_template): Use it for friend classes.
21993         (lookup_template_class): Use it.
21994
21995         * typeck2.c (build_functional_cast): Pull out a single parm before
21996         passing it to build_c_cast.
21997
21998 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
21999
22000         * expr.c (do_case): Give an error message if a pointer is
22001         given as a case value.
22002
22003 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
22004
22005         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
22006         an overload list.
22007
22008         * lex.c (cons_up_default_function): Really, now, interface hackery
22009         does not apply to synthesized methods.
22010
22011 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
22012
22013         * call.c (build_method_call): Ctors and dtors now have special names
22014         with respect to lookups.
22015         * class.c (add_method): Likewise.
22016         (grow_method): Likewise.
22017         (finish_struct_methods): Likewise.
22018         (warn_hidden): Likewise.
22019         (finish_struct_1): Likewise.
22020         * cvt.c (convert_to_reference): Likewise.
22021         (convert_to_aggr): Likewise.
22022         (cp_convert): Likewise.
22023         * decl2.c (check_classfn): Likewise.
22024         * init.c (expand_member_init): Likewise.
22025         (expand_default_init): Likewise.
22026         (expand_aggr_init_1): Likewise.
22027         (build_offset_ref): Likewise.
22028         (build_new): Likewise.
22029         (build_delete): Likewise.
22030         * lex.c (do_inline_function_hair): Likewise.
22031         * search.c (lookup_field_1): Likewise.
22032         (lookup_fnfields_here): Likewise.
22033         (lookup_field): Likewise.
22034         (lookup_fnfields): Likewise.
22035         (get_virtual_destructor): Likewise.
22036         (dfs_debug_mark): Likewise.
22037         (dfs_pushdecls): Likewise.
22038         (dfs_compress_decls): Likewise.
22039         * tree.c (layout_basetypes): Likewise.
22040         * typeck.c (build_component_ref): Likewise.
22041         (build_x_function_call): Likewise.
22042         (build_modify_expr): Likewise.
22043         (convert_for_initialization): Likewise.
22044         (build_functional_cast): Likewise.
22045         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
22046         (CTOR_NAME): New.
22047         (DTOR_NAME): New.
22048         * decl.c (ctor_identifier): New.
22049         (dtor_identifier): New.
22050         (init_decl_processing): Set them.
22051
22052 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
22053
22054         * typeck.c (build_component_ref): Don't get confused by fields whose
22055         context has no type name, like pointer to member functions.
22056
22057 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
22058
22059         * decl.c (grokdeclarator): Handle typedef without declarator.
22060
22061         * pt.c (tsubst): Handle SCOPE_REF in declarator.
22062
22063         * parse.y (bad_parm): Catch another case of missing `typename'.
22064
22065         * lex.c (yyprint): Handle TYPE_DECLs.
22066
22067         * decl.c (start_function): Don't try to be clever.
22068
22069         * lex.c: Lose compiler_error_with_decl.
22070         * typeck2.c: Lose error_with_aggr_type.
22071         (incomplete_type_error): Use cp_* instead of old functions.
22072         (readonly_error): Likewise.
22073         * typeck.c (convert_arguments): Likewise.
22074         * search.c (lookup_nested_field): Likewise.
22075         * method.c (make_thunk): Likewise.
22076         * decl.c (grokparms): Likewise.
22077         * cp-tree.h: Update.
22078
22079         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
22080         and value.
22081
22082 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
22083
22084         * method.c (build_opfncall): When deleting a pointer to an
22085         array, build a new pointer to the tree past any ARRAY_TYPE
22086         nodes.
22087
22088 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22089
22090         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
22091
22092 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
22093
22094         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
22095         and ! DECL_INLINE.
22096
22097         * decl.c (finish_function): Don't set nested based on
22098         hack_decl_function_context.
22099         * parse.y (function_try_block): Check for nested function.
22100         (pending_inlines): Likewise.
22101
22102         * decl2.c (build_expr_from_tree): If a unary op already has a
22103         type, just return it.
22104
22105         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
22106
22107         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
22108         (finish_file): Check the return value of walk_vtables.
22109         (finish_prevtable_vardecl): Return int.
22110         (finish_vtable_vardecl): Likewise.
22111         (prune_vtable_vardecl): Likewise.
22112         * lex.c (set_vardecl_interface_info): Likewise.
22113         * cp-tree.h: Adjust return types.
22114
22115         * class.c (delete_duplicate_fields_1): Don't complain about
22116         duplicate nested types if they're the same type.
22117         (finish_struct): Remove check for duplicate.
22118         * decl2.c (grokfield): Don't check for typedef of anonymous type.
22119
22120 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
22121
22122         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
22123
22124         * decl.c (grokdeclarator): Lose special handling of class-level
22125         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
22126         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
22127
22128         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
22129
22130         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
22131
22132         * search.c (compute_access): Fix handling of anonymous union
22133         members.
22134         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
22135         from anonymous unions to their members.
22136
22137         * typeck.c (build_x_function_call): For static member functions,
22138         hand off to build_member_call.
22139
22140 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
22141
22142         * typeck.c (build_component_ref): Handle OFFSET_REFs.
22143
22144         * init.c (expand_vec_init): Fix init == 0 case.
22145
22146 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
22147
22148         * init.c (build_new): pedwarn about init and array new.
22149         (expand_vec_init): Handle lists, use convert_for_initialization.
22150
22151         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
22152         when converting to an aggregate type.
22153         * cvt.c (cp_convert): Pass it through.
22154
22155         * typeck.c (build_conditional_expr): Handle user-defined
22156         conversions to slightly different types.
22157
22158         * decl.c (grokdeclarator): Force an array type in a parm to be
22159         permanent.
22160
22161         * decl2.c (do_using_directive): Sorry.
22162         (do_namespace_alias): Likewise.
22163         * lex.c (real_yylex): Warn about using the `namespace' keyword.
22164
22165 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
22166
22167         * parse.y (datadef): Move call to note_list_got_semicolon up.
22168
22169 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
22170
22171         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
22172
22173 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
22174
22175         * decl.c (cp_finish_decl): The exception regions have to be
22176         nested, not overlapping.  We start the exception region for a
22177         decl, after it has been fully built, and all temporaries for it
22178         have been cleaned up.
22179
22180 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
22181
22182         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
22183
22184 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
22185
22186         * tree.def: Add RETURN_INIT.
22187         * pt.c (instantiate_decl): Handle RETURN_INIT.
22188         * decl.c (store_return_init): Handle minimal_parse_mode.
22189
22190         * tree.c (cp_build_type_variant): Just return an error_mark_node.
22191         * decl.c (make_typename_type): Don't try to get the file and line
22192         of an identifier.
22193         * typeck.c (comptypes): Handle TYPENAME_TYPE.
22194
22195 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
22196
22197         * decl.c (poplevel): Make sure we clear out and restore old local
22198         non-VAR_DECL values by default when they go out of scope.
22199
22200 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
22201
22202         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
22203         referring to addresses of variables and functions.
22204
22205         * error.c (dump_expr): Support SIZEOF_EXPR.
22206
22207         * init.c (do_friend): Use the return value of check_classfn.
22208
22209         * typeck.c (convert_arguments): Call complete_type.
22210
22211         * method.c (hack_identifier): After giving an error, set value to
22212         error_mark_node.
22213
22214 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
22215
22216         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
22217         lossage for local classes.
22218         * cp-tree.h: Declare it.
22219         * decl.c (lookup_name_real): Evil, painful hack for local classes.
22220         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
22221         Use hack_decl_function_context.
22222         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
22223         (start_function): Use hack_decl_function_context.
22224         (finish_function): Likewise.
22225         * method.c (synthesize_method): Likewise.
22226         * lex.c (process_next_inline): Likewise.
22227         (do_pending_inlines): Likewise.
22228         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
22229         done with it.
22230
22231 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
22232
22233         * sig.c (build_signature_pointer_or_reference_type): Align
22234         signature pointers/references on 8-byte boundaries so they can be
22235         grabbed 2 words at a time on a Sparc.
22236
22237 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
22238
22239         * method.c (hack_identifier): Requiring a static chain is now a
22240         hard error.
22241         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
22242         functions.
22243
22244 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
22245
22246         * init.c (build_offset_ref): Call complete_type.
22247
22248         * decl.c (pop_from_top_level): Always pop previous_class_type.
22249
22250         * parse.y: Handle multiple decls in a for-init-statement.
22251         * pt.c (tsubst_expr): Likewise.
22252
22253         * pt.c (tsubst): Use tsubst_expr for the second operand of an
22254         ARRAY_REF.
22255
22256         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
22257         (poplevel_class): Set it here.
22258         (pop_from_top_level): Pop it here if we're returning to class scope.
22259         * class.c (pushclass): Don't set it here.
22260
22261         * decl.c (maybe_push_to_top_level): Save current_template_parms,
22262         and clear it if !pseudo.
22263         (pop_from_top_level): Restore it.
22264
22265         * decl2.c (finish_file): Push the dummy each time we walk the list
22266         of vtables.
22267
22268         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
22269         something for CAST_EXPR.
22270
22271 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
22272
22273         * cvt.c (cp_convert): Warn about implicit conversion of the
22274         address of a function to bool, as it is always true.
22275
22276 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
22277
22278         * typeck.c (c_expand_return): Fix warning for local externs returned.
22279
22280 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
22281
22282         * tree.c (mapcar): Propagate const and volatile properly.
22283
22284         * typeck.c (complete_type): Be sure to instantiate the
22285         MAIN_VARIANT of the type.
22286
22287         * method.c (synthesize_method): Class interface hackery does not
22288         apply to synthesized methods.
22289
22290 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
22291
22292         * pt.c (comp_template_args): Use comptypes rather than just
22293         checking for TEMPLATE_TYPE_PARM equivalence.
22294
22295         * typeck.c (build_x_function_call): Call complete_type before
22296         checking TYPE_OVERLOADS_CALL_EXPR.
22297
22298 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
22299
22300         * g++.c (main): Check also for new define ALT_LIBM.
22301
22302 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
22303
22304         * pt.c (instantiate_class_template): If we don't have a pattern
22305         yet, that's OK.
22306         (coerce_template_parms): If we see a local class, bail.
22307
22308         * decl.c (grok_reference_init): Make sure there's a type before
22309         checking its code.
22310
22311         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
22312         (push_template_decl): Likewise.
22313
22314         * parse.y (named_class_head): Set
22315         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
22316
22317         * decl.c (xref_tag): Diagnose redeclaration of template
22318         type-parameter name.
22319
22320         * error.c (dump_type): Handle anonymous template type parms.
22321
22322         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
22323         TYPE_STUB_DECL.
22324         (coerce_template_parms): Likewise.
22325
22326 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
22327
22328         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
22329         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
22330
22331 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
22332
22333         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
22334         before trying to get its STUB_DECL.
22335         (coerce_template_parms): Likewise.
22336
22337         * parse.y (template_type_parm): If they didn't use 'class',
22338         pretend they did after giving an error.
22339
22340         * pt.c (coerce_template_parms): Diagnose use of local class.
22341
22342         * decl.c (grok_reference_init): Use instantiate_type.
22343
22344         * error.c (dump_expr): Handle TEMPLATE_DECLs.
22345
22346         * parse.y (named_class_head): Diagnose mismatching types and tags.
22347
22348         * decl.c (pushdecl): Type decls and class templates clash with
22349         artificial type decls, not hide them.
22350
22351         * decl.c (redeclaration_error_message): Diagnose redefinition of
22352         templates properly.
22353         (duplicate_decls): Diagnose disallowed overloads for template
22354         functions, too.
22355
22356         * decl.c (start_decl): Call complete_type before checking for a
22357         destructor.
22358
22359         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
22360
22361         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
22362
22363 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
22364
22365         * decl.c (grok_op_properties): Don't check for operator++(int) in
22366         a template.
22367
22368         * tree.c (perm_manip): Return a copy of variable and function
22369         decls with external linkage.
22370
22371         * tree.def: Change some of the min tree codes to type "1".
22372         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
22373         * method.c (build_overload_int): Emit something arbitrary for
22374         anything but an INTEGER_CST if we're in a template.
22375
22376         * decl.c (cp_finish_decl): Call complete_type before deciding
22377         whether or not to lay out the decl.
22378
22379         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
22380
22381 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
22382
22383         * typeck2.c (build_x_arrow): Call complete_type.
22384
22385         * pt.c (add_pending_template): Broken out.
22386         (lookup_template_class): If -fexternal-templates, call it for all
22387         the methods of implemented types.
22388         (instantiate_class_template): Instead of instantiating them here.
22389         (instantiate_decl): Handle -fexternal-templates earlier.
22390
22391 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22392
22393         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
22394         memoized lookup stuff inside GATHER_STATISTICS.
22395
22396 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
22397
22398         * decl.c (start_decl): Complain about array of incomplete type
22399         here.
22400         (grokdeclarator): Not here.
22401
22402         * parse.y (template_parm): Expand full_parm inline so we can set
22403         the rule's precedence.
22404
22405         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
22406         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
22407         * decl2.c (grokbitfield): Don't check for integer constant here.
22408         * class.c (finish_struct_1): Check here.
22409
22410         * decl.c (define_label): Make the min decl go on permanent_obstack.
22411
22412         * pt.c (unify): Don't handle CONST_DECLs.
22413         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
22414         (tsubst_copy): Likewise.
22415
22416         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
22417         CONST_DECL for a template parm.
22418
22419 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
22420
22421         * decl.c (grokdeclarator): Complain about array of incomplete type
22422         here.
22423         (start_decl_1): Not here.
22424
22425         * pt.c (tsubst): Handle pointer-to-function declarators.
22426
22427         * method.c (hack_identifier): If pedantic, diagnose local class
22428         methods that require a static chain.
22429
22430         * decl.c (grok_op_properties): No longer static.
22431         * cp-tree.h: Declare it.
22432         * pt.c (tsubst): Call it for operators.
22433         Use tsubst_copy for TREE_VECs.
22434
22435         * parse.y (template_arg): The expr has precedence like '>'.
22436
22437 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
22438
22439         * pt.c (coerce_template_parms): Don't coerce an expression using
22440         template parms.
22441         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
22442         (tsubst): Don't use build_index_2_type if the max_value uses template
22443         parms.
22444         * method.c (build_overload_int): Emit something arbitrary for an
22445         expression using template parms.
22446
22447         * parse.y (template_close_bracket): New non-terminal to catch use
22448         of '>>' instead of '> >' in template class names.
22449         (template_type): Use it.
22450         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
22451
22452         * tree.def: Add CAST_EXPR.
22453         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
22454         CONVERT_EXPR for minimal_parse_mode.
22455         * typeck.c (build_c_cast): Likewise.
22456         * pt.c (tsubst_copy): Likewise.
22457         * decl2.c (build_expr_from_tree): Likewise.
22458         * error.c (dump_expr): Likewise.
22459
22460 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22461
22462         * except.c (SetTerminate, SetUnexpected): Put back global vars.
22463         (init_exception_processing): Put back decl/init of
22464         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
22465         fns from libstdc++.
22466
22467         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
22468         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
22469         Delete unused fns.
22470         * cp-tree.h (declare_uninstantiated_type_level,
22471         uninstantiated_type_level_p): Delete prototypes.
22472
22473 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
22474
22475         * pt.c (tsubst_expr): Add default return.
22476
22477 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22478
22479         * error.c (fndecl_as_string): Delete unused arg CNAME.
22480         * sig.c (build_signature_table_constructor,
22481         build_signature_method_call): Fix calls.
22482
22483         * class.c (the_null_vtable_entry): Delete var definition.
22484         (init_class_processing): Delete tree the_null_vtable_entry init.
22485         * decl.c (no_print_{functions, builtins}): Declare as static.
22486         (__tp_desc_type_node): #if 0 var definition.
22487         (init_type_desc): #if 0 init of __tp_desc_type_node.
22488         (vb_off_identifier): Move var decl into init_decl_processing.
22489         (current_function_assigns_this): Declare as static.
22490         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
22491         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
22492         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
22493         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
22494         * init.c (BI_header_type, BI_header_size): Declare as static.
22495         * pt.c (template_classes): Delete unused var.
22496         (add_pending_template): Delete decl for non-existent fn.
22497         (lookup_template_class): Delete vars CODE and TAG_CODE.
22498         (instantiate_template): Delete unused var TARGS.
22499         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
22500         Delete decls.
22501         (__tp_desc_type_node): #if 0 var decl.
22502         (fndecl_as_string): Fix prototype.
22503
22504 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
22505
22506         * tree.def: Add GOTO_STMT.
22507         * pt.c (tsubst_expr): Support goto and labels.
22508         * decl.c (define_label): Support minimal parsing.
22509         * parse.y (simple_stmt): Likewise.
22510
22511 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22512
22513         * xref.c (GNU_xref_member): Only define/set var I if
22514         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
22515         used.
22516         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
22517         (GNU_xref_end): Fix call.
22518         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
22519         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
22520
22521         * tree.c (build_exception_variant): Delete unused vars I, A, T,
22522         T2, and CNAME.
22523         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
22524         (mapcar): Delete unused var CODE.
22525         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
22526         (break_out_cleanups): Fix call.
22527         (bot_manip): Likewise.
22528         * call.c (build_method_call): Likewise.
22529         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
22530         Likewise.
22531         * typeck.c (unary_complex_lvalue, build_modify_expr,
22532         convert_for_initialization): Likewise.
22533         * typeck2.c (build_functional_cast): Likewise.
22534         * cp-tree.h (build_cplus_new): Fix prototype.
22535
22536         * repo.c (open_repo_file): Delete unused var Q.
22537         (repo_compile_flags, repo_template_declared,
22538         repo_template_defined, repo_class_defined, repo_inline_used,
22539         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
22540         (repo_get_id, repo_vtable_used): Declare as static.
22541         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
22542         prototypes.
22543
22544 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
22545
22546         * parse.y (pending_inlines): Add function_try_block case.
22547
22548         * pt.c (unify): Fix for template const parms.
22549
22550 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22551
22552         * lex.c (extract_interface_info): Delete forward decl.
22553         (default_copy_constructor_body, default_assign_ref_body): Delete
22554         decls for non-existent functions.
22555         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
22556         (init_lex): Delete setting them.
22557         (cons_up_default_function): Delete unused vars FUNC_BUF,
22558         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
22559         #if 0'd synth code.
22560         (toplevel, expression_obstack): Delete unused extern decls.
22561         (tree_node_kind): Delete unused enum.
22562         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
22563         GATHER_STATISTICS.
22564         (tree_node_kind_names): Delete unused extern decl.
22565         (synth_obstack): Delete unused var.
22566         (init_lex): Don't set it.
22567         (init_parse): Add decl before use.
22568         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
22569         (current_unit_{name, language}): Delete unused vars.
22570         (check_newline): Don't bother setting them, just accept the #pragma.
22571         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
22572         (current_unit_{name, language}): Delete decls.
22573
22574         * search.c: Wrap all of the memoized functions, macros, and
22575         variables inside #ifdef GATHER_STATISTICS.
22576         (lookup_field, lookup_fnfields): Likewise.
22577         (init_search_processing): Likewise.
22578         (reinit_search_statistics): Wrap whole function.
22579         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
22580
22581         * decl.c (finish_function): Only call pop_memoized_context if
22582         GATHER_STATISTICS is defined.
22583         (start_function): Likewise for push_memoized_context.
22584         * class.c (pushclass, popclass): Likewise.
22585
22586         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
22587         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
22588
22589         * cvt.c (cp_convert): Delete unused local var FORM.
22590         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
22591         prototypes.
22592
22593 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
22594
22595         * pt.c (do_poplevel): Oops; really return what we get from
22596         poplevel this time.
22597
22598 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22599
22600         * cp-tree.h (is_aggr_type): Add prototype.
22601
22602         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
22603         * method.c ({push,pop}_cp_function_context): Delete decls.
22604         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
22605         (SetUnexpected, SetTerminate): Delete unused vars.
22606         (init_exception_processing): Don't set SetUnexpected or
22607         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
22608         (output_exception_table_entry): Delete unused array LABEL.
22609         (expand_internal_throw): Delete unused var PARAMS.
22610         (expand_start_catch_block): Delete unused var CLEANUP.
22611         (emit_exception_table): Delete unused var EH_NODE_DECL.
22612         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
22613         GOTO_UNWIND_AND_THROW.  Don't set them.
22614         (end_eh_unwinder): Add top decl.
22615         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
22616         (exception_section, push_rtl_perm, do_function_call,
22617         lang_interim_eh, push_eh_cleanup, eh_outer_context,
22618         expand_end_eh_spec, end_eh_unwinder): Declare as static.
22619         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
22620         throw_used): Likewise.
22621         * cp-tree.h (expand_end_eh_spec): Delete prototype.
22622
22623         * search.c (dfs_mark, dfs_mark_vtable_path,
22624         dfs_unmark_vtable_path, dfs_mark_new_vtable,
22625         dfs_unmark_new_vtable, dfs_clear_search_slot,
22626         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
22627         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
22628         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
22629         functions.
22630         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
22631         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
22632         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
22633         Only define #ifdef GATHER_STATISTICS.
22634         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
22635         is defined.
22636         (vbase_decl): Delete var definition.
22637         (init_search): Delete old decl.
22638         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
22639         never actually used.
22640         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
22641         (get_base_distance_recursive): Delete unused fourth arg
22642         BASETYPE_PATH.  Fix call .
22643         (get_base_distance): Fix call.
22644         (push_class_decls): Delete unused var ID.
22645         (make_memoized_table_entry): Declare as static.
22646         (breadth_first_search): Declare as static.
22647         (tree_has_any_destructor_p): Declare as static.
22648         (pop_class_decls): Delete unused arg pop_class_decls.
22649         * class.c (popclass): Fix call to pop_class_decls.
22650         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
22651         tree_has_any_destructor_p): Delete prototypes.
22652
22653         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
22654         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
22655         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
22656         (build_user_desc): Delete unused var T.
22657         (build_class_desc): Delete unused vars T and OFF.
22658         (build_t_desc): Delete unused var NAME_STRING.
22659         (build_headof): Make static.
22660         (get_bad_cast_node): Likewise.
22661         (get_def_to_follow): Likewise.
22662         * cp-tree.h (init_type_desc): Add prototype.
22663         (build_headof): Remove prototype.
22664
22665 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
22666
22667         * pt.c (tsubst): Only look for matching decls at file scope for
22668         non-member functions.
22669
22670         * call.c (build_scoped_method_call): Handle scoped destructor
22671         calls in templates.
22672
22673         * decl.c (*_top_level): Also save previous_class_values.
22674
22675         * pt.c (tsubst_expr): Support do {} while loops.
22676         * parse.y (simple_stmt): Likewise.
22677         * tree.def: Likewise.
22678
22679         * method.c (build_overload_identifier): For a class nested in a
22680         template class, don't mangle in the template parms from our
22681         context.
22682
22683         * lex.c, cp-tree.h: Remove support for template instantiations in
22684         the pending_inlines code.
22685         * pt.c: Remove dead functions and unused arguments.
22686         (uses_template_parms): TYPENAME_TYPEs always use template parms.
22687         * parse.y: Stop passing anything to end_template_decl.
22688         * tree.c (print_lang_statistics): Only print tinst info #ifdef
22689         GATHER_STATISTICS.
22690
22691 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22692
22693         * init.c (expand_recursive_init{,_1}): Delete decls.
22694         (sort_member_init): Delete unused var INIT.
22695         (emit_base_init): Delete unused var X.
22696         (build_offset_ref): Delete unused var CNAME.
22697         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
22698         (emit_base_init): Delete unused local var BASE.  Delete extern
22699         decl of IN_CHARGE_IDENTIFIER.
22700         (build_delete): Delete unused local var VIRTUAL_SIZE.
22701
22702         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
22703         (build_delete): Fix call.
22704         * decl2.c (delete_sanity): Likewise.
22705         * cp-tree.h (build_vec_delete): Update prototype.
22706
22707         * typeck.c (common_base_type): Delete unused var TMP.
22708         (build_binary_op): Delete local var ARGS_SAVE.
22709         (build_array_ref): Delete unused var ITYPE.
22710         (c_expand_return): Delete unused var USE_TEMP.
22711
22712         * typeck.c (compexcepttypes): Delete unused arg STRICT.
22713         (comptypes): Fix calls.
22714         * decl.c (duplicate_decls): Likewise.
22715         * cp-tree.h (compexcepttypes): Delete extra arg.
22716
22717         * decl2.c (check_classfn): Delete unused second arg CNAME.
22718         * decl.c (start_decl, grokfndecl): Fix calls.
22719         * init.c (do_friend): Likewise.
22720         * cp-tree.h (check_classfn): Update prototype.
22721
22722         * cp-tree.h (signature_error, import_export_vtable,
22723         append_signature_fields, id_in_current_class, mark_used,
22724         copy_assignment_arg_p): Add decls.
22725         * decl2.c (mark_used): Delete decl.
22726
22727         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
22728
22729         * class.c (get_vtable_entry): Disable unused function.
22730         (doing_hard_virtuals): Delete unused static global var.
22731         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
22732         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
22733         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
22734         (modify_one_vtable): Delete unused var OLD_RTTI.
22735         (finish_struct_anon): Delete unused vars OFFSET and X.
22736         (finish_struct_bits): Delete unused var METHOD_VEC.
22737         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
22738         for-scope local variable METHODS.
22739
22740         * call.c (user_harshness): Delete unused/unneeded arg PARM.
22741         (ideal_candidate): Delete unused args BASETYPE and PARMS.
22742         (build_method_call): Delete unused args passed into ideal_candidate.
22743         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
22744         * cp-tree.h (synthesize_method): Add decl.
22745
22746         * decl.c (note_level_for_for): Give void return type.
22747         (pushdecl_nonclass_level): Likewise.
22748         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
22749         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
22750         (suspend_binding_level): Delete unused var LEVEL.
22751         (duplicate_decls): Delete unused var CTYPE.
22752         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
22753         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
22754         PTR_ENDLINK.
22755         (grokdeclarator): Delete unused var C.
22756         (grokdeclarator): Delete unused var SIZE_VARIES.
22757         (grokparms): Delete unused var SAW_VOID.
22758         (start_function): Delete unused var OLDDECL.
22759         (cplus_expand_expr_stmt): Delete unused var
22760         REMOVE_IMPLICIT_IMMEDIATELY.
22761
22762         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
22763
22764         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
22765
22766 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
22767
22768         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
22769         (build_min_nt): Likewise.
22770         * pt.c (do_pushlevel): Emit line note.
22771         (do_poplevel): Return what we get from poplevel.
22772         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
22773         * parse.y: Use do_pushlevel and do_poplevel.
22774         * cp-tree.h: Declare do_poplevel.
22775
22776         * cp-tree.h: Declare at_eof.
22777         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
22778         * decl2.c (import_export_decl): Renamed from import_export_inline.
22779         (finish_file): Call it to do interface handling for statics.
22780         * pt.c (tsubst_copy): Call mark_used on variables and functions
22781         used here.
22782
22783         * decl2.c (finish_file): Don't emit statics we can't generate.
22784         * pt.c (instantiate_decl): Don't set interface on instantiations
22785         we can't generate.
22786
22787         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
22788         * tree.c (print_lang_statistics): Print max template depth.
22789         * pt.c (push_tinst_level): Dump entire instantiation context.
22790         (instantiate_class_template): Use it and pop_tinst_level.
22791         (instantiate_decl): Likewise.
22792
22793         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
22794         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
22795
22796 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
22797
22798         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
22799         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
22800         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
22801         the new template implementation.
22802
22803 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22804
22805         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
22806
22807 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
22808
22809         * decl.c (cp_finish_decl): Delay emitting the debug information for
22810         a typedef that has been installed as the canonical typedef, if the
22811         type has not yet been defined.
22812
22813 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
22814
22815         * decl2.c (grokfield): Still call pop_nested_class for access decls.
22816
22817 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22818
22819         * decl.c (lookup_label): Call label_rtx.
22820
22821         * decl.c (make_binding_level): New function.
22822         (pushlevel, pushlevel_class): Call it instead of explicit
22823         duplicate calls to xmalloc.
22824
22825         * decl.c (init_decl_processing): Delete useless build_pointer_type
22826         call.
22827
22828         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
22829         (sizet_ftype_string): Delete variable.
22830         (init_decl_processing): Add built-in functions fabsf, fabsl,
22831         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
22832         variable strlen_ftype, used for strlen.
22833
22834 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
22835
22836         * decl.c (push_to_top_level): Start from current_binding_level
22837         again for now; the stl hacks depend on g++ being broken in this
22838         way, and it'll be fixed in the template rewrite.
22839
22840         * tree.def: Add USING_DECL.
22841         * decl2.c (do_class_using_decl): Implement.
22842         (grokfield): Pass access decls off to do_class_using_decl instead of
22843         grokdeclarator.
22844         * error.c (dump_decl): Handle USING_DECLs.
22845         * decl.c (grokdeclarator): Remove code for handling access decls.
22846         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
22847         as access decls for now.
22848         (finish_struct): Don't check USING_DECLs for other uses of the name.
22849
22850         * search.c (get_matching_virtual): Use cp_error_at.
22851
22852 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22853
22854         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
22855         match c-typeck.c.
22856         (self_promoting_args_p): Move the check that TYPE is non-nil
22857         before trying to look at its main variant.
22858         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
22859
22860         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
22861         Delete macros.
22862         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
22863         (do_friend): Delete call to xref_friend.
22864         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
22865
22866         * typeck.c (convert_sequence): #if 0 unused function.
22867
22868         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
22869         be in decl_in_memory_p.
22870         (decl_in_memory_p): Delete decl.
22871         * expr.c (decl_in_memory_p): Delete fn.
22872         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
22873
22874         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
22875
22876 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
22877
22878         * class.c (finish_struct_1): Check for a pure-specifier on a
22879         non-virtual function here.
22880
22881         * decl2.c (grok_function_init): Don't check whether the function
22882         is virtual here.
22883         (grokfield): Don't call check_for_override here.
22884
22885         * decl.c (push_to_top_level): Start from inner_binding_level,
22886         check class_shadowed in class levels.
22887
22888 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
22889
22890         * decl.c (resume_level): Ignore things that don't have names, instead
22891         of core dumping.
22892
22893 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22894
22895         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
22896
22897 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
22898
22899         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
22900         synthesized dtor.
22901
22902         * parse.y (complete_type_name): Bind global_scope earlier.
22903         (complex_type_name): Likewise.
22904         (qualified_type_name): Remove.
22905
22906 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
22907
22908         * decl.c (grokfndecl): Move code that looks for virtuals in base
22909         classes...
22910         * class.c (check_for_override): ... to a new function.
22911         (finish_struct_1): Call it.
22912
22913         * cp-tree.h: Declare warn_sign_compare.
22914
22915         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
22916         rather than extra_warnings to decide whether to warn about
22917         comparison of signed and unsigned.
22918
22919         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
22920         implies -Wsign-compare.  -Wall doesn't imply -W.
22921
22922 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
22923
22924         * typeck.c (build_component_ref): Fix to handle anon unions in base
22925         classes as well.
22926
22927 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22928
22929         * class.c (resolves_to_fixed_type_p): Delete code dealing with
22930         a WITH_CLEANUP_EXPR, since we don't generate them any more.
22931         * cvt.c (build_up_reference): Likewise.
22932         * decl.c (grok_reference_init): Likewise.
22933         (cp_finish_decl): Likewise.
22934         * error.c (dump_expr): Likewise.
22935         * tree.c (real_lvalue_p): Likewise.
22936         (lvalue_p): Likewise.
22937         (build_cplus_new): Likewise.
22938         (unsave_expr_now): Likewise.
22939         * typeck.c (unary_complex_lvalue, build_modify_expr,
22940         c_expand_return): Likewise.
22941
22942 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22943
22944         Make the C++ front-end pay attention to attributes for structures.
22945         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
22946         finish_struct_1.
22947         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
22948         Take out old round_up_size use and setting the DECL_ALIGN possibly
22949         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
22950         can override what the attribute set.
22951         * cp-tree.h (finish_struct): Update prototype.
22952         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
22953         attributes to finish_struct.
22954         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
22955         value down into finish_struct.
22956         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
22957
22958 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
22959
22960         * decl.c (poplevel):  Re-word dead for local handling.
22961         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
22962         (cp_finish_decl):  If is_for_scope, check for duplicates so
22963         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
22964
22965         * lex.c (do_identifier):  Use global binding in preference of
22966         dead for local variable.
22967
22968 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
22969
22970         * init.c (initializing_context): Handle anon union changes, the
22971         context where fields of anon unions can be initialized now has to be
22972         found by walking up the TYPE_CONTEXT chain.
22973
22974 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
22975
22976         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
22977         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
22978         (obscure_complex_init): If bss is supported, always set
22979         DECL_INITIAL to error_mark_node.
22980
22981 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22982
22983         * init.c (is_friend): Make sure there's a context before we see if
22984         it's an aggr type.
22985
22986 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
22987
22988         * init.c (is_friend): Classes are not friendly with nested classes.
22989
22990 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
22991
22992         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
22993         and record its result.
22994
22995 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
22996
22997         * class.c (finish_struct_anon): Switch around code to not move anon
22998         union elements around, nor mess up their contexts, nor offsets,
22999         instead we now build up the right number of COMPONENT_REFs for all
23000         the anon unions that may be present at build_component_ref time.
23001         * typeck.c (lookup_anon_field): New routine to handle field lookup
23002         on fields without names.  We find them, based upon their unique type
23003         instead.
23004         * typeck.c (build_component_ref): Allow FIELD_DECL components.
23005         Handle finding components in anonymous unions, and ensure that a
23006         COMPONENT_REF is built for each level as necessary.
23007
23008 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
23009
23010         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
23011         code that ensures that copy ctors are used if appropriate.
23012
23013 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23014
23015         * init.c (build_vec_delete): Only give an error if base isn't an
23016         error_mark_node.
23017
23018 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
23019
23020         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
23021         (yylex): If we see `new', keep slurping.
23022
23023 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
23024
23025         * class.c (finish_struct_1): Move code for handling anon unions...
23026         (finish_struct_anon): to here.  Fixup so that we do the offset
23027         calculations right, and so that the fields are physically moved to
23028         the containers's chain.
23029
23030 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23031
23032         * decl.c (grokdeclarator): Avoid trying to get an operand off an
23033         identifier node.
23034
23035 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
23036
23037         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
23038         POINTER_SIZE to agree with expr.c.
23039
23040 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
23041
23042         * search.c (lookup_field): Don't report ambiguities if protect is 0,
23043         instead return NULL_TREE.
23044
23045 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
23046
23047         * class.c (finish_struct_1): Call warn_hidden if we want warnings
23048         about overloaded virtual functions.
23049         (warn_hidden): New routine to warn of virtual functions that are
23050         hidden by other virtual functions, that are not overridden.
23051         (get_basefndecls): New routine, used by warn_hidden.
23052         (mark_overriders): New routine, used by warn_hidden.
23053         * search.c (get_matching_virtual): Remove old warning that just
23054         isn't very useful.
23055
23056 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23057
23058         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
23059
23060         * typeck.c (null_ptr_cst_p): Delete unused fn.
23061         (build_function_call_maybe): Delete unused fn.
23062
23063         * expr.c (extract_init): #if 0 the code after unconditional return 0
23064         for now.
23065
23066         Delete old cadillac code.
23067         * edsel.c: Remove file.
23068         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
23069         * Makefile.in (CXX_OBJS): Delete edsel.o.
23070         (edsel.o): Delete rule.
23071         * cp-tree.h (flag_cadillac): Delete var decl.
23072         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
23073         * decl2.c (flag_cadillac): Delete var definition.
23074         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
23075         (grokfield): Delete code depending on flag_cadillac.
23076         (finish_anon_union): Likewise.
23077         * class.c (finish_struct_1): Likewise.
23078         (pushclass): Likewise.
23079         (popclass): Likewise.
23080         (push_lang_context): Likewise.
23081         (pop_lang_context): Likewise.
23082         * decl.c (init_decl_processing): Likewise.
23083         (start_decl): Likewise.
23084         (cp_finish_decl): Likewise.
23085         (xref_tag): Likewise.
23086         (finish_enum): Likewise.
23087         (start_function): Likewise.
23088         (finish_function): Likewise.
23089         (finish_stmt): Likewise.
23090         * lex.c (lang_init): Likewise.
23091         (check_newline): Likewise.
23092
23093         * lex.c (do_pending_inlines): Delete synthesized method kludge.
23094
23095         Delete defunct, ancient garbage collection implementation.
23096         * rtti.c: New file with the RTTI stuff from gc.c.
23097         * gc.c: Removed file (moved the remaining stuff into rtti.c).
23098         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
23099         (rtti.o): New rule, replacing gc.o.
23100         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
23101         * cp-tree.h: Delete gc-related fn decls.
23102         (DECL_GC_OFFSET): Delete macro.
23103         (flag_gc): Delete extern decl.
23104         * decl.c (current_function_obstack_index): Delete var decl.
23105         (current_function_obstack_usage): Delete var decl.
23106         (start_function): Delete clearing of current_function_obstack_index
23107         and current_function_obstack_usage.
23108         (init_decl_processing): Delete code relying on -fgc.
23109         Delete call to init_gc_processing.
23110         (cp_finish_decl): Delete calls to build_static_gc_entry and
23111         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
23112         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
23113         and to expand_expr of a __gc_main call.
23114         (maybe_gc_cleanup): Delete var decl.
23115         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
23116         * decl2.c (flag_gc): Delete var decl.
23117         (lang_f_options): Delete offering of -fgc.
23118         (lang_decode_option): Delete -fgc and -fno-gc handling.
23119         (get_temp_regvar): Delete gc code.
23120         * init.c (build_new): Delete gc code.
23121         * lex.c (init_lex): Delete checking of flag_gc.
23122
23123         * typeck.c (convert_arguments): Delete gc code.
23124         (build_component_addr): Delete -fgc warning.
23125         (build_modify_expr): Delete gc code.
23126
23127         * decl2.c (build_push_scope): Delete fn.
23128         * cp-tree.h (build_push_scope): Delete decl.
23129
23130         * search.c (clear_search_slots): Delete fn.
23131         * cp-tree.h (clear_search_slots): Delete decl.
23132
23133         * search.c (tree_needs_constructor_p): Delete fn.
23134         * cp-tree.h (tree_needs_constructor_p): Delete decl.
23135
23136         * tree.c (id_cmp): Delete fn.
23137
23138         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
23139         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
23140
23141         * tree.c (decl_value_member): Delete fn.
23142         * cp-tree.h (decl_value_member): Delete decl.
23143
23144         * tree.c (list_hash_lookup_or_cons): Delete fn.
23145         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
23146
23147         * method.c (cplus_exception_name): Delete fn.
23148         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
23149
23150         * spew.c (shift_tokens): Delete fn.
23151
23152 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
23153
23154         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
23155         to cp_finish_decl.
23156         * parse.y: Likewise.
23157
23158 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23159
23160         * tree.c (build_cplus_staticfn_type): Delete function definition;
23161         never used.
23162         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
23163
23164         * tree.c (virtual_member): Delete function definition; never used.
23165         * cp-tree.h (virtual_member): Delete decl.
23166
23167 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
23168
23169         * typeck.c (build_component_ref): Handle getting vbase pointers
23170         out of complex multiple inheritance better.
23171
23172 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
23173
23174         * typeck.c (build_object_ref): Make sure we use the real type, not
23175         any reference type.
23176
23177 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
23178
23179         * tree.c (build_exception_variant): Don't create new types if we
23180         don't have to, also build new types on the right obstack.
23181
23182 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
23183
23184         * decl.c (store_bindings): Split out from push_to_top_level.
23185         (push_to_top_level): Call it for b->type_shadowed on class binding
23186         levels.
23187
23188 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
23189
23190         * search.c (expand_upcast_fixups): Fix so that offsets stored in
23191         vbase_offsets are always right.  Fixes a problem where virtual base
23192         upcasting and downcasting could be wrong during conversions on this
23193         during virtual function dispatch at ctor/dtor time when dynamic
23194         vtable fixups for deltas are needed.  This only sounds easier than
23195         it is.  :-)
23196         (fixup_virtual_upcast_offsets): Change to reflect new calling
23197         convention for expand_upcast_fixups.
23198
23199 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23200
23201         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
23202         check that it's usable as the bitfield width.
23203
23204 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23205
23206         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
23207         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
23208         only ever used for functions in it.
23209
23210 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
23211
23212         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
23213         (nested_type): Likewise.
23214         (nested_name_specifier): Use lastiddecl.
23215
23216         * decl.c (grokdeclarator): Adjust accordingly.
23217         * init.c (expand_member_init): Likewise.
23218         * parse.y (base_class): Likewise.
23219         * typeck2.c (build_functional_cast): Likewise.
23220
23221         * typeck2.c (build_functional_cast): Fill in name after we've
23222         checked for non-aggr type.
23223
23224 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
23225
23226         * decl2.c (warn_pointer_arith): Default to on.
23227
23228 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
23229
23230         * lex.c (is_rid): New function.
23231         * decl.c (grokdeclarator): Diagnose reserved words used as
23232         declarator-ids.
23233
23234 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
23235
23236         * tree.c (get_decl_list): Don't lose cv-quals.
23237
23238         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
23239         typespecs used as declarator-ids.
23240
23241 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
23242
23243         * decl.c (poplevel): When poping a level, don't give a warning for
23244         any subblocks that already exist.
23245
23246 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
23247
23248         * typeck.c (build_object_ref): Finish what I started.
23249
23250         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
23251
23252         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
23253
23254         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
23255         scope.
23256
23257 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
23258
23259         * decl.c (xref_tag): Handle passing a type in directly.
23260
23261         * parse.y (qualified_type_name): Pull out the type.
23262         (nested_type): Likewise.
23263         Take types directly instead of as identifiers.
23264         * call.c (build_scoped_method_call): Take types directly instead of
23265         as identifiers.
23266         * decl.c (xref_basetypes): Likewise.
23267         * init.c (expand_member_init): Likewise.
23268         (build_member_call): Likewise.
23269         (build_offset_ref): Likewise.
23270         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
23271         * method.c (do_build_assign_ref): Likewise.
23272         * decl.c (grokdeclarator): Handle a type appearing as the
23273         declarator-id for constructors.
23274         * method.c (do_build_copy_constructor): current_base_init_list now
23275         uses the types directly, not their names.
23276         * init.c (sort_base_init): Likewise.
23277         (expand_member_init): Likewise.
23278         * init.c (is_aggr_type): New function, like is_aggr_typedef.
23279
23280 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
23281
23282         * tree.c (layout_basetypes): Call build_lang_field_decl instead
23283         of build_lang_decl if first arg is a FIELD_DECL.
23284
23285 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23286
23287         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
23288         non-empty.
23289         * except.c (expand_start_catch_block): Set TREE_USED to avoid
23290         warnings about the catch handler.
23291
23292 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
23293
23294         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
23295         expand_target_expr.
23296
23297 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23298
23299         Fix access control to use trees rather than integers.
23300         * class.c (access_{default, public, protected, private,
23301         default_virtual, public_virtual, private_virtual}_node): Add
23302         definitions.
23303         (init_class_processing): Do creation of those nodes.
23304         * cp-tree.h (access_type): Delete enum decl.
23305         (access_{default, public, protected, private, default_virtual,
23306         public_virtual, private_virtual}_node): Add decls.
23307         (compute_access): Change return type.
23308         * search.c (compute_access): Have tree return type, instead of enum.
23309         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
23310         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
23311         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
23312         * parse.y (VISSPEC): Make ttype rather than itype.
23313         (base_class_access_list): Likewise.
23314         * *.[cy]: Change all refs of `access_public' to `access_public_node',
23315         etc.
23316         * call.c (build_method_call): Make ACCESS be a tree.
23317         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
23318         * cvt.c (convert_to_aggr): Likewise.
23319         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
23320         Likewise.
23321         * method.c (hack_identifier): Likewise.
23322         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
23323
23324 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
23325
23326         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
23327         frontend, and make it more consistent with respect to
23328         warn_pointer_arith.
23329
23330 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
23331
23332         * decl.c (pushdecl): Check for duplicate parameter names.
23333
23334 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
23335
23336         * decl.c (expand_static_init): Call assemble_external for atexit.
23337
23338 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
23339
23340         * except.c (do_unwind): Remove some generated dead code.
23341         (eh_outer_context): New routine, factor out some common code from
23342         expand_builtin_throw and end_eh_unwinder.  Add code to do return
23343         address masking for the PA.
23344         (expand_builtin_throw): Use eh_outer_context instead of open coding
23345         it here.
23346         (end_eh_unwinder): Likewise.
23347
23348 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
23349
23350         * except.c (expand_throw): Call assemble_external for __empty, if we
23351         use it.
23352
23353 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
23354
23355         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
23356         NORMAL_RETURN_ADDR_OFFSET.
23357         (end_eh_unwinder): Likewise.
23358
23359 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
23360
23361         * gc.c (build_dynamic_cast): Make sure we don't cast away const
23362         when dealing with references, and make sure we handle dynamic
23363         casting to a cv qualified reference.
23364
23365 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
23366
23367         * except.c (struct eh_context): New structure top hold eh context
23368         information.
23369         (push_eh_context): New routine.
23370         (pop_eh_context): Likewise.
23371         * decl.c (push_cp_function_context): Use them.
23372         (pop_cp_function_context): Likewise.
23373
23374 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
23375
23376         * decl2.c (finish_file): Also prune uninteresting functions in the
23377         inline emission loop.
23378
23379 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
23380
23381         * sig.c (build_signature_table_constructor): Mark functions
23382         in the signature as referenced.
23383
23384 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
23385
23386         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
23387         the inline emission stuff.
23388
23389 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
23390
23391         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
23392         weak symbols.
23393         * lang-options.h: Add -f{no-,}weak.
23394         * decl.c (init_decl_processing): If the target does not support weak
23395         symbols, don't use them.
23396         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
23397
23398 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
23399
23400         * init.c (expand_member_init): warning for base init after members.
23401
23402 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
23403
23404         * cvt.c (build_expr_type_conversion): Don't convert to a reference
23405         type.
23406
23407 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
23408
23409         * method.c (report_type_mismatch): Improve wording for volatile
23410         mismatches.
23411
23412 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
23413
23414         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
23415         expand_assignment, as the later doesn't handle things that have
23416         copy constructors well.  The compiler would do bitwise copying,
23417         instead of ctor calling in some cases.
23418
23419 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
23420
23421         * g++.c (my_strerror): Return "cannot access" if errno is 0.
23422         (pfatal_with_name, perror_exec): Don't assume that
23423         the returned value from my_strerror contains no '%'s.
23424         (concat): Remove.
23425         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
23426
23427 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
23428
23429         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
23430         TYPE_METHODS/TREE_CHAIN mean what they used to.
23431         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
23432         instead of TYPE_METHODS.
23433         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
23434         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
23435         * cp-tree.h (CLASSTYPE_METHODS): Lose.
23436         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
23437         TYPE_METHODS.
23438         (struct lang_decl): Lose next_method field.
23439         (DECL_NEXT_METHOD): Lose.
23440         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
23441         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
23442         anymore.
23443         (finish_struct_methods): Don't mess with the TREE_CHAINs in
23444         fn_fields.
23445
23446         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
23447         vector.
23448
23449         * call.c (build_method_call): Synthesize here even when not inlining.
23450         * typeck.c (build_function_call_real): Likewise.
23451
23452 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
23453
23454         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
23455         == DBX_DEBUG, call dbxout_start_new_source_file and
23456         dbxout_resume_previous_source_file when appropriate.
23457
23458 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
23459
23460         * except.c (start_anon_func): Push to the top level.
23461         (end_anon_func): Pop from the top level.
23462
23463 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
23464
23465         * cp-tree.h (build_cleanup): New routine to build cleanups.
23466         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
23467         call at ctor time and use atexit to run it later.
23468         * decl2.c (build_cleanup): New routine, taken from finish_file.
23469         (finish_file): Use build_cleanup instead, and don't put function
23470         local statics in global dtor list.
23471
23472 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
23473
23474         * except.c (expand_throw): Ensure that we have cleanups, if we try
23475         and expand cleanups.
23476
23477 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
23478
23479         * except.c (expand_throw): Add logic to manage dynamic cleanups for
23480         the EH object.
23481         (expand_end_catch_block): Use the magic of expand_goto, instead of
23482         emit_jump so that we get the cleanup for any catch clause parameter
23483         and the cleanup for the exception object.  Update to reflect label
23484         changes.
23485         (push_eh_cleanup): New routine to register a cleanup for an
23486         exception object.
23487         (empty_fndecl): Used to default cleanup actions to
23488         nothing.
23489         (init_exception_processing): Setup empty_fndecl.  Setup
23490         saved_cleanup.
23491         (expand_start_catch_block): Update to reflect label changes.  Call
23492         push_eh_object to register the cleanup for the EH object.
23493         (start_anon_func): New routine to start building lambda expressions
23494         from trees.
23495         (end_anon_func): New routine to end them.
23496         (struct labelNode): Change so that we can use tree labels, or rtx
23497         labels.
23498         (saved_cleanup): Object to check for dynamic cleanups for the
23499         exception handling object.
23500         (push_label_entry): Change so that we can use tree labels, or rtx
23501         labels.
23502         (pop_label_entry): Likewise.
23503         (top_label_entry): Likewise.
23504         (expand_start_all_catch): Use tree label instead of rtx label, so
23505         that we can get the magic of expand_goto.
23506         (expand_end_all_catch): Update to reflect label changes.
23507
23508         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
23509         use UNSAVE_EXPRs.
23510         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
23511         building_cleanup logic, as we now use UNSAVE_EXPRs.
23512         * cp-tree.h (unsave_expr): Declare it.
23513         * decl.c (building_cleanup): Remove.
23514         (maybe_build_cleanup): Remove building_cleanup logic, and use
23515         UNSAVE_EXPR instead.
23516
23517 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
23518
23519         * gc.c (build_t_desc): Update error message to say <typeinfo>.
23520
23521 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
23522
23523         * decl.c (pushdecl): Only warn about shadowing a local variable if
23524         warn_shadow is true.
23525
23526 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
23527
23528         * typeck.c (build_binary_op_nodefault): Added warning about
23529         comparisons between different enum types with -Wall, unless
23530         -fenum-int-equiv set.
23531
23532 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
23533
23534         * class.c (finish_struct_1): Skip down to the inner type in
23535         multidimensional arrays.  Ensures ctors will be made for types that
23536         need constructing.
23537
23538 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
23539
23540         * decl.c (last_dtor_insn): New to track the last compiler generated
23541         insn in a dtor.
23542         (store_parm_decls): Set it.
23543         (finish_function): Use it to see if the dtor is empty.  Avoid doing
23544         vtable setup all the time, if we can.
23545         (struct cp_function): Add last_dtor_insn.
23546         (push_cp_function_context): Save it.
23547         (pop_cp_function_context): Restore it.
23548
23549 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
23550
23551         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
23552         warnings.
23553
23554 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
23555
23556         * typeck.c (expand_target_expr): Make sure targets get put into the
23557         current temp_slot_level, so that the free_temp_slots call will reuse
23558         them.
23559
23560 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
23561
23562         * class.c (finish_struct_1): Delay delta fixups for virtual bases
23563         until after we have done the hard virtuals, to avoid a bogus `every
23564         virtual function must have a unique final overrider' for virtual
23565         functions that are only overridden by hard virtuals.
23566
23567 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
23568
23569         * pt.c (do_function_instantiation): Don't try to find a file-scope
23570         template for a member function.
23571
23572 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
23573
23574         * g++.c (main): Add handling of -nodefaultlibs.
23575
23576 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
23577
23578         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
23579         distinguish between direct bindings of reference variables, and
23580         indirect bindings of reference variables.
23581         * cvt.c (build_up_reference): Use it.
23582         * typeck.c (convert_arguments): Use it to indicate this is an
23583         indirect binding.
23584         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
23585         as they are unused.
23586         (expand_static_init): Likewise.
23587         (cplus_expand_expr_stmt): Likewise.
23588         * decl2.c (finish_file): Likewise.
23589         * init.c (perform_member_init): Likewise.
23590         (emit_base_init): Likewise.
23591         (expand_aggr_vbase_init_1): Likewise.
23592
23593 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
23594
23595         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
23596         get a DECL_LANG_SPECIFIC node.
23597         * cp-tree.h (lang_decl_flags): Add new member `level'.
23598         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
23599         decl_flags level member.
23600
23601 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
23602
23603         * call.c (build_method_call): Make sure instance has a
23604         TYPE_LANG_SPECIFIC node before we dive into it.
23605
23606 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
23607
23608         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
23609
23610 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
23611
23612         * decl.c (duplicate_decls): When smashing decls, smash staticness in
23613         the usual way.
23614
23615 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
23616
23617         * decl.c (poplevel): Handle the merging of subblocks of cleanups
23618         when finishing blocks that have already been created (usually due to
23619         the fixup goto code).  Fixes bad debugging information.
23620
23621 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
23622
23623         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
23624         that's not a list of overloaded functions.
23625
23626 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
23627
23628         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
23629         before trying to use DECL_ABSTRACT_VIRTUAL_P.
23630
23631 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
23632
23633         * decl2.c (mark_used): New function for hooking into setting of
23634         TREE_USED on decls.
23635         * call.c (build_method_call): Use it.
23636         * class.c (instantiate_type): Likewise.
23637         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
23638         for all like-named functions.
23639         * method.c (hack_identifier): Likewise.
23640         (emit_thunk): Don't call assemble_external.
23641         (make_thunk): Create thunk as a FUNCTION_DECL so that it
23642         gets the right mode and ENCODE_SECTION_INFO works.
23643
23644         * parse.y: Use mark_used.  Pass operator names to do_identifier.
23645         * lex.c (do_identifier): Handle operator names.
23646
23647         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
23648
23649 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
23650
23651         * errfn.c: Include stdio.h.
23652         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
23653
23654 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
23655
23656         * typeck2.c (digest_init): Always convert initializers to the
23657         right type.
23658
23659 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
23660
23661         * init.c (member_init_ok_or_else): Don't allow member initializers
23662         for indirect members, as it is invalid.
23663
23664 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
23665
23666         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
23667
23668 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
23669
23670         * parse.y (for.init.statement): Catch compound statements inside for
23671         initializations, if we're being pedantic.
23672
23673 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
23674
23675         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
23676         looking for.
23677
23678 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
23679
23680         * error.c (dump_expr): Don't core dump when a boolean expression is
23681         used as a default argument.
23682
23683 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
23684
23685         * class.c (finish_struct_bits): Check aggregate_value_p instead of
23686         RETURN_IN_MEMORY.
23687
23688 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
23689
23690         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
23691         BLKmode type that would otherwise be returned in registers.
23692
23693 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
23694
23695         * g++.c (WITHLIBC): New macro.
23696         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
23697         saw_libc and pass it at the end if it was set.
23698
23699 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
23700
23701         * parse.y (fn.def1): Call split_specs_attrs in
23702         declmods notype_declarator case.