87cea7059bcd3cd028dea55a332d0018ff2230bc
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
2
3         * ir.texi: Correct typo.
4         * mangle.c (write_expression): Handle non-type template arguments
5         with reference type.
6         * method.c (build_overload_value): Likewise.
7         * pt.c (convert_nontype_argument): Explicitly represent conversion
8         to a reference with an ADDR_EXPR.
9         (unify): Always unify arguments in left-to-right order.
10
11 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
12             Mark Mitchell  <mark@codesourcery.com>
13
14         * Make-lang.in (CXX_SRCS): Add mangle.c.
15         * Makefile.in (CXX_OBJS): Add mangle.o.
16         (mangle.o): New rule.
17
18         * class.c (local_classes): New variable.
19         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
20         (get_vtt_name): Use mangle_vtt_name for new ABI.
21         (init_class_processing): Initialize local_classes.
22         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
23         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
24         (std_identifier): New macro.
25         (DECL_VOLATILE_MEMFUNC_P): New macro.
26         (DECL_NAMESPACE_STD_P): Likewise.
27         (local_classes): Declare.
28         (get_mostly_instantiated_function_type): Declare.
29         (init_mangle): Declare.
30         (mangle_decl): Likewise.
31         (mangle_type_string): Likewise.
32         (mangle_type): Likewise.
33         (mangle_typeinfo_for_type): Likewise.
34         (mangle_typeinfo_string_for_type): Likewise.
35         (mangle_vtbl_for_type): Likewise.
36         (mangle_vtt_for_type): Likewise.
37         (mangle_ctor_vtbl_for_type): Likewise.
38         (mangle_thunk): Likewise.
39         (mangle_conv_op_name_for_type): Likewise.
40         (mangle_guard_variable): Likewise.
41         * decl.c (pushtag): Keep track of local classes.
42         (initialize_predefined_identifiers): Initialize std_identifier.
43         (init_decl_processing): Use std_identifier.
44         (start_decl): Don't treat instantiations as specializations.
45         (grokdeclarator): Likewise.
46         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
47         name for fully-instantiated templates.
48         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
49         destructors with the new ABI.   
50         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
51         (grokfield): Use mangle_type for new ABI.
52         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
53         (get_sentry): Use mangle_guard_variable for new ABI.
54         (start_static_initialization_or_destruction): Likewise.
55         * expr.c (extract_aggr_init): Remove.
56         (extract_scalar_init): Likewise.
57         (extract_init): Remove #if 0'd code.
58         * mangle.c: New function.
59         * method.c (build_mangled_name): Assert not flag_new_abi.
60         (build_static_name): Likewise.
61         (build_decl_overload_real): Likewise.
62         (build_typename_overload): Likewise.
63         (build_overload_with_type): Likewise.
64         (build_overload_name): Likewise.
65         (get_ctor_vtbl_name): Likewise.
66         (start_squangling): Likewise.
67         (get_id_2): Likewise.
68         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
69         (init_method): Call init_mangle for new ABI.
70         (make_thunk): Call mangle_thunk for new ABI.
71         * operators.def: Correct new ABI manglings for the `%' operator.
72         Add `::' operator.
73         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
74         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
75         (lookup_template_class): Call mangle_decl for new ABI.
76         (get_mostly_instantiated_function_type): New function.
77         (set_mangled_name_for_template_decl): Use it.
78         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
79         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
80         conversion op names.
81         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
82         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
83         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
84         mangle_typeinfo_string_for_type.
85         
86 2000-06-01  Richard Henderson  <rth@cygnus.com>
87
88         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
89
90 2000-06-01  Richard Henderson  <rth@cygnus.com>
91
92         * decl2.c (unsupported_options): Fix typo, make const.
93         (lang_decode_option): Fix bsearch argument order.
94
95 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
96
97         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
98         on FIELD_DECLs.
99
100 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
101
102         * cp-tree.h (c_get_alias_set): Deleted.
103         * Makefile.in (decl.o): Include ../expr.h.
104         * decl.c (expr.h): Include.
105         (init_decl_processing): Call record_component_aliases for arrays.
106         (grokdeclarator): Likewise.
107         Set TREE_ADDRESSABLE for fields that aren't bitfields.
108         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
109
110 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
111
112         Remove guiding declaration support.
113         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
114         (flag_guiding_decls): Remove.
115         * call.c (build_user_type_conversion_1): Remove support for
116         guiding decls.
117         (build_new_function_call): Likewise.
118         (build_new_op): Likewise.
119         (build_new_method_call): Likewise.
120         * decl.c (start_function): Likewise.
121         * friend.c (is_friend): Likewise.
122         (do_friend): Likewise.
123         * decl2.c ((flag_dump_translation_unit): Make it const.
124         (flag_guiding_decls): Remove.
125         (unsupported_options): New variable
126         (compare_options): New function.
127         (lang_decode_option): Use them.
128         
129         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
130
131         * method.c (mangle_expression): Adjust test for legal expression
132         operators.
133
134         * pt.c (instantiate_decl): Save and restore the local
135         specializations list.
136
137 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
138
139         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
140
141 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
142
143         * call.c (add_template_candidate_real): Handle member template
144         constructors for classes with virtual bases.
145         (build_user_type_conversion_1): Use in_charge_arg_for_name.
146         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
147
148         * ir.texi: Update thunk documentation.
149         
150         * call.c (joust): Fix handling of overloaded builtin operators.
151
152 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
153
154         * cp-tree.h (DECL_ANTICIPATED): New macro.
155         Document new use of DECL_LANG_FLAG_7.
156         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
157         in the user namespace.
158         * lex.c (do_identifier): If the identifier's declaration has
159         DECL_ANTICIPATED on, it has not yet been declared.  But do not
160         replace it with an ordinary implicit declaration.             
161
162         * tinfo2.cc: Include stdlib.h.
163
164 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
165
166         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
167         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
168         CLASSTYPE_ALIGN.
169
170 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
171
172         * decl2.c (lang_decode_option): Use skip_leading_substring instead
173         of plain strncmp.
174
175 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
176
177         * operators.def (<?): Duplicated, should have been...
178         (>?): this.  Fixed.
179
180 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
181             Mark Mitchell  <mark@codesourcery.com>
182
183         * cp-tree.h (ansi_opname): Make it a macro.
184         (ansi_assopname): Likewise.
185         (struct lang_decl_flags): Add assignment_operator_p.
186         (struct lang_decl): Add operator_code.
187         (DECL_VTT_PARM): Adjust.
188         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
189         overloaded operator.
190         (SET_OVERLOADED_OPERATOR_CODE): New macro.
191         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
192         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
193         (opname_tab): Remove.
194         (assignop_tab): Likewise.
195         (operator_name_info_t): New type.
196         (operator_name_info): New variable.
197         (assignment_operator_name_info): Likewise.
198         (build_cp_library_fn): Remove declaration.
199         (push_cp_library_fn): Likewise.
200         (operator_name_string): Likewise.
201         (build_decl_overload): Likewise.
202         * call.c (print_z_candidates): Simplify.
203         (build_object_call): Adjust usage of ansi_opname.  Use
204         DECL_OVERLOADED_OPERATOR_P.
205         (op_error): Adjust operator name lookup.
206         (build_conditional_expr): Adjust usage of ansi_opname.
207         (build_new_op): Likewise.
208         (build_op_delete_call): Likewise.
209         (build_over_call): Likewise.
210         (joust): Use DECL_OVERLOADED_OPERATOR_P.
211         * decl.c (duplicate_decls): Copy operator_code.
212         (init_decl_processing): Adjust parameters to push_cp_library_fn.
213         (builtin_function): Adjust parameters to build_library_fn_1.
214         (build_library_fn_1): Accept an overloaded operator code.
215         (build_library_fn): Pass ERROR_MARK.
216         (build_cp_library_fn): Accept an overloaded operator code.
217         (push_cp_library_fn): Likewise.
218         (grokfndecl): Tweak.
219         (grokdeclarator): Simplify code to compute names of overloaded
220         operators.  Adjust use of ansi_opname.
221         (ambi_op_p): Work on tree_codes, not identifiers.
222         (unary_op_p): Likewise.
223         (grok_op_properties): Likewise.
224         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
225         (lang_mark_tree): Don't try to mark the operator_code.
226         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
227         * error.c (dump_decl): Remove special handling for operator
228         names.
229         (dump_function_name): Likewise.
230         (dump_expr): Adjust name lookup of operators.
231         (op_to_string): Simplify.
232         (assop_to_string): Likewise.
233         * init.c (build_new_1): Adjust use of ansi_opname.
234         * lex.c (opname_tab): Remove.
235         (assignop_tab): Likewise.
236         (ansi_opname): Likewise.
237         (ansi_assopname): Likewise.
238         (operator_name_string): Likewise.
239         (reinit_lang_specific): Likewise.
240         (operator_name_info): New variable.
241         (assignment_operator_name_info): Likewise.
242         (init_operators): New function.
243         (init_parse): Use it.
244         (do_identifier): Adjust use of ansi_opname.
245         * method.c (mangle_expression): Don't use ansi_opname for
246         mangling.
247         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
248         (build_decl_overload): Remove.
249         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
250         (do_build_assign_ref): Adjust use of ansi_opname.
251         (synthesize_method): Likewise.
252         (implicitly_declare_fn): Likewise.
253         * operators.def: New file.
254         * parse.y (operator): Adjust use of ansi_opname.
255         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
256         (set_mangled_name_for_template_decl): Don't play games with
257         current_namespace.
258         (special_function_p): Adjust use of ansi_opname.
259         * typeck.c (check_return_expr): Likewise.
260         * Make-lang.in (cc1plus): Depend on operators.def.
261         * Makefile.in (lex.o): Likewise.
262         (decl.o): Likewise.
263
264 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
265
266         * Make-lang.in (cplib2.ready): Eradicate.
267
268 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
269
270         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
271         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
272         (built_min, cp_tree_equal): Likewise.
273
274 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
275
276         * class.c (layout_nonempty_base_or_field): Replace
277         `record_layout_info' with `record_layout_info_s'.
278
279 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
280
281         Fix goto checking.
282         * cp-tree.h (struct language_function): x_named_labels is now
283         a struct named_label_list*.
284         * decl.c (struct named_label_use_list): Renamed from...
285         (struct named_label_list): ...this.  New struct.
286         (push_binding_level): Don't set eh_region.
287         (note_level_for_eh): New fn.
288         (pop_label): Take label and old value directly.
289         (pop_labels): Adjust for new named_labels format.
290         (lookup_label): Likewise.
291         (poplevel): Note characteristics of a binding level containing a
292         named label.  Mess with named label lists earlier.
293         (mark_named_label_lists): New fn.
294         (mark_lang_function): Call it.
295         (use_label): New fn, split out from...
296         (make_label_decl): ...here.  Don't call it.
297         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1, 
298         check_previous_gotos): New fns, split out from...
299         (define_label): ...here.
300         (check_switch_goto): New fn.
301         (define_case_label): Call it.
302         (check_goto): New fn.
303         * semantics.c (finish_goto_stmt): Call it and use_label.
304         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
305         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
306
307 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
308
309         * class.c (build_vtable_entry_ref): Correct usage of
310         get_vtbl_decl_for_binfo.
311
312         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
313         * method.c (implicitly_declare_fn): Not here.
314
315 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
316
317         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
318         (CPTI_PTMD_DESC_TYPE): ... here.
319         (ptmd_desc_type_node): Rename to ...
320         (ptm_desc_type_node): ... here.
321         * decl.c: Likewise.
322         * rtti.c (ptmd_initializer): Rename to ...
323         (ptm_initializer): ... here.
324         (sythesize_tinfo_var): Adjust. Deal with pointer to member
325         function.
326         (create_tinfo_types): Adjust.   
327
328 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
329
330         Finish implementation of VTTs.
331         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
332         CPTI_VTT_PARM_IDENTIFIER.
333         (vtt_parm_identifier): New macro.
334         (vtt_parm_type): Likewise.
335         (BINFO_SUBVTT_INDEX): Likewise.
336         (BINFO_VPTR_INDEX): Likewise.
337         (struct lang_decl): Add vtt_parm.
338         (DECL_VTT_PARM): New macro.
339         (DECL_USE_VTT_PARM): Likewise.
340         (DECL_NEEDS_VTT_PARM_P): Likewise.
341         (get_vtt_name): Declare.
342         (build_artifical_parm): Likewise.
343         (fixup_all_virtual_upcast_offsets): Likewise.
344         (expand_indirect_vtbls_init): Remove.
345         * call.c (build_new_method_call): Pass the vtt to subobject
346         constructors and destructors.
347         * class.c (get_vtt_name): Give it external linkage.
348         (build_clone): Handle the magic VTT parameters for clones.
349         (clone_function_decl): Fix typo in comment.
350         (build_vtt): Keep track of the indices in the VTTs where various
351         entities are stored.
352         (build_vtt_inits): Likewise.
353         (dfs_build_vtt_inits): Likewise.
354         (build_ctor_vtbl_group): Tweak type of construction vtables.
355         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
356         primary bases, when building construction vtables.
357         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
358         (initialize_predefined_identifiers): Add vtt_parm_identifier.
359         (init_decl_processing): Initialize vtt_parm_type.
360         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
361         (lang_mark_tree): Make vtt_parm.
362         * decl2.c (build_artificial_parm): New function.
363         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
364         (grokclassfn): Use build_artificial_parm.
365         * init.c (initialize_vtbl_ptrs): Call
366         fixup_all_virtual_upcast_offsets directly.
367         (perform_member_init): Use the complete subobject destructor for
368         member cleanups.
369         (build_vtbl_address): New function.
370         (expand_virtual_init): Handle VTTs.
371         * optimize (maybe_clone_body): Likewise.
372         * search.c (fixup_all_virtual_upcast_offsets): Give it external
373         linkage.
374         (expand_indirect_vtbls_init): Remove.
375         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
376         * tree.c (make_binfo): Make them bigger.
377         
378 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
379
380         * inc/cxxabi.h (__pbase_type_info): Define, based on
381         __pointer_type_info.
382         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
383         (__pointer_to_member_type_info): Likewise.
384         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
385         (__pointer_to_member_type_info::__is_pointer_p): Remove.
386         (__pointer_type_info::__do_catch): Rename to ...
387         (__pbase_type_info::__do_catch): ... here. Adjust.
388         (__pbase_type_info::__pointer_catch): Implement.
389         (__pointer_type_info::__pointer_catch): Adjust.
390         (__pointer_to_member_type_info::__pointer_catch): Adjust.
391
392 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
393
394         * tinfo.h (__user_type_info::contained_virtual_p): New
395         predicate.
396         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
397         shaped heirarchy.
398         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
399         diamond shaped heirarchy. Add early out for mixed diamond and
400         duplicate shaped heirarchy.
401
402 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
403
404         * cp-tree.h (build_delete): Change prototype.
405         (build_vec_delete): Likewise.
406         * call.c (build_scoped_method_call): Use special_function_kind
407         values to indicate the kind of destruction to be done.
408         (build_method_call): Likewise.
409         * decl.c (finish_destructor_body): Likewise.
410         (maybe_build_cleanup_1): Likewise.  Rename to ...
411         (maybe_build_cleanup): ... this.
412         * decl2.c (delete_sanity): Use special_function_kind
413         values to indicate the kind of destruction to be done.
414         (build_cleanup): Likewise.
415         * init.c (perform_member_init): Likewise.
416         (build_vec_delete_1): Likewise.
417         (build_dtor_call): Simplify.
418         (build_delete): Use special_function_kind
419         values to indicate the kind of destruction to be done.
420         (build_vbase_delete): Likewise.
421         (build_vec_delete): Likewise.
422         
423         * init.c (sort_member_init): Fix typo in error message generation
424         code.
425
426 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
427
428         * semantics.c (begin_class_definition): make the packed
429         attribute be sensitive to the "-fpack-struct" command line flag
430
431 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
432
433         Update new-abi upcast algorithm.
434         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
435         prototype and meaning of return value.
436         (__si_class_type_info::__do_upcast): Likewise.
437         (__vmi_class_type_info::__do_upcast): Likewise.
438         * tinfo.cc (__class_type_info::__upcast_result): Replace
439         whole2dst with part2dst. Adjust ctor.
440         (__class_type_info::__do_upcast): Adjust call of worker function.
441         (__class_type_info::__do_upcast): Adjust.
442         (__si_class_type_info::__do_upcast): Adjust. Use parent's
443         __do_upcast.
444         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
445         virtual base in diamond heirarchy bug.
446
447 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
448
449         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
450         and bitfield to tinfo_fn_p.
451         (DECL_TINFO_FN_P): Adjust.
452         (SET_DECL_TINFO_FN_P): Likewise.
453         (DECL_MUTABLE_P): Likewise.
454         (DECL_C_BIT_FIELD): Likewise.
455         (SET_DECL_C_BIT_FIELD): Likewise.
456         (CLEAR_DECL_C_BIT_FIELD): Likewise.
457         (DECL_UNINLINABLE): Likewise.
458         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
459         (handle_using_decl): Remove assertion.
460         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
461         to build FIELD_DECLs.
462         (build_base_field): Likewise.
463         (layout_class_type): Likewise.
464         * decl.c (init_decl_processing): Likewise.
465         (build_ptrmemfunc_type): Likewise.
466         (grokdeclarator): Likewise.
467         * decl2.c (grok_x_components): Likewise.
468         * except.c (call_eh_info): Likewise.
469         * init.c (init_init_processing): Likewise.
470         * rtti.c (expand_class_desc): Likewise.
471         (create_pseudo_type_info): Likewise.
472         (get_vmi_pseudo_type_info): Likewise.
473         (create_tinfo_types): Likewise.
474         * ptree.c (print_lang_decl): Adjust.
475         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
476         before checking DECL_MUTABLE_P.
477         
478         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
479         parameters for template functions.
480         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
481         destructors as well as constructors.
482
483 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
484
485         * class.c (build_ctor_vtbl_group): Set inits.
486         * optimize.c (maybe_clone_body): Set DECL_INLINE and
487         DECL_THIS_INLINE appropriately for clones.
488
489         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
490         (DECL_CONV_FN_P): Simplify.
491         (DECL_OPERATOR): Remove.
492         (language_to_string): Declare.
493         * decl.c (duplicate_decls): Fix typo in comment.
494         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
495         (grok_op_properties): Use DECL_CONV_FN_P instead of
496         IDENTIFIER_TYPENAME_P.
497         * dump.c (dequeue_and_dump): Dump the language linkage of
498         declarations.
499         * error.c (language_to_string): Give it external linkage.
500         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
501         (implicitly_declare_fn): Set DECL_LANGUAGE.
502         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
503         IDENTIFIER_TYPENAME_P.
504         (tsubst_decl): Likewise.
505         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
506         * semantics.c (finish_member_declaration): Don't mark members of
507         classes declared in an extern "C" region as extern "C".
508         
509 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
510
511         * decl2.c (qualified_lookup_using_namespace): Look through
512         namespace aliases.
513
514         * decl.c (push_using_decl): Return the old decl on namespace level.
515
516 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
517
518         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
519         (VTT_NAME_PREFIX): New macro.
520         (CTOR_VTBL_NAME_PREFIX): Likewise.
521         (get_ctor_vtbl_name): New function.
522         * class.c (get_vtable_name): Simplify.
523         (get_vtt_name): New function.
524         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
525         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
526         when a virtual base becomes primary.
527         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
528         VTTs.
529         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
530         additional parameters.
531         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
532         (initialize_array): New function.
533         (build_vtt): Likewise.
534         (build_vtt_inits): Likewise.
535         (dfs_build_vtt_inits): Likewise.
536         (dfs_fixup_binfo_vtbls): Likewise.
537         (build_ctor_vtbl_group): Likewise.
538         (initialize_vtable): Use initialize_array.
539         (accumulate_vtbl_inits): Reimplement to handle construction
540         vtables.
541         (dfs_accumulate_vtbl_inits): Likewise.
542         (bulid_vtbl_initializer): Adjust parameter name.
543         * method.c (build_typename_overload): Remove #if 0'd code.
544         (get_ctor_vtbl_name): New function.
545         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
546         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
547         
548         * cp-tree.h (struct lang_type): Remove search_slot.
549         (CLASSTYPE_SEARCH_SLOT): Remove.
550         (emit_base_init): Change prototype.
551         (initialize_vtbl_ptrs): Likewise.
552         (expand_indirect_vtbls_init): Likewise.
553         (clear_search_slots): Remove.
554         * decl.c (lang_mark_tree): Don't mark search_slot.
555         * init.c (initialize_vtbl_ptrs): Simplify.
556         (emit_base_init): Likewise.
557         * search.c (struct vbase_info): Document decl_ptr.
558         (convert_pointer_to_single_level): Remove.
559         (dfs_find_vbases): Remove.
560         (dfs_init_base_pointers): Simplify.
561         (dfs_clear_vbase_slots): Remove.
562         (dfs_vtable_path_unmark): New function.
563         (init_vbase_pointers): Simplify.
564         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
565         (expand_indirect_vtbls_init): Simplify.  Don't call
566         mark_all_temps_used.
567         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
568         initialize_vtbl_ptrs.
569
570 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
571
572         * except.c: Add static prototypes.
573
574 2000-05-20  H.J. Lu  <hjl@gnu.org>
575
576         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
577
578 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
579
580         Don't create a separate copy of virtual bases for the
581         CLASSTYPE_VBASECLASSES list.
582         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
583         (BINFO_FOR_VBASE): Remove.
584         (CANONICAL_BINFO): Adjust.
585         (binfo_for_vbase): New function.
586         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
587         instead of BINFO_FOR_VBASE.
588         (build_vbase_pointer): Likewise.
589         (build_secondary_vtable): Likewise.
590         (dfs_mark_primary_bases): Likewise.
591         (mark_primary_bases): Likewise.
592         (layout_nonempty_base_or_field): Likewise.
593         (dfs_set_offset_for_shared_vbases): Likewise.
594         (dfs_set_offset_for_unshared_vbases): Likewise.
595         (layout_virtual_bases): Likewise.  Adjust for changes to the
596         CLASSTYPE_VBASECLASSES list.
597         (dump_class_hierarchy_r): Use binfo_for_vbase
598         instead of BINFO_FOR_VBASE.
599         (dump_class_hierarchy): Likewise.
600         (finish_vtbls): Likewise.
601         (build_vtbl_initializer): Adjust for changes to the
602         CLASSTYPE_VBASECLASSES list.
603         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
604         * decl.c (finish_destructor_body): Adjust for changes to the
605         CLASSTYPE_VBASECLASSES list.
606         * init.c (sort_base_init): Use binfo_for_vbase.
607         (construct_virtual_bases): Adjust for changes to the
608         CLASSTYPE_VBASECLASSES list.
609         (expand_member_init): Use binfo_for_vbase.
610         (build_vbase_delete):  Adjust for changes to the
611         CLASSTYPE_VBASECLASSES list.
612         * method.c (do_build_copy_constructor): Likewise.
613         * rtti.c (get_base_offset): Use binfo_for_vbase.
614         (expand_class_desc): Remove #if 0'd code.
615         * search.c (struct vbase_info): Remove vbase_types.
616         (get_base_distance):  Use binfo_for_vbase.
617         (lookup_field_queue_p): Use CANONICAL_BINFO.
618         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
619         (get_pure_virtuals): Adjust for changes to the
620         CLASSTYPE_VBASECLASSES list.
621         (dfs_find_vbases): Use binfo_for_vbase.
622         (dfs_init_vbase_pointers): Likewise.
623         (init_vbase_pointers): Don't initialize vi.vbase_types.
624         (virtual_context): Use binfo_for_vbase.
625         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
626         CLASSTYPE_VBASECLASSES list.
627         (expand_indirect_vtbls_init): Simplify.
628         (dfs_get_vbase_types): Don't replicate virtual bases.
629         (find_vbase_instance): Use binfo_for_vbase.
630         (binfo_for_vbase): New function.
631         * typeck.c (get_delta_difference): Use binfo_for_vbase.
632         
633 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
634
635         * decl2.c (finish_anon_union): Generalize error messages to handle
636         anonymous structures.
637         * init.c (perform_member_init): Remove `name' parameter.
638         (build_field_list): New function.
639         (sort_member_init): Handle anonymous union initialization order
640         correctly.  Check for multiple initializations of the same union.
641         (emit_base_init): Don't look up fields by name here.
642         (expand_member_init): Record the result of name lookup for future
643         reference.
644         * typeck.c (build_component_ref): Fix formatting.
645         
646 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
647
648         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
649         * typeck.c (build_x_compound_expr): Replace warn_unused with
650         warn_unused_value.
651
652         * decl2.c (lang_decode_option): Update -Wall unused flags by
653         calling set_Wunused.
654
655 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
656
657         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
658         * init.c (dfs_vtable_path_unmark): Remove.
659         * search.c (marked_new_vtable_p): Likewise.
660         (unmarked_new_vtable_p): Likewise.
661         (dfs_search_slot_nonempty_p): Likewise.
662         (dfs_mark): Likewise.
663         (dfs_vtable_path_unmark): Likewise.
664         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
665         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
666         (dfs_init_vbase_pointers): Remove special-case new ABI code.
667         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
668         (init_vbase_pointers): Simplify.
669         (expand_indirect_vtbls_init): Likewise.
670
671         * class.c (copy_virtuals): New function.
672         (build_primary_table): Use it.
673         (build_secondary_vtable): Likewise.
674         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
675         indicate that no vcall offset is required.
676         (add_virtual_function): Likewise.
677         (modify_all_vtables): Likewise.
678         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
679         (dfs_accumulate_vtbl_inits): Likewise.
680         (build_vtbl_initializer): Make changes to handle construction
681         vtables.
682         (dfs_build_vcall_offset_vtbl_entries): Likewise.
683         (build_rtti_vtbl_entries): Likewise.
684         (build_vtable_entries): Handle a NULL vcall_index.
685
686 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
687
688         * decl2.c (lang_decode_option): Fix thinko.
689
690 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
691
692         * except.c (check_handlers): New fn.
693         * cp-tree.h: Declare it.
694         * semantics.c (finish_handler_sequence): Call it.
695         (finish_function_handler_sequence): Likewise.
696         (finish_handler_parms): Set TREE_TYPE on the handler.
697         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
698         * search.c (get_base_distance_recursive): If protect>1, ignore
699         special access.
700         (get_base_distance): Don't reduce watch_access.
701
702 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
703
704         * lex.c: #include diagnostic.h.
705         (lang_init_options): Set default prefixing rules.
706
707         * lang-options.h: Add -fdiagnostics-show-location=.
708         
709         * decl2.c: #include diagnostic.h.
710         (lang_decode_option): Handle -fdiagnostics-show-location=.
711
712 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
713
714         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
715         * vec.cc: Revert my 2000-05-07 change.
716
717 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
718
719         * class.c (check_field_decls): Complain about non-static data
720         members with same name as class in class with constructor.
721
722 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
723
724         * decl.c (grokdeclarator): Allow non-static data members with
725         same name as class.
726
727 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
728
729         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
730         and pending_inline.filename.  Update prototypes.
731         * decl.c (define_label): Constify filename parameter.
732         * decl2.c (warn_if_unknown_interface): Constify local char *.
733         * input.c Constify input_source.filename. Don't declare
734         input_filename or lineno.  Constify filename parameter to feed_input.
735         * lex.c (init_parse): Constify parameter and return value.
736         (cp_pragma_interface, cp_pragma_implementation): Constify
737         filename argument.
738         (reinit_parse_for_method, reinit_parse_for_block,
739         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
740         Constify local char *.
741         * pt.c: Don't declare lineno or input_filename.
742         (print_template_context, tsubst_friend_function, tsubst_decl,
743         tsubst, instantiate_decl): Constify local char *.
744         * semantics.c (expand_body): Constify local char *.
745         * tree.c (build_srcloc): Constify filename parameter.
746         * typeck.c (c_expand_asm_operands): Constify filename
747         parameter.
748
749 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
750
751         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
752         offsetof expansion.
753
754 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
755
756         * inc/cxxabi.h:  Fix typos in comment.
757         (__base_class_info::__offset): Use a static_cast.
758
759 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
760
761         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
762         of std::size_t and std::ptrdiff_t respectively.
763         * tinfo.cc: Likewise.
764         * vec.cc: Likewise.
765
766 2000-05-06  Richard Henderson  <rth@cygnus.com>
767
768         * typeck.c (build_c_cast): Don't warn integer->pointer size
769         mismatch for constants.
770
771 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
772
773         * rtti.c (ptmd_initializer): Set non-public, if class is
774         incomplete.
775         
776         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
777         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
778         __cxa_vec_delete): Likewise.
779         * tinfo.cc (__dynamic_cast): Likewise.
780         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
781         __cxa_vec_delete): Likewise.
782
783 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
784
785         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
786         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
787         (lang_decl_flags): Add vcall_offset.
788         (THUNK_VCALL_OFFSET): Use it.
789         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
790         * method.c (make_thunk): Create the lang_decl here, not in
791         emit_thunk.
792         (emit_thunk): Make generic thunks into ordinary functions once
793         they have been fed to expand_body.
794         * semantics.c (expand_body): Set current_function_is_thunk here.
795
796 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
797
798         * class.c (update_vtable_entry_for_fn): Prototype.
799
800         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
801         and `tmpl'.
802
803         * search.c (dfs_build_inheritance_graph_order): Prototype.
804
805 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
806
807         * cp-tree.h (special_function_kind): Add various kinds of
808         destructors.
809         (special_function_p): New function.
810         * class.c (overrides): Don't let one kind of destructor override
811         another.
812         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
813         whether or not to instantiate a template.
814         * tree.c (special_function_p): Define.
815
816 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
817
818         * cp-tree.def (THUNK_DECL): Remove.
819         * cp-tree.h (DECL_THUNK_P): New macro.
820         (DECL_NON_THUNK_FUNCTION_P): Likewise.
821         (DECL_EXTERN_C_FUNCTION_P): Likewise.
822         (SET_DECL_THUNK_P): Likewise.
823         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
824         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
825         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
826         * decl.c (decls_match): Use DECL_EXTERN_C_P.
827         (duplicate_decls): Likewise.
828         (pushdecl): Likewise.  Adjust thunk handling.
829         (grokfndecl): Use DECL_EXTERN_C_P.
830         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
831         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
832         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
833         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
834         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
835         DECL_NO_STATIC_CHAIN.
836         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
837         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
838         * search.c (covariant_return_p): Remove THUNK_DECL handling.
839         * ir.texi: Update.
840         
841 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
842
843         * tree.c (walk_tree): Set lineno.
844
845 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
846
847         * exception.cc: Update license notice.
848         * new.cc: Likewise.
849         * new1.cc: Likewise.
850         * new2.cc: Likewise.
851         * tinfo.cc: Likewise.
852         * tinfo2.cc: Likewise.
853         * vec.cc: Likewise.
854         * inc/cxxabi.h: Likewise.
855         * inc/exception: Likewise.
856         * inc/new: Likewise.
857         * inc/new.h: Likewise.
858         * inc/typeinfo: Likewise.
859
860 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
861
862         * tree.c (build_target_expr_with_type): If we already have a
863         TARGET_EXPR, just return it.
864
865         * optimize.c (initialize_inlined_parameters): Don't generate an
866         EXPR_STMT if we can just use DECL_INITIAL.
867         * decl.c (emit_local_var): Only make the initialization a
868         full-expression if stmts_are_full_exprs_p.
869
870 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
871
872         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
873         macro.
874         * call.c (standard_conversion): Use it.
875         (direct_reference_binding): Likewise.
876         (build_over_call): Likewise.
877         (is_properly_derived_from): Likewise.
878         (compare_ics): Likewise.
879         * class.c (resolves_to_fixed_type_p): Likewise.
880         * optimize.c (declare_return_variable): Likewise.
881         * pt.c (is_specialization_of): Likewise.
882         (unify): Likewise.
883         * typeck.c (comp_target_parms): Likeiwse.
884         (build_static_cast): Likewise.
885         (build_reinterpret_cast): Likewise.
886         (build_const_cast): Likewise.
887         (comp_ptr_ttypes_real): Likewise.
888         (comp_ptr_ttypes_const): Likewise.
889         * typeck2.c (process_init_constructor): Likewise.
890
891 2000-04-30  Scott Snyder <snyder@fnal.gov>
892
893         * decl.c (finish_destructor_body): Use the base destructor when
894         destroying virtual bases.
895
896 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
897
898         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
899         STMT_EXPRs.
900         * optimize.c (struct inline_data): Add target_exprs field.
901         (declare_return_variable): When a function returns an aggregate,
902         use the variable declared in the TARGET_EXPR as the remapped
903         DECL_RESULT.
904         (expand_call_inline): Update the pending target_exprs stack.
905         (optimize_function): Initialize the stack.
906         
907         * decl2.c (finish_file): Fix typo in comment.
908
909         * method.c (emit_thunk): Don't try to return a `void' value.
910
911         * optimize.c (initialize_inlined_parameters): If the parameter is
912         addressable, we need to make a new VAR_DECL, even if the
913         initializer is constant.
914
915 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
916
917         * decl.c (grok_op_properties): Add an extra check of argtypes.
918
919 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
920
921         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
922         variables.
923         (initialize_inlined_parameters): Try to avoid creating new
924         VAR_DECLs.
925
926 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
927
928         * lex.c (my_get_run_time): Remove.
929         (init_filename_times): Use get_run_time instead of my_get_run_time.
930         (check_newline): Likewise.
931         (dump_time_statistics): Likewise.
932         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
933         of computing elapsed time explicitly.
934
935 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
936
937         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
938         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
939         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
940         before calling decl_constant_value.
941         * class.c (check_bitfield_decl): Likewise.
942         * cvt.c (ocp_convert): Likewise.
943         (convert): Likewise.
944         * decl.c (compute_array_index_type): Likewise.
945         (build_enumerator): Likewise.
946         * decl2.c (check_cp_case_value): Likewise.
947         * pt.c (convert_nontype_argument): Likewise.
948         (tsubst): Likewise.
949         * typeck.c (decay_conversion): Likewise.
950         (build_compound_expr): Likewise.
951         (build_reinterpret_cast): Likewise.
952         (build_c_cast): Likewise.
953         (convert_for_assignment): Likewise.
954         
955 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
956
957         * decl.c (finish_function): Don't play games with DECL_INLINE.
958
959 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
960
961         * ir.texi: Correct typo.
962
963 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
964
965         * decl.c (grokdeclarator): Reject VLAs as members.
966
967 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
968
969         * call.c (standard_conversion): Accept conversion between
970         COMPLEX_TYPEs.
971
972         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
973
974 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
975
976         * decl2.c (finish_file): Remove double setup for accounting
977         compile time.
978
979 2000-04-24  Robert Lipe <robertlipe@usa.net>
980
981         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
982
983 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
984
985         * new.cc (set_new_handler): Needs to be in std::.
986
987 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
988
989         * cp-tree.h (lang_decl): Remove pretty_function_p.
990         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
991         language-specific node.
992         * decl.c (cp_make_fname_decl): Use build_decl, not
993         build_lang_decl, to build the variables.
994         (grokvardecl): Don't call build_lang_decl for local variables in
995         templates.
996         (grokdeclarator): Don't call build_lang_decl for local type
997         declarations in templates.
998         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
999         zero'd memory, rather than calling memset.
1000         * pt.c: Include hashtab.h.
1001         (local_specializations): New variable.
1002         (retrieve_local_specialization): Use it.
1003         (register_local_specialization): Likewise.
1004         (tsubst_decl): Don't assume local variables have
1005         DECL_LANG_SPECIFIC.
1006         (instantiate_decl): Set up local_specializations.
1007         * Makefile.in (HTAB_H): New variable.
1008
1009 2000-04-23  Richard Henderson  <rth@cygnus.com>
1010
1011         * typeck.c (c_expand_asm_operands): Restore the original
1012         contents of the output list.
1013
1014 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
1015
1016         * ir.texi:  Document complex number representation.
1017         
1018 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
1019
1020         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
1021         (target_incomplete_p): New function.
1022         (tinfo_base_init): Create comdat NTBS name variable.
1023         (ptr_initializer): Add non_public parameter. Calculate it.
1024         (ptmd_initializer): Likewise.
1025         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
1026         (create_real_tinfo_var): Add non_public parameter. Use it.
1027         Push proxy into global namespace.
1028         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
1029         New enumeration.
1030         * inc/typeinfo (type_info::before, type_info::operator==):
1031         Compare __name addresses.
1032         
1033         * tinfo2.cc: Remove new-abi builtins comment.
1034
1035 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
1036
1037         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
1038
1039         * call.c (joust): Exit early if we get the same function, too.
1040
1041         * decl2.c (key_method): Return NULL_TREE for template classes.
1042         (import_export_class): Don't need to check for template classes.
1043
1044 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
1045
1046         * lex.c: Remove references to cccp.c.
1047
1048 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
1049
1050         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
1051         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
1052         (DECL_DESTRUCTOR_P): Use destructor_attr.
1053         (DECL_CONST_MEMFUNC_P): Reimplement.
1054         (DECL_VOLATILE_MEMFUNC_P): Remove.
1055         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
1056         (overrides): Use DECL_DESTRUCTOR_P.
1057         (check_for_override): Likewise.
1058         * decl.c (start_function): Likewise.
1059         * decl2.c (grokfclassfn): Likewise.
1060         (check_classfn): Likewise.
1061         (grok_function_init): Likewise.
1062
1063 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
1064
1065         * decl2.c (grokfield): Issue error on illegal data member
1066         declaration.
1067
1068 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
1069
1070         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
1071
1072 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
1073
1074         * class.c (build_vtable_entry): Don't build thunks for type-info
1075         functions.
1076
1077 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
1078
1079         * decl.c (decls_match): Allow a redeclaration of a builtin to
1080         specify args while the builtin did not.
1081
1082 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
1083
1084         * cp-tree.def (THUNK_DECL): Add to documentation.
1085         * cp-tree.h (flag_huge_objects): Declare.
1086         * class.c (modify_vtable_entry): Tidy.
1087         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
1088         Calculate delta appropriately for the new ABI.
1089         (dfs_modify_vtables): Use it.
1090         (modify_all_vtables): Fix thinko in code to add overriding copies
1091         of functions to primary vtables.
1092         (build_clone): Fix typo in comment.
1093         (clone_function_decl): Correct order of destructors in vtable.
1094         (build_vbase_offset_vtbl_entries): Adjust comment.
1095         (dfs_vcall_offset_queue_p): Remove.
1096         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
1097         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
1098         (build_vtable_entry): Correct check for pure virtual functions.
1099         Don't declare flag_huge_objects.
1100         * decl.c (flag_huge_objects): Remove declaration.
1101         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
1102         Use int_size_in_bytes.
1103         (emit_thunk): Handle vcall offset thunks.
1104         
1105 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1106
1107         * decl2.c (parse_time, varconst_time): Delete declarations.
1108         (finish_file): Delete LINENO declaration.
1109         START_TIME and THIS_TIME now long.
1110
1111 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
1112
1113         * class.c (build_base_field): Reformat comment.
1114         
1115         * inc/cxxabi.h (stddef.h): Comment inclusion.
1116         (__base_class_info::__offset): Comment shift.
1117
1118 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
1119
1120         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
1121         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
1122         (cp_push_exception_identifier): New macro.
1123         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
1124         (DECL_BASE_DESTRUCTOR_P): Likewise.
1125         (DECL_DELETING_DESTRUCTOR_P): Likewise.
1126         (get_vtbl_decl_for_binfo): Fix formatting.
1127         (in_charge_arg_for_name): New macro.
1128         (maybe_build_cleanup_and_delete): Remove declaration.
1129         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
1130         (in_charge_arg_for_name): New function.
1131         (build_new_method_call): Use it.  Handle cloned destructors.
1132         (build_clone): Don't make the base constructor virtual.
1133         Automatically defer generated functions.
1134         (clone_function_decl): Handle destructors, too.
1135         (clone_constructors_and_destructors): Likewise.
1136         (create_vtable_ptr): Don't create a vtable entry for a cloned
1137         function.
1138         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
1139         (initialize_predefined_identifiers): Update appropriately.
1140         (finish_destructor_body): Simplify.
1141         (maybe_build_cleanup_and_delete): Remove.
1142         * except.c (expand_throw): Handle new-ABI destructors.
1143         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
1144         (build_dtor_call): New function.
1145         (build_delete): Use it.  Simplify.
1146         * optimize.c (maybe_clone_body): Handle destructors.
1147         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
1148         
1149         * exception.cc (cleanup_fn): New typedef.
1150         (CALL_CLEANUP): New macro.
1151         (cp_eh_info): Use them.
1152         (__cp_push_exception): Likewise.
1153         (__cp_pop_exception): Likewise.
1154         
1155 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
1156
1157         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
1158         (complete_dtor_identifier): New macro.
1159         (CLASSTYPE_FIRST_CONVERSION): Remove.
1160         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
1161         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
1162         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
1163         (CLASSTYPE_CONSTRUCTORS): Likewise.
1164         (CLASSTYPE_DESTRUCTORS): Likewise.
1165         (lang_decl): Add cloned_function.
1166         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
1167         (DECL_BASE_CONSTRUCTOR_P): Likewise.
1168         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
1169         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
1170         (DECL_CLONED_FUNCTION_P): Likewise.
1171         (DECL_CLONED_FUNCTION): Likewise.
1172         (clone_function_decl): Declare.
1173         (maybe_clone_body): Likewise.
1174         * call.c (build_user_type_conversion_1): Call complete object
1175         constructors in the new ABI.
1176         (build_new_method_call): Don't add in-charge parameters under the
1177         new ABI.
1178         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
1179         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
1180         CLASSTYPE_DESTRUCTOR_SLOT.
1181         (build_clone): New function.
1182         (clone_function_decl): Likewise.
1183         (clone_constructors_and_destructors): Likewise.
1184         (check_bases_and_members): Use it.
1185         * decl.c (iniitialize_predefined_identifiers): Initialize
1186         complete_dtor_identifier.
1187         (finish_function): Don't add extra code to a clone.
1188         (lang_mark_tree): Mark cloned_function.
1189         * decl2.c (mark_used): Don't bother trying to instantiate things
1190         we synthesized.
1191         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
1192         * method.c (set_mangled_name_for_decl): Don't treat clones as
1193         constructors.
1194         (synthesize_method): Sythesize cloned functions, not the clones.
1195         * optimize.c (inline_data): Update comment on ret_label.
1196         (remap_block): Don't assume DECL_INITIAL exists.
1197         (copy_body_r): Allow ret_label to be NULL.
1198         (maybe_clone_body): Define.
1199         * pt.c (tsubst_decl): Handle clones.
1200         (instantiate_clone): New function.
1201         (instantiate_template): Use it.
1202         (set_mangled_name_for_template_decl): Don't treat clones as
1203         constructors.
1204         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
1205         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
1206         * semantics.c (expand_body): Clone function bodies as necessary.
1207         
1208         * optimize.c (remap_decl): Avoid sharing structure for arrays
1209         whose size is only known at run-time.
1210         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
1211
1212         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
1213         to has_in_charge_parm_p.
1214         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
1215         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
1216         (DECL_COPY_CONSTRUCTOR_P): New macro.
1217         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
1218         (build_user_type_conversion_1): Likewise.
1219         (convert_like_real): Likewise.
1220         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
1221         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
1222         (copy_args_p): Likewise.
1223         (grok_ctor_properties): Likewise.
1224         (start_function): Likewise.
1225         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
1226         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
1227         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
1228         * method.c (do_build_copy_constructor): Use
1229         DECL_HAS_IN_CHARGE_PARM_P.
1230         (synthesize_method): Likewise.
1231         * pt.c (instantiate_template): Remove goto.
1232         * tree.c (build_cplus_method_type): Remove mention of obstacks in
1233         comment.
1234         
1235         * cp-tre.h (finish_function): Change prototype.
1236         * decl.c (end_cleanup_fn): Adjust caller.
1237         (finish_function): Take only one parameter.
1238         * decl2.c (finish_objects): Adjust caller.
1239         (finish_static_storage_duration_function): Likewise.
1240         * method.c (emit_thunk): Likewise.
1241         * parse.y: Likewise.
1242         * parse.c: Regenerated.
1243         * pt.c (instantiate_decl): Likewise.
1244         * rtti.c (synthesize_tinfo_fn): Likewise.
1245         * semantics.c (expand_body): Likewise.
1246
1247         * cp-tree.h (copy_decl): New function.
1248         * class.c (finish_struct_1): Use it.
1249         * lex.c (copy_decl): Define it.
1250         * pt.c (tsubst_decl): Likewise.
1251         * tree.c (copy_template_template_parm): Likewise.
1252         
1253         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
1254         has_nonpublic_assign_ref.
1255         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
1256         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
1257         * class.c (finish_struct_methods): Don't set
1258         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
1259         (interface_only): Don't declare.
1260         (interface_unknown): Likewise.
1261
1262 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1263
1264         * tree.h (HAVE_TEMPLATES): Remove definition.
1265         * lang-options.h (-fthis-is-variable): Remove documentation.
1266
1267 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
1268
1269         * class.c (instantiate_type): Handle object-relative template-id.
1270
1271         * semantics.c (finish_expr_stmt): Call convert_to_void here.
1272         * decl.c (cplus_expand_expr_stmt): Not here.
1273
1274         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
1275         Initialize exprtype earlier.
1276
1277         * parse.y (fn.def1): Check for defining types in return types.
1278
1279         * decl.c (check_tag_decl): Notice extra fundamental types.
1280         Diagnose empty decls in classes, too.
1281
1282         * decl.c (grokdeclarator): Don't override an anonymous name if no 
1283         declarator was given.
1284
1285         * cvt.c (convert_to_void): Call resolve_offset_ref.
1286
1287         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
1288
1289         * decl2.c (decl_namespace): Handle getting a type.
1290
1291         * typeck.c (build_c_cast): Re-enable warning for cast between
1292         pointer and integer of different size.
1293
1294 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
1295
1296         * inc/cxxabi.h (__pointer_type_info): Add restrict and
1297         incomplete flags.
1298         (__pointer_type_info::__pointer_catch): New virtual function.
1299         (__pointer_to_member_type_info): Derive from
1300         __pointer_type_info. Adjust.
1301         (__pointer_to_member_type_info::__do_catch): Remove.
1302         (__pointer_to_member_type_info::__is_pointer_p): Declare.
1303         (__pointer_to_member_type_info::__pointer_catch): Declare.
1304         * rtti.c (qualifier_flags): Add restrict flag.
1305         (ptmd_initializer): Reorder members.
1306         (create_tinfo_types): Expand comments. Reorder
1307         ptmd_desc_type_node members.
1308         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
1309         Implement.
1310         (__pointer_type_info::__do_catch): Move specific code into
1311         __pointer_catch. Call it.
1312         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
1313         specific catch checking. Fix void conversion check.
1314         (__pointer_to_member_type_info::__do_catch): Remove.
1315         (__pointer_to_member_type_info::__pointer_catch): Implement.
1316         
1317 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1318
1319         * lex.c (init_parse): Remove traces of classof and headof.
1320         * decl2.c (flag_operator_names): Default to 1.
1321         (lang_decode_option): Do not set it for -ansi.
1322
1323 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
1324
1325         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
1326         (DECL_MAIN_VARIANT): Remove.
1327         * decl.c (duplicate_decls): Don't set it.
1328         (start_function): Likewise.
1329         (lang_mark_tree): Don't mark it.
1330         * decl2.c (defer_fn): Don't use it.
1331         * lex.c (retrofit_lang_decl): Don't set it.
1332         * pt.c (tsubst_decl): Likewise.
1333         * ptree.c (print_lang_decl): Don't print it.
1334         * typeck.c (mark_addressable): Don't use it.
1335         
1336 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
1337
1338         * vec.cc: Include <new> and <exception>.
1339         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
1340         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
1341         terminate.
1342         (__cxa_vec_delete): Catch dtor exceptions.
1343
1344 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
1345
1346         Prepend __ to implementation defined names.
1347         * inc/typeinfo (type_info): Rename _name to __name.
1348         (type_info::type_info): Rename parameter.
1349         (type_info::operator==, type_info::operator!=,
1350         type_info::before): Likewise.
1351         (type_info::is_pointer_p, type_info::is_function_p,
1352         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
1353         parameters.
1354         * inc/cxxabi.h
1355         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
1356         (__pointer_type_info::__pointer_type_info): Likewise.
1357         (__pointer_type_info::is_pointer_p,
1358         __pointer_type_info::do_catch): Prepend __. Rename parameters.
1359         (__array_type_info::__array_type_info): Rename parameters.
1360         (__function_type_info::__function_type_info): Likewise.
1361         (__function_type_info::is_function_p): Prepend __.
1362         (__enum_type_info::__enum_type_info): Rename parameters.
1363         (__pointer_to_member_type_info::__pointer_to_member_type_info):
1364         Likewise.
1365         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
1366         parameters.
1367         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
1368         (__class_type_info::__class_type_info): Rename parameters.
1369         (__class_type_info::sub_kind): Prepend __. Adjust member names.
1370         (__class_type_info::upcast_result,
1371         __class_type_info::dyncast_result): Prepend __. Move definition
1372         into tinfo.cc.
1373         (__class_type_info::do_upcast, __class_type_info::do_catch,
1374         __class_type_info::find_public_src,
1375         __class_type_info::do_dyncast,
1376         __class_type_info::do_find_public_src): Prepend __. Rename
1377         parameters.
1378         (__si_class_type_info::__si_class_type_info): Rename parameters.
1379         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
1380         __si_class_type_info::do_find_public_src): Prepent __. Rename
1381         parameters.
1382         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
1383         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
1384         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
1385         parameters.
1386         (__dynamic_cast): Rename parameters.
1387         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
1388         type_info::do_catch, type_info::do_upcast): Prepend __.
1389         (contained_p, public_p, virtual_p, contained_public_p,
1390         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
1391         (__class_type_info::do_catch,
1392         __class_type_info::do_upcast): Prepend __. Adjust.
1393         (__class_type_info::__upcast_result,
1394         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
1395         Adjust.
1396         (__class_type_info::find_public_src): Prepend __. Adjust.
1397         (__class_type_info::do_find_public_src, 
1398         __si_class_type_info::do_find_public_src, 
1399         __vmi_class_type_info::do_find_public_src): Likewise.
1400         (__class_type_info::do_dyncast,
1401         __si_class_type_info::do_dyncast,
1402         __vmi_class_type_info::do_dyncast): Likewise.
1403         (__class_type_info::do_upcast,
1404         __si_class_type_info::do_upcast,
1405         __vmi_class_type_info::do_upcast): Likewise.
1406         (__dynamic_cast): Adjust.
1407         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
1408         (__function_type_info::is_function_p): Likewise.
1409         (__pointer_type_info::do_catch): Likewise. Adjust.
1410         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
1411         (__throw_type_match_rtti_2): Adjust.
1412         (__is_pointer): Adjust.
1413
1414 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
1415
1416         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
1417         (complete_ctor_identifier): New macro.
1418         (special_function_kind): Add sfk_copy_constructor and
1419         sfk_assignment_operator.
1420         (LOOKUP_HAS_IN_CHARGE): Remove.
1421         (cons_up_default_function): Rename to ...
1422         (implicitly_declare_fn): ... this.
1423         * call.c (build_new_method_call): Add in-charge parameters for
1424         constructors here.
1425         * class.c (add_implicitly_declared_members): Change parameter name
1426         from cant_have_assignment to cant_have_const_assignment.
1427         Replace calls to cons_up_default_function to implicitly_declare_fn.
1428         * cvt.c (ocp_convert): Use complete_ctor_identifier.
1429         * decl.c (initialize_predefined_identifiers): Initialize it.
1430         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
1431         complex expression.
1432         * init.c (expand_default_init): Don't calculate the in-charge
1433         parameter here.
1434         (build_new_1): Likewise.
1435         * lex.c (cons_up_default_function): Move to method.c.
1436         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
1437         (implicitly_declare_fn): New function.
1438         * typeck.c (build_static_cast): Use complete_ctor_identifier.
1439         (build_modify_expr): Likewise.
1440         * typeck2.c (build_functional_cast): Likewise.
1441         
1442         Under the new ABI, constructors don't return `this'.
1443         * cp-tree.h (warn_reorder): Declare.
1444         (special_function_kind): New enum.
1445         (global_base_init_list): Remove declaration.
1446         (emit_base_init): Don't return a value.
1447         (check_base_init): Don't declare.
1448         (is_aggr_typedef): Likewise.
1449         * decl.c (check_special_function_return_type): New function.
1450         (return_types): Remove.
1451         (grokdeclarator): Use check_special_function_return_type.
1452         (start_function): Don't initialize ctor_label under the new ABI.
1453         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
1454         * init.c (begin_init_stmts): Move to top of file.
1455         (finish_init_stmts): Likewise.
1456         (warn_reorder): Don't declare.
1457         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
1458         value.
1459         (check_base_init): Remove.
1460         (is_aggr_typedef): Likewise.
1461         (build_new_1): Don't use the return value of a constructor.
1462         * semantics.c (setup_vtbl_ptr): Don't use the return value
1463         of emit_base_init.
1464         * typeck.c (check_return_expr): Don't magically convert return
1465         statements into `return this' in constructors under the new ABI.
1466         
1467         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
1468         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
1469         (base_ctor_identifier): New macro.
1470         (base_dtor_identifier): Likewise.
1471         (deleting_dtor_identifier): Likewise.
1472         * decl.c: Don't include obstack.h.
1473         (obstack_chunk_alloc): Don't define.
1474         (obstack_chunk_free): Likewise.
1475         (struct predefined_identifier): New type.
1476         (initialize_predefined_identifiers): New function.
1477         (init_decl_processing): Use it.
1478         (debug_temp_inits): Remove.
1479         (start_method): Don't call preserve_data.
1480         (hack_incomplete_structures): Update comment.
1481         * init.c (init_init_processing): Don't initialize
1482         nelts_identifier.
1483         (build_offset_rf): Remove dead code.
1484         (build_delete): Use CLASSTYPE_N_BASECLASSES.
1485         * search.c (init_search_processing): Don't initialize
1486         vptr_identifier.
1487         
1488 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1489
1490         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
1491         some sign_compare warnings.
1492
1493 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
1494
1495         Rename abi::__vmi_class_type_info members.
1496         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
1497         base_list, detail_masks members to vmi_flags, vmi_base_count,
1498         vmi_bases and vmi_flags_masks respectively.
1499         (__vmi_class_type_info::vmi_flags_masks): Rename
1500         details_unknown_mask to flags_unknown_mask.
1501         * tinfo.cc (__class_type_info::do_upcast): Adjust.
1502         (__vmi_class_type_info::do_find_public_src): Adjust.
1503         (__vmi_class_type_info::do_dyncast): Adjust.
1504         (__vmi_class_type_info::do_upcast): Adjust.
1505         
1506 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
1507
1508         * tinfo.cc (convert_to_base): New function.
1509         (get_vbase_offset): Remove. Move into convert_to_base.
1510         (__vmi_class_type_info::do_find_public_src): Adjust.
1511         (__vmi_class_type_info::do_dyncast): Adjust.
1512         (__vmi_class_type_info::do_upcast): Adjust.
1513
1514 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
1515
1516         * tinfo.cc (operator=): Use __builtin_strcmp.
1517         * tinfo2.cc (before): Likewise.
1518
1519 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
1520
1521         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
1522         (DECL_SAVED_INLINE): Rename to ...
1523         (DECL_DEFERRED_FN): ... this.
1524         (in_function_p): Remove declaration.
1525         (mark_inline_for_output): Rename to ... 
1526         (defer_fn): ... this.
1527         * decl.c (finish_function): Adjust call to mark_inline_for_output.
1528         (in_function_p): Remove definition.
1529         * decl2.c (saved_inlines): Rename to ...
1530         (deferred_fns): ... this.
1531         (saved_inlines_used): Rename to ...
1532         (deferred_fns_used): ... this.
1533         (mark_inline_for_output): Rename to ...
1534         (defer_fn): ... this.
1535         (finish_file): Adjust accordingly.
1536         (init_decl2): Likewise.
1537         * lex.c (cons_up_default_function): Likewise.
1538         * pt.c (mark_decl_instantiated): Likewise.
1539         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
1540         circumstances.
1541         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
1542         * semantics.c (expand_body): Defer more functions.
1543
1544 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
1545
1546         * vec.cc: New file.
1547         * Make-lang.in (CXX_LIB2FUNCS): Add it.
1548         (vec.o): Build it.
1549         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
1550         __cxa_vec_delete): Declare.
1551
1552 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
1553
1554         * rtti.c (dfs_class_hint_mark): New static function.
1555         (dfs_class_hint_unmark): New static function.
1556         (class_hint_flags): Use them.
1557
1558 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
1559
1560         * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
1561
1562 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
1563
1564         * cp-tree.h (instantiate_decl): Change prototype.
1565         * decl2.c (mark_used): Adjust call.
1566         * optimize.c (inlinable_function_p): Adjust handling of templates.
1567         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
1568         (do_type_instantiation): Likewise.
1569         (instantiate_decl): Defer more templates.
1570         (instantiate_pending_templates): Adjust logic to handle inline
1571         friend functions.
1572
1573         * Makefile.in (GGC_H): New variable.  Use it throughout in place
1574         of ggc.h.
1575         
1576         * call.c: Don't include obstack.h.  Include ggc.h.
1577         (obstack_chunk_alloc): Don't define.
1578         (obstack_chunk_free): Likewise.
1579         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
1580         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
1581         (pop_switch): Free it.
1582
1583         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
1584
1585         * dump.c (dequeue_and_dump): Don't try to print the bit_position
1586         if we don't have a DECL_FIELD_OFFSET.
1587
1588 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
1589
1590         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
1591         special_function_p.
1592
1593 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1594
1595         * cfns.gperf (hash, libc_name_p): Prototype.
1596
1597         * rtti.c (build_dynamic_cast_1): Constification.
1598
1599         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
1600
1601         * semantics.c (deferred_type_access_control): Prototype.
1602
1603 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
1604
1605         Correct many new ABI issues regarding vbase and vcall offset
1606         layout.
1607         * cp-tree.h (BINFO_VTABLE): Document.
1608         (struct lang_type): Tweak formatting.
1609         (BINFO_PRIMARY_BINFO): Add to documentation.
1610         (CLASSTYPE_VSIZE): Fix typo in comment.
1611         (CLASSTYPE_VBASECLASSES): Update documentation.
1612         (BINFO_VBASE_MARKED): Remove.
1613         (SET_BINFO_VBASE_MARKED): Likewise.
1614         (CLEAR_BINFO_VBASE_MARKED): Likewise.
1615         (BINFO_FIELDS_MARKED): Remove.
1616         (SET_BINFO_FIELDS_MARKED): Likewise.
1617         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
1618         (enum access_kind): New enumeration.
1619         (num_extra_vtbl_entries): Remove declaration.
1620         (size_extra_vtbl_entries): Likewise.
1621         (get_vtbl_decl_for_binfo): New function.
1622         (dfs_vbase_unmark): Remove declaration.
1623         (mark_primary_bases): Likewise.
1624         * class.c (SAME_FN): Remove.
1625         (struct vcall_offset_data_s): Move definition.
1626         (build_vbase_pointer): Use `build', not `build_binary_op', to
1627         access the vbase pointer under the new ABI.
1628         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
1629         (build_primary_vtable): Likewise.
1630         (dfs_mark_primary_bases): Move here from search.c.
1631         (mark_primary_bases): Likewise.
1632         (determine_primary_bases): Under the new ABI, don't make a base
1633         class a primary base just because we don't yet have any virtual
1634         functions.
1635         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
1636         (num_vfun_entries): Remove.
1637         (dfs_count_virtuals): Likewise.
1638         (num_extra_vtbl_entries): Likewise.
1639         (size_extra_vtbl_entries): Likewise.
1640         (layout_virtual_bases): Iterate in inheritance graph order under
1641         the new ABI.
1642         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
1643         indicate that a vfield is present.
1644         (init_class_processing): Initialize access_public_node, etc., from
1645         ak_public, etc.
1646         (get_vtbl_decl_for_binfo): New function.
1647         (dump_class_hierarchy_r): Likewise.
1648         (dump_class_hierarchy): Use it.
1649         (finish_vtbls): Build the vtbls in inheritance graph order.
1650         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
1651         (initialize_vtable): Use get_vtbl_decl_for_binfo.
1652         (accumulate_vtbl_inits): Add comments explaining why a pre-order
1653         walk is required.
1654         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
1655         where the vptr points, even for primary vtables.
1656         (build_vtbl_initializer): Adjust handling of vbase and vcall
1657         offsets.
1658         (build_vcall_and_vbase_vtable_entries): New function.
1659         (dfs_build_vbase_offset_vtbl_entries): Remove.
1660         (build_vbase_offset_vtbl_entries): Reimplement.
1661         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
1662         were already handled in a primary base class vtable.
1663         (build_vcall_offset_vtbl_entries): Adjust.
1664         (build_rtti_vtbl_entries): Adjust.
1665         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
1666         * init.c (expand_virtual_init): Simplify.
1667         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
1668         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
1669         * search.c (BINFO_ACCESS): New macro.
1670         (SET_BINFO_ACCESS): Likewise.
1671         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
1672         (access_in_type): Likewise.
1673         (dfs_accessible_p): Likewise.
1674         (protected_accessible_p): Likewise.
1675         (lookup_fnfields_1): Adjust documentation.
1676         (dfs_mark_primary_bases): Move to class.c
1677         (mark_primary_bases): Likewise.
1678         (dfs_vbase_unmark): Remove.
1679         (virtual_context): Use BINFO_FOR_VBASE.
1680         (dfs_get_vbase_types): Simplify.
1681         (dfs_build_inheritance_graph_order): New function.
1682         (get_vbase_types): Use it.
1683         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
1684
1685         * tinfo.cc (get_vbase_offset): New function.
1686         (__vmi_class_type_info::do_find_public_src): Use it.
1687         (__vmi_class_type_info::do_dyncast): Likewise.
1688         (__vmi_class_type_info::do_upcast): Likewise.
1689         
1690 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
1691
1692         * lang-specs.h: Pass -fno-show-column to the preprocessor.
1693
1694 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
1695
1696         * rtti.c (class_hint_flags): Rename flags.
1697         (class_initializer): Remove flags.
1698         (synthesize_tinfo_var): Combine offset and flags. Add flags
1699         for __vmi_class_type_info.
1700         (create_tinfo_types): Remove flags from __class_type_info and
1701         __si_class_type_info. Merge flags and offset from
1702         base_class_type_info.
1703         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
1704         (__base_class_info::is_virtual_p): Adjust.
1705         (__base_class_info::is_public_p): Adjust.
1706         (__base_class_info::offset): New accessor.
1707         (__class_type_info::details): Remove member.
1708         (__class_type_info::__class_type_info): Lose details.
1709         (__class_type_info::detail_masks): Remove.
1710         (__si_class_type_info::__si_class_type_info): Lose details.
1711         (__vmi_class_type_info::details): New member.
1712         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
1713         (__vmi_class_type_info::detail_masks): New member.
1714         * tinfo.cc (__class_type_info::do_upcast): Initialize result
1715         with unknown_details_mask.
1716         (__vmi_class_type_info::do_find_public_src): Adjust
1717         (__vmi_class_type_info::do_dyncast): Adjust.
1718         (__vmi_class_type_info::do_upcast): Set result details, if
1719         needed. Adjust.
1720         (__dynamic_cast): Temporarily #if out optimization.
1721
1722 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
1723
1724         * rtti.c (get_tinfo_decl): Mark used.
1725         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
1726         mark as dealt with, if we output it.
1727
1728 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
1729
1730         * class.c: Reorganize to put virtual function table initialization
1731         machinery at the end of the file.
1732
1733 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
1734
1735         * class.c (finish_struct): Use bitsize_zero_node.
1736         * pt.c (instantiate_class_template): Likewise.
1737
1738 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
1739
1740         Put RTTI entries at negative offsets in new ABI.
1741         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
1742         vbase offset at index -3, not -1.
1743         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
1744         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
1745         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
1746         (build_rtti_vtbl_entries): New function.
1747         (set_rtti_entry): Remove.
1748         (build_primary_vtable): Don't use it.
1749         (build_secondary_vtable): Likewise.
1750         (start_vtable): Remove.
1751         (first_vfun_index): New function.
1752         (set_vindex): Likewise.
1753         (add_virtual_function): Don't call start_vtable.  Do call
1754         set_vindex.
1755         (set_primary_base): Rename parameter.
1756         (determine_primary_base): Likewise.
1757         (num_vfun_entries): Don't use skip_rtti_stuff.
1758         (num_extra_vtbl_entries): Include RTTI information.
1759         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
1760         (skip_rtti_stuff): Remove.
1761         (dfs_modify_vtables): Don't use it.
1762         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
1763         (layout_nonempty_base_or_field): Update size handling.
1764         (create_vtable_ptr): Tweak.
1765         (layout_class_type): Adjust parameter names.
1766         (finish_struct_1): Simplify.
1767         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
1768         (skip_rtti_stuff): Remove.
1769         (first_vfun_index): New function.
1770         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
1771         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
1772         (marked_vtable_pathp): Declare.
1773         (unmarked_vtable_pathp): Likewise.
1774         * error.c (dump_expr): Use first_vfun_index to calculate vtable
1775         offsets.
1776         * rtti.c (build_headof): Look for RTTI at negative offsets.
1777         (get_tinfo_decl_dynamic): Likewise.
1778         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
1779         here.
1780         (create_pseudo_type_info): Do it here instead.  Adjust so that
1781         vptr points at first virtual function.
1782         * search.c (marked_vtable_pathp): Make it global.
1783         (unmarked_vtable_pathp): Likewise.
1784         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
1785         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
1786         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
1787         (get_pure_virtuals): Likewise.
1788         (expand_upcast_fixups): Likewise.
1789         * tree.c (debug_binfo): Likewise.
1790         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
1791         negative offset.
1792         
1793 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1794
1795         * class.c (check_field_decl): Fix typo.
1796         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
1797         (check_methods): Likewise.
1798         (check_field_decls): Likewise.
1799         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
1800         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
1801         Use DECL_RESULT_FLD, not DECL_RESULT.
1802         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
1803         * lex.c (identifier_type): Likewise.
1804         * pt.c (determine_specialization, lookup_template_class): Likewise.
1805         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
1806         (resolve_overloaded_unification, more_specialized): Likewise.
1807         * semantics.c (finish_member_declaration): Likewise.
1808         * typeck.c (build_x_function_call): Likewise.
1809         
1810 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
1811
1812         * class.c (layout_empty_base): Handle empty bases with non-byte
1813         alignment.
1814         (build_base_field): Likewise.
1815         (layout_virtual_bases): Likewise.
1816
1817         * class.c (finish_struct_1): Fix typo in this change:
1818         
1819         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1820
1821 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
1822
1823         * decl.c (grokdeclarator): Count partial specializations when
1824         keeping track of how many template classes have been seen.
1825
1826         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
1827         
1828 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1829
1830         * class.c (build_vbase_pointer_fields): layout_field now place_field.
1831         (get_vfield_offset): Use byte_position.
1832         (set_rtti_entry): Set OFFSET to ssizetype zero.
1833         (get_binfo_offset_as_int): Deleted.
1834         (dfs_record_base_offsets): Use tree_low_cst.
1835         (dfs_search_base_offsets): Likewise.
1836         (layout_nonempty_base_or_field): Reflect changes in RLI format
1837         and call byte_position.
1838         (layout_empty_base): Convert offset to ssizetype.
1839         (build_base_field): use rli_size_unit_so_far.
1840         (dfs_propagate_binfo_offsets): Do computation in proper type.
1841         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
1842         (layout_class_type): Reflect changes in RLI names and fields.
1843         (finish_struct_1): Set DECL_FIELD_OFFSET.
1844         * dump.c (dequeue_and_dump): Call bit_position.
1845         * expr.c (cplus_expand_constant): Use byte_position.
1846         * rtti.c (expand_class_desc): Use bitsize_one_node.
1847         * typeck.c (build_component_addr): Use byte_position and don't
1848         special case for zero offset.
1849         
1850 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
1851
1852         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
1853         
1854         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
1855         tinfo object.
1856         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
1857         vtable.
1858
1859 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1860
1861         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
1862         DECL_P macros.
1863         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
1864         make_typename_type, check_initializer, cp_finish_decl,
1865         xref_tag): Likewise.
1866         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
1867         decl_namespace, arg_assoc_template_arg, arg_assoc,
1868         validate_nonmember_using_decl, do_class_using_decl): Likewise.
1869         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
1870         args_to_string): Likewise.
1871         * friend.c (is_friend): Likewise.
1872         * lex.c (note_got_semicolon, note_list_got_semicolon,
1873         is_global): Likewise.
1874         * method.c (build_overload_nested_name, build_overload_value,
1875         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
1876         * parse.y (typename_sub, typename_sub1): Likewise.
1877         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
1878         process_partial_specialization, convert_template_argument,
1879         template_args_equal, add_pending_template, lookup_template_class,
1880         for_each_template_parm_r, maybe_fold_nontype_arg,
1881         tsubst, instantiate_template, type_unification_real, unify,
1882         instantiate_pending_templates, set_mangled_name_for_template_decl):
1883         Likewise.
1884         * repo.c (repo_get_id, repo_template_used): Likewise.
1885         * search.c (lookup_field_1): Likewise.
1886         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
1887         * xref.c (classname): Likewise.
1888         
1889 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
1890
1891         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
1892         (CANONICAL_BINFO): New macro.
1893         (BINFO_NEW_VTABLE_MARKED): Use it.
1894         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
1895         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
1896         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
1897         not TREE_TYPE.
1898         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1899         (build_secondary_vtable): Likewise.
1900         (dfs_finish_vtbls): Likewise.
1901         (dfs_accumulate_vtbl_inits): Likewise.
1902         (accumulate_vtbl_inits): New function.
1903         (finish_vtbls): Make sure that virtual bases come after
1904         non-virtual bases in the vtable group.
1905         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
1906         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1907         * search.c (struct vbase_info): Move definition.
1908         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1909         (unmarked_new_vtable_p): Likewise.
1910         (dfs_mark_vtable_path): Remove.
1911         (dfs_mark_new_vtable): Remove.
1912         (dfs_unmark_new_vtable): Likewise.
1913         (dfs_clear_search_slot): Likewise.
1914         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
1915         (dfs_clear_vbase_slots): Likewise.
1916         (init_vbase_pointers): LIkewise.
1917         
1918 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
1919
1920         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
1921         SIZETYPE to a non-SIZETYPE.
1922
1923 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
1924
1925         * class.c (layout_virtual_bases): Adjust names in conditionally
1926         compiled code.
1927         
1928         * class.c (record_base_offsets): New function.
1929         (layout_conflict_p): Likewise.
1930         (layout_nonempty_base_or_field): Use it.
1931         (layout_empty_base): New function.
1932         (build_base_field): Use it.
1933         (build_base_fields): Update comment.
1934         (layout_virtual_bases): Fold in a little code form
1935         layout_basetypes.  Use layout_empty_base.
1936         (layout_basetypes): Remove.
1937         (end_of_class): New function.
1938         (layout_class_type): Use it.  Adjust.
1939
1940         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
1941         (fntype_p): Remove.
1942         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
1943         comment. 
1944         (dfs_skip_nonprimary_vbases_markedp): Likewise.
1945         * typeck.c (fntype_p): Remove.
1946
1947         * cp-tree.h (TI_SPEC_INFO): Remove.
1948         (CLASSTYPE_TI_SPEC_INFO): Likewise.
1949         * pt.c (process_partial_specialization): Likewise.
1950
1951         * class.c (build_base_field): Fix thinko in computation of binfo
1952         offsets.
1953
1954         * tree.c (mark_local_for_remap_p): Mark variables declared in
1955         TARGET_EXPRs as well.
1956
1957 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
1958
1959         * typeck.c (require_complete_type, complete_type,
1960         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
1961         build_array_ref, convert_arguments, pointer_diff,
1962         build_x_unary_op, build_unary_op, build_c_cast,
1963         build_modify_expr): Use COMPLETE_TYPE_P etc.
1964         * call.c (is_complete, convert_like_real,
1965         build_new_method_call): Likewise.
1966         * class.c (build_vbase_pointer_fields, check_bases,
1967         build_base_field, finish_struct_1, pushclass): Likewise.
1968         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
1969         * decl.c (maybe_process_template_type_declaration, pushtag,
1970         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
1971         layout_var_decl, check_initializer, cp_finish_decl,
1972         grokdeclarator, require_complete_types_for_parms,
1973         grok_op_properties, xref_tag, xref_basetypes,
1974         check_function_type): Likewise.
1975         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
1976         * friend.c (do_friend): Likewise.
1977         * init.c (build_offset_ref): Likewise.
1978         * parse.y (structsp): Likewise.
1979         * pt.c (maybe_process_partial_specialization,
1980         tsubst_friend_function, instantiate_class_template, tsubst,
1981         do_type_instantiation, instantiate_pending_templates): Likewise.
1982         * repo.c (repo_get_id): Likewise.
1983         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
1984         synthesize_tinfo_var, emit_support_tinfos): Likewise.
1985         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
1986         * semantics.c (begin_class_definition): Likewise.
1987         * tree.c (build_cplus_method_type): Likewise.
1988         * typeck2.c (digest_init, build_functional_cast,
1989         add_exception_specifier): Likewise.
1990         * parse.h, parse.c: Regenerated.
1991
1992 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
1993
1994         * inc/cxxabi.h: New header file. Define new-abi entry points.
1995         (__pointer_type_info::target): Rename member to ...
1996         (__pointer_type_info::type): ... here.
1997         (__base_class_info::type): Rename member to ...
1998         (__base_class_info::base): ... here.
1999         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
2000         * cp-tree.h (CPTI_ABI): New global tree enumeration.
2001         (abi_node): New global tree node.
2002         * decl.c (abi_node): Document.
2003         (init_decl_processing): Initialize abi_node.
2004         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
2005         (get_vmi_pseudo_type_info): Likewise.
2006         (create_tinfo_types): Likewise.
2007         (emit_support_tinfos): Likewise.
2008         * tinfo.h (cxxabi.h): Include for new-abi.
2009         Move rtti class definitions to new header file.
2010         * tinfo.cc (abi): Use the namespace.
2011         (std): Move new abi rtti classes from here ...
2012         (__cxxabiv1): ... to here.
2013         * tinfo2.cc (cxxabi.h): Include for new-abi.
2014         Move rtti class definitions to new header file.
2015         (std): Move new abi rtti classes from here ...
2016         (__cxxabiv1): ... to here.
2017         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
2018         namespace.
2019
2020 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
2021             Jason Merrill  <jason@casey.cygnus.com>
2022
2023         * method.c (build_overload_int): Use host_integerp.
2024
2025 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2026
2027         * init.c (build_offset_ref): Handle the case of a templated member
2028         function.
2029     
2030 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2031
2032         * except.c (expand_exception_blocks): Clear catch_clauses_last.
2033
2034 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
2035
2036         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
2037         * class.c (check_bitfield_decl): Turn illegal bitfields into
2038         non-bitfields.
2039         (dfs_propagate_binfo_offsets): Adjust for new size_binop
2040         semantics.
2041         (dfs_offset_for_unshared_vbases): Likewise.
2042         * cvt.c (cp_convert_to_pointer): Convert NULL to a
2043         pointer-to-member correctly under the new ABI.
2044         * expr.c (cplus_expand_constant): Don't use cp_convert when
2045         turning an offset into a pointer-to-member.
2046         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
2047         when dereferencing them under the new ABI.
2048         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
2049         of pointers-to-members under the new ABI.
2050         
2051         * class.c (check_bitfield_decl): Remove restriction on really long
2052         bitfields.
2053         (layout_class_type): Implement new ABI handling of bitfields
2054         longer than their types.
2055
2056 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2057
2058         * parse.y (extdefs): Call ggc_collect.
2059         * parse.c: Regenerated.
2060
2061 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
2062
2063         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
2064         (note_name_declared_in_class): Use OVL_CURRENT to get at a
2065         potential overload.
2066
2067 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2068
2069         * class.c (build_vbase_path): Use integer_zerop.
2070         (build_vtable_entry): Use tree_low_cst.
2071         (get_vfield_offset): Use bit_position.
2072         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
2073         Use tree_low_cst.
2074         (check_bitfield_decl): Set DECL_SIZE using convert.
2075         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
2076         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
2077         Use tree_low_cst.
2078         (finish_struct_1): Use bit_position.
2079         (dump_class_hierarchy): Use tree_low_cst.
2080         * cp-tree.h (min_precision): Add declaration.
2081         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
2082         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
2083         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
2084         * expr.c (cplus_expand_constant): Use bit_position.
2085         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
2086         * rtti.c (get_base_offset): Use bit_position.
2087         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
2088         host_integerp, and tree_low_cst.
2089         (pointer_int_sum): Use integer_zerop.
2090         (build_component_addr): Use bit_position.
2091         
2092 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
2093
2094         * typeck.c (require_complete_type): Don't assume size_zero_node.
2095         (complete_type_or_else): Likewise.
2096
2097 2000-03-16  Steven Grady <grady@digitaldeck.com>
2098             Jason Merrill  <jason@casey.cygnus.com>
2099
2100         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
2101
2102 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
2103
2104         * decl2.c (grokfield): Bail out if type is error_mark_node.
2105
2106 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
2107
2108         * tinfo2.cc (__ptr_to_member_data): Rename to ...
2109         (__pointer_to_member_data): ... here. Adjust.
2110         * rtti.c (create_tinfo_types): Adjust.
2111
2112 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
2113
2114         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
2115         * decl.c (ref_desc_type_node): Undocument.
2116         * rtti.c (ptr_ref_initializer): Rename to ...
2117         (ptr_initializer): ... here. Adjust comments.
2118         (ptmd_initializer): Fix comment thinko.
2119         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
2120         (create_tinfo_types): Remove ref_desc_type_node init.
2121         * tinfo2.cc (__reference_type_info): Remove.
2122
2123 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
2124
2125         * decl.c (cp_finish_decl): Remove obsolete comment.
2126         
2127         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
2128
2129 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
2130
2131         * cp-tree.h: Tweak documentation.
2132         * class.c (build_vbase_pointer_fields): Layout the fields, too.
2133         (avoid_overlap): Remove.
2134         (get_binfo_offset_as_int): New function.
2135         (dfs_serach_base_offsets): Likewise.
2136         (layout_nonempty_base_or_field): Likewise.
2137         (build_base_field): Layout fields here.  Avoid placing two objects
2138         of the same type at the same address, under the new ABI.
2139         (build_base_fields): Adjust accordingly.
2140         (create_vtable_ptr): Return the new field, but don't attach it to
2141         TYPE_FIELDS.
2142         (remove_base_field): Remove.
2143         (remove_base_fields): Remove.
2144         (layout_basetypes): Adjust accordingly.
2145         (layout_class_type): Call layout_field for each field, rather than
2146         just making a wholesale call to layout_type.
2147
2148 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
2149
2150         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
2151
2152 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
2153
2154         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
2155
2156         * except.c (dtor_nothrow): New fn.
2157         (do_pop_exception): Use it.  Take type parm.
2158         (push_eh_cleanup): Take type parm.
2159         (expand_start_catch_block): Pass it.
2160         (build_eh_type_type_ref): Accept null type.
2161
2162 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
2163
2164         * cp-tree.h (revert_static_member_fn): Change prototype.
2165         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
2166         (grok_op_properties): Likewise.
2167         (start_function): Likewise.
2168         (revert_static_member_fn): Simplify.
2169         * pt.c (check_explicit_specialization): Adjust call to
2170         revert_static_member_fn.
2171
2172 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
2173
2174         * cp-tree.h (scope_kind): New type.
2175         (tmpl_spec_kind): Likewise.
2176         (declare_pseudo_global_level): Remove.
2177         (pseudo_global_level_p): Rename to template_parm_scope_p.
2178         (pushlevel): Remove declaration.
2179         (begin_scope): New function.
2180         (finish_scope): Likewise.
2181         (current_tmpl_spec_kind): Likewise.
2182         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
2183         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
2184         Add template_spec_p.
2185         (toplevel_bindings_p): Adjust.
2186         (declare_pseudo_global_level): Remove.
2187         (pseudo_global_level_p): Rename to template_parm_scope_p.
2188         (current_tmpl_spec_kind): New function.
2189         (begin_scope): Likewise.
2190         (finish_scope): Likewise.
2191         (maybe_push_to_top_level): Adjust.
2192         (maybe_process_template_type_declaration): Likewise.
2193         (pushtag): Likewise.
2194         (pushdecl_nonclass_level): Likewise.
2195         (lookup_tag): Likewise.
2196         (grokfndecl): Handle member template specializations.  Share
2197         constructor and non-constructor code.
2198         * decl2.c (check_classfn): Handle member template specializations.
2199         * pt.c (begin_template_parm_list): Use begin_scope.
2200         (begin_specialization): Likewise.
2201         (end_specialization): Likewise.
2202         (check_explicit_specialization): Use current_tmpl_spec_kind.
2203         Handle member template specializations.
2204         (end_template_decl): Use finish_scope.  Remove call to
2205         get_pending_sizes.
2206         (push_template_decl_real): Remove bogus error message.
2207         (tsubst_decl): Fix typo in code contained in comment.
2208         (instantiate_template): Handle member template specializations.
2209         (most_general_template): Likewise.
2210         
2211 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
2212
2213         * lex.c (whitespace_cr): Compress consecutive calls to warning().
2214         (do_identifier): Ditto for error().
2215
2216         * pt.c (convert_nontype_argument): Ditto for cp_error().
2217         (convert_template_argument): Ditto for cp_pedwarn().
2218
2219 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
2220
2221         * exception.cc (__check_null_eh_spec): New fn.
2222         * except.c (expand_end_eh_spec): Call it if the spec is throw().
2223
2224 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
2225
2226         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
2227         * except.c (expand_end_eh_spec): Add the return type.
2228         * rtti.c (throw_bad_cast): Add the parmtypes.
2229         (throw_bad_typeid): Likewise.
2230
2231         * semantics.c (expand_stmt): Only leave out rtl for unused
2232         artificials, and set DECL_IGNORED_P on them as well.
2233         * decl.c (wrapup_globals_for_namespace): Likewise.
2234
2235 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
2236
2237         * decl.c (maybe_commonize_var): Skip all artificial decls.
2238         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
2239
2240 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
2241
2242         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
2243         * cp-tree.h: Declare flag_enforce_eh_specs.
2244         * decl.c (store_parm_decls, finish_function): Check it.
2245
2246         C library functions don't throw.
2247         * Makefile.in (cfns.h): New target.
2248         (except.o): Depend on it.
2249         * Make-lang.in (cc1plus): Depend on cfns.gperf.
2250         * cfns.gperf: New file.
2251         * cfns.h: Generated.
2252         * except.c: Include it.
2253         (nothrow_libfn_p): New fn.
2254         * decl.c (grokfndecl): Use it.
2255         * cp-tree.h: Declare it.
2256         
2257         * decl.c (push_overloaded_decl_1, auto_function, 
2258         define_function): Lose.
2259         (build_library_fn_1): New static fn.
2260         (builtin_function): Use it.
2261         (get_atexit_node): Use build_library_fn_ptr.
2262         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
2263         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
2264         push_void_library_fn, push_throw_library_fn): New fns.
2265         * cp-tree.h: Declare them.
2266         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
2267         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
2268         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
2269         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
2270         * rtti.c (build_runtime_decl): Lose.
2271         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl, 
2272         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
2273         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
2274
2275         * call.c (build_call): Remove result_type parm.
2276         Call mark_used on unused artificial fns.
2277         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
2278
2279 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
2280
2281         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
2282         appropriate.
2283         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
2284         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
2285         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
2286         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
2287         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
2288         expand_generic_desc): Likewise.
2289
2290 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
2291
2292         * exception.cc (__cp_pop_exception): Cleanup the original object.
2293
2294 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
2295
2296         * decl.c (grok_op_properties): Merge conversion to void warning
2297         with other silly op warnings.
2298
2299 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
2300
2301         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
2302         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
2303
2304 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
2305
2306         * decl.c (cp_make_fname_decl): New function.
2307         (wrapup_globals_for_namespace): Don't emit unused static vars.
2308         (init_decl_processing): Remove comment about use of
2309         array_domain_type. Set make_fname_decl.
2310         (cp_finish_decl): Remove __FUNCTION__ nadgering.
2311         * semantics.c (begin_compound_stmt): Remove
2312         current_function_name_declared flagging.
2313         (expand_stmt): Don't emit unused local statics.
2314         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
2315         specially.
2316
2317 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
2318
2319         * typeck.c (convert_for_assignment): Don't look at array
2320         initializer.
2321         * call.c (convert_like_real): Likewise. 
2322
2323 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
2324
2325         Add initial support for '\uNNNN' specifier.
2326         * lex.c (read_ucs): New fn.
2327         (readescape, skip_white_space): Call it.
2328         (is_extended_char, is_extended_char_1): New fns.
2329         (utf8_extend_token): New fn, #if 0'd out.
2330         (real_yylex): Treat extended chars like letters.
2331
2332         * search.c (note_debug_info_needed): Walk the bases even if we 
2333         weren't deferring the type itself.
2334
2335 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2336
2337         * decl2.c (finish_objects): Constify a char*.
2338
2339         * method.c (emit_thunk): Likewise.
2340
2341 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
2342
2343         * typeck.c (dubious_conversion_warnings): Look through
2344         REFERENCE_TYPE.
2345
2346 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2347
2348         * class.c (dfs_modify_vtables): I is now unsigned.
2349         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
2350         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
2351         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
2352         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
2353         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
2354         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
2355         Call integer_all_onesp.
2356         * typeck2.c (process_init_constructor): Use compare_tree_int.
2357
2358         * lang-specs.h (as): Don't call if -syntax-only.
2359
2360 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
2361
2362         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
2363         RTL_EXPR_HAS_NO_SCOPE after all.
2364
2365 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
2366
2367         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
2368         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
2369         RTL_EXPR_HAS_NO_SCOPE.
2370
2371         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
2372         later.
2373         
2374         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
2375
2376 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
2377
2378         * call.c (convert_like): Macrofy.
2379         (convert_like_with_context): New macro.
2380         (convert_like_real): Renamed from convert_like.  Add calling
2381         context parameters, for diagnostics. Add recursive flag.  Call 
2382         dubious_conversion_warnings for outer conversion.
2383         (build_user_type_conversion): Use convert_like_with_context.
2384         (build_over_call): Likewise. Don't warn about dubious
2385         conversions here. Adjust convert_default_arg calls.
2386         (convert_default_arg): Add context parameters for diagnostics.
2387         Pass throught to convert_like_with_context.
2388         * cp-tree.h (convert_default_arg): Add context parameters.
2389         (dubious_conversion_warnings): Prototype new function.
2390         * typeck.c (convert_arguments): Adjust convert_default_arg call.
2391         (dubious_conversion_warnings): New function, broken
2392         out of convert_for_assignment. 
2393         (convert_for_assignment): Adjust.
2394
2395 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
2396
2397         * decl2.c (key_method): Break out from...
2398         (import_export_vtable, import_export_class): ...here.
2399
2400         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
2401         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
2402
2403         * search.c (note_debug_info_needed, dfs_debug_mark, 
2404         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
2405         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
2406
2407 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
2408
2409         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
2410         typos.
2411
2412 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
2413
2414         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
2415         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
2416         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
2417         (lang_type): Split gets_new into has_new and has_array_new.
2418         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2419         (TYPE_GETS_NEW): Split into ...
2420         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
2421         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
2422         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
2423         (build_op_new_call): Don't declare.
2424         (build_new_1): Likewise.
2425         * call.c (build_op_new_call): Remove.
2426         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
2427         instead of TYPE_NEEDS_DESTRUCTOR.
2428         (finish_struct_bits): Likewise.
2429         (add_implicitly_declared_members): Likewise.
2430         (check_field_decl): Likewise.
2431         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
2432         correctly under the new ABI.
2433         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
2434         instead of TYPE_NEEDS_DESTRUCTOR.
2435         (initialize_local_var): Likewise.
2436         (destroy_local_var): Likewise.
2437         (cp_finish_decl): Likewise.
2438         (register_dtor_fn): Likewise.
2439         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
2440         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
2441         TYPE_VEC_DELETE_TAKES_SIZE here.
2442         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
2443         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
2444         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2445         (finish_destructor_body): Likewise.
2446         (maybe_build_cleanup_1): Likewise.
2447         * decl2.c (do_static_destruction): Likewise.
2448         * init.c (build_new_1): Make it static.
2449         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2450         (expand_cleanup_for_base): Likewise.
2451         (get_cookie_size): New function.
2452         (build_new_1): Handle array-new cookies correctly under the new
2453         ABI.
2454         (build_vec_delete_1): Likewise.
2455         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2456         (build_delete): Likewise.
2457         (build_vec_delete): Handle array-new cookies correctly under the new
2458         ABI.
2459         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2460         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
2461         TYPE_HAS_ARRAY_NEW_OPERATOR.
2462         * ptree.c (print_lang_type): Check them.
2463         * search.c (context_for_name_lookup): Fix typo in comment.
2464         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2465         * tree.c (break_out_cleanups): Likewise.
2466         (build_cplus_array_test_1): Likewise.
2467         (cp_build_qualified_type_real): Likewise.
2468         * typeck.c (complete_type): Likewise.
2469         
2470         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
2471         the command-line, not the end.
2472         
2473 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
2474
2475         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
2476
2477 2000-03-02  Tom Tromey  <tromey@cygnus.com>
2478
2479         * cp-tree.h (build_java_class_ref): Declare.
2480         * init.c (build_java_class_ref): No longer static.
2481         * except.c (expand_throw): Generate a Java-style `throw' if the
2482         thrown object is a "Java" object.
2483         (initialize_handler_parm): Generate a Java-style lookup of
2484         exception info if the caught object is a "Java" object.
2485         (catch_language, catch_language_init): New globals.
2486         (decl_is_java_type): New function.
2487         (expand_start_catch_block): Don't call push_eh_info() or
2488         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
2489         class reference to build_catch_block.
2490
2491 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2492
2493         * typeck.c (comptypes): Treat sizetype like its language equivalent.
2494
2495 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
2496
2497         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
2498         to merge reference/pointer code and fix incorrect warnings.
2499
2500 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
2501
2502         * search.c (protected_accessible_p): Use context_for_name_lookup.
2503
2504         * init.c (construct_virtual_bases): Fix thinko.
2505         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
2506
2507 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
2508
2509         * decl.c (current_function_decl): Move to toplev.c.
2510
2511 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
2512
2513         * pt.c (fn_type_unification): Unify return type, whenever
2514         provided.
2515         (get_bindings_real): Only pass return type when necessary.
2516         Remove explicit return type check.
2517         * class.c (resolve_address_of_overloaded_function): Pass desired
2518         return type to fn_type_unification.
2519
2520 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2521
2522         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
2523         DECL_FIELD_SIZE.
2524         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
2525         DECL_FIELD_SIZE.
2526         * rtti.c (expand_class_desc): Likewise.
2527         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
2528         (THUNK_VCALL_OFFSET): Likewise.
2529         (THUNK_DELTA): Reflect changes in ../tree.h.
2530
2531 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
2532
2533         * search.c (protected_accessible_p): Also allow the access if
2534         the member is public in DERIVED.  Lose TYPE parm.
2535         (friend_accessible_p): Lose TYPE parm.
2536         (accessible_p): Adjust.
2537
2538 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2539
2540         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
2541         on things that are not sizes; ssize_binop deleted.
2542         Call size_diffop when appropriate.
2543         (dfs_build_vcall_offset_vtbl_entries): Likewise.
2544         (build_primary_vtable, build_secondary_vtable): Likewise.
2545         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
2546         Variable I is HOST_WIDE_INT.
2547         (get_vfield_offset): Pass proper types to size_binop.
2548         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
2549         (finish_struct_1): Likewise.
2550         (skip_rtti_stuff): Arg N is now pointer to signed.
2551         (layout_class_type): Use size_zero_node.
2552         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
2553         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
2554         * decl.c (complete_arry_type): Pass proper types to size_binop.
2555         (xref_basetypes): BINFO_OFFSET is sizetype.
2556         * error.c (dump_expr): Don't use size_binop non-sizes.
2557         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
2558         * init.c (construct_virtual_bases): Fix type error.
2559         (build_vec_delete_1): Pass proper type to size_binop and don't
2560         fold result.
2561         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
2562         * rtti.c (get_base_offset): Pass proper type to size_binop.
2563         * search.c (dfs_find_vbases): Fix type error.
2564         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
2565         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
2566         * tree.c (debug_binfo): Variable N is signed.
2567         Use HOST_WIDE_INT_PRINT_DEC.
2568         * typeck.c (comptypes): sizetype is same as equivalent integer type.
2569         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
2570         size_one_node and size_zero_node.
2571         (c_alignof): Use size_one_node.
2572         (build_component_addr): Pass proper types to size_binop.
2573         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
2574
2575 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
2576
2577         Implement class scope using-declarations for functions.
2578         * class.c (handle_using_decl): Call add_method for used functions.
2579         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
2580         (add_method): Used functions are hidden by local functions.
2581         (check_bases_and_members): Handle using-decls before finalizing
2582         CLASSTYPE_METHOD_VEC.
2583         * call.c (add_function_candidate): Add ctype parm; if non-zero,
2584         override the type of 'this' accordingly.
2585         (add_template_candidate, add_template_candidate_real): Add ctype parm.
2586         (convert_class_to_reference, build_user_type_conversion_1, 
2587         build_new_function_call, build_object_call, build_new_op,
2588         build_new_method_call): Pass ctype parm.
2589
2590         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
2591         the baselink.
2592         * call.c (convert_class_to_reference, build_user_type_conversion_1, 
2593         build_new_function_call, build_object_call, build_new_op,
2594         build_new_method_call, build_op_delete_call): Don't get basetype_path
2595         from a baselink.
2596         * typeck.c (build_component_ref): Likewise.
2597         * init.c (build_offset_ref): Likewise.
2598         (resolve_offset_ref): Don't call enforce_access.  
2599         Call build_scoped_ref.
2600         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
2601         would cause an error or if -pedantic.
2602         * class.c (alter_access): Lose binfo parm.
2603
2604 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
2605
2606         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
2607         types.
2608
2609 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
2610
2611         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
2612         pseudo_type_info creation into the std namespace
2613
2614 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
2615
2616         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
2617         (import_export_class): Remove declaration.
2618         * decl2.c (import_export_class): Make it static.
2619         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
2620         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
2621         EXPR_WITH_FILE_LOCATION.
2622         * lex.c (check_newline): Tweak filename/lineno setting.
2623         * semantics.c (begin_while_stmt): Fix typo in comment.
2624         
2625 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2626
2627         * lang-options.h (-fmessage-length=): Add missing option.
2628
2629         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
2630
2631 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
2632
2633         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
2634
2635 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
2636
2637         * optimize.c (expand_call_inline): Emit the return label before
2638         evaluating the return value.
2639
2640 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
2641
2642         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
2643         than duplicating functionality here.
2644         * optimize.c: Include input.h.
2645         (expand_call_inline): Use push_srcloc and pop_srcloc.
2646         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
2647         * parse.c: Regenerated.
2648         * Makefile.in (lex.o): Depend on input.h.
2649         (optimize.o): Likewise.
2650         
2651 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
2652
2653         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
2654         function type, rather than ICE.
2655
2656 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
2657
2658         * decl.c (grokdeclarator): Call decl_type_access_control.
2659         * parse.y (parse_end_decl): Don't call decl_type_access_control if
2660         decl is null.
2661
2662 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
2663
2664         * decl.c (decls_match): Remove obsolete static member nadgering.
2665
2666 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2667
2668         * decl.c (grokdeclarator): Change ANSI to ISO.
2669         * lex.c (consume_string, readescape, do_identifier): Likewise.
2670         (parse_float, real_yylex): Likewise.
2671         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
2672         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
2673         new_type_id, maybe_label_decls, simple_stmt, 
2674         for.init.statement): Likewise.
2675         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
2676         * semantics.c (finish_named_return_value): Likewise.
2677         * parse.c: Regenerate.
2678
2679 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
2680
2681         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
2682         (CPTI_CLASS_STAR_TYPE): Remove.
2683         (vtable_index_type): Likewise.
2684         (class_star_type_node): Remove.
2685         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
2686         (build_binary_op_nodefault): Remove.
2687         * call.c (build_new_op): Use build_binary_op instead of
2688         build_binary_op_nodefault.
2689         * decl.c (init_decl_processing): Remove class_star_type_node
2690         initialization.  Make delta_type_node ptrdiff_type_node under the
2691         new ABI.  Initialize vtable_index_type.
2692         (build_ptrmemfunc_type): Build different structures for the new
2693         ABI.
2694         (build_enumerator): Use build_binary_op instead of
2695         build_binary_op_nodefault.
2696         * method.c (build_overload_value): Mangle pointers-to-members
2697         appropriately under the new ABI.
2698         * typeck.c (build_array_ref): Use build_binary_op instead of
2699         build_binary_op_nodefault.
2700         (get_member_function_from_ptrfunc): Adjust for the new ABI.
2701         (build_binary_op_nodefault): Rename to ...
2702         (build_binary_op): ... this.  Remove old version.  Adjust for
2703         pointer-to-member comparisons under the new ABI.
2704         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
2705         (build_ptrmemfunc): Adjust for the new ABI.
2706         (expand_ptrmemfunc_cst): Likewise.
2707         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
2708         (pfn_from_ptrmemfunc): Adjust for the new ABI.
2709         
2710 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
2711
2712         * call.c (build_object_call): Compress consecutive calls to
2713         cp_error.
2714         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
2715         (build_op_delete_call): Adjust message formatting.
2716
2717         * class.c (check_bases): Compress consecutive calls to
2718         cp_pedwarn. 
2719         (finish_struct_anon): Say 'ISO C++'.
2720
2721         * decl.c (start_decl): Same here.
2722         (grok_reference_init): Likewise.
2723         (grokfndecl): Correct message formatting.
2724         (grokfndecl): Improve diagnostic.
2725         (check_static_variable_definition): Likewise. Say 'ISO C++'
2726         (compute_array_index_type): Say 'ISO C++'
2727         (create_array_type_for_decl): Compress consecutive calls to
2728         cp_error. 
2729         (grokdeclarator): Say 'ISO C++'
2730         (grok_op_properties): Likewise.
2731
2732         * decl2.c (delete_sanity): Clairify diagnostic.
2733         (check_member_template): Same here.
2734         (grok_function_init): Use consistent terminology.
2735
2736         * expr.c (do_case): Say 'ISO C++'
2737
2738         * friend.c (do_friend): Compress consecutive calls to warning.
2739         
2740 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
2741
2742         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
2743         * class.c (build_secondary_vtable): Reorganize.  Don't create a
2744         new vtable under the new ABI.
2745         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
2746         computing the size.
2747         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
2748         the initializing elements.
2749         (initialize_vtable): New function.
2750         (dfs_finish_vtbls): Use it.
2751         (dfs_accumulate_vtbl_inits): New function.
2752         (finish_vtbls): Merge primary and secondary vtables under the new
2753         ABI.
2754         (finish_struct_1): Remove redundant call to layout_vtable_decl.
2755         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
2756         aren't VAR_DECLs.
2757
2758         * class.c (build_vtable): New function, split out from ...
2759         (get_vtable_decl): ... here, and ...
2760         (build_secondary_vtable): ... here.
2761
2762         * pt.c (tsubst_decl): Fix formatting.
2763         
2764 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2765
2766         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
2767         (avoid_overlap, build_base_field): Likewise.
2768         (build_base_field, build_base_fields, is_empty_class): 
2769         Test DECL_SIZE with integer_zero.
2770         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
2771         * cp-tree.h (struct lang_type): New field size_unit.
2772         (CLASSTYPE_SIZE_UNIT): New macro.
2773         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
2774         (cp_finish_decl): Delete -Wlarger-than processing.
2775         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
2776         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
2777         * tree.c (make_binfo): binfo vector is one entry longer.
2778         (walk_tree): Walk DECL_SIZE_UNIT.
2779
2780 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
2781
2782         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
2783         comment.
2784         (build_vtable_entry): Don't assume all vtable entries are
2785         functions.
2786         (build_vtbl_initializer): Adjust accordingly.
2787         (get_vtable_decl): Fix formatting.
2788         
2789 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
2790
2791         * semantics.c (deferred_type_access_control): Walk the entire
2792         type_lookups list.
2793         (save_type_access_control): Rename from 
2794         initial_deferred_type_access_control.  Just remember the value.
2795         (decl_type_access_control): New fn.
2796         (begin_function_definition): Use deferred_type_access_control, after
2797         we've started the function.  Set type_lookups to error_mark_node.
2798         * parse.y (frob_specs, fn.def1): Adjust.
2799         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
2800         (parse_end_decl, parse_bitfield0, parse_method): New fns.
2801         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
2802         (after_type_component_declarator0): Likewise.
2803         (after_type_component_declarator): Likewise.
2804         (notype_component_declarator): Likewise.
2805         * cp-tree.h: Adjust.
2806
2807         * decl.c (redeclaration_error_message): Allow redeclaration of 
2808         namespace-scope decls.
2809
2810 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
2811
2812         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
2813
2814 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
2815
2816         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
2817         * decl2.c (grokclassfn): Likewise.
2818
2819         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
2820
2821         * decl2.c (lang_decode_option): Don't set default message length
2822         here.
2823         * lex.c (lang_init_options): Set it here.
2824
2825 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
2826
2827         Make DECL_CONTEXT mean the class in which a member function was
2828         declared, even for a virtual function.
2829         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
2830         (DECL_FRIEND_CONTEXT): New macro.
2831         (DECL_REAL_CONTEXT): Remove.
2832         (SET_DECL_FRIEND_CONTEXT): Likewise.
2833         (DECL_VIRTUAL_CONTEXT): Adjust.
2834         (DECL_CLASS_SCOPE_P): Use TYPE_P.
2835         (add_friends): Remove.
2836         (hack_decl_function_context): Likewise.
2837         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
2838         CP_DECL_CONTEXT.
2839         (build_over_call): Fix indentation.  Use DECL_CONTEXT
2840         instead of DECL_CLASS_CONTEXT.
2841         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
2842         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
2843         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2844         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
2845         (build_base_field): Likewise.
2846         (finish_struct_1): Likewise.
2847         (build_self_reference): Likewise.
2848         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
2849         DECL_REAL_CONTEXT.
2850         (pushtag): Use decl_function_context, not
2851         hack_decl_function_context.
2852         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2853         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
2854         (pushdecl): Remove bogus code.
2855         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
2856         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2857         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2858         Use decl_function_context, nothack_decl_function_context.
2859         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
2860         (grokdeclarator): Likewise.  Use decl_function_context, not
2861         hack_decl_function_context.
2862         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
2863         (start_function): Use DECL_FRIEND_CONTEXT, not
2864         DECL_CLASS_CONTEXT.  Use decl_function_context, not
2865         hack_decl_function_context.
2866         (finish_function): Use decl_function_context, not
2867         hack_decl_function_context.
2868         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
2869         DECL_CLASS_CONTEXT.
2870         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
2871         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
2872         (grokfield): Likewise.
2873         (finish_builtin_type): Likewise.
2874         (finish_vtable_vardec): Use decl_function_context, not
2875         hack_decl_function_context.
2876         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2877         (start_static_initialization_or_destruction): Likewise.
2878         (finish_static_initialization_or_destruction): Likewise.
2879         (mark_used): Adjust logic for deciding when to synthesize methods.
2880         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
2881         DECL_REAL_CONTEXT.
2882         * error.c (dump_function_decl): Use DECL_CONTEXT, not
2883         DECL_CLASS_CONTEXT.
2884         * friend.c (is_friend): Likewise.
2885         (add_friends): Remove.
2886         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
2887         * lex.c (begin_definition_of_inclass_inline): Use
2888         decl_function_context, not hack_decl_function_context.
2889         (process_next_inline): Likewise.
2890         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2891         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
2892         DECL_CLASSS_CONTEXT.
2893         (hack_identifier): Likewise.
2894         (synthesize_method):  Use decl_function_context, not
2895         hack_decl_function_context.
2896         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
2897         DECL_REAL_CONTEXT.
2898         (is_member_template): Use decl_function_context, not
2899         hack_decl_function_context.  Use DECL_CONTEXT, not
2900         DECL_CLASS_CONTEXT.
2901         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not 
2902         DECL_CLASS_CONTEXT.
2903         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
2904         DECL_REAL_CONTEXT.
2905         (push_template_decl_real): Likewise.
2906         (instantiate_class_template): Don't call add_friends.
2907         (tsubst_default_argument): Use DECL_CONTEXT, not
2908         DECL_REAL_CONTEXT.
2909         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
2910         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2911         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
2912         DECL_CLASS_CONTEXT.
2913         * repo.c (repo_inline_used): Likewise.
2914         * search.c (current_scope): Adjust for new _CONTEXT macros.
2915         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
2916         DECL_REAL_CONTEXT.
2917         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2918         (lookup_fnfields_here):Likewise.
2919         (check_final_overrider): Likewise.
2920         (init_vbase_pointers): Likewise.
2921         (virtual_context): Likewise.
2922         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
2923         (expand_body): Use decl_function_context, not
2924         hack_decl_function_context.
2925         * tree.c (hack_decl_function_context): Remove.
2926         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
2927         DECL_CLASS_CONTEXT.
2928         * typeck2.c (error_not_base_type): Likewise.
2929         
2930 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
2931
2932         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
2933
2934 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2935
2936         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
2937
2938 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
2939
2940         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
2941
2942 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
2943
2944         * decl2.c (lang_decode_option): Enable automatic line wrapping.
2945
2946 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
2947
2948         * parse.y (frob_specs): Split out...
2949         (parse_decl): From here.
2950         (fn.def2): Call initial_deferred_type_access_control.
2951         (after_type_component_declarator0): Call frob_specs.
2952         (notype_component_declarator0): Likewise.
2953         * search.c (friend_accessible_p): Nested classes are friends of their
2954         enclosing classes.
2955
2956 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
2957
2958         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
2959         used to create an implicit temporary.
2960
2961         * class.c (dfs_modify_vtables): Tweak calculation of functions to
2962         override.
2963
2964 2000-02-08  Nathan Sidwell  <nathan@acm.org>
2965
2966         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
2967         strip array element qualifiers too.
2968
2969 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
2970
2971         * decl.c (store_parm_decls): Don't build cleanups for parameters
2972         while processing_template_decl.
2973
2974 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
2975
2976         * cp-tree.h (struct saved_scope): Add incomplete field.
2977         (namespace_scope_incomplete): New macro.
2978         * decl.c (pushdecl): Use it.
2979         (hack_incomplete_structures): Use it.  See through artificial
2980         binding levels.
2981         (mark_saved_scope): Mark it.
2982
2983         Implement access control for nested types.
2984         * search.c (type_access_control): New fn.
2985         (accessible_p): Now we do perform access control for types.
2986         * semantics.c (deferred_type_access_control): New fn.
2987         (initial_deferred_type_access_control): New fn.
2988         (begin_function_definition): Call it.  Add lookups parm.
2989         * decl.c (struct binding_level): Add this_class field.
2990         (pushlevel_class): Set it.
2991         (mark_binding_level): Mark it.
2992         (lookup_name_real): Use it.  Call type_access_control.
2993         (mark_saved_scope): Mark lookups field.
2994         * cp-tree.h (flagged_type_tree): Add lookups field.
2995         (struct saved_scope): Add lookups field.
2996         (type_lookups): New macro.
2997         * parse.y (declmods): Now <ftype>.
2998         (parse_decl): Add lookups parm.  Call 
2999         initial_deferred_type_access_control.
3000         (lang_extdef): Clear type_lookups.
3001         (typed_declspecs, declmods, typespec): Set lookups field.
3002         (initdcl): Call deferred_type_access_control.
3003         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
3004         component_decl_1, named_parm): Adjust.
3005         * friend.c (is_friend): Nested classes are friends of their
3006         enclosing classes.
3007
3008         * class.c (currently_open_derived_class): New fn.
3009         * method.c (hack_identifier): Use it.
3010
3011         * lex.c (do_identifier): Remove obsolete code.
3012
3013         * parse.y (typed_typespecs): Propagate new_type_flag properly.
3014
3015 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
3016
3017         * tinfo.h: Remove apostrophes from C++ comment (xgettext
3018         thinks this file is plain C).
3019
3020 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3021
3022         * Makefile.in (call.o): Depend on $(EXPR_H).
3023
3024         * call.c: Include "expr.h".
3025
3026         * class.c (dump_class_hierarchy): Add prototype.
3027
3028         * search.c (dfs_get_pure_virtuals): Likewise.
3029
3030 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
3031
3032         * parse.y (simple_stmt): Allow :: token in asm parameter list.
3033         * parse.c: Rebuilt.
3034
3035 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
3036
3037         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
3038         Store it in DECL_FCONTEXT.
3039         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
3040
3041 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
3042
3043         * tinfo.h (old abi): #include "tconfig.h".
3044         * tinfo.cc (convert_to_base): Move into old abi section.
3045
3046 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
3047
3048         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
3049         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
3050         (BINFO_PRIMARY_BINFO): New macro.
3051         (BF_DELTA): Rename to ...
3052         (BV_DELTA): ... this.
3053         (BF_VCALL_INDEX): Rename to ...
3054         (BV_VCALL_INDEX): ... this.
3055         (BF_FN): Rename to ...
3056         (BV_FN): ... this.
3057         * class.c (build_vbase_path): Adjust for changes to reverse_path.
3058         (set_rtti_entry): Rename BF_ macros to BV_ variants.
3059         (modify_vtable_entry): Simplify.
3060         (add_virtual_function): Rename BF_ macros to BV_ variants.
3061         (build_vtable_initializer): Likewise.
3062         (get_class_offset_1): Remove.
3063         (dfs_get_class_offset): Likewise.
3064         (get_class_offset): Likewise.
3065         (dfs_find_final_overrider): New function.
3066         (find_final_overrider): Likewise.
3067         (modify_one_vtable): Remove.
3068         (dfs_find_base): New function.
3069         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
3070         find_final_overrider.
3071         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
3072         virtuals.
3073         (dfs_fixup_vtable_deltas): Remove.
3074         (override_one_vtable): Remove.
3075         (merge_overrides): Likewise.
3076         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
3077         unreal chilren of virtual bases.
3078         (finish_struct_1): Don't use merge_overrides.  Don't use
3079         dfs_fixup_vtable_deltas.
3080         * tree.c (reverse_path): Return a TREE_LIST, not a chain of 
3081         BINFOs.
3082         
3083 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
3084             Jason Merrill  <jason@yorick.cygnus.com>
3085
3086         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
3087
3088 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
3089
3090         * exception.cc (__throw_bad_typeid): Add missing std::.
3091
3092 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3093
3094         * cp-tree.h (make_thunk): PROTO -> PARAMS.
3095
3096 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
3097
3098         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
3099
3100         Runtime support for new-abi rtti.
3101         * inc/typeinfo (type_info::operator!=): Define in class.
3102         (type_info::before, type_info::name, type_info::operator==,
3103         type_info::operator!=): Define new ABI implementations.
3104         (type_info::is_pointer_p, type_info::is_function_p): Declare
3105         new virtual functions.
3106         (type_info::do_catch, type_info::do_upcast): Likewise.
3107         
3108         * tinfo.h (__base_class_info): Define new class.
3109         (__class_type_info): Likewise.
3110         (__si_class_type_info): Likewise.
3111         (__vmi_class_type_info): Likewise.
3112         (__dynamic_cast): Prototype.
3113         
3114         * tinfo.cc: Conditionalize old and new rtti mechanisms.
3115         (type_info::is_pointer_p): Define new function.
3116         (type_info::is_function_p): Likewise.
3117         (type_info::do_catch): Likewise.
3118         (type_info::do_upcast): Likewise.
3119         (vtable_prefix): New structure for vtable access.
3120         (adjust_pointer): Define new template function.
3121         (contained_p, public_p, virtual_p, contained_public_p,
3122         contained_nonpublic_p, contained_nonvirtual_p): Define new
3123         functions.
3124         (nonvirtual_base_type): New local variable.
3125         (__class_type_info::~__class_type_info): Define.
3126         (__si_class_type_info::~__si_class_type_info): Likewise.
3127         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
3128         (__class_type_info::do_catch): Define new function.
3129         (__class_type_info::do_upcast): Likewise.
3130         (__class_type_info::find_public_src): Likewise.
3131         (__class_type_info::do_find_public_src): Likewise.
3132         (__si_class_type_info::do_find_public_src): Likewise.
3133         (__vmi_class_type_info::do_find_public_src): Likewise.
3134         (__class_type_info::do_dyncast): Likewise.
3135         (__si_class_type_info::do_dyncast): Likewise.
3136         (__vmi_class_type_info::do_dyncast): Likewise.
3137         (__class_type_info::do_upcast): Likewise.
3138         (__si_class_type_info::do_upcast): Likewise.
3139         (__vmi_class_type_info::do_upcast): Likewise.
3140         (__dynamic_cast): Likewise.
3141         
3142         * tinfo2.cc (__fundamental_type_info): Define new class.
3143         (__pointer_type_info): Likewise.
3144         (__reference_type_info): Likewise.
3145         (__array_type_info): Likewise.
3146         (__function_type_info): Likewise.
3147         (__enum_type_info): Likewise.
3148         (__ptr_to_member_type_info): Likewise.
3149         (__fundamental_type_info::~__fundamental_type_info): Define.
3150         (__pointer_type_info::~__pointer_type_info): Likewise.
3151         (__reference_type_info::~__reference_type_info): Likewise.
3152         (__array_type_info::~__array_type_info): Likewise.
3153         (__function_type_info::~__function_type_info): Likewise.
3154         (__enum_type_info::~__enum_type_info): Likewise.
3155         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
3156         (__pointer_type_info::do_catch): Define new function.
3157         (__ptr_to_member_type_info::do_catch): Define new function.
3158         
3159         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
3160         (__is_pointer): Likewise.
3161
3162         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
3163
3164 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
3165
3166         * cp/class.c (build_vtable): Rename to build_primary_vtable.
3167         (prepare_fresh_vtable): Rename to build_secondary_vtable.
3168         (make_new_vtable): New function.
3169         (modify_vtable_entry): Handle generation of new vtables correctly.
3170         (modify_one_vtable): Remove unused parameter.
3171         (dfs_fixup_vtable_deltas): Likewise.
3172         (override_one_vtable): Use build_secondary_vtable.
3173         (finish_struct_1): Use build_primary_vtable and
3174         build_secondary_vtable.
3175         
3176 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
3177
3178         * cp/decl.c: Adjust variable names, comments, help strings.
3179
3180 2000-01-29  Nathan Sidwell  <nathan@acm.org>
3181
3182         * new2.cc (operator delete[]): Use operator delete, don't assume
3183         implementation.
3184
3185 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
3186
3187         * class.c (build_vtbl_initializer): Add argument to
3188         build_vtable_entry call.
3189
3190 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
3191
3192         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
3193         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
3194         (BF_DELTA): New macro.
3195         (BF_VCALL_INDEX): Likewise.
3196         (BF_FN): Likewise.
3197         (THUNK_VCALL_OFFSET): Likewise.
3198         (make_thunk): Change prototype.
3199         * class.c (build_vtable_entry): Integrate
3200         build_vtable_entry_for_fn.  Handle vcall indices.
3201         (build_vtable_entry_for_fn): Remove.
3202         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
3203         BF_VCALL_INDEX, BF_FN.
3204         (modify_vtable_entry): Integrate common code from
3205         modify_one_vtable and dfs_fixup_vtable_deltas.
3206         (add_virtual_function): Set BF_VCALL_INDEX.
3207         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
3208         and BF_FN.
3209         (modify_one_vtable): Simplify.
3210         (dfs_fixup_vtable_deltas): Likewise.
3211         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. 
3212         * method.c (make_thunk): Handle vcall indices.
3213         
3214 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
3215
3216         Compiler side new abi rtti (not enabled).
3217         * cp-tree.h (new_abi_rtti_p): New macro.
3218         (emit_support_tinfos): Prototype new function.
3219         (tinfo_decl_p): Likewise.
3220         (emit_tinfo_decl): Likwise.
3221         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
3222         macros.
3223         (doing_runtime): New local static.
3224         (init_rtti_processing): Add new-abi initializer.
3225         (get_tinfo_decl): Add new-abi logic.
3226         (tinfo_from_decl): Likewise.
3227         (build_dynamic_cast_1): Likewise.
3228         (qualifier_flags): New static function.
3229         (tinfo_base_init): Likewise.
3230         (generic_initializer): Likewise.
3231         (ptr_ref_initializer): Likewise.
3232         (ptmd_initializer): Likewise.
3233         (class_hint_flags): Likewise.
3234         (class_initializer): Likewise.
3235         (synthesize_tinfo_var): Likewise.
3236         (create_real_tinfo_var): Likewise.
3237         (create_pseudo_type_info): Likewise.
3238         (get_vmi_pseudo_type_info): Likewise.
3239         (create_tinfo_types): Likewise.
3240         (emit_support_tinfos): New global function.
3241         (tinfo_decl_p): New global predicate.
3242         (emit_tinfo_decl): New global function.
3243         * class.c (set_rtti_entry): Generalize for old and new rtti.
3244         (build_vtbl_initializer): Likewise.
3245         * decl2.c (finish_file): Likewise.
3246
3247 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
3248
3249         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
3250         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
3251
3252 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
3253
3254         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
3255         for scopes.
3256
3257 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
3258
3259         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
3260
3261 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
3262
3263         * optimize.c (calls_setjmp_r): Supply new argument
3264         to special_function_p.
3265
3266 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3267
3268         * call.c: PROTO -> PARAMS.
3269         * class.c: Likewise.
3270         * cp-tree.h: Likewise.
3271         * cvt.c: Likewise.
3272         * decl.c: Likewise.
3273         * decl.h: Likewise.
3274         * decl2.c: Likewise.
3275         * dump.c: Likewise.
3276         * errfn.c: Likewise.
3277         * error.c: Likewise.
3278         * except.c: Likewise.
3279         * expr.c: Likewise.
3280         * init.c: Likewise.
3281         * input.c: Likewise.
3282         * lex.c: Likewise.
3283         * lex.h: Likewise.
3284         * method.c: Likewise.
3285         * optimize.c: Likewise.
3286         * parse.y: Likewise.
3287         * pt.c: Likewise.
3288         * repo.c: Likewise.
3289         * rtti.c: Likewise.
3290         * search.c: Likewise.
3291         * semantics.c: Likewise.
3292         * spew.c: Likewise.
3293         * tree.c: Likewise.
3294         * typeck.c: Likewise.
3295         * typeck2.c: Likewise.
3296         * xref.c: Likewise.
3297
3298 2000-01-25  Richard Henderson  <rth@cygnus.com>
3299
3300         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
3301
3302 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
3303
3304         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
3305         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
3306         (struct vcall_offset_data_s): New type.
3307         (dfs_vcall_offset_queue_p): New function.
3308         (dfs_build_vcall_offset_vtbl_entries): Likewise.
3309         (build_vcall_offset_vtbl_entries): Likewise.
3310         (layout_vtable_decl): Likewise.
3311         (num_vfun_entries): Likewise.
3312         (num_extra_vtbl_entries): Add the entries for vcall offsets.
3313         (build_vtbl_initializer): Likewise.
3314         (dfs_finish_vtabls): Use layout_vtable_decl.
3315         (modify_one_vtables): Always duplicate vtables under the new ABI.
3316         (finish_struct_1): Use layout_vtable_decl.
3317         
3318 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3319
3320         * decl.c (member_function_or_else): Change third arg from a format
3321         specifier to an `enum overload_flags'.  Callers changed.
3322
3323 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
3324
3325         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
3326         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
3327         build_const_cast, get_delta_difference, check_return_expr): Avoid
3328         ANSI string concatenation usage.  
3329
3330 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
3331
3332         * class.c (layout_class_type): Put the fields required to make a
3333         class non-empty at the end, not the beginning, of the TYPE_FIELDs
3334         list.
3335
3336 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
3337
3338         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
3339         template.
3340
3341         * decl2.c (mark_used): Do instantiate inlines that have been
3342         explicitly instantiated.
3343
3344 2000-01-24  Richard Henderson  <rth@cygnus.com>
3345
3346         * call.c (build_over_call): Use expand_tree_builtin.
3347         * typeck.c (build_function_call_real): Likewise.
3348         (build_binary_op_nodefault): Handle unordered compares.
3349
3350 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
3351
3352         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
3353         cp_tree_index values.
3354         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
3355         New global node #defines for them.
3356         * rtti.c (call_void_fn): Replace with ...
3357         (build_runtime_decl): ... new static function.
3358         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
3359         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
3360         (build_dynamic_cast_1): Always produce correctly typed result.
3361         Explicitly produce type_info addresses. Use dynamic_cast_node.
3362         * exception.cc (__throw_bad_cast): Return `void *'.
3363         (__throw_bad_typeid): Return `const type_info &'.
3364
3365 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
3366
3367         * cp-tree.h (get_vtable_decl): Prototype new function.
3368         * class.c (get_vtable_decl): New function. Broken out from ...
3369         (build_vtable): ... here. Use it.
3370         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
3371         by get_vtable_decl.
3372
3373 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
3374
3375         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
3376         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
3377         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
3378         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
3379         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
3380         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
3381         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
3382         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
3383         (CPTI_TINFO_VAR_ID): New enumeration.
3384         (__tp_desc_type_node, __access_mode_type_node,
3385         __bltn_desc_type_node, __user_desc_type_node,
3386         __class_desc_type_node, __ptr_desc_type_node,
3387         __attr_desc_type_node, __func_desc_type_node,
3388         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
3389         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
3390         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
3391         enum_desc_type_node, class_desc_type_node,
3392         si_class_desc_type_node, vmi_class_desc_type_node,
3393         ptmd_desc_type_node, base_desc_type_node): New #defines.
3394         (tinfo_fn_id, tinfo_fn_type): Rename to ...
3395         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
3396         (tinfo_var_id): New enumeration.
3397         (DECL_TINFO_FN_P): Augment comment.
3398         * decl.c (cp_global_trees): Adjust documentation.
3399         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
3400         tinfo_decl_type and tinfo_var_id.
3401         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
3402         (build_typeid): Remove unused variable.
3403         (get_tinfo_var): Use tinfo_var_id.
3404         (tinfo_name): New static function.
3405         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
3406         (tinfo_from_decl): Likewise.
3407         (get_base_offset): New static function, broken out of
3408         expand_class_desc.
3409         (expand_si_desc): Use tinfo_name.
3410         (expand_class_desc): Likewise. Lose local static variable.
3411         Use base_desc_type_node. Use get_base_offset.
3412         (expand_ptr_desc): Use tinfo_name.
3413         (expand_attr_desc): Likewise.
3414         (expand_generic_desc): Likewise.
3415
3416         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
3417         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
3418
3419 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
3420
3421         * cp-tree.h (__eprintf): Remove declaration.
3422         * tree.c (__eprintf): Remove definition.
3423
3424 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
3425             Mark Mitchell  <mark@codesourcery.com>
3426
3427         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3428         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
3429
3430 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
3431
3432         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
3433
3434 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
3435
3436         * cp-tree.h (register_dtor_fn): New function.
3437         * decl.c (destroy_local_static): Rename to ...
3438         (register_dtor_fn): ... this.  Give it external linkage.
3439         (expand_static_init): Use it.
3440         * decl2.c (do_static_initialization): Likewise, if using
3441         __cxa_atexit.
3442         (do_static_destruction): Check that __cxa_atexit is not in use.
3443         (finish_file): Don't call do_static_destruction if using
3444         __cxa_atexit.
3445
3446         * typeck.c (convert_arguments): Restore two-message error
3447         reporting.
3448         
3449 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
3450
3451         Remap dynamic cast hint values to be consistent across ABIs.
3452         * search.c (dynamic_cast_base_recurse): Remap generated value.
3453         (get_dynamic_cast_base_type): Adjust documentation.
3454         * tinfo.h (__user_type_info::dyncast): Likewise.
3455         (__user_type_info::find_public_subobj): Remap BOFF meaning.
3456         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
3457         (__class_type_info::do_dyncast): Likewise.
3458         (__class_type_info::do_find_public_subobj): Likewise.
3459         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.     
3460
3461 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
3462
3463         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
3464
3465         * typeck2.c (incomplete_type_error): Restore previous
3466         cp_error and cp_error_at call sequence.
3467         
3468 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
3469
3470         * class.c (dump_class_hierarchy): Make format agree with argument;
3471         cast pointer to unsigned long and print with %lx.
3472         
3473 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
3474
3475         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
3476         
3477         * typeck.c (composite_pointer_type, common_type,
3478         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
3479         build_function_call_real, convert_arguments,
3480         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
3481         build_unary_op, mark_addressable, build_compound_expr,
3482         build_static_cast, build_reinterpret_cast, build_const_cast,
3483         build_c_cast, build_modify_expr, get_delta_difference,
3484         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with 
3485         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
3486         into a single one.
3487         * typeck2.c (readonly_error, abstract_virtuals_error,
3488         process_init_constructor, check_for_new_type): Likewise.
3489
3490 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
3491
3492         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
3493         VAR_DECLs.
3494
3495 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
3496
3497         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
3498         (build_x_typeid): Likewise.
3499         (get_tinfo_fn): Likewise.
3500         (get_tinfo_fn_unused): Rename to ...
3501         (get_tinfo_decl): ... here.
3502         * rtti.c (build_headof): Replace logic error with assertion.
3503         (get_tinfo_fn_dynamic): Rename to ...
3504         (get_tinfo_decl_dynamic): ... here. Make static. Use
3505         complete_type_or_else.
3506         (build_x_typeid): Move into ...
3507         (build_typeid): ... here. Adjust call to
3508         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
3509         throw_bad_typeid expression.
3510         (get_tinfo_fn_unused): Rename to ...
3511         (get_tinfo_decl): ... here. Adjust comment.
3512         (get_tinfo_fn): Delete.
3513         (tinfo_from_decl): New static function.
3514         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
3515         (get_typeid): Use complete_type_or_else.
3516         (build_dynamic_cast_1): Adjust calls to
3517         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
3518         * parse.y (primary): Adjust call to build_typeid.
3519         * except.c (build_eh_type_type_ref): Adjust call to
3520         get_tinfo_decl. Mark as used.
3521         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
3522         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
3523         * parse.c: Regenerated.
3524
3525 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
3526
3527         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
3528         calling convention.
3529         (resolves_to_fixed_type_p): Document calling convention.
3530         * rtti.c (build_x_typeid): Initialize NONNULL.
3531
3532         * cp-tree.h (build_shared_int_cst): New function.
3533         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
3534         * class.c (modify_vtable_entry): Likewise.
3535         (add_virtual_function): Split out code to generated shared
3536         INTEGER_CSTs to build_share_int_cst.
3537         (modify_all_vtables): Handle all the overridden functions here.
3538         Add overridden functions from non-primary virtual bases to the
3539         primary vtable.
3540         (finish_struct_1): Adjust call to modify_all_vtables.  Add
3541         overridden functions from non-primary bases to the vtable.
3542         * tree.c (build_shared_int_cst): New function.
3543         
3544         * cp-tree.h (scratchalloc): Remove.
3545         (build_scratch_list): Likewise.
3546         * call.c (convert_class_to_reference): Replace build_scratch_list
3547         and build_expr_list with build_tree_list.
3548         (add_candidate): Replace scratchalloc with expralloc.  Note memory
3549         leak.
3550         (build_user_type_conversion_1):  Replace build_scratch_list
3551         and build_expr_list with build_tree_list.
3552         (build_new_op): Likewise.
3553         (build_op_delete_call): Likewise.
3554         (convert_like): Likewise.
3555         * cvt.c (ocp_convert): Likewise.
3556         * decl.c (start_decl): Likewise.
3557         (start_function): Likewise.
3558         (finish_destructor_body): Likewise.
3559         (maybe_build_cleanup_1): Likewise.
3560         * decl2.c (reparse_decl_as_expr): Likewise.
3561         * init.c (perform_member_init): Likewise.
3562         (expand_cleanup_for_base): Likewise.
3563         (build_builtin_delete_call): Likewise.
3564         (build_new_1): Likewise.
3565         (build_delete): Likewise.
3566         * method.c (do_build_assign_ref): Likewise.
3567         * parse.y (already_scoped_stmt): Likewise.
3568         (nontrivial_exprlist): Likewise.
3569         (net_initializer): Likewise.
3570         (initlist): Likewise.
3571         * parse.c: Regenerated.
3572         * rtti.c (build_x_typeid): Likewise.
3573         (build_dynamic_cast_1): Likewise.
3574         * typeck.c (build_x_compound_expr): Likewise.
3575         (build_static_cast): Likewise.
3576         (build_modify_expr): Likewise.
3577         
3578         * cp-tree.h (DECL_VINDEX): Add documentation.
3579         * class.c (build_vtable_entry): Likewise.
3580         (start_vtable): Add comment.
3581         (add_virtual_function): Replace pending_hard_virtuals with
3582         overridden_virtuals and pending_virtuals with new_virtuals.
3583         Replace redundant assignments with assertions.
3584         (check_for_override): Add comment.
3585         (check_bases_and_members): Replace pending_hard_virtuals with
3586         overridden_virtuals and pending_virtuals with new_virtuals.
3587         (create_vtbl_ptr): Likewise.
3588         (layout_class_type): Likewise.
3589         (finish_struct_1): Likewise.  Add comments.
3590         
3591 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
3592
3593         * class.c (finish_struct_1): Replace redundant code with
3594         assertions.
3595
3596         * cp-tree.h (flag_new_abi): Move.
3597         (flag_use_cxa_atexit): Likewise.
3598         (flag_honor_std): Likewise.
3599         (flag_rtti): Likewise.
3600         (vbase_offsets_in_vtable_p): Define.
3601         (vptrs_present_everywhere_p): Likewise.
3602         (TYPE_CONTAINS_VPTR_P): Likewise.
3603         (dfs_walk_real): Declare.
3604         * class.c (build_vbase_pointer_fields): Check
3605         vbase_offsets_in_vtable_p.
3606         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
3607         BINFO_VPTR_FIELD.
3608         (build_vbase_offset_vtbl_entries): Simplify.
3609         (build_vbase_offset_vtbl_entries): Adjust.
3610         (build_vbase_pointer): Add ability to look up vbase offsets in
3611         vtable. 
3612         (start_vtable): New function.
3613         (add_virtual_function): Use it.
3614         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
3615         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
3616         (build_vtbl_initializer): Take the type of the complete object as
3617         input.  Use it to correctly calculate vbase offsets.
3618         (dfs_finish_vtbls): Pass the complete type to
3619         build_vtbl_initializer.
3620         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3621         (create_vtable_ptr): Create a vtable even if there are no
3622         new virtual functions, under the new ABI.
3623         (finish_struct_1): Likewise.
3624         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
3625         * decl.c (exapnd_static_init): Remove call to
3626         preserve_initializer.
3627         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
3628         vtables.
3629         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
3630         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
3631         (construct_virtual_bases): Don't initialize virtual base pointers
3632         under the new ABI.
3633         (build_aggr_init): Clean up comment.
3634         (expand_aggr_init_1): Likewise.
3635         * rtti.c (expand_class_desc): Store the virtual function table
3636         index where the vbase offset lives in the offset field.
3637         * search.c (dfs_walk_real): Make it global.
3638         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
3639         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
3640         
3641         * tinfo.h (USItype): Make it signed under the new ABI.
3642         * tinfo.cc (convert_to_base): New function.  Encapsulate base
3643         conversion logic here.
3644         (__class_type_info::do_upcast): Use it.
3645         (__class_type_info::do_dyncast): Likewise.
3646         (__class_type_info::do_find_public_subobj): Likewise.
3647         
3648         * init.c (construct_virtual_bases): Don't look up the addresses of
3649         virtual bases at run-time.
3650
3651         * class.c (build_vbase_pointer): Relocate.
3652         (build_vbase_pointer_fields): Likewise.
3653         (dfs_build_vbase_offset_vtbl_entries): Likewise.
3654         (build_vbase_offset_vtbl_entries): Likewise.
3655
3656         * decl.c (init_decl_processing): Complain if -fnew-abi
3657         -fno-vtable-thunks is used.
3658
3659         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
3660         flag_new_abi.
3661
3662 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
3663
3664         * cp-tree.h (num_extra_vtbl_entries): New function.
3665         (size_extra_vtbl_entries): Likewise.
3666         (dfs_vtable_path_unmark): Likewise.
3667         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
3668         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
3669         * class.c (num_extra_vtbl_entries): New function.
3670         (size_extra_vtbl_entries): Likewise.
3671         (dfs_build_vbase_offset_vtbl_entries): New function.
3672         (build_vbase_offset_vtbl_entries): Likewise.
3673         (build_vtbl_initializer): Use it.
3674         (finish_struct_1): Adjust vtable sizes (using
3675         num_extra_vtbl_entries).
3676         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
3677         THUNK_DECL is non-NULL before expanding it.
3678         * init.c (expand_virtual_init): Adjust the vtable pointer by
3679         size_extra_vtbl_entries before storing it.
3680         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
3681         Handle TREE_LIST parameters here, not in the dfs_* functions.
3682         (dfs_unmarked_real_bases_queue_p): Adjust.
3683         (dfs_marked_real_bases_queue_p): Likewise.
3684         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
3685         (dfs_vtable_path_marked_real_bases_queue_p): New function.
3686         (dfs_vtable_path_unmark): Likewise.
3687         
3688 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
3689
3690         * optimize.c (copy_body_r): Clear the operand three of a
3691         TARGET_EXPR when copying it.
3692
3693 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3694
3695         * method.c (build_decl_overload_real): Check whether we are in ::
3696         before returning __builtin_new/delete.
3697
3698 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
3699
3700         * pt.c (tsubst_friend_function): Improve comment.
3701         (instantiate_decl): Avoid crashing when a "nested" function is
3702         instantiated from the top level.
3703         
3704         * dump.c (dqeueue_and_dump): Dump
3705         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
3706
3707 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3708
3709         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
3710
3711 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
3712
3713         * g++spec.c (lang_specific_driver): Add -fnew-abi if
3714         ENABLE_NEW_GXX_ABI defined.
3715         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
3716         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
3717         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
3718
3719 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
3720
3721         * decl.c (start_cleanup_fn): Call pushdecl.
3722
3723         * call.c (convert_class_to_reference): Fix typos.
3724         (build_conditional_expr): Handle errors gracefully.
3725         * class.c (push_nested_class): Likewise.
3726         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
3727         (DECL_THIS_EXTERN): Use it.
3728         (DECL_THIS_STATIC): Likewise.
3729         * cvt.c (convert_to_void): Handle errors gracefully.
3730         (build_expr_type_conversion): Likewise.
3731         * decl.c (maybe_push_decl): Likewise.
3732         (start_decl_1): Likewise.
3733         (require_complete_types_for_parms): Likewise.
3734         * parse.y (structsp): Likewise.
3735         (base_class): Likewise.
3736         * parse.c: Regenerated.
3737         * pt.c (finish_member_template_decl): Likewise.
3738         * typeck.c (decay_conversion): Likewise.
3739         
3740         * cp-tree.h (dfs_skip_vbases): New function.
3741         (find_vbase_instance): Likewise.
3742         * class.c (determine_primary_base): Allow a nearly empty base to
3743         serve as a primary base class under the new ABI.
3744         (get_class_offset_1): Rename to ...
3745         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
3746         messages here.
3747         (get_class_offset): Use it.  Issue error messages here.
3748         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
3749         find the right copies of virtual bases.
3750         (fixup_vtable_deltas1): Rename to ...
3751         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
3752         bases as primary bases.
3753         (fixup_vtable_deltas): Remove.
3754         (override_one_vtable): Handle virtual bases as primary bases.
3755         (merge_overrides): Likewise.
3756         (finish_struct_1): Likewise.
3757         (dump_class_hierarchy): Dump primary-ness of bases as well.
3758         * search.c (mark_primary_bases): Use a pre-order traversal to
3759         handle primary virtual bases.
3760         (dfs_skip_vbases): New fiunction.
3761         (expand_upcast_fixups): Adjust to handle primary virtual bases.
3762         (fixup_virtual_upcast_offsets): Likewise.
3763         (fixup_all_virtual_upcast_offsets): Likewise.
3764         (dfs_find_vbase_instances): New function.
3765         (find_vbase_instance): Likewise.
3766         
3767 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
3768
3769         * lex.c (DIR_SEPARATOR): Delete macro.
3770
3771 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
3772  
3773        * decl2.c (lang_decode_option): Handle automatic line wrapping
3774        option.
3775         
3776 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
3777
3778         * friend.c (do_friend): Don't resolve scopes when processing
3779         template declarations, even if the qualifying scope doesn't
3780         involve template parameters.
3781
3782 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
3783
3784         * class.c (dfs_modify_vtables_queue_p): Remove.
3785         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
3786         and dfs_marked_real_bases_queue_p instead of
3787         dfs_modify_vtables_queue_p.
3788
3789         * class.c (build_vbase_path): Simplify.
3790         (dfs_propagate_binfo_offsets): New function.
3791         (propagate_binfo_offsets): Use it.
3792         (remove_base_field): Simplify.
3793         (dfs_set_offset_for_vbases): Remove.
3794         (dfs_set_offset_for_shared_vbases): New function.
3795         (dfs_set_offset_for_unshared_vbases): Likewise.
3796         (layout_virtual_bases): Use them.
3797         (layout_basetypes): Don't call propagate_binfo_offsets.
3798         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
3799         for the vbases.
3800         
3801         * class.c (build_base_field): New function, split out from ...
3802         (build_base_fields): ... here.  Use it.  Allocate primary bases
3803         first, under the new ABI.
3804         (get_vtable_entry): Remove.
3805         (remove_base_field): New function, split out from ...
3806         (remove_base_fields): ... here.  Adjust since primary bases come
3807         first under the new ABI.
3808         
3809         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
3810         (initialize_vtbl_ptrs): New function.
3811         (expand_indirect_vtbls_init): Change prototype.
3812         (convert_pointer_to_vbase): Declare.
3813         * init.c (expand_direct_vtbls_init): Remove.
3814         (dfs_initialize_vtbl_ptrs): New function.
3815         (initialize_vtbl_ptrs): Likewise.
3816         (emit_base_init): Use initialize_vtbl_ptrs.
3817         * search.c (convert_pointer_to_vbase): Make it global.
3818         (expand_indirect_vtbls_init): Remove vtable initialization code.
3819         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
3820         
3821         * class.c (dfs_finish_vtbls): New function.
3822         (finish_vtbls): Use it.
3823         (dump_class_hierarchy): New function.
3824         
3825         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
3826         (BINFO_VBASE_PRIMARY_P): New macro.
3827         (BINFO_VIRTUALS): Add to documentation.
3828         (SET_BINFO_PRIMARY_MARKED_P): Remove.
3829         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
3830         (dfs_mark_primary_bases_queue_p): Likewise.
3831         (dfs_unmarked_real_bases_queue_p): New function.
3832         (dfs_marked_real_bases_queue_p): Likewise.
3833         * search.c (dfs_mark_primary_bases): Adjust.
3834         (mark_primary_bases): Likewise.
3835         (get_shared_vbase_if_not_primary): New function.
3836         (dfs_unmarked_real_bases_queue_p): Likewise.
3837         (dfs_marked_real_bases_queue_p): Likewise.
3838         (dfs_get_pure_virtuals): Simplify.
3839         (get_pure_virtuals): Likewise.
3840         
3841 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3842
3843         * lex.c: Include tm_p.h.
3844
3845 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
3846
3847         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
3848
3849 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
3850
3851         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
3852         * pt.c (instantiate_decl): Defer comdat templates that might not be
3853         needed.
3854         
3855         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
3856         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
3857         (finish_file): Likewise.
3858
3859         * decl2.c (import_export_class): Undo 12/14 change.
3860
3861         * error.c (dump_decl): operator new, not operatornew.
3862
3863         * class.c (field_decl_cmp): A nontype is "greater" than a type.
3864         * search.c (lookup_field_1): Look for the last field with the
3865         desired name.
3866
3867 2000-01-05  Nathan Sidwell  <nathan@acm.org>
3868
3869         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
3870         FUNCTION_DECL.
3871
3872 2000-01-05  Nathan Sidwell  <nathan@acm.org>
3873
3874         * typeck.c (build_static_cast): Don't strip target qualifiers
3875         when casting from a class.
3876
3877 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3878
3879         * class.c (warn_hidden): Initialize variable `fndecl'.
3880
3881 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
3882
3883         * decl.c (flag_isoc9x): New variable to be able to use code in
3884         c-common.c.  For now always zero.
3885
3886 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
3887
3888         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
3889         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
3890         or unshare_base_binfos for virtual bases here.
3891         * search.c (dfs_get_vbase_types): Do it here.
3892         (get_vbase_types): Adjust.
3893         
3894 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
3895
3896         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
3897         (BINFO_PRIMARY_MARKED_P): Use flag 5.
3898         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
3899         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
3900         (unmark_primary_bases): Remove declaration.
3901         (unmarkedp): Declare.
3902         (dfs_vbase_unmark): Likewise.
3903         * class.c (determine_primary_base): Return immediately if there
3904         are no base classes.  Call mark_primary_bases here.
3905         (modify_all_direct_vtables): Remove.
3906         (modify_all_indirect_vtables): Remove.
3907         (dfs_modify_vtables_queue_p): New function.     
3908         (dfs_modify_vtables): New function.
3909         (modify_all_vtables): Use them.
3910         (build_base_fields): Build FIELD_DECLs for primary virtual base
3911         classes.
3912         (create_vtable_ptr): Don't call determine_primary_base here.
3913         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
3914         (dfs_set_offset_for_vbases): ... this.
3915         (layout_virtual_bases): Use it.
3916         (layout_class_type): Call determine_primary_base here.
3917         * search.c (unmarkedp): Make it global.
3918         (shared_marked_p): Simplify.
3919         (shared_unmarked_p): Likewise.
3920         (dfs_primary_bases_queue_p): Remove.
3921         (dfs_unmark_primary_bases): Likewise.
3922         (unmark_primary_bases): Likewise.
3923         (mark_primary_bases): Simplify.
3924         (get_pure_virtuals): Don't call mark_primary_bases here.
3925         (dfs_vbase_unmark): New function.
3926         (get_vbase_types): Simplify.
3927
3928         * class.c (struct base_info): Remove.
3929         (determine_primary_base): Take has_virtual_p rather than a
3930         base_info as input.  Don't calculate max_has_virtual.
3931         (finish_struct_bits): Remove max_has_virtual argument.
3932         (create_vtable_ptr): Remove max_has_virtual_p argument.
3933         (layout_virtual_bases): Remove max argument.
3934         (layout_basetypes): Likewise.
3935         (layout_class_type): Remove max_has_virtual_p argument.
3936         (finish_struct_1): Remove max_has_virtual.
3937
3938         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
3939         (layout_basetypes): Remove.
3940         * class.c (propagate_binfo_offsets): Moved here from tree.c.
3941         Update to handle primary virtual bases.
3942         (remove_base_fields): New function, split out from
3943         layout_basetypes.
3944         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
3945         (layout_virtual_bases): New function, split out from
3946         layout_basetypes.  Update to handle primary virtual bases.
3947         (layout_basetypes): Moved here from tree.c.  Use
3948         remove_base_fields and layout_virtual_bases.
3949         * search.c (dfs_mark_primary_bases_queue_p): New function.
3950         (mark_primary_bases): Use it.
3951         * tree.c (CEIL): Remove.
3952         (propagate_binfo_offsets): Remove.
3953         (layout_basetypes): Remove.
3954         
3955 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
3956
3957         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
3958         (BINFO_PRIMARY_MARKED_P): New macro.
3959         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
3960         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
3961         (mark_primary_bases): New function.
3962         (unmark_primary_bases): Likewise.
3963         * search.c (get_abstract_virtuals_1): Remove.
3964         (dfs_mark_primary_bases): New function.
3965         (mark_primary_bases): Likewise.
3966         (dfs_unmark_primary_bases): Likewise.
3967         (unmark_primary_bases): Likewise.
3968         (dfs_get_pure_virtuals): Likewise.
3969         
3970 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
3971
3972         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
3973         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
3974         (modify_one_vtable): Adjust.
3975         (fixup_vtable_deltas1): Likewise.
3976         (override_one_vtable): Likewise.
3977         * search.c (get_abstract_virtuals_1): Likewise.
3978         (get_pure_virtuals): Likewise.
3979         (expand_upcast_fixups): Likewise.
3980         * tree.c (debug_binfo): Likewise.
3981         
3982         * class.c (build_vtable): Don't return a value.  Don't rebuild
3983         vtables for bases that have already been handled.
3984         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
3985         already been handled.
3986         (modify_one_vtable): Adjust accordingly.
3987         (fixup_vtable_deltas1): Likewise.
3988         (finish_struct_1): Likewise.
3989
3990 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3991
3992         * call.c (build_new_method_call): Also check destructors.
3993
3994 1999-12-31  Mark Mitchell  <mark@codesourcery.com>
3995
3996         * cp-tree.h (VF_NORMAL_VALUE): Remove.
3997         * class.c (struct base_info): Remove vfield, vfields, and rtti.
3998         (set_primary_base): New function, split out from ...
3999         (finish_base_struct): ... here.  Rename to ...
4000         (determine_primary_base): ... this.  Simplify.
4001         (create_vtable_ptr): Tweak accordingly.
4002         (finish_struct_1): Simplify.
4003         
4004         * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
4005         (CLASSTYPE_N_BASECLASSES): Likewise.
4006         (BINFO_FOR_VBASE): New macro.
4007         (get_vbase_types): Change prototype.
4008         * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
4009         (prepare_fresh_vtable): Likewise.
4010         (finish_vtbls): Likewise.
4011         (get_class_offset_1): Likewise.
4012         (modify_all_indirect_vtables): Likewise.
4013         (build_vbase_pointer_fields): Likewise.
4014         * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
4015         * init.c (sort_base_init): Use BINFO_FOR_VBASE.
4016         (expand_member_init): Likewise.
4017         * search.c (get_base_distance): Likewise.
4018         (lookup_field_queue_p): Likewise.
4019         (virtual_context): Likewise.
4020         (get_vbase_types): Don't return a value.  Set
4021         CLASSTYPE_VBASECLASSES here.
4022         * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
4023         
4024 1999-12-30  Mark Mitchell  <mark@codesourcery.com>
4025
4026         * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
4027
4028 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
4029
4030         * class.c (create_vtable_ptr): Put the vtable at the beginning of
4031         the class, not the end, in the new ABI.
4032         * tree.c (propagate_binfo_offsets): Do the right thing for the new
4033         ABI.
4034
4035 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
4036
4037         * cp-tree.h (lang_type): Add nearly_empty_p.  Adjust dummy.
4038         (CLASSTYPE_NEARLY_EMPTY_P): New macro.
4039         * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
4040         (check_field_decls): Likewise.
4041         (check_bases_and_members): Likewise.
4042
4043 1999-12-28  Mark Mitchell  <mark@codesourcery.com>
4044
4045         * cp-tree.h (do_inline_function_hair): Remove.
4046         * class.c (layout_class_type): New function, split out from
4047         finish_struct_1.
4048         (fixup_pending_inline): Likewise.
4049         (fixup_inline_methods): New function.
4050         * method.c (fixup_pending_inline): Remove.
4051         (do_inline_function_hair): Likewise.
4052         
4053         * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
4054         new ABI.
4055         
4056         * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
4057         (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
4058         (CLASSTYPE_PURE_VIRTUALS): ... this.
4059         (lang_decl_flags): Replace abstract_virtual with pure_virtual.
4060         (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
4061         (DECL_PURE_VIRTUAL_P): ... this.
4062         (get_abstract_virtuals): Rename to ...
4063         (get_pure_virtuals): ... this.
4064         * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
4065         DECL_ABSTRACT_VIRTUAL_P.  Replace CLASSTYPE_ABSTRACT_VIRTUALS with
4066         CLASSTYPE_PURE_VIRTUALS.
4067         * class.c (build_vtable_entry): Likewise.
4068         (finish_struct_bits): Likewise.  Call get_pure_virtuals, not
4069         get_abstract_virtuals.
4070         (build_vtbl_initializer): Likewise.
4071         (override_one_vtable): Likewise.
4072         (check_methods): Likewise.
4073         * decl.c (duplicate_decls): Likewise.
4074         (redeclaration_error_message): Likewise.
4075         (lang_mark_tree): Likewise.
4076         * decl2.c (grok_function_init): Likewise.
4077         (import_export_vtable): Likewise.
4078         (import_expor_class): Likewise.
4079         * typeck2.c (abstract_virtuals_error): Likewise.
4080         * xref.c (GNU_xref_member): Likewise.
4081         * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
4082         
4083 1999-12-26  Zack Weinberg  <zack@wolery.cumb.org>
4084
4085         * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
4086         throughout.
4087
4088 1999-12-26  Mark Mitchell  <mark@codesourcery.com>
4089
4090         * decl.c (store_return_init): Use mode of old RTL generated for
4091         DECL_RESULT, not the mode of DECL_RESULT itself.
4092         * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
4093         for functions that used named return values.
4094         
4095 1999-12-24  Mark Mitchell  <mark@codesourcery.com>
4096
4097         * semantics.c (expand_body): Use
4098         note_deferral_of_defined_inline_function.
4099
4100 1999-12-22  Mark Mitchell  <mark@codesourcery.com>
4101
4102         * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
4103
4104 1999-12-22  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
4105
4106         * error.c (dump_decl): Support named return values.
4107
4108 1999-12-20  Mark Mitchell  <mark@codesourcery.com>
4109
4110         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
4111         (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
4112         (CLASSTYPE_PRIMARY_BINFO): Likewise.
4113         * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
4114         TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
4115         (check_bases_and_members): Set them here instead.
4116         (create_vtable_ptr): New function, split out from ...
4117         (finish_struct_1): ... here.  Use it.  Tidy.  Use
4118         CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
4119         * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
4120         the first field in the class.
4121         * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES.  Handle
4122         seeing TYPE_VFIELD as the first field in the class.
4123         
4124         * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
4125         (TYPE_POLYMORPHIC_P): ... this.
4126         (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
4127         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
4128         (TREE_CALLS_NEW): Remove.
4129         (TREE_MANGLED): Likewise.
4130         * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
4131         and TYPE_POLYMORPHIC_P.
4132         * class.c (check_bases): Likewise.
4133         (finish_base_struct): Likewise.
4134         (finish_struct_bits): Likewise.
4135         (check_for_override): Likewise.
4136         (finish_struct_1): Likewise.
4137         (get_vfield_name): Likewise.
4138         * decl.c (xref_basetypes): Likewise.
4139         * decl2.c (import_export_class): Likewise.
4140         (import_export_decl): Likewise.
4141         * error.c (dump_function_decl): Likewise.
4142         * pt.c (instantiate_class_template): Likewise.
4143         * repo.c (repo_inline_used): Likewise.
4144         * rtti.c (build_headof): Likewise.
4145         (get_tinfo_fn_dynamic): Likewise.
4146         (build_x_typeid): Likewise.
4147         (get_tinfo_var): Likewise.
4148         (build_dynamic_cast_1): Likewise.
4149         (synthesize_tinfo_fn): Likewise.
4150         * search.c (lookup_field_1): Likewise.
4151         (dfs_debug_mark): Likewise.
4152         (maybe_suppress_debug_info): Likewise.
4153         * typeck.c (build_component_ref): Likewise.
4154         (build_component_addr): Likewise.
4155         * typeck2.c (process_init_constructor): Likewise.
4156         
4157 1999-12-20  Nathan Sidwell  <nathan@acm.org>
4158
4159         * typeck.c (strip_all_pointer_quals): New static function.
4160         (build_static_cast): Use it. Don't use at_least_as_qualified_p.
4161
4162 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
4163
4164         * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
4165         (dso_handle_node): New macro.
4166         (flag_use_cxa_atexit): New variable.
4167         (declare_global_var): New function.
4168         (start_anon_func): Remove declaration.
4169         (end_anon_func): Likewise.
4170         * decl.c (get_atexit_node): New function, split out from
4171         destroy_local_static.  Handle flag_use_cxa_atexit.
4172         (get_dso_handle_node): Likewise.
4173         (start_cleanup_fn): Renamed from start_anon_func.  Moved here from
4174         except.c.  Handle flag_use_cxa_atexit.
4175         (end_cleanup_fn): Renamed from end_anon_func.  Moved here from
4176         except.c.
4177         (declare_global_var): New variable.
4178         (destroy_local_static): Handle flag_use_cxa_atexit.
4179         * decl2.c (flag_use_cxa_atexit): New variable.
4180         (lang_f_options): Likewise.
4181         * except.c (start_anon_func): Remove.
4182         (end_anon_func): Liekwise.
4183         * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
4184         * rtti.c (get_tinfo_var): Use declare_global_var.
4185
4186 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
4187
4188         * class.c (check_field_decls): Don't return a value.
4189         (avoid_overlap): Moved here from tree.c.
4190         (build_base_fields): Likewise.
4191         (check_bases): New function, split out from finish_base_struct.
4192         (check_bases_and_members): New function, split out from 
4193         finish_struct_1.
4194         (struct base_info): Remove cant_have_default_ctor,
4195         cant_have_const_ctor, cant_have_asn_ref.
4196         (finish_base_struct): Split semantic analysis into check_bases.
4197         (finish_struct_methods): Fix bogus assertion.
4198         (check_field_decls): Call finish_struct_anon here.
4199         (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
4200         (finish_struct_1): Use check_bases_and_members.  Reorganize.
4201         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
4202         (build_base_fields): Don't declare.
4203         * tree.c (avoid_overlap): Remove.
4204         (build_base_fields): Likewise.
4205         
4206         * optimize.c (struct inline_data): Remove scope_stmt.
4207         (remap_block): Don't use insert_block_after_note.  Don't update
4208         scope_stmt.
4209         (expand_call_inline): Don't update scope_stmt.
4210         (optimize_function): Don't initialize scope_stmt.
4211         * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
4212         NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
4213
4214 1999-12-15  Mark Mitchell  <mark@codesourcery.com>
4215
4216         * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
4217         out of the class, rather than taking them as parameters.
4218         (build_vbase_pointer_fields): Move here from tree.c.
4219         (build_vtbl_or_vbase_field): New function.
4220         (check_methods): Likewise.
4221         (remove_zero_width_bitfields): Likewise.
4222         (add_virtual_function): Use tree_cons instead of temp_tree_cons.
4223         (delete_duplicate_fields_1): Tidy.  Don't delete duplicate
4224         USING_DECLs here.
4225         (finish_struct_methods): Handle the case where there are no
4226         methods here.
4227         (get_basefndecls): Use tree_cons instead of temp_tree_cons.
4228         (check_field_decls): Call delete_duplicate_fields here.
4229         (finish_struct_1): Tidy.  Use check_methods and
4230         remove_zero_width_bitfields.
4231         * cp-tree.h (build_vbase_pointer_fields): Remove.
4232         * decl.c (grokdeclarator): Use tree_cons instead of
4233         temp_tree_cons.
4234         * decl2.c (qualified_lookup_using_namespace): Use tree_cons
4235         instead of temp_tree_cons.
4236         * lex.c (cons_up_default_function): Remove dead code.
4237         * method.c (fixup_pending_inline): New function, split out from ...
4238         (do_inline_function_hair): ... here.
4239         * tree.c (build_vbase_pointer_fields): Remove.
4240         
4241 1999-12-15  Jason Merrill  <jason@casey.cygnus.com>
4242
4243         * tree.c (walk_tree): Walk operand subtrees in forward order.
4244         * optimize.c (expand_call_inline): Likewise.
4245         (optimize_function): Initialize id->scope_stmt to something useful.
4246         (remap_block): Assume id->scope_stmt has a useful value.
4247
4248 1999-12-15  Nathan Sidwell  <nathan@acm.org>
4249
4250         * typeck.c (build_c_cast): Expand warning message. Move pointer
4251         alignment warning to after the cast. Don't warn about pointer
4252         alignment when given a pointer to incomplete.
4253
4254 1999-12-15  Richard Henderson  <rth@cygnus.com>
4255
4256         * cp-tree.h (make_aggr_type): Declare.
4257         * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
4258         (make_aggr_type): New.
4259
4260         * decl.c (build_typename_type, init_decl_processing): Use it.
4261         (build_ptrmemfunc_type, xref_tag): Likewise.
4262         * except.c (call_eh_info): Likewise.
4263         * init.c (init_init_processing): Likewise.
4264         * pt.c (process_template_parm, lookup_template_class): Likewise.
4265         * rtti.c (expand_class_desc): Likewise.
4266         * semantics.c (begin_class_definition, finish_typeof): Likewise.
4267         * tree.c (copy_template_template_parm): Likewise.
4268
4269 1999-12-15  Jason Merrill  <jason@yorick.cygnus.com>
4270
4271         * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
4272         sizeof (struct tree_common).
4273
4274 1999-12-14  Jason Merrill  <jason@casey.cygnus.com>
4275
4276         * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
4277         outermost block to point to the inlined function decl.
4278
4279         * error.c (dump_decl): operator==, not operator ==.
4280         (op_to_string): Likewise.
4281
4282         * decl.c (compute_array_index_type): Handle null name.
4283
4284         * decl2.c (ambiguous_decl): Fix to match comment.
4285         (lookup_using_namespace): Adjust.
4286
4287         * decl2.c (import_export_class): Don't ignore dllimport.
4288
4289 1999-12-14  Mark Mitchell  <mark@codesourcery.com>
4290
4291         * class.c (check_field_decls): Split out from ...
4292         (finish_struct_1): ... here.  Use it.  Tidy.
4293
4294         * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
4295         * optimize.c (copy_body_r): Pass it.
4296         * tree.c (remap_save_expr): Clear walk_subtrees for an
4297         already-handled SAVE_EXPR.
4298         (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
4299
4300         * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
4301         * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
4302
4303         * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
4304
4305 1999-12-14  Mumit Khan  <khan@xraylith.wisc.edu>
4306
4307         * class.c (finish_base_struct): Allow multiple COM base classes
4308         as well as non-COM bases as long as it's not the leftmost.
4309
4310 1999-12-13  Mumit Khan  <khan@xraylith.wisc.edu>
4311
4312         * lex.c (saving_parse_to_obstack): New global.
4313         (reinit_parse_for_block): Use.
4314         (reinit_parse_for_expr): Use.
4315         (check_newline): Use.
4316
4317 1999-12-13  Mark Mitchell  <mark@codesourcery.com>
4318
4319         * optimize.c (initialize_inlined_parameters): Take FN to which the
4320         parameters belong as an argument.
4321         (expand_call_inline): Expand calls into the parameter
4322         initializations before pushing the function onto the list of
4323         functions we are presently expanding.
4324
4325 1999-12-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4326
4327         * class.c (get_vtable_name): Use a literal format string and
4328         VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
4329         (prepare_fresh_vtable): Likewise.
4330
4331         * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
4332         VTABLE_NAME_FORMAT.
4333
4334         * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
4335
4336         * init.c (build_vec_init): Initialize variable `try_body'.
4337
4338         * lex.c (yyerror): Don't call a variadic function with a
4339         non-literal format string.
4340
4341         * optimize.c (optimize_function): Call memset, not bzero.
4342
4343         * pt.c (for_each_template_parm_r): Add static prototype.
4344
4345 1999-12-09  Andreas Jaeger  <aj@suse.de>
4346
4347         * except.c (expand_throw): Add static attribute to match
4348         prototype.
4349
4350         * Makefile.in (semantics.o): Add dependency on output.h.
4351         * semantics.c: Include output.h for declaration of
4352         make_function_rtl.
4353
4354 1999-12-09  Mark Mitchell  <mark@codesourcery.com>
4355
4356         * decl.c (init_decl_processing): Reenable inlining on trees.
4357         (finish_function): Likewise.
4358         * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
4359         * semantics.c (simplify_aggr_init_exprs): New function.
4360         (expand_body): Use it.
4361         * tree.c (walk_tree): Special-case TARGET_EXPRs since they
4362         sometimes present the same sub-tree twice.
4363         
4364         * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
4365         `csl'.
4366
4367         * semantics.c (finish_switch_cond): Do conversions here, not ...
4368         * typeck.c (c_expand_start_case): Here.
4369
4370         * semantics.c (do_poplevel): Remove unused variable.
4371         
4372 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
4373
4374         * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
4375         unless we're declaring the variable in question.
4376
4377 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
4378
4379         * decl.c (init_decl_processing): #if 0 last patch.
4380         (finish_function): Likewise.
4381
4382 1999-12-05  Mark Mitchell  <mark@codesourcery.com>
4383
4384         * decl.c (init_decl_processing): Set flag_inline_trees if
4385         !flag_no_inline.
4386
4387         * cp-tree.h (calls_setjmp_p): Declare.
4388         * decl.c (finish_function): Mark functions that call setjmp as
4389         uninlinable.
4390         * optimize.c (calls_setjmp_r): New function.
4391         (calls_setjmp_p): Likewise.
4392
4393 1999-12-04  Mark Mitchell  <mark@codesourcery.com>
4394
4395         * optimize.c (expand_call_inline): Wrap the expanded call in an
4396         EXPR_WITH_FILE_LOCATION node to get correct line numbers for
4397         inlined functions.
4398
4399         * optimize.c (inline_data): Remove fns_top.  Add scope_stmt.  Add
4400         in_target_cleanup_p.
4401         (remap_decl): New function.
4402         (remap_block): Likewise.
4403         (copy_scope_stmt): Likewise.
4404         (copy_body_r): Use remap_decl and copy_scope_stmt.
4405         (copy_body): Use VARRAY_TOP_TREE.
4406         (initialize_inlined_parameters): Likewise.
4407         (declare_return_variable): Likewise.
4408         (inlinable_function_p): Check flag_inline_trees.
4409         (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
4410         specially.  Use VARRAY_PUSH_TREE.  Create a BLOCK for the
4411         parameters of the inlined function.
4412         (optimize_function): Prevent recursion into partially complete
4413         functions.
4414         
4415         * cp-tree.def (SCOPE_STMT): Take one operand.
4416         * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
4417         (SCOPE_NULLIFIED_P): Redefine.
4418         (SCOPE_NO_CLEANUPS_P): New macro.
4419         (add_scope_stmt): Change prototype.
4420         * decl.c (poplevel): Tidy.  Warn about unused variables here.
4421         Record SCOPE_STMT_BLOCKs.
4422         (finish_function): Keep DECL_INITIAL for functions that might be
4423         inlined.
4424         * ir.texi: Document SCOPE_NO_CLEANUPS_P.
4425         * semantics.c: Include rtl.h.
4426         (add_scope_stmt): Return the new scope statement and, for an
4427         end-of-scope statement, its matching begin statement.  Don't set
4428         SCOPE_NULLIFIED_P.
4429         (do_pushlevel): Simplify, now that we are always
4430         function-at-a-time.
4431         (do_poplevel): Likewise.  Record SCOPE_STMT_BLOCKs.
4432         (expand_stmt): Don't call expand_start_bindings or
4433         expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
4434         * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
4435         SCOPE_NULLIFIED_P.
4436         * Makefile.in (semantics.o): Depend on RTL_H.
4437         
4438         * decl2.c (pending_statics_used): Make it a macro.
4439         (saved_inlines_used): Likewise.
4440         (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
4441         (mark_inline_for_output): Likewise.
4442         (ssdf_decls_used): Remove.
4443         (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
4444         (generate_ctor_or_dtor_function): Adjust accordingly.
4445         
4446 1999-11-24  Geoffrey Keating  <geoffk@cygnus.com>
4447             Greg McGary  <gkm@gnu.org>
4448
4449         * decl.c (duplicate_decls): Merge
4450         DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
4451         DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
4452
4453 1999-12-02  Mike Stump  <mrs@wrs.com>
4454
4455         * init.c (perform_member_init): Handle parse errors better.
4456
4457 1999-12-01  Mark Mitchell  <mark@codesourcery.com>
4458
4459         * cp-tree.h (min_tree_cons): Remove.
4460         (scratch_ovl_cons): Likewise.
4461         * decl.c (saveable_obstack): Don't declare.
4462         (duplicate_decls): Tweak error-message.
4463         (initialize_local_var): Explicitly mark the definition as static.
4464         (finish_function): Call permanent_allocation, just so
4465         that the middle-end sees the obstacks it expects.
4466         (mark_cp_function_context): Likewise.
4467         * init.c (build_new): Don't use min_tree_cons.
4468         * lex.c (permanent_obstack): Don't declare.
4469         (current_obstack, saveable_obstack): Likewise.
4470         * spew.c (current_obstack, saveable_obstack): Likewise.
4471         * tree.c (current_obstack, saveable_obstack): Likewise.
4472         (scratch_ovl_cons): Remove.
4473         (build_min_nt): Don't mess with obstacks.
4474         (build_min): Likewise.
4475         (min_tree_cons): Remove
4476         * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
4477         (build_x_function_call): Likewise.
4478         (build_c_cast): Don't use min_tree_cons.
4479         
4480 1999-11-29  Mark Mitchell  <mark@codesourcery.com>
4481
4482         * pt.c (tsubst_decl): Robustify.
4483
4484 1999-11-27  Mark Mitchell  <mark@codesourcery.com>
4485
4486         * decl2.c (finish_file): Call expand_body for inline functions
4487         that will be written out but that do not yet have RTL.
4488         * semantics.c (expand_body): Do not generate RTL For inline
4489         functions that do not yet need to be written out.
4490
4491 1999-11-25  Mark Mitchell  <mark@codesourcery.com>
4492
4493         * Make-lang.in (CXX_SRCS): Add optimize.c.  
4494         * Makefile.in (CXX_OBJS): Add optimize.o.
4495         (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
4496         (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
4497         (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
4498         (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
4499         (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
4500         (dump.o): Likewise.
4501         (optimize.o): New target.  
4502         * class.c: Don't include splay-tree.h.
4503         * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.  
4504         * cp-tree.h: Include splay-tree.h.
4505         (DECL_UNINLINABLE): New macro.
4506         (CTOR_BEGIN_P, CTOR_END_P): New macros.
4507         (flag_inline_trees): New variable.
4508         (local_variable_p): New function.
4509         (nonstatic_local_decl_p): Likewise.
4510         (optimize_function): Likewise.
4511         (cplus_unsave_expr_now): Remove.
4512         (copy_tree_r): Declare.
4513         (remap_save_expr): Likewise.  
4514         * decl.c (local_variable_p): Don't
4515         make it static.
4516         (local_variable_p_walkfn): New function.
4517         (make_rtl_for_local_static): Remove code to try to avoid writing
4518         out static constants.
4519         (emit_local_var): Fix indentation.
4520         (nonstatic_local_decl_p): New function.
4521         (check_default_argument): Use local_variable_p_walkfn, not
4522         local_variable_p, when walking the tree.
4523         (start_function): Set the DECL_CONTEXT for automatically generated
4524         labels.
4525         (finish_constructor_body): Use CTOR_STMT to mark the end of a
4526         constructor.  
4527         * decl2.c: Don't include splay-tree.h.
4528         (flag_inline_trees): Define.  
4529         * dump.c: Don't include
4530         splay-tree.h.  
4531         * except.c (expand_end_catch_block): Fix comment formatting.
4532         (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
4533         (expand_throw): Tidy comment.  
4534         * init.c (build_vec_delete_1): Use create_temporary_var.  
4535         * lex.c (cplus_tree_code_type): Make it static.
4536         (cplus_tree_code_length): Likewise.
4537         (cplus_tree_code_name): Likewise.  
4538         * optimize.c: New file.  
4539         * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
4540         with computed gotos.
4541         (setup_vtbl_ptr): Mark the beginnings of constructors with
4542         CTOR_STMT.
4543         (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
4544         (expand_body): Call optimize_function.  Save bodies if we're doing
4545         inlining on trees.
4546         * tree.c: Don't include splay-tree.h.  Include insn-config.h and
4547         integrate.h.
4548         (copy_tree_r): Make it public.
4549         (statement_code_p): New function.
4550         (mark_local_for_remap_r): Likewise.
4551         (cp_usave_r): Likewise.
4552         (cp_unsave): Likewise.
4553         (build_cplus_new): Set DECL_CONTEXT for temporary variables.
4554         (walk_tree): Walk into `s' class nodes.  Walk statement chains.
4555         (copy_tree_r): Handle 's' class nodes.  Restore chains for
4556         statements.  Nullify scopes.  Don't copy types.
4557         (init_tree): Set lang_unsave to cp_unsave.
4558         (remap_save_expr): Define.
4559         * ir.texi: Document CTOR_STMT.
4560         
4561 1999-11-24  Jason Merrill  <jason@casey.cygnus.com>
4562
4563         * search.c (note_debug_info_needed): Do perform this optimization
4564         for dwarf2.  
4565         (maybe_suppress_debug_info): Likewise.  Start by clearing
4566         TYPE_DECL_SUPPRESS_DEBUG.
4567
4568 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
4569
4570         * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
4571
4572         * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
4573
4574 1999-11-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4575
4576         * decl.c (pushdecl, grokdeclarator): Don't call a variadic
4577         function with a non-literal format string.
4578
4579         * lex.c (do_identifier): Likewise.
4580
4581         * typeck.c (build_unary_op): Likewise.
4582
4583 1999-11-23  Mark Mitchell  <mark@codesourcery.com>
4584
4585         * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
4586
4587 1999-11-22  Mark Mitchell  <mark@codesourcery.com>
4588
4589         * cp-tree.def (CTOR_COMPLETE): New tree node.
4590         * decl.c (finish_constructor_body): Add it, to mark the end of the
4591         constructor.
4592         (finish_function): Don't call end_protect_partials here.
4593         * ir.texi (CTOR_COMPLETE): Document it.
4594         * semantics.c (expand_stmt): Handle it.
4595         
4596         * cp-tree.def (FUNCTION_NAME): New tree node.
4597         * cp-tree.h (current_function_name_declared): Tweak documentation.
4598         (lang_decl_flags): Add pretty_function_p, adjust dummy.
4599         (DECL_PRETTY_FUNCTION_P): New macro.
4600         * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
4601         etc., in a template function.  Use at_function_scope_p instead of
4602         expanding it inline.
4603         * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
4604         specially.
4605         (tsubst): Handle FUNCTION_NAME.
4606         (tsubst_copy): Likewise.
4607         (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
4608         etc. in instantiation.
4609         * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
4610         even in template functions.
4611         (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
4612         conditional scope at the top of a destructor.
4613         
4614         * error.c (dump_function_decl): Use `[ with ... ]' syntax for
4615         specializations too.
4616
4617 1999-11-22  Nathan Sidwell  <nathan@acm.org>
4618
4619         * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
4620         when actually negative.
4621
4622         * typeck.c (convert_for_assignment): Expand comment about
4623         strange NULL check, moved from ...
4624         (convert_for_initialization): ... here. Remove unneeded
4625         code.
4626
4627 1999-11-21  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
4628
4629         * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
4630         * init.c (build_vec_delete, build_vec_delete_1): Likewise.
4631         Always destruct virtual bases of array components, but never
4632         delete them.
4633         (build_vec_init): Adjust invocations.
4634         (build_delete): Likewise.
4635         * decl2.c (delete_sanity): Likewise.
4636
4637 1999-11-19  Nathan Sidwell  <nathan@acm.org>
4638
4639         * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
4640         * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
4641         * decl2.c (grok_method_quals): Accept `restrict' as applying to
4642         the object pointer. Return such qualifiers.
4643         (grokclassfn): Apply this pointer qualifiers. Cleanup unused
4644         variables.
4645
4646 1999-11-18  Mark Mitchell  <mark@codesourcery.com>
4647
4648         * except.c (expand_end_catch_block): Fix typo.
4649         (expand_exception_blocks): Simplify.  Don't call
4650         expand_leftover_cleanups.
4651
4652 1999-11-15  Jason Merrill  <jason@casey.cygnus.com>
4653
4654         * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
4655         * pt.c (tsubst, case INTEGER_TYPE): Call it.  
4656         Check uses_template_parms.
4657
4658         * class.c (finish_struct): If we're a local class in a template
4659         function, add a TAG_DEFN.
4660         * pt.c (lookup_template_class): If this is a local class in a
4661         template function, call pushtag.
4662         (tsubst_expr, case TAG_DEFN): Handle classes, too.
4663
4664         Emit debug info with the vtable.
4665         * search.c (maybe_suppress_debug_info): New function...
4666         * class.c (finish_struct_1): ...split out from here.
4667         * cp-tree.h: Declare it.
4668         * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
4669         if we're writing out the vtable.
4670         * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, 
4671         note_debug_info_needed): #if 0 out.
4672
4673 1999-11-14  Mark Mitchell  <mark@codesourcery.com>
4674
4675         * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
4676         * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
4677         TREE_PERMANENT.
4678         * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
4679         * decl2.c (lookup_arg_dependent): Use it.
4680         
4681         * cp-tree.h (cp_finish_decl): Change prototype.
4682         (finish_static_data_member_decl): Likewise.
4683         (push_permanent_obstack): Remove declaration.
4684         (push_expression_obstack): Likewise.
4685         (push_scratch_obstack): Likewise.
4686         (DECL_TEMPLATE_PARM_P): Robustify.
4687         (SET_DECL_TEMPLATE_PARM_P): New macro.
4688         * class.c (add_method): Don't manipulate obstacks.
4689         (finish_vtbls): Likewise.
4690         * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
4691         * decl.c (binding_for_name): Don't manipulate obstacks.
4692         (maybe_push_to_top_level): Likewise.
4693         (pop_from_top_level): Likewise.
4694         (duplicate_decls): Likewise.
4695         (pushdecl): Likewise.
4696         (implicitly_declare): Likewise.
4697         (build_typename_type): Likewise.
4698         (start_decl): Likewise.
4699         (cp_finish_decl): Likewise.
4700         (finish_decl): Likewise.
4701         (destroy_local_static): Likewise.
4702         (expand_static_init): Likewise.
4703         (complete_array_type): Likewise.
4704         (grokvardecl): Likewise.
4705         (build_ptrmemfnc_type): Likewise.
4706         (grokdeclarator): Likewise.
4707         (xref_tag): Likewise.
4708         (xref_basetypes): Likewise.
4709         (start_enum): Likewise.
4710         (finish_enum): Likewise.
4711         (start_function): Likewise.
4712         (finish_function): Likewise.
4713         (start_method): Adjust call to cp_finish_decl.
4714         * decl2.c (finish_static_data_member_decl): Don't manipulate
4715         obstacks.
4716         (grokfield): Likewise.
4717         (grokbitfield): Likewise.
4718         (get_temp_name): Likewise.
4719         (get_sentry): Likewise.
4720         (fnish_file): Likewise.
4721         (lookup_arg_dependent): Likewise.
4722         * except.c (call_eh_info): Likewise.
4723         (push_eh_info): Likewise.
4724         (do_pop_exception): Likewise.
4725         (initialize_handler_parm): Likewise.
4726         (expand_end_eh_spec): Likewise.
4727         (alloc_eh_object): Likewise.
4728         (expand_throw): Likewise.
4729         * expr.c (extract_scalar_init): Likewise.
4730         * init.c (build_java_class_ref): Likewise.
4731         * lex.c (get_time_identifier): Likewise.
4732         (snarf_defarg): Likewise.
4733         (add_defarg_fn): Likewise.
4734         (is_global): Simplify.
4735         (do_identifier): Don't check TREE_PERMANENT.
4736         * method.c (emit_thunk): Don't manipulate obstacks.
4737         * parse.y (condition): Adjust call to cp_finish_decl.
4738         (primary): Likewise.
4739         (initdcl): Likewise.
4740         (initdcl0_innards): Likewise.
4741         (nomods_initdcl0): Likewise.
4742         * pt.c (push_inline_template_parms_recursive): Use
4743         SET_DECL_TEMPLATE_PARM_P.
4744         (process_template_parm): Likewise.
4745         (lookup_template_class): Don't manipulate obstacks.
4746         (instantiate_class_template): Adjust call to
4747         finish_static_data_member_decl.
4748         (tsubst_decl): Don't manipulate obstacks.
4749         (tsubst_expr): Likewise.
4750         (instantiate_template): Likewise.
4751         (instantiate_decl): Adjust calls to cp_finish_decl.
4752         * rtti.c (call_void_fn): Don't manipulate obstacks.
4753         (get_tinfo_var): Likewise.
4754         (get_tinfo_fn_unused): Likewise.
4755         (build_dynamic_cast_1): Likewise.
4756         (expand_si_desc): Likewise.
4757         (expand_class_desc): Likewise.
4758         (expand_ptr_desc): Likewise.
4759         (expand_attr_desc): Likewise.
4760         (expand_generic_desc): Likewise.
4761         (synthesize_tinfo_fn): Likewise.
4762         * search.c (expand_upcast_fixups): Likewise.
4763         * semantics.c (finish_asm_stmt): Likewise.
4764         (finish_named_return_value): Likewise.
4765         (begin_class_definition): Likewise.
4766         (finish_class_definition): Likewise.
4767         (finish_typeof): Likewise.
4768         * tree.c (build_cplus_method_type): Likewise.
4769         (reverse_path): Likewise.
4770         (copy_template_template_parm): Likewise.
4771         (build_expr_ptr_wrapper): Likewise.
4772         (push_expression_obstack): Remove.
4773         (push_permanent_obstack): Likewise.
4774         * typeck.c (mark_addressable): Likewise.
4775         
4776 1999-11-13  Mark Mitchell  <mark@codesourcery.com>
4777
4778         * call.c (build_conditional_expr): Use build_target_expr_with_type.
4779         (convert_like): Likewise.
4780         (build_over_call): Likewise.
4781         * cp-tree.h (build_target_expr): Remove.
4782         (build_target_expr_with_type): New function.
4783         * cvt.c (build_up_reference): Use get_target_expr.
4784         * decl.c (build_target_expr): Move to ...
4785         * tree.c (build_target_expr): Here.  Make it static.
4786         (build_target_expr_with_type): New function.  Set DECL_CONTEXT on
4787         the temporary VAR_DECLs.
4788         (get_target_expr): Use it.
4789
4790 1999-11-13  Jason Merrill  <jason@yorick.cygnus.com>
4791
4792         * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
4793         * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
4794         * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
4795         * class.c (set_rtti_entry): Use it.
4796
4797 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
4798
4799         * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
4800         here.
4801         * semantics.c (finish_expr_stmt): Call it here instead.  Move
4802         default_conversion logic to semantic-analysis time.
4803
4804 1999-11-12  Jason Merrill  <jason@yorick.cygnus.com>
4805
4806         * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
4807
4808 Fri Nov 12 12:56:32 MST 1999    Diego Novillo <dnovillo@cygnus.com>
4809
4810         * init.c (init_init_processing): Re-instated Nov 11 patch after
4811         approval.
4812
4813 Fri Nov 12 10:42:02 MST 1999    Diego Novillo <dnovillo@cygnus.com>
4814
4815         * init.c (init_init_processing): Undo patch from Nov 11, 1999.
4816         Patch had not been approved yet.
4817
4818 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
4819
4820         * decl.c (compute_array_index_type): New function, split out from
4821         grokdeclarator.
4822         (create_array_type_for_decl): Likewise.
4823         (grokdeclarator): Use them.
4824
4825         * semantics.c (expand_stmt): Don't suspend_momentary or
4826         resume_momentary.
4827
4828 Thu Nov 11 12:42:11 MST 1999    Diego Novillo <dnovillo@cygnus.com>
4829
4830         * init.c (init_init_processing): Header information for
4831         arrays allocated via `new' should have the same alignment used by
4832         malloc.
4833
4834 1999-11-10  Mark Mitchell  <mark@codesourcery.com>
4835
4836         * error.c (dump_function_name): Don't crash if given a friend
4837         pseudo-instantiation.
4838
4839         * cp-tree.h (build_enumerator): Change prototype.
4840         * decl.c (enum_next_value): Remove.
4841         (enum_overflow): Likewise.
4842         (init_decl_processing): Don't register enum_next_value as a root.
4843         (start_enum): Clear TYPE_VALUES for a redefined enum.
4844         (finish_enum): Reset the type of enumeration constants.
4845         (build_enumerator): Fix indentation.  Don't copy CONST_DECLs when
4846         we don't need to.  Maintain the TYPE_VALUES list and look there
4847         for the previously defined enumeration constant.  Let enumeration
4848         constants have the type of their values until the enumeration type
4849         is complete.
4850         * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
4851         (structsp): Adjust.
4852         * parse.c: Regenerated.
4853         * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
4854         
4855 Wed Nov 10 12:43:21 1999  Philippe De Muyter  <phdm@macqel.be>
4856                           Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4857
4858         * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
4859
4860 1999-11-09  Mark Mitchell  <mark@codesourcery.com>
4861
4862         * cp-tree.h (language_function): Remove x_last_dtor_insn and
4863         x_last_parm_cleanup_insn.
4864         * decl.c (last_dtor_insn): Remove.
4865         (last_parm_cleanup_insn): Likewise.
4866         (expand_start_early_try_stmts): Don't set them.
4867         (store_parm_decls): Likewise.
4868         (save_function_data): Or save them.
4869         (mark_lang_function): Or mark them.
4870
4871 1999-11-08  Mark Mitchell  <mark@codesourcery.com>
4872
4873         * decl.c (store_parm_decls): Generate cleanup code at
4874         semantic-analysis time.  Destroy objects in the correct order.
4875
4876 1999-11-07  Mark Mitchell  <mark@codesourcery.com>
4877
4878         * cp-tree.h (begin_new_placement): Remove.
4879         (finish_new_placement): Likewise.
4880         * class.c (finish_struct_1): Don't suspend_momentary or
4881         resume_momentary.
4882         * decl.c (grokdeclarator): Likewise.
4883         (maybe_build_cleanup_1): Likewise.
4884         * except.c (push_eh_cleanup): Likewise.
4885         (build_terminate_handler): Likewise.
4886         * init.c (build_new_1): Likewise.
4887         * parse.y (parse_decl): Change prototype.
4888         (initdecls, notype_initdecls, initdcl): Don't return int.
4889         (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
4890         (.begin_new_placement): Remove.
4891         (.finish_new_placement): Likewise.
4892         (nonmomentary_expr): Likewise.
4893         (suspend_mom): Likewise.
4894         (condition): Don't suspend_momentary, resume_momentary, or keep
4895         track of need to resume.
4896         (unary_expr): Likewise.
4897         (new_placement): Likewise.
4898         (decl): Likewise.
4899         (structsp): Likewise.
4900         (new_type_id): Likewise.
4901         (maybe_parmlist): Likewise.
4902         (direct_after_type_declaration): Likewise.
4903         (direct_new_declarator): Likewise.
4904         (direct_abstract_declaration): Likewise.
4905         * parse.c: Regenerated.
4906         * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
4907         * semantics.c (begin_new_placement): Remove.
4908         (finish_new_placement): Likewise.
4909         
4910 1999-11-05  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4911
4912         * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
4913         (DECL_TEMPLATE_INFO): Use it.
4914         * decl.c (warn_extern_redeclared_static): Do nothing for
4915         TEMPLATE_DECLs.
4916         * decl2.c (mark_used): Explicitly check for function or variable.
4917         * semantics.c (finish_unary_op_expr): Check whether result is also
4918         an INTEGER_CST.
4919
4920 1999-11-05  Mark Mitchell  <mark@codesourcery.com>
4921
4922         * Makefile.in (typeck2.o): Depend on output.h.
4923         * typeck2.c: Include output.h.
4924
4925         * decl.c (flag_ansi): Remove declaration.
4926
4927         * pt.c (tinst_level_tick): Make it static.
4928         (last_template_error_tick): Likewise.
4929         
4930         * cp-tree.h (mapcar): Remove declaration.
4931         (search_tree): Likewise.
4932         (walk_tree_fn): New typedef.
4933         (walk_tree): New function.
4934         * tree.c (bot_manip): Change prototype.  Adjust to be called via
4935         walk_tree.
4936         (bot_replace): Likewise.
4937         (no_linkage_helper): Likewise.
4938         (copy_tree_r): New function.
4939         (search_tree): Rename, and adjust, to become ...
4940         (walk_tree): New function.
4941         (mapcar): Remove.
4942         (target_remap): Remove.
4943         (target_remap_count): Likewise.
4944         (break_out_target_exprs): Use walk_tree.
4945         * decl.c (local_variable_p): Change prototype.
4946         (check_default_argument): Use walk_tree.
4947         * pt.c (for_each_template_parm_r): New function, split out from ...
4948         (for_each_template_parm): Here.  Use it, via walk_tree.
4949         
4950 1999-11-03  Mark Mitchell  <mark@codesourcery.com>
4951
4952         * class.c (check_bitfield_decl): New function, split out from
4953         finish_stuct_1.
4954         (check_field_decl): Likewise.  Recursively examine members of
4955         anonymous structs.
4956         (finish_struct_1): Use them.
4957         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
4958         
4959 1999-11-02  Mark Mitchell  <mark@codesourcery.com>
4960
4961         * decl.c (grokfndecl): Remove dead code.
4962
4963         * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
4964
4965 1999-11-02  Scott Snyder  <snyder@fnal.gov>
4966
4967         * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
4968         IMAGPART_EXPR.
4969         * pt.c (tsubst_copy): Likewise.
4970
4971 1999-11-01  Jason Merrill  <jason@yorick.cygnus.com>
4972
4973         * decl2.c (maybe_make_one_only): Always make things comdat on
4974         ELF targets, too.
4975
4976 1999-10-31  Mark Mitchell  <mark@codesourcery.com>
4977
4978         * decl.c (finish_function): Call free_after_parsing for functions
4979         we are not immediately turning into RTL.
4980
4981 1999-10-31  Brendan Kehoe  <brendan@cygnus.com>
4982
4983         * cp-tree.h (flag_dump_translation_unit): Add decl.
4984
4985 Sat Oct 30 22:42:50 1999  Stephen L Moshier <moshier@mediaone.net>
4986
4987         * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
4988
4989 1999-10-30  Mark Mitchell  <mark@codesourcery.com>
4990
4991         * decl.c (pop_cp_function_context): Don't call free on a NULL
4992         pointer.
4993         * semantics.c: Include ggc.h.
4994         (expand_body): Do garbage-collection after processing a template
4995         function.  Clear DECL_SAVED_TREE after generating RTL for a
4996         function.
4997         * Makefile.in (semantics.o): Depend on ggc.h.
4998         
4999 1999-10-29  Mark Mitchell  <mark@codesourcery.com>
5000
5001         * cp-tree.h (make_typename_type): Change prototype.
5002         * decl.c (make_typename_type): Only complain if so requested.
5003         * parse.y (nested_name_specifier): Adjust calls.
5004         (typename_sub0): Likewise.
5005         (typename_sub1): Likewise.
5006         * parse.c: Regenerated.
5007         * pt.c (convert_template_argument): Pass complain to
5008         make_typename_type.
5009         (tsubst): Likewise.
5010         
5011 1999-10-28  Mark Mitchell  <mark@codesourcery.com>
5012
5013         * semantics.c (finish_handler): End the scope of the handler
5014         before attaching it to the statement-tree.
5015
5016 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
5017
5018         * rtti.c (build_dynamic_cast_1): Give a better error message for
5019         an attempt to dynamic_cast from a non-polymorphic type.
5020
5021 1999-10-27  Mark Mitchell  <mark@codesourcery.com>
5022
5023         * cp-tree.h (make_temp_vec): Remove.
5024         (make_scratch_vec): Likewise.
5025         * call.c (add_function_candidate): Use make_tree_vec.
5026         (add_conv_candidate): Likewise.
5027         (build_builtin_candidate): Likewise.
5028         (add_template_candidate_real): Likewise.
5029         * class.c (resolve_address_of_overloaded_function): Likewise.
5030         * decl.c (start_function): Don't fool with the momentary obstack.
5031         (finish_function): Likewise.
5032         * init.c (expand_direct_vtbls_init): Likewise.
5033         (begin_init_stmts): Likewise.
5034         (finish_init_stmts): Likewise.
5035         * pt.c (add_to_template_args): Use make_tree_vec.
5036         (check_explicit_specialization): Likewise.
5037         (coerce_template_parms): Likewise.
5038         (lookup_template_class): Don't fool with the momentary obstack.
5039         (instantiate_class_template): Likewise.
5040         (tsubst_template_arg_vector): Use make_tree_vec.
5041         (tsubst_aggr_type): Don't fool with the momentary obstack.
5042         (tsubst_decl): Likewise.  Use make_tree_vec.
5043         (try_one_overload): Likewise.
5044         (try_class_unification):  Don't fool with the momentary obstack.
5045         (get_bindings_real): Use make_tree_vec.
5046         (set_mangled_name_for_template_decl): Likewise.
5047         * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
5048         * semantics.c (finish_expr_stmt): Likewise.
5049         (finish_do_stmt): Likewise.
5050         (finish_for_expr): Likewise.
5051         (finish_switch_cond): Likewise.
5052         (do_pushlevel): Likewise.
5053         (do_poplevel): Likewise.
5054         * tree.c (make_temp_vec): Remove.
5055         
5056         * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.  Dump
5057         CLEANUP_P for a TRY_BLOCK.
5058         * ir.texi: Document SAVE_EXPR.
5059
5060 Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
5061
5062         * call.c (build_over_call):  Check that the built-in function is
5063         of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
5064         * typeck.c (build_function_call_real): Similarly. 
5065
5066 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
5067
5068         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
5069         remember_end_note.
5070
5071 1999-10-24  Mark Mitchell  <mark@codesourcery.com>
5072
5073         * decl.c (push_overloaded_decl_1): Use pushdecl.
5074         
5075         * decl.c (auto_function): Replace #ifdef'd __inline with just
5076         plain inline.
5077         * lex.c (my_get_run_time): Likeise.
5078         (yyprint): Likewise.
5079         (identifier_type): Likewise.
5080         * method.c (start_squangling): Likewise.
5081         (end_squangling): Likewise.
5082         (icat): Likewise.
5083         (old_backref_index): Likewise.
5084         (flush_repeats): Likewise.
5085         (issue_ktype): Likewise.
5086         * parse.y (empty_parms): Likewise.
5087         * parse.c: Regenerated.
5088         
5089 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
5090
5091         * dump.c (dequeue_and_dump): Replace several uses of
5092         queue_and_dump_index with dump_child.
5093
5094 1999-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5095
5096         * expr.c: Include tm_p.h.
5097
5098 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
5099
5100         * cp-tree.h (SCOPE_PARTIAL_P): New macro.
5101         (pushlevel_temporary): Remove.
5102         (add_scope_stmt): New function.
5103         * decl.c (pushlevel_temporary): Remove.
5104         (poplevel): Use add_scope_stmt.
5105         (start_decl_1): Likewise.
5106         * semantics.c (add_scope_stmt): New function.
5107         (do_pushlevel): Use it.
5108         (do_poplevel): Use it.
5109         (expand_stmt): Check SCOPE_PARTIAL_P.
5110         
5111         * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
5112         * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
5113         * expr.c (cplus_expand_expr): Expand it.
5114         * ir.texi: Document EMPTY_CLASS_EXPR.
5115         
5116 1999-10-20  Mark Mitchell  <mark@codesourcery.com>
5117
5118         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
5119         parameters as having namespace scope.
5120
5121 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
5122
5123         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
5124         (mangling_flags): New type.
5125         (build_overload_int): Change prototype.
5126         (build_overload_value): Likewise.
5127         (numeric_output_need_bar): Improve comment.
5128         (mangle_expression): New function, broken out from ...
5129         (build_overload_int): Here.
5130         (build_overload_value): Adjust for use of mangling flags.  Don't
5131         warn about real-valued template parameters here.  Do handle
5132         complex expressions involving real-valued template parameters.
5133         (build_template_parm_names): Encase non-type template parameters
5134         in underscores, if necessary.
5135         (process_overload_item): Remove conditional on
5136         PARM_CAN_BE_ARRAY_TYPE.
5137
5138 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
5139
5140         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
5141
5142         * ir.texi: Clean up documentation of RETURN_INIT.
5143         
5144 1999-10-15  Greg McGary  <gkm@gnu.org>
5145
5146         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
5147         (lang_init): Set default for flag_bounds_check if still "unspecified".
5148
5149 1999-10-13  Andrew Haley  <aph@cygnus.com>
5150
5151         * class.c (finish_struct_1): Force alignment of non-bitfields to
5152         BITS_PER_UNIT.
5153
5154 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
5155
5156         * typeck2.c (process_init_constructor): Handle empty constructors.
5157
5158 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
5159
5160         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
5161
5162         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
5163         array error.
5164
5165 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
5166
5167         * decl.c (make_rtl_for_local_static): Don't create register RTL
5168         for addressable constants.
5169
5170 1999-10-13  Nathan Sidwell  <nathan@acm.org>
5171
5172         * cp-tree.h (build_x_va_arg): Prototype new function.
5173         * call.c (build_x_va_arg): Define it.
5174         * parse.y (unary_expr): Call build_x_va_arg.
5175         
5176         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
5177         * call.c (convert_type_from_ellipsis): Define it.
5178         * decl.c (init_decl_processing): Set lang_type_promotes_to.
5179
5180         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
5181
5182 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
5183
5184         * class.c (fixed_type_or_null): Always set *nonnull.
5185
5186 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5187
5188         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
5189         __GNUC__ and __GNUC_MINOR__.
5190
5191 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
5192
5193         * cp-tree.h (make_rtl_for_local_static): New function.  
5194         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
5195         local statics ...
5196         (make_rtl_for_local_static): Here.
5197         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
5198         
5199 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5200
5201         * method.c: Include tm_p.h.
5202
5203 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
5204
5205         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
5206         * lex.c (cp_make_lake_type): Likewise.
5207         * tree.c (init_tree): Init make_lang_type_fn.
5208         
5209 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
5210
5211         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
5212         paramter.
5213         
5214         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
5215         local statics if we don't really have them.
5216
5217         * ir.texi: Improve documentation for STMT_EXPR.  Describe
5218         CLEANUP_POINT_EXPR.
5219
5220 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
5221
5222         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
5223
5224 1999-10-07  Greg McGary  <gkm@gnu.org>
5225
5226         * class.c (finish_struct_1): Use simpler method of
5227         removing elements of a singly-linked list which doesn't
5228         lose for classes without data members.
5229
5230 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
5231
5232         * friend.c (make_friend_class): Robustify.
5233
5234         * semantics.c (finish_object_call_expr): Reject calls to template
5235         types.
5236
5237 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
5238
5239         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
5240
5241         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
5242         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
5243         CLASSTYPE_VFIELD.
5244         * class.c (get_vfield_offset): Likewise.
5245         (finish_base_struct): Likewise.
5246         (modify_one_vtable): Likewise.
5247         (fixup_vtable_deltas): Likewise.
5248         (finish_struct_1): Likewise.
5249         * init.c (expand_virtual_init): Likewise.
5250         * search.c (lookup_field_1): Likewise.
5251         (expand_upcast_fixups): Likewise.
5252         * typeck.c (build_component_ref): Likewise.
5253         (build_binary_op_nodefault): Likewise.
5254         
5255         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
5256         * ir.texi: Document TYPE_VFIELD.
5257
5258 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
5259
5260         * decl.c (grokdeclarator): Only warn about non-zero arrays if
5261         !in_system_header (linux socketbits.h can give this for
5262         __cmsg_data, which is using a GNU extension).
5263
5264 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
5265
5266         * decl2.c (start_static_storage_duration_function): Push the
5267         function declaration so it ends up in namespace scope.
5268
5269         * dump.c (DUMP_CHILDREN): Remove.
5270         (DUMP_BINFO): Adjust.
5271         (struct dump_node_info): Remove dump_children_p.
5272         (queue_and_dump_type): Remove dump_children_p parameter.
5273         (queue): Don't set dump_children_p.
5274         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
5275         queue_and_dump_index.
5276         (dequeue_and_dump): Unconditionally print children.  Adjust calls
5277         to functions mentioned above.
5278         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
5279         
5280         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
5281         * dump.c (dequeue_and_dump): Dump them.
5282         
5283         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
5284
5285         * decl.c (start_function): Set current_in_charge_parm for
5286         constructors, too, where appropriate.
5287         * search.c (fixup_all_virtual_upcast_offsets): New function.
5288         (expand_indirect_vtbls_init): Use it.
5289         
5290 1999-10-04  Nathan Sidwell  <nathan@acm.org>
5291
5292         * decl2.c (grok_alignof): Don't decay lvalues.
5293         
5294         * init.c (build_new): Remove unused variable.
5295
5296 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
5297
5298         * cp-tree.h (struct language_function): Remove static_labelno.
5299         (static_labelno): Remove macro.
5300         * method.c (build_overload_nested_name): Make static_labelno
5301         static here.
5302         
5303         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
5304         to decide whether or not a function is defined.
5305
5306         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
5307         situations where make_node will do it automatically.
5308         * decl.c (grok_reference_init): Likewise.
5309         (expand_static_init): Likewise.
5310         (do_static_initialization): Likewise.
5311         * init.c (perform_member_init): Likewise.
5312         (expand_aggr_init_1): Likewise.
5313         (build_new_1): Likewise.
5314         * method.c (do_build_copy_constructor): Likewise.
5315         (do_build_assign_ref): Likewise.
5316         * search.c (expand_upcast_fixups): Likewise.
5317         * semantics.c (finish_stmt_expr): Likewise.
5318         * typeck.c (build_unary_op): Likewise.
5319         (check_return_expr): Likewise.
5320
5321 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
5322
5323         * init.c (build_vec_delete_1): Fold COND_EXPRs.
5324
5325 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
5326
5327         * cp-tree.def (VEC_INIT_EXPR): Remove.
5328         * cp-tree.h (struct stmt_tree): New type.
5329         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
5330         x_stmt_tree.
5331         (class_cache_firstobj): Remove.
5332         (struct language_function): Remove stmts_are_full_exprs_p,
5333         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
5334         (current_stmt_tree): New macro.
5335         (last_tree): Adjust.
5336         (last_expr_type): Likewise.
5337         (doing_semantic_analysis_p): Simplify.
5338         (stmts_are_full_exprs_p): Adjust.
5339         (begin_tree): Remove prototype.
5340         (end_tree): Likewise.
5341         (begin_stmt_tree): Change prototype.
5342         (finish_stmt_tree): Likewise.
5343         (building_stmt_tree): Simplify.
5344         * decl.c (mark_stmt_tree): New function.
5345         (mark_saved_scope): Use it.
5346         (start_function): Rearrange slightly to call begin_stmt_tree 
5347         earlier.
5348         (save_function_data): Tweak.
5349         (finish_function): Adjust call to finish_stmt_tree.
5350         (mark_lang_function): Use mark_stmt_tree.
5351         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
5352         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
5353         (build_vec_init): Remove creation of stand-in intializer.
5354         * pt.c (begin_tree): Remove.
5355         (end_tree): Likewise.
5356         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
5357         (begin_compound_stmt): Handle a compound-statement outside of a
5358         function.
5359         (begin_stmt_expr): Handle a statement-expression outsidef of a
5360         function.
5361         (finish_stmt_expr): Likewise.
5362         (begin_class_definition): Don't call begin_tree.
5363         (finish_inline_definitions): Don't call end_tree.
5364         (begin_stmt_tree): Take a pointer to tree, not a function as input.
5365         (finish_stmt_tree): Likewise.
5366         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
5367         (mapcar): Likewise.
5368         
5369         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
5370         * parse.c: Regenerated.
5371         
5372         * dump.c (dqueue_and_dump): Dump bitfieldness.
5373         
5374         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
5375         bitfields, rather than DECL_BIT_FIELD.
5376         * ir.texi: Document how to tell whether or not a field is a
5377         bitfield.
5378         
5379         * lex.c (make_lang_type): Fix typo in comment.
5380
5381 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
5382
5383         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
5384
5385 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
5386
5387         * pt.c (tsubst_decl): If the type of a template instantiation is
5388         bogus, so is the whole instantiation.
5389
5390 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
5391
5392         * decl.c (initialize_local_var): Handle static variables here.
5393         (cp_finish_decl): Tweak handling of function-scope static
5394         variables.
5395         * semantics.c (expand_stmt): Handle DECL_STMTs for static
5396         variables.
5397
5398         * method.c (emit_thunk): Don't crash when -fsyntax-only.
5399
5400         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
5401         global_dtor_p.  Add init_priority.
5402         (DECL_ACCESS): Adjust accordingly.
5403         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
5404         (GLOBAL_INIT_PRIORITY): Likewise.
5405         * decl.c (lang_mark_tree): Adjust accordingly.
5406         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
5407         and GLOBAL_INIT_PRIORITY.
5408         * dump.c (dequeue_and_dump): Print them.
5409         * ir.texi: Document them.
5410
5411         * decl2.c (struct priority_info_s): Remove initialization_sequence
5412         and destruction_sequence.
5413         (start_static_storage_duration_function): Return the body of the
5414         function.  Convert for function-at-a-time mode.
5415         (generate_inits_for_priority): Remove.
5416         (finish_static_storage_duration_function): Change prototype.
5417         Adjust for function-at-a-time mode.
5418         (do_static_initialization): Likewise.
5419         (do_static_destruction): Likewise.
5420         (do_static_initialization_and_destruction): Remove.
5421         (start_static_initialization_or_destruction): New function.
5422         (finish_static_initialization_or_destruction): Likewise.
5423         (get_priority_info): Don't manipulation initialization_sequence or
5424         destruction_sequence.
5425         (prune_vars_needing_no_initialization): New function.
5426         (write_out_vars): Likewise.
5427         (finish_file): Use the various new functions instead of the old.
5428         
5429 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
5430
5431         * cp-tree.h (warn_float_equal): Declare.
5432         * decl2.c (warn_float_equal): Define.
5433         (lang_decode_option): Recognize -W[no-]float-equal.
5434         * typeck.c (build_binary_op_nodefault): Conditionally warn
5435         about equality tests of floating point types.
5436
5437 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
5438
5439         Support normal type_info-based EH mechanisms with -fno-rtti.
5440         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
5441         (build_eh_type_type_ref): Likewise.
5442         (build_eh_type): Remove.
5443         (expand_throw): Call build_eh_type_type, not build_eh_type.
5444         * decl2.c (import_export_decl): Don't associate the tinfo fn with
5445         the vtable if -fno-rtti.
5446         * decl.c (init_decl_processing): Always init_rtti_processing.
5447
5448         * rtti.c (get_typeid): Don't complain about -fno-rtti.
5449
5450         * class.c (class_cache_obstack, class_obstack): Remove.
5451         (init_class_processing): Don't initialize class_obstack.
5452         (push_cache_obstack): Remove.
5453         (pushclass): Don't call it.
5454         * cp-tree.h: Remove prototype for push_cache_obstack.
5455         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
5456         (pushlevel_class): Don't push_decl_level.
5457         (poplevel_class): Don't pop_stack_level.
5458         (push_class_level_binding): Don't push_cache_obstack.
5459         (init_decl_processing): Don't intialize decl_obstack.
5460         * search.c (push_class_decls): Don't push_cache_obstack.
5461         * tree.c (list_hash_add): Put hash node on permanent_obstack.
5462         (hash_tree_cons): Don't mess with obstacks.
5463         (print_lang_statistics): Don't print stats for class_obstack and
5464         decl_obstack.
5465
5466 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
5467
5468         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
5469         * ir.texi: Document DECL_EXTERNAL.
5470
5471         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
5472         * ir.texi: Document THUNK_DECLs.
5473
5474         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
5475         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
5476         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
5477         * error.c (dump_template_bindings): Remove unused parameter.
5478         Handle multiple levels of template parameters.
5479         (dump_template_decl): Use `parms', not `args', for template
5480         parameters.  Fix thinko.
5481         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
5482         flags to dump_template_bindings.
5483         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
5484         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
5485         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
5486         (tsubst_copy): Clarify variable name.
5487         (most_general_template): Robustify.
5488         
5489 1999-09-29  Nathan Sidwell  <nathan@acm.org>
5490
5491         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
5492         to change primary template rendering.
5493
5494 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
5495
5496         * cp-tree.h (UPT_TEMPLATE): Remove.
5497         (UPT_PARMS): Likewise.
5498         (DECL_NEEDED_P): New macro.
5499         * decl2.c (finish_vtable_vardecl): Use it.
5500         (finish_objects): Don't crash with -fsyntax-only.
5501         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
5502         -fsyntax-only.
5503         * pt.c (tsubst_friend_function): Remove FIXME that talks about
5504         obstacks.
5505         (tsubst_expr): Correct handling of function try-blocks.
5506         * semantics.c: Include flags.h.
5507         (expand_body): Don't do RTL generation if -fsyntax-only.
5508         * Makefile.in (semantics.o): Depends on flags.h.
5509         
5510 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
5511
5512         * pt.c (most_general_template): Adjust declaration.
5513
5514         * cp-tree.h: (most_general_template): Declare.
5515
5516         * error.c (dump_template_value): Rename to ...
5517         (dump_template_argument): This.
5518         (dump_template_argument_list): New function.
5519         (dump_type): Use it.
5520         (dump_template_parameter): New function.
5521         (dump_template_decl): Use it.
5522         (dump_template_bindings): New function.
5523         (dump_function_decl): Use it. Pretty print function template
5524         instantiations.
5525
5526 1999-09-28  Nathan Sidwell  <nathan@acm.org>
5527
5528         * decl.c (grokdeclarator): Distinguish parameter context for
5529         diagnostics. Tidy up missing type diagnostic.
5530         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
5531
5532 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
5533
5534         * ir.texi: Improve documentation for TARGET_EXPR.
5535
5536 1999-09-27  Nathan Sidwell  <nathan@acm.org>
5537
5538         Augment stringification of trees.
5539         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
5540         (fndecl_as_string, type_as_string_real, args_as_string,
5541         code_as_string, language_as_string, parm_as_string,
5542         op_as_string, assop_as_string, cv_as_string): Remove.
5543         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
5544         (context_as_string): Declare new function.
5545         * error.c (cp_printers): Move definition.
5546         (OB_UNPUT): Remove.
5547         (OB_END_TEMPLATE_ID): Adjust.
5548         (interesting_scope_p): Remove.
5549         (dump_scope): New static function.
5550         (dump_qualifiers): Adjust prototype, reimplement.
5551         (dump_template_value): Use tree_string_flags.
5552         (dump_type_real): Move back to dump_type.
5553         (dump_type): Adjust prototype. Use tree_string_flags.
5554         (dump_aggr_type): Likewise. Use dump_template_parms.
5555         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
5556         Return pad flag.
5557         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
5558         (dump_simple_decl): Likewise.
5559         (dump_decl): Likewise. Use dump_template_decl.
5560         (dump_template_decl): New static function broken out of dump_decl.
5561         (dump_function_decl): Adjust prototype. Use tree_string_flags.
5562         (dump_parameters): Likewise. Prefix space.
5563         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
5564         (dump_function_name): Likewise. Use dump_template_parms.
5565         (dump_template_parms): New static function broken out of
5566         dump_function_name.
5567         (dump_expr_list): Adjust prototype. Use tree_string_flags.
5568         (dump_expr): Likewise.
5569         (fndecl_as_string): Removed
5570         (type_as_string_real): Removed
5571         (dump_binary_op): Adjust prototype. Use tree_string_flags.
5572         (dump_unary_op): Likewise.
5573         (type_as_string): Likewise.
5574         (expr_as_string): Likewise.
5575         (decl_as_string): Likewise.
5576         (context_as_string): New function.
5577         (lang_decl_name): Adjust.
5578         (decl_to_string): New static print callback.
5579         (expr_to_string): Likewise.
5580         (fndecl_to_string): Likewise.
5581         (code_as_string): Renamed to ...
5582         (code_to_string): ... here. Adjust.
5583         (language_as_string): Renamed to ...
5584         (language_to_string): ... here. Adjust.
5585         (parm_as_string): Renamed to ...
5586         (parm_to_string): ... here.
5587         (op_as_string): Renamed to ...
5588         (op_to_string): ... here.
5589         (assop_as_string): Renamed to ...
5590         (assop_to_string): ... here.
5591         (type_to_string): New static print callback.
5592         (args_as_string): Renamed to ...
5593         (args_to_string): ... here. Adjust.
5594         (cv_as_string): Renamed to ...
5595         (cv_to_string): ... here. Adjust.
5596         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
5597         (print_template_context): Likewise.
5598
5599 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
5600
5601         * cp-tree.h (expand_throw): Remove prototype.
5602         * except.c (expand_throw): Make it static.  Use tree-generation
5603         functions, rather than RTL-generation functions.
5604         (build_throw): Use it.
5605         * expr.c: Include except.h.
5606         (cplus_expand_expr): Don't call expand_throw here.
5607         * Makefile.in (expr.o): Depend on except.h.
5608         * ir.texi: Update documentation for THROW_EXPR.
5609         
5610         * decl.c (start_function): Set x_dont_save_pending_sizes rather
5611         than calling get_pending_sizes.
5612         * init.c (build_new): Don't save and restore
5613         immediate_size_expand; instead, assert that it has the expected
5614         value already.
5615
5616 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5617
5618         * lex.c (compiler_error): Add missing call to va_end().
5619
5620 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
5621
5622         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
5623         * ir.texi: Document RESULT_DECL and DECL_RESULT.
5624
5625         * cp-tree.h (check_return_expr): New function.
5626         * decl.c (finish_constructor_body): New function.
5627         (pushdecl): Put global friend functions in namespace binding
5628         level, not the class binding level.
5629         (finish_destructor_body): Make sure the dtor_label is always
5630         defined.  Fix typo in comment.
5631         (finish_function): Move generation of constructor-termination code
5632         to semantic-analysis time.  Move generation of implicit `main'
5633         return value to semantic-analysis time.
5634         * semantics.c (finish_return_stmt): Generate goto's to
5635         ctor_label/dtor_label here.  Use check_return_expr to do semantic
5636         analysis on the returned expression.
5637         * typeck.c (maybe_warn_about_returning_address_of_local): New
5638         function split out from c_expand_return.
5639         (check_return_expr): Likewise.
5640         (c_expand_return): Just generate the RTL for the return.
5641         
5642 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
5643
5644         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
5645         (cleanup_type): Likewise.
5646         (search_tree): Change prototype.
5647         * decl.c (local_variable_p): Adjust for new interface to
5648         search_tree.
5649         (check_default_argument): Likewise.
5650         * error.c (dump_expr): Handle INIT_EXPR.
5651         * except.c (expand_throw): Don't make cleanup_type a local static.
5652         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
5653         * init.c (build_new): Call build_new_1 directly, rather than
5654         building a NEW_EXPR.
5655         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
5656         processing file-scope initializers.
5657         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
5658         * tree.c: Include splay-tree.h
5659         (no_linkage_helper): Adjust for new interface to search_tree.
5660         (search_tree): Pass around pointers to tree nodes, rather than the
5661         nodes themselves.  Handle VEC_INIT_EXPR.
5662         (no_linkage_check): Adjust for new interface to search_tree.
5663         (mapcar): Handle VEC_INIT_EXPR.
5664         (target_remap): New variable.
5665         (bot_manip): Use it.
5666         (bot_replace): New function.
5667         (break_out_target_exprs): Use it to remap all variables used in a
5668         default argument expression.
5669         * typeck.c (build_modify_expr): Don't crash when outside a
5670         function and presented with an INIT_EXPR assignment
5671         * Makefile.in (tree.o): Depend on splay-tree.h.
5672
5673 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
5674
5675         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
5676         DECL_BUILT_IN.
5677         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
5678         callers changed.
5679         Set the builtin's DECL_BUILT_IN_CLASS.
5680
5681 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
5682
5683         * decl.c (pushdecl): Don't make local declarations of extern
5684         variables give the variable a DECL_CONTEXT for the function.
5685         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
5686         Don't accidentally make RTL for local declarations.
5687         (emit_local_var): Handle declarations with asm-specifiers here.
5688         
5689 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
5690
5691         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
5692         STMT_IS_FULL_EXPR_P.
5693
5694         * cp-tree.h (language_function): Add cannot_inline.
5695         * decl.c (start_function): Restore current_function_cannot_inline
5696         from the saved value.
5697         (save_function_data): Save current_function_cannot_inline.
5698         * decl2.c (start_objects): Change prototype.  Build the function
5699         in function-at-a-time mode.
5700         (finish_objects): Likewise.
5701         (generate_ctor_or_dtor_function): Adjust accordingly.
5702         
5703         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
5704         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
5705         Don't call expand_anon_union_decl here
5706         * semantics.c (exapnd_stmt): Call it here, instead.
5707         * typeck.c (mark_addressable): Addressed variables are implicitly
5708         used.
5709         
5710 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5711
5712         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
5713         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
5714         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
5715         * cp-tree.h: Add tree checking macros to various tree access
5716         macros. 
5717         * ptree.c (print_lang_decl): Test for function or variable
5718         before accessing template info.
5719
5720 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
5721
5722         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
5723         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
5724         * decl2.c (lang_f_options): Add -fshort-wchar.
5725         * cp-tree.h: Declare flag_short_wchar.
5726         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
5727         int' for wchar_t.
5728
5729 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5730
5731         * ir.texi: Fix formatting errors and typos.
5732
5733 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
5734
5735         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
5736
5737         * decl.c (pushdecl): Do create a binding for extern "C" functions,
5738         but not for their DECL_ASSEMBLER_NAMEs.
5739         (lookup_name_current_level): Fix formatting.
5740         (xref_tag): Likewise.
5741         * decl2.c (start_objects): Mark static constructors and
5742         destructors as used.
5743
5744 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
5745
5746         * decl.c (define_case_label): Don't crash if we're not in a switch.
5747
5748         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
5749         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
5750         for unsupported flags.
5751
5752 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
5753
5754         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
5755         Accept and warn about -fthis-is-variable.
5756
5757 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
5758
5759         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
5760         CLEANUP_STMT, and SCOPE_STMT.
5761
5762         * decl2.c (lang_decode_option): Adjust, in the wake of recent
5763         changes to option processing.
5764
5765 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5766
5767         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
5768         function pointer from pmfs with no object given.
5769         (convert_for_assignment): Do not return error when converting
5770         pmfs.
5771
5772 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
5773
5774         * lex.c (internal_filename): New variable.
5775         (INTERNAL_FILENAME): New macro.
5776         (init_parse): Allocate internal_filename and mark as root.  Use it
5777         instead of a string constant.
5778
5779 1999-09-21  Nathan Sidwell  <nathan@acm.org>
5780
5781         Reimplement dynamic cast and catch matching.
5782         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
5783         * search.c (dynamic_cast_base_recurse): New function.
5784         (get_dynamic_cast_base_type): New function for dynamic cast.
5785         * rtti.c (build_dynamic_cast_1): Determine source and target
5786         class relationship. Call __dynamic_cast_2.
5787         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
5788         (__user_type_info::dyncast): New dynamic cast dispatcher.
5789         (__user_type_info::sub_kind): New nested enumeration.
5790         (__user_type_info::contained_p): sub_kind predicate.
5791         (__user_type_info::contained_public_p): Likewise.
5792         (__user_type_info::contained_nonpublic_p): Likewise.
5793         (__user_type_info::contained_nonvirtual_p: Likewise.
5794         (__user_type_info::upcast_result): New nested struct.
5795         (__user_type_info::dyncast_result): New nested struct.
5796         (*::do_upcast): New catch function.
5797         (*::do_dyncast): New dynamic cast function.
5798         (__user_type_info::find_public_subobj): New dynamic cast
5799         helper dispatcher.
5800         (*::do_find_public_subobj): New dynamic cast helper function.
5801         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
5802         (__user_type_info::dyncast): Define dynamic cast dispatcher.
5803         (*::do_upcast): Define catch function.
5804         (*::do_dyncast): Define dynamic cast function.
5805         (*::do_find_public_subobj): Define dynamic cast helper function.
5806         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
5807         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
5808         (__dynamic_cast_2): New dynamic cast runtime.
5809
5810 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
5811
5812         * cp-tree.h (finish_stmt_expr): Change prototype.
5813         * expr.c (cplus_expand_expr): Adjust call accordingly.
5814         * init.c (finish_init_stmts): Likewise.
5815         * parse.y (primary): Likewise.
5816         * pt.c (tsubst_copy): Likewise.
5817         * semantics.c (finish_stmt_expr): Don't take two parameters.
5818         Don't remove generated BLOCKs from the block-tree.
5819
5820         Remove support for assigning to `this'.
5821         * NEWS: Note that fact.
5822         * class.c (build_vbase_path): Don't check flag_this_is_variable.
5823         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
5824         (language_function): Remove assigns_this, just_assigned_this, and
5825         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
5826         (base_init_expr): Remove.
5827         (current_vcalls_possible_p): New macro.
5828         (vtbls_set_up_p): Likewise.
5829         (emit_base_init): Change prototype.
5830         * decl.c (finish_destructor_body): New function, split out from
5831         finish_function.
5832         (current_function_assigns_this): Remove.
5833         (current_function_just_assigned_this): Likewise.
5834         (start_function): Don't set them.
5835         (finish_function): Don't check them.  Don't emit
5836         base-initialization code here.  Generate code for destructors when
5837         doing semantic analysis.
5838         (finish_stmt): Don't check current_function_just_assigned_this.
5839         * decl2.c (lang_f_options): Remove this-is-variable.
5840         (lang_decode_option): Likewise.
5841         (grokclassfn): Don't check flag_this_is_variable.
5842         * init.c (emit_base_init): Return the expression generated.
5843         (construct_virtual_bases): Don't push/pop obstacks.  Fix
5844         typo.
5845         (build_new_1): Don't check flag_this_is_variable.
5846         (get_temp_regvar): Don't set DECL_REGISTER.
5847         (build_vec_init): Don't call use_variable.
5848         * lang-options.h: Remove "-fthis-is-variable" and
5849         "-fno-this-is-variable".
5850         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
5851         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
5852         expand_expr_stmt.
5853         * semantics.c (finish_expr_stmt_real): Rename to ...
5854         (finish_expr_stmt): This.  Remove assigned_this parameter.
5855         (begin_if_stmt): Call do_pushlevel before starting the statement.
5856         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
5857         blocks.
5858         (setup_vtbl_ptr): Emit initialization code for bases and members
5859         at semantic-analysis time.  Emit code to initialize vtables in
5860         destructors here.
5861         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
5862         Don't handle CTOR_INITIALIZER any more.
5863         * typeck.c (build_modify_expr): Don't check for assignments to
5864         this.
5865         (c_expand_return): Don't suggest assigning to `this'.
5866         
5867         * Makefile.in (decl.o): Depend on RTL_H.
5868         (decl2.o): Likewise.
5869         (class.o): Likewise.
5870         (call.o): Likewise.
5871         (method.o): Likewise.
5872         (search.o): Likewise.
5873         (tree.o): Likewise.
5874         (pt.o): Likewise.
5875
5876         * decl.c (duplicate_decls): When a builtin function is redeclared
5877         as static, make sure it is mangled correctly.
5878
5879         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
5880         detail about the statement-tree.
5881         
5882 1999-09-20  Nathan Sidwell  <nathan@acm.org>
5883
5884         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
5885
5886 1999-09-20  Nick Clifton  <nickc@cygnus.com>
5887
5888         * decl2.c (lang_decode_option): Extend comment.
5889
5890 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
5891
5892         * typeck.c: Include "tm_p.h".
5893
5894 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
5895
5896         * ir.texi: New file.
5897
5898 1999-09-19  Paul Burchard <burchard@pobox.com>
5899
5900         * semantics.c (expand_stmt): Initialize return value.
5901
5902 1999-09-18  Paul Burchard <burchard@pobox.com>
5903
5904         * gxxint.texi: G++ now implements namespaces.
5905         
5906 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
5907
5908         * decl.c (pop_label): Don't warn about unused labels more than
5909         once.
5910         * semantics.c (finish_goto_stmt): Always marked used labels as
5911         used.
5912
5913         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
5914         even when the declaration is external.
5915         (cp_finish_decl): Adjust call to layout_var_decl.
5916         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
5917
5918 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5919
5920         * typeck.c (get_member_function_from_ptrfunc): Always consider
5921         virtuality inside member pointer.
5922
5923 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
5924
5925         Turn on function-at-a-time processing.  
5926         * cp-tree.h (doing_semantic_analysis_p): New macro.
5927         (SF_DEFAULT): Define to zero, not SF_EXPAND.
5928         (start_handler_parms): Change prototype.
5929         (expand_start_catch_block): Likewise.
5930         (expand_end_catch_block): Likewise.
5931         (expand_start_eh_spec): Likewise.
5932         (expand_end_eh_spec): Declare.
5933         (finish_handler_parms): Change prototype.
5934         (begin_catch_block): Declare.
5935         (finish_handler): Change prototype.
5936         (do_pushlevel): Declare.
5937         (do_poplevel): Likewise.  
5938         * decl.c (pushlevel): Don't create
5939         binding levels when not doing semantic analysis.
5940         (poplevel): Don't pop them.
5941         (pushdecl): Assert that we are never called when not doing
5942         semantic analysis.
5943         (pushdecl_top_level): Use push_to_top_level.
5944         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
5945         label when expanding.
5946         (cp_finish_decl): Only inject for-scope variables when doing
5947         semantic analysis.  Add comments.
5948         (start_handler_parms): Return the handler parm.
5949         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
5950         already set.  Reinitialize from saved function data if available.
5951         Don't pushlevel when not doing semantic analysis.
5952         (store_parm_decls): Only generate RTL when expanding.  Only
5953         pushdecl when doing semantic analysis.  Set
5954         current_eh_spec_try_block if appropriate.
5955         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
5956         Combine common code.  Don't poplevel when not doing semantic
5957         analysis.
5958         (push_cp_function_context): Don't expand functions without an
5959         explicit call to expand_body.
5960         (mark_lang_function): Make eh_spec_try_block and
5961         x_scope_stmt_stack.  
5962         * except.c (expand_end_eh_spec): Don't
5963         declare.
5964         (process_start_catch_block): Likewise.
5965         (push_eh_cleanup): Use finish_decl_cleanup.
5966         (initialize_handler_parm): New function.
5967         (expand_start_catch_block): Use it.
5968         (expand_end_catch_block): Use tree-generation functions, not
5969         RTL-generation functions.
5970         (expand_start_eh_spec): Likewise.
5971         (expand_end_eh_spec): Likewise.
5972         (expand_exception_blocks): Simplify.
5973         (start_anon_func): Use do_pushlevel.
5974         (end_anon_func): Use do_poplvel.  Call expand_body for the
5975         function.  
5976         * expr.c (do_case): Don't call define_case_label.  
5977         * init.c (create_temporary_var): Set DECL_CONTEXT for local
5978         variables.  
5979         * method.c (emit_thunk): Call expand_body for the
5980         thunk.
5981         (sythesize_method): Likewise.  
5982         * parse.y (handler_args): Give it ttype.
5983         (eat_saved_input): Call expand_body.
5984         (base_init): Use do_pushlevel.
5985         (pending_inline): Call expand_body.
5986         (handler): Adjust calls to finish_handler_parms and
5987         finish_handler.
5988         (handler_args): Don't call expand_start_catch_block.  Return the
5989         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
5990         * parse.c: Regenerated.
5991         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
5992         * semantics.c (do_pushlevel): Give it external linkage.  Build
5993         SCOPE_STMTs.
5994         (do_poplevel): Likewise.
5995         (finish_case_label): Call define_case_label when doing semantic
5996         analysis.
5997         (finish_goto_stmt): Create RTL for labels.
5998         (finish_function_try_block): Set in_function_try_handler
5999         unconditionally.
6000         (finish_function_handler_sequence): Unset it.
6001         (finish_handler_parms): Use expand_start_catch_block even when
6002         building a statement-tree.
6003         (begin_catch_block): New function.
6004         (finish_handler): Move a little RTL-generation logic here.
6005         (finish_decl_cleanup): Allow cleanups for empty declarations.
6006         (finish_named_return_value): Don't pushdecl when not doing
6007         semantic analysis.
6008         (expand_stmt): Don't do semantic analysis for variable
6009         declarations.  Handle START_CATCH_STMT.  Call expand_label
6010         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
6011         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
6012         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
6013         RETURN_INIT and function try blocks.
6014         
6015         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
6016         x_scope_stmt_stack.  Add x_in_charge_parm.
6017         (current_eh_spec_try_block): New macro.
6018         (current_scope_stmt_stack): Likewise.
6019         (current_in_charge_parm): Likewise.
6020         * decl.c (start_function): Initialize current_in_charge_parm.
6021         (finish_function): Use current_in_charge_parm rather than looking
6022         up __in_chrg.
6023         * search.c (expand_indirect_vtbls_init): Likewise.
6024
6025         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
6026         (TRY_BLOCK): Likewise.
6027         (HANDLER): Likewise.
6028         (START_CATCH_STMT): New tree node.
6029         (SCOPE_STMT): Likewise.
6030         * cp-tree.h (SCOPE_BEGIN_P): New macro.
6031         (SCOPE_NULLIFIED_P): Likewise.
6032         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
6033         (struct lang_decl): Add saved_language_function.
6034         (DECL_PENDING_INLINE_INFO): Adjust documentation.
6035         (DECL_PENDING_INLINE_P): New macro.
6036         (TYPE_TI_ARGS): Fix typo in comment.
6037         (DECL_SAVED_TREE): Add to documentation.
6038         (DECL_SAVED_FUNCTION_DATA): New macro.
6039         (START_CATCH_TYPE): Likewise.
6040         (SCOPE_END_P): New macro.
6041         (declare_parm_level): Don't declare.
6042         * decl.c (mark_lang_function): New function, split out from
6043         mark_cp_function_context.
6044         (save_function_data): New function.
6045         (declare_parm_level): Remove.
6046         (finish_function): Use save_function_data to squirrel away
6047         important stuff for later use.
6048         (mark_cp_function_context): Use mark_function_data.
6049         (lang_mark_tree): Likewise.
6050         * lex.c (begin_definition_of_inclass_inline): Set
6051         DECL_PENDING_INLINE_P.
6052         (store_pending_inline): Clear it.
6053         * pt.c (tsubst_decl): Likewise.
6054
6055 1999-09-17  Nathan Sidwell  <nathan@acm.org>
6056
6057         * call.c (perform_implicit_conversion): Deal with error_mark_node.
6058
6059 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
6060
6061         * decl.c (warn_extern_redeclared_static): Don't get confused by
6062         static member functions.
6063         (duplicate_decls): Merge DECL_THIS_STATIC.
6064
6065         * decl.c (expand_static_init): Make sure assignments to local
6066         statics actually occur.
6067
6068 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
6069
6070         * cp-tree.h (poplevel_class): Declare.
6071         * class.c (popclass): Use poplevel_class, not poplevel.
6072         * decl.c (poplevel_class): Don't make it static.  Don't return a
6073         value.
6074         (poplevel): Don't call poplevel_class; abort in a class
6075         binding level is seen.
6076         * semantics.c (finish_translation_unit): Use pop_everything.
6077         * parse.y (member_init): Allow errors.
6078         (pending_inline): Call finish_function.
6079         * parse.c: Regenerated.
6080         * Makefile.in (CONFLICTS): Adjust.
6081
6082 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
6083         
6084         * error.c: Reduce code duplication.
6085         (dump_template_value): New function.
6086         (dump_type_real): Use it.
6087         (dump_decl): Likewise.
6088         (dump_function_name): Likewise.
6089         (dump_function_decl): Don't be too talkative about function return
6090         type variety.
6091
6092 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6093
6094         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
6095
6096         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
6097
6098 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
6099
6100         * decl2.c (finish_file): Also call check_global_declarations for
6101         the pending_statics list.
6102
6103 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
6104
6105         * lex.c (cp_pragma_implementation): Allow #pragma implementation
6106         in header files.
6107
6108 1999-09-15  Richard Henderson  <rth@cygnus.com>
6109
6110         * lex.c (mark_impl_file_chain): Follow the next chain.
6111
6112 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
6113
6114         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
6115         problems with extern "C" functions redeclared as static.
6116         (duplicate_decls): When a builtin is redeclared static, make the
6117         new function have internal linkage.
6118         
6119 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
6120
6121         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
6122         * pt.c (tsubst_copy): Likewise.
6123         * tree.c (search_tree): Likewise.
6124         (mapcar): Likewise.
6125
6126 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6127
6128         * typeck2.c (ack): Don't declare progname.
6129
6130 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
6131
6132         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
6133         filenames with ggc_alloc_string.
6134
6135 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
6136
6137         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
6138         TARGET_EXPR.
6139         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
6140         the TARGET_EXPR.
6141         * cvt.c (build_up_reference): Likewise.
6142         * tree.c (build_cplus_new): Likewise.
6143         (get_target_expr): Likewise.
6144         
6145 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
6146
6147         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
6148
6149 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
6150
6151         * cp-tree.h (build_target_expr): New function.
6152         * call.c (build_conditional_expr): Use build_target_expr.
6153         (convert_like): Likewise.
6154         (build_over_call): Likewise.
6155         * cvt.c (build_up_reference): Likewise.
6156         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
6157         (destroy_local_var): Here.
6158         (build_target_expr): New function.
6159         * tree.c (build_cplus_new): Use it.
6160         (get_target_expr): Likewise.
6161
6162 1999-09-13  Nathan Sidwell  <nathan@acm.org>
6163
6164         * typeck.c (expr_sizeof): Don't decay arrays and functions.
6165         Remove misleading comment.
6166         (build_compound_expr): Don't decay arrays.
6167
6168 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
6169
6170         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
6171         class rvalues again.
6172
6173 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6174
6175         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
6176
6177         * g++spec.c: Include gcc.h.
6178         (lang_specific_driver): Constify a char*.  Call xcalloc, not
6179         xmalloc/bzero.  All calls to the function pointer parameter now
6180         explicitly call `fatal'.
6181
6182 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
6183
6184         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
6185         * cvt.c (ocp_convert): Complete the from and destination types.
6186         Adjust warning about functions always being `true' in conditionals.
6187         * decl.c (duplicate_decls): Don't play funny games with abort.
6188         * error.c (dump_expr): Handle OVERLOADs.
6189         * spew.c (probe_obstack): Remove.
6190         * typeck.c (condition_conversion): Use perform_implicit_conversion.
6191         
6192 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
6193
6194         * cp-tree.h (auto_function, define_function): Adjust prototypes.
6195         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
6196         changed.
6197         (auto_function): Likewise, for CODE arg.
6198         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
6199         (builtin_function): ... here.
6200
6201 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
6202
6203         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
6204         (init_decl_processing): Don't set TREE_PERMANENT for the
6205         error_mark_node.
6206         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
6207         (grokdeclarator): Likewise.
6208         (grokparms): Don't check TREE_PERMANENT when building up lists.
6209         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
6210         (mark_inline_for_output): Likewise.
6211         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
6212         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
6213         * lex.c (check_newline): Don't check ggc_p; it is always one.
6214         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
6215         * spew.c (yylex): Don't copy_node or probe_obstacks for
6216         non-permanent CONSTANTs and STRINGs.
6217         * tree.c (build_cplus_array_type_1): Don't fuss with
6218         TREE_PERMANENT on ARRAY_TYPEs.
6219         
6220         * cp-tree.def (CLEANUP_STMT): New node.
6221         * cp-tree.h (language_function): Add name_declared.
6222         (current_function_name_declared): New macro.
6223         (CLEANUP_DECL): New macro.
6224         (CLEANUP_EXPR): Likewise.
6225         (emit_local_var): Likewise.
6226         (finish_decl_cleanup): New function.
6227         * cvt.c (build_up_reference): Simplify.
6228         (ocp_convert): Remove dead code.
6229         * decl.c (start_decl): Remove call to add_decl_stmt.
6230         (grok_reference_init): Adjust, to handle bindings temporaries to
6231         references.  Remove dead code.
6232         (initialize_local_var): Don't generate RTL for
6233         declarations here, or build cleanups here.  Don't fuss with
6234         obstacks.  Replace expand_start_target_temps calls with explicit
6235         setting of stms_are_full_exprs_p.
6236         (destroy_local_var): New function.
6237         (emit_local_var): Likewise.
6238         (cp_finish_decl): Use them, as appropriate.
6239         (start_function): Announce template functions.
6240         (store_parm_decls): Don't call declare_function_name here.
6241         (finish_stmt): Don't start emit base-initialization code when just
6242         building the statement-tree.
6243         * init.c (create_temporary_var): Move add_decl_stmt call ...
6244         (get_temp_regvar): Here.
6245         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
6246         cp_finish_decl would expect.  Don't call add_decl_stmt.
6247         * semantics.c (begin_compound_stmt): Call declare_function_name,
6248         if appropriate.
6249         (finish_decl_cleanup): New function.
6250         (expand_stmt): Use emit_local_var to output variables.          
6251         (expand_body): Set current_funtion_name_declared.
6252         
6253 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
6254
6255         * cp-tree.h (finish_cleanup_try_block): New function.
6256         * semantics.c (finish_cleanup_try_block): Add comment.
6257
6258 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
6259
6260         * cp-tree.h: Delete declarations for all tree nodes now moved to
6261         global_trees.
6262         * decl.c: Delete their definitions.
6263         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
6264         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
6265         provide defaults.
6266         (init_decl_processing): Call build_common_tree_nodes and
6267         build_common_tree_nodes_2 instead of building their nodes here.
6268         Don't add gc roots for them.
6269
6270 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
6271
6272         * cp-tree.h (language_function): Rename expanding_p to
6273         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
6274         (expanding_p): Adjust accordingly.
6275         (TREE_VIA_PRIVATE): Fix typo in comment.
6276         (DECL_REFERENCE_SLOT): Remove.
6277         (SET_DECL_REFERENCE_SLOT): Likewise.
6278         * decl.c (named_label_uses): Adjust. Remove chicken comment.
6279         (push_overloaded_decl): Don't truncate the chain of bindings when
6280         adding an overloaded function.
6281         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
6282         (initialize_local_var): Fix typo in comment.
6283         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
6284         * decl2.c (start_objects): Make the fact that we are expanding
6285         the generated function right away explicit.
6286         (start_static_storage_duration_function): Likewise.
6287         (finish_file): Fix typo in comment.
6288         * init.c (build_vec_init): Correct bugs in handling cleanups.
6289         * semantics.c (maybe_convert_cond): New function.
6290         (FINISH_COND): Always store the condition, even if there's
6291         a declaration.
6292         (finish_if_stmt_cond): Use maybe_convert_cond.
6293         (finish_while_stmt_cond): Likewise.
6294         (finish_do_stmt): Likewise.
6295         (finish_for_cond): Likewise.
6296         (expand_cond): Adjust.
6297         
6298         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
6299         * init.c (perform_member_init): Remove obstack machinations.
6300         (expand_cleanup_for_base): Likewise.
6301         (finish_init_stmts): Mark the statement-expression as used.
6302         * method.c (emit_thunk): Use tree-generating functions, not
6303         RTL.
6304         (do_build_copy_constructor): Likewise.
6305         (do_build_assign_ref): Likewise.
6306         (synthesize_method): Likewise.  Keep track of line numbers.
6307         * pt.c (tsubst_expr): Handle various kinds of try blocks.
6308         * semantics.c (expand_stmts): Remove.
6309         (begin_function_try_block): Set FN_TRY_BLOCK_P.
6310         (finish_function_try_block): Be careful rechaining 
6311         function try blocks.
6312         (expand_stmt): Loop through all the statements at a given level.
6313         (exapnd_body): Be careful with line-numbers here too.  Prepare for
6314         being called directly from the parser.
6315
6316         * cp-tree.h (finish_function): Adjust prototype.
6317         * decl.c (finish_function): Return the function compiled.
6318         * pt.c (instantiate_decl): Don't play games with obstacks.
6319         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
6320         (search_tree): Likewise.
6321         * typeck.c: Fix typo in comment.
6322         * typeck2.c (store_init_value): Add comment.
6323
6324         * cp-tree.h (CPTI_ATEXIT): New macro.
6325         (atexit_node): Likewise.
6326         * decl.c (destroy_local_static): New function, broken out from ...
6327         (expand_static_init): Here.
6328
6329         * rtti.c (get_tinfo_var): These should always be global
6330         (expand_si_desc): Use tree, not RTL, functions to generate code.
6331         (expand_class_desc): Likewise.
6332         (expand_ptr_desc): Likewise.
6333         (expand_attr_desc): Likewise.
6334         (expand_generic_desc): Likewise.
6335         (synthesize_tinfo_fn): Likewise.
6336
6337 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
6338
6339         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
6340         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
6341         RECHAIN_STMTS. 
6342         (RECHAIN_STMST_FROM_CHAIN): Likewise.
6343
6344         * parse.y (simple_stmt): Fix typo in last change.
6345
6346         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
6347         (STMT_IS_FULL_EXPR_P): Likewise.
6348         (STMT_LINENO_FOR_FN_P): Likewise.
6349         (prep_stmt): New function.
6350         (building_stmt_tree): Tweak for safety.
6351         * pt.c (tsubst_expr): Use prep_stmt throughout.
6352         (add_tree): Move it to semantics.c
6353         * semantics.c (add_tree): Move it here.
6354         (finish_expr_stmt_real): New function.
6355         (finish_expr_stmt): Use it.
6356         (finish_if_stmt_cond): Use FINISH_COND.
6357         (finish_while_stmt_cond): Likewise.
6358         (finish_for_cond): Likewise.
6359         (finish_stmt_tree): Tweak line-number handling.
6360         (prep_stmt): New function.
6361         (expand_stmt): Use it.
6362         
6363         * cp-tree.h (begin_switch_stmt): Adjust prototype.
6364         (finish_switch_cond): Likewise.
6365         * parse.y (simple_stmt): Adjust accordingly.
6366         * parse.c: Regenerated.
6367         * pt.c (tsubst_expr): Adjust accordingly.
6368         * semantics.c (expand_cond): New function.
6369         (FINISH_COND): New macro.
6370         (begin_switch_stmt): Build the SWITCH_STMT here.
6371         (finish_switch_stmt_cond): Not here.
6372         (expand_stmt): Adjust calls to begin_switch_stmt and
6373         finish_switch_cond.  Use expand_cond throughout.
6374
6375         * dump.c (dequeue_and_dump): Dump types for constants.
6376         Describe DECL_ARG_TYPE more intuitively.
6377         Handle ARRAY_REF.
6378
6379         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
6380         (lang_cleanup_tree): Remove.
6381         * lex.c (make_lang_type): Use ggc_alloc to allocate
6382         TYPE_LANG_SPECIFIC.
6383
6384         Reorganize per-function data.
6385         * cp-tree.h (saved_scope): Add function_decl, bindings.
6386         (language_function): Rename binding_level to bindings.
6387         (cp_function_chain): Use the current_function, not the
6388         outer_function_chain.
6389         (current_class_ptr): Make it work, even when there's no 
6390         current function.
6391         (current_class_ref): Likewise.
6392         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
6393         macros.
6394         (clear_temp_name): Remove.
6395         * decl.c (check_function_type): New function, broken out from
6396         start_function.
6397         (current_binding_level): Adjust definition.
6398         (pushlevel): Simplify.
6399         (poplevel): Don't use named_label_uses when we're outside
6400         a function scope.
6401         (mark_saved_scope): Mark function_decl and bindings.
6402         (maybe_push_to_top_level): Don't unconditionally push a new
6403         function context.  Save bindings and the current_function_decl.
6404         Don't clear named_labels.
6405         (pop_from_top_level): Pop function context if appropriate.
6406         (init_decl_processing): Set init_lang_status and free_lang_status,
6407         rather than save_lang_status and restore_lang_status.
6408         (start_function): Take SF_* flags.  Don't clear per-function data.
6409         Reorder and simplify to use new per-function data code.  Add
6410         asserts.
6411         (store_parm_decls): Don't call init_function_start here.
6412         (finish_function): Adjust for new handling of per-function data.
6413         (push_cp_function_context): Simplify.
6414         (mark_cp_function_context): Change binding_level to bindings.
6415         * decl2.c (clear_temp_name): Remove.
6416         (start_objects): Use SF flags to start_function.
6417         (start_static_storage_duration_function): Likewise.
6418         * except.c (start_anon_func): Remove redundant calls to 
6419         push_function_context_to.  Use SF flags to start function.
6420         (end_anon_func): Remove redundant call to pop_function_context
6421         from.
6422         * lex.c (reinit_parse_for_function): Don't initialize per-function 
6423         data.
6424         * method.c (emit_thunk): Clear current_function after calling
6425         assemble_end_function.  Use SF flags for start_function.
6426         (synthesize_method): Use SF flags for start_function.
6427         * parse.c: Regenerated.
6428         * parse.y (fn.defpen): Likewise.
6429         (pending_inline): Clear current_function, even if something goes
6430         wrong.
6431         * pt.c (instantiate_decl): Use SF flags to start_function.
6432         Don't save and restore expanding_p.
6433         (add_tree): Handle the case where we are outside any function.
6434         (end_tree): Likewise.
6435         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
6436         * semantics.c (begin_function_definition): Likewise.
6437         (expand_body): Likewise.
6438         
6439 1999-09-09  Nathan Sidwell  <nathan@acm.org>
6440
6441         * cp-tree.h (convert_to_void): Prototype new function.
6442         (require_complete_type_in_void): Remove prototype.
6443         * cvt.c (convert_to_void): New function.
6444         (ocp_convert): Use convert_to_void.
6445         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
6446         expressions.
6447         * typeck.c (require_complete_type_in_void): Remove function.
6448         (build_compound_expr): Use convert_to_void.
6449         (build_static_cast): Likewise.
6450         (build_c_cast): Likewise.
6451         * semantics.c (finish_expr_stmt): Do not decay full expressions.
6452         
6453         * typeck.c (build_x_compound_expr): Add FIXME.
6454
6455 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
6456
6457         * cp-tree.h (scratch_tree_cons): Remove.
6458         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
6459         and perm_tree_cons with plain tree_cons.
6460         * class.c: Likewise.
6461         * decl.c: Likewise.
6462         * decl2.c: Likewise.
6463         * except.c: Likewise.
6464         * expr.c: Likewise.
6465         * init.c: Likewise.
6466         * lex.c: Likewise.
6467         * method.c: Likewise.
6468         * parse.y: Likewise.
6469         * pt.c: Likewise.
6470         * repo.c: Likewise.
6471         * rtti.c: Likewise.
6472         * search.c: Likewise.
6473         * typeck.c: Likewise.
6474         * parse.c: Regenerated.
6475         * tree.c (build_srcloc): Simplify.
6476         
6477 1999-09-08  Bruce Korb  autogen@linuxbox.com
6478
6479         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
6480
6481 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
6482
6483         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
6484         Remove next.
6485         (LANG_DECL_PERMANENT): Remove.
6486         * decl.c (duplicate_decls): Don't mess about with obstacks trying
6487         to free memory.
6488         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
6489         * lex.c (free_lang_decl_chain): Remove.
6490         (build_lang_decl): Don't use obstacks.
6491         (retrofit_lang_decl): Likewise.
6492         (copy_lang_decl): Likewise.
6493
6494         * cp-tree.h (saved_scope): Remove old_binding_level and 
6495         function_decl.  Tidy up.
6496         * decl.c (mark_saved_scope): Don't set them.
6497         (maybe_push_to_top_level): Clear memory.
6498
6499         * decl.c (layout_var_decl): Change prototype.  Don't complete
6500         types for external objects.
6501         (check_initializer): Likewise.  Tidy.
6502         (initialize_local_var): Complete types here.
6503         (cp_finish_decl): Not here.  Reorganize a little.
6504         (grokvardecl): Don't complete types here.
6505
6506         * decl.c (start_function): Clear last_dtor_insn and
6507         last_parm_cleanup_insn. 
6508         (push_cp_function_context): Just copy over a little of
6509         the old context, not all of it.
6510
6511         * cp-tree.h (copy_to_permanent): Remove.
6512         (permanent_p): Likewise.
6513         * decl.c (building_typename_type): Don't use copy_to_permanent.
6514         (start_decl): Likewise.
6515         (grok_reference_init): Likewise.
6516         (cp_finish_decl): Likewise.
6517         * init.c (build_new_1): Don't use mapcar.
6518         (build_vec_delete_1): Don't use copy_to_permanent.
6519         (build_vec_init): Likewise.
6520         * parse.y (primary): Likewise.
6521         * parse.c: Regenerated.
6522         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
6523         (lookup_template_class): Likewise.
6524         (tsubst_friend_function): Likewise.
6525         (instantiate_class_template): Likewise.
6526         (tsubst_decl): Likewise.
6527         (tsubst): Likewise.
6528         (instantiate_template): Likewise.
6529         (unify): Likewise.
6530         * rtti.c (get_tinfo_fn): Likewise.
6531         (build_dynamic_cast): Likewise.
6532         * semantics.c (finish_if_stmt_cond): Likewise.
6533         (finish_while_stmt_cond): Likewise.
6534         (finish_do_stmt): Likewise.
6535         (finish_for_cond): Likewise.
6536         (finish_for_expr): Likewise.
6537         (finish_cleanup): Likewise.
6538         (add_decl_stmt): Likewise.
6539         (finish_named_return_value): Likewise.
6540         (finish_qualified_call_expr): Likewise.
6541         * tree.c (perm_manip): Remove.
6542         (build_exception_variant): Don't use copy_to_permanent.
6543         (permanent_p): Remove.
6544         (copy_to_permament): Remove.
6545         (build_min_nt): Don't use copy_to_permanent.
6546         (build_min): Likewise.
6547         (min_tree_cons): Likewise.
6548         * typeckc.c (build_static_cast): Likewise.
6549         (build_reinterpret_cast): Likewise.
6550         (build_const_cast): Likewise.
6551         
6552 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
6553
6554         * decl.c (ggc_p): Set it to 1.
6555         (mark_saved_scope): Add prototype.
6556
6557 1999-09-07  Richard Henderson  <rth@cygnus.com>
6558
6559         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
6560         * typeck.c (self_promoting_args_p): Delete.
6561
6562 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
6563
6564         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
6565         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
6566
6567 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
6568
6569         * Makefile.in (tree.o): Depend on ggc.h.
6570         * class.c (make_method_vec): Remove.
6571         (free_method_vec): Likewise.
6572         (free_method_vecs): Remove.
6573         (add_method): Don't use them.
6574         * cp-tree.def (PTRMEM_CST): Make it longer.
6575         (TEMPLATE_PARM_INDEX): Make it shorter.
6576         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
6577         (template_parm_index): Remove RTL field.
6578         (ptrmem_cst): Add RTL field.
6579         (finish_function): Removed parameter.
6580         (process_next_inline): Change prototype.
6581         (init_cplus_unsave): Rename to init_tree.
6582         (binding_init): Remove.
6583         * decl.c (free_binding_nodes): Remove.
6584         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
6585         (pop_binding): Don't use free_binding_nodes.
6586         (free_binding_vecs): Remove.
6587         (store_bindings): Don't use them.
6588         (pop_from_top_level): Likewise.
6589         (lookup_namespace_name): Simplify.
6590         (build_typename_type): Don't use obstack_free.
6591         (unqualified_namespace_lookup): Simplify.
6592         (lookup_name_real): Simplify.
6593         (start_function): Remove comment about leaks.
6594         (finish_function): Removed nested parameter.  Call
6595         expand_end_bindings even when building_stmt_tree.
6596         Call ggc_push_context and ggc_pop_context around
6597         rest_of_compilation, if necessary.
6598         (mark_cp_function_context): Handle a NULL language-context.
6599         (lang_mark_false_label_stack): Fix typo.
6600         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
6601         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
6602         pointer to method types.
6603         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
6604         * decl2.c (finish_objects): Adjust call to finish_function.
6605         (finish_static_store_duration_function): Likewise.
6606         (do_nonmember_using_decl): Remove call to binding_init.
6607         * except.c (end_anon_func): Adjust call to finish_function.
6608         * lex.c (mark_impl_file_chain): New function.
6609         (init_parse): Call init_tree, not init_cplus_unsave.
6610         Add GC roots.
6611         (cp_pramga_interface): Use xmalloc, not permalloc.
6612         (cp_pragma_implementation): Likewise.
6613         (begin_definition_of_inclass_inline): Simplify.
6614         (process_next_inline): Adjust prototype.
6615         (do_scoped_id): Don't call binding_init.
6616         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
6617         * method.c (emit_thunk): Adjust call to finish_function.
6618         (synthesize_method): Likewise.
6619         * parse.y (%union): Add a new `pi' variant.
6620         (PRE_PARSED_FUNCTION_DECL): Use it.
6621         (fn.defpen): Likewise.
6622         (fndef): Adjust call to finish_function.
6623         * pt.c (instantiate_decl): Likewise.
6624         * rtti.c (syntheisze_tinfo_fn): Likewise.
6625         * semantics.c (expand_body): Likewise.
6626         * tree.c: Include ggc.h.
6627         (mark_list_hash): New function.
6628         (binding_init): Remove.
6629         (init_cplus_unsave): Rename to ...
6630         (init_tree): This.  Add GC roots.
6631         
6632 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
6633
6634         Get ready for garbage collection.
6635         * Makefile.in (CXX_TREE_H): Add varray.h
6636         (lex.o): Depend on ggc.h.
6637         (decl.o): Likewise.
6638         (decl2.o): Likewise.
6639         (method.o): Likewise.
6640         (search.o): Likewise.
6641         (pt.o): Likewise.
6642         (repo.o): Likewise.
6643         * class.c: Include ggc.h.
6644         (current_class_name): Remove.
6645         (current_class_type): Likewise.
6646         (current_access_specifier): Likewise.
6647         (previous_class_type): Likewise.
6648         (previous_class_values): Likewise.
6649         (class_cache_firstobj): Likewise.
6650         (current_lang_base): Likewise.
6651         (current_lang_stack): Likewise.
6652         (current_lang_stacksize): Likewise.
6653         (lang_name_c): Likewise.
6654         (lang_name_cplusplus): Likewise.
6655         (lang_name_java): Likewise.
6656         (current_lang_name): Likewise.
6657         (base_layout_decl): Likewise.
6658         (access_default_node): Likewise.
6659         (access_public_node): Likewise.
6660         (access_protected_node): Likewise.
6661         (access_private_node): Likewise.
6662         (access_default_virtual_node): Likewise.
6663         (access_public_virtual_node): Likewise.
6664         (access_protected_virtual_node): Likewise.
6665         (access_private_virtual_node): Likewise.
6666         (signed_zero_node): Likewise.
6667         (init_class_processing): Don't build base_layout_decl.
6668         (push_lang_context): Adjust now that current_lang_base is a varray.
6669         (pop_lang_context): Likewise.
6670         * cp-tree.h: Include varray.h.
6671         (cp_global_trees): Add access_default, access_public,
6672         access_protected, access_private, access_default_virtual,
6673         access_public_virtual, access_protected_virtual,
6674         access_private_virtual, ctor_identifier, delta2_identifier, 
6675         delta_identifier, dtor_identifier, in_charge_identifier,
6676         index_identifier, nelts_identifier, this_identifier,
6677         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
6678         lang_name_c, lang_name_cplusplus, lang_name_java,
6679         empty_except_spec, null, jclass, minus_one, terminate.
6680         (saved_scope): Move here from decl.c.  Define globals in terms of
6681         saved_scope: current_namespace, current_class_name,
6682         current_class_type, current_access_specifier, current_lang_stack,
6683         current_lang_base, current_lang_name, current_function_parms,
6684         current_template_parms, processing_template_decl,
6685         processing_specialization, processing_explicit_instantiation,
6686         previous_class_type, previous_class_values, class_cache_firstobj.
6687         (scope_chain): New variable.
6688         (init_pt): New function.
6689         * decl.c (current_namespace): Remove.
6690         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
6691         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
6692         (delta_identifier, delta2_identifier): Likewise.
6693         (pfn_or_delta2_identifier, tag_identifier): Likewise
6694         (vt_off_identifier, empty_except_spec, null_node): Likewise.
6695         (current_function_parms, current_lang_base): Remove.
6696         (current_lang_stack, previous_class_values): Remove.
6697         (class_binding_level): Macroize.
6698         (saved_scope): Remove.
6699         (current_saved_scope): Rename to scope_chain.
6700         (mark_saved_scope): Adjust for new scope structure.
6701         (maybe_push_to_top_level): Likewise.
6702         (pop_from_top_level): Likewise.
6703         (duplicate_decls): Adjust now that current_lang_base is a varray.
6704         (build_typename_type): Call ggc_add_tree_hash_table_root.
6705         (init_decl_processing): Call init_pt.  Call push_to_top_level to
6706         set up globals.  Add GC roots.
6707         (xref_basetypes): Adjust now that current_lang_base is a varray.
6708         * decl.h (this_identifier): Remove.
6709         (in_charge_identifier): Likewise.
6710         * decl2.c: Don't include varray.h.
6711         (current_namespace): Remove.
6712         (init_decl2): Add GC roots.
6713         * except.c (Terminate): Remove. 
6714         (init_exception_processing): Use terminate_node instead.
6715         (build_terminate_handler): Likewise.
6716         * init.c (nc_nelts_field_id): Remove.
6717         (minus_one): Likewise.
6718         (init_init_processing): Use minus_one_node and nelts_identifier
6719         instead.  Add GC roots.
6720         (jclass_node): Remove.
6721         (build_new_1): Use nelts_identifier.
6722         (build_vec_init): Likewise.
6723         (build_vec_delete): Likewise.
6724         * lex.c: Include ggc.h.
6725         (defarg_fn): Move declaration early.
6726         (defarg_parms): Likewise.
6727         (init_parse): Add GC roots.
6728         (handle_cp_pragma): Remove redundant declaration of
6729         pending_vtables.
6730         * method.c: Include ggc.h.
6731         (btypelist): Make it a varray.  All uses changed.
6732         (ktypelist): Likewise.
6733         (init_method): Add GC roots.
6734         * pt.c: Don't include varray.h.  Include ggc.h.
6735         (current_template_parms): Remove.
6736         (processing_template_decl): Likewise.
6737         (processing_specialization): Likewise.
6738         (processing_explicit_instantiation): Likewise.
6739         (init_pt): New function.
6740         * repo.c: Include ggc.h.
6741         (init_repo): Add GC roots.
6742         * search.c: Don't include varray.h.
6743         (_vptr_name): Remove.
6744         (lookup_field_1): Use vtpr_identifier instead.
6745         (expand_indirect_vtbls_init): Remove redundant declaration of
6746         in_charge_identifier.
6747         (init_search_processing): Use vptr_identifier.
6748         
6749 1999-09-05  Richard Henderson  <rth@cygnus.com>
6750             Bernd Schmidt <bernds@cygnus.co.uk>
6751             Mark Mitchell  <mark@codesourcery.com>
6752
6753         * Makefile.in (parse.o): Depend on ggc.h.
6754         (decl2.o): Depend on ggc.h.
6755         (init.o): Depend on ggc.h.
6756         * cp-tree.h (init_decl2): Declare.
6757         (cp_parse_init): Likewise.
6758         * decl.c (ggc_p): Define to zero.
6759         (mark_saved_scope): New function.
6760         (init_decl_processing): Call cp_parse_init, and cp_decl2.
6761         Register GC roots.
6762         (expand_static_init): Add GC roots.
6763         * decl2.c: Include ggc.h.
6764         (init_decl2): New function.
6765         * init.c: Include ggc.h.
6766         (init_init_processing): Add GC roots.
6767         * parse.y: Include ggc.h.
6768         (cp_parse_init): New function.
6769         
6770 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
6771
6772         * decl.c (init_decl_processing): Set mark_lang_status.
6773         (lang_mark_false_label_stack): Adjust prototype.
6774         * decl2.c (grok_function_init): Remove extraneous declaration of
6775         abort_fndecl.
6776
6777         * Make-lang.in (cc1plus): Remove dependency on GGC.
6778         * Makefile.in (OBJS): Don't mention ggc-simple.o.
6779         (OBJDEPS): Don't mention ggc-simple.o.
6780
6781         * Make-lang.in (cc1plus): Depend on $(GGC).
6782         * Makefile.in (OBJS): Add ggc-simple.o.
6783         (OBJDEPS): Likewise.
6784         * cp-tree.h (language_function): Rename members to `x_' versions;
6785         we now have x_named_labels, x_ctor_label, x_dtor_label,
6786         x_base_init_list, x_member_init_list, x_base_init_expr,
6787         x_current_class_ptr, x_current_class_ref, x_last_tree,
6788         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
6789         x_result_rtx. 
6790         (dtor_label, ctor_label, current_base_init_list,
6791         current_member_init_list, base_init_expr, current_class_ptr,
6792         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
6793         * decl.c: Include ggc.h.
6794         (last_dtor_insn): Adjust to use x_ names.
6795         (last_parm_cleanup_insn): Likewise.
6796         (original_result_rtx): Likewise.
6797         (named_labels): Likewise.
6798         (mark_binding_level): New function.
6799         (mark_cp_function_context): Likewise.
6800         (mark_false_label_stack): Likewise.
6801         (lang_mark_tree): Likewise.
6802         (lang_cleanup_tree): Likewise.
6803         
6804 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
6805
6806         * Makefile.in (CXX_TREE_H): Include function.h.
6807         (decl.o): Don't depend on function.h.
6808         (decl2.o): Likewise.
6809         (typeck.o): Likewise.
6810         (init.o): Likewise.
6811         (method.o): Likewise.
6812         * cp-tree.h: Include function.h.
6813         (cp_function): Rename to language_function.  Remove next.
6814         (cp_function_chain): Make it a macro, not a variable.
6815         (push_cp_function_context): Don't declare.
6816         (pop_cp_function_context): Likewise.
6817         * decl.c: Don't include function.h.
6818         (push_cp_function_context): Make it static.  Make it suitable for
6819         a save_lang_status callback.
6820         (pop_cp_function_context): Likewise.
6821         (maybe_push_to_top_level): Call push_function_context_to, not
6822         push_cp_function_context.
6823         (pop_from_top_level): Call pop_function_context_from, not
6824         pop_cp_function_context.
6825         (init_decl_processing):  Set save_lang_status and
6826         restore_lang_status.  Call push_function_context_to, not
6827         push_cp_function_context.
6828         (cp_function_chain): Remove.
6829         * decl2.c: Don't include function.h.
6830         * except.c: Don't include function.h.
6831         (start_anon_func): Call push_function_context_to, not
6832         push_cp_function_context.
6833         (end_anon_func):  Call pop_function_context_from, not
6834         pop_cp_function_context.
6835         * init.c: Don't include function.h.
6836         * lex.c (begin_definition_of_inclass_inline): Call
6837         push_function_context_to, not push_cp_function_context. 
6838         (process_next_inline):  Call pop_function_context_from, not
6839         pop_cp_function_context.
6840         * method.c: Don't include function.h.
6841         (synthesize_method): Call push_function_context_to, not
6842         push_cp_function_context.  Call pop_function_context_from, not
6843         pop_cp_function_context.
6844         * typeck.c: Don't include function.h.
6845         
6846         * decl.c (expand_static_init): Tweak handling of static
6847         initializations for objects without constructors.
6848
6849 1999-09-03  Nathan Sidwell  <nathan@acm.org>
6850
6851         * typeck.c (build_indirect_ref): Reject dereference of pointer to
6852         void.
6853
6854 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
6855
6856         * cp-tree.h (cp_function): Move here, from decl.c.
6857         (cp_function_chain): Declare.
6858         (dtor_label): New macro, instead of variable.
6859         (ctor_label): Likewise.
6860         (current_base_init_list): Likewise.
6861         (current_member_init_list): Likewise.
6862         (base_init_expr): Likewise.
6863         (current_class_ptr): Likewise.
6864         (current_class_ref): Likewise.
6865         (last_tree): Likewise.
6866         (last_expr_type): Likewise.
6867         (current_function_returns_value): Likewise.
6868         (current_function_returns_null): Likewise.
6869         (current_function_just_assigned_this): Likewise.
6870         (current_function_parms_stored): Likewise.
6871         (temp_name_counter): Likewise.
6872         (static_labelno): Likewise.
6873         (expanding_p): Likewise.
6874         (stmts_are_full_exprs_p): Likewise.
6875         (in_function_try_handler): Likewise.
6876         (lang_type): Remove nested type_flags.  All uses changed.
6877         * call.c (ctor_label): Remove.
6878         (dtor_label): Likewise.
6879         * class.c (current_class_ptr): Remove.
6880         (current_class_ref): Likewise.
6881         * decl.c (static_labelno): Remove.
6882         (dtor_label): Likewise.
6883         (last_dtor_insn): New macro, instead of variable.
6884         (last_parm_cleanup_insn): Likewise.
6885         (original_result_rtx): Likewise.
6886         (in_function_try_handler): Remove.
6887         (named_label_uses): New macro, instead of variable.
6888         (named_labels): Likewise.
6889         (current_function_returns_value): Remove.
6890         (current_function_returns_null): Likewise.
6891         (current_function_assigns_this): New macro, instead of variable.
6892         (current_function_just_assigned_this): Likewise.
6893         (current_binding_level): Likewise.
6894         (init_decl_processing): Call push_cp_function_context.
6895         (cp_function): Move to cp-tree.h
6896         (cp_function_chain): Make it global.
6897         (temp_name_counter): Remove.
6898         (push_cp_function_context): Simplify.
6899         (pop_cp_function_context): Likewise.
6900         * decl2.c (temp_name_counter): Remove.
6901         * init_c (current_base_init_list): Likewise.
6902         (current_member_init_list): Likewise.
6903         (base_init_expr): Likewise.
6904         * method.c (static_labelno): Likewise.
6905         * pt.c (last_tree): Likewise.
6906         * semantics.c (expanding_p): Likewise.
6907         (stmts_are_full_exprs_p): Likewise.
6908         (last_expr_type): Likewise.
6909         * typeck.c (dtor_label): Likewise.
6910         (ctor_label): Likewise.
6911         
6912 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
6913
6914         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
6915         (arg_assoc_class): Use arg_assoc_template_arg for template
6916         arguments. 
6917         (arg_assoc): Likewise.
6918         * pt.c (mangle_class_name_for_template): Allow member template
6919         template arguments.
6920
6921 1999-09-02  Nathan Sidwell  <nathan@acm.org>
6922
6923         * call.c (build_conditional_expr): Warn on enum mismatches.
6924         (convert_arg_to_ellipsis): Move non-pod check to after
6925         conversion.
6926
6927 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6928
6929         * gxx.gperf (hash, is_reserved_word): Add prototypes.
6930
6931         * init.c (build_vec_init): Initialize variable `try_block'.
6932
6933         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
6934         Likewise for bzero/memset.
6935         (token_getch, token_put_back): Add static prototypes.  Remove
6936         `inline' from the definitions.
6937         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
6938
6939 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
6940
6941         * cp-tree.h (lang_type): Move align into type_flags.
6942         (CLASSTYPE_ALIGN): Adjust accordingly.
6943         * call.c (direct_reference_binding): Remove misleading comment.
6944
6945 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6946
6947         * parse.y (language_string): Constify.
6948
6949 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6950
6951         * repo.c (getpwd): Don't prototype.
6952         * xref.c (getpwd): Likewise
6953
6954 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6955
6956         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
6957         Remove hacks for stuff which now comes from libiberty.
6958
6959 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
6960
6961         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
6962
6963 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
6964
6965         * cp-tree.h (begin_init_stmts): Declare.
6966         (finish_init_stmts): Likewise.
6967         * cvt.c (build_up_reference): Wrap the declaration of a temporary
6968         in a statement-expression so that we will see it when expanding
6969         tree structure later.
6970         * init.c (begin_init_stmts): Don't make it static.
6971         (finish_init_stmts): Likewise.
6972
6973         * cp-tree.h (start_handler_parms): New function.
6974         (expand_start_catch_block): Take only one parameter.
6975         (start_handler_parms): New function.
6976         * decl.c (start_handler_parms): Define it.
6977         * except.c (process_start_catch_block): Take only one parameter.
6978         Don't call grokdeclarator here.
6979         (expand_start_catch_block): Don't call grokdeclarator here,
6980         either.
6981         * parse.y (handler_args): Adjust call to
6982         expand_start_catch_block.  Use start_handler_parms.
6983         * pt.c (push_template_decl_real): Make permanent lists have
6984         permanent elements.
6985         (tsubst_expr): Adjust calls to expand_start_catch_block
6986         appropriately.
6987         * semantics.c (expand_stmt): Likewise.
6988         
6989 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
6990
6991         * pt.c (push_template_decl_real): Use template declaration from
6992         class type if it exists.
6993
6994 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
6995
6996         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
6997         (maybe_inject_for_scope_var): Declare it.
6998         (initialize_local_var): Likewise.
6999         * decl.c (maybe_inject_for_scope_var): Make it global.
7000         (initialize_local_var): Likewise.  Move cleanup handling here,
7001         from cp_finish_decl.
7002         (make_rtl_for_nonlocal_decl): Use
7003         push_obstacks_nochange/pop_obstacks, rather than
7004         end_temporary_allocation/resume_temporary_allocation.
7005         (cp_finish_decl): Try to complete the type of a variable when it
7006         is declared.  Move cleanup-handling to initialize_local_var.
7007         (expand_static_init): Use tree-building code, rather than
7008         RTL-building code.
7009         * decl2.c (get_temp_name): Assert non-initializedness of
7010         temporaries.
7011         * init.c (create_temporary_var): Move RTL-assigning code to ...
7012         (get_temp_regvar): Here.
7013         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
7014         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
7015         call initialize_local_var to generate initialization code.
7016         
7017 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7018
7019         * cp-tree.h (fndecl_as_string, type_as_string,
7020         type_as_string_real, args_as_string, decl_as_string,
7021         expr_as_string, code_as_string, language_as_string,
7022         parm_as_string, op_as_string, assop_as_string, cv_as_string,
7023         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
7024
7025         * errfn.c (cp_printer): Likewise.
7026
7027         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
7028         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
7029         cp_file_of, code_as_string, language_as_string, parm_as_string,
7030         op_as_string, assop_as_string, args_as_string, cv_as_string):
7031         Likewise.
7032
7033         * tree.c (lang_printable_name): Likewise.
7034
7035 1999-08-28  Richard Henderson  <rth@cygnus.com>
7036
7037         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
7038
7039 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
7040
7041         * cp-tree.h (strip_array_types): New function.
7042         * decl.c (maybe_deduce_size_from_array_init): New function, split
7043         out from cp_finish_decl.
7044         (layout_var_decl): Likewise.
7045         (maybe_commonize_var): Likewise.
7046         (maybe_inject_for_scope_var): Likewise.
7047         (initialize_local_var): Likewise.
7048         (build_cleanup_on_safe_obstack): Likewise.
7049         (check_initializer): Likewise.
7050         (make_rtl_for_nonlocal_decl): Likewise.
7051         (cp_finish_decl): Use them.
7052         * typeck.c (strip_array_types): New function.
7053         
7054         * cp-tree.def (LABEL_STMT): New tree node.
7055         * cp-tree.h (LABEL_STMT_LABEL): New macro.
7056         (shadow_label): Remove.
7057         (declare_local_label): New function.
7058         (finish_label_decl): Likewise.
7059         * decl.c (make_label_decl): New function, split out from
7060         lookup_label.
7061         (shadowed_labels): Remove.
7062         (binding_level): Add shadowed_labels.
7063         (clear_binding_level): Remove.
7064         (push_binding_level): Just bzero the new binding level.
7065         (pushlevel): Fix indentation.
7066         (pop_label): New function.
7067         (pop_labels): Likewise, split out from poplevel.
7068         (poplevel): Pop local labels.  Use pop_labels.
7069         (maybe_push_to_top_level): Don't clear shadowed_labels.
7070         (lookup_label): Use make_label_decl.
7071         (shadow_label): Remove.
7072         (declare_local_label): New function.
7073         (define_label): Simplify.
7074         (start_function): Don't clear shadowed_labels.
7075         (cp_function): Remove shadowed_labels.
7076         (push_cp_function_context): Don't save shadowed_labels.
7077         (pop_cp_function_context): Don't restore it.
7078         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
7079         * parse.y (label_decl): Use finish_label_decl.
7080         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
7081         declarations.
7082         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
7083         building_stmt_tree.
7084         (finish_label_decl): New function.
7085         (expand_stmt): Handle LABEL_STMTs and local label declarations.
7086         
7087 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
7088
7089         * decl.c (lookup_label): Build labels on the permanent obstack
7090         when building statement trees.  Don't build RTL for labels when
7091         building statement trees.
7092         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
7093         building statement trees.
7094         (finish_label_stmt): Likewise.
7095         (expand_stmt): Adjust accordingly.
7096         * pt.c (tsubst_expr); Likewise.
7097         (do_decl_instantiation): Robustify.
7098         
7099         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
7100         * tree.c (build_cplus_new): Set it.
7101         * expr.c (cplus_expand_expr): Use it.
7102         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
7103         
7104         * decl.c (store_parm_decls): Reset immediate_size_expand.
7105         (finish_function): Likewise.
7106         
7107         * tree.c (cplus_unsave_expr_now): Don't return a value.
7108
7109         * semantics.c (do_poplevel): Always initialize the return value.
7110
7111 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
7112
7113         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
7114         * tree.h (cplus_unsave_expr_now) : Same.
7115
7116 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
7117
7118         * decl.c (grokdeclarator): Amend comment.
7119         * except.c (expand_start_catch_block): Call push_template_decl for
7120         catch-block parameters.
7121         * method.c (synthesize_method): Build an empty compound statement
7122         for the body of a constructor.
7123
7124 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
7125
7126         * tree.c (cp_build_qualified_type_real): If we're asking for the
7127         same quals we already have, just return.
7128
7129 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
7130
7131         * cp-tree.def (SUBOBJECT): New tree node.
7132         * cp-tree.h (CLEANUP_P): New macro.
7133         (SUBOBJECT_CLEANUP): Likewise.
7134         (keep_next_level): Add parameter.
7135         (get_temp_regvar): Don't declare.
7136         (emit_base_init): Remove parameter.
7137         (expand_aggr_init): Rename to build_aggr_init.
7138         (expand_vec_init): Rename to build_vec_init.
7139         (do_pushlevel): Remove.
7140         (do_poplevel): Likewise.
7141         (finish_cleanup): New function.
7142         (finish_subobject): Likewise.
7143         (stmts_are_full_exprs_p): New variable.
7144         * decl.c (keep_next_level): Add parameter.
7145         (cp_finish_decl): Use build_aggr_init, not
7146         expand_aggr_init.  Use finish_expr_stmt to expand the code.
7147         (expand_static_init): Use tree-generating, not RTL-generating,
7148         functions to handle the initialization.
7149         (start_function): Remove dead code.  Always have a momentary
7150         obstack inside the function, even before hitting the first curly
7151         brace.
7152         (cplus_expand_expr_stmt): Move calls to
7153         expand_{start,end}_target_temps into semantics.c.
7154         (cp_function): Add stmts_are_full_exprs_p.
7155         (push_cp_function_context): Save it.
7156         (pop_cp_function_context): Restore it.
7157         * decl2.c (get_temp_regvar): Move to init.c.
7158         (do_static_initialization): Use build_{aggr,vec}_init.
7159         (do_static_destruction): Fix typo in comment.
7160         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
7161         * except.c (expand_throw): Use create_temporary_var.
7162         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
7163         * init.c (expand_vec_init_try_block): Remove.
7164         (expand_vec_init_catch_clause): Likewise.
7165         (get_temp_regvar): New function.
7166         (begin_init_stmts): Likewise.
7167         (finish_init_stmts): Likewise.
7168         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
7169         structure here.
7170         (emit_base_init): Likewise.  Remove unused parameter.
7171         (expand_virtual_init): Likewise.
7172         (expand_cleanup_for_base): Use finish_subobject.
7173         (expand_aggr_vbase_init_1): Simplify.
7174         (construct_virtual_bases): Use tree-generating functions to build
7175         up initialization.
7176         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
7177         (expand_default_init): Likewise.
7178         (expand_aggr_init_1): Likewise.
7179         (expand_vec_init): Rename to build_vec_init.
7180         * method.c (do_build_copy_constructor): Use tree-generating
7181         functions.  Don't call clear_last_expr.
7182         (do_build_assign_ref): Likewise.
7183         (synthesize_method): Call clear_last_expr here.
7184         * parse.y (base_init): Don't call clear_last_expr here.
7185         (nodecls): Likewise.
7186         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
7187         * semantics.c (do_pushlevel): Move to here.
7188         (do_poplevel): Likewise.
7189         (stmts_are_full_exprs_p): New variable.
7190         (finish_expr_stmt): Handle logic for temoprary cleanup here.
7191         (finish_for_stmt): Use finish_expr_stmt.
7192         (finish_cleanup): New function.
7193         (finish_function_try_block): Fix indentation.
7194         (finish_subobject): New function.
7195         (setup_vtbl_ptr): Call keep_next_level here.
7196         (finish_stmt_expr): Handle a block with no scope inside the
7197         statement-expression.
7198         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
7199         SUBOBJECT.
7200         * tree.c (search_tree): Handle INIT_EXPR.
7201         (mapcar): Likewise.
7202         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
7203         * typeck2.c (store_init_value): Change expand_aggr_init to
7204         build_aggr_init in comment.
7205         
7206 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
7207
7208         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
7209
7210 1999-08-25  Nathan Sidwell  <nathan@acm.org>
7211
7212         * decl2.c (handle_class_head): Be graceful about additional
7213         scope qualifiers. Adjust comments to reflect reality.
7214
7215 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7216
7217         * call.c (build_conditional_expr): Fix typo.
7218         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
7219         lvalue before trying to mess with the sides.
7220
7221         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
7222
7223 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
7224
7225         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
7226
7227 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
7228
7229         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
7230         Return arbitrary pointer or NULL.
7231         (check_eh_spec): Call __throw_type_match_rtti_2.
7232         * tinfo.h (*::dcast): Return int.  Add valp parm.
7233         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
7234         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
7235         (__throw_type_match_rtti): Now just a wrapper.
7236
7237         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
7238         (init_exception_processing): Don't initialize them.
7239
7240 1999-08-23  Paul Burchard <burchard@pobox.com>
7241
7242         * decl.c (check_default_argument): Fix typo.
7243
7244 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
7245
7246         * cp-tree.def (STMT_EXPR): Fix typo in node name.
7247
7248         * dump.c (dump_next_stmt): New function.
7249         (dequeue_and_dump): Use it.
7250         
7251         * pt.c (tsubst_copy): Make sure to initialize return value for a
7252         STMT_EXPR, even when processing_template_decl.
7253         * semantics.c (finish_stmt_expr): A statement-expression whose
7254         last statement is not an expression-statement has type `void'.  
7255         
7256 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
7257
7258         * semantics.c (finish_stmt_expr): Fix typo in comment.
7259         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
7260         (mapcar): Likewise.
7261         * init.c (build_vec_delete_1): Make the children of a permanent
7262         BIND_EXPR permanent.
7263         * pt.c (register_specialization): Don't register a specialization
7264         more than once.
7265         
7266 1999-08-18  Andrew Haley  <aph@cygnus.com>
7267
7268         * method.c (process_overload_item): Call build_mangled_C9x_name ()
7269         for all integer parameter types larger than long long.
7270
7271 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
7272
7273         * pt.c (redeclare_class_template): Merge default template
7274         arguments in both directions.
7275
7276         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
7277         compiler_error message.
7278
7279 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
7280
7281         * cp-tree.h: Declare flag_use_repository.
7282         * pt.c (do_decl_instantiation): Don't complain about duplicate
7283         instantiation with -frepo.
7284         (do_type_instantiation): Likewise.
7285
7286         * pt.c (push_template_decl_real): Complain about everything
7287         that isn't a valid template.
7288
7289         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
7290         affect inlines.
7291
7292 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
7293
7294         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
7295         * decl2.c (build_expr_from_tree): Handle it.
7296         * error.c (dump_expr): Likewise.
7297         * pt.c (for_each_template_parm): Likewise.
7298         (tsubst_copy): Likewise.
7299         * tree.c (search_tree): Likewise.
7300         * semantics.c (finish_pseudo_destructor_call): Create it.
7301         
7302 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
7303
7304         * search.c (setup_class_bindings): Robustify.
7305         * typeck.c (common_type): Use same_type_p, not pointer equality,
7306         to compare types.
7307
7308         * cp-tree.h (build_lang_field_decl): Remove.
7309         * class.c (build_vtable): Replace calls to build_lang_field_decl
7310         with build_lang_decl.
7311         (prepare_fresh_vtable): Likewise.
7312         (finish_struct_1): Likewise.
7313         (init_class_processing): Likewise.
7314         * decl.c (push_using_decl): Likewise.
7315         (init_decl_processsing): Likewise.
7316         (grokvardecl): Likewise.
7317         (build_ptrmemfunc_type): Likewise.
7318         (grokdeclarator): Likewise.
7319         (build_enumerator): Likewise.
7320         * decl2.c (grok_x_components): Likewise.
7321         (do_class_using_decl): Likewise.
7322         * except.c (call_eh_info): Likewise.
7323         * init.c (init_init_processing): Likewise.
7324         * rtti.c (expand_class_decl): Likewise.
7325         * tree.c (build_base_fields): Likewise.
7326         (build_vbase_pointer_fields): Likewise.
7327         * lex.c (build_lang_decl): Build declarations on the permanent
7328         obstack if we're building statmeent trees.
7329         (retrofit_lang_decl): Handle both the full lang_decl and also the
7330         smaller lang_decl_flags here.
7331         (build_lang_field_decl): Remove.
7332         * pt.c (push_template_decl_real): Issue errors for variable
7333         declarations that are not static members.
7334
7335 1999-08-18  Richard Henderson  <rth@cygnus.com>
7336
7337         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
7338         (mapcar): Likewise.
7339
7340 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
7341
7342         * cp-tree.h (back_end_hook): New variable.
7343         * decl2.c (back_end_hook): Define it.
7344         (finish_file): If it's non-NULL, call it.
7345
7346         * decl.c (add_decl_to_level): New function.
7347         (push_local_binding): Use it.
7348         (find_binding): Fix typo in comment.
7349         (pushdecl): Use add_decl_to_level.  Put templates on the
7350         corresponding namespace-scope binding levels.
7351         * dump.c (dequeue_and_dump): Print the specializations of a
7352         template.
7353         * pt.c (push_template_decl_real): Don't push a template multiple
7354         times.
7355
7356 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
7357
7358         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
7359         (CALL_DECLARATOR_QUALS): Likewise.
7360         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
7361         * decl.c (grokdeclarator): Adjust to use them.
7362         * decl2.c (grokfield): Likewise.
7363         (reparse_absdcl_as_casts): Likewise.
7364         * lex.c (make_call_declarator): Likewise.
7365         (set_quals_and_spec): Likewise.
7366         * pt.c (tsubst): Likewise.
7367         * tree.c (mapcar): Remove special hack to handle third operand of
7368         a CALL_EXPR.
7369
7370 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
7371
7372         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
7373         * class.c (build_vtable): Use build_lang_field_decl to build the
7374         VAR_DECLs for vtables.
7375         (prepare_fresh_vtable): Likewise.
7376         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
7377         CAN_HAVE_FULL_LANG_DECL_P.
7378         (push_using_decl): Use build_lang_decl to build USING_DECLs.
7379         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
7380         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
7381         (build_lang_field_decl): Likewise.
7382         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
7383         to copy.
7384         
7385         * cp-tree.def (STMT_EXPR): New tree node.
7386         * cp-tree.h (STMT_EXPR_STMT): New macro.
7387         (store_return_init): Change prototype.
7388         (finish_named_return_value): New function.
7389         (expand_stmt): Likewise.
7390         (expand_body): Likewise.
7391         (begin_stmt_tree): Likewise.
7392         (finish_stmt_tree): Likewise.
7393         (expanding_p): New variable.
7394         (last_expr_type): Likewise.
7395         (building_stmt_tree): New macro.
7396         * decl.c (start_function): Use building_stmt_tree, not
7397         processing_template_decl, where appropriate.
7398         (store_parm_decls): Likewise.
7399         (store_return_init): Move most of the body to semantics.c.
7400         (finish_function): Use building_stmt_tree.
7401         (finish_stmt): Clear last_expr_type here.
7402         (cp_function): Add expanding_p, last_tree, last_expr_type.
7403         (push_cp_function_context): Save them.
7404         (pop_cp_function_context): Restore them.
7405         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
7406         * error.c (dump_expr): Handle STMT_EXPR.
7407         * except.c (expand_start_catch_block): Use building_stmt_tree.
7408         Use add_decl_stmt.
7409         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
7410         (do_case): Move add_tree call to semantics.c.
7411         * parse.y (return_init): Use finish_named_return_value.
7412         (for.init.statement): Use finish_expr_stmt.
7413         * parse.c: Regenerated.
7414         * pt.c (do_pushlevel): Move to semantics.c.
7415         (do_poplevel): Likewise.
7416         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
7417         (tsubst_expr): Don't expand all the way to RTL here.  Handle
7418         RETURN_INIT and CTOR_INITIALIZER.
7419         (instantiate_decl): Call expand_body after tsubst'ing into
7420         DECL_SAVED_TREE.
7421         * semantics.c (expand_stmts): New function.
7422         (expanding_p): New variable.
7423         (last_expr_type): Likewise.
7424         (finish_expr_stmt): Use building_stmt_tree.
7425         (begin_if_stmt): Likewise.
7426         (finish_if_stmt_cond): Likewise.
7427         (finish_then_clause): Likewise.
7428         (begin_else_clause): Likewise.
7429         (finish_else_clause): Likewise.
7430         (begin_while_stmt): Likewise.
7431         (finish_while_stmt_cond): Likewise.
7432         (finish_while_stmt): Likewise.
7433         (finish_do_body): Likewise.
7434         (finish_do_stmt): Likewise.
7435         (finish_return_stmt): Likewise.
7436         (begin_for_stmt): Likewise.
7437         (fnish_for_init_stmt): Likewise.
7438         (finish_for_cond): Likewise.
7439         (finish_for_expr): Likewise.
7440         (finish_for_stmt): Likewise.
7441         (finish_break_stmt): Likewise.
7442         (finish_continue_stmt): Likewise.
7443         (finish_switch_cond): Likewise.
7444         (finish_switch_stmt): Likewise.
7445         (finish_case_label): Call add_tree here if necessary.
7446         (finish_goto_statement): Use building_stmt_tree.
7447         (begin_try_block): Likewise.
7448         (begin_function_try_block): Likewise.
7449         (finish_try_block): Likewise.
7450         (finish_function_try_block): Likewise.
7451         (finish_handler_sequence): Likewise.
7452         (finish_function_handler_sequence): Likewise.
7453         (begin_handler): Likewise.
7454         (finish_handler_parms): Likewise.
7455         (finish_handler): Likewise.
7456         (begin_compound_stmt): Likewise.
7457         (finish_compound_stmt): Likewise.
7458         (finish_asm_stmt): Likewise.
7459         (finish_label_stmt): Likewise.
7460         (finish_named_return_value): New function.
7461         (setup_vtbl_ptr): Moved here from decl2.c.
7462         (do_pushlevel): Moved here from pt.c.
7463         (do_poplevel): Likewise.
7464         (begin_stmt_expr): Use building_stmt_tree.
7465         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
7466         when building_stmt_tree.
7467         (begin_stmt_tree): New function.
7468         (finish_stmt_tree): Likewise.
7469         (expand_stmt): Likewise.
7470         (expand_body): Likewise.
7471         * tree.c (build_cplus_method_type): Make sure the argument types
7472         end up on the same obstack as the METHOD_TYPE.
7473         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
7474         THROW_EXPR, STMT_EXPR.
7475         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
7476         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
7477         sorry, if an unsupported node is encountered.
7478         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
7479         (c_expand_return): Don't call add_tree here.
7480         
7481 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
7482
7483         * pt.c (check_default_tmpl_args): Don't check in local scopes.
7484         (tsubst_decl): Make sure the declaration is on a saveable
7485         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
7486         variable.
7487         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
7488         
7489 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
7490
7491         Speed up Koenig lookup.
7492         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
7493         to return namespaces we've looked at.
7494         * decl2.c (lookup_using_namespace): Likewise.
7495         (add_function): Don't call ovl_member.
7496         (lookup_arg_dependent): Initialize k.namespaces to the list of 
7497         namespaces seen in unqualified lookup.
7498         * call.c (equal_functions): Move here from tree.c.
7499         (joust): Use it to handle duplicate candidates.
7500         * tree.c (ovl_member): Use ==.
7501
7502 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
7503
7504         * cp-tree.def (DECL_STMT): Make it smaller.
7505         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
7506         (lang_decl): ... here.  Add next.
7507         (DECL_SAVED_TREE): Adjust accordingly.
7508         (DECL_IMPLICIT_TYPEDEF_P): New macro.
7509         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
7510         (DECL_STMT_DECL): Likewise.
7511         (create_implicit_typedef): New function.
7512         (maybe_push_decl): Likewise.
7513         (tsubst_default_argument): New function.
7514         (at_function_scope_p): Likewise.
7515         (add_decl_stmt): Likewise.
7516         (push_permanent_obstack): Likewise.
7517         * call.c (convert_default_arg): Use tsubst_default_argument.
7518         * class.c (add_method): Use push_permanent_obstack.
7519         (build_self_reference): Create a TEMPLATE_DECL for the
7520         self-reference, if necessary.
7521         * decl.c (pseudo_global_level_p): Only look at the current binding
7522         level.
7523         (push_binding): Use push_permanent_obstack.
7524         (create_implicit_typedef): New function.
7525         (pushtag): Use it.
7526         (duplicate_decls): Use push_permanent_obstack.
7527         (maybe_push_decl): New function.
7528         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
7529         (start_decl_1): Remove dead code.
7530         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
7531         pseudo_global_level_p.
7532         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
7533         template.
7534         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
7535         pseudo_global_level_p.
7536         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
7537         a template.
7538         (get_sentry): Use push_permanent_obstack.
7539         * dump.c (dequeue_and_dump): Enable DECL_STMT.
7540         * except.c (call_eh_info): Use push_permanent_obstack.
7541         (build_eh_type_ref): Likewise.
7542         (do_pop_exception): Likewise.
7543         (expand_eh_spec): Likewise.
7544         (alloc_eh_object): Likewise.
7545         (expand_throw): Likewise.
7546         * init.c (build_java_class_ref): Likewise.
7547         * lex.c (get_time_identifier): Likewise.
7548         (free_lang_decl_chain): Correct type.
7549         (retrofit_lang_decl): Adjust accordingly.
7550         (build_lang_field_decl): Likewise.
7551         * lex.h (free_lang_decl_chain): Likewise.
7552         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
7553         * parse.c: Regenerated.
7554         * pt.c (tsubst_default_arguments): New function.
7555         (retrieve_local_specialization): Likewise.
7556         (register_local_specialization): Likewise.
7557         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
7558         pseudo_global_level_p to determine whether or not a template is
7559         primary.
7560         (lookup_template_class): Likewise.  Use create_implicit_typedef.
7561         (instantiate_class_template): Call tsubst_default_arguments for
7562         member functions, if appropriate.
7563         (tsubst_default_argument): New function.
7564         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
7565         * search.c (at_function_scope_p): New function.
7566         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
7567         (finish_label_stmt): Likewise.
7568         (add_decl_stmt): New function.
7569         (begin_class_definition): Likewise.
7570         (finish_typeof): Likewise.
7571         * tree.c (copy_template_template_parm): Likewise.
7572         (copy_to_permanent): Likewise.
7573         (push_permanent_obstack): Define.
7574         (mark_addressable): Use it.
7575         * typeck.c (mark_addressable): Likewise.
7576         
7577 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
7578
7579         * cp-tree.h (init_cplus_unsave): New.
7580         (cplus_unsave_expr_now): New.
7581         * lex.c (init_parse): Call init_cplus_unsave.
7582         * tree.c (init_cplus_unsave): New.
7583         (cplus_unsave_expr_now): New.
7584
7585 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
7586
7587         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
7588         decl_constant_value to simplify array bounds.
7589
7590 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
7591
7592         * lang-options.h: Add -fms-extensions.
7593         * cp-tree.h: Declare flag_ms_extensions.
7594         * decl2.c: Define it.
7595         * class.c (instantiate_type): Don't complain about taking the address
7596         of a bound member function if -fms-extensions.
7597         * typeck.c (build_unary_op): Likewise.
7598         * decl.c (grokdeclarator): Or about implicit int.
7599         * init.c (resolve_offset_ref): Or about implicit '&'.
7600
7601 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
7602
7603         * cp-tree.h (minimal_parse_mode): Remove.
7604         (finish_label_stmt): New function.
7605         * decl.c (saved_scope): Remove minimal parse mode.
7606         (maybe_push_to_top_level): Don't save it.
7607         (pop_from_top_level): Don't restore it.
7608         (define_label): Split out template-handling code to semantics.c.
7609         (start_decl): Don't use minimal_parse_mode.
7610         (cp_finish_decl): Likewise.
7611         (start_function): Don't increment it.
7612         (store_return_init): Don't use it.
7613         (finish_function): Don't decrement it.
7614         * parse.y (label_colon): Use finish_label_stmt throughout.
7615         * parse.c: Regenerated.
7616         * pt.c (minimal_parse_mode): Don't define it.
7617         (tsubst_expr): Use finish_label_stmt.
7618         * semantics.c (finish_label_stmt): New function.
7619
7620         * dump.c (queue): Be careful when computing bitmasks.
7621         (dequeue_and_dump): Describe binfos as binfos, not as
7622         vectors.
7623         
7624         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
7625         throughout.     
7626         * parse.c: Regenerated.
7627         
7628         * Make-lang.in (CXX_SRCS): Remove sig.c.
7629         * Makefile.in (CXX_OBJS): Remove sig.o.
7630         (sig.o): Remove.
7631         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
7632         (CPTI_SIGNATURE_TYPE): Likewise.
7633         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
7634         (opaque_type_node): Likewise.
7635         (signature_type_node): Likewise.
7636         (sigtable_entry_type): Likewise.
7637         (flag_handle_signatures): Likewise.
7638         (lang_type): Remove is_signature, is_signature_pointer,
7639         is_signature_reference, has_opaque_typedecls,
7640         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
7641         signature_pointer_to, signature_reference_to.
7642         (IS_SIGNATURE): Remove.
7643         (SET_SIGNATURE): Remove.
7644         (CLEAR_SIGNATURE): Remove.
7645         (IS_SIGNATURE_POINTER): Remove.
7646         (IS_SIGNATURE_REFERENCE): Remove.
7647         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
7648         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
7649         (CLASSTYPE_SIGNATURE): Remove.
7650         (SIGNATURE_TYPE): Remove.
7651         (SIGNATURE_METHOD_VEC): Remove.
7652         (SIGNATURE_POINTER_TO): Remove.
7653         (SIGNATURE_REFERENCE_TO): Remove.
7654         (lang_decl_flags): Remove is_default_implementation.  Rename
7655         memfunc_pointer_to to saved_tree.
7656         (IS_DEFAULT_IMPLEMENTATION): Remove.
7657         (DECL_MEMFUNC_POINTER_TO): Remove.
7658         (DECL_MEMFUNC_POINTING_TO): Remove.
7659         (DECL_SAVED_TREE): Adjust definition.
7660         (tag_types): Remove signature_type_node.
7661         (SIGNATURE_FIELD_NAME): Remove.
7662         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
7663         (SIGNATURE_OPTR_NAME): Likewise.
7664         (SIGNATURE_SPTR_NAME): Likewise.
7665         (SIGNATURE_POINTER_NAME): Likewise.
7666         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
7667         (SIGNATURE_REFERENCE_NAME): Likewise.
7668         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
7669         (SIGTABLE_PTR_TYPE): Likewise.
7670         (SIGTABLE_NAME_FORMAT): Likewise.
7671         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
7672         (SIGTABLE_TAG_NAME): Likewise.
7673         (SIGTABLE_VB_OFF_NAME): Likewise.
7674         (SIGTABLE_VT_OFF_NAME): Likewise.
7675         (finish_base_specifiers): Change prototype.
7676         (build_signature_pointer_type): Remove.
7677         (build_signature_reference_type): Remove.
7678         (build_signature_pointer_constructor): Remove.
7679         (build_signature_method_call): Remove.
7680         (build_optr_ref): Likewise.
7681         (append_signature_fields): Likewise.
7682         (signature_error): Likewise.
7683         * call.c (build_this): Remove signature support.
7684         (build_over_call): Likewise.
7685         (build_new_method_call): Likewise.
7686         * class.c (add_implicitly_declared_members): Likewise.
7687         (finish_struct_1): Likewise.
7688         (finish_struct): Likewise.
7689         * cvt.c (cp_convert_to_pointer): Likewise.
7690         (convert_to_pointer_force): Likewise.
7691         (ocp_convert): Likewise.
7692         * decl.c (sigtable_decl_p): Remove.
7693         (init_decl_processing): Remove support for signatures.
7694         (cp_finish_decl): Likewise.
7695         (grokdeclarator): Likewise.
7696         (grokparms): Likewise.
7697         (xref_tag): Likewise.
7698         (start_function): Likewise.
7699         (start_method): Likewise.
7700         * decl2.c (finish_sigtable_vardecl): Remove.
7701         (flag_handle_signatures): Remove.
7702         (lang_f_options): Remove handle-signatures.
7703         (grokfield): Remove support for signatures.
7704         (grokbitfield): Likewise.
7705         (finish_file): Likewise.
7706         (reparse_absdcl_as_casts): Likewise.
7707         * error.c (dump_type_real): Likewise.
7708         (dump_function_decl): Likewise.
7709         * friend.c (make_friend_class): Likewise.
7710         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
7711         * hash.h: Regenerated.
7712         * init.c (build_new_1): Remove support for signatures.
7713         * lang-options.h: Remove -fhandle-signatures,
7714         -fno-handle-signatures. 
7715         * lex.c (init_parse): Remove support for signatures.
7716         (yyprint): Likewise.
7717         * lex.h (rid): Remove RID_SIGNATURE.
7718         * method.c (build_decl_overload_real): Remove support for
7719         signatures. 
7720         (hack_identifier): Likewise.
7721         * parse.y (base_class): Likewise.
7722         (base_class.1): Likewise.
7723         (access_specifier): Likewise.
7724         * search.c (lookup_member): Likewise.
7725         * semantics.c (finish_qualified_object_call_expr): Likewise.
7726         (finish_template_type_parm): Likewise.
7727         (begin_class_definition): Likewise.
7728         (finish_base_specifier): Likewise.
7729         * sig.c: Remove.
7730         * tree.c (build_cplus_method_type): Remove support for signatures.
7731         * typeck.c (require_complete_type): Likewise.
7732         (c_sizeof): Likewise.
7733         (c_alignof): Likewise.
7734         (build_object_ref): Likewise.
7735         (build_component_ref): Likewise.
7736         (build_indirect_ref): Likewise.
7737         (build_c_cast): Likewise.
7738         (build_modify_expr): Likewise.
7739         (convert_for_initialization): Likewise.
7740         * typeck2.c (signature_error): Remove.
7741         (store_init_value): Remove support for signatures.
7742         (digest_init): Likewise.
7743         (build_x_arrow): Likewise.
7744         (build_functional_cast): Likewise.
7745         * xref.c (GNU_xref_decl): Likewise.
7746         
7747 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
7748
7749         * lex.c (do_identifier): Remove unnecessary lookup of class field.
7750
7751 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
7752
7753         * decl2.c (set_decl_namespace): Do not complain about non-matching
7754         decls if processing a template.
7755
7756 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
7757
7758         * decl.c (build_ptrmemfunc_type): Handle qualified
7759         pointer-to-member types here.
7760         * tree.c (cp_build_qualified_type_real): Simplify handling here.
7761
7762 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7763
7764         * lex.c (lang_identify): Likewise.
7765
7766 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
7767
7768         * Makefile.in: Update dependencies.
7769         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
7770         NULL_RTX.
7771         * decl.c: Include "function.h"
7772         (cleanup_label, return_label): Delete declarations.
7773         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
7774         (finish_function): Rename last_parm_insn variable to
7775         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
7776         * decl2.c: Include "function.h".
7777         (rtl_expr_chain): Delete declaration.
7778         * method.c: Include "function.h"
7779         * tree.c (build_vbase_pointer_fields): Don't initialize
7780         DECL_SAVED_INSNS with NULL_RTX.
7781         * typeck.c: Include "function.h"
7782
7783 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
7784
7785         * semantics.c (begin_function_try_block, finish_function_try_block,
7786         finish_function_handler_sequence): New fns.
7787         * parse.y (function_try_block): Use them.
7788         * pt.c (instantiate_decl): Likewise.
7789
7790         * cp-tree.h: Declare in_function_try_handler.
7791         * decl.c: Define it.
7792         (start_function): Clear it.
7793         (struct cp_function, push_cp_function_context): Save it.
7794         (pop_cp_function_context): Restore it.
7795         * parse.y (function_try_block): Set and clear it.
7796         * except.c (expand_end_catch_block): Rethrow if we reach the end
7797         of a function-try-block handler in a ctor or dtor.
7798         * typeck.c (c_expand_return): Complain about returning from a
7799         function-try-block handler of a ctor.
7800
7801         * parse.y (function_try_block): Call end_protect_partials
7802         before expand_start_all_catch.
7803
7804 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
7805
7806         * decl.c (struct binding_level): Add eh_region field.
7807         (push_binding_level): Set it.
7808         (define_label): Complain about jumping into an EH block.
7809
7810         * ptree.c (print_lang_type): Print the real type of a PMF.
7811         Print what exceptions a fn type throws.
7812
7813 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7814
7815         * class.c (count_fields, add_fields_to_vec): Add static prototype.
7816
7817         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
7818         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
7819         char*.
7820
7821         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
7822         Constify a char*.
7823
7824         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
7825         char*.
7826
7827         * dump.c (queue_and_dump_index, dump_int, dump_string,
7828         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
7829         a char*.
7830         (dump_stmt): Add static prototype.
7831
7832         * errfn.c (cp_thing): Constify a char*.
7833
7834         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
7835         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
7836         dump_expr): Constify a char*.
7837
7838         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
7839         read_line_number): Add static prototype.
7840         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
7841         (real_yylex): Move label `letter' into the scope where it is used.
7842
7843         * method.c (build_mangled_template_parm_index, build_overload_int,
7844         build_decl_overload_real, get_id_2): Constify a char*.
7845
7846         * search.c (check_final_overrider): Make static.
7847
7848         * typeck.c (composite_pointer_type): Constify a char*.
7849
7850 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
7851
7852         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
7853         we're looking at a class.
7854
7855         * decl.c (lookup_name_real): Set the complain flag if we're
7856         looking for a namespace member.
7857
7858         * lex.c (real_yylex): We can have a number with no digits.
7859
7860         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
7861
7862         * search.c (binfo_from_vbase): New fn.
7863         * cp-tree.h: Declare it.
7864         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
7865         from pointer to member of virtual base.  
7866         * typeck.c (get_delta_difference): Likewise.
7867
7868 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
7869
7870         * pt.c (tsubst): Use build_index_type to build in-template array
7871         index type.  Fixes g++.oliva/dwarf1.C.
7872         * decl.c (grokdeclarator): Likewise, just for consistency, as it
7873         doesn't seem to trigger the bug without it.
7874
7875 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
7876
7877         * typeck2.c (add_exception_specifier): Use complete_type.
7878
7879 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
7880
7881         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
7882         (dump_binary_op): Bulletproof.
7883         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
7884         * tree.c (search_tree): Don't enumerate all the nodes of classes
7885         `1', `2', and `<'; handle them generically.  Don't be sorry about
7886         "unrecognized tree codes"; just abort.
7887         (no_linkage_check): Don't do linkage checks for templates.
7888         
7889         * tree.c (cp_build_qualified_type_real): Handle
7890         pointer-to-member-function types correctly.
7891
7892 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
7893
7894         * decl.c (pushdecl): Only give an error for shadowing a parm 
7895         from *this* function.
7896
7897 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
7898
7899         * typeck2.c: Update URLs and mail addresses.
7900
7901 1999-08-04  Nathan Sidwell  <nathan@acm.org>
7902
7903         * cp-tree.h (empty_except_spec): New global var.
7904         (compexcepttypes): Remove prototype.
7905         (comp_except_specs): Prototype new global function.
7906         (add_exception_specifier): Prototype new global function.
7907         * decl.c (empty_except_spec): Define new global var.
7908         (duplicate_decls): Use comp_except_specs, reword error message.
7909         (init_decl_processing): Initialize empty_except_spec.
7910         Adjust build_exception_variant calls.
7911         * parse.y (exception_specification_opt): Use empty_except_spec.
7912         (ansi_raise_identifier): Call check_for_new_type.
7913         (ansi_raise_identifiers): Use add_exception_specifier.
7914         * pt.c (tsubst): Use add_exception_specifier to build exception
7915         specifier.
7916         * search.c (check_final_overrider): New static function, broken
7917         out of get_matching_virtual. Check throw specifiers, reword
7918         diagnostics.
7919         (get_matching_virtual): Use check_final_overrider.
7920         * tree.c (build_exception_variant): Use comp_except_specs.
7921         * typeck.c (compexcepttypes): Remove.
7922         (comp_except_types): New static function, helper for
7923         comp_except_specs. Compare two types as exception specifiers.
7924         (comp_except_specs): New global function, compare two exception
7925         specifiers.
7926         (comptypes): Adjust for comp_except_specs.
7927         * typeck2.c (add_exception_specifier): New global function.
7928         
7929         * class.c (check_for_override): Reword error message.
7930
7931 1999-08-03  Nathan Sidwell  <nathan@acm.org>
7932
7933         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
7934         * cp-tree.h (struct lang_type): Added non_pod_class flag.
7935         (CLASSTYPE_NON_POD_P): New macro to access it.
7936         * class.c (finish_struct_1): Determine non-PODness.
7937         Check for arrays of pointers (-Weffc++).
7938         Remove array inspection duplicated code.
7939         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
7940         Use CLASSTYPE_NON_POD_P.
7941
7942 1999-08-03  Nathan Sidwell  <nathan@acm.org>
7943
7944         * class.c (duplicate_tag_error): Preserve template information.
7945
7946 1999-08-03  Nathan Sidwell  <nathan@acm.org>
7947
7948         * decl.c (start_enum): Show location of previous definition.
7949         * parse.y (enumlist_opt): New reduction.
7950         (structsp): Simplify enum rules to use enumlist_opt.
7951
7952 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
7953
7954         * lex.c (yyprint): Handle PFUNCNAME.
7955
7956         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
7957         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
7958
7959 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
7960
7961         * decl.c (start_decl): Set attributes before duplicate_decls call.
7962
7963 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
7964
7965         * Make-lang.in (CXX_SRCS): Add dump.c.
7966         * Makefile.in (CXX_OBJS): Add dump.o.
7967         (dump.o): New target.
7968         * cp-tree.h (DECL_CONV_FN_P): Document.
7969         (DECL_OVERLOADED_OPERATOR_P): New function.
7970         (TYPE_PTRMEM_CLASS_TYPE): New macro.
7971         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
7972         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
7973         (ASM_VOLATILE_P): New macro.
7974         (STMT_LINENO): Likewise.
7975         (cp_namespace_decls): New function.
7976         (dump_node_to_file): New function.
7977         * decl.c (cp_namespace_decls): New function.
7978         (walk_namespaces_r): Use it.
7979         (wrapup_globals_for_namespace): Likewise.
7980         * decl2.c (flag_dump_translation_unit): New variable.
7981         (lang_decode_option): Handle -fdump-translation-unit.
7982         (finish_file): If flag_dump_translation_unit is set, dump the
7983         translation unit.
7984         * dump.c: New file.
7985         * lang-options.h: Add -fdump-translation-unit.
7986         * pt.c (tsubst_template_parms): Robustify.
7987         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
7988         (tsubst_expr): Use STMT_LINENO.
7989         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
7990         for invalid cv-qualifiers even while building templates.
7991         
7992 1999-08-02  Richard Henderson  <rth@cygnus.com>
7993
7994         * call.c: Include defaults.h instead of expr.h.
7995         * decl.c: Likewise.
7996         * pt.c: Likewise.
7997         * typeck.c: Include defaults.h.
7998
7999 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
8000
8001         * lex.c (errorcount, sorrycount): Don't declare.
8002         * repo.c (errorcount, sorrycount): Likewise.
8003         * typeck2.c (errorcount, sorrycount): Likewise.
8004
8005 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
8006
8007         * call.c (convert_default_arg, build_over_call): Change all uses of
8008         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
8009         Ensure expr.h is included.
8010         * decl.c (grokparams): Ditto.
8011         * pt.c (tsubst_decl): Ditto.
8012         * typeck.c (convert_arguments): Ditto.
8013
8014 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
8015
8016         * class.c (mark_overriders): Fix order of args to overrides.
8017         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
8018         functions with the same name.
8019
8020 1999-08-02  Richard Henderson  <rth@cygnus.com>
8021
8022         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
8023
8024 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
8025
8026         * call.c (build_conditional_expr): Fix typo in comment.
8027
8028 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
8029
8030         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
8031         case_stack; use in_control_zone_p.
8032         * typeck.c (c_expand_return): Likewise.
8033
8034 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
8035
8036         * except.c (catch_clauses): Delete declaration.
8037
8038 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
8039
8040         * call.c (build_conditional_expr): Call convert_from_reference to
8041         avoid reference/non-reference type confusion.  Fix typo.
8042
8043 1999-07-30  Richard Henderson  <rth@cygnus.com>
8044
8045         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
8046         * cp-tree.h (initializer_constant_valid_p): Remove.
8047
8048 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
8049
8050         * call.c (conditional_conversion): Don't build BASE_CONVs for
8051         conversions between things that have the same type.
8052         (build_conditional_expr): Tweak.
8053         (convert_like): Some BASE_CONVs really do require the generation
8054         of code.
8055         
8056         * init.c (perform_member_init): Don't go through build_modify_expr
8057         for simple initializations.
8058
8059 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
8060
8061         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
8062         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
8063         virtual functions and MI.  Simplify.
8064
8065         * method.c: Remove prototype for largest_union_member.
8066         * pt.c (determine_specialization): Fix uninitialized warning.
8067         * lex.c (real_yylex): Likewise.
8068
8069 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
8070
8071         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
8072         here too.
8073
8074         * cp-tree.h (BINFO_VIRTUALS): Document new format.
8075         * class.c (modify_one_vtable): Change prototype accordingly.
8076         (modify_all_vtables): Likewise.
8077         (modify_all_direct_vtables): Likewise.
8078         (modify_all_indirect_vtables): Likewise.
8079         (build_vtable_entry_for_fn): New function.
8080         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
8081         (modify_vtable_entry): Likewise.
8082         (add_virtual_function): Likewise.
8083         (build_vtbl_initializer): New function.
8084         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
8085         (fixup_vtable_deltas1): Likewise.
8086         (fixup_vtable_deltas): Likewise.
8087         (override_one_vtable): Likewise.
8088         (finish_struct_1): Likewise.
8089
8090         * error.c (dump_expr): Likewise.
8091         * search.c (get_abstract_virtuals_1): Likewise.
8092         (get_abstract_virtuals): Likewise.
8093         (expand_upcast_fixups): Likewise.
8094         * tree.c (debug_binfo): Likewise.
8095         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
8096         __pure_virtual here.
8097         
8098 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
8099
8100         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
8101         as per 1999-07-26 change.
8102
8103         * typeck.c (c_sizeof): Don't allow non-static data members.
8104         (expr_sizeof): Likewise.
8105
8106 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
8107
8108         * input.c (feed_input): Only touch lineno and input_filename
8109         if !USE_CPPLIB.  Save the old values before setting the new ones.
8110
8111         * input.c (feed_input): Add file, line parms.
8112         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
8113         (real_yylex): Check linemode before input_redirected().
8114
8115         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
8116         from op new to warning.
8117
8118 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
8119
8120         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
8121         * call.c: All uses changed.
8122         * typeck.c: Likewise.
8123
8124 1999-07-26  Nathan Sidwell  <nathan@acm.org>
8125
8126         * exception.cc (__cplus_type_matcher): Match __eh_matcher
8127         prototype.
8128
8129 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
8130
8131         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
8132         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
8133         (strip_top_quals): Declare.
8134         (ncp_convert): Likewise.
8135         (type_after_usual_arithmetic_converions): Likewise.
8136         (composite_pointer_type): Likewise.
8137         * call.c (strip_top_quals): Don't make it static.
8138         (promoted_arithmetic_type_p): New function.
8139         (conditional_conversion): Likewise.
8140         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
8141         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
8142         for converting a type to itself.
8143         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
8144         (implicit_conversion): Make sure the from and to types are
8145         complete.
8146         (add_builtin_candidate): Correct handling of ?: operator.
8147         (add_builtin_candidates): Improve documentation.
8148         (build_conditional_expr): New function.
8149         (can_convert): Implement in terms of can_convert_arg.
8150         (ncp_convert): New function.
8151         * typeck.c (type_after_usual_arithmetic_conversions): New
8152         function, split out from common_type.
8153         (composite_pointer_type): New function, split out from
8154         build_conditional_expr.
8155         (common_type): Use type_after_usual_arithmetic_conversions.
8156         Remove redundant attribute merging.
8157         (comptypes): Tidy.  Handle COMPLEX_TYPE.
8158         (build_binary_op_nodefault): Use null_ptr_cst_p.
8159         (build_conditional_expr): Remove.
8160         (convert_for_assignment): Use new conversion functions.
8161         
8162         * cp-tree.h (abstract_virtuals_error): Change declaration.
8163         * typeck2.c (abstract_virtuals_error): Check to see if an error
8164         ocurred, and return a boolean value accordingly.
8165         (build_functional_cast): Adjust accordingly.
8166         * class.c (finish_struct_1): Likewise.
8167         * cvt.c (ocp_convert): Likewise.
8168         * decl.c (cp_finish_decl): Likewise.
8169         (grokparams): Likewise.
8170         (grok_op_properties): Likewise.
8171         (start_function): Likewise.
8172         * init.c (build_new_1): Likewise.
8173
8174         * pt.c (unify): Don't get confused by pointers-to-member functions.
8175
8176         * search.c (build_cplus_new): Robustify.
8177         
8178 1999-07-24  Richard Henderson  <rth@cygnus.com>
8179
8180         * gxx.gperf (__builtin_va_arg): New.
8181         * parse.y (VA_ARG): New token.
8182         (unary_expr): Recognize it.
8183
8184 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
8185
8186         * g++FAQ.texi: Deleted per Joe Buck's request.
8187         * Makefile.in: Corresponding changes.
8188
8189 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
8190
8191         * lex.c: Sync with C frontend.
8192         (whitespace_cr): New fn.
8193         (skip_white_space): Use it.
8194         (init_parse): Reorder.
8195         (yyprint): Support CONSTANT.
8196         (pragma_getc, pragma_ungetc): Bring back.
8197         (read_line_number): Change in_system_header directly.
8198         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
8199         (parse_float): Update to C version.
8200         (yylex): Handle '$' under the letter case.
8201         Remove looking_for_typename handling.
8202         Support hex floating point constants.
8203         Follow C's lead for choosing type of integer constants.
8204         Rearrange stuff to match C frontend.
8205         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
8206         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
8207
8208 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
8209
8210         * call.c (reference_binding): Tweak.
8211         (mayble_handle_implicit_object): Use direct_reference_binding to
8212         create the right implicit conversion sequence.
8213
8214 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
8215
8216         * pt.c (convert_nontype_argument): Don't call decl_constant_value
8217         if we're converting to a reference type.
8218
8219         * call.c (NEED_TEMPORARY_P): New macro.
8220         (standard_conversion): Set it, for derived-to-base conversions.
8221         (reference_related_p): New function.
8222         (reference_compatible_p): Likewise.
8223         (convert_class_to_reference): Likewise.
8224         (direct_reference_binding): Likewise.
8225         (reference_binding): Rework for standards-compliance.
8226         (convert_like): Adjust accordingly.
8227         (maybe_handle_ref_bind): Simplify; the right conversion sequences
8228         are now built up in reference_binding.
8229         (initialize_reference): New function.
8230         * cp-tree.h (ICS_USER_FLAG): Document.
8231         (ICS_THIS_FLAG): Likewise.
8232         (ICS_BAD_FLAG): Likewise.
8233         (NEED_TEMPORARY_P): Likewise.
8234         (cp_lvalue_kind): New type.
8235         (real_lvalue_p): Return it.
8236         * error.c (dump_expr): Provide more accurate representation for
8237         AGGR_INIT_EXPRs.
8238         * init.c (expand_default_init): Do not try to perform implicit
8239         conversions for a brace-enclosed initializer.
8240         * search.c (lookup_conversions): Document.
8241         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
8242         appropriately.
8243         (real_lvalue_p): Adjust accordingly.
8244         (lvalue_p): Likewise.
8245         (build_cplus_new): Don't allow the creation of an abstract class.
8246         * typeck.c (convert_for_initialization): Use initialize_reference.
8247         
8248 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
8249
8250         * lex.c (real_yylex) : Correct the test for overflow when lexing
8251         integer literals.
8252
8253 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
8254
8255         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
8256         not DECL_BUILT_IN, to determine if a function is internally declared.
8257         (duplicate_decls): Likewise.  Improve handling of builtins.
8258         (push_overloaded_decl): Remove special handling of builtins.
8259
8260         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
8261
8262         * decl.c (grokdeclarator): Pull out decl_constant_value in
8263         templates, too.
8264
8265         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
8266         * cp-tree.h, pt.c, semantics.c: Adjust.
8267         * method.c (largest_union_member): Remove.
8268
8269         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
8270
8271         * lex.c (token_getch, token_put_back): New fns.
8272         (real_yylex): Use them.
8273
8274         * lex.c (lang_init): Generalize.
8275         (lang_init_options): Tell cpplib this is C++.
8276         (nextchar): Remove.  Replace uses with put_back.
8277         (skip_white_space): Handle linemode here.  Optimize for cpplib.
8278         (extend_token_buffer_to): New fn.
8279         (extend_token_buffer): Use it.
8280         (read_line_number, check_newline): Just deal with tokens.
8281         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
8282         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
8283         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
8284         * parse.y (PAREN_STAR_PAREN): Remove.
8285         * input.c: Don't use the putback machinery with cpplib.
8286         (sub_getch): Fold back into getch.
8287         (getch): Don't handle linemode here.
8288         (feed_input): Unget any text in the token buffer.
8289
8290         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
8291         nextyychar, nextyylval): Remove.
8292
8293 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
8294             Jason Merrill  <jason@yorick.cygnus.com>
8295
8296         * lex.c (indent_level): New variable.
8297         (init_parse): Set cpp_token to CPP_DIRECTIVE.
8298         (consume_string): Make this smart about USE_CPPLIB.
8299         (yyungetc): Use put_back function.
8300         (pragma_getc, pragma_ungetc): Functions deleted.
8301         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
8302         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
8303         pragma_ungetc.
8304         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
8305         Also, clean up cases where we redundantly set token_buffer[0].
8306         (read_line_number): New fn.
8307         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
8308         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
8309         (sub_getch): Conditionalize out code that's not appropriate if
8310         USE_CPPLIB.
8311         (put_back): Rewrite in case USE_CPPLIB is defined.
8312         (input_redirected): Ditto.
8313
8314 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
8315
8316         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
8317         c_global_trees and accessor macros defined in c-common.h.
8318         (cp_tree_index): New enumeration.
8319         (cp_global_trees): Declare new array.  Add accessor macros for it, and
8320         delete declarations of tree nodes replaced by it.
8321         (builtin_function): Delete macro, add declaration for new function.
8322         Include c-common.h.
8323         * decl.c: Delete definitions for tree nodes that were replaced by
8324         cp_global_trees and c_global_trees.
8325         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
8326         to generate the common builtins here.
8327         (builtin_function): New function.
8328         * decl2.c (abort_fndecl): Delete declaration.
8329         * except.c (expand_builtin_return_address): Delete declaration.
8330         (builtin_return_address_fndecl): Delete variable.
8331         (const_ptr_type_node): Delete declaration.
8332         * lex.c (cons_up_default_function): Delete declaration of
8333         void_list_node.
8334         * parse.y (void_list_node): Delete declaration.
8335         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
8336         Delete variables.
8337         (const_string_type_node): Delete declaration.
8338         * search.c (abort_fndecl): Delete declaration.
8339         * Makefile.in: Update dependencies.
8340
8341 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
8342
8343         * pt.c (check_default_tmpl_args): Move test for missing default
8344         arguments here, from ...
8345         (end_template_parm_list): Here.
8346
8347 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
8348
8349         * decl.c (lookup_nested_type): Remove.
8350         (pushtag): Don't call it.
8351
8352 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
8353
8354         * Makefile.in (INTERFACE): Bump to 2.
8355
8356 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
8357         
8358         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
8359         instructions to gcc.gnu.org.  Removed e-mail address.
8360
8361 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
8362
8363         * pt.c (determine_specialization): Tighten error-checking.
8364         (end_template_parm_list): Likewise.
8365
8366 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
8367
8368         * pt.c (check_default_tmpl_args): Handle friends defined in the
8369         class just like member functions defined in the class.
8370
8371 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
8372             Jason Merrill  <jason@yorick.cygnus.com>
8373
8374         * cp-tree.h (struct lang_decl): Added field for storing sorted
8375         FIELD_DECLs (used in TYPE_DECLs).
8376         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
8377         (DECL_SORTED_FIELDS): New macro.
8378         * class.c (method_name_cmp): New function.
8379         (finish_struct_methods): Modified to support sorting and searching
8380         methods.
8381         (finish_struct_anon): Changed code in inner loop to use ELT rather 
8382         than UELT (which required an extra indirection for every reference).
8383         (field_decl_cmp): New function to support sorting FIELD_DECLs.
8384         (finish_struct_1): Sort fields.
8385         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
8386         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
8387         Also, switch to using array indexing rather than a changing pointer.
8388         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
8389         DECL_SORTED_FIELDS.
8390
8391 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
8392
8393         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
8394         casts in system headers or extern "C" blocks.
8395
8396         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
8397         errors to pedwarn.
8398
8399 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
8400
8401         * decl2.c (write_virtuals): Deleted declaration.
8402         * cp-tree.h (write_virtuals): Deleted extern declaration.
8403         * class.c (finish_struct_1): Removed #if 0'd code that mentions
8404         write_virtuals.
8405         * semantics.c (begin_class_definition): Rewrite code to not depend
8406         on write_virtuals.
8407
8408         * lex.c (cp_pragma_interface): New function.
8409         (cp_pragma_implementation): Likewise.
8410         (handle_cp_pragma): Call them.
8411
8412         * typeck.c (comptypes): Simplify C code in look_hard.
8413
8414         * xref.c (PALLOC): Use xcalloc, not calloc.
8415         (SALLOC): Use xmalloc, not malloc.
8416
8417         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
8418
8419         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
8420         is NO_DEBUG.
8421
8422         * decl.c (duplicate_decls): If a redeclaration doesn't match the
8423         initial declaration, then don't save the inline info and by all
8424         means don't mark the function as a builtin function.
8425
8426         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
8427         CURRENT_CLASS_TYPE is 0.
8428
8429         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
8430         NULL_TREE.
8431
8432         * ptree.c (print_lang_type): Added vtable-needs-writing.
8433
8434 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
8435
8436         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
8437
8438 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
8439
8440         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
8441         Merged into c-common.
8442
8443 1999-07-05  Dave Brolley  <brolley@cygnus.com>
8444
8445         * lex.c (errorcount): Declare it.
8446         (finish_parse): Update errorcount for when using CPPLIB.
8447
8448 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
8449
8450         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
8451         parameters.
8452         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
8453         * decl.c (push_class_binding): Use it.
8454         (lookup_name_real): Likewise.
8455
8456 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
8457
8458         * cp-tree.h (widest_integer_literal_type_node,
8459         widest_unsigned_literal_type) : New.
8460         * decl.c (widest_integer_literal_type_node,
8461         widest_unsigned_literal_type) : New.
8462         (init_decl_processing): Handle/use the two new types.
8463         * lex.c (real_yylex): Same.
8464         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
8465         Same. 
8466
8467 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
8468
8469         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
8470         to anonymous cv-qualified types.
8471
8472 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
8473
8474         * lex.c (real_yylex) : Change integer literal overflow handling to
8475         be like c-lex.c.
8476
8477         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
8478
8479 1999-06-28  Richard Henderson  <rth@cygnus.com>
8480
8481         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
8482
8483 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
8484
8485         * error.c (dump_type_real): Handle TREE_LIST again.
8486
8487         * typeck.c (comp_target_parms): Don't complain about 
8488         converting from () to (...) if !flag_strict_prototype.
8489
8490         * decl.c (grokdeclarator): Update the names of all variants when
8491         de-anonymizing.
8492
8493 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
8494
8495         * init.c (expand_aggr_vbase_init): Rename to
8496         construct_virtual_bases.  Conditionalize construction here, 
8497         rather than ...
8498         (emit_base_init): Here.
8499
8500 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
8501
8502         * semantics.c (finish_asm_stmt): Apply decay conversions to
8503         input operands.
8504
8505         * decl.c (expand_static_init): When building an anonymous function
8506         for use with atexit, compute its body before and after entering
8507         the function.
8508
8509         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
8510         EXIT_EXPR.
8511         
8512 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
8513
8514         * init.c (expand_aggr_vbase_init): Add flag parameter.
8515         (build_partial_cleanup_for): Remove, inlining into ..
8516         (expand_cleanup_for_base): ... here.  Take flag parameter.
8517         (emit_base_init): Pass the in_chrg parameter to
8518         emit_aggr_vbase_init. 
8519         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
8520         
8521 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
8522
8523         * decl2.c (import_export_decl): Use same_type_p, rather than
8524         relying on pointer-equality for types.
8525
8526         * method.c (do_build_copy_constructor): Simplify.
8527
8528         * call.c (build_method_call): Remove bogus code for two-argument
8529         delete.
8530         * init.c (build_new_1): Expand on comment, and remove dead code.
8531
8532         * init.c (expand_cleanup_for_base): New function, split out
8533         from ...
8534         (emit_base_init): Here.
8535         (expand_aggr_vbase_init): Use it.
8536
8537 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
8538
8539         * cp-tree.h (class_cache_firstobj): Declare.
8540         (maybe_push_cache_obstack): Rename to push_cache_obstack.
8541         * class.c (permanent_obstack): Remove declaration.
8542         (class_cache_firstobj): Make it global.
8543         (add_method): Don't use permanent_obstack directly.
8544         (pushclass): Only free the class_cache_obstack if we know how far
8545         back to free it.
8546         (maybe_push_cache_obstack): Rename to push_cache_obstack.
8547         * decl.c: Remove dead comment.
8548         (saved_scope): Add class_cache_firstobj.
8549         (push_to_top_level): Save it.
8550         (pop_from_top_level): Restore it.
8551         (push_class_level_binding): Use push_cache_obstack, not
8552         maybe_push_cache_obstack.
8553         * search.c (push_class_decls): Likewise.
8554         
8555 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8556
8557         * pt.c (tsubst_friend_function): Push into namespace of friend
8558         function before pushdecl'ing it.
8559
8560 1999-06-14  Nathan Sidwell  <nathan@acm.org>
8561
8562         * call.c (build_new_op): Remove REF_BIND from all operands.
8563
8564 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
8565
8566         * init.c (build_new_1): Look up operator delete even if there was
8567         no explicit new placement.
8568
8569 1999-06-08  Nathan Sidwell  <nathan@acm.org>
8570
8571         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
8572         of ...
8573         (build_throw): ... here. Call it.
8574         (process_start_catch_block): Call it.
8575
8576 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
8577
8578         * search.c (convert_pointer_to_single_level): Reimplement without
8579         using get_binfo.
8580
8581 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
8582
8583         * method.c (is_back_referenceable_type): Back-reference bools when
8584         not squangling.
8585
8586 1999-06-07  Dave Brolley  <brolley@cygnus.com>
8587
8588         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
8589         * input.c (putback_buffer): New structure type.
8590         (putback): Replaces putback_char member.
8591         (putback): Replaces putback_char static variable.
8592         (feed_input): Use putback.
8593         (end_input): Use putback.
8594         (sub_getch): Use putback.
8595         (put_back): Use putback.
8596
8597 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
8598
8599         * decl.c (grokdeclarator): Fix typo in last change.
8600
8601 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
8602
8603         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
8604         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
8605
8606 1999-06-04  Nathan Sidwell  <nathan@acm.org>
8607
8608         * except.c (build_throw): Check throw expression validity.
8609
8610 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
8611
8612         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
8613         just because flag_signed_bitfields is false.
8614
8615 1999-06-03  Nathan Sidwell  <nathan@acm.org>
8616
8617         * semantics.c (begin_class_definition): Update the struct's
8618         location here ...
8619         * class.c (finish_struct): ... rather than here.
8620
8621         * decl.c (make_typename_type): Don't rely on uninitialized
8622         variable.
8623
8624 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8625
8626         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
8627
8628 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
8629
8630         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
8631         and friends rather than messing with current_obstack directly.
8632         (cp_build_qualified_type_real): Rework ARRAY_TYPE
8633         allocation to match practice throughout the rest of the 
8634         compiler.
8635
8636 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
8637
8638         * lex.c (make_lang_type): Create TYPE_BINFO for
8639         TEMPLATE_TYPE_PARMs just like for non-template types.
8640
8641         * decl.c (start_decl): Move checks on initialization to ...
8642         (cp_finish_decl): Here.  Tidy formatting slightly.
8643
8644 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
8645
8646         * decl.c (add_binding): Don't complain about a redeclaration of a
8647         semantically identical typedef in a local scope.
8648
8649 1999-05-28  Nathan Sidwell  <nathan@acm.org>
8650
8651         * decl.c (complete_array_type): Allocate off same obstack. Fix
8652         DO_DEFAULT comment to match reality.
8653
8654         * friend.c (make_friend_class): Fix diagnostic typo.
8655
8656 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
8657
8658         * decl.c (lookup_namespace_name): Handle getting a
8659         TEMPLATE_ID_EXPR.
8660         (expand_static_init): Don't call pushdecl for implicitly declared
8661         `atexit' used to register destructors.
8662
8663 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
8664
8665         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
8666         intialize a vtable.
8667
8668         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
8669         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
8670         by combining TEMPLATE_INFO and LEVEL into a single union.
8671         (DECL_TEMPLATE_INFO): Reformat.
8672         (DECL_SAVED_TREE): Document.
8673         (DECL_TEMPLATE_INJECT): Remove.
8674         * class.c (finish_struct): Remove code to deal with
8675         DECL_TEMPLATE_INJECT. 
8676
8677         * decl.c (maybe_process_template_type_declaration): Handle all new
8678         types in templates uniformly.
8679         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
8680         DECL_CONTEXT.
8681         * pt.c (lookup_template_class): Inject template instantiations of
8682         forward-declarations.
8683         (instantiate_class_template): Remove code processing
8684         DECL_TEMPLATE_INJECT.
8685         
8686         * pt.c (lookup_template_class): Tweak lookup to find member
8687         templates.
8688
8689         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
8690         ASM_CV_QUAL.
8691         * semantics.c (finish_asm_stmt): Make strings permanent if they're
8692         used in a template.
8693         
8694 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
8695
8696         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
8697         parts of pointer to data member types.
8698
8699 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
8700
8701         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
8702         and then make it look like `abort'.  Just use `abort' instead.
8703         
8704         * typeck.c (build_static_cast): Don't allow static_casts that cast
8705         away constness.
8706         (casts_away_constness_r): New function.
8707         (casts_away_constness): Likewise.
8708
8709         * decl.c (lookup_tag): Remove code no longer needed after
8710         name-lookup improvements.
8711         * decl2.c (handle_class_head): Make error-recovery more robust.
8712         * friend.c (make_friend_class): Reject templated typename types.
8713         * lex.c (is_global): A template parameter isn't global.
8714         * parse.y (class_head): Robustify.
8715         * parse.c: Regenerated.
8716         
8717 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
8718
8719         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
8720         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
8721         
8722         * cp-tree.h (push_nested_namespace): Declare.
8723         (pop_nested_namespace): Likewise.
8724         * decl.c (push_nested_namespace): New function.
8725         (pop_nested_namespace): Likewise.
8726         * pt.c (instantiate_class_template): Use them.
8727
8728         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
8729
8730         * cp-tree.h (cplus_expand_constant): Declare.
8731         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
8732         converted from one pointer-to-object type to another.
8733         * expr.c (cplus_expand_constant): Don't make it static.
8734         * typeck.c (build_component_ref): Don't crash when presented with
8735         a component which is a TEMPLATE_DECL.
8736         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
8737         cast from a pointer-to-member constant to its own type does not
8738         result in a valid non-type template argument.
8739
8740 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
8741             Nathan Sidwell  <nathan@acm.org>
8742         
8743         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
8744         * cp-tree.h: Fix typo in documentation on pointers-to-members.
8745         (cp_build_qualified_type): Make it a macro.
8746         (cp_build_qualified_type_real): Declare.
8747         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
8748         problem with template parameters and restrict-qualification.
8749         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
8750         * hash.h: Regenerated.
8751         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
8752         the enumeration.
8753         (NORID): Remove definition.
8754         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
8755         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
8756         (fn_type_unification): Check that the function type resulting from
8757         the deduction is legal.
8758         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
8759         (unify): Use cp_build_qualified_type_real.
8760         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
8761         (cp_build_qualified_type): Rename to ...
8762         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
8763         and modify appropriately.
8764         
8765         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
8766         reveal optimization opportunities.
8767
8768         * pt.c (tsubst): Don't issue error messages when we're not
8769         complaining, even if we see a qualified function type.
8770         (check_cv_quals_for_unify): Don't allow a qualified function
8771         type.
8772
8773 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
8774
8775         * class.c (instantiate_type): Downgrade errors for object-dependent
8776         memfn refs to pedwarn.
8777
8778 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
8779
8780         * decl.c (grokdeclarator): Don't treat [] as indicating a
8781         zero-sized array in a typedef.
8782
8783         * call.c (build_object_call): Don't look at DECL_NAME for a type.
8784         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
8785         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
8786
8787         * pt.c (for_each_template_parm): Rework to match documentation.
8788         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
8789
8790 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
8791
8792         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
8793
8794         * class.c (finish_base_struct): Allow non-COM bases for COM classes
8795         except at the leftmost position.
8796         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
8797         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
8798         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
8799
8800         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
8801         (build_cplus_new): Make sure that what we return is of the right type.
8802
8803 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
8804
8805         * cp-tree.h (make_ptrmem_cst): New function.
8806         * expr.c (cplus_expand_constant): Split out from ...
8807         (cplus_expand_expr): Here.  Use cplus_expand_constant.
8808         (init_cplus_expand): Set lang_expand_constant.
8809         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
8810
8811         * tree.c (make_ptrmem_cst): Define.
8812         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
8813         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
8814
8815 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
8816
8817         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
8818
8819         * decl2.c (start_static_storage_duration_function): Fix comment.
8820         (finish_file): Create static storage duration functions lazily.
8821
8822 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
8823
8824         Implement anonymous structs.
8825         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
8826         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
8827         * class.c (finish_struct_1): Remove redundant check for anon struct.
8828         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
8829         (check_tag_decl): Check for anonymous struct here.
8830         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
8831         * init.c (sort_member_init, emit_base_init): Handle getting fields
8832         as well as names in current_member_init_list.
8833         (perform_member_init): Handle getting an anon aggr.
8834         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
8835         (do_build_copy_constructor): Likewise.
8836
8837 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
8838
8839         * tree.c (cp_build_qualified_type): Don't allow qualified function
8840         types.
8841
8842 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
8843
8844         * gxxint.texi: Fix typo.
8845
8846 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
8847
8848         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
8849         * class.c (finish_struct_1): Use CLASS_TYPE_P.
8850         * ptree.c (print_lang_type): Likewise.
8851         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
8852         IS_AGGR_TYPE_CODE.
8853         * typeck2.c (digest_init): Likewise.
8854
8855 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
8856
8857         * call.c (joust): Compare the types of the conv ops, not the
8858         target types of the conversions.
8859
8860 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
8861
8862         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
8863         was not given.
8864
8865 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
8866
8867         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
8868         * decl.c (grokfndecl): Don't allow inline declarations of friend
8869         template specializations, or friend template specializations with
8870         default arguments.
8871         * pt.c (tsubst): Handle substitution into array types that does
8872         not yield a fixed upper bound, even when not processing a
8873         template.
8874         (tsubst_copy): Deal with the fact that the second operand to a
8875         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
8876         * search.c (marked_pushdecls_p): Don't descend into
8877         TEMPLATE_TYPE_PARMs and the like.
8878         (unmarked_pushdecls_p): Likewise.
8879         
8880         * call.c (build_over_call): Don't throw away
8881         initializations/copies of empty classes; use MODIFY_EXPR and
8882         INIT_EXPR as for non-empty classes.
8883         * class.c (finish_struct_1): Put the padding byte for an empty
8884         class on the TYPE_NONCOPIED_PARTS list for the class.
8885
8886 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
8887
8888         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
8889         indicate a reference to a field that is a qualified name.
8890
8891 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
8892
8893         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
8894         ASM_OUTPUT_CONSTRUCTOR.
8895
8896         * friend.c (do_friend): Add attrlist arg.  Remove support for
8897         getting a non-decl as 'decl'.
8898         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
8899         rtl.
8900         (grokdeclarator): Adjust.
8901         * cp-tree.h: Adjust.
8902
8903 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
8904
8905         * cp-tree.h (permanent_p): New function.
8906         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
8907         possibly complex tree node.
8908         * tree.c (mapcar): Adjust comments, and follow coding standards in
8909         conditional.
8910         (permanent_p): New function.
8911
8912 1999-05-13  Per Bothner  <bothner@cygnus.com>
8913
8914         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
8915         primitive Java types, if we actually see `extern "Java"'.
8916
8917 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
8918
8919         * lang-specs.h: Pass -$ to the preprocessor.
8920
8921 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
8922
8923         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
8924         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
8925         (resolve_offset_ref): Don't handle a raw baselink.
8926         * cvt.c (build_expr_type_conversion): Likewise.
8927         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
8928         convert_for_initialization): Likewise.
8929         * class.c (instantiate_type): Handle seeing a baselink under an
8930         OFFSET_REF.
8931         * error.c (dump_expr): Likewise.        
8932         * pt.c (for_each_template_parm): Likewise.
8933         (resolve_overloaded_unification): Likewise.
8934         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
8935         * typeck.c (expr_sizeof): Also complain about other permutations
8936         of overloaded functions.
8937
8938 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
8939
8940         * init.c (resolve_offset_ref): Don't return a raw method.
8941         Use BASELINK_P.
8942         * typeck.c (decay_conversion): Don't handle a raw method.
8943         Resolve all OFFSET_REFs.
8944         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
8945         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
8946         same_type_p for pmf bits.  Don't use build_binary_op to compare
8947         raw pointers to methods.
8948         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
8949         to decide when to call resolve_offset_ref.
8950         (build_c_cast, convert_for_initialization): Likewise.
8951         * cvt.c (build_expr_type_conversion): Likewise.
8952
8953 1999-05-06  Nathan Sidwell  <nathan@acm.org>
8954
8955         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
8956
8957 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
8958
8959         * decl2.c (start_objects): Don't let static constructors and
8960         destructors get inlined.
8961
8962         * parse.y (nested_name_specifier): Make sure ordinary types are
8963         complete, just like template types.
8964         * parse.c: Regenerated.
8965
8966         * pt.c (check_explicit_specialization): Improve error messages.
8967
8968 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8969
8970         * typeck.c (string_conv_p): Use same_type_p to check whether we
8971         try to convert between char and wchar_t.
8972
8973 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
8974
8975         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
8976         lookup to error_mark_node here.
8977         (lookup_member): Revise documentation.  Add comments.  Don't set
8978         the TREE_TYPE to error_mark_node here, and don't build up an extra
8979         TREE_LIST for ambiguous lookups.
8980         (setup_class_bindings): Adjust accordingly.
8981         (push_class_decls): Revise out-of-date comments.
8982         
8983         * typeck.c (build_const_cast): Tighten checks for legality.
8984
8985 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8986
8987         * init.c (build_member_call): Lookup names coming from
8988         namespace-scoped LOOKUP_EXPR.
8989
8990 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
8991
8992         * gxxint.texi: Add documentation for 'I'.
8993
8994 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8995
8996         * tinfo.cc (operator==): Qualify type_info with std::.
8997
8998 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
8999
9000         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
9001         (DECL_COMDAT): Remove definition.
9002
9003 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
9004
9005         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
9006         change.
9007
9008 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
9009
9010         * class.c (build_vtable): Use build_lang_decl when building
9011         vtables, not just build_decl.
9012         (prepare_fresh_vtable): Likewise.
9013         * decl.c (wrapup_globals_for_namespace): Mark vtables as
9014         DECL_EXTERNAL when calling wrapup_global_declarations.
9015         * decl2.c (priority_info_s): Add initializations_p and
9016         destructions_p members.
9017         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
9018         when deciding what vtables to write out.
9019         (ssdf_decls): New variable.
9020         (ssdf_decls_used): Likewise.
9021         (start_static_storage_duration_function): Deal with being called
9022         multiple times.  Avoid inlining this function.
9023         (generate_inits_for_priority): Deal with reuse of priority map.
9024         (get_priority_info): Clear initializations_p and destructions_p.
9025         (do_static_initialization): Tweak comment.
9026         (do_static_destruction): Likewise.  Fix condition on sentries for
9027         destruction.
9028         (generate_ctor_or_dtor_function): Call all of the static storage
9029         duration functions.
9030         (generate_ctor_or_dtor_function_for_priority): Check
9031         initializations_p and destructions_p to see what priorities need
9032         initialization functions.
9033         (finish_file): Rework to generate multiple static storage duration
9034         functions, rather than just one.
9035
9036         * typeck.c (build_const_cast): Tweak last change to handle
9037         templates correctly.
9038
9039         * typeck.c (build_const_cast): Disallow use of const_cast to
9040         anything but a pointer or reference type.
9041
9042 1999-04-30  Nathan Sidwell  <nathan@acm.org>
9043
9044         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
9045         signature type.
9046
9047 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
9048
9049         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
9050         (finish_file): Indent comments properly.
9051
9052 1999-04-29  Richard Henderson  <rth@cygnus.com>
9053
9054         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
9055         (do_static_destruction): Likewise.
9056
9057 1999-04-29  Nathan Sidwell  <nathan@acm.org>
9058
9059         * cp-tree.h (TYPE_NOTHROW_P): New macro.
9060         * decl2.c (delete_sanity): Warn on deleting void *.
9061         * init.c (build_new_1): Use TYPE_NOTHROW_P.
9062         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
9063         throwing operator new.
9064
9065 1999-04-28  Nathan Sidwell  <nathan@acm.org>
9066
9067         * cp-tree.h (build_component_addr): Remove prototype.
9068         * typeck.c (build_component_addr): Make static. Remove MSG
9069         argument.
9070         (build_component_addr): Remove MSG parameter, clean up
9071         comment.
9072         (build_x_function_call): Use cp_error.
9073         (build_unary_op): Adjust call of build_component_addr.
9074
9075 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
9076
9077         * pt.c (tsubst_friend_class): Check for NULL.
9078
9079 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
9080
9081         * search.c (binfo_for_vtable): Initialize bfvi.var.
9082
9083 1999-04-27  Nathan Sidwell  <nathan@acm.org>
9084
9085         * rtti.c (build_x_typeid): Check rtti is enabled.
9086
9087 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
9088
9089         * search.c (is_subobject_of_p): Make sure we're looking at the
9090         right baseclasses.
9091
9092 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
9093
9094         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
9095
9096 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
9097
9098         * decl2.c (finish_file): Tweak handling of extern inlines so that
9099         they are not unnecessarily put out.
9100
9101         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
9102         such as base classes.
9103
9104 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
9105
9106         * tree.c (build_exception_variant): Fix typo: use the chain of U,
9107         not trying V, while cycling through U.
9108
9109 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
9110
9111         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
9112         preserves_first_arg.  Enlarge dummy accordingly.
9113         (DECL_TINFO_FN_P): New macro.
9114         (SET_DECL_TINFO_FN_P): Likeiwse.
9115         (DECL_RETURNS_FIRST_ARG): Remove.
9116         (DECL_PRESERVES_THIS): Likewise.
9117         (DECL_INIT_PRIORITY): New macro.
9118         (finish_struct_1): Change prototype.
9119         (cat_namespace_levels): Remove prototype.
9120         (vtable_decl_p): New prototype.
9121         (vtype_decl_p): Likewise.
9122         (sigtable_decl_p): Likewise.
9123         (walk_globals_pred): New typedef.
9124         (walk_globals_fn): Likewise.
9125         (walk_globals): New prototype.
9126         (walk_namespaces_fn): New typedef.
9127         (walk_namespaces): New prototype.
9128         (wrapup_globals_for_namespace): Likewise.
9129         (walk_vtables): Remove prototype.
9130         (walk_sigtables): Likewise.
9131         (instantiate_pending_templates): New prototype.
9132         * class.c (finish_struct_1): Don't return a value.
9133         * decl.h (pending_statics): Remove declaration.
9134         * decl.c (walk_namespaces_r): New function.
9135         (walk_globals_r): Likewise.
9136         (vtable_decl_p): Likewise.
9137         (vtype_decl_p): Likewise.
9138         (sigtable_decl_p): Likewise.
9139         (walk_namespaces): Likewise.
9140         (walk_globals_data): New type.
9141         (walk_globals): New function.
9142         (wrapup_globals_for_namespace): Likewise.
9143         (expand_static_init): Remove assertion.  Remove redundancy in
9144         conditional.  Don't put static data members in static_aggregates
9145         Tidy.
9146         (finish_function): Remove redundancy in conditional.  Don't set
9147         DECL_RETURNS_FIRST_ARG.
9148         (cat_namespace_levels): Remove.
9149         * decl2.c: Include splay-tree.h and varray.h.
9150         (priority_info_s): New structure.
9151         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
9152         conventions.
9153         (prune_vtable_vardecl): Likewise.
9154         (finish_sigtable_vardecl): Likewise.
9155         (setup_initp): Remove.
9156         (do_dtors): Remove.
9157         (do_ctors): Remove.
9158         (start_static_storage_duration_function): New function.
9159         (generate_inits_for_priority): Likewise.
9160         (finish_static_storage_duration_function): Likewise.
9161         (get_priority_info): Likewise.
9162         (do_static_initialization): Likewise.
9163         (do_static_destruction): Likewise.
9164         (do_static_initialization_and_destruction): Likewise.
9165         (generate_ctor_or_dtor_function): Likewise.
9166         (generate_ctor_and_dtor_functions_for_priority): Likewise.
9167         (pending_statics): Make it a varray.
9168         (pending_statics_used): New variable.
9169         (saved_inlines): Make it a varray.
9170         (saved_inlines_used): New variable.
9171         (finish_static_data_member): Change method of updating
9172         pending_statics.
9173         (mark_inline_for_output): Remove #if 0'd code.  Change method of
9174         updating saved_inlines.
9175         (walk_vtables): Remove.
9176         (walk_sigtables): Likewise.
9177         (import_export_decl): Use DECL_TINFO_FN_P.
9178         (pending_templates): Remove declaration.
9179         (maybe_templates): Likewise.
9180         (static_aggregates_initp): Likewise.
9181         (setup_initp): Likewise.
9182         (finish_objects): Simplify.
9183         (INITIALIZE_P_IDENTIFIER): New macro.
9184         (PRIORITY_IDENTIFIER): New macro.
9185         (SSDF_IDENTIFIER): New macro.
9186         (initialize_p_decl): New variable.
9187         (priority_decl): Likewise.
9188         (ssdf_decl): Likewise.
9189         (priority_info_map): Likewise.
9190         (finish_file): Recode output of static intializers and other
9191         file-scope finalization tasks.
9192         * error.c (OB_END_TEMPLATE_ID): New macro.
9193         (dump_type_real): Use it.
9194         (dump_decl): Likewise.
9195         (dump_function_name): Likewise.
9196         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
9197         interface.
9198         (check_newline): Use walk_globals, not walk_vtables.
9199         * pt.c (pending_tempalte_expansions): Remove.
9200         (set_vardecl_interface_info): Likewise.
9201         (pending_templates): Make static.
9202         (maybe_templates): Likewise.
9203         (instantiate_class_template): Adjust call to finish_struct_1.
9204         (instantiate_pending_templates): New function.
9205         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
9206         * tree.c (static_aggregates_initp): Remove.
9207         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
9208         instead.
9209         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
9210
9211         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
9212         with the RTL code RETURN.
9213         * hash.h: Regenerated.
9214         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
9215         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
9216         * parse.c: Regenerated.
9217         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
9218         it.
9219         (inline_parm_levels): New variable.
9220         (inline_parm_levels_used): Likewise.
9221         (maybe_begin_member_template_processing): Update them.
9222         (maybe_end_member_template_processing): Use them, rather than
9223         guessing how many levels to pop.
9224
9225         * decl.c (make_typename_type): Tighten error-checking.
9226
9227 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
9228
9229         * cp-tree.h (build_binary_op): Remove unneeded parameter.
9230         * class.c (build_vrable_entry_ref): Adjust call to
9231         build_binary_op.
9232         * decl.c (expand_static_init): Likewise.
9233         (grokdeclarator): Likewise.
9234         (finish_function): Likewise.
9235         * decl2.c (delete_sanity): Likewise.
9236         (do_dtors): Likewise.
9237         (do_ctors): Likewise.
9238         * error.c (dump_type_suffix): Likewise.
9239         * expr.c (cplus_expand_expr): Likewise.
9240         * init.c (resolve_offset_ref): Likewise.
9241         (build_new): Likewise.
9242         (build_new_1): Likewise.
9243         (build_vec_delete_1): Likewise.
9244         (expand_vec_init_catch_clause): Likewise.
9245         (build_delete): Likewise.
9246         * pt.c (tsubst): Likewise.
9247         * rtti.c (synthesize_tinfo_fn): Likewise.
9248         * search.c (expand_upcast_fixups): Likewise.
9249         (expand_direct_vtbls_init): Likewise.
9250         * typeck.c (get_member_function_from_ptrfunc): Likewise.
9251         (build_binary_op_nodefault): Likewise.
9252         (point_int_sum): Likewise.
9253         (pointer_diff): Likewise.
9254         (build_unary_op): Likewise.
9255         (build_modify_expr): Likewise.
9256         (get_delta_difference): Likewise.
9257         (build_ptrmemfunc): Likewise.
9258         (expand_ptrmemfunc_cst): Likewise.
9259
9260 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
9261
9262         * decl.c (grokfndecl): Always call cplus_decl_attributes.
9263         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
9264
9265 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
9266
9267         * cp-tree.h (finish_static_data_member_decl): New function.
9268         * decl2.c (finish_static_data_member_decl): Split out from ...
9269         (grokfield): Here.
9270         * pt.c (instantiate_class_template): Use it here instead of
9271         trying to fake it.
9272         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
9273         finish_static_data_member_decl will do that.  Explicit set
9274         DECL_EXTERNAL to match non-template processing.
9275
9276 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
9277
9278         * cp-tree.h (finish_class_definition): Add parameter.
9279         * parse.y (structsp): Use it.  Don't call pop_scope here.
9280         * parse.c: Regenerated.
9281         * semantics.c (finish_class_definition): Pop it here.
9282
9283 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
9284
9285         * decl.c (xref_tag): Revise handling of nested template
9286         declarations.
9287         * pt.c (check_explicit_specialization): Tweak handling of friend
9288         templates in template classes.
9289         (tsubst_friend_class): Handle friend declarations for nested
9290         member template classes.
9291
9292 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
9293
9294         * class.c (finish_struct): Remove unused variable.
9295         (pushclass): Likewise.
9296         (invalidate_class_lookup_cache): Likewise.
9297         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
9298         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
9299         doesn't get obliterated.
9300         (make_typename_type): Handle template classes correctly.
9301
9302         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
9303         (storetags): Declare.
9304         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
9305         (pushclass): Likewise.  Use storetags to install tag declarations,
9306         not pushtag.
9307         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
9308         * decl.c (storetags): Make it global.
9309         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
9310         implicit typename declaration.
9311         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
9312         * method.c (hack_identifier): Likewise.
9313         * search.c (lookup_member): Likewise.
9314
9315         * decl.c (warn_about_implicit_typename_lookup): New function.
9316         (lookup_name_real): Use it.  Rework handling of implicit typename
9317         extension.
9318
9319 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
9320
9321         * cp-tree.h (lookup_nested_field): Remove.
9322         * class.c (push_nested_class): Handle UNION_TYPEs.
9323         (pop_nested_class): Likewise.
9324         * decl.c (lookup_name_real): Don't call lookup_nested_field.
9325         (start_decl): Use push_nested_class, not just pushclass.
9326         (cp_finish_decl): Use pop_nested_class, not just popclass.
9327         * search.c (lookup_nested_field): Remove.
9328
9329         * cp-tree.h (lang_type): Add documentation.
9330         * decl2.c (handle_class_head): Create template declarations here,
9331         as appropriate.
9332         * parse.y (class_head): Return whether or not we entered a new
9333         scope, as well as the type named.
9334         (named_class_head): Likewise.
9335         (named_complex_class_head_sans_basetype): Likewise.
9336         (structsp): Adjust accordingly.  Pop scope when required.
9337         * parse.c: Regenerated.
9338         * pt.c (check_default_tmpl_args): Robustify.
9339         (redeclare_class_template): Likewise.
9340         (instantiate_class_template): An instantiation of an
9341         anonymous union is itself an anonymous union.
9342         * semantics.c (begin_class_definition): Don't create template
9343         declarations here.
9344
9345 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
9346
9347         * parse.y (after_type_declarator_intern): New nonterminal.
9348         (after_type_declarator): Use it.
9349         (direct_after_type_declarator): Likewise.  Move above
9350         nonnested_type to fix reduce/reduce conflict resolution.
9351         (declmods): Reducing from just 'attributes' has EMPTY precedence.
9352         * Makefile.in (CONFLICTS): Update.
9353
9354         * decl.c (define_label): Downgrade error for jumping over a
9355         non-POD decl to pedwarn.
9356
9357 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
9358
9359         * cp-tree.h (popclass): Change declaration.
9360         (pop_nested_class): Likewise.
9361         (poplevel_class): Remove declaration.
9362         * call.c (convert_default_argument): Pass no arguments to
9363         popclass.
9364         * class.c (finish_struct_1): Likewise.
9365         (finish_struct): Likewise.
9366         (popclass): Remove argument.  Simplify code accordingly.
9367         (pop_nested_class): Likewise.
9368         * decl.c (poplevel_class): Declare it here, and make it static.
9369         (poplevel): Handle class scopes.
9370         (poplevel_class): Don't take an rgument.  Simplify.
9371         (pop_everything): Pass no arguments to pop_nested_class.
9372         (cp_finish_decl): Pass no arguments to popclass.
9373         (grokdeclarator): Pass no arguments to pop_nested_class.
9374         (finish_function): Likewise.
9375         * decl2.c (grokfield): Likewise.
9376         (pop_scope): Pass no arguments to popclass.
9377         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
9378         * pt.c (instantiate_class_template): Move call to pushclass, and
9379         document.  Pass no arguments to popclass.
9380         (regenerate_decl_from_template): Likewise.
9381
9382 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
9383
9384         * typeck.c (build_unary_op): Handle taking the address of a unique
9385         bound non-static member function.
9386
9387 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9388
9389         * lang-options.h (-Wdeprecated): New flag.
9390         * decl2.c (warn_deprecated): New flag.
9391         (lang_decode_option): Deprecated this-is-variable,
9392         external-templates, alt-external-templates.
9393         Support -Wdeprecated.
9394         * errfn.c (cp_deprecated): New function.
9395
9396 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
9397
9398         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
9399         of the decls themselves.
9400
9401         * pt.c (tsubst_function_type): Copy attributes over.
9402
9403         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
9404         and com_interface.
9405         * cp-tree.h: Add prototype.
9406         * decl.c (init_decl_processing): Set valid_lang_attribute.
9407
9408 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
9409
9410         * class.c (finish_struct_1): Look at the const-ness of the field's
9411         type, not the TREE_READONLY-ness of the declaration.
9412         * method.c (synthesize_method): Likewise.
9413         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
9414         creating new declarations.
9415
9416 1999-04-13  Mike Stump  <mrs@wrs.com>
9417
9418         * decl2.c (import_export_decl): Because vtables always reference
9419         virtual functions, even if they are inlined, don't allow
9420         -fno-implement-inlines to not emit them, instead, emit them with
9421         the vtable.
9422         * decl.c (start_function): Likewise.
9423
9424 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
9425
9426         * cp-tree.h (struct lang_type): Add com_interface.
9427         (CLASSTYPE_COM_INTERFACE): New macro.
9428         * class.c (set_rtti_entry): COM interface classes have no RTTI
9429         entries in their vtables; adjust.
9430         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
9431         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
9432         finish_struct_1): Likewise.
9433         * decl2.c (mark_vtable_entries): Likewise.
9434         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
9435         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
9436         expand_upcast_fixups): Likewise.
9437         * tree.c (debug_binfo): Likewise.
9438
9439         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
9440         * typeck.c (comptypes): If we get it, ignore attributes.
9441         * class.c (instantiate_type): Use BASELINK_P.  Change complain
9442         parameter to flags; 2 means ignore attributes.
9443         * call.c (build_op_delete_call): Pass it.
9444
9445         * decl.c (xref_tag): Only complain once about using a typedef-name
9446         with 'struct'.  Downgrade to pedwarn.
9447
9448         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
9449
9450         * parse.y (absdcl_intern): New nonterminal.
9451         (absdcl, direct_abstract_declarator): Use it.
9452
9453         * pt.c (lookup_template_class): Look through implict typename.
9454
9455 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
9456
9457         * friend.c (add_friend): Deal gracefully with error_mark_node.
9458         * method.c (build_overload_value): Handle pointers-to-members as
9459         template parameters.
9460
9461         * decl.c (push_binding): Fix typo in comment.
9462
9463 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
9464
9465         * error.c (dump_type_real): If a typename is a template-id, put
9466         out the template arguments.
9467         (dump_expr): Handle TEMPLATE_ID_EXPR.
9468         * pt.c (lookup_template_class): Now that full arguments are
9469         available everywhere, remove code that tried to guess them.
9470
9471 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
9472
9473         * decl.c (make_typename_type): Complain if we don't find a type
9474         when trying to make a typename type for a non-template type.
9475
9476 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
9477
9478         * decl.c (start_decl): Pass attributes to grokdeclarator.
9479         (grokdeclarator): Handle attributes on constructor-syntax
9480         initializers.
9481
9482 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
9483
9484         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
9485         don't have types.
9486
9487         * search.c (template_self_reference_p): Tweak.
9488
9489 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
9490
9491         * init.c (build_offset_ref): Don't build yet another weird data
9492         structure to describe overloaded functions.
9493
9494 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
9495
9496         * cp-tree.h (BASELINK_P): New macro.
9497         (SET_BASELINK_P): Likewise.
9498         * init.c (build_member_call): Remove needless assignment in if
9499         statement.
9500         * search.c (lookup_field_r): Fix handling when we are looking
9501         specifically for a type; these are not hidden by functions and
9502         variables.
9503         (lookup_member): Use SET_BASELINK_P.
9504         * tree.c (is_overloaded_fn): Use BASELINK_P.
9505         (really_overloaed_fn): Likewise.
9506         (get_first_fn): Likewise.
9507
9508 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
9509
9510         * decl.c (lookup_name_current_level): Tweak, and improve
9511         documentation.
9512
9513         * class.c (maybe_fixup_vptrs): Remove declaration.
9514         (build_class_init_list): Likewise.
9515         * decl.c (pushdecl_class_level): Call check_template_shadow here
9516         ...
9517         (push_class_level_binding): ... not here.
9518         * search.c (dfs_push_type_decls): Only avoid
9519         template-self-reference TYPE_DECLs if they are from base classes.
9520
9521 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
9522
9523         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
9524         nodes.  Tidy.
9525
9526 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
9527
9528         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
9529         (finish_struct_1): Don't call build_class_init_list.
9530
9531 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
9532
9533         * tinfo.h (__class_type_info): Fix illegal declaration.
9534
9535         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
9536         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
9537         (IDENTIFIER_CLASS_VALUE): Improve documentation.
9538         (is_properly_derived_from): Declare.
9539         (invalidate_class_lookup_cache): Likewise.
9540         (maybe_maybe_note_name_used_in_class): Likewise.
9541         (note_name_declared_in_class): Likewise.
9542         (push_using_decl): Remove duplicate declaration.
9543         (id_in_current_class): Remove declaration.
9544         (push_class_binding): Change prototype.
9545         (clear_identitifer_class_values): Declare.
9546         * call.c (is_properly_derived_from): Make it global.
9547         (build_new_function_call): Be careful about updating candidates.
9548         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
9549         asked to make illegal calls.
9550         * class.c: Include splay-tree.h.
9551         (class_stack_node): Add names_used slot.
9552         (check_member_decl_is_same_in_complete_scope): Remove.
9553         (add_method): Fix comment.  Push the declaration into class
9554         scope.
9555         (finish_struct_1): When popping the class, pop the bindings too.
9556         Remove check for data member/function member conflict.
9557         (finish_struct): Remove calls to
9558         check_member_decl_is_same_in_complete_scope.  Change calls to
9559         popclass.
9560         (pushclass): Clear names_used in the class stack entry.
9561         Use invalidate_class_lookup_cache to remove cached entries, rather
9562         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
9563         before entering a new class.  Remove dead code.  Don't mess with
9564         current_function_decl when pushing declarations.
9565         (invalidate_class_lookup_cache): New function, split out from ...
9566         (popclass): Here.  Clean up names_used on our way out.
9567         (instantiate_type): Adjust.
9568         (build_self_reference): Don't push the declaration here.
9569         (maybe_note_name_used_in_class): New function.
9570         (note_name_declared_in_class): Likewise.
9571         * decl.c (add_binding): Change prototype.
9572         (find_class_binding_level): New function.
9573         (innermost_nonclass_level): Likewise.
9574         (current_binding_level): Update documentation.
9575         (inner_binding_level): Remove.  Replace with current_binding_level
9576         throughout.
9577         (push_binding_level): Remove special handling of
9578         class_binding_level.
9579         (pop_binding_level): Likewise.  Use find_class_binding_level.
9580         (suspend_binding_level): Likewise.
9581         (global_bindings_p): Use innermost_nonclass_level.
9582         (toplevel_bindings_p): Likewise.
9583         (namespace_bindings_p): Likewise.
9584         (pseudo_global_level_p): Likewise.
9585         (push_binding): Clear INHERITED_VALUE_BINDING_P.
9586         (add_binding): Check for illegal multiple declarations.  Return a
9587         value indicating whether or not the new binding was legal.
9588         (push_local_binding): Skip over class binding levels.  Check
9589         return value from add_binding.
9590         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
9591         note_name_declared_in_class.
9592         (pushlevel_class): Remove "fake out the rest of the compiler"
9593         code.
9594         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
9595         (clear_identifier_class_values): New function.
9596         (pop_from_top_level): Use it.
9597         (pop_everything): Tweak.
9598         (maybe_process_template_type_declaration): Don't push the
9599         declaration for the template here.
9600         (pushtag): Don't push tag declarations into class scope here.
9601         (pushdecl): Apply DeMorgan's law for readability.
9602         (pushdecl_class_level): Remove special-case code for
9603         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
9604         (push_class_level_bindng): Deal with inherited bindings.
9605         (lookup_name_real): Remove special-case code for
9606         TYPE_BEING_DEFINED, and some implicit typename magic.
9607         (grokdeclarator): Handle COMPONENT_REF for a template function.
9608         (build_enumerator): Don't call pushdecl_class_level here.
9609         (id_in_current_class): Remove.
9610         * decl2.c (grokfield): Don't call pushdecl_class_level or
9611         check_template_shadow.
9612         * errfn.c (cp_file_of): Don't declare.
9613         (cp_line_of): Likewise.
9614         * error.c (dump_decl): Handle an OVERLOAD.
9615         (cp_file_of): Likewise.
9616         (cp_line_of): Likewise.
9617         * init.c (build_member_call): Handle a COMPONENT_REF.
9618         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
9619         pushdecl_class_level.
9620         * method.c (hack_identifier): Build COMPONENT_REFs for references
9621         to member templates as well as member functions.  Remove dead
9622         code.
9623         * parse.y (left_curly): Remove.
9624         (nonnested_type): Call maybe_note_name_used_in_class, not
9625         pushdecl_class_level.
9626         * parse.c: Regenerated.
9627         (nested_name_specifier_1): Likewise.
9628         * pt.c (check_explicit_specialization): Adjust, for robustness.
9629         (check_template_shadow): Handle OVERLOADs.
9630         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
9631         TEMPLATE_DECL, if appropriate.
9632         * search.c (envelope_add_decl): Remove.
9633         (dfs_pushdecls): Likewise.
9634         (dfs_compress_decls): Likewise.
9635         (dfs_push_decls): New function.
9636         (dfs_push_type_decls): Likewise.
9637         (setup_class_bindings): Likewise.
9638         (template_self_reference_p): Likewise.
9639         (lookup_field_r): Use it.
9640         (looup_member): Remove old comment.  Deal with ambiguity.
9641         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
9642         and remove envelope processing.
9643         * semantics.c (begin_class_definition): Let pushclass push
9644         declarations for base classes.
9645         (finish_member_declaration): Push declarations into class scope.
9646         * typeck.c (build_component_ref): Just put an OVERLOAD into the
9647         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
9648         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
9649         * Makefile.in (class.o): Depend on splay-tree.h.
9650
9651 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
9652
9653         * cvt.c (convert_pointer_to_real): Use same_type_p.
9654         * typeck.c (comp_target_types): Use same_type_p.
9655
9656 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
9657
9658         * semantics.c (begin_inline_definitions,
9659         finish_inline_definitions): Rename from finish_default_args and
9660         begin_inline_definitions, respectively, to something that isn't a
9661         total lie.  :)
9662         * parse.y (structsp): Adjust.
9663
9664         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
9665         (list_hash_lookup): Likewise.
9666         (hash_tree_chain): Adjust.
9667         * pt.c (tsubst): Adjust.
9668         (tsubst_arg_types): Use plain hash_tree_cons.
9669         * cp-tree.h (hash_tree_cons_simple): Lose.
9670         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
9671
9672 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9673
9674         * Makefile.in (hash.h): Generate using gperf language 'C', not
9675         'KR-C', so gperf uses the `const' keyword on strings.
9676
9677         * gxx.gperf (resword): Const-ify a char*.
9678
9679 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
9680
9681         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
9682         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
9683         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
9684         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
9685         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
9686         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
9687         tree.c: Adjust.
9688
9689 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
9690
9691         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
9692
9693 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
9694
9695         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
9696
9697 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
9698
9699         * cp-tree.h (add_friend): Declare.
9700         (add_friends): Likewise.
9701         * friend.c (add_friend): Make it global.  Don't add to
9702         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
9703         (add_friends): Make it global.
9704         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
9705         befriending class is a template.
9706         * parse.y (component_decl_1): Fix typo in comment.
9707         * parse.c: Regenerated.
9708         * pt.c (instantiate_class_template): Use add_friend and
9709         add_friends rather that duplicating some of their functionality
9710         here.
9711
9712 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
9713
9714         * call.c (build_field_call): Unify 'this' and non-'this' cases.
9715
9716         * typeck.c (build_indirect_ref): Check for 'this' sooner.
9717
9718 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9719
9720         * call.c (op_error): Const-ify a char*.
9721         (add_candidate, source_type, add_warning): Add static prototype.
9722         (print_z_candidates): Const-ify a char*.
9723
9724         * class.c (resolve_address_of_overloaded_function,
9725         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
9726         (get_vtable_name, finish_struct_1): Const-ify a char*.
9727
9728         * cvt.c (convert_to_reference): Likewise.
9729
9730         * decl.c (redeclaration_error_message, record_builtin_type,
9731         record_unknown_type, member_function_or_else, bad_specifiers):
9732         Likewise.
9733         (find_binding, select_decl, unqualified_namespace_lookup,
9734         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
9735         Add static prototype.
9736         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
9737         implicitly_declare, record_builtin_java_type, define_function,
9738         grok_op_properties, tag_name): Const-ify a char*.
9739
9740         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
9741         (define_function, finish_builtin_type): Const-ify a char*.
9742         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
9743         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
9744         (file_name_nondirectory): Const-ify a char*.
9745         (init_filename_times): Don't prototype.
9746         (compiler_error): Prototype.
9747         (yyerror, init_repo): Const-ify a char*.
9748         (build_srcloc): Don't prototype.
9749         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
9750         Const-ify a char*.
9751         (warn_for_assignment): Don't prototype.
9752         (convert_for_initialization, readonly_error, check_for_new_type,
9753         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
9754         Const-ify a char*.
9755
9756         * decl2.c (acceptable_java_type, output_vtable_inherit,
9757         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
9758         merge_functions, decl_namespace, validate_nonmember_using_decl,
9759         do_nonmember_using_decl): Add static prototype.
9760         (lang_f_options): Const-ify a char*.
9761         (finish_builtin_type): Likewise.
9762         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
9763         prototype.
9764
9765         * errfn.c: Include cp-tree.h.
9766         (cp_thing): Add static prototype.
9767         (compiler_error): Don't protoptype.
9768         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
9769         passing it to `cp_thing'.
9770
9771         * error.c (interesting_scope_p): Add static prototype.
9772
9773         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
9774         a char*.
9775
9776         * init.c (compiler_error): Don't prototype.
9777         (member_init_ok_or_else): Const-ify a char*.
9778         (build_java_class_ref): Add static prototype.
9779
9780         * lex.c (compiler_error): Don't prototype.
9781         (get_time_identifier, interface_strcmp, extend_token_buffer,
9782         handle_cp_pragma): Const-ify a char*.
9783         (is_global, init_filename_times): Add static prototype.
9784         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
9785         (compiler_error): Change from fixed args to variable args.
9786         (yyerror): Const-ify a char*.
9787
9788         * parse.y (cond_stmt_keyword): Const-ify a char*.
9789         (parse_decl): Add static prototype.
9790
9791         * pt.c (template_args_equal, print_template_context): Likewise.
9792         (print_candidates, check_default_tmpl_args): Const-ify a char*.
9793         (instantiate_class_template): Likewise.
9794
9795         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
9796
9797         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
9798         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
9799
9800         * search.c (lookup_field_info, lookup_member): Likewise.
9801         (lookup_member): Cast the first argument of `bzero' to a PTR.
9802
9803         * sig.c (compiler_error): Don't prototype.
9804         (build_signature_pointer_or_reference_nam): Const-ify a char*.
9805         (get_sigtable_name, build_member_function_pointer): Likewise.
9806
9807         * tree.c (compiler_error): Don't prototype.
9808         (no_linkage_helper, build_srcloc): Add static prototype.
9809         (build_vbase_pointer_fields): Const-ify a char*.
9810         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
9811
9812         * typeck.c (compiler_error): Don't prototype.
9813         (convert_for_assignment): Const-ify a char*.
9814         (comp_cv_target_types): Add static prototype.
9815         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
9816         build_component_addr, build_unary_op, convert_for_initialization):
9817         Const-ify a char*.
9818
9819         * typeck2.c (ack): Add static prototype and change from fixed args
9820         to variable args.
9821         (readonly_error, check_for_new_type): Const-ify a char*.
9822
9823         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
9824         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
9825         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
9826         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
9827         gen_assign, GNU_xref_member): Const-ify a char*.
9828
9829 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9830
9831         * gxxint.texi: Remove old discussion on copying virtual bases.
9832
9833 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
9834
9835         * Make-lang.in: Remove all references to g++.o/g++.c.
9836         Link g++ from gcc.o.
9837
9838 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
9839
9840         * decl2.c (comdat_linkage): Treat vtables like functions.
9841
9842 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
9843
9844         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
9845
9846 1999-03-25  Nathan Sidwell  <nathan@acm.org>
9847
9848         * decl.c (init_decl_processing): Add `signed' type as a synonym
9849         for `int'.
9850
9851 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
9852
9853         * typeck.c (common_type): Handle cv-qual unification for pointers
9854         to members.
9855
9856         * decl.c (unqualified_namespace_lookup): Return error_mark_node
9857         on error.
9858         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
9859         * lex.c (do_identifier): If we got error_mark_node, call
9860         lookup_name again.
9861
9862 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9863
9864         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
9865         classes.
9866
9867 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
9868
9869         * decl.c (lookup_name_real): Do nested field lookup regardless of
9870         TYPE_BEING_DEFINED.
9871
9872 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
9873
9874         * cp-tree.h (lang_type): Remove has_assignment and
9875         has_real_assignment.  Add befriending_classes.
9876         (TYPE_HAS_ASSIGNMENT): Remove.
9877         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
9878         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
9879         (lang_decl): Document.
9880         (DECL_BEFRIENDING_CLASSES): New macro.
9881         (FRIEND_NAME): Move declaration to more obvious location.
9882         (FRIEND_DECLS): Likewise.
9883         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
9884         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
9885         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
9886         (grok_op_properties): Likewise.
9887         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
9888         (add_friend): Likewise.  Don't do weird things with assignment
9889         operators.  Update DECL_BEFRIENDING_CLASSES.
9890         (add_friends): Don't do weird things with assignment operators.
9891         (make_friend_class): Likewise.  Update
9892         CLASSTYPE_BEFRIENDING_CLASSES.
9893         * pt.c (instantiate_class_template): Don't set
9894         TYPE_HAS_ASSIGNMENT.
9895         (tsubst_copy): Substitute the TREE_TYPE for more unary
9896         expressions.
9897         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
9898         * search.c (protected_accessible_p): New function.
9899         (friend_accessible_p): Likewise.
9900         (accessible_p): Use them.
9901
9902 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
9903
9904         * pt.c (convert_nontype_argument): Don't create things that aren't
9905         PTRMEM_CSTs when applying a qualification conversion to a
9906         PTRMEM_CST.
9907
9908 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
9909
9910         * Makefile.in (OBJS): Don't mention hash.o.
9911         (OBJDEPS): Likewise.
9912
9913 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
9914
9915         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
9916         * decl.c (expand_static_init): Make sure we don't add any after
9917         then.
9918
9919         * decl.c (cp_finish_decl): Move intelligence about handling
9920         DECL_COMDAT for variables from here...
9921         * decl2.c (comdat_linkage): ...to here.
9922         (maybe_make_one_only): Tweak.
9923         (import_export_decl): Call comdat_linkage for variables, too.
9924         (finish_file): Handle template statics properly.
9925
9926 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
9927
9928         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
9929         Document internals of pointer-to-member-functions.
9930         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
9931         (PFN_FROM_PTRMEMFUNC): Likewise.
9932         (build_type_conversion): Remove unused parameter.
9933         (build_ptrmemfunc1): Declare.
9934         (expand_ptrmemfunc_cst): New function.
9935         (delta2_from_ptrmemfunc): Likewise.
9936         (pfn_from_ptrmemfunc): Likewise.
9937         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
9938         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
9939         (convert_to_reference): Remove unused parameter to
9940         build_type_conversion.
9941         (ocp_convert): Likewise.
9942         (build_user_type_conversion): Likewise.
9943         * error.c (dump_expr): Handle NULL pointer-to-member functions.
9944         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
9945         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
9946         open when handling pointer-to-member functions.
9947         * pt.c (convert_nontype_argument): Clean up error messages.  Be
9948         more stringent with pointers-to-members.
9949         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
9950         (build_unary_op): Tidy ever-so-slightly.
9951         (build_conditional_expr): Remove extra parameter to
9952         build_type_conversion.
9953         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
9954         we're using.
9955         (expand_ptrmemfunc_cst): Define.
9956         (delta2_from_ptrmemfunc): Likewise.
9957         (pfn_from_ptrmemfunc): Likewise.
9958
9959 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
9960
9961         * init.c (build_member_call): Handle template-id expressions
9962         correctly.
9963         * typeck.c (build_x_function_call): Likewise.
9964
9965 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
9966
9967         * friend.c (make_friend_class): Avoid core dump when
9968         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
9969
9970 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
9971
9972         * decl.c (start_function): Suppress normal linkage heuristics
9973         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
9974
9975 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
9976
9977         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
9978         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
9979
9980 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9981
9982         * parse.y (named_complex_class_head_sans_basetype):
9983         Do not push a scope for error_mark_node.
9984         (maybe_base_class_list): Likewise.
9985
9986         * decl.c (start_decl): Check for error_mark_node as a type.
9987         Detected by g++.brendan/array-refs.C.
9988         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
9989         (maybe_build_cleanup_1): Likewise.  Detected by
9990         g++.jason/incomplete1.C.
9991
9992         * tree.c (build_dummy_object): Use void_zero_node instead of the
9993         error_mark_node.
9994         (is_dummy_object): Check for such a node.
9995         Detected by g++.bob/inherit1.C
9996
9997 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
9998
9999         * method.c (old_backref_index): Split out...
10000         (flush_repeats): From here.  Rename back from try_old_backref.
10001         (build_mangled_name): Put back some old-style repeat handling.
10002
10003 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10004
10005         * lex.c: Don't include setjmp.h.
10006         (parse_float): New static function.
10007         (pf_args): New struct.
10008         (real_yylex): Use them in call to `do_float_handler'.
10009
10010 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
10011
10012         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
10013         * tree.c (layout_basetypes): Not here.
10014         * search.c (dfs_search): Remove; no longer used.
10015
10016 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
10017
10018         * decl2.c (validate_nonmember_using_decl): Issue sensible
10019         error-messages on bogus qualifiers.
10020
10021 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
10022
10023         * call.c (add_function_candidate): Fix uninitialized variable.
10024
10025         * Makefile.in (search.o): Add dependency on varray.h.
10026
10027 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
10028
10029         * decl.c (duplicate_decls): Use same_type_p.
10030         * method.c (try_old_backref): Renamed from flush_repeats.  Use
10031         same_type_p.  Don't try to handle repeats.  Return success.
10032         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
10033         calls from old-style code, too.
10034         (check_ktype): Use same_type_p.
10035         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
10036         (build_qualified_name): Simplify logic.
10037         (process_overload_item): Strip typedefs and quals at the top.
10038         (build_mangled_name_for_type_with_Gcode): Remove call to
10039         type_canonical_variant.
10040         (build_mangled_name): Likewise.  Remove support for old-style
10041         repeats, which have been disabled since 2.7.2.  Don't mess with
10042         TREE_USED.
10043         (build_decl_overload_real): Don't mess with TREE_USED.
10044
10045 1999-03-13  Nathan Sidwell  <nathan@acm.org>
10046
10047         * error.c (cp_printers): Add 'F' escape character.
10048         (dump_type_real): Remove TREE_LIST (fnargs) printing.
10049         Functionality moved to dump_parameters.
10050         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
10051         (dump_function_decl): Extend meaning of V parameter.  Use
10052         dump_parameters and dump_exception_spec.
10053         (dump_parameters): New static function.
10054         (dump_exception_spec): New static function.
10055         (fndecl_as_string): Change argument semantics.  Use
10056         dump_function_decl directly.
10057
10058         * sig.c (build_signature_table_constructor): Use cp_error.
10059
10060 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10061
10062         * semantics.c (finish_switch_cond): Handle error cases gracefully.
10063         Detected by g++.law/enum5.C.
10064
10065         * typeck.c (build_modify_expr): Check for errors after resolving
10066         offsets.  Detected by g++.brendan/static1.C.
10067
10068         * decl.c (complete_array_type): Ignore initial_value if it is an
10069         error.  Detected by g++.benjamin/17930.C.
10070
10071         * typeck2.c (process_init_constructor): Return error if one argument
10072         is in error.  Detected by g++.benjamin/13478.C.
10073
10074 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10075
10076         * decl.c (select_decl): Allow class templates when we need types.
10077         * decl2.c (ambiguous_decl): Likewise.
10078
10079 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
10080
10081         * lex.c (do_identifier): Correct call to enforce_access.
10082         * search.c (accessible_p): Tweak comment.
10083
10084 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
10085
10086         * semantics.c (begin_class_definition): Call build_self_reference.
10087         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
10088
10089         * search.c (assert_canonical_unmarked): Fix typo in prototype.
10090
10091         * search.c (dfs_canonical_queue): New function.
10092         (dfs_assert_unmarked_p): Likewise.
10093         (assert_canonical_unmarked): Likewise.
10094         (access_in_type): Use it.
10095         (accessible_p): Likewise.  Walk the whole tree when umarking.
10096
10097         * sig.c (build_signature_table_constructor): Use accessible_p
10098         instead of compute_access.
10099
10100 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
10101
10102         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
10103
10104 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
10105
10106         * cp-tree.h (flag_access_control): Declare.
10107         (TREE_VIA_PPUBLIC): Document.
10108         (DECL_NONSTATIC_MEMBER_P): New macro.
10109         (enforce_access): Return an indication of whether or not access
10110         was permitted.
10111         (build_self_reference): Change prototype.
10112         (compute_access): Replace with ...
10113         (accessible_p): New function.
10114         (dfs_walk): Change prototype.
10115         (dfs_unmark): Likewise.
10116         (markedp): Likewise.
10117         * call.c (enforce_access): Use accessible_p.
10118         * class.c (build_self_reference): Insert the declaration into the
10119         list of members for this type, and make it public.
10120         * decl.c (xref_basetypes): Avoid ill-timed recursion.
10121         * init.c (build_offset_ref): Use lookup_member, not three separate
10122         name-lookups.  Call enforce_access rather than checking for
10123         illegal accesses here.
10124         (resolve_offset_ref): Likewise.
10125         * lex.c (do_identifier): Likewise.
10126         * method.c (hack_identifier): Likewise.
10127         * parse.y (self_reference): Remove.
10128         (opt_component_decl_list): Don't use it.
10129         * parse.c: Regenerated.
10130         * pt.c (print_candidates): Generalize to handle lists of
10131         overloaded functions.
10132         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
10133         not set.
10134         (get_template_base): Use new calling convention for dfs_walk.
10135         * search.c: Include varray.h.  Add prototypes.
10136         (dfs_walk): Accept a data pointer to pass to the work functions.
10137         All callers changed.  All work functions changed.
10138         (breadth_first_search): Rename to bfs_walk, and make consistent
10139         with dfs_walk.
10140         (dfs_walk_real): New function.
10141         (canonical_binfo): New function.
10142         (context_for_name_lookup): Likewise.
10143         (shared_marked_p): Likewise.
10144         (shared_unmarked_p): Likewise.
10145         (lokup_field_queue_p): Likewise.
10146         (lookup_field_r): Generalize to handle both functions and fields.
10147         (lookup_field): Just call lookup_member.
10148         (lookup_fnfields): Likewise.
10149         (lookup_member): Move body of lookup_field here and generalize.
10150         (dfs_accessible_queue_p): Likewise.
10151         (dfs_accessible_p): Likewise.
10152         (dfs_access_in_type): Likewise.
10153         (access_in_type): Likewise.
10154         (compute_access): Remove, and replace with ...
10155         (accessible_p): New function.
10156         (vbase_types): Remove.
10157         (vbase_decl_ptr_intermediate): Likewise.
10158         (vbase_decl_ptr): Likewise.
10159         (vbase_init_result): Likewise.
10160         (closed_envelopes): Likewise.
10161         (bvtable): Likewise.
10162
10163 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
10164
10165         * call.c (add_function_candidate): Check for proper number of args
10166         before checking the validity of those args.
10167
10168 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
10169
10170         * cp-tree.h (struct lang_type): Add anon_union field.
10171         (ANON_UNION_TYPE_P): Use it instead of examining type.
10172         (SET_ANON_UNION_TYPE_P): New macro.
10173         * decl.c (check_tag_decl): Use it.
10174
10175         * search.c (compute_access): Handle non-type contexts earlier, and
10176         handle NULL_TREE.
10177
10178         * tree.c (build_exception_variant): Use copy_to_permanent.
10179
10180         * decl2.c (setup_initp): Give statics with no priority the default
10181         priority here.
10182         (do_dtors, do_ctors, finish_file): Remove special handling of
10183         non-prioritized statics.
10184
10185 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
10186
10187         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
10188         * decl.c (make_typename_type): Don't issue an error if an
10189         immediate lookup fails; it migt be resolved later.
10190         * friend.c (is_friend): Add comment.
10191         * search.c (breadth_first_search): Add POSTFN and DATA
10192         parameters.  Tidy.  All callers changed.
10193         (lookup_field_queue_p): New function.
10194         (lookup_field_r): Likewise.
10195         (lookup_field_post): Likewise.
10196         (lookup_field): Use them, via breadth_first_search, instead of
10197         duplicating logic.
10198         (compute_access): Robustify.
10199         (lookup_fnfield_info): New structure.
10200
10201 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
10202
10203         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
10204
10205 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
10206
10207         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
10208         cc happy.
10209
10210         * decl2.c (import_export_class): Also return if
10211         CLASSTYPE_INTERFACE_ONLY is set.
10212
10213 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10214
10215         * decl.c (push_overloaded_decl): Only overwrite the old binding if
10216         there was one.
10217         * decl2.c (do_local_using_decl): Fix loop termination.
10218
10219 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
10220
10221         * cp-tree.h (determine_specialization): Don't declare.
10222         * pt.c (determine_specialization): Make it static.  Eliminate
10223         complain parameter.  Note that decl is always non-NULL now, and
10224         simplify accordingly.
10225
10226         * decl.c (maybe_push_to_top_level): Always call
10227         push_cp_function_context.
10228         (pop_from_top_level): Always call pop_cp_function_context.
10229
10230 1999-02-26  Nathan Sidwell  <nathan@acm.org>
10231
10232         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
10233         diagnostics.
10234         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
10235         * init.c (build_new_1): Extra arg to complete_type_or_else.
10236         (build_delete): Likewise.
10237         * typeck.c (require_complete_type): Likewise.
10238         (pointer_int_sum): Likewise.
10239         (pointer_diff): Likewise.
10240         (build_component_ref): Likewise.
10241
10242         * typeck2.c (incomplete_type_error): Always use cp_error.
10243         Show declaration of undefined type, if appropriate.
10244         Deal with UNKNOWN_TYPE nodes.
10245
10246         * typeck.c (require_complete_type): Use TYPE_SIZE as
10247         size_zero_node to mean incomplete type.
10248         (require_complete_type_in_void): New function.
10249         (build_compound_expr): Call complete_type_in_void for LHS.
10250         (build_c_cast): Call complete_type_in_void for void cast.
10251         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
10252         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
10253         require_complete_type_in_void.  Call it.
10254         * cp-tree.h (require_complete_type_in_void): Prototype new function.
10255
10256         * typeck.c (convert_arguments): Use alternative format for
10257         function decls.  Don't require_complete_type here.  Simplify
10258         diagnostic printing.
10259         (convert_for_initialization): Don't require_complete_type on RHS yet.
10260         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
10261
10262         * call.c (build_over_call): Cope with qualified void return type.
10263         * semantics.c (finish_call_expr): Likewise.
10264         * typeck.c (build_function_call_real): Likewise.
10265         (c_expand_return): Likewise.
10266         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
10267
10268         * call.c (print_z_candidates): Use alternate print format, to be
10269         consistent with (pt.c) print_candidates.
10270         * method.c (hack_identifier): List candidate members.
10271         * search.c (lookup_field): Build ambiguous list, and show it, if
10272         ambiguous.
10273
10274 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
10275
10276         * typeck.c (decay_conversion): Don't confuse constant array
10277         variables with their initializers.
10278
10279         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
10280         merging decls.
10281         * pt.c (regenerate_decl_from_template): Tweak for clarity.
10282         (instantiate_decl): Mark a decl instantiated before regenerating
10283         it to avoid recursion.
10284         * tree.c (mapcar): Don't call decl_constant_value unless we know
10285         something is TREE_READONLY_DECL_P.
10286
10287         * class.c (check_for_override): Don't stop checking when we find
10288         the first overridden function.  Delete #if 0'd code.
10289         * search.c (get_matching_virtual): Likewise.
10290
10291 1999-02-25  Richard Henderson  <rth@cygnus.com>
10292
10293         * lang-specs.h: Define __FAST_MATH__ when appropriate.
10294
10295 1999-02-24  Mike Stump  <mrs@wrs.com>
10296
10297         * typeck.c (convert_for_assignment): Allow boolean integral constant
10298         expressions to convert to null pointer.
10299
10300 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10301
10302         * decl.c (lookup_namespace_name): Resolve namespace aliases.
10303
10304         * class.c (push_nested_class): Allow namespaces.
10305
10306         * decl2.c (set_decl_namespace): Add friendp parameter.
10307         * decl.c (grokfndecl): Pass it.
10308         (grokvardecl): Likewise.
10309         * cp-tree.h: Change declaration.
10310
10311 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
10312
10313         * pt.c (tsubst): Allow an array of explicit size zero.
10314
10315 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
10316
10317         * errfn.c: Change varargs code to look like toplev.c.
10318
10319         * method.c (process_modifiers): Don't prepend 'U' for char or
10320         wchar_t.
10321
10322 1999-02-20  Craig Burley  <craig@jcb-sc.com>
10323
10324         * Make-lang.in (cplib2.ready): Don't consider updating
10325         cplib2 stuff if the current directory isn't writable, as
10326         it won't work (such as during a `make install').
10327
10328 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
10329
10330         * decl2.c (start_objects): Make file scope constructors and
10331         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
10332         ASM_OUTPUT_DESTRUCTOR are defined.
10333
10334 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
10335
10336         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
10337         (fn_type_unification): Adjust prototype.
10338         (lookup_fnfields_1): Declare.
10339         * call.c (add_template_candidate_real): Adjust call to
10340         fn_type_unification.
10341         * class.c (add_method): Don't allow duplicate declarations of
10342         constructors or destructors.
10343         (resolve_address_of_overloaded_function): Remove unused variable.
10344         Adjust call to fn_type_unification.
10345         * decl.c (grokfndecl): Be more robust in the face of illegal
10346         specializations.
10347         * decl2.c (check_classfn): Remove hokey handling of member
10348         templates.
10349         * pt.c (determine_specialization): Improve comments.  Adjust to
10350         handle template argument deduction as per the standard.
10351         (check_explicit_specialization): Fix comment spacing.  Handle
10352         type-conversion operators correctly.  Improve error-recovery.
10353         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
10354         (get_bindings_real): Simplify handling of static members.
10355         * search.c (lookup_fnfields_1): Make it have external linkage.
10356         * typeck.c (compparms): Fix comment.
10357         (build_unary_op): Don't try to figure out which template
10358         specialization is being referred to when when the address-of
10359         operator is used with a template function.
10360
10361 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10362
10363         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
10364         keyword to match an analogous change at the top level.
10365
10366         * tree.c (lvalue_or_else): Likewise.
10367
10368 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
10369
10370         * decl.c (xref_basetypes): Comment.
10371         * pt.c (instantiate_class_template): Use xref_basetypes.
10372
10373 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
10374
10375         * cp-tree.h (tsubst): Change prototype.
10376         (tsubst_expr): Likewise.
10377         (tsubst_copy): Likewise.
10378         (type_unification): Remove prototype.
10379         * call.c (convert_default_arg): Adjust call to tsubst_expr.
10380         * class.c (resolve_address_of_overloaded_function): Just use
10381         fn_type_unification.
10382         * decl.c (grokdeclarator): Adjust call to tsubst.
10383         * method.c (build_template_parm_names): Likewise.
10384         * pt.c (GTB_VIA_VIRTUAL): New macro.
10385         (GTB_IGNORE_TYPE): Likewise.
10386         (resolve_overloaded_unification): Add `complain' parameter.
10387         (try_one_overload): Likewise.
10388         (tsubst_template_arg_vector): Likewise.
10389         (tsubst_template_parms): Likewise.
10390         (tsubst_aggr_type): Likewise.
10391         (tsubst_arg_types): Likewise.
10392         (tsubst_call_declarator_parms): Likewise.
10393         (unify): Remove explicit_mask.
10394         (type_unification_real): Likewise.
10395         (get_template_base_recursive): Likewise.
10396         (coerce_template_template_parms): Provide prototype.
10397         (tsubst_function_type): Likewise.
10398         (try_class_unification): New function.
10399         All callers changed to use new complain parameter.
10400         (get_template_base): Use try_class_unification.
10401         (unify): Adjust handling of classes derived from template types.
10402         (fn_type_unification): Substitute explicit arguments before
10403         unification.
10404
10405 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
10406
10407         * decl.c (pushdecl): Remove dead code.
10408
10409 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
10410
10411         * decl2.c (finish_objects): Fix code I missed in previous change.
10412
10413 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
10414
10415         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
10416         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
10417
10418         * pt.c (maybe_process_partial_specialization): Complain about
10419         'template <>' on non-specialization.
10420
10421 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
10422
10423         * decl.c (grokdeclarator): Catch wierd declarators.
10424         * decl2.c (finish_file): Don't abort because of namespace parsing
10425         failure.
10426         (check_decl_namespace): Remove.
10427
10428 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
10429
10430         * cp-tree.h (get_template_base): Don't declare.
10431         (dfs_walk): Declare.
10432         (dfs_unmark): Likewise.
10433         (markedp): Likewise.
10434         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
10435         targs to get_template_base.
10436         (get_template_base_recursive): Move here from search.c.  Check to
10437         see that the base found can be instantiated to form the desired
10438         type.
10439         (get_template_base): Likewise.
10440         (get_class_bindings): Simplify.
10441         * search.c (get_template_base_recursive): Move to pt.c.
10442         (get_template_base): Likewise.
10443         (markedp): Make it global.
10444         (dfs_walk): Likewise.
10445         (dfs_unmark): Likewise.
10446
10447 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
10448
10449         * pt.c (maybe_process_partial_specialization): Complain about
10450         specialization in wrong namespace.
10451         * tree.c (decl_namespace_context): New fn.
10452
10453 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
10454
10455         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
10456         * pt.c (coerce_template_template_parms): Handle nested
10457         template template parameters.
10458
10459 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
10460
10461         * typeck2.c: Update email addresses.
10462
10463 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
10464
10465         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
10466         turned off.
10467
10468 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
10469
10470         * lex.c (retrofit_lang_decl): Split out...
10471         (build_lang_decl): From here.
10472         * decl.c (pushdecl): Call it for functions generated by the middle
10473         end that don't have DECL_LANG_SPECIFIC.
10474         * cp-tree.h: Declare it.
10475
10476         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
10477         (start_objects, finish_objects): Only use special
10478         init_priority code if the user specified a priority.
10479         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
10480         objects.
10481
10482 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
10483
10484         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
10485         mkstemp.o.  Get them from libiberty now.
10486         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
10487
10488 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10489
10490         * decl2.c (lang_decode_option): Use read_integral_parameter.
10491
10492 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
10493
10494         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
10495         before calling complete_type_or_else.
10496
10497 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10498
10499         * input.c (inline): Don't define, its handled by system.h.
10500
10501 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
10502
10503         * decl2.c: Don't define flag_no_ident here.  Don't process
10504         -f(no-)ident here.
10505         * cp-tree.h: Don't declare flag_no_ident here.
10506         * lang-specs.h: Map -Qn to -fno-ident.
10507
10508 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
10509
10510         * cp-tree.h (struct tree_binding): Replace scope field with a union.
10511         (BINDING_SCOPE): Adjust.
10512         * decl.c (BINDING_LEVEL): Adjust.
10513
10514 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
10515
10516         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
10517         member constants.
10518
10519         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
10520         a ctor initializer.
10521
10522         * tree.c (equal_functions): Fix name in prototype.
10523
10524         * decl.c (push_local_binding): Add FLAGS argument.
10525         (pushdecl, push_overloaded_decl): Pass it.
10526         * decl2.c (do_local_using_decl): Likewise.
10527         * cp-tree.h: Adjust prototype.
10528         * decl.c (poplevel): Fix logic.
10529
10530         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
10531         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
10532         (cat_namespace_levels): Don't loop forever.
10533
10534 1999-01-25  Richard Henderson  <rth@cygnus.com>
10535
10536         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
10537
10538 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
10539
10540         * class.c (resolve_address_of_overloaded_function): Mark the
10541         chosen function used.
10542
10543         * call.c (build_call): Make sure that a function coming in has
10544         been marked used already.
10545         * decl.c (expand_static_init): Call mark_used instead of
10546         assemble_external.
10547         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
10548         alloc_eh_object, expand_throw): Likewise.
10549         * init.c (build_builtin_delete_call): Likewise.
10550         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
10551         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
10552         expand_generic_desc): Likewise.
10553
10554 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10555
10556         * tree.c (equal_functions): New function.
10557         (ovl_member): Call it.
10558
10559 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
10560
10561         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
10562
10563 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10564
10565         * decl.c (decls_match): Return 1 if old and new are identical.
10566         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
10567
10568 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
10569
10570         * decl.c (start_function): Make member functions one_only on windows.
10571         * decl2.c (import_export_decl): Likewise.
10572
10573         * decl.c (grokdeclarator): Don't complain about implicit int in
10574         a system header.  Change same-name field check to not complain in
10575         a system header instead of within extern "C".
10576
10577 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
10578
10579         * cp-tree.h (PUSH_GLOBAL): New macro.
10580         (PUSH_LOCAL): Likewise.
10581         (PUSH_USING): Likewise.
10582         (namespace_bindings_p): Declare.
10583         (push_overloaded_decl): Likewise.
10584         * decl.c (push_overloaded_decl): Don't make it static.  Check for
10585         illegal declarations after using declarations here.
10586         (namespace_bindings_p): Likewise.
10587         (duplicate_decls): Don't consider declarations from different
10588         namespaces to be the same.
10589         (pushdecl): Use symbolic PUSH_ constants in calls to
10590         push_overloaded_decl.
10591         (push_overloaded_decl_1): Likewise.
10592         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
10593         (do_nonmember_using_decl): Check for illegal using declarations
10594         after ordinary declarations here.
10595         (do_local_using_decl): Call pushdecl to insert declarations.
10596
10597 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
10598
10599         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
10600
10601 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
10602
10603         * tree.c (build_cplus_array_type_1): Don't call build_array_type
10604         for types involving template parameters.
10605
10606         * cp-tree.h (PARM_DECL_EXPR): Delete.
10607         (convert_default_arg): Change prototype.
10608         (check_default_argument): Declare.
10609         (search_tree): Likewise.
10610         * call.c (convert_default_arg): Take the function to which the
10611         default argument belongs as a parameter, and do any necessary
10612         instantiation here, instead of ...
10613         (build_over_call): Here.
10614         * decl.c (local_variable_p): New function.
10615         (check_default_argument): Likewise, split out and tidied from ...
10616         (grokparms): Here.
10617         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
10618         * pt.c (tsubst_call_declarator_parms): New function.
10619         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
10620         with CALL_EXPRs, rather than trying to be clever.
10621         (tsubst): Use tsubst_call_declarator_parms.
10622         * tree.c (search_tree): Don't make it static.
10623         * typeck.c (convert_arguments): Use new interface to
10624         convert_default_arg.
10625
10626 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
10627
10628         * error.c (dump_function_decl): Don't print the argument types for
10629         a function when the verbosity level is negative.
10630
10631         * call.c (build_over_call): Check format attributes at call-time.
10632
10633         * pt.c (tsubst_copy): Fix comment.
10634         (unify): Don't allow unification with variable-sized arrays.
10635
10636         * semantics.c (finish_stmt_expr): When processing a template make
10637         the BIND_EXPR long-lived.
10638
10639 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
10640
10641         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
10642         (import_export_vtable): Not here.
10643
10644 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
10645
10646         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
10647         non-static member function.
10648
10649 1999-01-18  Nathan Sidwell  <nathan@acm.org>
10650
10651         * class.c (instantiate_type): Only diagnose illegal address of member
10652         function if complaining.
10653
10654         * decl.c (lookup_name_real): Remove duplicate code.
10655
10656 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
10657
10658         * tree.c (copy_template_template_parm): Use permanent_obstack.
10659
10660 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
10661
10662         * pt.c (unify): Remove restrictions on deduction of argument
10663         of template template parameters.
10664
10665 1999-01-18  Nathan Sidwell  <nathan@acm.org>
10666
10667         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
10668
10669         * class.c (resolve_address_of_overloaded_function): Show list of
10670         all candidates, when none of them match.
10671
10672 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
10673
10674         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
10675         definition of 'casting away const' in reinterpret_cast<>.
10676
10677 1999-01-18  Graham  <grahams@rcp.co.uk>
10678
10679         * cvt.c: Add include for decl.h, remove extern for
10680         static_aggregates which is now provided by decl.h.
10681
10682         * Makefile.in (cvt.o): Add dependency for decl.h and missing
10683         dependencies for convert.h and flags.h.
10684
10685 1999-01-18  Nathan Sidwell  <nathan@acm.org>
10686
10687         * decl2.c (do_dtors): Set current location to that of the
10688         decl, for sensible diagnostics and debugging.
10689         (check_classfn): Issue `incomplete type' error, if
10690         class is not defined.
10691
10692 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
10693
10694         * cp-tree.h: Add prototype for bound_pmf_p.
10695
10696 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
10697             Manfred Hollstein <manfred@s-direktnet.de>
10698
10699         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
10700         -Wreturn-type.
10701
10702 1999-01-16  Nathan Sidwell  <nathan@acm.org>
10703
10704         * cp-tree.h (struct lang_type): Added has_mutable flag.
10705         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
10706         (TYPE_HAS_MUTABLE_P): New macro to read it.
10707         (cp_has_mutable_p): Prototype for new function.
10708         * class.c (finish_struct_1): Set has_mutable from members.
10709         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
10710         it contains a mutable.
10711         * typeck.c (cp_has_mutable_p): New function.
10712
10713 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
10714
10715         * pt.c (process_template_parm): Ignore top-level qualifiers on
10716         non-type parameters.
10717
10718         * decl.c (start_function): Use current_function_parms in the call
10719         to require_complete_type_for_parms, not the probably empty
10720         DECL_ARGUMENTS.
10721
10722 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
10723
10724         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
10725
10726         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
10727         that we don't suppress the other copies.
10728         * lex.c (handle_cp_pragma): Likewise.
10729
10730 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
10731
10732         * decl.c (grokdeclarator): Undo 1998-12-14 change.
10733         * tree.c (build_cplus_array_type_1): Likewise.
10734         * pt.c (instantiate_class_template): Remove misleading comment.
10735         (tsubst_aggr_type): Substitute if there are template parameters,
10736         regardless of whether or not they use template arguments.
10737         (unify): Likewise, but for unification.
10738
10739 1999-01-12  Richard Henderson  <rth@cygnus.com>
10740
10741         * cp-tree.h (flag_permissive): Declare extern.
10742
10743 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
10744
10745         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
10746         here.
10747         (lang_type): Add is_partial_instantiation.  Decrease width of
10748         dummy.
10749         (PARTIAL_INSTANTIATION_P): New macro.
10750         (OPERATOR_TYPENAME_P): Remove.
10751         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
10752         OPERATOR_TYPENAME_P.
10753         (grok_op_properties): Likewise.
10754         * friend.c (do_friend): Handle friends that are member functions
10755         correctly.
10756         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
10757         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
10758         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
10759         any more partial instantiation than is absolutely necessary for
10760         implicit typename.  Set PARTIAL_INSTANTIATION_P.
10761         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
10762         * semantics.c (begin_class_definition): Handle partial
10763         specializations of a type that was previously partially
10764         instantiated.
10765
10766 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
10767
10768         * g++spec.c (LIBSTDCXX): Provide default definition.
10769         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
10770
10771 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10772
10773         * Make-lang.in (g++.o): Depend on prefix.h.
10774
10775 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
10776
10777         * tree.c (bound_pmf_p): New fn.
10778         * typeck.c (build_c_cast): Use it.
10779
10780         * decl.c (grok_op_properties): Use same_type_p.
10781
10782 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10783
10784         * Makefile.in (cvt.o): Depend on toplev.h.
10785
10786         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
10787
10788         * cvt.c: Include toplev.h.
10789
10790         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
10791         definitions.
10792
10793         * init.c (expand_vec_init): Initialize variable `itype'.
10794
10795         * lex.c (yyerror): Cast the argument passed to a ctype function to
10796         an unsigned char.
10797
10798         * method.c (build_mangled_C9x_name): Wrap prototype and definition
10799         in "HOST_BITS_PER_WIDE_INT >= 64".
10800
10801         * typeck.c (build_binary_op): Mark parameter `convert_p' with
10802         ATTRIBUTE_UNUSED.
10803
10804 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
10805
10806         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
10807         * tree.c (build_exception_variant): Don't crash on empty throw
10808         specs.
10809
10810 1998-12-18  DJ Delorie  <dj@cygnus.com>
10811
10812         * cvt.c (convert_to_reference): Check for both error_mark_node
10813         and NULL_NODE after call to convert_for_initialization.
10814
10815 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
10816
10817         * error.c (interesting_scope_p): New fn.
10818         (dump_simple_decl): Use it.
10819         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
10820         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
10821
10822 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
10823
10824         * class.c (resolve_address_of_overloaded_function): Do conversion
10825         to correct type here, rather than ...
10826         (instantiate_type): Here.
10827
10828         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
10829         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
10830         (decl_template_parm_p): Remove.
10831         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
10832         parameter.
10833         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
10834         * pt.c (push_inline_template_parms_recursive): Set it.
10835         (decl_template_parm_p): Remove.
10836         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
10837         (process_template_parm): Set it.
10838
10839 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
10840
10841         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
10842         if configured with cpplib.
10843
10844 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
10845
10846         * decl.c (poplevel): Make sure ns_binding is initialized.
10847
10848         * decl.c (finish_function): Undo inadvertent change in previous
10849         patch.
10850
10851 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
10852
10853         * class.c (pushclass): Tweak handling of class-level bindings.
10854         (resolve_address_of_overloaded_function): Update pointer-to-member
10855         handling.
10856         (instantiate_type): Likewise.
10857         * cvt.c (cp_convert_to_pointer): Likewise.
10858         * decl.c (pop_binding): Take the DECL to pop, not just the name.
10859         Deal with `struct stat' hack.
10860         (binding_level): Add to documentation.
10861         (push_binding): Clear BINDING_TYPE.
10862         (add_binding): New function.
10863         (push_local_binding): Use it.
10864         (push_class_binding): Likewise.
10865         (poplevel): Adjust calls to pop_binding.
10866         (poplevel_class): Likewise.
10867         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
10868         declarations to current binding level.
10869         (push_class_level_binding): Likewise.
10870         (push_overloaded_decl): Adjust handling of OVERLOADs in local
10871         bindings.
10872         (lookup_namespace_name): Don't crash when confronted with a
10873         TEMPLATE_DECL.
10874         (lookup_name_real): Do `struct stat' hack in local binding
10875         contexts.
10876         (build_ptrmemfunc_type): Adjust documentation.
10877         (grokdeclarator): Don't avoid building real array types when
10878         processing templates unless really necessary.
10879         (finish_method): Adjust calls to pop_binding.
10880         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
10881         not reparse_decl_as_expr.
10882         (build_expr_from_tree): Deal with a template-id as the function to
10883         call in a METHOD_CALL_EXPR.
10884         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
10885         (maybe_adjust_types_For_deduction): Don't do peculiar things with
10886         METHOD_TYPEs here.
10887         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
10888         pointer-to-member types where necessary.
10889         * tree.c (build_cplus_array_type_1): Don't avoid building real
10890         array types when processing templates unless really necessary.
10891         (build_exception_variant): Compare the exception lists correctly.
10892
10893 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
10894
10895         * cp-tree.def (CPLUS_BINDING): Update documentation.
10896         * cp-tree.h (LOCAL_BINDING_P): New macro.
10897         (lang_identifier): Rename local_value to bindings.
10898         (tree_binding): Make `scope' of type `void*', not `tree'.
10899         (BINDING_SCOPE): Update documentation.
10900         (IDENTIFIER_LOCAL_VALUE): Remove.
10901         (IDENTIFIER_CLASS_VALUE): Document.
10902         (IDENTIFIER_BINDING): New macro.
10903         (IDENTIFIER_VALUE): Likewise.
10904         (TIME_IDENTIFIER_TIME): Likewise.
10905         (TIME_IDENTIFIER_FILEINFO): Likewise.
10906         (IMPLICIT_TYPENAME_P): Likewise.
10907         (set_identifier_local_value): Remove.
10908         (push_local_binding): New function.
10909         (push_class_binding): Likewise.
10910         * class.c (pushclass): Update comments; use push_class_binding.
10911         * decl.c (set_identifier_local_value_with_scope): Remove.
10912         (set_identifier_local_value): Likewise.
10913         (push_binding): New function.
10914         (pop_binding): Likewise.
10915         (binding_level): Update documentation.  Remove shadowed.
10916         (BINDING_LEVEL): New macro.
10917         (free_binding_nodes): New variable.
10918         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
10919         BLOCK_VARs when doing for-scope extension.  Remove effectively
10920         dead code.
10921         (pushlevel_class): Tweak formatting.
10922         (poplevel_class): Adjust for new name-lookup scheme.
10923         (print_binding_level): Likewise.
10924         (store_bindings): Likewise.
10925         (pushdecl): Likewise.
10926         (pushdecl_class_level): Likewise.
10927         (push_class_level_binding): Likewise.
10928         (push_overloaded_decl): Update comments.  Adjust for new
10929         name-lookup scheme.
10930         (lookup_name_real): Likewise.
10931         (lookup_name_current_level): Likewise.
10932         (cp_finish_decl): Likewise.
10933         (require_complete_types_for_parms): Likewise.  Remove misleading
10934         #if 0'd code.
10935         (grok_parms): Likewise.  Don't call
10936         require_complete_types_for_parms here.
10937         (grok_ctor_properties): Don't treat templates as copy
10938         constructors.
10939         (grop_op_properties): Or as assignment operators.
10940         (start_function): Document.  Adjust for new name-lookup scheme.
10941         (finish_function): Likewise.
10942         * decl2.c (do_local_using_decl): Use push_local_binding.
10943         * lex.c (begin_definition_of_inclass_inline): New function, split
10944         out from ...
10945         (do_pending_inlines): Here, and ...
10946         (process_next_inline): Here.
10947         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
10948         (init_filename_times): Likewise.
10949         (extract_interface_info): Likewise.
10950         (ste_typedecl_interface_info): Likewise.
10951         (check_newline): Likewise.
10952         (dump_time_statistics): Likewise.
10953         (handle_cp_pragma): Likewise.
10954         (do_identifier): Adjust for new name-lookup scheme.
10955         * parse.y (function_try_block): Return ctor_initializer_opt value.
10956         (fndef): Use it.
10957         (fn.defpen): Pass appropriate values to start_function.
10958         (pending_inline): Use functor_try_block value, and pass
10959         appropriate values to finish_function.
10960         * pt.c (is_member_template): Update documentation; remove handling
10961         of FUNCTION_DECLs.  As per name, this function should deal only in
10962         TEMPLATE_DECLs.
10963         (decl_template_parm_p): Change name of olddecl parameter to decl.
10964         (check_template_shadow): Adjust for new name-lookup scheme.
10965         (lookup_template_class): Likewise.
10966         (tsubst_decl): Tweak so as not to confuse member templates with
10967         copy constructors and assignment operators.
10968         (unify): Handle UNION_TYPEs.
10969         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
10970         (lang_print_xnode): Adjust for new name-lookup scheme.
10971         * typeck.c (mark_addressable): Likewise.
10972         (c_expand_return): Likewise.
10973
10974 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
10975
10976         * decl.c (grokdeclarator): Allow field with same name as class
10977         in extern "C".
10978
10979         * decl.c (lookup_name_real): Don't limit field lookup to types.
10980         * class.c (check_member_decl_is_same_in_complete_scope): No error
10981         if icv and x are the same.
10982         * lex.c (do_identifier): Tweak error message.
10983
10984 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
10985
10986         * decl.c (start_enum): Use push_obstacks, not
10987         end_temporary_allocation.
10988         (finish_enum): Call pop_obstacks.
10989
10990 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
10991
10992         * class.c (instantiate_type): Return error_mark_node rather than
10993         junk.
10994
10995 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
10996
10997         * cp-tree.h (most_specialized_instantiation): New function.
10998         (print_candidates): Likewise.
10999         * class.c (validate_lhs): Remove.
11000         (resolve_address_of_overloaded_function): New function, split out
11001         and then substantially reworked, from ...
11002         (instantiate_type): Use it.  Simplify.
11003         * cvt.c (convert_to_reference): Complain when caller has indicated
11004         that's the right thing to do.  Don't crash if instantiate_type
11005         fails.
11006         * pt.c: Substitute `parameters' for `paramters' throughout.
11007         (print_candidates): Don't make it static.
11008         (most_specialized_instantiation): Split out from ...
11009         (most_specialized): Here.
11010
11011 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
11012
11013         * lex.c (lang_init_options): Initialize cpplib.
11014         * decl2.c (parse_options,cpp_initialized): Removed.
11015         (lang_decode_option): Move initialization of cpplib to
11016         lang_init_options.
11017
11018 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
11019
11020         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
11021         well as the TYPE_DECL, when a typedef name is assigned to a
11022         previously anonymous type.
11023
11024 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
11025
11026         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
11027         __cp_eh_info for getting the eh info pointer.  Add table_index to
11028         field list.
11029         (push_eh_cleanup): Don't increment 'handlers' data field.
11030         (process_start_catch_block): Don't set the 'caught' field.
11031
11032         * cp/exception.cc (CP_EH_INFO): New macro for getting the
11033         exception info pointer within library routines.
11034         (__cp_eh_info): Use CP_EH_INFO.
11035         (__start_cp_handler): Get exception info pointer, set caught field,
11036         and increment the handlers field.  Avoids this being done by handlers.
11037         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
11038         (uncaught_exception): Use CP_EH_INFO macro.
11039
11040 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
11041
11042         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
11043
11044 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
11045
11046         * lex.c (check_newline): Add support for \ as `natural'
11047         characters in file names in #line to be consistent with #include
11048         handling.  We support escape processing in the # 1 "..." version of
11049         the command.  See also support in cp/lex.c.
11050
11051 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
11052
11053         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
11054         structure.
11055
11056 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
11057
11058         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
11059
11060         * error.c (dump_simple_decl): Also print namespace context.
11061         (dump_function_decl): Likewise.
11062
11063         * decl2.c (ambiguous_decl): Don't print old value if it's
11064         error_mark_node.
11065
11066         * decl.c (lookup_name_real): Fix handling of local types shadowed
11067         by a non-type decl.  Remove obsolete code.
11068         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
11069
11070         * lang-options.h: Add -fpermissive.
11071         * decl2.c: Likewise.
11072         * cp-tree.h: Add flag_permissive.
11073         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
11074         were specified, set flag_pedantic_errors.
11075         * call.c (build_over_call): Turn dropped qualifier messages
11076         back into pedwarns.
11077         * cvt.c (convert_to_reference): Likewise.
11078         * typeck.c (convert_for_assignment): Likewise.
11079
11080 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
11081
11082         * decl2.c (coerce_new_type): Use same_type_p.
11083         (coerce_delete_type): Likewise.
11084
11085         * call.c (check_dtor_name): Return 1, not error_mark_node.
11086
11087 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
11088
11089         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
11090         if MULTIPLE_SYMBOL_SPACES.
11091
11092         * pt.c (check_template_shadow): New fn.
11093         * decl2.c (grokfield): Use it.
11094         * decl.c (pushdecl): Likewise.
11095         (pushdecl_class_level): Likewise.
11096         (start_method): Likewise.
11097         (xref_tag): Don't try to use 't' if we're defining.
11098
11099         * call.c (check_dtor_name): Just return an error_mark_node.
11100         * pt.c (lookup_template_class): Complain about using non-template here.
11101         * parse.y (apparent_template_type): Not here.
11102
11103         * pt.c (check_explicit_specialization): Complain about specialization
11104         with C linkage.
11105
11106         * lang-options.h: Add -f{no-,}implicit-inline-templates.
11107
11108         * pt.c (convert_nontype_argument): Don't assume that any integer
11109         argument is intended to be a constant-expression.
11110
11111 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
11112
11113         * class.c (handle_using_decl): Fix comment.  Don't lookup
11114         constructors in base classes.
11115         (validate_lhs): Fix typo in comment.
11116         * search.c (lookup_field_1): Don't return a USING_DECL.
11117
11118         * cp-tree.h (DECL_ACCESS): Improve documentation.
11119
11120         * decl.c (expand_static_init): Don't set the initialization-done
11121         flag until the initialization is done.
11122
11123 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
11124
11125         * decl2.c (validate_nonmember_using_decl): Complain about using
11126         declarations for class members.
11127
11128 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
11129
11130         * typeck2.c (process_init_constructor): Use same_type_p.
11131
11132         * decl.c (check_tag_decl): Don't warn about null decl inside a
11133         class.
11134
11135         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
11136         UNIFY_ALLOW_NONE.
11137         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
11138         (resolve_overloaded_unification): Strip baselinks.
11139
11140 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11141
11142         * g++spec.c: Don't prototype xmalloc.
11143
11144 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
11145
11146         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
11147
11148         * decl.c (check_tag_decl): Do complain about null friend decl at
11149         file scope.
11150
11151 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
11152
11153         * lex.c (make_lang_type): Clear the whole struct lang_type, not
11154         only the first multiple of sizeof (int).
11155
11156 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
11157
11158         * decl.c (start_decl): An explicit specialization of a static data
11159         member is only a definition if it has an initializer.
11160
11161         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
11162         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
11163         cp_finish_decl.
11164         * init.c (expand_default_init): Check for DIRECT_BIND instead of
11165         DECL_ARTIFICIAL.
11166
11167         * call.c (build_over_call): Use build_decl.
11168
11169         * except.c (expand_throw): Just use convert, not
11170         build_reinterpret_cast.
11171
11172         * lex.c (handle_generic_pragma): Use token_buffer.
11173
11174         * decl.c (check_tag_decl): Don't complain about null friend decl.
11175
11176 1998-11-24  Dave Pitts  <dpitts@cozx.com>
11177
11178         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
11179         first position.
11180         * lex.c (check_newline): Use ISALPHA.
11181         (readescape): Use ISGRAPH.
11182         (yyerror): Use ISGRAPH.
11183
11184 1998-11-24  Nathan Sidwell  <nathan@acm.org>
11185
11186         * search.c (get_abstract_virtuals): Do not use initial
11187         CLASSTYPE_ABSTRACT_VIRTUALS.
11188         * typeck2.c (abstract_virtuals_error): Show location of abstract
11189         declaration.
11190         * call.c (build_new_method_call): Use
11191         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
11192         * class.c (finish_struct_bits): Don't bother working out whether
11193         get_abstract_virtuals will do anything, just do it.
11194
11195 1998-11-24  Graham  <grahams@rcp.co.uk>
11196
11197         * typeck.c (build_component_ref): Remove unused statement.
11198
11199 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
11200
11201         * class.c (add_method): Catch invalid overloads.
11202
11203         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
11204         * search.c (lookup_conversions): Handle getting real OVERLOADs.
11205         (add_conversions): Likewise.  Revert last change.
11206         * call.c (add_conv_candidate): Pass totype to add_candidate instead
11207         of fn.  Don't add a new candidate if the last one was for the same
11208         type.
11209         (print_z_candidates): Handle getting a type as a function.
11210         (joust): If we got two conversion candidates to the same type,
11211         just pick one.
11212         (build_object_call): Lose 'templates'.
11213         (build_user_type_conversion_1): Handle getting real OVERLOADs.
11214
11215 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
11216
11217         * typeck2.c (process_init_constructor): If there are elements
11218         that don't have initializers and they need to have constructors
11219         run, supply them with initializers.
11220
11221         * class.c (finish_struct_1): A class with a 0-width bitfield is
11222         still empty.
11223
11224 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
11225
11226         * pt.c (instantiate_class_template): Don't try to figure out what
11227         specialization to use for a partial instantiation.  Correct
11228         typos in a couple of comments.  Avoid calling uses_template_parms
11229         multiple times.
11230
11231 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
11232
11233         * method.c (process_overload_item): Add call to
11234         build_mangled_C9x_name for intTI_type_nodes.
11235         (build_mangled_C9x_name): Add prototype, define.
11236         * decl.c (init_decl_processing): Add names for
11237         TImode_type_node.
11238
11239 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
11240
11241         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
11242
11243         * class.c (finish_struct_1): Set things up for 0-width bitfields
11244         like we do for others.
11245
11246         * decl.c (check_tag_decl): New fn.
11247         (shadow_tag): Split out from here.
11248         * decl2.c (grok_x_components): Call it.
11249
11250 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
11251
11252         * decl.c: Lose warn_about_return_type.
11253         (grokdeclarator): Always complain about implicit int, except for
11254         `main () { ... }'.
11255
11256         * decl.c (tag_name): New fn.
11257         (xref_tag): Complain about using typedef-name after class-key.
11258
11259         * init.c (expand_vec_init): Also keep going if from_array.
11260
11261         * tree.c (is_overloaded_fn): Also handle the output of
11262         build_offset_ref.
11263
11264         * decl.c (grokdeclarator): Use constructor_name when comparing
11265         field name against enclosing class.
11266         * class.c (finish_struct_anon): Likewise.
11267
11268 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
11269
11270         * decl.c (poplevel): Remove code to handle KEEP == 2.
11271         (finish_function): Don't confuse BLOCK-order when
11272         processing a destructor.
11273
11274 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
11275
11276         * decl.c (require_complete_types_for_parms): Call layout_decl
11277         after we've completed the type.
11278
11279 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11280
11281         * decl2.c (validate_nonmember_using_decl): Allow using templates
11282         from the global namespace.
11283
11284 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
11285
11286         Handle specifying template args to member function templates.
11287         * tree.c (build_overload): Always create an OVERLOAD for a template.
11288         * search.c (add_conversions): Handle finding an OVERLOAD.
11289         * decl2.c (check_classfn): Likewise.
11290         * lex.c (identifier_type): See through a baselink.
11291         * parse.y (do_id): Don't call do_identifier if we got a baselink.
11292         * class.c (instantiate_type, case TREE_LIST): Recurse.
11293
11294         * decl.c (grokdeclarator): Allow a boolean constant for array
11295         bounds, odd as that sounds.
11296
11297         * pt.c (unify): Be more strict about non-type parms, except for
11298         array bounds.
11299         (UNIFY_ALLOW_INTEGER): New macro.
11300
11301 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
11302
11303         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
11304
11305 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
11306
11307         * semantics.c (begin_class_definition): Call
11308         maybe_process_partial_specialization before push_template_decl.
11309         Don't call push_template_decl for a specialization.
11310         * search.c (lookup_field): Do return a member template class.
11311         * decl2.c (handle_class_head): Handle member template classes.
11312
11313         * decl.c (grokdeclarator): A parm type need not be complete.
11314
11315         * pt.c (convert_nontype_argument): Fix thinko.
11316
11317 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
11318
11319         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
11320         (global_delete_fndecl): New variable.
11321         * decl.c (global_delete_fndecl): Define it.
11322         (init_decl_processing): Set it.
11323         * init.c (build_builtin_delete_call): Use it.
11324         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
11325         nodes.
11326
11327 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
11328
11329         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
11330         type.
11331
11332         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
11333         * call.c (build_object_call): Also support references to functions.
11334         * typeck.c (convert_for_initialization): Don't decay a function
11335         if the target is a reference to function.
11336
11337         * search.c (add_conversions): Get all the overloads from a class.
11338
11339         * decl.c (grok_ctor_properties): Complain about any constructor
11340         that will take a single arg of the class type by value.
11341
11342         * typeck2.c (build_functional_cast): Can't create objects of
11343         abstract classes this way.
11344         * cvt.c (ocp_convert): Likewise.
11345
11346         * decl.c (grokfndecl): Member functions of local classes are not
11347         public.
11348
11349 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
11350
11351         * Make-lang.in (cc1plus): Add dependency on hash.o.
11352
11353 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
11354
11355         * search.c (get_abstract_virtuals): Complain about virtuals with
11356         no final overrider.
11357         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
11358         with no final overrider.
11359         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
11360         on virtuals with no final overrider.
11361
11362         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
11363
11364         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
11365         after layout_type.
11366
11367         * friend.c (do_friend): Don't set_mangled_name_for_decl.
11368
11369         * class.c (finish_struct_anon): Complain about non-fields.
11370         * decl2.c (build_anon_union_vars): Likewise.
11371
11372         * decl.c (grokdeclarator): Normal data members can't have the same
11373         name as the class, either.
11374         * class.c (finish_struct_anon): Neither can members of an
11375         anonymous union.
11376
11377 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
11378
11379         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
11380         (TYPE_BINFO): Likewise.
11381         (IS_AGGR_TYPE): Tweak.
11382         (SET_IS_AGGR_TYPE): New macro.
11383         (CLASS_TYPE_P): Tweak.
11384         (lang_type): Group mark bitfields together.  Remove linenum.
11385         (CLASSTYPE_SOURCE_LINE): Remove macro.
11386         (CLASSTYPE_MARKED_N): New macro.
11387         (SET_CLASSTYPE_MARKED_N): Likewise.
11388         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
11389         (CLASS_TYPE_MARKED_*): Use them.
11390         (SET_CLASSTYPE_MARKED_*): Likewise.
11391         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
11392         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
11393         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
11394         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
11395         * class.c (class_cache_obstack): New variable.
11396         (class_cache_firstobj): Likewise.
11397         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
11398         (pushclass): Free the cache, when appropriate.
11399         (popclass): Tidy.
11400         (maybe_push_cache_obstack): Use class_cache_obstack.
11401         * decl.c (include hash.h).
11402         (typename_hash): New function.
11403         (typename_compare): Likewise.
11404         (build_typename_type): Check the hash table to avoid creating
11405         duplicates.
11406         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
11407         (grokdeclarator): Use CLASS_TYPE_P.
11408         (xref_basetypes): Likewise.
11409         (start_function): Likewise.  Don't put current_class_ref on the
11410         permanent obstack.
11411         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
11412         and TYPE_TI_ARGS.
11413         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
11414         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
11415         fields for types other than class types.  Do clear TYPE_ALIAS_SET
11416         for types other than class types, though.
11417         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
11418         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11419         * pt.c (process_template_parm): Don't set
11420         CLASSTYPE_GOT_SEMICOLON.
11421         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11422         Coerce arguments on the momentary obstack.
11423         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11424         (instantiate_class_template): Calculate template arguments on the
11425         momentary obstack.  Tidy.
11426         (tsubst_template_arg_vector): Use make_temp_vec.
11427         (tsubst_aggr_type): Put template arguments on the momentary
11428         obstack.
11429         (tsubst_decl): Likewise.
11430         (tsubst): Copy the array bounds index to the permanent obstack
11431         before building index types.  Use new macros.
11432         (unify): Use new macros.
11433         (do_type_instantiation): Likewise.
11434         * search.c (lookup_fnfields_1): Use new macros.
11435         (dfs_pushdecls): Build envelopes on the cache obstack.
11436         (dfs_compress_decls): Use new macros.
11437         (push_class_decls): Build on the cache obstack.
11438         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
11439         * sign.c (build_signature_pointer_or_reference_type): Use
11440         SET_IS_AGGR_TYPE.
11441         * tree.c (make_binfo): Check CLASS_TYPE_P.
11442         (copy_template_template_parm): Adjust.
11443         (make_temp_vec): Use push_expression_obstack.
11444         * typeck.c (complete_type): Use new macros.
11445         (comptypes): Likewise.
11446
11447 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
11448
11449         * pt.c (tsubst): Add diagnostics for invalid array, reference
11450         and pointer to member types.
11451
11452 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
11453
11454         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
11455
11456         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
11457         Simplify.
11458
11459         * parse.y (structsp): Fix cut-and-paste error.
11460
11461         * init.c (build_new): Complain about non-integral size.
11462
11463         * parse.y (unary_expr): Complain about defining types in sizeof.
11464
11465         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
11466
11467         * rtti.c (build_x_typeid): Complain about typeid without
11468         including <typeinfo>.
11469         (get_typeid): Likewise.  Complain about typeid of incomplete type.
11470         (get_tinfo_fn_dynamic): Likewise.
11471         (get_typeid_1): Not static anymore.
11472         * except.c (build_eh_type_type): Use get_typeid_1.
11473
11474         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
11475         ambiguous or private bases.  Fix warning for reference cast.
11476
11477 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
11478
11479         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
11480         * decl.c (duplicate_decls): Remove special-case code to deal with
11481         template friends, and just do the obvious thing.
11482         * pt.c (register_specialization): Tweak for clarity, and also to
11483         clear DECL_INITIAL for an instantiation before it is merged with a
11484         specialization.
11485         (check_explicit_specialization): Fix indentation.
11486         (tsubst_friend_function): Handle both definitions in friend
11487         declaration and outside friend declarations.
11488         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
11489         (regenerate_decl_from_template): Tweak accordingly.
11490         (instantiate_decl): Likewise.
11491
11492 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
11493
11494         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
11495         member function reference to error.
11496         * cvt.c (ocp_convert): Complain about converting an overloaded
11497         function to void.
11498
11499         * init.c (build_offset_ref): Just return a lone static member
11500         function.
11501
11502         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
11503         not internal ones.
11504
11505         * typeck.c (build_binary_op_nodefault): Improve error handling.
11506
11507         * decl.c (grokfndecl): Complain about making 'main' a template.
11508
11509         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
11510
11511         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
11512         TYPE_DECL in a template.
11513
11514 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
11515
11516         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
11517
11518         * decl.c (struct cp_function): Add named_label_uses.
11519         (push_cp_function_context): Save it.
11520         (pop_cp_function_context): Restore it.
11521         (define_label): Also complain about jumping into the scope of
11522         non-POD objects that don't have constructors.
11523         * tree.c (pod_type_p): New fn.
11524
11525         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
11526         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
11527         (get_tinfo_fn): Not here.
11528         * repo.c (repo_get_id): Abort if we get called for an incomplete
11529         type.
11530
11531 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
11532
11533         * except.c (expand_throw): Make sure first argument to
11534         __cp_push_exception is of type `void*' to avoid spurious error
11535         messages.
11536
11537 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
11538
11539         * pt.c (try_one_overload): Take orig_targs again.  Only check for
11540         mismatches against them; we don't care what a previous call found.
11541         (resolve_overloaded_unification): Adjust.
11542
11543         * search.c (lookup_field): Don't return anything for a non-type
11544         field from a dependent type.
11545         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
11546         in an array declarator.
11547         (start_decl): Push into the class before looking for the field.
11548
11549 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
11550
11551         * method.c (build_overload_value): Handle REFERENCE_TYPE.
11552
11553 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11554
11555         * decl.c (grokdeclarator): Allow namespace-scoped members if they
11556         are friends.
11557
11558 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
11559
11560         * pt.c (tsubst_decl): Don't mess with the global value of an
11561         un-mangled DECL_ASSEMBLER_NAME.
11562
11563 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
11564
11565         * decl.c (init_decl_processing): Remove CYGWIN conditional
11566         since CYGWIN is now able to deal with trapping signals.
11567
11568 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11569
11570         * cp-tree.h: Don't include gansidecl.h.
11571         * exception.cc: Include gansidecl.h (since we don't include config.h)
11572         * g++spec.c: Don't include gansidecl.h.
11573
11574 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
11575
11576         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
11577         size of dummy.
11578         (DECL_DEFINED_IN_CLASS_P): New macro.
11579         (TEMPLATE_PARMS_FOR_INLINE): Document.
11580         (check_static_variable_definition): New function.
11581         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
11582         appropriate.
11583         (check_static_variable_definition): Split out from ...
11584         (grokdeclarator): Here.
11585         * pt.c (check_default_tmpl_args): New function, split out from ...
11586         (push_template_decl_real): Here.
11587         (instantiate_template): Fix comment.
11588
11589 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
11590
11591         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
11592         (CP_TYPE_VOLATILE_P): Likewise.
11593         (CP_TYPE_RESTRICT_P): Likewise.
11594
11595 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
11596
11597         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
11598
11599 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
11600
11601         * class.c (instantiate_type): Be more helpful.
11602
11603         * decl2.c (import_export_decl): Call import_export_class.
11604
11605         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
11606         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
11607         * pt.c (tsubst_copy): Likewise.
11608
11609 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
11610
11611         * init.c (expand_vec_init): Fix off-by-one error.
11612
11613 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
11614
11615         * parse.y (apparent_template_type): New type.
11616         (named_complex_class_head_sans_basetype): Use it.
11617         * Makefile.in (CONFLICTS): One new conflict.
11618         * parse.c: Regenerated.
11619
11620 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
11621
11622         * cp-tree.h (COMPARE_STRICT): New macro.
11623         (COMPARE_BASE): Likewise.
11624         (COMPARE_RELAXED): Likewise.
11625         (COMPARE_REDECLARATION): Likewise.
11626         (same_type_p): Likewise.
11627         (same_or_base_type_p): Likewise.
11628         * call.c (standard_conversion): Use them, in place of comptypes
11629         with numeric arguments.
11630         (reference_binding): Likewise.
11631         (convert_like): Likewise.
11632         (build_over_call): Likewise.
11633         (is_subseq): Likewise.
11634         (is_properly_derived_from): Likewise.
11635         (compare_ics): Likewise.
11636         (joust): Likewise.
11637         * class.c (delete_duplicate_fields_1): Likewise.
11638         (resolves_to_fixed_type_p): Likewise.
11639         (instantiate_type): Likewise.  Remove #if 0'd code.
11640         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
11641         (pushdecl): Likewise.
11642         (lookup_name_real): Likewise.
11643         (grokdeclarator): Likewise.  Check for illegal array declarations.
11644         (grokparms): Likewise.
11645         (grok_op_properties): Likewise.
11646         * decl2.c (check_classfn): Likewise.
11647         * friend.c (is_friend): Likewise.
11648         (make_friend_class): Likewise.
11649         * init.c (expand_aggr_init): Likewise.
11650         (expand_vec_init): Likewise.
11651         * pt.c (is_member_template_class): Remove declaration.
11652         (is_specialization_of): Use COMPARE_* and new macros.
11653         (comp_template_parms): Likewise.
11654         (convert_nontype_argument): Likewise.
11655         (coerce_template_template_parms): Likewise.
11656         (template_args_equal): Likewise.
11657         (lookup_template_class): Likewise.
11658         (type_unification_real): Likewise.
11659         (unify): Likewise.
11660         (get_bindings_real): Likewise.
11661         * search.c (covariant_return_p): Likewise.
11662         (get_matching_virtual): Likewise.
11663         * sig.c (match_method_types): Likewise.
11664         * tree.c (vec_binfo_member): Likewise.
11665         (cp_tree_equal): Likewise.
11666         * typeck.c (common_type): Likewise.
11667         (comp_array_types): Likewise.  Get issues involving unknown array
11668         bounds right.
11669         (comptypes): Update comments.  Use new flags.
11670         (comp_target_types): Use new macros.
11671         (compparms): Likewise.
11672         (comp_target_parms): Likewise.
11673         (string_conv_p): Likewise.
11674         (build_component_ref): Likewise.
11675         (build_indirect_ref): Likewise.
11676         (build_conditional_expr): Likewise.
11677         (build_static_cast): Likewise.
11678         (build_reinterpret_cast): Likewise.
11679         (build_const_cast): Likewise.
11680         (build_modify_expr): Likewise.
11681         (convert_for_assignment): Likewise.
11682         (comp_ptr_ttypes_real): Likewise.
11683         (ptr_reasonably_similar): Likewise.
11684         (comp_ptr_ttypes_const): Likewise.
11685
11686 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
11687
11688         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
11689
11690 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
11691
11692         * decl2.c (delete_sanity): Pass integer_zero_node, not
11693         integer_two_node, to build_vec_delete.
11694         * init.c (build_array_eh_cleanup): Remove.
11695         (expand_vec_init_try_block): New function.
11696         (expand_vec_init_catch_clause): Likewise.
11697         (build_vec_delete_1): Don't deal with case that auto_delete_vec
11698         might be integer_two_node anymore.
11699         (expand_vec_init): Rework for initialization-correctness and
11700         exception-correctness.
11701         * typeck2.c (process_init_constructor): Make mutual exclusivity
11702         of cases more obvious.
11703
11704 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
11705
11706         * decl.c (lookup_name_real): OK, only warn if not lexing.
11707         Simplify suggested fix.
11708
11709         * cp-tree.h (IDENTIFIER_MARKED): New macro.
11710         * search.c (lookup_conversions): Use breadth_first_search.
11711         (add_conversions): Avoid adding two conversions to the same type.
11712         (breadth_first_search): Work with base binfos, rather
11713         than binfos and base indices.
11714         (get_virtual_destructor): Adjust.
11715         (tree_has_any_destructor_p): Adjust.
11716         (get_matching_virtual): Adjust.
11717
11718         * pt.c (push_template_decl_real): Generalize check for incorrect
11719         number of template parms.
11720         (is_member_template_class): #if 0.
11721
11722 1998-10-29  Richard Henderson  <rth@cygnus.com>
11723
11724         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
11725         last.
11726
11727 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
11728
11729         * lex.c: Call check_newline from lang_init always.  After
11730         calling cpp_start_read, set yy_cur and yy_lim to read from the
11731         cpplib token buffer.
11732
11733 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
11734
11735         * class.c (instantiate_type): Don't consider templates for a normal
11736         match.
11737
11738         * class.c (finish_struct_1): Don't complain about non-copy
11739         assignment ops in union members.
11740
11741         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
11742         (prepare_fresh_vtable): Likewise.
11743         (finish_struct_1): Don't call import_export_class.
11744         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
11745         (finish_prevtable_vardecl): Lose.
11746         (finish_file): Don't call it.
11747         * pt.c (instantiate_class_template): Likewise.
11748         * cp-tree.h: Remove it.
11749
11750         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
11751         * decl.c (finish_function): Not here.
11752         (start_function): Do set DECL_INITIAL.
11753
11754         * pt.c (push_template_decl_real): Complain about default template
11755         args for enclosing classes.
11756
11757         * call.c (add_function_candidate): Treat conversion functions
11758         as coming from the argument's class.
11759         * cp-tree.h (DECL_CONV_FN_P): New fn.
11760         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
11761         * class.c (add_method): Use DECL_CONV_FN_P.
11762         * decl2.c (check_classfn): Likewise.
11763         * error.c (dump_function_name): Likewise.
11764         (dump_function_decl): Likewise.
11765         * pt.c (fn_type_unification): Likewise.
11766         * search.c (add_conversions): Likewise.
11767
11768 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
11769
11770         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
11771         * method.c (hack_identifier): Also check for using RESULT_DECL
11772         from outer context.
11773
11774 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
11775
11776         * decl.c (grokdeclarator): Use type_quals, rather than constp,
11777         consistently.
11778
11779 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
11780
11781         * call.c (standard_conversion): instantiate_type here.
11782         (reference_binding): And here.
11783         (implicit_conversion): Not here.
11784         (build_op_delete_call): No need to cons up an OVERLOAD.
11785         * cvt.c (cp_convert_to_pointer): instantiate_type here.
11786         (convert_to_reference): And here.
11787         * decl.c (grok_reference_init): Not here.
11788         (grokparms): Or here.
11789         * typeck2.c (digest_init): Or here.
11790         * typeck.c (decay_conversion): Take the address of overloaded
11791         functions, too.
11792         (require_instantiated_type): Lose.
11793         (convert_arguments): Don't handle unknown types here.
11794         (build_c_cast): Likewise.
11795         (build_binary_op): Gut.
11796         (build_conditional_expr): Don't require_instantiated_type.
11797         (build_modify_expr): Likewise.
11798         (build_static_cast): Don't instantiate_type.
11799         (build_reinterpret_cast): Likewise.
11800         (build_const_cast): Likewise.
11801         (convert_for_initialization): Likewise.
11802         (build_ptrmemfunc): Use type_unknown_p.
11803         (convert_for_assignment): Also do default_conversion on overloaded
11804         functions.  Hand them off to ocp_convert.
11805
11806 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
11807
11808         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
11809         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
11810
11811         * class.c (finish_struct_1): Use build_cplus_array_type to build
11812         array types.
11813         * decl.c (init_decl_processing): Likewise.
11814         * except.c (expand_end_eh_spec): Likewise.
11815         * search.c (expand_upcast_fixups): Simplify very slightly.
11816
11817 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
11818
11819         * decl.c (grokdeclarator): Complain about a variable using
11820         constructor syntax coming back null from start_decl.
11821
11822         * friend.c (make_friend_class): Complain about trying to make
11823         a non-class type a friend.
11824
11825         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
11826         (start_function): Not here.
11827
11828 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
11829
11830         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
11831
11832 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
11833
11834         * typeck2.c (process_init_constructor): Only skip anonymous fields
11835         if they are bitfields.
11836
11837         * cp-tree.def (TYPEOF_TYPE): New code.
11838         * error.c (dump_type_real): Handle it.
11839         * pt.c (tsubst): Likewise.
11840         * tree.c (search_tree): Likewise.
11841         * semantics.c (finish_typeof): New fn.
11842         * parse.y (typespec): Use it.
11843         * cp-tree.h: Declare it.
11844
11845 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
11846
11847         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
11848
11849 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
11850
11851         * typeck.c (convert_arguments): Don't handle pmf references
11852         specially.
11853
11854         * init.c (build_member_call): Don't try to convert to the base type
11855         if it's ambiguous or pedantic.
11856
11857         * typeck2.c (check_for_new_type): Only depend on pedantic for
11858         C-style casts.
11859
11860 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
11861
11862         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
11863         non-converting constructors.
11864
11865 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11866
11867         * gxxint.texi: Correct documentation for n, N, Q, and B.
11868
11869 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11870
11871         * parse.y (condition): Convert VAR_DECL from reference to indirect
11872         reference.
11873
11874 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
11875
11876         * exception.cc (__cp_pop_exception): Free the original exception
11877         value, not the potentially coerced one.
11878
11879 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
11880
11881         * Makefile.in (hash.h): Run gperf when necessary.
11882
11883         * cp-tree.h (CP_TYPE_READONLY): Remove.
11884         (CP_TYPE_VOLATILE): Likewise.
11885         (CP_TYPE_QUALS): New macro.
11886         (CP_TYPE_CONST_P): Likewise.
11887         (CP_TYPE_VOLATILE_P): Likewise.
11888         (CP_TYPE_RESTRICT_P): Likewise.
11889         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
11890         (cp_build_type_variant): Rename to ...
11891         (cp_build_qualified_type): New function.
11892         (c_apply_type_quals_to_decl): Declare.
11893         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
11894         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
11895         (cp_type_qual_from_rid): New function.
11896         (compparms): Remove unused parameter.  All callers changed.
11897         (cp_type_quals): New function.
11898         (at_least_as_qualified_p): Likewise.
11899         (more_qualified_p): Likewise.
11900
11901         * call.c (standard_conversion): Replace calls to
11902         cp_build_type_variant with cp_build_qualified_type.  Use
11903         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
11904         compare them.  Use CP_TYPE_* macros to check qualifiers.
11905         (reference_binding): Likewise.
11906         (implicit_conversion): Likewise.
11907         (add_builtin_candidates): Likewise.
11908         (build_over_call): Likewise.
11909         * class.c (overrides): Compare all qualifiers, not just `const',
11910         on method declarations.
11911         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
11912         (convert_pointer_to_real): Likewise.
11913         (type_promotes_to): Likewise.
11914         * decl.c (check_for_uninitialized_const_var): New function.
11915         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
11916         (cp_finish_decl): Use check_for_uninitialized_const_var.
11917         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
11918         handle `restrict'.
11919         (grok_ctor_properties): Likewise.
11920         (grok_op_properties): Likewise.
11921         (start_function): Likewise.
11922         (rever_static_member_fn): Likewise.
11923         * decl2.c (grok_method_quals): Likewise.
11924         (grokfield): Likewise.
11925         * error.c (dump_readonly_or_volatile): Rename to ...
11926         (dump_qualifiers): New function.  Handle `restrict'.
11927         (dump_type_real): Use it.
11928         (dump_aggr_type): Likewise.
11929         (dump_type_prefix): Likewise.
11930         (dump_type_suffix): Likewise.
11931         (dump_function_decl): Likewise.
11932         (cv_as_string): Likewise.
11933         * gxx.gperf: Add __restrict and __restrict__.
11934         * gxxint.texi: Document `u' as used for `__restrict', and a few
11935         other previously undocumented codes.
11936         * hash.h: Regenerated.
11937         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
11938         (build_member_call): Likewise.
11939         (build_new_1): Likewise.
11940         * lex.c (init_parse): Add entry for RID_RESTRICT.
11941         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
11942         (cp_type_qual_from_rid): Define.
11943         * lex.h (enum rid): Add RID_RESTRICT.
11944         * method.c (process_modifiers): Deal with `restrict'.
11945         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
11946         * parse.c: Regenerated.
11947         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
11948         (tsubst_aggr_type): Likewise.
11949         (tsubst): Likewise.
11950         (check_cv_quals_for_unify): Likewise.
11951         (unify): Likewise.
11952         * rtti.c (init_rtti_processing): Likewise.
11953         (build_headof): Likewise.
11954         (get_tinfo_var): Likewise.
11955         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
11956         (expand_class_desc): Likewise.
11957         (expand_attr_desc): Likewise.
11958         (synthesize_tinfo_fn): Likewise.
11959         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
11960         (get_matching_virtual): Likewise.
11961         (expand_upcast_fixups): Likewise.
11962         * sig.c (build_signature_pointer_or_reference_name): Take
11963         type_quals, not constp and volatilep.
11964         (build_signature_pointer_or_reference_type): Likewise.
11965         (match_method_types): More CP_TYPE_QUALS conversion, etc.
11966         (build_signature_pointer_constructor): Likewise.
11967         (build_signature_method_call): Likewise.
11968         * tree.c (build_cplus_array_type): Likewise.
11969         (cp_build_type_variant): Rename to ...
11970         (cp_build_qualified_type): New function.  Deal with `__restrict'.
11971         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
11972         (build_exception_variant): Likewise.
11973         (mapcar): Likewise.
11974         * typeck.c (qualif_type): Likewise.
11975         (common_type): Likewise.
11976         (comptypes): Likewise.
11977         (comp_cv_target_types): Likewise.
11978         (at_least_as_qualified_p): Define.
11979         (more_qualified_p): Likewise.
11980         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
11981         (compparms): Likewise.
11982         (inline_conversion): Likewise.
11983         (string_conv_p): Likewise.
11984         (build_component_ref): Likewise.
11985         (build_indirect_ref): Likewise.
11986         (build_array_ref): Likewise.
11987         (build_unary_op): Likewise.
11988         (build_conditional_expr): Likewise.
11989         (build_static_cast): Likewise.
11990         (build_c_cast): Likewise.
11991         (build_modify_expr): Likewise.
11992         (convert_For_assignment): Likewise.
11993         (comp_ptr_ttypes_real): Likewise.
11994         (cp_type_quals): New function.
11995
11996 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
11997
11998         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
11999         (CP_TYPE_VOLATILE): Likewise.
12000         * decl.c (grokdeclarator): Use them.
12001         * tree.c (canonical_type_variant): Likewise.
12002
12003 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12004
12005         * parse.y (named_class_head): Push into class while parsing the
12006         base class list.
12007         * decl2.c (push_scope, pop_scope): New functions.
12008         * cp-tree.h: Declare them.
12009         * init.c (build_new_1): Delay cleanup until end of full expression.
12010
12011 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
12012
12013         * typeck.c (build_component_ref): Use of a type here is an error.
12014
12015 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
12016
12017         Revamp references to member functions.
12018         * method.c (hack_identifier): Call build_component_ref for a
12019         reference to a member function.
12020         * typeck.c (build_component_ref): Only return a single function
12021         if it's static.  Otherwise, return a COMPONENT_REF.
12022         (build_x_function_call): Handle a COMPONENT_REF.
12023         (build_unary_op): Handle all unknown-type things.
12024         * decl2.c (arg_assoc): Handle COMPONENT_REF.
12025         * class.c (instantiate_type): Complain if the function we get is a
12026         nonstatic member function.  Remove code for finding "compatible"
12027         functions.
12028         * pt.c (tsubst_copy): Handle NOP_EXPR.
12029         * tree.c (build_dummy_object): New fn.
12030         (maybe_dummy_object): New fn.
12031         (is_dummy_object): New fn.
12032         * cp-tree.h: Declare them.
12033         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
12034         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
12035         * init.c (build_member_call): Use maybe_dummy_object and
12036         is_dummy_object.
12037         (build_offset_ref): Use maybe_dummy_object.
12038         (resolve_offset_ref): Use is_dummy_object.
12039         * typeck.c (build_x_function_call): Call build_dummy_object.
12040         (unary_complex_lvalue): Call is_dummy_object.
12041
12042         * typeck.c (build_component_addr): Make sure field is a field.
12043
12044         * call.c (build_new_op): Delete obsolete code.
12045
12046         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
12047
12048 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12049
12050         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
12051         std if std is ignored.
12052
12053 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
12054
12055         * decl.c (grokvardecl): Fix thinko.
12056
12057         * decl.c (grokdeclarator): Embedded attrs bind to the right,
12058         not the left.
12059
12060         * parse.y (fn.def2): Fix 'attrs' format.
12061
12062 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
12063
12064         * Makefile.in (CONFLICTS): Update.
12065         * parse.y (expr_or_declarator_intern): New rule.
12066         (expr_or_declarator, direct_notype_declarator, primary,
12067         functional_cast): Use it.
12068         (notype_declarator_intern): New rule.
12069         (notype_declarator, complex_notype_declarator): Use it.
12070
12071 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
12072
12073         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
12074         (grokvardecl): Likewise.
12075
12076 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12077
12078         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
12079         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
12080
12081         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
12082
12083         * pt.c (process_partial_specialization): Cast 1st argument of
12084         `bzero' to (PTR).
12085
12086         * tree.c (build_base_fields): Cast `base_align' to (int) when
12087         comparing against one.
12088
12089 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
12090
12091         * decl.c (lookup_name_real): Handle template parameters for member
12092         templates where said parameters have the same name as the
12093         surrounding class.
12094
12095         * decl.c (expand_static_init): Build cleanups before entering the
12096         anonymous function used to do them to avoid access-checking
12097         confusion.
12098
12099         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
12100         accidentally removed by previous change, and make DECL_RTL here.
12101         * class.c (add_method): Don't make DECL_RTL here.
12102
12103         * pt.c (for_each_template_parm): Don't examine uninstantiated
12104         default arguments.
12105
12106 1998-10-16  Dave Brolley  <brolley@cygnus.com>
12107
12108         * lex.c (real_yylex): Fix unaligned access of wchar_t.
12109
12110 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
12111
12112         * class.c (add_method): Fix documentation to reflect previous
12113         changes.  Check for duplicate method declarations here.
12114         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
12115         correctly; such things never match.
12116         (grokfndecl): Don't look for duplicate methods here.
12117         * decl2.c (check_classfn): Don't assume names are mangled.
12118         Don't add bogus member function declarations to a class before the
12119         class type is complete.
12120         (grokfield): Reformat error message.
12121         * method.c (set_mangled_name_for_decl): Don't mangle names while
12122         processing_template_decl.
12123
12124 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
12125
12126         * typeck.c (build_indirect_ref): Complain about a pointer to data
12127         member, too.
12128         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
12129         data member.
12130         * init.c (resolve_offset_ref): Don't undo the above.
12131
12132         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
12133         (struct lang_decl_flags): Add `bitfield'.
12134         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
12135         DECL_BIT_FIELD.
12136         * decl2.c (grokbitfield, grok_alignof): Likewise.
12137         * init.c (build_offset_ref): Likewise.
12138         * typeck.c (build_component_addr, expr_sizeof): Likewise.
12139         * cvt.c (build_up_reference): Don't crash if taking the address
12140         returns error_mark_node.
12141
12142         * decl.c (grokfndecl): Also check ctype when checking for ::main().
12143
12144 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
12145
12146         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
12147         Do mangling here.
12148         (grokdeclarator): Instead of here.
12149         * friend.c (do_friend): Lose special handling of ::main and
12150         __builtin_*.
12151         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
12152
12153         * spew.c (yylex): Clear looking_for_typename if we got
12154         'enum { ... };'.
12155
12156 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
12157
12158         * class.c (maybe_warn_about_overly_private_class): Improve error
12159         messages for class with only private constructors.
12160
12161         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
12162         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
12163         (build_typename_type): New function.
12164         * decl.c (build_typename_type): Broken out from ...
12165         (make_typename_type): Use it.
12166         * search.c (lookup_field): Likewise.
12167
12168 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12169
12170         * pt.c (convert_nontype_argument): Check against type_referred_to.
12171         * decl.c (grokvardecl): Check for declarator name before building
12172         DECL_ASSEMBLER_NAME.
12173
12174 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
12175
12176         * pt.c (lookup_template_class): Add comment.
12177         (instantiate_class_template): Don't mark the _TYPE node for
12178         member class templates as an instantiation.
12179
12180 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
12181
12182         * decl.c (grokfndecl): Fix my thinko.
12183
12184 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
12185
12186         * tinfo2.cc (fast_compare): Remove.
12187         (before): Just use strcmp.
12188         * tinfo.cc (operator==): Just use strcmp.
12189
12190 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
12191
12192         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
12193         declarations.
12194
12195 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
12196
12197         * cp-tree.h (specializations_of_same_template_p): Remove.
12198         * search.c (get_template_base): Don't use it.
12199         (get_template_base_recursive): Likewise.
12200         * pt.c (specializations_of_same_template_p): Remove.
12201         (unify): Don't use it.
12202         (lookup_template_class): Find the correct parent when setting
12203         CLASSTYPE_TI_TEMPLATE.
12204
12205 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
12206
12207         * tinfo.cc (operator==): Always compare names.
12208
12209 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
12210
12211         * decl.c (start_function): Fix cut-and-paste error.
12212
12213 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
12214
12215         * inc/typeinfo: Add #pragma interface.
12216         (operator!=): Just call operator==.
12217         * tinfo.cc: Add #pragma implementation.
12218         (operator==): Move from inc/typeinfo and tinfo2.cc.
12219         Check __COMMON_UNRELIABLE instead of _WIN32.
12220
12221         * typeck2.c (my_friendly_abort): Add URL.
12222
12223 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
12224
12225         * decl.c (start_method): Added extra parameter for attributes.
12226         * cp-tree.h (start_method): Update prototype.
12227         * parse.y (fn.def2): Update start_method parameter list.
12228
12229 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
12230
12231         * cp-tree.h (specializations_of_same_template_p): Declare.
12232         * pt.c (specializations_of_same_template_p): New function.
12233         (unify): Use it.
12234         * search.c (get_template_base): Use it.
12235         (get_template_base_recursive): Likewise.
12236
12237 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
12238
12239         * decl2.c (start_objects): Add new variable `joiner' and
12240         initialize it properly.
12241
12242 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
12243
12244         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
12245         change to vtable types.
12246
12247         * cvt.c (ocp_convert): Avoid infinite recursion caused by
12248         1998-10-03 change.
12249
12250 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
12251
12252         * pt.c (resolve_overloaded_unification): New fn.
12253         (try_one_overload): Likewise.
12254         (unify): Don't fail on unknown type.
12255         (type_unification_real): Likewise.  Use resolve_overloaded_unification
12256         to handle an overloaded argument.
12257         (template_args_equal): Split out...
12258         (comp_template_args): From here.
12259         (determine_specialization): Also allow a template with more
12260         parms than were explicitly specified.
12261         * cp-tree.h: Add template_args_equal.
12262         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
12263
12264 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
12265
12266         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
12267         change.
12268
12269 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
12270
12271         * typeck.c (unsigned_type): Only return TItype nodes when
12272         HOST_BITS_PER_WIDE_INT is >= 64 bits.
12273         (signed_type): Likewise.
12274         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
12275         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
12276         (init_decl_processing): Only create TItype nodes when
12277         HOST_BITS_PER_WIDE_INT is >= 64 bits.
12278         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
12279         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
12280
12281 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12282
12283         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
12284         (gxx.gperf): Update comments describing invocation flags.
12285         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
12286
12287 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
12288
12289         * class.c (finish_struct_1): Add commentary on previous change.
12290
12291         * cp-tree.h (vtbl_ptr_type_node): New variable.
12292         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
12293         already of the right type.
12294         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
12295         Simplify code to grow vtable.
12296         * decl.c (vtbl_ptr_type_node): Define.
12297         (init_decl_processing): Initialize it.
12298
12299 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
12300
12301         * cp-tree.def (PTRMEM_CST): New tree node.
12302         * cp-tree.h (ptrmem_cst): New type.
12303         (lang_type): Remove local_typedecls.
12304         (dummy): Increase to 12 bits from 11.
12305         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
12306         (PTRMEM_CST_CLASS): New macro.
12307         (PTRMEM_CST_MEMBER): Likewise.
12308         (current_access_specifier): New variable.
12309         (current_class_type): Remove duplicate declaration.
12310         (finish_struct): Change prototype.
12311         (unreverse_member_declarations): New function.
12312         (pushdecl_class_level): Change prototype.
12313         (grok_enum_decls): Remove.
12314         (fixup_anonymous_union): New function.
12315         (grok_x_components): Change prototype.
12316         (tsubst_chain): Remove.
12317         (finish_member_template_decl): Likewise.
12318         (check_explicit_specialization): Fix indentation.
12319         (finish_class_definition): Change prototype.
12320         (finish_member_class_template): Likewise.
12321         (finish_member_declaration): New function.
12322         (check_multiple_declarators): Likewise.
12323         * class.c (class_stack_node_t): New type.
12324         (current_class_base): Remove.
12325         (current_class_stack): Change type.
12326         (current_access_specifier): New variable.
12327         (grow_method): Remove.
12328         (check_member_decl_is_same_in_complete_scope): Break out from
12329         finish_struct.
12330         (make_method_vec): New function.
12331         (free_method_vec): Likewise.
12332         (add_implicitly_declared_members): Break out from finish_struct_1.
12333         (free_method_vecs): New variable.
12334         (add_method): Rework for direct use from parser.
12335         (handle_using_decl): Watch for NULL_TREE while iterating through
12336         CLASSTYPE_METHOD_VEC.
12337         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
12338         just do some error-checking.
12339         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
12340         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
12341         (finish_struct): Change prototype.  Simplify; fields and methods
12342         are already set up at this point.
12343         (init_class_processing): Set up current_class_stack.
12344         (pushclass): Save current_access_specifier.
12345         (popclass): Restore it.
12346         (currently_open_class): Simplify.
12347         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
12348         * decl.c (saved_scope): Add access_specifier.
12349         (maybe_push_to_top_level): Save it.
12350         (pop_from_top_level): Restore it.
12351         (maybe_process_template_type_declaration): Use
12352         finish_member_declaration.
12353         (pushtag): Likewise.
12354         (pushdecl_class_level): Don't return a value.
12355         (fixup_anonymous_union): Break out from grok_x_components.
12356         (shadow_tag): Use it.
12357         (xref_tag): Complain about using an elaborated type specifier to
12358         reference a template type parameter or typedef name.
12359         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
12360         (current_local_enum): Remove.
12361         (build_enumerator): Call finish_member_declaration.
12362         (grok_enum_decls): Remove.
12363         * decl2.c (grok_x_components): Simplify.
12364         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
12365         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
12366         (merge_functions): Add to comment.
12367         (arg_assoc_type): Prototype.
12368         (arg_assoc): Pass as many arguments as there are parameters.
12369         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
12370         OFFSET_REF.
12371         * expr.c (cpls_expand_expr): Remove dead code.  Handle
12372         PTRMEM_CST.
12373         * friend.c (do_friend): Lookup friends when in nested classes.
12374         Change comments.
12375         * init.c (build_offset_ref): Do lookup even for classes that are
12376         only partially defined.
12377         (decl_constant_value): Remove dead code.
12378         * method.c (build_overload_value): Remove hack where by TYPE was
12379         not a TYPE.  Handle PTRMEM_CST.
12380         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
12381         should go.
12382         * parse.y (components, notype_components, component_decl,
12383         component_decl_1, component_declarator, component_declarator0):
12384         Now all are itype rather than ttype.  Rework to add members to
12385         classes on the fly.
12386         (typesqpecqual_reserved): Use check_multiple_declarators.
12387         (structsp): Update class to finish_class_definition.
12388         (do_xref_defn): Unsplit into named_class_head.
12389         (access_specifier): Set current_access_specifier.
12390         * pt.c (set_current_access_from_decl): New function.
12391         (finish_member_template_decl): Don't take the parameters.
12392         (comp_template_args): Make more robust.
12393         (lookup_template_class): Don't use current_local_enum.
12394         (for_each_template_parm): Handle PTRMEM_CST.
12395         (instantiate_class_template): Use set_current_access_from_decl,
12396         finish_member_declaration and unreverse_member_declarations.  Set
12397         lineno/input_filename before generating implicit member functions.
12398         (type_unification_real): Don't assume back-unification happens
12399         only for the last argument.
12400         (regenerate_decl_from_template): Call pushclass a bit earlier.
12401         (tsubst_chain): Remove.
12402         (tsubst_enum): Use set_current_access_from_decl.
12403         (set_mangled_name_for_template_decl): Fix indentation.
12404         * search.c (lookup_fnfields_1): Change iteration through
12405         CLASSTYPE_METHOD_VEC.
12406         (dfs_pushdecls): Likewise.
12407         (dfs_compress_decls): Likewise.
12408         (add_conversions): Likewise.
12409         * semantics.c (finish_class_definition): Don't take components.
12410         Change call to finish_struct.
12411         (finish_member_declaration): New function.
12412         (finish_member_class_template): Don't take template parameters.
12413         Change call to grok_x_components.  Call finish_member_template_decl.
12414         (check_multiple_declarators): New function.
12415         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
12416         a passed in fieldlist.
12417         * tree.c (search_tree): Handle PTRMEM_CST.
12418         (mapcar): Likewise.
12419         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
12420         INTEGER_CSTs, for pointer-to-data members.
12421
12422         * call.c (resolve_args): Resolve template specializations, if
12423         possible.
12424
12425 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12426
12427         * Makefile.in (spew.o): Depend on toplev.h.
12428
12429         * call.c (compare_ics): Initialize variables `deref_from_type2',
12430         `deref_to_type1' and `deref_to_type2'.
12431
12432         * except.c (get_eh_type): Hide prototype and definition.
12433         (process_start_catch_block_old): Remove unused static prototype.
12434
12435         * pt.c (tsubst_decl): Initialize variable `argvec'.
12436
12437         * spew.c: Include toplev.h.
12438
12439 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
12440
12441         * pt.c (instantiate_decl): Do save and restore file position.
12442
12443 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12444
12445         * method.c (build_decl_overload_real): Clear
12446         numeric_output_need_bar after __.
12447
12448 1998-10-05  Nathan Sidwell  <nathan@acm.org>
12449
12450         * call.c (build_new_method_call): Issue 'incomplete type' error,
12451         if class is not defined.
12452
12453 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12454
12455         * call.c (build_object_call): Move declaration of variable
12456         `fn' into the scope where it is used.  Don't access variable
12457         `fn' when it is uninitialized, instead use `fns'.
12458
12459 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
12460
12461         * errfn.c (cp_thing): Print buf as a string not as a printf format
12462         to avoid problems with the operator%.  Consequently, `%%' sequences
12463         in format are copied as `%' in buf.
12464
12465 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
12466
12467         * pt.c (pop_tinst_level): Call extract_interface_info.
12468         (instantiate_decl): Don't save and restore file position.
12469
12470         * decl.c (cp_finish_decl): Make statics in extern inlines and
12471         templates common, if possible and the target doesn't support weak
12472         symbols.
12473
12474         * decl.c (grokdeclarator): Remove redundant calls to
12475         build_type_variant and some duplicated code.
12476         * sig.c (build_signature_reference_type): Only take the type parm.
12477         (build_signature_pointer_type): Likewise.
12478         * tree.c (build_cplus_method_type): Adjust.
12479         * cp-tree.h: Update.
12480
12481 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
12482
12483         * call.c (build_over_call): Make pedwarns about dropped qualifiers
12484         into full-fledged errors.
12485         * cvt.c (convert_to_reference): Likewise.
12486         * typeck.c (convert_for_assignment): Likewise.
12487
12488         * search.c (expand_upcast_vtables): In addition to unsetting
12489         TREE_READONLY, remove top-level const type qualifier.
12490
12491 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
12492
12493         * class.c (current_class_ptr, current_class_ref): Clarify
12494         documentation.
12495         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
12496         NOP type conversions.
12497         * decl.c (decls_match): Use comptypes directly; ignore
12498         qualifiers on the DECL.
12499         (duplicate_decls): Remove qualifier checks on DECL.
12500         (grokdeclarator): Make the type built up include top-level
12501         qualifiers.
12502         * decl2.c (do_dtors): Fix spelling error.
12503         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
12504         when printing type information.
12505         * init.c (build_new_1): Add documentation.  Deal with the fact
12506         that type of allocated memory now contains qualifiers.
12507         * lex.c (is_global): Improve error-recovery.
12508         * sig.c (build_member_function_pointer): Don't cast away const
12509         on fields of sigtable_entry_type.
12510         * tree.c (lvalue_type): Don't look at top-level qualifiers on
12511         expressions.
12512         * typeck.c (decay_conversion): Likewise.
12513         (build_component_ref): Make sure the type of the COMPONENT_REF
12514         contains top-level qualifiers, as appropriate.  Improve
12515         error-handling.
12516         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
12517         (build_array_ref): Likewise.
12518         (build_unary_op): Improve error-recovery.
12519         (unary_complex_lvalue): Make taking the address a bound member
12520         function an error, not a sorry.
12521         (build_conditional_expr): Look at the type qualifiers, not the
12522         qualifiers on the expression itself.
12523
12524 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
12525
12526         * decl2.c (merge_functions): Remove duplicates.
12527
12528         * decl2.c: Add -f{no-,}implicit-inline-templates.
12529         (import_export_decl): Check it.
12530
12531         * decl.c (lookup_name_real): Template parms also take precedence
12532         over implicit typename.  Only warn if yylex.
12533
12534         * typeck.c (build_conditional_expr): Only fold if ifexp is an
12535         INTEGER_CST.
12536
12537         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
12538         instead of linkage.
12539
12540 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
12541
12542         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
12543         * class.c (build_vbase_pointer): Use it.
12544         * rtti.c (expand_class_desc): Likewise.
12545         * tree.c (build_vbase_pointer_fields): Likewise.
12546
12547 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
12548
12549         * decl.c (start_decl): Add invocation of
12550         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
12551         (start_function): Add invocation of
12552         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
12553
12554         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
12555         HANDLE_GENERIC_PRAGMAS.
12556
12557 1998-09-28  Anthony Green  <green@cygnus.com>
12558
12559         * semantics.c (finish_asm_stmt): Always permit volatile asms.
12560
12561 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
12562
12563         * decl.c (grokdeclarator): Tighten checks for invalid
12564         destructors.  Improve error-messages and error-recovery.
12565         * decl2.c (check_classfn): Don't assume that mangled destructor
12566         names contain type information.
12567
12568 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
12569
12570         * search.c (get_base_distance): Remove assert.
12571
12572         * decl2.c (build_anon_union_vars): Don't process a field with no
12573         name.
12574         (finish_anon_union): Also complain about local anon unions with no
12575         members.
12576
12577 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12578
12579         * decl.c (lookup_namespace_name): If the name is a namespace,
12580         return it immediately.
12581
12582 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12583
12584         * cp-tree.h (define_case_label): Remove unused parameter.
12585         (check_java_method): Likewise.
12586         (grokclassfn): Likewise.
12587         (expand_aggr_init): Likewise.
12588         (build_x_delete): Likewise.
12589         (maybe_end_member_template_processing): Likewise.
12590         (unshare_base_binfos): Add prototype.
12591         (string_conv_p): Likewise.
12592         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
12593
12594         * cvt.c (build_up_reference): Remove unused parameter
12595         `checkconst', all callers changed.
12596         (build_type_conversion): Mark parameter `code' with
12597         ATTRIBUTE_UNUSED.
12598         (build_expr_type_conversion): Initialize variable `conv'.
12599
12600         * decl.c (push_namespace): Initialize variable `d'.
12601         (define_case_label): Remove unused parameter `decl', all callers
12602         changed.
12603
12604         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
12605         `argc' with ATTRIBUTE_UNUSED.
12606         (grokclassfn): Remove unused parameter `cname', all callers
12607         changed.
12608         (check_java_method): Likewise for parameter `ctype'.
12609         (copy_assignment_arg_p): Mark parameter `virtualp' with
12610         ATTRIBUTE_UNUSED.
12611         (finish_prevtable_vardecl): Likewise for parameter `prev'.
12612
12613         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
12614
12615         * init.c (expand_aggr_init_1): Remove unused parameter
12616         `alias_this', all callers changed.
12617         (expand_aggr_init): Likewise.
12618         (expand_default_init): Likewise.
12619         (build_new_1): Initialize variable `susp'.
12620         (build_x_delete): Remove unused parameter `type', all callers
12621         changed.
12622
12623         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
12624         ATTRIBUTE_UNUSED.
12625         (readescape): Use (unsigned) value in shift.
12626         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
12627         comparing to a signed quantity.
12628
12629         * pt.c (maybe_end_member_template_processing): Remove unused
12630         parameter `decl', all callers changed.
12631         (check_explicit_specialization): Add braces around empty body in
12632         an else-statement.
12633         (current_template_args): Initialize variable `args'.
12634         (lookup_template_class): Likewise for variable `prev_local_enum'.
12635         (tsubst_decl): Likewise for variable `r'.
12636         (set_mangled_name_for_template_decl): Initialize variable
12637         `context'.
12638
12639         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
12640         Likewise for variable `i'.
12641         (yylex): Initialize variable `trrr'.
12642
12643         * typeck.c (compparms): Mark variable `strict' with
12644         ATTRIBUTE_UNUSED.
12645
12646         * xref.c (simplify_type): Cast argument of ctype function to
12647         `unsigned char'.
12648
12649 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
12650
12651         * cp-tree.h (language_lvalue_valid): Remove.
12652         * decl.c (grokdeclarator): Don't disallow references to functions.
12653         * tree.c (lvalue_p_1): New function, combining duplicated
12654         code from ...
12655         (lvalue_p): Use it.
12656         (real_lvalue_p): Likewise.
12657         * typeck.c (language_lvalue_valid): Remove.
12658         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
12659         they don't have TREE_READONLY set.
12660         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
12661
12662 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
12663
12664         * spew.c (yylex): Give diagnostic.
12665         * hash.h (is_reserved_word): Add export.
12666         * gxx.gperf: Likewise.
12667         * lex.h (rid): Add RID_EXPORT.
12668         * lex.c (init_parse): Likewise.
12669
12670 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
12671
12672         * friend.c (do_friend): Make warning a full sentence.
12673
12674 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
12675
12676         * parse.y (component_decl_list): Improve error-recovery.
12677
12678 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
12679
12680         * decl.c (make_typename_type): Move error to point where name
12681         variable can be used by dump_type.
12682
12683 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
12684
12685         * decl.c (grokfndecl): Improve error-recovery.
12686         * decl2.c (grokfield): Likewise.
12687         * pt.c (finish_member_template_decl): Likewise.
12688
12689 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12690
12691         * method.c (hack_identifier): Finding multiple members is always
12692         an error.
12693
12694 1998-09-21  Per Bothner  <bothner@cygnus.com>
12695
12696         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
12697
12698 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
12699
12700         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
12701
12702 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
12703
12704         * class.c (maybe_warn_about_overly_private_class): Reformat.
12705
12706 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
12707
12708         * exception.cc (__cplus_type_matcher): Realign some code.
12709
12710 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
12711
12712         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
12713         (tinfo2.o): Likewise.
12714         (exception.o): Likewise.
12715         (new.o): Likewise.
12716         (opnew.o): Likewise.
12717         (opnewnt.o): Likewise.
12718         (opvnew.o): Likewise.
12719         (opvnewnt.o): Likewise.
12720         (opdel.o): Likewise.
12721         (opdelnt.o): Likewise.
12722         (opvdel.o): Likewise.
12723         (opvdelnt.o): Likewise.
12724
12725 1998-09-16  Richard Henderson  <rth@cygnus.com>
12726
12727         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
12728
12729 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
12730
12731         * call.c (build_field_call): Handle static data members too.
12732
12733         * typeck.c (comptypes): When comparing pointer types, check
12734         whether referred types match even in strictest modes.
12735
12736 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
12737
12738         * cp-tree.h: Revert previous change.
12739         (finish_struct_methods): Remove declaration.
12740         * class.c: Revert previous change.
12741         (maybe_warn_about_overly_private_class): New function.
12742         (finish_struct_methods): Declare here, and make static.  Remove
12743         unnecessary parameters.  Tidy slightly.  Use
12744         maybe_warn_about_overly_private_class.
12745         (finish_struct_1): Adjust.  Remove check for private constructors,
12746         now done elsewhere.
12747         (finish_struct): Adjust.
12748
12749 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
12750
12751         * except.c (expand_start_catch_block): No need to check for new
12752         exception model.
12753         (process_start_catch_block_old): Deleted.
12754         (process_start_catch_block): Add call to start_decl_1().
12755         (expand_end_catch_block): Add call to end_catch_handler().
12756         * exception.cc (__cplus_type_matcher): Only check the exception
12757         language if there is an exception table.
12758
12759 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
12760
12761         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
12762         as used to prevent conflicts with virtual function tables.
12763
12764 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
12765
12766         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
12767         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
12768         * class.c (maybe_class_too_private_p): New function.
12769         (finish_struct_methods): Use it.
12770         (finish_struct_1): Likewise.
12771         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
12772         appropriate.
12773
12774         * pt.c (check_specialization_scope): Fix spelling error.
12775         (check_explicit_specialization): Remove code to handle explicit
12776         specializations in class scope; they are now correctly diagnosed
12777         as errors.
12778
12779 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
12780
12781         * decl.c (pushdecl): Don't copy types if the
12782         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
12783         type.
12784
12785 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
12786
12787         * class.c (get_enclosing_class): New function.
12788         (is_base_of_enclosing_class): Likewise.
12789         * cp-tree.h (get_enclosing_class): Declare.
12790         (is_base_of_enclosing_class): Likewise.
12791         * pt.c (coerce_template_parms): Use them.
12792
12793 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
12794
12795         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
12796         null to decide whether to use it.
12797
12798         * error.c (dump_type_real): Handle NAMESPACE_DECL.
12799         * parse.y (base_class.1): Avoid crash on error.
12800
12801 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12802
12803         * decl.c (make_typename_type): If context is a namespace, the code
12804         is in error.
12805
12806 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
12807
12808         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
12809
12810 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
12811
12812         * cp-tree.h (anonymous_namespace_name): Declare.
12813         * decl.c: Define it.
12814         (push_namespace): Use anonymous_namespace_name, rather than local
12815         static anon_name.
12816         * error.c (dump_decl): If a namespace is named
12817         anonymous_namespace_name, call it {anonymous}.
12818
12819         * decl.c (grokparms): Distinguish between references and pointers
12820         in error message.
12821
12822 1998-09-08  Richard Henderson  <rth@cygnus.com>
12823             Mark Mitchell  <mark@markmitchell.com>
12824
12825         * pt.c (process_partial_specialization): Consistently allocate
12826         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
12827         tpd.parms, where appropriate.
12828
12829 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
12830
12831         * Makefile.in (INCLUDES): Update after recent toplevel gcc
12832         reorganizations.
12833
12834 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
12835
12836         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
12837         * class.c (finish_struct): Remove hackery to deal with explicit
12838         specializations in class scope.
12839         * decl.c (grokfndecl): Improve error-recovery.
12840         * decl2.c (grokfield): Likewise.
12841         * pt.c (check_specialization_scope): New function.
12842         (begin_specialization): Call it.
12843         (process_partial_specialization): New function, split out from
12844         push_template_decl.  Check partial specializations more
12845         stringently.
12846         (push_template_decl): Call it.
12847         (check_explicit_specialization): Don't attempt to handle explicit
12848         specializations in class scope.
12849         (template_parm_data): Document.  Add current_arg and
12850         arg_uses_template_parms.
12851         (mark_template_parm): Set it.
12852         (tsubst_arg_types): Remove unused variable.
12853         * semantics.c (begin_class_definition): Tweak.
12854
12855 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
12856
12857         * inc/typeinfo (type_info::type_info(const char*)): Make
12858         `explicit'.
12859
12860         * cp-tree.h (hash_tree_cons_simple): New macro.
12861         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
12862         (coerce_template_parms): Use make_temp_vec, instead of
12863         make_tree_vec.  Document this behavior.
12864         (lookup_template_class): Likewise.
12865         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
12866         Remove dead code (and add assertion to check its deadness).  Fix
12867         bug w.r.t. exception specifications.
12868
12869 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
12870
12871         * decl2.c (import_export_vtable): Always make artificials comdat.
12872         (import_export_decl): Likewise.
12873         * pt.c (mark_decl_instantiated): Likewise.
12874
12875 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
12876
12877         * cp-tree.h (finish_globally_qualified_member_call_expr):
12878         Rename to ...
12879         (finish_qualified_call_expr).
12880         * semantics.c: Likewise.
12881         * parse.y (primary): Use it.
12882         * method.c (hack_identifier): Remove redundant code.
12883
12884         * init.c (resolve_offset_ref): Call convert_from_reference to
12885         handle members of reference type.  Improve error recovery.
12886
12887 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
12888
12889         * cp-tree.h: Declare warn_nontemplate_friend.
12890         * decl2.c (lang_decode_option): Set.
12891         * lang-options.h: Add -Wnon-template-friend.
12892         * friend.c (do_friend): Use to toggle non-template function warning.
12893
12894 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
12895
12896         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
12897         corresponding INTEGER_CSTs when processing_template_decl.
12898         * pt.c (tsubst_enum): Tweak accordingly.
12899
12900 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12901
12902         * decl.c (pushdecl_class_level): Add warning here.
12903         (pushdecl): Tweak.
12904
12905 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
12906
12907         * cvt.c (convert_pointer_to_real): Tidy.
12908         * search.c (get_base_distance_recursive): Simplify.
12909         (get_base_distance): Likewise.
12910
12911         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
12912         parms.
12913
12914 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
12915
12916         * lex.c (check_newline):  Call HANDLE_PRAGMA before
12917         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
12918         if unknown pragmas are encountered.
12919         (handle_sysv_pragma): Interpret return code from
12920         handle_pragma_token ().  Return success/failure indication rather
12921         than next unprocessed character.
12922         (pragma_getc): New function: retrieves characters from the
12923         input stream.  Defined when HANDLE_PRAGMA is defined.
12924         (pragma_ungetc): New function: replaces characters back into the
12925         input stream.  Defined when HANDLE_PRAGMA is defined.
12926
12927 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
12928
12929         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
12930         * class.c (build_vtable_entry_ref): Likewise.
12931
12932 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
12933
12934         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
12935         * decl2.c (import_export_decl): Likewise.
12936         * pt.c (instantiate_decl): Use it.
12937
12938 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
12939
12940         * decl.c (lookup_name_real): Also do implicit typename thing for
12941         artificial TYPE_DECLs.
12942         * search.c (lookup_field): Likewise.
12943         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
12944         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
12945         (enter_scope_of): Extract type from implicit typename.
12946         (begin_class_definition): Likewise.
12947         * lex.c (identifier_type): Handle implicit typename when checking
12948         for SELFNAME.
12949
12950         * cp-tree.h: Declare flag_strict_prototype.
12951         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
12952         -fstrict-prototype.
12953         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
12954         specified, set it to the value of pedantic.
12955
12956 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
12957
12958         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
12959
12960 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
12961
12962         * decl.c (finish_enum): Handle member enums of classes declared in
12963         template functions.
12964
12965         * decl2.c (grok_x_components): Strip attributes before calling
12966         groktypename.
12967
12968 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
12969
12970         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
12971         -fenum-int-equivalence and -fno-nonnull-objects.
12972         * class.c (check_for_override): Remove support for -fall-virtual.
12973         (finish_struct_1): Likewise.
12974         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
12975         * typeck.c (build_binary_op_nodefault): Likewise.
12976         * cvt.c (ocp_convert): Likewise.
12977         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
12978         * class.c (build_vbase_path): Likewise.
12979
12980 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
12981
12982         * Makefile.in (INTERFACE): New, set to 1.
12983
12984 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
12985
12986         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
12987         comparing with global_namespace.
12988         (dump_aggr_type): Likewise.
12989
12990         * decl.c (grokfndecl): Issue error on declaration of friend
12991         templates with explicit template arguments.
12992
12993         * pt.c (convert_template_argument): New function, split out
12994         from...
12995         (coerce_template_parms): Here.
12996         (tsubst): Attempt better error-recovery.
12997
12998 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
12999
13000         * pt.c (decl_template_parm_p): Add checks for
13001         TEMPLATE_TEMPLATE_PARM.
13002
13003 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
13004
13005         * lex.c (do_identifier): Fix thinko in previous change.
13006
13007 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
13008
13009         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
13010         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
13011
13012 1998-08-28  Richard Henderson  <rth@cygnus.com>
13013
13014         Add support for discarding unused virtual functions.
13015         * lang-options.h: Add -fvtable-gc.
13016         * cp-tree.h: Add flag_vtable_gc.
13017         * decl2.c (output_vtable_inherit): New fn.
13018         (finish_vtable_vardecl): Call it.
13019         * class.c (build_vtable_entry_ref): New fn.
13020         (build_vtbl_ref): Call it.
13021
13022 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
13023
13024         * cp-tree.h (build_enumerator): Take the enumeration type as a
13025         parameter.
13026         * decl.c (finish_enum): Don't set the TREE_TYPE for the
13027         enumeration constant values if we're processing_template_decls.
13028         Don't set the type for the CONST_DECLs either; that's done in
13029         build_enumerator.
13030         (build_enumerator): Take the enumeration type as a
13031         parameter.
13032         * lex.c (do_identifier): Don't resolve enumeration constants while
13033         processing template declarations, even if they happen to be
13034         TEMPLATE_PARM_INDEXs.
13035
13036         * parse.y (current_enum_type): New variable.
13037         (primary): Don't allow statement-expression in local classes just
13038         as we don't in global classes.
13039         (structsp): Use current_enum_type.
13040         (enum_list): Likewise.
13041         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
13042         finish_enum; they no longer occur.
13043
13044         * cp-tree.h (finish_base_specifier): New function.
13045         * parse.y (base_class): Use it.
13046         * semantics.c (finish_base_specifier): Define it.
13047
13048         * parse.y (structsp): Warn on use of typename outside of template
13049         declarations.
13050
13051 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
13052
13053         * lex.c (handle_cp_pragma): Remove #pragma vtable.
13054         * lang-options.h: Remove +e options.
13055         * decl2.c (lang_decode_option): Likewise.
13056         (import_export_vtable): Don't check write_virtuals.
13057         (finish_vtable_vardecl, finish_file): Likewise.
13058         * search.c (dfs_debug_mark): Likewise.
13059         * semantics.c (begin_class_definition): Likewise.
13060         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
13061
13062         * call.c (build_over_call): Check flag_elide_constructors.
13063         * decl2.c: flag_elide_constructors defaults to 1.
13064         * typeck.c (convert_arguments): Remove return_loc parm.
13065         (build_function_call_real): Adjust.
13066
13067         * search.c: Tear out all mi_matrix and memoize code.
13068         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
13069         * lang-options.h: Remove documentation for -fhandle-exceptions,
13070         -fmemoize-lookups and -fsave-memoized.
13071         * cp-tree.h: Lose mi_matrix and memoize support.
13072         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
13073         * class.c: Lose struct class_level.
13074         (pushclass, popclass): Lose memoize support.
13075         * init.c (build_offset_ref): Likewise.
13076
13077         Never change BINFO_INHERITANCE_CHAIN.
13078         * init.c (emit_base_init): Change modification of
13079         BINFO_INHERITANCE_CHAIN to an assert.
13080         * search.c (get_base_distance_recursive): Likewise.
13081         (get_base_distance): Likewise.
13082         (lookup_member): Likewise.
13083         (convert_pointer_to_single_level): Likewise.
13084         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
13085         (lookup_fnfields): Likewise.
13086         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
13087         (unshare_base_binfos): Don't call propagate_binfo_offsets.
13088         (layout_basetypes): Call propagate_binfo_offsets instead of
13089         unshare_base_binfos.
13090         * decl.c (xref_basetypes): Call unshare_base_binfos.
13091         * pt.c (instantiate_class_template): Likewise.
13092         * tree.c (reverse_path): Remove 'copy' parm; always make a
13093         temporary copy.
13094         * class.c (build_vbase_path): Just call it.
13095         * search.c (compute_access): Likewise.  Don't re-reverse.
13096
13097 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
13098
13099         * class.c (build_vbase_path): Use reverse_path.
13100         (finish_base_struct): Move warnings for inaccessible bases to
13101         layout_basetypes.
13102         (modify_one_vtable): Remove check of TREE_USED (binfo).
13103         (fixup_vtable_deltas1): Likewise.
13104         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
13105         (xref_tag): Remove binfos parameter.
13106         (make_binfo): Remove chain parameter.
13107         (reverse_path): Add copy parameter.
13108         * decl.c (init_decl_processing): Change calls to xref_tag.
13109         (xref_tag): Remove binfos parameter.
13110         (xref_basetypes): Change calls to make_binfo.
13111         * decl2.c (grok_x_components): Change calls to xref_tag.
13112         (handle_class_head): Likewise.
13113         * friend.c (do_friend): Likewise.
13114         * lex.c (make_lang_type): Change calls to make_binfo.
13115         * parse.y (structsp): Change calls to xref_tag.
13116         (named_complex_class_head_sans_basetype): Likewise.
13117         (named_class_head): Likewise.
13118         * rtti.c (init_rtti_processing): Likewise.
13119         * search.c (compute_access): Change calls to reverse_path.
13120         (dfs_get_vbase_types): Change calls to make_binfo.
13121         (get_vbase_types): Remove dead code.
13122         * tree.c (unshare_base_binfos): Change calls to make_binfo.
13123         (layout_basetypes): Warn here about inaccessible bases.
13124         (make_binfo): Remove chain parameter.
13125         (reverse_path): Add copy parameter.
13126
13127 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
13128
13129         * class.c: #if 0 complete_type_p.
13130         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
13131         * method.c (process_overload_item): Likewise.
13132         * typeck.c (comp_target_types): Likewise.
13133
13134         Stop sharing binfos for indirect virtual bases.
13135         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
13136         (layout_basetypes): Likewise.
13137         (unshare_base_binfos): Copy vbases, too.
13138         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
13139         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
13140         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
13141         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
13142         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
13143         reference to BINFO_VIA_PUBLIC.
13144         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
13145         (push_class_decls): Use them.
13146         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
13147         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
13148
13149 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
13150
13151         * decl.c (build_enumerator): Set DECL_CONTEXT for the
13152         CONST_DECLs.
13153
13154 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
13155
13156         * cp-tree.h (finish_enum): Change prototype.
13157         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
13158         VALUES parameter.  Don't try to compute mins/maxs if
13159         processing_template_decl.
13160         * parse.y (structsp): Use new calling sequence for finish_enum.
13161         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
13162         (lookup_template_class): Remove unused variables.  Tweak.
13163         Register enums on instantiation list before substituting
13164         enumeration constants.
13165         (tsubst_decl): Remove unused variables.
13166         (regenerate_decl_from_template): Likewise.
13167
13168         * decl.c (duplicate_decls): Don't obliterate the
13169         DECL_TEMPLATE_INFO for a template if we're not replacing it with
13170         anything.
13171
13172         * lex.c (do_identifier): Fix typo in comment.
13173
13174 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13175
13176         * errfn.c: Remove stdarg.h/varargs.h.
13177         * tree.c: Likewise.
13178
13179 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
13180
13181         * pt.c (tsubst_copy): Only do typename overloading on an
13182         IDENTIFIER_NODE that happens to look like a typename if it actually
13183         has a type for us to use.
13184
13185 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
13186
13187         * typeck.c (comp_cv_target_types): Split out...
13188         (comp_target_types): From here.  Don't allow cv-qual changes under
13189         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
13190         (build_ptrmemfunc): Pass 1 to nptrs.
13191         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
13192
13193 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
13194
13195         * search.c (dependent_base_p): Don't compare a binfo to
13196         current_class_type; use the TREE_TYPE of the binfo instead.
13197
13198         * cp-tree.h (CLASS_TYPE_P): Revise definition.
13199
13200 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
13201
13202         * decl.c (duplicate_decls): Don't complain about different
13203         exceptions from an internal decl even if pedantic.
13204
13205         * typeck.c (convert_for_assignment): Converting from pm of vbase
13206         to derived is an error, not a sorry.
13207
13208         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
13209         * class.c (fixed_type_or_null): Rename from
13210         resolves_to_fixed_type_p.  Return the dynamic type of the
13211         expression, if fixed, or null.
13212         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
13213         does not match the static type.
13214         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
13215         resolves_to_fixed_type_p again.
13216
13217 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
13218
13219         * pt.c (tsubst_decl): Move special case code for dealing with
13220         tricky friend templates here from ...
13221         (regenerate_decl_from_template): Here.
13222
13223 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
13224
13225         * decl.c (start_decl): Remove redundant linkage check.
13226
13227 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
13228
13229         * typeck.c (c_expand_return): Handle the case that valtype
13230         is wider than the functions return type.
13231
13232 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
13233
13234         * cp-tree.h (CLASS_TYPE_P): New macro.
13235         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
13236         * pt.c (process_template_parm): Undo previous change.
13237
13238 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
13239
13240         * cp-tree.h: Declare.
13241         * pt.c (decl_template_parm_p): New function.
13242         * decl.c (pushdecl): Check decls for redeclaring template parms.
13243         (xref_tag): Make redeclaration an error, print decl.
13244         * decl2.c (grokfield): Check field_decls for redeclaration as well.
13245
13246 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
13247
13248         * parse.y (primary): Fix up the type of string constants.
13249
13250 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
13251
13252         * typeck.c (convert_for_initialization): Move check for odd uses
13253         of NULL to avoid duplicate warnings.
13254
13255 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
13256
13257         * tree.c (lvalue_type): Fix for arrays.
13258         * typeck.c (string_conv_p): New fn.
13259         (convert_for_assignment): Use it.
13260         (build_unary_op): Use lvalue_type.
13261         * call.c (standard_conversion, convert_like): Use string_conv_p.
13262         (add_function_candidate): Use lvalue_type.
13263         * cvt.c (convert_to_reference): Likewise.
13264         * decl2.c (lang_decode_option): Ignore -traditional.
13265         * decl.c (init_decl_processing): flag_writable_strings inhibits
13266         flag_const_strings.
13267
13268 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
13269
13270         * lang-options.h (lang_options): Add fconst-strings to the list
13271         of valid options.
13272         * decl2.c (lang_f_options, lang_decode_option): Likewise.
13273
13274 1998-08-24  Nathan Sidwell  <nathan@acm.org>
13275
13276         * lex.c (real_yylex): Don't warn about long long constants if
13277         we're allowing long long.
13278
13279 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13280
13281         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
13282         accessing bindings directly.
13283
13284         * search.c (my_tree_cons): Reimplement.
13285
13286         * lang-specs.h: Remove __HONOR_STD.
13287         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
13288
13289 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
13290
13291         * decl.c (grokdeclarator): Complain about in-class initialization
13292         of aggregates and/or references.
13293         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
13294         TEMPLATE_TYPE_PARMs.
13295
13296         * decl2.c (grok_array_decl): Add comment.
13297         (mark_used): Don't instantiate an explicit instantiation.
13298         * friend.c (make_friend_class): Remove bogus comment.  Fix check
13299         for partial specializations.
13300         * pt.c (check_explicit_specialization): Don't
13301         SET_DECL_EXPLICIT_INSTANTIATION here.
13302         (mark_decl_instantiated): Or here.
13303         (do_decl_instantiation): Do it here, instead.  Add checks for
13304         duplicate explicit instantiations, etc.  Tidy.
13305         (do_type_instantiation): Likewise.
13306         (instantiate_decl): Improve comments.  Complain about explicit
13307         instantiations where no definition is available.
13308
13309         * cp-tree.h (ansi_null_node): Remove.
13310         * call.c (build_over_call): Warn about converting NULL to an
13311         arithmetic type.
13312         * cvt.c (build_expr_type_conversion): Likewise.  Use
13313         null_ptr_cst_p instead of expanding it inline.
13314         * decl.c (ansi_null_node): Remove.
13315         (init_decl_processing): Make null_node always have integral type.
13316         * except.c (build_throw): Warn about converting NULL to an
13317         arithmetic type.
13318         * lex.c (init_parse): Remove handling of ansi_null_node.
13319         * pt.c (type_unification_real): Don't convert NULL to void* type.
13320         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
13321         (convert_for_assignment): Warn about converting NULL to an
13322         arithmetic type.
13323         (convert_for_initialization): Likewise.
13324
13325 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
13326
13327         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
13328         * pt.c (coerce_template_parms): Use no_linkage_check.
13329         * decl.c (grokvardecl): Likewise.
13330         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
13331
13332         * method.c (process_overload_item): Remove useless code.
13333
13334 1998-08-20  Per Bothner  <bothner@cygnus.com>
13335
13336         Handle new'ing of Java classes.
13337         * init.c (build_class_classref):  New function.
13338         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
13339         constructor does not return this;  don't need to exception-protect.
13340
13341         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
13342         * decl2.c (acceptable_java_type):  Handle template-derived types.
13343
13344 1998-08-20  Per Bothner  <bothner@cygnus.com>
13345
13346         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
13347
13348 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
13349
13350         * decl.c (duplicate_decls): Always merge the old and new patterns
13351         for templates, regardless of whether or not the new one has
13352         DECL_INITIAL.  Don't throw away specializations.  Merge
13353         DECL_SAVED_TREE.
13354         * pt.c (tsubst_decl): Use the right pattern when calculating the
13355         complete args for a new template instance.
13356         (do_decl_instantiation): Fix typo in comment.
13357         (regenerate_decl_from_template): Deal with tricky friend template
13358         case.
13359         (instantiate_decl): Likewise.
13360
13361 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
13362
13363         * init.c (build_builtin_delete_call): Add missing assemble_external
13364         call.
13365
13366 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
13367
13368         * parse.y (notype_unqualified_id): Also accept ~A<int>.
13369
13370 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
13371
13372         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
13373         arithmetic.
13374         * except.c (build_throw): Warn when NULL is thrown, even with
13375         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
13376         thrown expression.
13377
13378         * cp-tree.h (ansi_null_node): New variable.
13379         * decl.c (ansi_null_node): New variable.
13380         (init_decl_processing): Initialize its type.
13381         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
13382         for null_node in non-ANSI mode.
13383         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
13384         place of null_node to avoid spurious errors.
13385
13386 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
13387
13388         * cp-tree.h (enter_scope_of): New function.
13389         * parse.y (complex_direct_notype_declarator): Use it.
13390         * semantics.c (enter_scope_of): New function.
13391
13392 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
13393
13394         * decl.c (grokparms): No, here.
13395
13396         * decl.c (grokdeclarator): Catch parm with pointer to array of
13397         unknown bound here...
13398         * method.c (process_overload_item): ...not here.
13399
13400         * gxxint.texi: Remove obsolete documentation of overloading code.
13401
13402         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
13403         * class.c (finish_struct_bits): Likewise.
13404
13405         * tree.c (lvalue_type): Fix for arrays.
13406         * typeck.c (build_unary_op): Use lvalue_type.
13407         * call.c (add_function_candidate): Likewise.
13408         * cvt.c (convert_to_reference): Likewise.
13409
13410         * decl2.c (lang_decode_option): Ignore -traditional.
13411
13412         * init.c (build_offset_ref): Don't mess with error_mark_node.
13413         * lex.c (do_scoped_id): Use cp_error.
13414
13415         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
13416
13417 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13418
13419         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
13420
13421 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
13422
13423         * cp-tree.h (set_identifier_local_value): Provide prototype.
13424
13425         * decl2.c (do_namespace_alias): Remove unused variables `binding'
13426         and `old'.
13427
13428 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
13429
13430         * Makefile.in: Rename BBISON to BISON so that it can be properly
13431         inherited from the parent makefile.
13432
13433 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
13434
13435         * lang-options.h: Add -finit-priority.
13436         * decl2.c: Likewise.  Check flag_init_priority instead of
13437         USE_INIT_PRIORITY.
13438
13439         * decl2.c (setup_initp): New fn.
13440         (start_objects, finish_objects, do_ctors): Handle init_priority.
13441         (do_dtors, finish_file): Likewise.
13442
13443 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
13444
13445         * pt.c (tsubst_copy): Hush warning.
13446
13447         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
13448
13449 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
13450
13451         * pt.c (print_template_context): Don't abort when instantiating a
13452         synthesized method.
13453
13454         * decl.c (grokdeclarator): Issue errors on namespace qualified
13455         declarators in parameter lists or in class scope.
13456
13457 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
13458
13459         * pt.c (check_explicit_specialization): Don't abort on bogus
13460         explicit instantiations.
13461
13462 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
13463
13464         * typeck.c (require_complete_type): Use complete_type_or_else.
13465         (complete_type_or_else): Always return NULL_TREE on failure, as
13466         documented.
13467
13468         * pt.c (tsubst_aggr_type): Prototype.
13469         (tsubst_decl): New function, split out from tsubst.  Set
13470         input_filename and lineno as appropriate.
13471         (pop_tinst_level): Restore the file and line number saved in
13472         push_tinst_level.
13473         (instantiate_class_template): Set input_filename and lineno as
13474         appropriate.
13475         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
13476         context for a TYPENAME_TYPE is complete.
13477
13478         * decl2.c (grokbitfield): Issue errors on bitfields declared with
13479         function type.
13480         (do_dtors): As in do_ctors, pretend to be a member of the same
13481         class as a static data member while generating a call to its
13482         destructor.
13483
13484         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
13485         conversions, even in complex virtual base class hierarchies.
13486
13487 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
13488
13489         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
13490         (TYPE_TEMPLATE_INFO): Likewise.
13491         (SET_TYPE_TEMPLATE_INFO): Likewise.
13492         (ENUM_TI_TEMPLATE): Likewise.
13493         (ENUM_TI_ARGS): Likewise.
13494         (lookup_nested_type_by_name): Remove.
13495         * decl.c (maybe_process_template_type_declaration): Handle enums.
13496         (start_enum): Don't check for primary-template enum declarations
13497         here.
13498         (finish_enum): Clean up, document.  Make sure template enum
13499         constants get the correct type.
13500         (build_enumerator): Copy initializers for template enumerations,
13501         too.
13502         (grok_enum_decls): Document.
13503         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
13504         better.  Build LOOKUP_EXPRs for local variables, even if they are
13505         TREE_PERMANENT.
13506         * pt.c (tsubst_enum): Remove field_chain parameter.
13507         (template_class_depth): Include the depth of surrounding function
13508         contexts.
13509         (push_template_decl): Check for primary-template enum declarations
13510         here.  Deal with enumeration templates.
13511         (lookup_template_class): Likewise.
13512         (for_each_template_parm): Likewise.
13513         (instantiate_class_template): Don't call tsubst_enum directly,
13514         call tsubst instead, to instantiate enums.  Deal with all
13515         field_chain issues here, not in tsubst_enum.
13516         (lookup_nested_type_by_name): Remove.
13517         (tsubst_aggr_type): Revise handling of enumeration types.
13518         (tsubst): Likewise.
13519         (tsubst_copy): Likewise.
13520         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
13521
13522 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
13523
13524         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
13525         uses template parameters.
13526         * method.c (build_template_parm_names): Use the full set of
13527         template arguments for tsubst'ing.
13528         (build_overload_identifier): Pass the full set of template
13529         arguments to build_template_parm_names, not just the
13530         innermost_args.
13531         * pt.c (TMPL_ARGS_DEPTH): Define using
13532         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
13533         (NUM_TMPL_ARGS): New macro.
13534         (add_outermost_template_args): Deal with the case where the outer
13535         args will be completely discarded.
13536         (coerce_template_parms): Use the full set of template arguments
13537         for tsubst'ing.  Simplify.  Add some asserts.  Improve
13538         error messages.
13539         (lookup_template_class): Pass the full set of template arguments
13540         to coerce_template_parms.
13541         (tsubst): Add assertion.
13542         (do_type_instantiation): Don't instantiate member template
13543         classes.
13544
13545         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
13546         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
13547
13548 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
13549
13550         * method.c (set_mangled_name_for_decl): Change return type to void.
13551
13552         * decl.c (lookup_name_real): A namespace-level decl takes priority
13553         over implicit typename.  Avoid doing the same lookup twice.
13554
13555         * search.c (dependent_base_p): New fn.
13556         (dfs_pushdecls, dfs_compress_decls): Use it.
13557
13558         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
13559         virtual functions if the type doesn't have any.
13560
13561 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
13562
13563         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
13564         uses template parameters.
13565
13566 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
13567
13568         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
13569         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
13570         * lex.c (do_identifier): Don't use a second argument, or a type,
13571         when building LOOKUP_EXPRs.
13572         (do_identifier): Likewise.
13573         (do_scoped_id): Likewise.
13574         * method.c (hack_identifier): Improve error message.
13575         * pt.c (lookup_template_function): Don't needlessly call
13576         copy_to_permanent or build_min.
13577         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
13578         necessary.
13579         (do_decl_instantiation): Improve error message.
13580         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
13581         (build_min): Copy the type to the permanent obstack, too.
13582
13583 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
13584
13585         * init.c (init_init_processing): Remove BI* handling.
13586         (build_builtin_call): Remove.
13587         (build_builtin_delete_call): New fn.
13588         (build_delete): Use it.
13589
13590 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
13591
13592         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
13593         (maybe_check_template_type): New function.
13594         * decl.c (maybe_process_template_type_declaration): New function,
13595         split out from pushtag  Call maybe_check_template_type.
13596         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
13597         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
13598         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
13599         * pt.c (template_class_depth_real): Generalization of ...
13600         (template_class_depth): Use it.
13601         (register_specialization): Use duplicate_decls for duplicate
13602         declarations of specializations.
13603         (maybe_check_template_type): New function.
13604         (push_template_decl_real): Fix comment.
13605         (convert_nontype_argument): Likewise.
13606         (lookup_template_class): Likewise.  Avoid an infinite loop on
13607         erroneous code.
13608         (tsubst_friend_function): Fix comment.
13609         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
13610         an IDENTIFIER_NODE.
13611         * semantics.c (begin_function_definition): Use
13612         reset_specialization to note that template headers don't apply
13613         directly to declarations after the opening curly for a function.
13614
13615 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
13616
13617         * decl.c (push_overloaded_decl): Use current_namespace instead of
13618         DECL_CONTEXT (decl) to determine where we go.
13619
13620         * decl.c (lookup_name_real): Fix typo.
13621
13622 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
13623
13624         * friend.c (is_friend): Be lenient with member functions to deal
13625         with nested friends.
13626
13627 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
13628
13629         * class.c (finish_struct_1): Convert integer_zero_node to
13630         ssizetype before passing it to set_rtti_entry.
13631         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
13632         of any size to a pointer.
13633
13634 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
13635
13636         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
13637         (build_template_decl_overload): Remove.
13638         (set_mangled_name_for_decl): New function.
13639         (innermost_args): Remove is_spec parameter.
13640         (most_specialized, most_specialized_class): Remove declarations.
13641         (lookup_template_class): Add entering_scope parameter.
13642         (maybe_process_partial_specialization): New function.
13643         (finish_template_decl): Likewise.
13644         (finish_template_type): Likewise.
13645         * class.c (finish_struct): Clean up processing of member template
13646         specializations.
13647         * decl.c (pushtag): Fix formatting.
13648         (lookup_tag): Improve handling of pseudo-global levels.
13649         (make_typename_type): Adjust call to lookup_template_class.
13650         (shadow_tag): Use maybe_process_partial_specialization.
13651         (xref_tag): Improve handling of member friends.
13652         (start_function): Call push_nested_class before
13653         push_template_decl.  Don't call push_template_decl for
13654         specializations.
13655         * decl2.c (grok_x_components): Don't call xref_tag for
13656         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
13657         (grokclassfn): Use set_mangled_name_for_decl.
13658         (arg_assoc_class): Adjust call to innermost_args.
13659         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
13660         * error.c (dump_function_name): Improve printing of template
13661         function names.
13662         * friend.c (is_friend): Don't compare types of decls to determine
13663         friendship, unless flag_guiding_decls.
13664         (make_friend_class): Partial specializations cannot be friends.
13665         (do_friend): Use set_mangled_name_for_decl.  Call
13666         push_template_decl_real instead of push_template_decl.
13667         * method.c (build_decl_overload_real): Remove prototype.  Give it
13668         external linkage.
13669         (build_overload_identififer): Adjust call to innermost_args.
13670         (build_template_decl_overload): Remove.
13671         (set_mangled_name_for_decl): New function.
13672         * parse.y (.finish_template_type): New non-terminal.
13673         (template_def): Use finish_template_decl.  Use template_extdef
13674         instead of extdef.
13675         (template_extdef, template_datadef): New non-terminals, containing
13676         only those rules for things which can be templates.
13677         (datadef): Tidy.
13678         (template_type, self_template_type): Use .finish_template_type.
13679         (named_class_head): Use maybe_process_partial_specialization.
13680         * pt.c (mangle_class_name_for_template): Remove context parameter.
13681         (get_class_bindings): Remove outer_args parameter.
13682         (complete_template_args): Remove.
13683         (add_outermost_template_args): New function.
13684         (register_specialization): Return the specialization.
13685         (unregister_specialization): New function.
13686         (tsubst_template_parms): Likewise.
13687         (most_specialized, most_specialized_class): Prototype here as
13688         static.
13689         (original_template): Rename to most_general_template.
13690         (tsubst_template_parms): New function.
13691         (set_mangled_name_for_template_decl): Likewise.
13692         (TMPL_ARGS_DEPTH): New macro.
13693         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
13694         (TMPL_ARGS_LEVEL): New macro.
13695         (SET_TMPL_ARGS_LEVEL): Likewise.
13696         (TMPL_ARG): Likewise.
13697         (SET_TMPL_ARG): Likewise.
13698         (TMPL_ARGS_DEPTH): Likewise.
13699         (finish_member_template_decl): Use finish_template_decl.
13700         (maybe_process_partial_specialization): New function, split out
13701         from tsubst.
13702         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
13703         (maybe_begin_member_template_processing): Use new macros.
13704         (is_member_template): Likewise.
13705         (is_member_template_class): Likewise.
13706         (add_to_template_args): Likewise.  Deal with multiple levels of
13707         args.
13708         (maybe_process_partial_specialization): New function.
13709         (retrieve_specialization): Add consistency check.
13710         (determine_specialization): Return full argument list.
13711         (check_explicit_specialization): Tweak friend handling.  Use full
13712         argument lists.  Simplify.
13713         (current_template_args): Use new macros.
13714         (push_template_decl_real): Change ill-named mainargs to specargs.
13715         Check that a partial specialization actually specializes at least
13716         one parameter.   Improve friend handling.  Modify for full
13717         template arguments.
13718         (classtype_mangled_name): Don't mangle the names of
13719         specializations.
13720         (lookup_template_class): Add entering_scope parameter.  Use it to
13721         avoid finding a template type when an instantiation is required.
13722         Simplify.  Use full template arguments.
13723         (tsubst_friend_function): Use unregister_specialization.  Use new
13724         macros.  Use full template arguments.
13725         (tsubst_friend_class): Substitute, using tsubst_template_parms,
13726         into the template parameters before passing them to
13727         redeclare_class_template.
13728         (instantiate_class_template): Simplify.  Use full template
13729         arguments.  Adjust calls to get_class_bindings.  Use
13730         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
13731         (innermost_args): Use new macros.
13732         (tsubst_aggr_type): New function, split out from tsubst.
13733         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
13734         conventions for lookup_template_class.  Refine handling of partial
13735         instantiations.   Remove calls to complete_template_args.
13736         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
13737         and set_mangled_name_for_template_decl.
13738         (tsubst_copy): Use tsubst_aggr_type.
13739         (instantiate_template): Use full template arguments.
13740         (more_specialized): Improve formatting.
13741         (more_specialized_class): Adjust calls to get_class_bindings.
13742         (get_bindings_real): Don't call complete_template_args.
13743         (most_specialized): Don't overwrite input; create a new list.
13744         (most_specialized_class): Use most_general_template.
13745         (regenerate_decl_from_template): Use unregister_specialization.
13746         Use full template arguments.
13747         (instantiate_decl): Use full template arguments.
13748         (set_mangled_name_for_template_decl): New function.
13749         * semantics.c (begin_class_definition): Use
13750         maybe_process_partial_specialization.
13751         (finish_member_class_template): New function.
13752         (finish_template_decl): Likewise.
13753         (finish_template_type): Likewise.
13754         (typeck.c): Don't crash after issuing a compiler_error.
13755         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
13756
13757 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
13758
13759         * typeck2.c (build_functional_cast): Handle default-initialization.
13760
13761         * call.c (build_over_call): Pass 1 to popclass.
13762
13763         * parse.y (direct_notype_declarator): Add precedence declaration
13764         to notype_unqualified_id case.
13765         * Makefile.in (EXPECT): Adjust.
13766
13767         * tree.c (ovl_member): Fix for single function in OVL.
13768
13769 1998-07-27  Dave Brolley  <brolley@cygnus.com>
13770
13771         * c-lex.c (yylex): Fix boundary conditions in character literal and
13772         string literal loops.
13773
13774 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
13775
13776         * decl.c (lookup_name_real): OK, do return the from_obj value
13777         unless got_object depends on template parms.
13778
13779         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
13780
13781         * pt.c (coerce_template_parms): Also complain about local enums.
13782
13783         * cp-tree.h: Add prototype for set_identifier_local_value.
13784         * decl.c (set_identifier_local_value_with_scope): Make static,
13785         prototype.
13786         * search.c (covariant_return_p): Likewise.
13787         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
13788
13789         * call.c (build_method_call): Only pull out the type of a destructor
13790         if it's a template type parm.
13791         * decl.c (lookup_name_real): Never return the from_obj value.
13792
13793 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
13794
13795         * except.c (process_start_catch_block_old): Call start_decl_1 for
13796         catch parm.
13797         * decl.c (start_decl_1): Avoid duplicate error.
13798
13799         * init.c (expand_default_init): Only perform the initialization if
13800         it will do something.
13801
13802 1998-07-23  H.J. Lu  (hjl@gnu.org)
13803
13804         * parse.y (base_class): Check for invalid base class.
13805
13806 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
13807
13808         * decl2.c (import_export_template): Fold in...
13809         (import_export_class): ...to here.  Handle dllimport/export.
13810
13811         * class.c (build_vtable): Pass at_eof to import_export_vtable.
13812         (prepare_fresh_vtable): Likewise.
13813         * decl2.c (import_export_class): Split out...
13814         (finish_prevtable_vardecl): From here.
13815         * class.c (finish_struct_1): Call import_export_class if at_eof.
13816
13817         * decl.c (start_function): #if 0 mysterious code I wrote and have
13818         forgotten why.
13819         * rtti.c (get_tinfo_fn): If this is for a class type, set
13820         DECL_CONTEXT.
13821
13822 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
13823
13824         * inc/exception: Change terminate and unexpected to ().
13825
13826         * parse.y (named_class_head_sans_basetype_defn): A
13827         named_class_head_sans_basetype followed by '{' or ':' is a defn.
13828
13829 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
13830
13831         * tree.c (canonical_type_variant): New fn to handle arrays.
13832         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
13833         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
13834         * method.c (process_overload_item): Use build_overload_value for
13835         arrays.
13836
13837 1998-07-20  Dave Brolley  <brolley@cygnus.com>
13838
13839         * lex.c (mbchar.h): #include it.
13840         (GET_ENVIRONMENT): New macro.
13841         (init_parse): Set character set based on LANG environment variable.
13842         (real_yylex): Handle multibyte characters in character literals.
13843         (real_yylex): Handle multibyte characters in string literals.
13844
13845 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
13846
13847         * lex.c (do_identifier): Look for class value even if we don't
13848         have a global value.  Do implicit declaration if parsing is 2.
13849         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
13850         lookup.
13851
13852 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
13853
13854         * decl.c (pushtag): Revert previous change.
13855         * pt.c (lookup_template_class): Don't put out debugging
13856         information for types that use template parameters.
13857
13858         * decl.c (pushtag): Don't put out debugging information for
13859         compiler-generated typedefs.
13860
13861         * error.c (dump_type_real): Don't crash when presented with
13862         intQI_type_node or the like.
13863
13864         * semantics.c (finish_translation_unit): Fix spelling error in
13865         comment.
13866
13867 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
13868
13869         * decl.c (lookup_name_real): Pull out single function here.
13870         (select_decl): Not here.
13871         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
13872
13873         * decl.c (qualify_lookup): Tweak again.
13874
13875         * pt.c (lookup_template_class): Don't mess with the context of the
13876         instantiation.
13877         * decl2.c (current_decl_namespace): Remove special handling for
13878         templates.
13879
13880         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
13881         a member template specialization.
13882
13883         * tree.c (ovl_member): Use decls_match to compare functions.
13884         * decl.c (decls_match): Check the context of a function.
13885
13886         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
13887         in Koenig lookup support rules.
13888         * semantics.c (finish_call_expr): Handle the new cases.
13889
13890         * typeck.c (build_x_function_call): Handle overloaded methods.
13891
13892         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
13893
13894 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
13895
13896         * semantics.c (finish_object_call_expr): Revert previous change.
13897         * call.c (build_new_method_call): Likewise.  Instead, convert
13898         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
13899
13900 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
13901
13902         * decl.c (qualify_lookup): Handle templates.
13903
13904         * decl2.c (do_using_directive): Don't pass ancestor.
13905         * decl.c (push_using_directive): Calculate ancestor.
13906
13907         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
13908         * decl.c (pushdecl): Move type shadowing handling from here...
13909         (duplicate_decls): ...to here.
13910         * decl.c (set_identifier_local_value_with_scope): New fn.
13911         (pushdecl): Use it.
13912         (set_identifier_local_value, lookup_type_current_level): New fns.
13913         * decl2.c (do_local_using_decl): Handle types and binding level
13914         stuff properly.
13915
13916         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
13917         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
13918         (lookup_namespace_name): Likewise.
13919         * typeck.c (build_unary_op): Not here anymore.
13920
13921         * decl2.c (do_class_using_decl): Make sure we get an identifier.
13922         * class.c (handle_using_decl): Ignore TYPE_DECLs.
13923
13924         * decl.c (qualify_lookup): New fn.
13925         (lookup_name_real): Use it.
13926
13927 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
13928
13929         * decl2.c (add_using_namespace): When directly using a namespace
13930         that was indirect before, promote it.
13931
13932         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
13933         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
13934         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
13935         * decl.c (select_decl): Replace two flag parameters by one.
13936         (unqualified_namespace_lookup): Likewise, pass flag.
13937         (lookup_flags): New function.
13938         (lookup_name_real): Compute flags, pass them.
13939         (lookup_namespace_name): Call with zero-flag.
13940         * decl2.c (ambiguous_decl): Add flag parameter, complain only
13941         according to flags.
13942         (lookup_using_namespace, qualified_lookup_using_namespace):
13943         Add flag parameter, pass them through.
13944         * lex.c (do_scoped_id): Call with zero-flag.
13945
13946 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
13947
13948         * typeck.c (convert_for_assignment): Use comptypes.
13949
13950 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
13951
13952         * semantics.c (finish_object_call_expr): Move test for the
13953         function called being a TYPE_DECL to ...
13954         * call.c (build_new_method_call): Here.
13955
13956 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
13957
13958         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
13959         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
13960
13961         * lex.c (looking_for_typename): Don't initialize.
13962
13963         * decl2.c (ambiguous_decl): Clarify error message.
13964
13965         * decl.c (push_using_directive): Iterate over namespaces used
13966         indirectly.
13967
13968 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13969
13970         * decl2.c (add_using_namespace): Iterate over namespaces used
13971         indirectly.
13972
13973         * decl.c (lookup_name_real): Accept namespace aliases as locals.
13974         (cat_namespace_levels): Ignore aliases.
13975         (duplicate_decls): Ignore duplicate aliases.
13976         * decl2.c (do_namespace_alias): Process block level namespace
13977         aliases.  Store alias with pushdecl.  Remove odr errors.
13978         * parse.y (namespace_alias): New non-terminal.
13979         (extdef): Use it.
13980
13981 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
13982
13983         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
13984         Handle TEMPLATE_TYPE_PARM.
13985         (arg_assoc): Rewrite.
13986
13987         * pt.c (complete_template_args): Don't look at the context unless
13988         we have to.
13989
13990         * method.c (build_decl_overload_real): Fix namespace handling.
13991
13992         * typeck.c (build_unary_op): Extract a lone function from an
13993         OVERLOAD.
13994
13995         * call.c (build_scoped_method_call): Handle getting a namespace
13996         for basetype in a destructor call.
13997         (check_dtor_name): Handle enums.
13998
13999         * parse.y (using_directive): New nonterminal.
14000         (extdef, simple_stmt): Use it.
14001
14002 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14003
14004         * decl2.c (add_function): Move error message ...
14005         (arg_assoc_namespace): ... from here.
14006
14007 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
14008
14009         * parse.y (namespace_qualifier): Fix multiple level handling.
14010         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
14011         (arg_assoc): Don't skip the first argument of a function.
14012
14013 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
14014
14015         * search.c (my_tree_cons): Clean up.
14016
14017 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
14018
14019         * call.c (joust): Don't warn about "confusing" conversions to the
14020         same type.
14021
14022 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14023
14024         * class.c (push_nested_class): Complain about namespaces.
14025         * decl.c (start_decl): Enter the object's namespace.
14026         (cp_finish_decl): Leave it.
14027         (grokdeclarator): Likewise.
14028         * decl2.c (check_decl_namespace): New function.
14029         (finish_file): Call it.
14030         * parse.y (complex_direct_notype_declarator): Set complexity
14031         of namespace-qualified ids to -1, enter the namespace.
14032
14033         * method.c (build_template_decl_overload): Expect _DECL as first
14034         parameter.  Put context temporarily into current_namespace.
14035         * pt.c (check_explicit_specialization): Change caller.
14036         (tsubst): Likewise.
14037
14038         * init.c (build_offset_ref): Call mark_used and
14039         convert_from_reference for namespace members.
14040
14041 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14042
14043         * search.c (my_tree_cons): The bitfield is at index 2.
14044
14045 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
14046
14047         * lang-options.h: Format changed to work with new --help support
14048         in gcc/toplev.c
14049
14050 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14051
14052         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
14053         Do Koenig lookup in CALL_EXPR.
14054         (arg_assoc): Handle error_mark.
14055         * lex.c (is_global): New function.
14056         (do_identifier): Expect arguments for Koenig lookup.
14057         * parse.y (primary): Add rules for calls of unqualified function calls.
14058         (do_id): Change call of do_identifier.
14059         * pt.c (finish_stmt_expr): Likewise.
14060         * semantics.c (finish_id_expr): Likewise.
14061         (finish_call_expr): Add integer parameter to indicate
14062         argument-dependent lookup.
14063
14064         * decl.c (struct binding_level): New field using_directives.
14065         (push_using_decl): Not sorry anymore.
14066         (push_using_directive): New function.
14067         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
14068         (unqualified_namespace_lookup): New function, code from ...
14069         (lookup_name_real): ... here.
14070         * decl2.c (lookup_using_namespace): Pass using list instead of
14071         initial scope.
14072         (validate_nonmember_using_decl): New function.
14073         (do_nonmember_using_decl): New function.
14074         (do_toplevel_using_decl): Use them.
14075         (do_local_using_decl): New function.
14076         (do_using_directive): Support block-level directives.
14077         * parse.y (simple_stmt): Support using declarations and
14078         directives.
14079         (namespace_qualifier, namespace_using_decl): New non-terminals.
14080
14081         * xref.c (classname): New function.
14082         (GNU_xref_hier): Change class and base parameters to tree.
14083         * decl.c (xref_baseypes): Change caller.
14084         * friend.c (make_friend_class): Likewise.
14085
14086 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
14087
14088         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
14089         comparison.
14090
14091         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
14092         template template parameter, record its use.
14093         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
14094         its template arguments if exists.
14095
14096         * pt.c (coerce_template_template_parms): New function equivalent
14097         to coerce_template_parms when IS_TMPL_PARM is true.
14098         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
14099         all callers changed.
14100
14101         (coerce_template_parms): Access ARGLIST properly when creating a
14102         new vector.  Only accept implicit TYPE_DECL as valid argument for
14103         a template template parameter when it is a base class of
14104         current_class_type.  Don't display error message when COMPLAIN is
14105         false.
14106
14107 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
14108
14109         * repo.c (get_base_filename): Use file_name_nondirectory.
14110         (open_repo_file): Likewise.
14111         * cp-tree.h (file_name_nondirectory): Add prototype.
14112
14113 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
14114
14115         * friend.c (do_friend): Pull the identifier out of declarator.
14116         Use cp_error and friends.
14117         * decl2.c (qualified_lookup_using_namespace): Fix call to
14118         purpose_member.
14119         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
14120         (grokvardecl): Use DECL_CLASS_SCOPE_P.
14121         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
14122         * class.c (warn_hidden): Fix for OVERLOAD.
14123         From grahams@rcp.co.uk:
14124         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
14125         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
14126
14127 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
14128
14129         * g++.1 (-traditional): Remove duplicated documentation.
14130
14131 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
14132
14133         * method.c (flush_repeats): Add nrepeats parameter.
14134         (issue_nrepeats): Likewise.
14135         (is_back_referenceable_type): New function.  Don't back-reference
14136         TEMPLATE_TYPE_PARMs as well as simple types like integers.
14137         (build_mangled_name_for_type): Likewise.
14138         (build_mangled_name_for_type_with_Gcode): Likewise.
14139         (lasttype): Remove.
14140         (nrepeats): Likewise.
14141         (Nrepeats): Likewise.
14142         (start_squangling): Don't clear the variables removed above.
14143         (end_squangling): Likewise.
14144         (flush_repeats): Tidy.  Use nrepeats parameter rather than
14145         Nrepeats global.
14146         (issue_nrepeats): Likewise, but with nrepeats global.  Use
14147         is_backreferenceable_type.
14148         (build_overload_nested_name): Tidy.  Add comment.  Use
14149         build_mangled_name_for_type.
14150         (build_underscore_int): Comment.
14151         (build_overload_scope_ref): Use build_mangled_name_for_type.
14152         (build_overload_int): Likewise.
14153         (build_template_template_parm_names): Tidy.
14154         (build_template_parm_names): Use build_mangled_name_for_type.
14155         (build_overload_identifier): Add comments.
14156         (build_mangled_name_for_type_with_Gcode): Split out from
14157         build_mangled_name.
14158         (build_mangled_name_for_type): Use it.
14159         (build_mangled_name): Rework to use build_mangled_name_for_type
14160         and to not use global nrepeats/Nrepeats.  Tidy.
14161         (process_modifiers): Tidy.
14162         (check_btype): Use is_backreferenceable_type.  Add comment.
14163         Rename `node' to `type'.
14164         (process_overload_item): Set numeric_output_need_bar here.
14165         Use build_mangled_name_for_type.  Tidy.
14166         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
14167         build_mangled_name_for_type.
14168
14169         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
14170         for TYPE_DECLs.
14171
14172 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
14173
14174         * cp-tree.h (warn_long_long): Define.
14175         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
14176         warning "ANSI C++ does not support `long long'".
14177         * decl2.c (warn_long_long): Define.
14178         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
14179
14180 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
14181
14182         * decl.c (xref_tag): Handle attributes between 'class' and name.
14183         * parse.y (aggr): Likewise.
14184         * semantics.c (finish_class_definition): Likewise.
14185         * Makefile.in (EXPECTED): Adjust.
14186
14187         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
14188         * decl2.c: Define them.
14189         (lang_decode_option): Handle them.
14190         * lang-options.h: Add -foptional-diags.
14191         * class.c (finish_struct): Don't complain about multiple meanings of
14192         name if -fno-optional-diags.
14193         * decl.c (pushdecl_class_level): Likewise.
14194         * lex.c (real_yylex): Check warn_multichar.
14195
14196 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
14197
14198         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
14199
14200         * tree.c (make_binfo): Fix length.
14201
14202 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
14203
14204         * decl2.c (lang_decode_option): Remove warn_template_debugging.
14205         * lang-options.h: Likewise.
14206
14207 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14208
14209         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
14210         (process_start_catch_block): Likewise for variables
14211         `false_label_rtx', `call_rtx' and `return_value_rtx'.
14212
14213 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
14214
14215         * tree.c (build_srcloc): Make sure we allocate this node on the
14216         permanent obstack.
14217
14218 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
14219
14220         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
14221         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
14222         (lang_specific_driver): Only add -lm automatically if need_math is
14223         nonzero.
14224
14225 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
14226
14227         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
14228
14229 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14230
14231         * Makefile.in (EXPR_H): New dependency variable.
14232         (decl2.o): Depend on $(EXPR_H).
14233         (typeck.o): Likewise.
14234         (init.o): Likewise.
14235         (expr.o): Likewise.
14236
14237 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
14238
14239         * decl.c (start_enum): Put local enums on permanent_obstack.
14240
14241 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
14242
14243         * cp-tree.h (c_get_alias_set): Declare.
14244         * decl.c (init_decl_processing): Set lang_get_alias_set.
14245
14246 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
14247
14248         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
14249         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
14250         flag for all function decls which are in the exception table.
14251         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
14252         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
14253         code is emitted for any referenced rtti function.
14254
14255 1998-06-25  Dave Brolley  <brolley@cygnus.com>
14256
14257         * lang-specs.h: Use new | syntax to eliminate
14258         string concatenation.
14259
14260 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
14261
14262         * cp-tree.h (CP_DECL_CONTEXT): New macro.
14263         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
14264         * method.c (build_overload_nested_name): Likewise.
14265         * sig.c (build_signature_pointer_or_reference_type): Don't set
14266         DECL_CONTEXT.
14267
14268 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14269
14270         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
14271         * cp-tree.h (FROB_CONTEXT): New macro.
14272         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
14273         * decl.c (namespace_binding): Replace NULL_TREE with
14274         global_namespace.
14275         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
14276         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
14277         Likewise.
14278         * decl.c (pushtag): Use FROB_CONTEXT.
14279         (pushdecl, make_typename_type, define_function, grokdeclarator):
14280         Likewise.
14281         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
14282         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
14283         Likewise.
14284         * decl2.c (decl_namespace): Return global_namespace if no context.
14285         * method.c (build_overload_nested_name): Expect null as context.
14286         * pt.c (mangle_class_name_for_template): Do nothing for null
14287         contexts.
14288         (lookup_template_class): Allow for null id_context.
14289
14290 1998-06-25  Richard Henderson  <rth@cygnus.com>
14291
14292         * method.c (emit_thunk): Set current_function_is_thunk for the
14293         ASM_OUTPUT_MI_THUNK case as well.
14294
14295 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
14296
14297         * exception.cc (__cplus_type_matcher): Get a match_info pointer
14298         instead of an exception table entry as a parameter.
14299
14300 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
14301
14302         * parse.y (function_try_block): Don't call start_catch_handler.
14303         * except.c (call_eh_info): Remove coerced field from declaration.
14304         (build_eh_type_type_ref): New function to create an address of a
14305         rtti function for the new style exception tables.
14306         (expand_start_catch_block): Split function, this contains the
14307         common part.
14308         (process_start_catch_block_old): New function to perform the rest
14309         of expand_start_catch_block under old style exceptions.
14310         (process_start_catch_block_old): New function to perform the rest
14311         of expand_start_catch_block under new style exceptions.
14312         (expand_end_catch_block): Only pop the false label off the stack under
14313         the old style of exceptions.
14314         * semantics.c (finish_try_block): Don't call start_catch_handler.
14315         * exception.cc (struct cp_eh_info): Add original_value field.
14316         (__cplus_type_matcher): Perform type matching on the original exception
14317         value, and if we have a match, set the current value.
14318         (__cp_push_exception): Set the original exception value.
14319
14320 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
14321
14322         * call.c (joust): Fix confusing conversion warning.
14323
14324         * call.c (build_op_delete_call): Add placement parm.  Check
14325         LOOKUP_SPECULATIVELY.
14326         * cp-tree.h, decl2.c, init.c: Adjust.
14327         * decl.c (finish_function): Use it.
14328
14329         * pt.c (tsubst): Diagnose creating void fields or variables.
14330
14331 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14332
14333         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
14334
14335         * cp-tree.h (check_dtor_name): Add prototype.
14336
14337         * init.c (expand_member_init): Remove unused variables
14338         `ptr_type_node', `parm' and `rval'.
14339
14340         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
14341         in call to fprintf.
14342         (lang_print_xnode): Likewise.
14343
14344         * typeck2.c (enum_name_string): Cast argument to sprintf to long
14345         and use %ld specifier.
14346
14347         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
14348         specifier in call to fprintf.
14349         (GNU_xref_member): Cast argument to sprintf to int.
14350
14351 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14352
14353         * typeck2.c (pop_init_level): Warn about implicit zero initialization
14354         of struct members.
14355
14356 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14357
14358         * cp-tree.h: Prototype function `check_java_method'.
14359
14360 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
14361
14362         * class.c (finish_struct): Make conflicting use of id a pedwarn.
14363         * decl.c (pushdecl_class_level): Likewise.
14364
14365 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
14366
14367         * pt.c (convert_nontype_argument): Issue an error when presented
14368         with an integer (real) constant that cannot be simplified to an
14369         INT_CST (REAL_CST).
14370
14371         * cp-tree.h (c_get_alias_set): Remove declaration added in
14372         1998-06-13 change that should never have been checked in.
14373
14374 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
14375
14376         * typeck.c (build_binary_op_nodefault): Change % in format strings
14377         to %%.
14378
14379         * decl.c (grokvardecl): Don't build_static_name for decls that
14380         aren't at namespace scope.
14381
14382         * init.c (perform_member_init): Catch default-initialization of
14383         references.
14384
14385 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
14386
14387         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
14388
14389 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
14390
14391         * method.c (hack_identifier): Complain about getting a namespace
14392         or class template.
14393         * typeck.c (decay_conversion): Remove check for namespaces.
14394         * typeck2.c (incomplete_type_error): Likewise.
14395         * parse.y (template_arg): Add PTYPENAME expansion.
14396
14397 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
14398
14399         * decl.c (grokvardecl): Don't build external assembler names for
14400         TYPENAMEs in other namespaces as there is no declarator.
14401         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
14402         info from DECL_CONTEXT if it is NULL.
14403
14404 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
14405
14406         * call.c (check_dtor_name): Split out.
14407         (build_scoped_method_call): Use it.
14408         (build_method_call): Use it.
14409         * init.c (build_offset_ref): Use it.
14410
14411         * typeck.c (build_static_cast): Fix handling of pointers to members.
14412
14413         * decl.c (finish_function): Just return nothing from a constructor.
14414         * typeck.c (c_expand_return): Complain about returning a void
14415         expression from a destructor.
14416
14417 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
14418
14419         * class.c (alter_access): Accept a BINFO explaining how to get
14420         from the entity whose accessed is being altered to the type doing
14421         the altering.
14422         (handle_using_decl): New function containing code split out from ...
14423         (finish_struct_1): Here.
14424
14425         * cp-tree.h (complete_type_or_else): Declare.
14426         * init.c (build_new_1, build_delete): Use it.
14427         * typeck.c (require_complete_type): Use complete_type, rather than
14428         expanding it inline.
14429         (complete_type_or_else): New function.
14430         (build_component_ref): Use it.
14431         (pointer_int_sum): Make sure the type pointed to is complete.
14432         (pointer_diff): Likewise.
14433
14434         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
14435         types.
14436
14437         * search.c (get_matching_virtual): Note that member templates
14438         cannot override virtual functions.
14439
14440 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
14441
14442         * pt.c (check_explicit_specialization): If DECLARATOR turned into
14443         an error_mark_node from lookup_template_function, return the same.
14444         (determine_specialization): Also make sure TEMPLATE_ID isn't an
14445         error_mark_node, before we try to read its operands.
14446         * decl.c (grokdeclarator): If we got an error_mark_node from
14447         check_explicit_specialization, just return it right back.
14448
14449 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
14450
14451         * class.c (instantiate_type): Don't treat template-ids that don't
14452         specify any template arguments as equivalent to ordinary
14453         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
14454         pointer-to-members for member templates.  Tidy slightly.
14455         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
14456         * init.c (build_offset_ref): Handle template-ids like ordinary
14457         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
14458         offset part of the OFFSET_REF.
14459         * typeck.c (build_unary_op): Change check for unknown types to
14460         look for OFFSET_REFs, not SCOPE_REFs.
14461
14462 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
14463
14464         * pt.c (is_member_template_class): New function.
14465         (push_template_decl_real): Use it.
14466
14467 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
14468
14469         * friend.c (do_friend): Add support for nested classes using
14470         member functions of the enclosing class as friends.
14471
14472 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
14473
14474         * call.c (convert_default_arg): Make global, not static.
14475         (convert_arg_for_ellipsis): Split out from ...
14476         (build_over_call): Here.
14477         * cp-tree.h (convert_default_arg); Declare.
14478         (convert_arg_to_ellipsis): Likewise.
14479         (do_member_init): Remove.
14480         * init.c (do_member_init): Remove; this code is dead.
14481         (expand_member_init): Remove much of this code; it is dead.
14482         * typeck.c (convert_arguments): Use convert_default_arg and
14483         convert_arg_for_ellipsis, rather than duplicating here.
14484
14485         * call.c (convert_like): Don't fail silently if
14486         build_user_type_conversion fails.  Always return error_mark_node
14487         for failure.
14488
14489 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
14490
14491         * search.c (covariant_return_p): Complain about ambiguous base.
14492
14493         * typeck.c (build_component_ref): Diagnose ref to nested type.
14494
14495 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
14496
14497         * decl.c (grokparms): Check that INIT isn't an error_mark_node
14498         before giving error about invalid type for default arg.
14499
14500 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
14501
14502         * call.c (build_method_call): Fix thinko.
14503
14504 1998-06-10  Dave Brolley  <brolley@cygnus.com>
14505
14506         * decl2.c (lang_decode_option): New argc/argv interface.
14507         * cp-tree.h (lang_decode_option): New argc/argv interface.
14508         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
14509         specified for cpplib-enabled compilers.
14510         * lex.c (lang_init): Don't check_newline for cpplib.
14511         (init_parse): Don't initialize cpplib here.
14512
14513 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
14514
14515         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
14516         piece before checking DECL_MUTABLE_P.
14517
14518 1998-06-10  John Carr  <jfc@mit.edu>
14519
14520         * tree.c (debug_binfo): Make printf format match arguments.
14521
14522         * error.c (OB_PUTI): Make printf format match arguments.
14523
14524 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
14525
14526         * init.c (perform_member_init): Handle default-initialization.
14527
14528         * except.c (build_throw): Handle throwing NULL.
14529
14530         * typeck.c (build_x_function_call): Use resolve_offset_ref.
14531
14532         * search.c (compute_access): Only strip an anonymous union
14533         for a FIELD_DECL.
14534
14535         * call.c (add_builtin_candidates): Tweak.
14536
14537         * cvt.c (build_expr_type_conversion): Restore code for conversion
14538         from class types.
14539         * decl2.c (delete_sanity): Use it.  Clean up.
14540
14541         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
14542
14543 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
14544
14545         * typeck.c (c_expand_return): Don't warn about void expressions on
14546         return statements in functions returning void.
14547
14548 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
14549
14550         * pt.c (fn_type_unification): Revise documentation.  Tidy.
14551         (type_unification): Likewise.
14552
14553 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
14554
14555         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
14556         expand_end_catch.
14557         * parse.y (function_try_block): Rename expand_start_catch, and delete
14558         expand_end_catch.
14559         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
14560         expand_end_catch.
14561
14562 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
14563
14564         * search.c (lookup_member): New fn.
14565         * class.c (finish_struct_1): Use it.
14566         * decl.c (lookup_name_real): Use it.
14567
14568 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14569
14570         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
14571
14572         * cp-tree.h: Add prototype for `maybe_print_template_context' and
14573         `maybe_make_one_only'.
14574
14575         * decl.c (auto_function): Remove unused variable `decl'.
14576
14577         * decl2.c: Include dwarf2out.h and dwarfout.h.
14578
14579         * lex.c: Remove redundant declarations of `set_float_handler' and
14580         `asm_out_file'.
14581
14582 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
14583
14584         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
14585         time flag.  Call __cp_eh_info instead of __cp_exception_info.
14586         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
14587         (__cp_exception_info): Return offset into cp_eh_info structure to
14588         match what use to be the start of this structure.
14589         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
14590         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
14591         compile time flag.
14592         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
14593         __cp_eh_info instead of __cp_exception_info.
14594
14595 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
14596
14597         * decl.c (cp_finish_decl): Disable inlining of extern inlines
14598         with static variables.
14599
14600 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
14601
14602         * init.c (build_offset_ref): Correct previous change to use build,
14603         not build_min.
14604
14605 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
14606
14607         * class.c (instantiate_type): Handle pointer-to-members where the
14608         member is a template.
14609         * init.c (build_offset_ref): Likewise.
14610         * typeck.c (build_unary_op): Likewise.
14611
14612 1998-06-07  Richard Henderson  <rth@cygnus.com>
14613
14614         * lex.c (lang_init_options): New function.
14615         (lang_init): Remove flag_exceptions == 2 hack.
14616
14617 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
14618
14619         * search.c (envelope_add_decl): Tweak for implicit typename.
14620
14621         * call.c (joust): Also warn about confusing conversion op/constructor
14622         overload resolution.
14623
14624         * spew.c (yylex): Also return the TYPE_DECL if got_object.
14625         Don't clear got_object after '~'.
14626         * call.c (build_scoped_method_call): Tweak destructor handling.
14627         (build_method_call): Likewise.
14628         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
14629         TYPE_MAIN_VARIANT for destructors.
14630         * semantics.c (finish_object_call_expr): Complain about calling a
14631         TYPE_DECL.
14632
14633 1998-06-05  Per Bothner  <bothner@cygnus.com>
14634
14635         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
14636         Define - update needed by gcc.c change.
14637
14638 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
14639
14640         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
14641
14642 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
14643
14644         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
14645         * decl.c (lookup_name_real): Add namespaces_only parameter.
14646         If set, return only NAMESPACE_DECLs.
14647         (select_decl): Likewise.
14648         (identifier_type_value): Give additional parameter.
14649         (lookup_name_nonclass): Likewise.
14650         (lookup_name): Likewise.
14651         (find_binding): Skip namespace aliases.
14652         (binding_for_name): Likewise.
14653         (push_namespace): Check for namespace aliases.
14654         (lookup_name_namespace_only): New function.
14655         (begin_only_namespace_names, end_only_namespace_names): New functions.
14656         * decl2.c (set_decl_namespace): Skip namespace aliases.
14657         (do_using_directive): Likewise.
14658         (do_namespace_alias): Produce namespace aliases, fix alias
14659         redeclaration.
14660         * error.c (dump_decl): Support SCOPE_REF.
14661         * parse.y (extdef): Wrap lookup with namespace_only for namespace
14662         aliases and using declarations.
14663
14664 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
14665
14666         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
14667
14668         * error.c (dump_expr): Clean up NEW_EXPR case.
14669
14670 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14671
14672         Suggested by Brendan Kehoe
14673         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
14674         treat it as using ::decl.
14675
14676         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
14677
14678         * tree.c (mapcar): Support NEW_EXPR.
14679
14680         * error.c (dump_expr): Support NEW_EXPR.
14681
14682 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
14683
14684         * method.c (make_thunk): Use overload machinery to make name.
14685         * search.c (covariant_return_p): New fn.
14686         (get_matching_virtual): Use it.
14687
14688         * init.c (build_new_1): Fix check for void.
14689
14690 1998-06-01  Per Bothner  <bothner@cygnus.com>
14691
14692         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
14693         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
14694         java_int_type_node, java_long_type_node, java_float_type_node,
14695         java_double_type_node, java_char_type_node, java_boolean_type_node):
14696         New "primitive" types, with predefined names __java_byte etc.
14697         (record_builtin_java_type):  New function.
14698         (init_decl_processing):  Make Java types with record_builtin_java_type.
14699         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
14700         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
14701         (grokfndecl):  Call check_java_method for Java classes.
14702         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
14703         (process_overload_item):  Match types against specific
14704         java_XX_type_node types, rather than using is_java_type.
14705         * class.c (finish_struct_1):  Don't add default copy constructor
14706         or operator= if TYPE_FOR_JAVA.
14707         (pop_lang_conext):  Restore strict_prototyp proper if Java.
14708         * decl2.c (acceptable_java_type, check_java_method):  New functions.
14709         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
14710         (tsubst):  Move common statement after if statement.
14711         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
14712
14713 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
14714
14715         * pt.c (for_each_template_parm): Use first_rtl_op.
14716
14717         * tree.c (build_cplus_array_type_1): Also check index_type for
14718         template parms.
14719
14720 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
14721
14722         * pt.c (tsubst): Always copy BINFO_BASETYPES.
14723
14724 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
14725
14726         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
14727         TYPE_SIZE_UNIT too.
14728
14729 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
14730
14731         * decl.c (grokdeclarator): Don't complain about in-class
14732         initialization of static consts if we don't really know the type
14733         of the variable.
14734
14735 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
14736
14737         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
14738         * method.c (build_destructor_name): New fn.
14739         * decl2.c (maybe_retrofit_in_chrg): Split out...
14740         (grokclassfn): From here.  Reorganize.
14741         * decl.c (grok_ctor_properties): Make sure ctors for types with
14742         vbases have the in_chrg parm.
14743         * pt.c (instantiate_class_template): Update
14744         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
14745         grok_*_properties.
14746         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
14747
14748 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
14749
14750         * pt.c (instantiate_decl): Make test for whether or not static
14751         variables should be instantiated early match its comment.
14752
14753 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
14754
14755         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
14756         a member.
14757         (start_function): Call check_default_args.
14758         * decl2.c (grokfield): Don't call check_default_args.
14759         (check_default_args): Use cp_error_at.
14760         * lex.c (do_pending_defargs): Call check_default_args.
14761
14762 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
14763
14764         * call.c (build_method_call): Make sure get_type_value returns
14765         something before we try to use its TYPE_MAIN_VARIANT.
14766         (build_scoped_method_call): Likewise.
14767
14768 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
14769
14770         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
14771         initialize an array.
14772
14773         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
14774         DECL_VIRTUAL_P.
14775
14776         * friend.c (do_friend): Clarify template warning.
14777
14778 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
14779
14780         * decl.c (shadow_label): Don't treat decls as identifiers.
14781         (maybe_push_to_top_level): Clear shadowed_labels.
14782
14783         * pt.c (instantiate_decl): Reset lineno and filename after calling
14784         regenerate_decl_from_template.
14785
14786         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
14787         error_mark_node.
14788
14789 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
14790
14791         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
14792
14793 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14794
14795         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
14796         (convert_nontype_argument): Handle cases when nontype template
14797         parameters become classes after substitution.
14798
14799 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
14800
14801         * friend.c (is_friend): Use comptypes, rather than == to compare
14802         types.  Modify for new representation of template friends.
14803         (make_friend_class): Likewise.
14804         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
14805         (instantiate_class_template): Deal with template friends.
14806
14807         * decl.c (store_parm_decls): Remove redundant call to
14808         expand_main_function.
14809
14810 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
14811
14812         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
14813         DECL_USE_TEMPLATE.
14814
14815 1998-05-26  Per Bothner  <bothner@cygnus.com>
14816
14817         * language_as_string:  Handle lang_java.
14818
14819 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
14820
14821         * decl.c (pushdecl): Don't copy the type_decl.
14822
14823 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14824
14825         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
14826         current_class_type.
14827         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
14828
14829         * parse.y (complex_direct_notype_declarator): Use $1 to access
14830         scope of notype_qualified_id.
14831
14832 1998-05-26  Dave Brolley  <brolley@cygnus.com>
14833
14834         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
14835         (init_parse): Initialize cpplib interface.
14836
14837         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
14838         empty continuation.
14839
14840 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
14841
14842         * decl.c (pushtag): Avoid crashing on erroneous input.
14843
14844 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14845
14846         * decl.c (push_namespace): Only produce one unique name for
14847         anonymous namespaces.
14848         (get_unique_name): Remove.
14849
14850 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
14851
14852         * call.c (tourney): Don't do any extra comparisons.
14853
14854         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
14855
14856         * cp-tree.h (processing_template_parmlist): Declare.
14857         * decl.c (pushtag): Don't call push_template_decl when we
14858         shouldn't.
14859         * pt.c (processing_template_parmlist): New variable.
14860         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
14861         (complete_template_args): Use it.
14862         (add_to_template_args): Likewise.
14863         (innermost_args): Likewise.
14864         (tsubst): Likewise.
14865         (begin_template_parm_list): Use processing_template_parmlist.
14866         (end_template_parm_list): Likewise.
14867
14868         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
14869         * decl.c (grokdeclarator): Use it.
14870         * decl2.c (grok_x_components): Likewise.
14871         * init.c (initializing_context): Likewise.
14872         * method.c (do_build_copy_constructor): Likewise.
14873         (do_build_assign_ref): Likewise.
14874         * search.c (compute_access): Likewise.
14875         * typeck.c (build_component_ref): Likewise.
14876
14877         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
14878         unnamed type a typedef name "for linkage purposes".
14879
14880         * pt.c (lookup_template_class): Don't look at
14881         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
14882
14883         * method.c (build_overload_int): Handle error cases gracefully.
14884
14885         * pt.c (instantiate_decl): Handle static member variables
14886         correctly.
14887
14888         * pt.c (tsubst): Use the tsubst'd type when producing new
14889         TEMPLATE_PARM_INDEX nodes.
14890
14891 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
14892
14893         * tree.c (cp_tree_equal): Handle pointers to member functions.
14894
14895         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
14896         sure the type of the REF_BIND is a reference type.
14897         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
14898         target_type for clarity.
14899
14900         * parse.y (xcond): Move call to condition_conversion ...
14901         * semantics.c (finish_for_cond): Here.
14902         * parse.c: Regenerated.
14903
14904 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
14905
14906         * decl.c (push_namespace): Namespaces have type void.
14907         * typeck2.c (incomplete_type_error): Complain about namespace
14908         used as expression.
14909         * typeck.c (decay_conversion): Likewise.
14910
14911 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14912
14913         * error.c (dump_expr): Support namespaces.
14914
14915 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
14916
14917         * cp-tree.def: Add SRCLOC.
14918         * cp-tree.h: Add struct tree_srcloc and accessor macros.
14919         * tree.c (build_srcloc, build_srcloc_here): New fns.
14920         * pt.c (add_pending_template): Use build_srcloc_here.
14921         (push_tinst_level): Update last_template_error_tick before erroring.
14922         (instantiate_decl): Restore lineno and input_filename before
14923         calling add_pending_template.
14924         * decl2.c (finish_file): Set up lineno and input_filename for
14925         pending templates.
14926
14927 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
14928
14929         * decl.c (lang_print_error_function): New fn.
14930         (init_decl_processing): Set print_error_function to use it.
14931         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
14932
14933         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
14934         ICS_BAD_FLAG.
14935
14936         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
14937         copy-initialization.
14938
14939         * class.c (build_vtable_entry): Use int_fits_type_p.
14940         (build_vtable): Pass a signed offset to build_vtable_entry.
14941         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
14942         set_rtti_entry): Likewise.
14943
14944 1998-05-22  Per Bothner  <bothner@cygnus.com>
14945
14946         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
14947         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
14948
14949 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
14950
14951         * pt.c (print_template_context): Use fprintf instead of cp_error.
14952
14953         * pt.c (determine_specialization): Just return an error_mark_node.
14954         Also print the decl we want in error messages.  If we complain,
14955         return error_mark_node.
14956         (tsubst_friend_function): Set lineno and input_filename so
14957         error messages will be useful.
14958         (instantiate_template): Just return an error_mark_node.
14959         (check_explicit_specialization): Don't mess with a returned
14960         error_mark_node.
14961
14962         * pt.c (print_template_context): Add new argument.
14963         (maybe_print_template_context): New fn.
14964         (push_tinst_level): Increment tinst_level_tick.
14965         (pop_tinst_level): Likewise.
14966         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
14967         xrealloc instead of xmalloc.
14968
14969         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
14970
14971 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
14972
14973         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
14974         if the template we looked up is the same as the one we already
14975         have.
14976
14977 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
14978
14979         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
14980         (cpp_reader,parse_in): Add for cpplib.
14981         (check_newline): Call handle_sysv_pragma with new interface.
14982         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
14983
14984         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
14985         (sub_getch): Call GETC for cpplib.
14986
14987         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
14988         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
14989
14990         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
14991
14992 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
14993
14994         * decl2.c (maybe_make_one_only): New fn.
14995         (import_export_vtable): Use it.
14996         (import_export_decl): Likewise.
14997         * pt.c (mark_decl_instantiated): Likewise.
14998
14999 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
15000
15001         * decl2.c (find_representative_member): Rename to ...
15002         (build_anon_union_vars): New function.
15003         (finish_anon_union): Fix stupidity of previous change.
15004
15005 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
15006
15007         * decl.c (grokfndecl): Handle definition of specialization in
15008         friend declaration.
15009
15010         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
15011
15012 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
15013
15014         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
15015         to look for type declarations.
15016         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
15017         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
15018         (finish_member_class_template): Declare.
15019         * decl.c (pushtag): Put member class templates on the
15020         CLASSTYPE_TAGS list, just as for ordinary member classes.
15021         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
15022         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
15023         IDENTIFIER_NAMESPACE_VALUEs.
15024         * parse.y (component_decl): Move code to ...
15025         * semantics.c (finish_member_class_template): New function.
15026         Don't put member class templates on the list of components for a
15027         class.
15028         * parse.c: Regenerated.
15029         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
15030         In fact, don't use DECL_CONTEXT at all here.
15031
15032 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15033
15034         * decl.c (record_unknown_type): New function.
15035         (init_decl_processing): Call it for the unknown and global type
15036         nodes.
15037
15038 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
15039
15040         * decl2.c (find_representative_member): New function.
15041         (finish_anon_union): Use it.
15042
15043         * cp-tree.h (MAIN_NAME_P): New macro.
15044         (DECL_MAIN_P): Likwise.
15045         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
15046         (grokfndecl): Use the new macros.
15047         (grokdeclarator): Likewise.
15048         (start_function): Likewise.
15049         (store_parm_decls): Likewise.
15050         (finsh_function): Likewise.
15051         * friend.c (do_friend): Likewise.
15052         * typeck.c (build_function_call_real): Likewise.
15053         (build_unary_op): Likewise.
15054
15055 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
15056
15057         * decl2.c (start_objects, finish_objects, do_dtors,
15058         do_ctors): Split out from...
15059         (finish_file): ...here.
15060
15061 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
15062
15063         * tree.c (is_overloaded_fn): Don't abort on placeholders from
15064         push_class_decls.
15065
15066 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
15067
15068         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
15069
15070         * error.c (dump_expr): Handle an ARROW_EXPR.
15071
15072 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
15073
15074         * decl.c (saveable_obstack): Declare.
15075         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
15076         declare, if necessary.
15077
15078 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
15079
15080         * call.c (compare_qual): Remove.
15081         (is_subseq): Tweak.
15082         (is_properly_derived_from): New function.
15083         (maybe_handle_ref_bind): Likewise.
15084         (maybe_handle_implicit_object): Likewise.
15085         (compare_ics): Modify substantially to bring into conformance with
15086         the standard.
15087         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
15088         (comp_cv_qualification): Declare.
15089         (comp_cv_qual_signature): Likewise.
15090         * typeck.c (comp_cv_qualification): Likewise.
15091         (comp_cv_qual_signature): Likewise.
15092
15093 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15094
15095         * Makefile.in (parse.o): Depend on toplev.h.
15096
15097         * class.c (typecode_p): Remove prototype and definition.
15098
15099         * cp-tree.h (currently_open_class, is_empty_class, member_p):
15100         Add prototype.
15101
15102         * decl.c (push_overloaded_decl_top_level): Remove prototype and
15103         definition.
15104
15105         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
15106         in call to `cp_thing'.
15107         (cp_warning): Likewise for function pointer `warning'.
15108
15109         * except.c (do_function_call): Remove prototype and definition.
15110         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
15111
15112         * method.c (is_java_type): Add prototype and make it static.
15113
15114         * parse.y: Include toplev.h.
15115
15116         * pt.c (type_unification): Remove unused variable `arg'.
15117         (instantiate_decl): Likewise for `save_ti'.
15118
15119         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
15120
15121 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
15122
15123         * init.c (build_member_call): Handle template_ids.
15124         * parse.y (primary): Add global_scope template_id.
15125
15126 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
15127
15128         * decl2.c (get_sentry): Use end_temporary_allocation.
15129         Don't declare permanent_obstack.
15130
15131 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
15132
15133         * parse.y (.finish_new_placement): New non-terminal.
15134         (unary_expr, new_type_id): Use it.
15135         * parse.c: Regenerated.
15136
15137 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
15138
15139         * pt.c (redeclare_class_template): Say where the original definition
15140         of the template-parameter's default argument appeared.
15141
15142 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
15143
15144         * call.c (build_over_call): Tweak empty class handling.
15145
15146         * decl.c (make_typename_type): Use currently_open_class.
15147
15148         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
15149
15150 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
15151
15152         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
15153         for a type unless it is one.
15154
15155         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
15156
15157 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
15158
15159         * Makefile.in (program_transform_name, objdir): Define.
15160
15161         * Makefile.in (BISON): Use bison from the build tree if it exists.
15162         (FLEX): Likewise.
15163
15164 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
15165
15166         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
15167
15168         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
15169
15170 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
15171
15172         * call.c (build_scoped_method_call): Likewise.
15173
15174 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
15175
15176         * init.c (build_new_1): Call suspend_momentary around the creation
15177         of values that must be saved for exception handling.
15178         * parse.y (.build_new_placement): New non-terminal.
15179         (unary_expr, new_placement): Use it.
15180         * parse.c: Regenerated.
15181
15182 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
15183
15184         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
15185         old and new types.
15186
15187         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
15188         canonical type.
15189
15190         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
15191
15192 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
15193
15194         * decl.c (start_decl): Revert problem change.
15195
15196         * Makefile.in (CONFLICTS): Fix.
15197
15198 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15199
15200         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
15201
15202 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
15203
15204         * class.c (finish_struct_1): Use BINFO_SIZE.
15205
15206         * decl.c (start_decl): Use 'tem'.
15207
15208 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
15209
15210         * exception.cc: Include eh-common.h.
15211         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
15212         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
15213         (__cp_push_exception): Initialize eh_info struct as well.
15214         * except.c: Remove local structs and include eh-common.h.
15215         (init_exception_processing): Set language and version codes.
15216         (call_eh_info): Add presence of eh_info to runtime description of
15217         struct cp_eh_info.
15218         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
15219         * semantics.c (finish_try_block): Call start_catch_block() and
15220         end_catch_block().
15221         * parse.y (function_try_block): Call start_catch_block() and
15222         end_catch_block().
15223
15224 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
15225
15226         * typeck.c (original_type): New function.
15227         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
15228         to see if they're actually the same.
15229         * cp-tree.h (original_type): Declare.
15230
15231 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15232
15233         * Makefile.in (lex.o): Depend on output.h.
15234
15235         * call.c (add_function_candidate): Remove unused variable `cand'.
15236         (add_conv_candidate): Likewise.
15237         (build_builtin_candidate): Likewise.
15238
15239         * cp-tree.h: Add prototype for `types_overlap_p'.
15240
15241         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
15242
15243         * decl2.c (merge_functions): Remove unused variables `tmp' and
15244         `tempn'.
15245
15246         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
15247         (code_as_string): Likewise.
15248         (language_as_string): Likewise.
15249         (parm_as_string): Likewise.
15250         (op_as_string): Likewise.
15251         (assop_as_string): Likewise.
15252         (cv_as_string): Likewise.
15253
15254         * lex.c: Include output.h.
15255
15256         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
15257
15258         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
15259         ATTRIBUTE_UNUSED.
15260
15261         * tinfo.cc (__class_type_info::dcast): Change the type of variable
15262         `i' from int to size_t.
15263
15264         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
15265         ATTRIBUTE_UNUSED.
15266
15267 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
15268
15269         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
15270         DECL_NAMESPACE_SCOPE_P.
15271         (lang_decl_name): Likewise.
15272         * pt.c (tsubst_friend_function, tsubst): Likewise.
15273         * decl.c (pushdecl, redeclaration_error_message, start_decl,
15274         cp_finish_decl, start_function): Likewise.
15275         * class.c (finish_struct_1): Likewise.
15276         * call.c (build_over_call): Likewise.
15277         (compare_ics): Use DERIVED_FROM_P.
15278
15279 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
15280
15281         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
15282         * method.c (build_mangled_name): Use it.
15283         (build_decl_overload_real): Likewise.
15284
15285         * error.c (dump_simple_decl): New function, broken out from ...
15286         (dump_decl): Use it.
15287
15288 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
15289
15290         * ptree.c (lang_print_xnode): Add missing `break'.
15291
15292         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
15293
15294         * call.c (add_template_candidate): Adjust for changes to
15295         fn_type_unification.
15296         (add_template_candidate_real): Likewise.
15297         (add_template_conv_candidate): Likewise.
15298         (build_user_type_conversion_1): Likewise.
15299         (build_new_function_call): Likewise.
15300         (build_object_call): Likewise.
15301         (build_new_op): Likewise.
15302         (build_new_method_call): Likewise.
15303         * class.c (instantiate_type): Likewise.
15304         * cp-tree.h (unification_kind_t): New type.
15305         (fn_type_unification): Adjust prototype.
15306         (type_unificaiton): Likewise.
15307         * pt.c (UNIFY_ALLOW_NONE): New macro.
15308         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
15309         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
15310         (UNIFY_ALLOW_DERIVED): Likewise.
15311         (unify): Change prototype.
15312         (maybe_adjust_types_for_deduction): New function.
15313         (check_cv_quals_for_unify): Likewise.
15314         (determine_specialization): Adjust.
15315         (fn_type_unification): Likewise.
15316         (type_unification): Likewise.
15317         (type_unification_real): Likewise.  Use
15318         maybe_adjust_types_for_deduction.  Fix mishandling of
15319         back-unification of template functions passed as arguments.  Pass
15320         appropriate combination of UNIFY_ALLOW_* to unify.
15321         (unify): Remove unused NTPARMS parameter.  Use
15322         check_cv_quals_for_unify.  Remove bogus code that allowed
15323         too-generous unification in order to adhere more closely to standard.
15324         (get_bindings_real): Adjust.
15325         (get_class_bindings): Likewise.
15326
15327         * method.c (build_overload_identifier): Only use the innermost
15328         template arguments when mangling.
15329         * pt.c (tsubst_template_argument_vector): New function.
15330         (complete_template_args): Deal with the situation where the
15331         extra_args contain more than one level of arguments.
15332         (lookup_template_class): Deal with member template classes, which
15333         may have more than one level of arguments.
15334         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
15335         Improve handling of member template classes.  Use
15336         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
15337         tsubst_template_argument_vector where appropriate.
15338         (regenerate_decl_from_template): Break out from ...
15339         (instantiate_decl): Here.
15340
15341         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
15342         * parse.h: Regenerated.
15343         * parse.c: Really regenerated.
15344
15345         * cp-tree.h (finish_unary_op_expr): New function.
15346         (finish_id_expr): Likewise.
15347         (begin_new_placement): Likewise.
15348         (finish_new_placement): Likewise.
15349         (finish_declarator): Likewise.
15350         (finish_translation_unit): Likewise.
15351         (finish_parmlist): Likewise.
15352         (begin_class_definition): Likewise.
15353         (finish_class_definition): Likewise.
15354         (finish_default_args): Likewise.
15355         (finish_inline_definitions): Likewise.
15356         * parse.y (GCC_ASM_KEYWORD): Remove.
15357         (TYPENAME_ELLIPSIS): Likewise.
15358         * parse.c: Regenerated.
15359         Use new functions in semantics.c in the actions for many rules.
15360         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
15361         * hash.h: Regenerated.
15362         * semantics.c (finish_expr_stmt): Allow NULL expr.
15363         (finish_unary_op_expr): New function, containing
15364         code previously in parse.y.
15365         (finish_id_expr): Likewise.
15366         (begin_new_placement): Likewise.
15367         (finish_new_placement): Likewise.
15368         (finish_declarator): Likewise.
15369         (finish_translation_unit): Likewise.
15370         (finish_parmlist): Likewise.
15371         (begin_class_definition): Likewise.
15372         (finish_class_definition): Likewise.
15373         (finish_default_args): Likewise.
15374         (finish_inline_definitions): Likewise.
15375
15376 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
15377
15378         * typeck.c (build_c_cast): Don't decay arrays and functions to
15379         pointer type when converting to a class type.
15380
15381 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
15382
15383         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
15384         (DECL_CLASS_SCOPE_P): Likewise.
15385
15386 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
15387
15388         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
15389         * decl2.c (constructor_name_full): Likewise.
15390
15391 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
15392
15393         * tree.c (mapcar): Add OVERLOAD support.
15394
15395         * init.c (resolve_offset_ref): We must use basetype_path before we
15396         destroy it with a call to convert_pointer_to.
15397
15398 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
15399
15400         * class.c (currently_open_class): New fn.
15401         * decl.c (lookup_name_real): Use it.
15402         * search.c (lookup_field): Likewise.
15403
15404 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15405
15406         * cp-tree.def (OVERLOAD): New node.
15407         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
15408         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
15409         (NAMESPACE_BINDING): Remove.
15410         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
15411         namespace_binding.
15412         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
15413         Define.
15414         (tree_overload): New struct.
15415         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
15416         (REAL_IDENTIFIER_TYPE_VALUE): Define.
15417         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
15418         (lang_decl_flags): Remove in_namespace.
15419         (lang_decl): Remove chain.
15420         (DECL_CHAIN, DECL_NAMESPACE): Remove.
15421         (flag_honor_std): Declare extern.
15422         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
15423         namespace_binding, set_namespace_binding,
15424         lookup_function_nonclass, cat_namespace_levels,
15425         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
15426         scratch_ovl_cons, ovl_member, build_overload): Declare.
15427         (decl_list_length, get_namespace_id, current_namespace_id,
15428         overloaded_globals_p): Remove.
15429         (lookup_using_namespace, qualified_lookup_using_namespace): Change
15430         return type.
15431         (push_scratch_obstack): New macro.
15432         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
15433         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
15434         convs, fns.
15435         (build_new_function_call): Iterate using OVL_CHAIN.
15436         Print DECL_NAME in when reporting ambiguities.
15437         (build_object_call): Iterate using OVL_NEXT for fns, convs.
15438         (build_new_op): Call lookup_function_nonclass.
15439         Iterate using OVL_NEXT.
15440         (build_op_delete_call): Change detection of members.
15441         Do not wrap TREE_LIST around fields and single global functions.
15442         (build_over_call): Don't push a class level if the context is a
15443         namespace.
15444         (build_new_method_call): Iterate using OVL_NEXT.
15445         * class.c (add_method): Chain overloaded members using
15446         build_overload.  Remove copying of method.
15447         (grow_method): When iterating through the obstack, expect OVERLOAD
15448         nodes.  Chain overload members.
15449         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
15450         nodes in call to get_baselinks.
15451         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
15452         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
15453         fdecls that are OVERLOAD nodes.
15454         (validate_lhs): New function.
15455         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
15456         code.  Use DECL_NAME in error messages.  Split code between global
15457         and member function processing.
15458         * decl.c (global_type_node): New static variable.
15459         (in_std): New global.
15460         (struct binding_level): New field usings.
15461         (resume_binding_level): Assert that we are not in a class.
15462         (toplevel_bindings_p): Just check for namespace_p or
15463         pseudo_global.
15464         (resume_level): Remove.
15465         (find_binding): New function.
15466         (binding_for_name): Call it.
15467         (namespace_binding, set_namespace_binding): New functions.
15468         (push_namespace): Associate binding level with new namespace,
15469         resume_binding_level for existing namespace.  Remove old code.
15470         Fake std by counting.
15471         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
15472         (maybe_push_to_top_level): Save current namespace.
15473         (pop_from_top_level): Restore saved namespace.
15474         (pop_namespace): Call suspend_binding_level.  Remove old code.
15475         (cat_namespace_levels): New function.
15476         (set_identifier_type_value_with_scope): For namespace bindings,
15477         set BINDING_TYPE, and use global_type_node.
15478         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
15479         (identifier_type_value): New function.
15480         (pushtag): If no context, use current_namespace.
15481         (duplicate_decls): Don't process DECL_CHAIN.
15482         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
15483         already set.  Never reset it to NULL_TREE.  Lookup global variables
15484         in their namespace.  Push overloaded templates if they are on
15485         namespace level.
15486         (pushdecl_namespace_level): New function.
15487         (pushdecl_top_level): Implement using pushdecl_namespace_level.
15488         (pushdecl_using_decl): New function.
15489         (overloaded_globals_p): Remove.
15490         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
15491         them.  Use namespace_binding and set_namespace_value.
15492         (redeclaration_error_message): Complain if the declarations come
15493         from different namespaces.
15494         (lookup_tag): On namespace level, look in the BINDING_TYPE.
15495         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
15496         old code.
15497         (select_decl): New function.
15498         (lookup_name_real): Call it for qualified and unqualified lookup.
15499         Pass tree_bindings from the stack.
15500         If prefer_type is 1, also accept namespaces.
15501         (lookup_function_nonclass): New function.
15502         (init_decl_processing): Set the binding level of the global
15503         namespace to global_binding_level.
15504         Build a proper type list for __builtin_apply.
15505         Initialize std_node to "fake std" if flag_honor_std is set.
15506         Initialize global_type_node.
15507         Allocated bad_alloc in namespace std if flag_honor_std.
15508         (define_function): Set the DECL_CONTEXT to the current_namespace.
15509         (start_decl): A namespace is not considered as a context here.  If
15510         the DECL_CONTEXT is a namespace, push the decl.
15511         (cp_finish_decl): Check for namespaces used as initializers.
15512         (grokfndecl): Add namespace parameter.  Remove processing of
15513         DECL_CHAIN.
15514         (grokvardecl): Add namespace parameter.
15515         (grokdeclarator): Process SCOPEs that are namespaces.  For
15516         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
15517         (start_function): Check for contexts that are namespaces.
15518         Set context for declarations that have not been pushed.
15519         (store_parm_decls): Check for ::main only.
15520         (finish_function): Likewise.
15521         (start_method): Check for contexts that are namespaces.
15522         (start_method): Remove DECL_CHAIN processing.
15523         * decl2.c (flag_honor_std): Declare.
15524         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
15525         (decl_namespace_list): New static global.
15526         (grok_x_components): Ignore namespaces as type contexts.
15527         (check_classfn): Expect OVERLOAD nodes.
15528         (grokfield): Remove DECL_CHAIN processing.
15529         (finish_file): Call cat_namespace_levels.
15530         (merge_functions): New function.
15531         (ambiguous_decl): Rewrite.
15532         (lookup_using_namespace): Produce tree_bindings.
15533         (qualified_lookup_using_namespace): Likewise.
15534         (set_decl_namespace, decl_namespace, current_decl_namespace,
15535         push_decl_namespace, pop_decl_namespace): New functions.
15536         (arg_lookup): New struct.
15537         (add_function, arg_assoc_namespace, arg_assoc_class,
15538         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
15539         New functions.
15540         (get_namespace_id, current_namespace_id): Remove.
15541         (do_toplevel_using_decl): Rewrite.
15542         (do_class_using_decl): Complain about namespace qualifiers.
15543         (do_using_directive): Sorry if not on namespace level.  Complain
15544         about unknown namespaces.
15545         * error.c (dump_aggr_type): Check for namespace contexts.
15546         * except.c (init_exception_processing): Push terminate into std.
15547         * friend.c (is_friend): A namespace is not a context, here.
15548         * init.c (expand_member_init): Remove DECL_CHAIN processing.
15549         (build_offset_ref): Process OVERLOAD nodes.
15550         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
15551         * lex.c (identifier_type): Loop using OVL_CHAIN.
15552         (see_typename): Set looking_for_typename to 2.
15553         (real_yylex): Likewise.
15554         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
15555         (do_scoped_id): Expect OVERLOAD nodes.
15556         Change calling convention for qualified_lookup_using_namespace.
15557         (build_lang_decl): Don't set in_namespace anymore.
15558         * method.c (typevec_size): New global.
15559         (build_overload_nested_name): Return if global_namespace.
15560         Otherwise, always expect a declaration context.
15561         (build_qualified_name): Likewise.
15562         Make sure we don't write beyond typevec_size.
15563         (build_decl_overload_real): Likewise.
15564         Allocate one extra slot for the namespace.
15565         (hack_identifier): Mark code dead.
15566         Process OVERLOAD and NAMESPACE_DECL nodes.
15567         * parse.y (program): Pop namespaces until in global namespace.
15568         (extdef): In a using-declaration, don't discard the identifier if
15569         there is no declaration.
15570         (left_curly): Ignore type contexts which are namespaces.
15571         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
15572         used as scope.
15573         * pt.c (template_class_depth): Expect types to be namespaces.
15574         (determine_specialization): Simplify by expecting OVERLOAD nodes.
15575         (push_template_decl): Push into namespace level.
15576         Reset ctx if it is a namespace.
15577         Set DECL_CONTEXT to current_namespace if not set already.
15578         Ignore real contexts that are namespaces.
15579         (mangle_class_name_for_template): Skip global_namespace.
15580         Mangle other namespaces as declarations.
15581         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
15582         (lookup_template_class): Push into namespace of context.
15583         If the context is a namespace, set it to global_namespace.
15584         Use id_context for mangling.
15585         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
15586         (tsubst_friend_function): Ignore namespace contexts.
15587         Push into namespace level.
15588         (tsubst): Handle NAMESPACE_DECL nodes.
15589         Remove DECL_CHAIN processing.
15590         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
15591         * ptree.c (print_lang_identifier): Print bindings.
15592         (lang_print_xnode): Print OVERLOAD nodes.
15593         * rtti.c (init_rtti_processing): Push type_info into std.
15594         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
15595         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
15596         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
15597         lookup_fnfields_here): Likewise.
15598         Process all nodes, instead of going through TREE_CHAIN.
15599         * sig.c (build_signature_pointer_or_reference_type): Set context
15600         to global_namespace.
15601         (build_signature_table_constructor): Expect OVERLOAD nodes.
15602         * spew.c (yylex): Save old setting of looking_for_typename.
15603         * tree.c (decl_list_length): Remove.
15604         (binding_init): New function.
15605         (count_functions): Rewrite.
15606         (is_overloaded_fn): Expect OVERLOAD nodes.
15607         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
15608         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
15609         ovl_member): New functions.
15610         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
15611         (type_unknown_p): Likewise.
15612         (require_instantiated_type): Likewise.
15613         (build_component_ref): Declare code dead.
15614         (build_x_function_call): Create and expect OVERLOAD nodes.
15615         (build_function_call_real): Check for ::main only.
15616         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
15617         (convert_for_assignment): Check for TREE_LIST before accessing
15618         TREE_VALUE.
15619         * decl.c (duplicate_decls): Check for namespace bindings instead
15620         of global bindings.
15621         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
15622         lookup_name_current_level, start_decl, xref_tag,
15623         finish_enum): Likewise.
15624         * init.c (build_offset_ref): Likewise.
15625         * search.c (lookup_field): Likewise.
15626         (lookup_fnfields): Likewise.
15627         (dfs_debug_mark): Likewise.
15628         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
15629         (poplevel_class, pop_from_top_level): Likewise.
15630         * decl2.c (finish_method): Likewise.
15631         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
15632         * decl.c (record_builtin_type): Likewise.
15633         (init_decl_processing, grokfndecl): Likewise.
15634         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
15635         (make_lang_type): Likewise.
15636         * parse.y (make_thunk): Likewise.
15637         * pt.c (tsubst): Likewise.
15638         * tree.c (debug_binfo): Likewise.
15639         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
15640         tinfo2.cc, inc/new.h: Add std qualifications.
15641         * inc/new: Wrap with namespace std if __HONOR_STD.
15642         * inc/typeinfo: Likewise.
15643
15644 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
15645
15646         * call.c (build_user_type_conversion_1): Handle second_conv
15647         properly for templates.
15648
15649 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
15650
15651         * method.c (build_decl_overload_real): Set TREE_USED flag to
15652         zero for build_type_variants nodes as well.
15653
15654 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
15655
15656         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
15657
15658 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
15659
15660         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
15661         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
15662         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
15663         xref.o): Add toplev.h dependencies.
15664
15665 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
15666
15667         * errfn.c (cp_error, cp_warning): Remove declarations for
15668         error and warning respectively.
15669
15670 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15671
15672         * error.c: Convert to using ctype macros defined in system.h.
15673         * method.c: Likewise.
15674         * xref.c: Likewise.
15675         * lex.c: Likewise.  Also remove redundant system header stuff.
15676
15677 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
15678
15679         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
15680         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
15681         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
15682         xref.c: Add include of toplev.h.
15683
15684 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
15685
15686         * tree.c (perm_manip): Also regenerate the RTL of an extern.
15687         (copy_to_permanent): Use end_temporary_allocation.
15688
15689 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
15690
15691         * init.c (expand_vec_init): The initialization of each array
15692         element is a full-expression.
15693
15694 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
15695
15696         * method.c (build_mangled_name): Add a call to build_type_variant
15697         to get the right type.
15698
15699 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
15700
15701         * Makefile.in: Add .SUFFIXES.
15702
15703         * cp-tree.def: Remove NAMESPACE_DECL.
15704
15705 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
15706
15707         * call.c (build_over_call): Do evaluate arg even if it has empty
15708         class type.
15709         * decl.c (start_function): Don't push a member function.
15710
15711 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
15712
15713         * Makefile.in (g++FAQ.info): Put -o option before input file.
15714
15715 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
15716
15717         * gxxint.texi: Add info for squangling codes K and B.
15718
15719 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
15720
15721         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
15722         the expression in templates.
15723         (finish_stmt_expr): Likewise.
15724
15725 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
15726
15727         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
15728
15729 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
15730
15731         * decl.c (maybe_push_to_top_level): Always clear
15732         current_template_parms and processing_template_decl.
15733         (pushtag): Remove check of current_class_type and some comments,
15734         since maybe_push_to_top_level no longer creates confusion.
15735
15736 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
15737
15738         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
15739         (DECL_CLASS_TEMPLATE_P): Likewise.
15740         (DECL_PRIMARY_TEMPLATE): Likewise.
15741         (PRIMARY_TEMPLATE_P): Use it.
15742         (push_template_decl_real): New function.
15743         (redeclare_class_template): Take new template parameters as
15744         input.
15745         (is_specialization_of): New function.
15746         (comp_template_args): Declare.
15747         * decl.c (pushtag): Handle friend template classes.
15748         (xref_tag): Likewise.  Use new calling convention for
15749         redeclare_class_template.
15750         * decl2.c (grok_x_components): Handle friend templates.
15751         * friend.c (is_friend): Use is_specialization_of where
15752         appropriate.  Deal with friend class templates.
15753         (make_friend_class): Let a class template be friends with itself.
15754         * pt.c (comp_template_args): Remove declaration.
15755         (tsubst_friend_class): New function.
15756         (push_template_decl_real): New function.
15757         (push_template_decl): Use it.
15758         (redeclare_class_template): Adjust for new calling convention.
15759         (comp_template_args): Give it external linkage.
15760         (instantiate_class_type): Use tsubst_friend_class to deal
15761         with friend templates.
15762         * typeck.c (comptypes): Use comp_template_args, rather than
15763         expanding it inline.
15764         * parse.y (component_decl): Handle a nested template type
15765         like other component type declarations.
15766
15767         * pt.c (check_explicit_specialization): Handle overloaded
15768         constructors correctly.
15769
15770         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
15771         (lookup_template_class): Use it.
15772
15773 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
15774
15775         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
15776         * cp-tree.h: Add WRAPPER support.
15777         * call.c (add_candidate): Split out from add_*_candidate fns.
15778         (build_over_call): Take the candidate instead of function and args.
15779         Enforce access control here.  Emit overload warnings here.
15780         (add_warning): New fn.
15781         (joust): Add WARN parm.  If not set, call add_warning instead of
15782         printing a warning.  Re-enable some warnings.
15783         (tourney): Pass it.
15784         (convert_like): Adjust.
15785         (build_new_op): Adjust.
15786         (build_new_function_call): Adjust.
15787         (build_user_type_conversion_1): Adjust.
15788         (USER_CONV_FN): Adjust.
15789         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
15790         build_int_wrapper): New fns.
15791
15792 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
15793
15794         * pt.c (unify): Fix typo in previous change.
15795
15796 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
15797
15798         * error.c (dump_type_real): Declare canonical_name.
15799
15800         * typeck.c (comp_target_types): Fix PMFs.
15801
15802 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
15803
15804         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
15805         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
15806         TEMPLATE_DECL.
15807
15808         * pt.c (tsubst): Decrease the template-level of
15809         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
15810         TEMPLATE_PARM_INDEX.
15811         (template_decl_level): New function.
15812         (unify): Make sure to record unifications for template
15813         parameters, even when the parameters exactly match the arguments.
15814         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
15815         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
15816         aren't from the level we're currently working on.
15817
15818 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
15819
15820         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
15821
15822         * decl2.c (check_member_template): Set DECL_IGNORED for member
15823         class templates, too.
15824
15825         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
15826
15827 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15828
15829         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
15830
15831 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
15832
15833         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
15834         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
15835         (init_decl_processing): Handle TI types.
15836         * typeck.c (unsigned_type, signed_type): Handle TI types.
15837
15838 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
15839
15840         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
15841         New local added_libraries.  Increment count when add library to
15842         arglist.
15843
15844 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
15845
15846         * cp-tree.h (type_as_string_real): New function.
15847         * pt.c (mangle_class_name_for_template): Use it.
15848         * error.c (dump_aggr_type): Change prototype.
15849         (dump_type_prefix): Likewise.
15850         (dump_type_suffix): Likewise.
15851         (dump_type_real): Convert from dump_type.  If desired, the
15852         "canonica" name of a typedef, i.e., the name of the underlying
15853         type, can be printed.
15854         (dump_type): Call dump_type_real.
15855
15856 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
15857
15858         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
15859
15860         * typeck.c (comp_target_types): Tweak pedantic case.
15861         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
15862         Return -1 or 1 instead of 1 or 2.
15863         (compparms): Remove STRICT handling.
15864         (convert_for_assignment): Fix handling of pmfs.
15865
15866 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
15867
15868         * typeck.c (comp_target_types): Handle references like pointers.
15869         (comp_target_parms): Note that return code from comp_target_types
15870         can be negative to indicate failure.
15871
15872 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
15873
15874         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
15875         which requires a working target compiler to build.
15876
15877 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
15878
15879         * tree.c (avoid_overlap): Add prototype.
15880
15881         * spew.c (num_tokens): Add prototype.
15882         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
15883
15884         * search.c (dfs_check_overlap): Add prototype.
15885         (dfs_no_overlap_yet): Likewise.
15886
15887         * pt.c (original_template): Add prototype.
15888         (inline_needs_template_parms): Likewise.
15889         (push_inline_template_parms_recursive): Likewise.
15890         (retrieve_specialization, register_specialization): Likewise.
15891         (print_candidates, reduce_template_parm_level): Likewise.
15892         (build_template_decl, mark_template_parm): Likewise.
15893         (tsubst_friend_function, get_bindings_real): Likewise.
15894
15895         * method.c (start_squangling): Add prototype.
15896         (end_squangling, check_ktype, issue_ktype): Likewise.
15897         (build_overloaded_scope_ref, check_btype): Likewise.
15898         (build_mangled_template_parm_index): Likewise.
15899
15900         * lex.c (init_cpp_parse): Add prototype.
15901         (handle_cp_pragma, handle_sysv_pragma): Likewise.
15902         (reduce_cmp, token_cmp): Likewise.
15903
15904         * except.c (call_eh_info): Add prototype.
15905         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
15906         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
15907
15908         * decl2.c (is_namespace_ancestor): Add prototype.
15909         (namespace_ancestor, add_using_namespace): Likewise.
15910         (ambiguous_decl): Likewise.
15911
15912         * decl.c (indent): Add prototype.
15913
15914         * call.c (add_template_candidate_real): Add prototype.
15915
15916 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
15917
15918         * decl2.c (build_expr_from_tree): Just return a PMF.
15919
15920 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
15921
15922         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
15923         when doing initializations.
15924
15925         * pt.c (unify): Use comptypes to compare type args.
15926
15927 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
15928
15929         * decl.c (duplicate_decls): Fix check for when it's safe to free
15930         the new decl.
15931
15932         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
15933         to type_as_string.
15934
15935 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
15936
15937         * pt.c (build_template_parm_index): Add prototype.
15938
15939         * search.c (my_tree_cons): Don't clear words outside the
15940         newly allocated node.
15941
15942 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
15943
15944         * lex.c (init_parse): Now returns char* containing the filename.
15945
15946 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
15947                           Jeff Law   <law@cygnus.com>
15948
15949         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
15950         than a pointer.
15951
15952 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15953
15954         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
15955
15956 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
15957
15958         * decl.c (duplicate_decls): Don't warn for redundant decls if
15959         friend: let add_friend take care of it.
15960
15961 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
15962
15963         * sig.c (build_signature_pointer_constructor): Don't set
15964         TREE_HAS_CONSTRUCTOR for a signature pointer.
15965         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
15966         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
15967         here, too.
15968         * typeck.c (build_unary_op): Only allow taking the address of a
15969         real constructor.
15970         * typeck2.c (digest_init): Simplify.
15971         (store_init_value): Don't pedwarn about using { } for pmfs.
15972
15973 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
15974
15975         * cp-tree.h (start_decl):  Update prototype.
15976         * decl.c (start_decl):  Like the C version, new parameters
15977         for the attributes.  Call cplus_decl_attributes here,
15978         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
15979         (grokdeclarator):  Pass NULL for new start_decl arguments.
15980         * pt.c (tsubst_expr):  Likewise.
15981         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
15982         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
15983         * lex.c (build_lang_decl): Add lang_name_java.
15984         * class.c (push_lang_context): Add lang_name_java.
15985         * method.c (build_mangled_name): Check for is_java_type.
15986
15987 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
15988
15989         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
15990         * call.c (build_scoped_method_call): Check for TREE_CODE for
15991         VOID_TYPE instead of type ==  void_type_node.
15992         (build_method_call): Likewise.
15993         * decl.c (lookup_name_real): Likewise.
15994         (grokdeclarator): Likewise.
15995         (start_decl): Likewise.
15996         (grokparms): Likewise.
15997         (start_function): Likewise.
15998         (finish_function): Likewise.
15999         (start_method): Likewise.
16000
16001 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
16002
16003         * lex.c (finput): New variable.
16004         (init_cpp_parse):  Renamed from init_parse.
16005         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
16006         (finish_parse): New function.
16007         * cp-tree.h (init_lex, init_parse): Remove declarations.
16008
16009 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
16010
16011         * call.c (build_call): Still evaluate the actual argument.
16012         * class.c (is_empty_class): Update for -fnew-abi.
16013
16014         * decl2.c: -fnew-abi implies -fsquangle.
16015
16016         * method.c (do_build_assign_ref): Don't do anything to copy
16017         an empty class.
16018         (do_build_copy_constructor): Likewise.
16019         * call.c (build_over_call): Likewise.
16020
16021 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
16022
16023         * tree.c (avoid_overlap): Return a value.
16024
16025 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
16026
16027         * method.c (check_btype): Add missing argument to xrealloc.
16028         (check_ktype): Likewise.
16029
16030 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
16031
16032         Implement empty base optimization.
16033         * class.c (finish_struct_1): Add vbase fields earlier.  Set
16034         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
16035         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
16036         (types_overlap_p): New fn.
16037         * tree.c (avoid_overlap): New fn.
16038         (build_base_fields): Use it to avoid overlapping empty bases.
16039         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
16040
16041         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
16042
16043         Re-implement allocation of base class subobjects.
16044         * tree.c (unshare_base_binfos): New fn.
16045         (layout_basetypes): Use it.  Now handles offsets of both virtual and
16046         non-virtual bases, after layout_type.
16047         (layout_vbasetypes): Remove.
16048         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
16049         (build_vbase_pointer_fields): Split out from old layout_basetypes.
16050         * class.c (finish_base_struct): Lose offset handling code.
16051         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
16052         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
16053         * cp-tree.h: Adjust.
16054
16055 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
16056
16057         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
16058         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
16059         * class.c (duplicate_tag_error): Likewise.
16060         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
16061         * tree.c (layout_vbasetypes): Update from layout_record, remove
16062         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
16063         (layout_basetypes): Likewise.
16064
16065 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
16066
16067         * class.c, Make sure system.h is included just after config.h.
16068         Delete lingering stdio and errno references too.
16069         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
16070
16071 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
16072
16073         * friend.c (is_friend): Fix access control for local classes.
16074
16075         * class.c (is_empty_class): New fn.
16076         * call.c (build_call): Don't pass empty class objects to a function.
16077
16078 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
16079
16080         * call.c (build_over_call): Do name resolution for default
16081         arguments of function templates in the scope of the templates.
16082
16083 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
16084
16085         * call.c: Include system.h.  Remove includes, declarations and
16086         defines provided by system.h.
16087         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
16088         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
16089         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
16090         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
16091         * typeck2.c, xref.c: Likewise.
16092         * Makefile.in: Dependencies updated as appropriate.
16093         * Make-lang.in: Likewise.
16094
16095 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
16096
16097         * pt.c (fn_type_unification): Allow incomplete unification without
16098         an immediate error message.
16099
16100 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
16101
16102         * tree.c (member_p): New fn.
16103         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
16104         initializing class members.
16105
16106         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
16107         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
16108
16109         * call.c (build_method_call): Handle non-scoped destructors, too.
16110         * pt.c (tsubst_copy): Likewise.
16111
16112         * pt.c (print_template_context): Split out...
16113         (push_tinst_level): ...from here.
16114
16115         * friend.c (is_friend): Don't pass a type to decl_function_context.
16116
16117         * typeck.c (convert_for_initialization): Always hand off
16118         conversions to class type.
16119
16120 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
16121
16122         * friend.c (is_friend): Local classes have the same access as the
16123         enclosing function.
16124
16125 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
16126
16127         * typeck.c (expand_target_expr): Delete dead function.
16128
16129         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
16130
16131         * repo.c (save_string): Delete dead function.
16132
16133         * method.c (thunk_printable_name): Delete dead function.
16134
16135         * lex.c (yynextch): Delete dead function.
16136
16137         * expr.c (tree_extract_aggr_init): #if 0 out.
16138
16139         * except.c (do_unwind): Delete dead function.
16140         (easy_expand_asm): Likewise.
16141
16142         * cvt.c (build_conversion_type_1): Delete dead function.
16143
16144         * cp-tree.h (push_expression_obstack): Declare.
16145
16146         * call.c (source_type): #if 0 out.
16147
16148         * class.c (alter_access): Remove unused label.  Add braces
16149         around empty else clause.
16150
16151         * lex.c (yyprint): Fix argument to printf.
16152
16153 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
16154
16155         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
16156
16157         * pt.c (instantiate_class_template): Make sure template
16158         arguments are permanent.
16159         * init.c (resolve_offset_ref): Don't go looking around in
16160         template types.
16161
16162         * semantics.c: Add routines to handle expressions, and some
16163         declaration processing.
16164         * parse.y: Use them.
16165         (current_class_depth): Move declaration to cp-tree.h.
16166         * parse.c: Regenerated.
16167         * cp-tree.h: Use them.
16168         (current_class_depth): Declare.
16169         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
16170
16171 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
16172
16173         * error.c (dump_decl): Be a bit more explicit with template
16174         type arguments, when verbose.
16175
16176 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
16177
16178         * inc/exception: Reorder closing braces.
16179
16180 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
16181
16182         * pt.c (redeclare_class_template): New function.
16183         * cp_tree.h (redeclare_class_template): Declare it.
16184         * decl.c (xref_tag): Use it.
16185
16186 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
16187
16188         * call.c (build_over_call): Check IS_AGGR_TYPE, not
16189         TYPE_LANG_SPECIFIC.
16190         * typeck.c (convert_arguments): Likewise.
16191
16192         * decl.c (grokdeclarator): Remove const and volatile from type after
16193         setting constp and volatilep.
16194
16195         * class.c (finish_struct_1): Don't warn about bool bitfield larger
16196         than one bit.
16197
16198 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
16199
16200         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
16201
16202 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
16203
16204         * call.c (build_object_call): Complain about ambiguous operator(),
16205         rather that crashing.
16206         (build_new_op): Likewise.
16207         (build_op_delete_call): Likewise.
16208
16209 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
16210
16211         * cvt.c (perform_qualification_conversions): Use comp_target_types
16212         instead of comp_ptr_ttypes.
16213
16214 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
16215
16216         * cp-tree.h (enforce_access): Declare.
16217         * call.c (enforce_access): Make it extern, not static.
16218         * class.c (alter_access): Use enforce_access; modify code for ISO
16219         compliance, rather than ARM rules.
16220
16221 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
16222
16223         * cp-tree.h: Fix typo.
16224
16225 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
16226
16227         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
16228         if (aggregate_value_p (type)).
16229
16230         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
16231
16232 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
16233
16234         * tree.c (mapcar): When dealing with a DECL, use it's constant
16235         value, if any.
16236         * pt.c (lookup_template_class): Don't mangle the names of template
16237         classes whose arguments are unknown.
16238
16239         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
16240
16241 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
16242
16243         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
16244
16245 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
16246
16247         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
16248         boolean_type_node to 1.
16249
16250 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
16251
16252         * error.c (dump_expr): Remove unused variable `l'.
16253
16254         * pt.c (for_each_template_parm): New function, created by
16255         converting uses_template_parms.
16256         (tree_fn_t): New typedef.
16257         (uses_template_parms): Use it.
16258         (mark_template_parm): New function.
16259         (push_template_decl): Check that the argument list of a partial
16260         specialization uses all the template parameters.
16261
16262         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
16263         with it; we might want it for debugging.
16264         * cp-tree.h (type_unification): Change interface.
16265         * class.c (finish_struct_1): Skip nested template types, just like
16266         ordinary nested types.
16267         (instantiate_type): Use new interface to type_unification.
16268         * lex.c (init_lex): Add __sz as opname for sizeof.
16269         * method.c (build_overload_scope_ref): New function.
16270         (build_overload_int): Handle complex expressions.  Set
16271         numeric_output_need_bar if necessary.
16272         (build_overload_value): Handle non-PARM_DECL nodes; this
16273         routine is now used by build_overload_int.  Remove some
16274         assignments to numeric_output_need_bar.  Use
16275         build_overload_scope_ref.
16276         (build_qualified_name): Note that some template mangled names end
16277         with digits, and set numeric_output_need_bar appropriately.  Use
16278         build_underscore_int.
16279         * pt.c (unify): Change interface.
16280         (type_unification_real): Likewise.
16281         (determine_specialization): Use new interfaces.
16282         (tsubst): Deal gracefully with situations in which the argument
16283         vector is not fully filled.
16284         (fn_type_unification): Use new interfaces.
16285         (type_unification): Likewise.  Remove NOP_EXPR hack.
16286         (type_unification_real): Likewise.
16287         (unify): Likewise.  Deal with unification of complex expressions.
16288
16289 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
16290
16291         * pt.c (complete_template_args): Initialize skip properly.
16292
16293         * decl.c (make_typename_type): Revert.
16294         (make_implicit_typename): Remove.
16295         (lookup_name_real): Don't call it.  Call lookup_field if we see a
16296         TYPE_DECL from a template base.
16297         * search.c (lookup_field): Do implicit typename stuff.
16298
16299 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
16300                           Geoff Noer    <noer@cygnus.com>
16301
16302         * Makefile.in: Various fixes for building cygwin32 native toolchains.
16303         * Make-lang.in: Likewise.
16304
16305 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
16306
16307         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
16308
16309 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
16310
16311         * decl.c (make_implicit_typename): Rewrite removed code.
16312         (make_typename_type): Call it if the type we look up comes from
16313         a base that uses template parms.
16314
16315         * pt.c (complete_template_args): Rewrite.
16316         (tsubst, FUNCTION_DECL): Use it.
16317
16318 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
16319
16320         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
16321         c_expand_asm_operands () if output_operands, input_operands or
16322         clobbers is not NULL_TREE.
16323
16324 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
16325
16326         * pt.c (complete_template_args): New function.
16327         (get_bindings): Deal with specializations of function templates
16328         with return type containing parameters from outer class
16329         templates.
16330         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
16331         substitute arguments and compose a new type.
16332
16333 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
16334
16335         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
16336         FUNCTION_DECLs.
16337
16338 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
16339
16340         * decl.c (make_implicit_typename): Lose useless code.
16341
16342         * call.c (standard_conversion): Handle A* -> const A* properly.
16343
16344         * pt.c (get_bindings_real): Rename from get_bindings.  Add
16345         check_rettype parm.
16346         (get_bindings): Pass 1.
16347         (get_bindings_overload): Pass 0.
16348
16349 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
16350
16351         * pt.c (check_explicit_specialization): When reverting a static
16352         member function, also remove the `this' parameter from
16353         last_function_parms.
16354
16355 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
16356
16357         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
16358         a function context.
16359
16360         * decl.c (store_bindings): Use free_binding_vecs.
16361         (pop_from_top_level): Likewise.
16362
16363 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
16364
16365         * decl.c (make_implicit_typename): Only change the type of a
16366         TYPENAME_TYPE.
16367
16368 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
16369
16370         * semantics.c: New file, containing routines to perform the
16371         semantic phase of parsing.
16372         * parse.y: Use it.
16373         * pt.c (tsubst_expr): Likewise.
16374         * cp-tree.h: Declare the various functions in semantics.c.
16375         Provide macros to access _STMT tree nodes.
16376         * cp-tree.def: Add ASM_STMT tree node.
16377         * Makefile.in, Make-lang.in: Add dependencies on and for
16378         semantics.c.
16379
16380 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
16381
16382         * pt.c (push_template_decl): Only check primary templates.
16383
16384         * pt.c (check_explicit_specialization): Complain about default args
16385         in explicit specialization.
16386
16387         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
16388         constructor_declarator.
16389
16390 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
16391
16392         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
16393         has no overloaded operator ->.
16394
16395         * call.c (build_field_call): Don't crash when presented with a
16396         field that is actually a nested type.
16397
16398         * decl.c (pushtag): Deal with friend class injection in local
16399         classes.
16400
16401         * call.c (build_object_call): Don't crash if OBJ is a
16402         pointer-to-member-function.
16403
16404 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
16405
16406         * pt.c (push_template_decl): Complain about template with C linkage,
16407         anonymous template class.
16408
16409 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
16410
16411         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
16412         * search.c: Likewise.
16413
16414         * lex.c (do_pending_defargs): Only call
16415         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
16416
16417         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
16418
16419 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
16420
16421         * parse.y: Deal with CONSTRUCTORS in new_initializers.
16422
16423 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
16424
16425         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
16426         closely mimics the behavior in parse.y.
16427         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
16428         into a compound statement.
16429
16430 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
16431
16432         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
16433         * pt.c (inline_needs_template_parms): New fn.
16434         (original_template): New fn.
16435         (push_inline_template_parms_recursive): New fn.
16436         (maybe_begin_member_template_processing): Use them.
16437         (maybe_end_member_template_processing): Likewise.
16438         (is_member_or_friend_template): Rename to is_member_template.
16439         Member functions of local classes are never member templates.
16440
16441 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
16442
16443         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
16444         added in the class scope to catch redefinition error.
16445
16446         * pt.c (reduce_template_parm_level): Also copy
16447         the DECL_TEMPLATE_PARMS field.
16448
16449 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
16450
16451         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
16452         reduced-level template type parameter.
16453
16454 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
16455
16456         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
16457         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
16458         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
16459         * decl.c (duplicate_decls): Propagate it.
16460         * typeck2.c (abstract_virtuals_error): Use two loops to emit
16461         abstract virtual functions and virtual functions which need a
16462         final overrider separately.
16463
16464 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
16465
16466         * lang-specs.h: Properly put brackets around array elements in
16467         initializer.
16468
16469         * typeck.c (build_binary_op_nodefault): Correctly place parens around
16470         && and || in expression.
16471
16472 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
16473
16474         * call.c (default_parm_conversions): Remove prototype definition.
16475         (build_method_call): Remove unused variable result.
16476
16477         * cvt.c (ocp_convert): Remove unused variable conversion.
16478
16479         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
16480
16481         * except.c (do_unwind): #if 0 definition of unused variables fcall
16482         and next_pc.
16483
16484         * expr.c (extract_scalar_init): #if 0 prototype and function
16485         definition.
16486
16487         * init.c (expand_aggr_init_1): Remove unused variable init_type.
16488         (build_new_1): Remove unused variable t.
16489
16490         * pt.c (instantiate_class_template): Remove unused variable newtag;
16491         cast called function return value to void.
16492         (do_decl_instantiation): Remove unused variables name and fn.
16493
16494         * tree.c (get_type_decl): Add default return to shut up compiler from
16495         complaining control reaches end of non-void function.
16496
16497         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
16498
16499 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
16500
16501         * call.c (default_parm_conversions): Remove prototype definition.
16502         (build_method_call): Remove unused variable result.
16503         (build_over_call): Add default case in enumeration switch.
16504
16505 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
16506
16507         * decl2.c (lang_decode_option): Change j's type to size_t.
16508
16509         * tree.c (layout_vbasetypes): record_align and desired_align are of
16510         type unsigned int; const_size and nonvirtual_const_size likewise.
16511
16512 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
16513
16514         * parse.y (new_initializer): Make sure all initializers are
16515         lists.
16516
16517 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
16518
16519         * decl2.c (import_export_decl): Mark tinfo functions for
16520         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
16521
16522 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
16523
16524         * method.c: Fix typo.
16525
16526 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16527
16528         * method.c: Include "system.h" to get stdlib.h, stdio.h,
16529         ctype.h, string.h, etc.
16530         (issue_nrepeats): Add default case in enumeration switch.
16531         (check_btype): Likewise.
16532         (process_overload_item): Likewise.
16533
16534         * Makefile.in (method.o): Depend on system.h.
16535
16536 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
16537
16538         * lex.c (do_scoped_id): Fix parenthesizing.
16539
16540 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
16541
16542         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
16543         FLAG_RTTI is unset, initialize type info machinery and continue
16544         with FLAG_RTTI enabled.
16545         (get_typeid): Likewise.
16546
16547 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
16548
16549         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
16550         from B.
16551
16552 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
16553
16554         * pt.c (finish_member_template_decl): Deal more gracefully with
16555         invalid declarations.
16556
16557 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
16558
16559         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
16560         cp-tree.h: Clean up more old overloading code, old RTTI code, and
16561         some formatting quirks.
16562
16563         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
16564         method.c, pt.c, ptree.c, typeck.c: Remove support for
16565         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
16566         * class.h: Remove.
16567         * Makefile.in: Adjust.
16568
16569         * pt.c (unify): Don't allow reduced cv-quals when strict.
16570
16571         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
16572         *type_unification* and unify.
16573
16574 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
16575
16576         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
16577         (nested_name_specifier): And add it before this use.
16578         (typename_sub0): And this use.  Also add use without the keyword.
16579         (typename_sub1): Likewise.
16580         * pt.c (instantiate_class_template): Don't actually instantiate
16581         anything if our type uses template parms.
16582
16583 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
16584
16585         * decl.c (start_function): Don't call temporary_allocation for a
16586         nested function.
16587
16588 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
16589
16590         * pt.c (instantiate_class_template): Don't mess with friends if
16591         our type uses template parms.
16592
16593 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
16594
16595         * parse.y (nested_name_specifier): Use explicit_template_type.
16596         (typename_sub): Allow a template_type, an explicit_template_type,
16597         or an implicit template type at the end.
16598         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
16599         * decl.c (make_typename_type): Handle template-id where the name
16600         is a TEMPLATE_DECL.
16601         * call.c (build_scoped_method_call): Handle member template
16602         destructor call.
16603         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
16604         destructor is represented by the type.
16605
16606         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
16607         * parse.y (nested_name_specifier): Add 'template' case.
16608         (explicit_template_type): New rule.
16609         (typename_sub): Use it.
16610         * decl.c (make_typename_type): Handle getting a template-id for NAME.
16611         * pt.c (tsubst): Likewise.
16612
16613 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
16614
16615         * pt.c (add_to_template_args): Fix thinko.
16616         (instantiate_class_template): Call it later.
16617
16618         * pt.c (get_class_bindings): Add outer_args parm.
16619         (most_specialized_class): Likewise.
16620         (instantiate_class_template): Pass it.
16621         (more_specialized_class): Likewise.
16622         (lookup_template_class): Get context from template if none
16623         was specified.
16624         (finish_member_template_decl): Don't do anything with a
16625         partial specialization.
16626         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
16627         AGGREGATE_TYPE_P.
16628         * class.c (finish_struct): Member class templates have already been
16629         checked for name clashes.
16630         * decl.c (pushdecl_with_scope): Handle pushing at class level.
16631
16632 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
16633
16634         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
16635         (tsubst, *_PARM): Support multiple levels of template classes.
16636         (instantiate_class_template): Look up the pattern from the
16637         original template.
16638         (lookup_template_class): Handle getting a template for d1.
16639         (push_template_decl): Correct setting of 'primary'.
16640         (reduce_template_parm_level): Add 'levels' parm.
16641         (finish_member_template_decl): Support member class templates.
16642         (template_class_depth): Handle multiple levels.
16643         * parse.y (component_decl_1, fn.def2): Remove member template case.
16644         (component_decl): Add member template cases.
16645         * decl2.c (check_member_template): We now handle member template
16646         classes.
16647         * decl.c (pushtag): Handle member templates.
16648         * method.c (do_inline_function_hair): Don't touch
16649         IDENTIFIER_GLOBAL_VALUE.
16650         * init.c (build_offset_ref): If name isn't an identifier, just
16651         return it.
16652         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
16653
16654         * typeck.c (get_delta_difference): Do adjust for conversions to
16655         and from virtual base.
16656
16657 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
16658
16659         * typeck.c (get_delta_difference): Give hard error for conversion
16660         from virtual base.
16661
16662         * cp-tree.h: Tweak formatting.
16663
16664 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
16665
16666         * decl.c (push_namespace): Handle redeclaration error.
16667
16668         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
16669         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
16670         (NAMESPACE_BINDING): New macro.
16671         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
16672         * *.c: Use them.
16673
16674         * pt.c (push_template_decl): Use innermost_args.
16675
16676         * decl.c (get_unique_name): Tweak from earlier in the name.
16677
16678 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16679
16680         * cp-tree.def: Add CPLUS_BINDING node.
16681         * cp-tree.h (tree_binding): New struct.
16682         (BINDING_SCOPE, BINDING_VALUE): New macros.
16683         (current_namespace, global_namespace): Declare extern.
16684         (struct lang_decl_flags): New field in_namespace.
16685         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
16686         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
16687         (TREE_INDIRECT_USING): New macro.
16688         * decl2.c (current_namespace, global_namespace): Declare.  The
16689         value is a NAMESPACE_DECL now, not a TREE_LIST.
16690         (is_namespace_ancestor, namespace_ancestor): New static functions.
16691         (add_using_namespace, ambiguous_decl): Likewise.
16692         (lookup_using_namespace): New support function for lookup_name.
16693         (qualified_lookup_using_namespace): New support function for
16694         do_scoped_id and lookup_namespace_name.
16695         (get_namespace_id): Mark as obsolete.
16696         (current_namespace_id): Likewise.
16697         (do_namespace_alias): Implement.
16698         (do_using_directive): Implement as call to add_using_namespace.
16699         * decl.c (binding_for_name): New function.
16700         (push_namespace, pop_namespace): Implement.
16701         (push_decl): Don't install a FUNCTION_DECL in the global branch.
16702         (lookup_namespace_name): Implement using qualified lookup.
16703         (lookup_name_real): For global scoping, lookup in
16704         global_namespace.  For namespace scoping, lookup in given
16705         namespace.  For unscoped lookup, iterate over namespace,
16706         considering using directives.
16707         (init_decl_processing): Initialize global_namespace.
16708         (grokvardecl): Build assembler name as static name for globals.
16709         (grokdeclarator): Remove old namespace mangling.
16710         (xref_tag): When installing a global binding for the
16711         tag, make sure we have an identifier.
16712         * method.c (build_overload_nested_name): Mangle namespaces.
16713         (build_qualified_name): Likewise.
16714         (build_decl_overload_real): Likewise.
16715         * lex.c (build_lang_decl): Set namespace for new declaration to
16716         current_namespace.
16717         (do_scoped_id): Find global names in global or current
16718         namespace, or using qualified namespace lookup, depending on
16719         context.
16720         * init.c (build_member_call): When scope is namespace, use
16721         build_x_function_call instead.
16722         (build_offset_ref): When scope is namespace, collapse processing
16723         to lookup_namespace_name instead.
16724         * error.c (dump_decl): Support NAMESPACE_DECL.
16725         * decl.c (pushdecl): Bind globals to current namespace.
16726         (push_overloaded_decl): Likewise.
16727         (lookup_tag): Likewise.
16728         (lookup_name_current_level): Likewise.
16729         (xref_tag): Likewise.
16730         (start_function): Likewise.
16731         * lex.c (do_identifier): Likewise.
16732         (identifier_typedecl_value): Likewise.
16733         (real_yylex): Likewise.
16734         * method.c (do_inline_function_hair): Likewise.
16735         * parse.y (unscoped): Likewise.
16736         * pt.c (check_explicit_specialization): Likewise.
16737         (lookup_template_class): Likewise.
16738         * rtti.c (call_void_fn): Likewise.
16739         * sig.c (build_sigtable): Likewise.
16740         * ptree.c (lang_print_xnode): New function.
16741
16742 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
16743
16744         * pt.c (instantiate_class_template): Don't instantiate if pedantic
16745         and the args use template parms.
16746
16747         * pt.c (push_tinst_level): If the instantiation uses template parms,
16748         fail silently.
16749         * decl.c (xref_basetypes): Do call complete_type for basetypes
16750         that involve template parameters.
16751
16752 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
16753
16754         * typeck2.c (process_init_constructor): Fix labeled init check.
16755
16756 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
16757
16758         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
16759         argument to tsubst and friends.
16760
16761         * pt.c (tsubst, FUNCTION_DECL): Tidy.
16762
16763         * typeck.c (build_x_function_call): Handle static member function
16764         templates like non-templates.  Handle friend templates like normal
16765         function templates.
16766         * pt.c (tsubst, *_PARM): Don't use orig_level.
16767         (get_bindings): Don't call add_to_template_args.
16768         (instantiate_template): Likewise.
16769         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
16770         * ptree.c (print_lang_type): Print index/level for template parms.
16771
16772 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
16773
16774         * Make-lang.in (cc1plus): Note that cc1plus depends on
16775         cp/cp-tree.h and cp/cp-tree.def.
16776
16777         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
16778         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
16779         position in a template parameter list.
16780         * cp-tree.h (template_parm_index): New structure, used as the tree
16781         structure for a TEMPLATE_PARM_INDEX.
16782         (TEMPLATE_PARM_IDX): New macro.
16783         (TEMPLATE_PARM_LEVEL): Likewise.
16784         (TEMPLATE_PARM_DESCENDANTS): Likewise.
16785         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
16786         (TEMPLATE_PARM_DECL): Likewise.
16787         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16788         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
16789         (TEMPLATE_TYPE_DECL): Likewise.
16790         (TEMPLATE_CONST_IDX): Remove.
16791         (TEMPLATE_CONST_LEVEL): Likewise.
16792         (TEMPLATE_CONST_SET_INFO): Likewise.
16793         (TEMPLATE_TYPE_SET_INFO): Likewise.
16794         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
16795         node.
16796         (TEMPLATE_TYPE_LEVEL): Likewise.
16797         * decl.c (decls_match): Call comp_template_parms, rather than
16798         expanding it inline.
16799         (duplicate_decls): If two template declarations are being merged,
16800         then their TEMPLATE_INFOs should be merged as well.
16801         (grokfndecl): Save template-id information when declaring a friend
16802         with explicit template arguments.  Pass arguments to
16803         check_explicit_specialization via correct convention; at some
16804         point check_explicit_specialization changed, but these call-sites
16805         did not.
16806         (grokdeclarator): Tidy up slightly.
16807         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
16808         two template functions with the same DECL_ASSEMBLER_NAME the same,
16809         since the names are not yet mangled.
16810         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
16811         TEMPLATE_CONST_PARM.
16812         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
16813         decl for a non-type parameter, rather than printing `<tparm ...>'.
16814         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
16815         (do_friend): Deal with template friends.
16816         * lex.c (do_pending_inlines): Call
16817         maybe_begin_member_template_processing, rather than
16818         conditionally calling begin_member_template_processing.
16819         (process_next_inline): Likewise.  Call
16820         maybe_end_member_template_processing, rather than
16821         conditionally calling end_member_template_processing.
16822         (do_pending_defargs): Likewise.
16823         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
16824         TEMPLATE_CONST_PARM.
16825         * method.c (build_mangled_template_parm_index): New function.
16826         (build_overload_value): Use it.
16827         (build_overload_name): Likewise.
16828         * pt.c (finish_member_template_decl): Allow friend declarations.
16829         (template_class_depth): New function.
16830         (is_member_template): Rename, and modify, to become...
16831         (is_member_or_friend_template): New function.
16832         (end_member_template_processing): Rename, and modify, to become...
16833         (maybe_end_member_template_processing).
16834         (build_template_parm_index): New function.
16835         (reduce_template_parm_level): New function.
16836         (process_template_parm): Modify to use build_template_parm_index.
16837         (push_template_decl): Deal with friend templates.
16838         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
16839         TEMPLATE_CONST_PARM.
16840         (tsubst_friend_function): New function.
16841         (instantiate_class_template): Generate the DECL_FRIENDLIST
16842         for a new instantiation by using tsubst_friend_function rather
16843         than just tsubst.
16844         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
16845         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
16846         appropriate new macros.  Use reduce_template_parm_level to
16847         generate lower-level template parameters.  Handle tsubst'ing into
16848         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
16849         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
16850         templates.  Similarly for the template parameters for a new
16851         template.
16852         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
16853         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
16854         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
16855         (get_bindings): Call add_to_template_args if necessary.
16856         (instantiate_decl): Handle instantiations of friend templates.
16857         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
16858         TEMPLATE_TYPE_PARM as a list of fields; it's not!
16859         * spew.c (yylex): Do a little manual constant propagation to
16860         clarify the code.
16861
16862 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
16863
16864         * error.c: Include sys/types.h.
16865
16866 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
16867
16868         * method.c (build_mangled_name): Start CPP directives in column zero.
16869
16870 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
16871
16872         * typeck2.c (process_init_constructor): Sorry about non-trivial
16873         labeled initializers.
16874         * parse.y (initlist): Re-enable labeled initializers.
16875
16876 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
16877
16878         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
16879         all callers changed.  Rely on the new parameter instead of arg
16880         being a TREE_LIST when determine whether we are working inside
16881         template template parameter.  Clean up is_type test.
16882
16883 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
16884
16885         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
16886         * typeck2.c (initializer_constant_valid_p): Allow conversions
16887         between pointers and references.
16888
16889 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
16890
16891         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
16892         if pedantic || warn_pointer_arith.
16893
16894 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
16895
16896         * pt.c (unify): Handle TEMPLATE_DECL.
16897
16898 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
16899
16900         * cp-tree.h (strip_attrs): Remove decl.
16901
16902 1998-02-18  Doug Evans  <devans@cygnus.com>
16903
16904         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
16905         Update olddecl's attributes too.
16906         (strip_attrs): Remove function.
16907         * typeck.c (common_type): Call merge_machine_type_attributes.
16908
16909 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
16910
16911         * parse.y (initdcl0_innards): New grammar symbol.
16912         (nomods_initdecls, nomods_initdcl0): Change type from itype to
16913         none, since the resulting value is never used.
16914         (parse_decl): New function.
16915         (datadef): Remove redundant actions.
16916         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
16917         * parse.c: Regenerated.
16918
16919 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
16920
16921         * parse.y (simple_stmt): Use getdecls() to check for decl.
16922
16923 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
16924
16925         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
16926         macros.
16927         (c++.install-common): Install c++filt properly as native or as cross
16928         variant.
16929         (c++.uninstall): Add c++filt.
16930
16931 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
16932
16933         * call.c (standard_conversion): Fix multi-level ptr conversions.
16934
16935 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
16936
16937         * init.c (build_new): Propagate error_mark_node up.
16938
16939 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
16940
16941         * parse.y (simple_stmt): If the condition isn't a declaration,
16942         start the controlled block after the test.
16943
16944 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
16945
16946         * call.c (build_over_call): Convert builtin abs, labs and fabs to
16947         tree-codes.
16948         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
16949         builtins.
16950
16951 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
16952
16953         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
16954
16955 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
16956
16957         * cp-tree.h: Add access_protected_virtual_node.
16958         * class.c (init_class_processing): Initialize it.
16959         * decl.c (xref_basetypes): Use it.
16960         * parse.y (base_class_access_list): Likewise.
16961
16962         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
16963         (c++.install-common): Install c++filt.
16964
16965 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16966
16967         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
16968
16969 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
16970
16971         * call.c (reference_binding): Use comptypes when comparing
16972         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
16973
16974 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
16975
16976         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
16977         (really_overloaded_fn): Move check here from is_overloaded_fn.
16978         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
16979
16980 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
16981
16982         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
16983         conversions.
16984
16985 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
16986
16987         * cp-tree.h (push_template_decl): Return the decl passed in, or an
16988         equivalent duplicate.
16989         * decl.c (pushtag): Use the return value from push_template_decl.
16990         (duplicate_decls): When duplicating a template declaration, merge
16991         the DECL_TEMPLATE_RESULTs as well.
16992         (make_implicit_typename): Don't try to dive into typename types to
16993         find a context for making a new implicit typename.
16994         (start_decl): Use the return value from push_template_decl.
16995         (grokdeclarator): Complain about declarations list `const operator
16996         int'.  Since we don't correctly handle in-class initializations of
16997         non-static data members, complain about this (now illegal)
16998         practice.  Issue an error for initializations of non-const statics
16999         since that is illegal as well, and since we don't handle that case
17000         correctly either.
17001         (start_function): Use the return value from push_template_decl.
17002         (start_method): Likewise.
17003         * decl2.c (grokfield): Likewise.  Since the change to
17004         grokdeclarator ensures that all initialized fields are in fact
17005         static, remove a redundant test for TREE_PUBLIC.
17006         * parse.y (initlist): Disable labeled initializers since they do
17007         not work as per the documentation, and since they do not use the
17008         same syntax as the C front end.
17009         * pt.c (push_template_decl): Return the decl passed in, or an
17010         equivalent duplicate.
17011         (lookup_template_class): When searching in a nested context,
17012         use the right arguments.
17013         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
17014         * typeck.c (build_component_ref): Assign the correct type to the
17015         result of build_vfn_ref.
17016
17017 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
17018
17019         * pt.c (convert_nontype_argument): Fix typo.
17020         (check_explicit_specialization): Allow old-style specialization
17021         of class template members.
17022
17023 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
17024                           Manfred Hollstein  <manfred@s-direktnet.de>
17025
17026         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
17027         when deciding to override DECL_ASSEMBLER_NAME.
17028
17029 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
17030
17031         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
17032         * cp-tree.h (flag_do_squangling): Add declaration.
17033         * lang-options.h: Add -fsquangle and -fno-squangle.
17034         * method.c: Add macros and static variables for squangling.
17035         (build_overload_name): Rename to build_mangled_name, add logic for B
17036         compression, and split into process_modifiers and
17037         process_overload_item.
17038         (process_modifiers): New function, to handle constant, reference,
17039         and pointer types.
17040         (process_overload_item): New function, handles issue of type codes.
17041         (build_overload_name): New function, start squangling and call
17042         build_mangled_name.
17043         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
17044         (start_squangling): New function to initialize squangling structs.
17045         (end_squangling): New function to destroy squangling structs.
17046         (nrepeats): Rename variable to Nrepeats.
17047         (issue_nrepeats): New function for issuing 'n' type repeats.
17048         (check_ktype): New function to check for type K name compression.
17049         (build_overload_nested_name): Add a check for K name compression.
17050         (build_qualified_name): Add a check for K name compression and don't
17051         use DECL_ASSEMBLER_NAME when squangling is on.
17052         (check_btype): New function, checks for B type compression.
17053         (build_static_name, build_decl_overload_real): Initiate squangling.
17054         (build_typename_overload, build_overload_with_type): Initiate
17055         squangling
17056
17057 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
17058
17059         * method.c (make_thunk): Avoid name buffer overflow.
17060
17061 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
17062
17063         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
17064         don't define them yet.
17065
17066         * parse.y (nomods_initdcl0): Add constructor_declarator case.
17067
17068 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17069
17070         * config-lang.in (diff_excludes): Use basename only.
17071
17072 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
17073
17074         * tinfo2.cc: Add tinfo for signed char.
17075
17076 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
17077
17078         * search.c (compute_access): Handle protected constructors in derived
17079         classes as accessible.
17080
17081 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
17082
17083         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
17084         Call convert_from_reference sooner.
17085
17086 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
17087
17088         * cvt.c (ocp_convert): Obtain the constant values from constant
17089         decls even if the destination type is the same as the type of the
17090         decl.
17091
17092         * decl2.c (finish_file): Make sure that static inlines with
17093         definitions are not marked DECL_EXTERNAL before returning.
17094
17095 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
17096
17097         * decl.c: Lose arg_looking_for_template.
17098         (lookup_name_real): Likewise.
17099         * parse.y: Lose processing_template_arg, template_arg1.
17100         (primary): Likewise.
17101         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
17102
17103 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
17104
17105         * error.c (dump_decl): Fix type of default arguments for template
17106         template parameters and nontype template parameters.
17107         * parse.y (template_parm): Handle invalid default template
17108         template arguments here.
17109
17110         * parse.y (template_parm): Use template_arg instead of PTYPENAME
17111         for default template template argument.
17112         * pt.c (coerce_template_parms): Merge default template argument
17113         codes.  Can treat RECORD_TYPE as template name if it is implicitly
17114         created.  Fix argument index in error message.
17115         * typeck.c (comptypes): Merge template argument comparison codes in
17116         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
17117
17118 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
17119
17120         * lex.c (file_name_nondirectory): Also check for '/'.
17121
17122 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
17123
17124         * parse.y (primary): Deal with statement-expressions in
17125         templates.
17126         * pt.c (tsubst_copy): Handle BIND_EXPR.
17127         * tree.c (mapcar): Likewise.
17128
17129         * call.c (add_template_candidate_real): Pass extra parameter to
17130         fn_type_unification.
17131         * cp-tree.h (fn_type_unification): Add parameter.
17132         * pt.c (fn_type_unification): Add additional parameter to deal with
17133         static member functions.
17134         (get_bindings): Deal with static member functions.
17135
17136         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
17137         (revert_static_member_fn): Declare.
17138         * decl.c (revert_static_member_fn): Remove declaration.  Change
17139         linkage from internal to external.
17140         (cp_finish_decl): Deal with virtual functions in classes local to
17141         template functions.
17142         * decl2.c (finish_file): Don't forget to emit increment/decrement
17143         expressions in initializers for file-scope variables.
17144         * parse.y (typename_sub2): If the typename doesn't names a
17145         template, rather than a type, issue an error message.
17146         * pt.c (check_explicit_specialization): Handle specializations of
17147         static member functions.
17148         (coerce_template_parms): Handle offset references to lists of
17149         member functions.
17150         * search.c (note_debug_info_needed): Don't crash when handed a
17151         type which is being defined.
17152         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
17153         that can happen with some illegal code.
17154
17155 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17156
17157         * call.c (user_harshness): Initialize `code' to 0.
17158         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
17159         (null_ptr_cst_p): Add parentheses around && within ||.
17160         (standard_conversion): Likewise.
17161         (z_candidate): Likewise.
17162         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
17163         (build_object_call): Likewise for `mem_args'.
17164         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
17165         default case in enumeration switch.
17166
17167         * class.c (build_vtable_entry): Add explicit braces to avoid
17168         ambiguous `else'.
17169         (build_class_init_list): Likewise.
17170         (finish_struct_1): Initialize `width' to 0.
17171         (instantiate_type): Initialize `name' to NULL_TREE.  Add
17172         explicit braces to avoid ambiguous `else'.
17173
17174         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
17175         `else'.
17176
17177         * decl.c (grok_reference_init): Eliminate unused parameter, all
17178         callers changed.
17179         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
17180         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
17181         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
17182         (grokdeclarator): Add parentheses around && within ||.  Add
17183         explicit braces to avoid ambiguous `else'.
17184         (grokparms): Initialize `type' to NULL_TREE.
17185         (xref_tag): Remove unused label `just_return'.
17186         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
17187         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
17188         (hack_incomplete_structures): Add parentheses around assignment
17189         used as truth value.
17190
17191         * decl2.c (coerce_delete_type): Hide definition of `e3'.
17192
17193         * error.c: Include <stdlib.h>.
17194         (dump_expr): Change the type of `i' to size_t.  Remove unused
17195         label `error'.
17196
17197         * except.c (init_exception_processing): Remove unused variable `d'.
17198         (expand_throw): Likewise for `label'.
17199
17200         * friend.c (add_friends): Add explicit braces to avoid ambiguous
17201         `else'.
17202
17203         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
17204         (sort_base_init): Likewise for `binfo'.
17205         (expand_member_init): Likewise for `rval'.
17206         (build_member_call): Add parentheses around assignment used as
17207         truth value.
17208         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
17209         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
17210         `old_immediate_size_expand' to 0.
17211         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
17212         (build_vec_delete_1): Remove unused variable `block'.
17213         (expand_vec_init): Initialize `itype' to NULL_TREE.
17214
17215         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
17216         declaration of `index' and `rindex' with autoconf macros.
17217         (reinit_parse_for_expr): Remove unused variables
17218         `look_for_semicolon' and `look_for_lbrac'.
17219         (cons_up_default_function): Initialize `args' to NULL_TREE.
17220         (readescape): Initialize `firstdig' to 0.
17221         (real_yylex): Add parentheses around assignment used as truth value.
17222
17223         * method.c: Include <strings.h> if we don't have <string.h>.
17224         Protect declaration of `index' with autoconf macro.
17225
17226         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
17227         Initialize `type' to NULL_TREE.
17228         (structsp): Remove unused variable `id'.
17229
17230         * pt.c (coerce_template_parms): Add explicit braces to avoid
17231         ambiguous `else'.
17232         (lookup_template_class): Initialize `template' to NULL_TREE.
17233         (instantiate_class_template): Remove unused variable `name' and `e'.
17234         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
17235         (do_poplevel): Initialize `saved_warn_unused' to 0.
17236         (type_unification): Remove unused varable `parm'.
17237         (unify): Likewise for `j'.
17238
17239         * repo.c (init_repo): Add parentheses around assignment used as
17240         truth value.
17241         (finish_repo): Remove unused varable `p'.
17242
17243         * search.c (get_binfo): Initialize `type' to NULL_TREE.
17244         (get_base_distance): Likewise.
17245         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
17246         and `new_v' to NULL_TREE.
17247         (lookup_fnfields): Likewise for `rval_binfo_h'.
17248         (breadth_first_search): Add parentheses around assignment used as
17249         truth value.
17250         (get_template_base): Initialize `type' to NULL_TREE.
17251
17252         * sig.c (append_signature_fields): Initialize `last_mfptr' to
17253         NULL_TREE.
17254         (build_signature_table_constructor): Likewise for
17255         `last_rhs_field', `pfn' and `vt_off'.
17256         (build_sigtable): Likewise for `init'.
17257
17258         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
17259         (propagate_binfo_offsets): Likewise for `delta'.
17260         (hash_tree_cons): Initialize hashcode to 0.
17261         (can_free): Likewise for `size'.
17262         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
17263
17264         * typeck.c (convert_sequence): Hide prototype.
17265         (common_type): Add explicit braces to avoid ambiguous `else'.
17266         (comp_target_types): Likewise.
17267         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
17268         (build_function_call_real): Add explicit braces to avoid ambiguous
17269         `else'.
17270         (convert_arguments): Initialize `called_thing' to 0.
17271         (convert_for_initialization): Initialize `savew' and `savee' to 0.
17272
17273         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
17274         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
17275         (build_x_arrow): Likewise for `last_rval'.
17276
17277         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
17278
17279 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
17280
17281         * decl.c (init_decl_processing): Use set_sizetype.
17282         * decl2.c (sizetype): Don't declare.
17283         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
17284         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
17285         (build_component_addr, unary_complex_lvalue): Likewise.
17286         * rtti.c (expand_class_desc): Likewise.
17287         * class.c (get_vfield_offset): Likewise.
17288
17289 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
17290
17291         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
17292         early to avoid bogus error.  Handle overloaded function
17293         names provided as template arguments correctly.
17294         (coerce_template_parms): Don't mishandle overloaded functions when
17295         dealing with template template parameters.
17296         (lookup_template_class): Issue an error message, rather than
17297         crashing, when the TYPE_DECL provided is not a template type.
17298
17299 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
17300
17301         * class.c (instantiate_type): Don't just return a known type if
17302         it's wrong.
17303
17304 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
17305
17306         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
17307         since that code could never be reached.
17308
17309         * error.c (dump_decl): Avoid aborting in the midst of printing an
17310         error message about an illegal template declaration.
17311
17312         * parse.y (structsp): Print an error message, rather than crashing,
17313         when a class-head does not name a class.
17314
17315         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
17316         template arguments as a g++ extension.
17317
17318         * cp-tree.def (ALIGNOF_EXPR): New tree code.
17319         * decl2.c (grok_alignof): If processing_template_decl, just store
17320         the expression.
17321         * typeck.c (c_alignof): Likewise.
17322         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
17323         * error.c (dump_expr): Likewise.
17324         * pt.c (tsubst_copy): Likewise.
17325         * tree.c (cp_tree_equal): Likewise.
17326         * pt.c (uses_template_parms): Correctly determine whether or not a
17327         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
17328         folding can be done.
17329
17330         * cp-tree.h (grok_enum_decls): Remove type parameter.
17331         * decl.c (grok_enum_decls): Likewise.
17332         * decl2.c (grok_x_components): Call grok_enum_decls
17333         unconditionally, since it will do nothing if there is no
17334         current_local_enum.  Use the new calling sequence.
17335         * pt.c (tsubst_enum): Use the new calling sequence for
17336         grok_enum_decls.
17337
17338         * decl.c (start_function): Make member functions of local classes
17339         in extern inline functions have comdat linkage here...
17340         (grokdeclarator): Rather than here.
17341
17342 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
17343
17344         * pt.c (convert_nontype_argument): Use decl_constant_value.
17345
17346 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
17347
17348         * call.c (add_template_candidate_real): New function.
17349         (add_template_candidate): Use it.
17350         (add_template_conv_candidate): Likewise.
17351         (joust): Pass extra argument to more_specialized.
17352         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
17353         (is_local_class): Remove.
17354         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
17355         * cp-tree.h (is_local_class): Remove.
17356         (perform_array_to_pointer_conversion): Likewise.
17357         (finish_member_template_decl): Add.
17358         (check_explicit_specialization): Return a tree, not an int.
17359         (more_specialized): Take additional argument.
17360         (get_bindings): Likewise.
17361         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
17362         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
17363         (perform_array_to_pointer_conversion): Remove.
17364         * decl.c (saved_scope): Add processing_specialization,
17365         processing_explicit_instantiation fields.
17366         (maybe_push_to_top_level): Save them.
17367         (pop_from_top_level): Restore them.
17368         (grokfndecl): Use new return value from
17369         check_explicit_specialization.
17370         (start_decl): Don't check flag_guiding_decls before pushing
17371         decls.
17372         (cp_finish_decl): Remove previous (bogus) change.
17373         (grok_declarator): Use decl_function_context rather than
17374         is_local_class.
17375         * decl2.c (finish_file): Pass extra argument to get_bindings.
17376         (build_expr_from_tree): Let build_x_component_ref check
17377         validity of arguments rather than doing it here.
17378         * lex.c (cons_up_default_function): Remove code fooling with
17379         processing_specialization, processing_explicit_instantiation
17380         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
17381         * method.c (build_overload_identifier): Mangle local classes in
17382         template functions correctly.
17383         * parse.y (finish_member_template_decl): Move to pt.c.
17384         * pt.c (finish_member_template_decl): Moved here from parse.y.
17385         (print_candidates): New function.
17386         (determine_specialization): Change interface.  Properly look for
17387         most specialized versions of template candidates.
17388         (check_explicit_specialization): Fully process explicit
17389         instantiations.
17390         (push_template_decl): Avoid looking at CLASSTYPE fields in
17391         FUNCTION_DECLS.
17392         (determine_overloaded_function): Remove.
17393         (convert_nontype_argument): Change name from
17394         convert_nontype_parameter.  Use determine_overloaded_function
17395         instead of instantiate_type.
17396         (mangle_class_name_for_template): Handle type contexts as well as
17397         function contexts.
17398         (classtype_mangled_name): Likewise.
17399         (lookup_template_class): Likewise.
17400         (tsubst): Likewise.
17401         (more_specialized): Take explict template arguments as a
17402         parameter.
17403         (most_specialized): Likewise.
17404         (get_bindings): Likewise.  Check that return types match before
17405         proclaiming a function a match.
17406         (do_decl_instantiation): Remove code searching for function to
17407         instantiate; that is now done in check_explicit_specialization.
17408         (add_maybe_template): Pass extra argument to get_bindings.
17409         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
17410         implementation.
17411         * typeck.c (build_component_ref): Check for invalid arguments.
17412
17413 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
17414
17415         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
17416         return_target and call_target are equivalent.
17417
17418         * pt.c (type_unification_real): Just accept function parms that
17419         don't use any template parms.
17420
17421 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
17422
17423         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
17424         unset DECL_NOT_REALLY_EXTERN.
17425
17426         * parse.y (typename_sub*): Fix std::.
17427
17428 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
17429
17430         * error.c (dump_decl): Fix type default template args.
17431         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
17432
17433 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
17434
17435         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
17436         (file_name_nondirectory): Use.
17437
17438 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
17439
17440         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
17441         that are not really present.  Substitute default arguments in
17442         template template arguments.  Correctly convert TEMPLATE_DECL to
17443         TEMPLATE_TEMPLATE_PARM.
17444         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
17445         are no longer treated specially here.
17446         * parse.y (template_template_parm): Fix copy error.
17447         * decl.c (grokdeclarator): Warn about missing `typename' for nested
17448         type created from template template parameters.
17449         * parse.y (bad_parm): Likewise
17450
17451         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
17452         (push_nested_class): Likewise.
17453         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
17454         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
17455         (copy_template_template_parm): Declare.
17456         * decl.c (arg_looking_for_template): New variable.
17457         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
17458         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
17459         node if arg_looking_for_template is nonzero.
17460         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
17461         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
17462         (grokdeclarator): Handle TEMPLATE_DECL.
17463         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
17464         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
17465         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
17466         (dump_decl): Handle unnamed template type parameters.
17467         Handle template template parameters.
17468         (dump_function_name): Handle template template parameters.
17469         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
17470         Handle TEMPLATE_TEMPLATE_PARM.
17471         * method.c (build_template_template_parm_names): New function.
17472         (build_template_parm_names): Handle TEMPLATE_DECL.
17473         (build_overload_nested_name, build_overload_name):
17474         Handle TEMPLATE_TEMPLATE_PARM.
17475         * parse.y (maybe_identifier): New nonterminal.
17476         (template_type_parm): Use it.
17477         (template_template_parm, template_arg1): New nonterminal.
17478         (template_parm): Add template_template_parm rules.
17479         (template_arg): Set processing_template_arg.
17480         (template_arg1): Rules moved from template_arg.
17481         (primary, nonnested_type): Set arg_looking_for_template if we are
17482         processing template arguments.
17483         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
17484         (process_template_parm): Handle template template parameters.
17485         (coerce_template_parms, comp_template_args): Likewise.
17486         (mangle_class_name_for_template, lookup_template_class): Likewise.
17487         (uses_template_parms): Handle TEMPLATE_DECL and
17488         TEMPLATE_TEMPLATE_PARM.
17489         (current_template_args): Handle TEMPLATE_DECL.
17490         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
17491         * search.c (dfs_walk, dfs_record_inheritance):
17492         Handle TEMPLATE_TEMPLATE_PARM.
17493         * tree.c (copy_template_template_parm): New function.
17494         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
17495         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
17496
17497 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
17498
17499         * decl.c (start_decl): Don't allow duplicate definitions of static
17500         data members.
17501
17502         * call.c (build_user_type_conversion_1): Handle user-defined
17503         template conversion operators correctly.
17504
17505         * decl2.c (build_expr_from_tree): Issue an error message if the
17506         object in a COMPONENT_REF is a TEMPLATE_DECL.
17507
17508         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
17509
17510         * class.c (is_local_class): New function.
17511         * cp-tree.h (is_local_class): Declare it.
17512         (last_tree): Likewise.
17513         (begin_tree): Likewise.
17514         (end_tree): Likewise.
17515         (lookup_template_class): Change prototype.
17516         * decl.c (cp_finish_decl): Check for NULL where necessary.
17517         Consider FUNCTION_DECLS to declare objects with top-level binding,
17518         when calling make_decl_rtl.
17519         (grokdeclarator): Give members of local classes internal linkage.
17520         (start_function): Remove declaration of last_tree.
17521         (finish_function): Set flag_keep_inline_functions around call to
17522         rest_of_compilation if we are processing a member function in a
17523         local class.
17524         (start_method): Call push_template_decl for member functions of
17525         local classes in template functions.
17526         * decl2.c (import_export_decl): Don't give external linkage to
17527         instantiations of templates with internal linkage.
17528         * parse.y (last_tree): Remove declaration.
17529         (template_type): Pass extra parameter to lookup_template_class.
17530         (self_template_type): Likewise.
17531         (structsp): Move call to reset_specialization into left_curly.
17532         (left_curly): Call reset_specialization, and begin_tree.
17533         * pt.c (saved_trees): New variable.
17534         (mangle_class_name_for_template): Change prototype.  Use
17535         additional function context to name local classes in templates
17536         correctly.
17537         (classtype_mangled_name): Pass the context.
17538         (push_template_decl): Handle local classes and templates, and
17539         member functions for such classes.
17540         (convert_nontype_parameter): Fix handling of pointer-to-member
17541         constants.
17542         (lookup_template_class): Handle local classes in templates.
17543         (tsubst): Likewise.  Don't assume that template instantiations
17544         have external linkage; pay attention to the template declaration.
17545         (mark_decl_instantiated): Likewise.
17546         (begin_tree): New function.
17547         (end_tree): Likewise.
17548
17549         * decl.c (xref_basetypes): Don't call complete_type for basetypes
17550         that involve template parameters; that can lead to infinite
17551         recursion unnecessarily.
17552
17553         * pt.c (register_specialization): Do not register specializations
17554         that aren't ready to be registered yet.
17555         (check_explicit_specialization): Handle explicit specialization of
17556         constructors and destructors.
17557         (build_template_decl): New function.
17558         (push_template_delc): Handle out-of-class specializations of
17559         member templates.
17560
17561         * pt.c (check_explicit_specialization): Set up the template
17562         information before registering the specialization.
17563         (coerce_template_parms): Fix thinko.
17564         (tsubst): Handle specializations of member templates correctly.
17565
17566         * class.c (finish_struct_methods): Remove calls to
17567         check_explicit_specialization from here.
17568         (finish_struct): And insert them here.
17569         * cp-tree.h (perform_qualification_conversions): New function.
17570         (perform_array_to_pointer_conversion): Likewise.
17571         (begin_explicit_instantiation): Likewise.
17572         (end_explicit_instantiation): Likewise.
17573         (determine_specialization): Renamed from
17574         determine_explicit_specialization.
17575         (comp_template_parms): New function.
17576         (processing_explicit_instantiation): New variable.
17577         * cvt.c (perform_qualification_conversions): New function.
17578         (perform_array_to_pointer_conversion): Likewise.
17579         * decl.c (duplicate_decls): Don't consider template functions
17580         alike unless they have the same parameters.  Refine handling of
17581         instantiation/specialization mismatches.
17582         (start_decl): Don't call pushdecl for template specializations,
17583         since they don't affect overloading.
17584         (start_function): Likewise.
17585         (grokfndecl): Call check_explicit_specialization a little later.
17586         Don't call duplicate_decls for memberm template specializations.
17587         (grokdeclarator): Don't update template_count for classes that are
17588         themselves specializations.  Remove use of `2' as parameter to
17589         grokfndecl since that value isn't used.
17590         * lex.c (cons_up_default_function): Save and restore
17591         processing_explicit_instantiation around calls to grokfield.
17592         * parse.y (finish_member_template_decl): New function.
17593         (component_decl_1): Use it.
17594         (fn.def2): Likewise.
17595         (template_arg_list_opt): New nonterminal.
17596         (template_type): Use it.
17597         (self_template_type): Likewise.
17598         (template_id): Likewise.
17599         (object_template_id): Likewise.
17600         (notype_template_declarator): Likwise.
17601         (begin_explicit_instantiation): Likewise.
17602         (end_explicit_instantiation): Likewise.
17603         (explicit_instantiation): Use them.
17604         * pt.c (coerce_template_parms): Add parameters.
17605         (processing_explicit_instantiation): New variable.
17606         (convert_nontype_parameter): New function.
17607         (determine_overloaded_function): Likewise.
17608         (begin_explicit_instantiation): Likewise.
17609         (end_explicit_instantiation): Likewise.
17610         (retrieve_specialization): Likewise.
17611         (register_specialization): Likewise.
17612         (processing_explicit_specialization): Removed.
17613         (determine_specialization): Handle specializations of member
17614         functions of template class instantiations.
17615         (check_explicit_specialization): Refine to conform to standard.
17616         (comp_template_parms): New function.
17617         (coerce_template_parms): Call convert_nontype_parameter.
17618         (tsubst): Refine handling of member templates.  Use
17619         register_specialization.
17620         (instantiate_template): Use retrieve_specialization.
17621         (do_decl_instantiation): Likewise.
17622         (instantiate_decl): Likewise.
17623         (type_unification): Improve handling of explict template
17624         arguments.
17625         * tree.c (mapcar): Return error_mark_node, rather than aborting,
17626         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
17627         * typeck.c (build_unary_op): Call determine_specialization, rather
17628         than determine_explicit_specialization.
17629
17630 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
17631
17632         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
17633
17634 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
17635
17636         * error.c (dump_decl): For enum tags, output the tag, not its value.
17637
17638 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
17639
17640         * decl.c (init_decl_processing): Only call init_rtti_processing
17641         FLAG_RTTI is set.
17642
17643 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
17644
17645         * init.c (build_new_1): Split out from build_new.
17646         (build_new): Just return a NEW_EXPR.
17647         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
17648
17649         * decl2.c (get_temp_regvar): Tweak.
17650
17651         * cp-tree.h (TREE_CALLS_NEW): Comment out.
17652         * class.c (resolves_to_fixed_type_p): Remove use.
17653         * method.c (build_opfncall): Likewise.
17654         * call.c (build_new_op): Likewise.
17655
17656 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
17657
17658         * exception.cc (__eh_alloc, __eh_free): New fns.
17659         (__cp_push_exception, __cp_pop_exception): Use them.
17660         (__uncatch_exception): Call terminate here if no exception.
17661         * except.c (build_terminate_handler): New fn.
17662         (expand_start_catch_block): Use it.
17663         (expand_exception_blocks): Likewise.
17664         (alloc_eh_object): New fn.
17665         (expand_throw): Use it.  Protect exception init with terminate.
17666         * typeck.c (build_modify_expr): Remove code that ignores trivial
17667         methods.
17668
17669 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17670
17671         * call.c (add_builtin_candidate): Add default case in enumeration
17672         switch.
17673         (build_new_op): Likewise.
17674         (convert_like): Likewise.
17675         * cvt.c (build_expr_type_conversion): Likewise.
17676         * tree.c (real_lvalue_p): Likewise.
17677         (lvalue_p): Likewise.
17678         (cp_tree_equal): Likewise.
17679         * typeck.c (comptypes): Likewise.
17680         (build_component_ref): Likewise.
17681         (build_function_call_real): Likewise.
17682         (build_binary_op_nodefault): Likewise.
17683         (build_unary_op): Likewise.
17684         (build_modify_expr): Likewise.
17685         * typeck2.c (initializer_constant_valid_p): Likewise.
17686
17687 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
17688
17689         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
17690
17691 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
17692
17693         * pt.c (coerce_template_parms): Make sure to digest_init if
17694         possible.
17695
17696         * decl.c (duplicate_decls): Make the newdecl virtual if the
17697         olddecl was, just as is done with other attributes of olddecl.
17698
17699 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
17700
17701         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
17702         address of an OFFSET_REF.
17703
17704         * cp-tree.def: Add AGGR_INIT_EXPR.
17705         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
17706         AGGR_INIT_EXPR where appropriate.
17707         * expr.c (cplus_expand_expr): Likewise.  Simplify.
17708
17709         * decl2.c (finish_file): Remove call to register_exception_table.
17710
17711 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
17712
17713         * pt.c (instantiate_class_template): Don't do injection when
17714         processing_template_decl is true, as pollutes current_binding_level
17715         for base classes.
17716
17717 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
17718
17719         * pt.c (maybe_fold_nontype_arg): Add prototype.
17720
17721 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
17722
17723         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
17724         * error.c (dump_expr): Likewise.
17725
17726 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
17727
17728         * typeck.c (build_function_call_real): Remove "inline called before
17729         definition" pedwarn.
17730
17731         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
17732
17733 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
17734
17735         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
17736
17737         * pt.c (type_unification_real): Change __null to type void* with
17738         a warning.
17739
17740 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
17741
17742         * call.c (implicit_conversion): Don't call
17743         build_user_type_conversion_1 with a NULL expr, since it will
17744         crash.
17745
17746         * pt.c (unify): Don't try to unify array bounds if either array is
17747         unbounded.
17748
17749 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
17750
17751         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
17752         Replace extern decls with casts.
17753
17754         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
17755         Update last_parm_cleanup_insn.
17756         (store_after_parms): Remove.
17757         * cp-tree.h: Adjust.
17758
17759 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
17760
17761         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
17762         (finish_file): Check DECL_COMDAT instead of weak|one_only.
17763         (import_export_vtable): Use make_decl_one_only instead of
17764         comdat_linkage for win32 tweak.
17765         (import_export_decl): Likewise.
17766         * pt.c (mark_decl_instantiated): Likewise.
17767
17768         * decl2.c (finish_file): Lose handling of templates in pending_statics.
17769
17770 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
17771
17772         * decl2.c (finish_file): Lose call to expand_builtin_throw.
17773         * except.c (expand_builtin_throw): Remove.
17774         * cp-tree.h: Remove ptr_ptr_type_node.
17775         * decl.c: Likewise.
17776
17777 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
17778
17779         * decl.c (ptr_ptr_type_node): Define.
17780         (init_decl_processing): Initialize it.
17781         * cp-tree.h: Declare it.
17782         * exception.cc (__cp_exception_info): Use __get_eh_info.
17783         (__cp_push_exception): Likewise.
17784         (__cp_pop_exception): Likewise.
17785
17786         From Scott Snyder <snyder@d0sgif.fnal.gov>:
17787         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
17788         saved_pc.
17789         (init_exception_processing): Removed saved_pc initialization.
17790
17791 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
17792
17793         * pt.c (instantiate_decl): Defer all templates but inline functions.
17794
17795 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
17796
17797         * init.c (expand_vec_init): Don't fold a list of parameters.
17798
17799         * decl.c (copy_args_p): Handle copy elision for types with virtual
17800         bases.
17801         * call.c (build_over_call): Likewise.
17802
17803 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
17804
17805         * pt.c (lookup_template_function): Copy the template arguments,
17806         not just the list containing them, to the permanent obstack.
17807
17808 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
17809
17810         * except.c (expand_start_catch_block): suspend_momentary for the
17811         terminate handler.
17812
17813         * error.c (dump_decl): Handle LOOKUP_EXPR.
17814
17815 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
17816
17817         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
17818         permanent obstack if we are processing a template decl.
17819         * typeck.c (build_static_cast): Likewise.
17820         (build_const_cast): Likewise.
17821         (build_reinterpret_cast): Likewise.
17822
17823         * pt.c (coerce_template_parms): Coerce some expressions, even
17824         when processing_template_decl.
17825
17826 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
17827
17828         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
17829         handling of pointer difference expressions.
17830
17831         * typeck.c (comp_target_types): Comparison of function/method types
17832         is independent of nptrs.
17833
17834 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
17835
17836         * pt.c (tsubst): Avoid creating pointer to reference and
17837         reference to reference types.
17838
17839 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
17840
17841         * parse.y (do_id): New nonterminal.
17842         (template_id): Use it.
17843
17844 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
17845
17846         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
17847         * spew.c (yylex): Don't do_identifier here.
17848         * decl2.c (build_expr_from_tree): Revert last change.
17849
17850         * decl2.c (build_expr_from_tree): Expand the name for a method call.
17851         * parse.y (object_template_id): Don't try to take the DECL_NAME.
17852
17853 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
17854
17855         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
17856         alloc_expr.
17857         * call.c (build_op_delete_call): Adjust.
17858
17859         * except.c (expand_end_catch_block): Lose rethrow region.
17860         (expand_start_catch_block): Likewise.
17861         (expand_end_catch_block): Don't expand_leftover_cleanups.
17862
17863 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
17864
17865         * pt.c (tsubst): Remove tree_cons call (places redundant info into
17866         DECL_TEMPLATE_INSTANTIATION).
17867
17868 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
17869
17870         * tree.c (is_overloaded_fn): Handle getting a fn template.
17871         (really_overloaded_fn): Likewise.
17872         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
17873         * pt.c (check_explicit_specialization): Tweak.
17874         (determine_explicit_specialization): Tweak.
17875
17876         * tree.c, cp-tree.h (get_target_expr): New fn.
17877
17878 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
17879
17880         * pt.c (check_explicit_specialization): Fix misspelling in
17881         diagnostic: `preceeded'.
17882         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
17883         `conversiona'.
17884
17885 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
17886
17887         * pt.c (determine_explicit_specialization): Avoid an internal
17888         error for bad specializations.
17889
17890         * method.c (build_overload_value): Handle SCOPE_REF.
17891
17892 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
17893
17894         * class.c (prepare_fresh_vtable): Enable even more complex MI
17895         vtable names.
17896
17897 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
17898
17899         * exception.cc (__check_eh_spec): Optimize a bit.
17900
17901         * exception.cc (__cp_pop_exception): Lose handler arg.
17902         * except.c (do_pop_exception): Likewise.
17903         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
17904         (expand_end_catch_block): Likewise.
17905
17906 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
17907
17908         * pt.c (check_explicit_specialization): Complain about using a
17909         template-id for a non-specialization.
17910
17911 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
17912
17913         * repo.c: Prototype rindex only if needed.
17914         * xref.c: Likewise.
17915
17916 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
17917
17918         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
17919
17920 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
17921
17922         * typeck.c (build_const_cast): Handle references here instead of
17923         handing off to convert_to_reference.
17924
17925         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
17926         TerminateFunctionCall.
17927         (init_exception_processing): Likewise.  Terminate et al are now
17928         the fns, not ADDR_EXPRs.
17929         (various): Lose redundant assemble_external calls.
17930         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
17931
17932         * cp-tree.h (struct lang_decl_flags): Add comdat.
17933         (DECL_COMDAT): New macro.
17934         * decl.c (duplicate_decls): Propagate it.
17935         (cp_finish_decl): Handle it.
17936         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
17937
17938         * class.c: Remove static pending_hard_virtuals.
17939         (add_virtual_function): Take pointers to pending_virtuals
17940         and pending_hard_virtuals.
17941         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
17942
17943 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
17944
17945         * decl2.c (import_export_vtable): If we support one_only but not
17946         weak symbols, mark instantiated template vtables one_only.
17947         (import_export_decl): Likewise for tinfo functions.
17948         (finish_vtable_vardecl): Also write out vtables from explicitly
17949         instantiated template classes.
17950         * pt.c (mark_class_instantiated): Revert last change.
17951
17952         * except.c (expand_throw): Call mark_used on the destructor.
17953
17954 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
17955
17956         * lex.c (lang_init): Enable flag_exceptions by default if no
17957         command line switch was specified.
17958
17959 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
17960
17961         * pt.c (unify): Handle `void' template parameters in
17962         specializations.
17963
17964 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
17965
17966         * rtti.c (build_dynamic_cast): Handle template case here.
17967         (build_dynamic_cast_1): Not here.
17968
17969         * typeck2.c (digest_init): Make copies where appropriate.
17970
17971         * decl2.c (delete_sanity): resolve_offset_ref.
17972
17973         * except.c: Call terminate without caching so many bits.
17974
17975         * except.c (expand_start_catch_block): Fix catching a reference
17976         to pointer.
17977
17978 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
17979
17980         * init.c (build_new): Copy size to the saveable obstack.
17981
17982         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
17983         TRY_CATCH_EXPR for now.
17984
17985 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
17986
17987         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
17988         has DECL_LANG_SPECIFIC.
17989
17990         * exception.cc (struct cp_eh_info): Add handlers field.
17991         (__cp_push_exception): Initialize it.
17992         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
17993         (__throw_bad_exception): Remove.
17994         * except.c (call_eh_info): Add handlers field.
17995         (get_eh_handlers): New fn.
17996         (push_eh_cleanup): Increment handlers.
17997
17998 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
17999
18000         * except.c (expand_start_eh_spec): Use the try/catch code.
18001         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
18002         doing everything inline.
18003         (init_exception_processing): throw_type_match now takes
18004         const void pointers.
18005         * exception.cc (__check_eh_spec): New fn.
18006         * inc/exception: Neither terminate nor unexpected return.
18007         * decl.c: Make const_ptr_type_node public.
18008         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
18009
18010         * except.c (expand_start_catch_block): We only need the rethrow
18011         region for non-sjlj exceptions.
18012         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
18013
18014 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
18015
18016         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
18017         (various.o): Likewise.
18018         * inc/new: Add placement deletes.  Add throw specs for default new.
18019         * new.cc (set_new_handler): Move here from libgcc2.
18020         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
18021         (new): Move from libgcc2.  Throw bad_alloc.
18022         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
18023         * decl.c (init_decl_processing): Update exception specs on new and
18024         delete.
18025
18026         * method.c (build_decl_overload_real): Don't mess with global
18027         placement delete.
18028
18029         * init.c (build_new): Check for null throw spec, not nothrow_t.
18030
18031         * decl.c (duplicate_decls): Don't complain about different exceptions
18032         from an internal declaration.
18033
18034         * call.c (build_op_delete_call): Fix check for member fns again.
18035
18036         * decl2.c (import_export_decl): Interface hackery affects
18037         virtual synthesized methods.
18038
18039 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
18040
18041         * decl.c (start_decl): Don't just complain about a mismatched
18042         scope, fix it.
18043
18044         * decl.c (make_implicit_typename): Handle case where t is not
18045         actually from context.
18046         * tree.c (get_type_decl): Lose identifier case.
18047         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
18048         * parse.y (nonnested_type): Just use lookup_name.
18049         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
18050
18051 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
18052
18053         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
18054         T was built in C language context (for example, by
18055         output_func_start_profiler).
18056
18057 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
18058
18059         * decl.c (make_implicit_typename): New fn.
18060         (lookup_name_real): Use it.  Use current_class_type as the context.
18061
18062 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
18063
18064         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
18065
18066 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
18067
18068         * friend.c (do_friend): Warn about non-template friends in templates.
18069
18070         * call.c (build_op_delete_call): Fix handling of inherited delete.
18071
18072         * search.c (dfs_record_inheritance): Ignore template type parms.
18073
18074 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
18075
18076         * call.c (build_new_op): Fix copy error.
18077         (build_op_new_call): New fn.
18078         (build_op_delete_call): New fn.
18079         * cp-tree.h: Declare them.
18080         * init.c (build_new): Use them.  Support placement delete.
18081         (build_x_delete): Use build_op_delete_call.
18082         (build_delete): Likewise.
18083         * decl2.c (delete_sanity): Likewise.
18084         (coerce_delete_type): Don't complain about placement delete.
18085
18086 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
18087
18088         * call.c (build_new_function_call): Remove unused 'obj' parm.
18089         * cp-tree.h, typeck.c: Adjust.
18090
18091         * init.c (build_new): Make the cleanup last longer.
18092         (expand_vec_init): Call do_pending_stack_adjust.
18093
18094 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
18095
18096         * pt.c (do_type_instantiation): Fix typo.
18097         (mark_class_instantiated): If we support one_only but not weak
18098         symbols, don't mark this as known.
18099
18100         * init.c (build_new): Handle vec delete in EH cleanup.
18101
18102 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
18103
18104         * call.c (build_method_call): Call complete_type before checking
18105         for destructor.
18106
18107 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
18108
18109         * decl.c (add_block_current_level): Delete.
18110         * init.c (build_vec_delete_1): Delete build_block and
18111         add_block_current_level calls.
18112
18113 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
18114
18115         * init.c (build_new): Handle freeing allocated memory when the
18116         constructor throws.
18117
18118         * call.c (build_new_method_call): Fix flags arg.
18119
18120         * pt.c (do_type_instantiation): Don't try to instantiate
18121         member templates.
18122         (mark_decl_instantiated): If we support one_only but not
18123         weak symbols, mark this one_only.
18124         * decl2.c (import_export_vtable): Don't defer handling of vtables
18125         if MULTIPLE_SYMBOL_SPACES.
18126
18127 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
18128
18129         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
18130
18131 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
18132
18133         * except.c (do_pop_exception): Return a value.
18134
18135 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
18136
18137         * call.c (build_new_method_call): Handle getting a
18138         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
18139         if we got template parms.
18140         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
18141         not just the args.
18142         * decl2.c (build_expr_from_tree): Tweak last change.
18143         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
18144         (maybe_fold_nontype_arg): Split out from tsubst_copy.
18145         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
18146
18147 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
18148
18149         * pt.c (tsubst_copy): Handle explicit template arguments in
18150         function calls.
18151         * typeck.c (build_x_function_call): Likewise.
18152         * decl2.c (build_expr_from_tree): Lookup function name if it
18153         hasn't been done.
18154
18155         * pt.c (tsubst): Instantiate template functions properly when
18156         template parameter does not appear in function arguments and return
18157         type.
18158         (comp_template_args): Handle member templates required by tsubst.
18159
18160 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
18161
18162         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
18163         previous change.
18164
18165 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
18166
18167         * pt.c (coerce_template_parms): Tweak error message.
18168
18169         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
18170         return type defaults to `int', even if there are storage-class
18171         specifiers.
18172
18173 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
18174
18175         Complete nested exception support.
18176         * except.c (do_pop_exception): Split out...
18177         (push_eh_cleanup): From here.  Handle the EH region by hand.
18178         (expand_start_catch_block): Add a new level for the catch parm.
18179         Move the rethrow region outside the two cleanup regions.
18180         Protect the initializer for the catch parm with terminate.
18181         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
18182         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
18183         popping off the middle of the stack.
18184         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
18185         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
18186         (build_cplus_new): Only wrap CALL_EXPRs.
18187         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
18188         the constructor call.
18189
18190 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18191
18192         * Make-lang.in (c++.distdir): Make inc subdirectory.
18193
18194 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
18195
18196         * decl2.c (finish_file): Put back some code.
18197
18198 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
18199
18200         * decl2.c (finish_file): Remove redundant code.
18201         * method.c (emit_thunk): Don't let the backend defer generic thunks.
18202
18203 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
18204
18205         * except.c (call_eh_info): Split out...
18206         (push_eh_info): From here.
18207         (expand_builtin_throw): Use it.
18208         (expand_start_catch_block): Move region start back.
18209
18210 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
18211
18212         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
18213         (real_yylex): Record wide strings using target endianness, not host.
18214
18215 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
18216
18217         * repo.c (rindex): Add decl unconditionally.
18218         (get_base_filename, open_repo_file): Don't cast rindex.
18219         * xref.c (rindex): Add decl unconditionally.
18220         (index): Remove unused decl.
18221         (open_xref_file): Don't cast rindex.
18222
18223 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
18224
18225         * class.c (build_vbase_path): Propagate the result type properly.
18226
18227 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
18228
18229         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
18230         remaining use of saved_throw_type with a call to get_eh_type.
18231
18232 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
18233
18234         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
18235         (file_name_nondirectory): New function, doing the same as the macro.
18236         (set_typedecl_interface_info): Use it instead of the macro.
18237         (check_newline): Likewise.
18238         (handle_cp_pragma): Likewise.
18239
18240         * repo.c (get_base_filename): Cast result of rindex to char*.
18241         (open_repo_file): Likewise.
18242         * xref.c (open_xref_file): Likewise.
18243         * error.c (dump_char): Make its arg int, not char.
18244
18245         * except.c (push_eh_info): Pass the number of fields - 1 down, not
18246         the exact number of fields.
18247
18248 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
18249
18250         Support for nested exceptions.
18251         * tinfo2.cc (__is_pointer): New fn.
18252         * exception.cc (struct cp_eh_info): Define.
18253         (__cp_exception_info, __uncatch_exception): New fns.
18254         (__cp_push_exception, __cp_pop_exception): New fns.
18255         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
18256         Lose empty_fndecl.
18257         (init_exception_processing): Likewise.  __eh_pc is now external.
18258         (push_eh_info): New fn.
18259         (get_eh_{info,value,type,caught}): New fns.
18260         (push_eh_cleanup): Just call __cp_pop_exception.
18261         (expand_start_catch_block): Use push_eh_info.  Start the eh region
18262         sooner.
18263         (expand_end_eh_spec): Use push_eh_info.
18264         (expand_throw): Call __cp_push_exception to set up the exception info.
18265         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
18266         when we rethrow.
18267         (expand_builtin_throw): Don't refer to empty_fndecl.
18268
18269 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
18270
18271         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
18272
18273 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
18274
18275         * method.c (build_template_parm_names, build_decl_overload_real):
18276         Add static to definitions.
18277         * pt.c (add_to_template_args, note_template_header,
18278         processing_explicit_specialization, type_unification_real): Likewise.
18279         ({determine,check}_explicit_specialization): Use a single string for
18280         error messages.
18281
18282 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
18283
18284         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
18285         (expand_end_catch_block): Likewise.
18286         (expand_end_eh_spec): Likewise.
18287
18288 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
18289
18290         * decl.c (duplicate_decls): Handle template specializations
18291         correctly.
18292         * error.c (dump_function_name): Fix printing of specializations of
18293         member functions that are not member templates.
18294         * cp-tree.h (processing_specialization): Make global.
18295         * pt.c (processing_specialization): Likewise.
18296         * lex.c (cons_up_default_function): Save and restore
18297         processing_specialization to avoid confusion.
18298
18299 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
18300
18301         * decl.c (init_decl_processing): Give null_node unknown* type.
18302         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
18303         (common_type): Likewise.
18304         * error.c (args_as_string): Recognize null_node.
18305
18306 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18307
18308         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
18309         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
18310
18311         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
18312
18313         * Make-lang.in (g++): Include prefix.o.
18314
18315 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
18316
18317         * pt.c (determine_explicit_specialization): Initialize "dummy"
18318         to keep Purify quiet.
18319
18320 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
18321
18322         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
18323         (build_overload_int): Not here.
18324
18325 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
18326
18327         * class.c (build_type_pathname): Remove.
18328         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
18329
18330 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
18331
18332         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
18333         &&label GNU extension.
18334
18335 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
18336
18337         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
18338         so as to avoid incorrect manglings.
18339         * method.c (build_decl_overload_real): Don't mangle return types
18340         for constructors.
18341
18342 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
18343
18344         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
18345         scratch_tree_cons): Define as macros for now.
18346         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
18347         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
18348         typeck2.c: Use them and the expression_obstack variants.
18349
18350 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
18351
18352         * decl.c (store_return_init): Allow classes with explicit ctors to
18353         be used with the named return values extension.
18354
18355 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
18356
18357         * pt.c (instantiate_decl): Fix previous change.
18358
18359 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
18360
18361         * pt.c (tsubst): Fix thinko.
18362         (instantiate_decl): Really use the original template.
18363
18364         * call.c (build_new_method_call): Use simple constructor_name for
18365         error messages.
18366
18367 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
18368
18369         * method.c (build_underscore_int): Don't use ANSI specific
18370         features.
18371
18372 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
18373
18374         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
18375         for our key method; it might have been inlined by -O3.
18376
18377 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
18378
18379         * decl.c (make_typename_type): Do not try to call lookup_field for
18380         non-aggregate types.
18381
18382 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
18383
18384         * typeck.c (build_reinterpret_cast): Tweak.
18385
18386 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
18387
18388         * typeck.c (build_reinterpret_cast): Converting a void pointer
18389         to function pointer with a reinterpret_cast produces a warning
18390         if -pedantic is issued.
18391
18392 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
18393
18394         * typeck.c (c_expand_return): Don't warn about returning a
18395         reference-type variable as a reference.
18396
18397 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
18398
18399         * method.c (build_static_name): Fix typo.
18400
18401 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
18402
18403         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
18404         OLDDECL before we try to do DECL_USE_TEMPLATE.
18405
18406 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
18407
18408         * decl.c (duplicate_decls): Don't warn about template instances.
18409
18410         * typeck.c (mark_addressable): Lose ancient code that unsets
18411         DECL_EXTERNAL.
18412
18413         * pt.c (do_decl_instantiation): Lose support for instantiating
18414         non-templates.
18415
18416         * call.c (build_new_function_call): Fix handling of null explicit
18417         template args.
18418         (build_new_method_call): Likewise.
18419
18420 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
18421
18422         * method.c (build_underscore_int): Fix typo.
18423
18424 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
18425
18426         * tree.c (print_lang_statistics): #if 0 call to
18427         print_inline_obstack_statistics until its definition is checked in.
18428
18429 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
18430
18431         * decl2.c (finish_file): Move dump_tree_statistics to end.
18432
18433         * pt.c (instantiate_decl): Look for the original template.
18434         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
18435         of member templates.
18436
18437 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
18438
18439         * Makefile.in (g++FAQ.*): New rules.
18440         (CONFLICTS): Update.
18441         * g++FAQ.texi: Moved from libg++.
18442
18443         * parse.y (PFUNCNAME): Only specify the type once.
18444
18445 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
18446
18447         * lex.c (real_yylex): Clean up the code to fully behave the way
18448         the c-lex.c parser does for complex and real numbers.
18449
18450 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
18451
18452         * method.c (build_decl_overload_real): Reformat.
18453
18454 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
18455
18456         * method.c (synthesize_method): If at_eof, determine our linkage.
18457
18458 1997-09-29  Paul Eggert  <eggert@twinsun.com>
18459
18460         * lex.c (real_yylex): Treat `$' just like `_', except issue a
18461         diagnostic if !dollars_in_ident or if pedantic.
18462
18463         * lang-specs.h (@c++): -ansi no longer implies -$.
18464
18465         * decl2.c (lang_decode_option):
18466         -traditional and -ansi now do not mess with
18467         dollars_in_ident.
18468
18469 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
18470
18471         * Makefile.in (parse.o, decl.o): Also depend on
18472         $(srcdir)/../except.h $(srcdir)/../output.h.
18473         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
18474         $(srcdir)/../except.h $(srcdir)/../output.h.
18475         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
18476         ../insn-codes.h.
18477
18478         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
18479
18480         * expr.c (cplus_expand_expr): Make it static.
18481
18482         * decl2.c, init.c, typeck.c: Include "expr.h".
18483         (expand_expr): Use proper values when calling the function.
18484
18485 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
18486
18487         * lang-options.h: New -Wold-style-cast flag.
18488         * cp-tree.h (warn_old_style_cast): New variable.
18489         * decl2.c (warn_old_style_cast): Likewise.
18490         (lang_decode_option): Support -Wold-style-cast.
18491         (reparse_absdcl_as_casts): Produce old-style-cast warning.
18492
18493 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
18494
18495         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
18496         TREE_USED, reset value based on already_used.
18497
18498         * init.c (expand_member_init): Revert change.
18499
18500 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
18501
18502         * cp-tree.h, decl.c, decl2.c, pt.c:
18503         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
18504
18505         * decl2.c (lang_decode_option): Add missing ;.
18506
18507 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
18508
18509         * friend.c (do_friend): Disable injection for all template-derived
18510         decls.
18511         * decl2.c (lang_decode_option): Handle -fguiding-decls.
18512         * parse.y (notype_template_declarator): New nonterminal.
18513         (direct_notype_declarator): Use it.
18514         (complex_direct_notype_declarator): Likewise.
18515         (object_template_id): Accept any kind of identifier after TEMPLATE.
18516         (notype_qualified_id): Don't add template declarators here.
18517
18518 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
18519
18520         * call.c (add_template_candidate): Add explicit_targs parameter.
18521         (build_scoped_method_call): Use it.
18522         (build_overload_call_real): Likewise.
18523         (build_user_type_conversion_1): Likewise.
18524         (build_new_function_call): Likewise.
18525         (build_object_call): Likewise.
18526         (build_new_op): Likewise.
18527         (build_new_method_call): Likewise.
18528         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
18529         (build_new_method_call): Likewise.
18530
18531         * class.c (finish_struct_methods): Add specialization pass to
18532         determine which methods were specializing which other methods.
18533         (instantiate_type): Handle TEMPLATE_ID_EXPR.
18534
18535         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
18536
18537         * cp-tree.h (name_mangling_version): New variable.
18538         (flag_guiding_decls): Likewise.
18539         (build_template_decl_overload): New function.
18540         (begin_specialization): Likewise.
18541         (reset_specialization): Likewise.
18542         (end_specialization): Likewise.
18543         (determine_explicit_specialization): Likewise.
18544         (check_explicit_specialization): Likewise.
18545         (lookup_template_function): Likewise.
18546         (fn_type_unification): Add explicit_targs parameter.
18547         (type_unification): Likewise.
18548
18549         * decl.c (duplicate_decls): Add smarts for explicit
18550         specializations.
18551         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
18552         specializations.
18553         (grokfndecl): Call check_explicit_specialization.
18554
18555         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
18556         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
18557         (check_classfn): Handle specializations.
18558
18559         * error.c (dump_function_name): Print specialization arguments.
18560
18561         * friend.c (do_friend): Don't call pushdecl for template
18562         instantiations.
18563
18564         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
18565
18566         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
18567         and -fno-guiding-decls.
18568
18569         * lex.c (identifier_type): Return PFUNCNAME for template function
18570         names.
18571
18572         * method.c (build_decl_overload_real): New function.
18573         (build_template_parm_names): New function.
18574         (build_overload_identifier): Use it.
18575         (build_underscore_int): New function.
18576         (build_overload_int): Use it.  Add levels for template
18577         parameters.
18578         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
18579         (build_overload_nested_names): Handle template type parameters.
18580         (build_template_decl_overload): New function.
18581
18582         * parse.y (YYSTYPE): New ntype member.
18583         (nested_name_specifier): Use it.
18584         (nested_name_specifier_1): Likewise.
18585         (PFUNCNAME): New token.
18586         (template_id, object_template_id): New non-terminals.
18587         (template_parm_list): Note specializations.
18588         (template_def): Likewise.
18589         (structsp): Likewise.
18590         (fn.def2): Handle member template specializations.
18591         (component_decl_1): Likewise.
18592         (direct_notype_declarator): Handle template-ids.
18593         (component_decl_1): Likewise.
18594         (direct_notype_declarator): Handle template-ids.
18595         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
18596
18597         * pt.c (processing_specializations): New variable.
18598         (template_header_count): Likewise.
18599         (type_unification_real): New function.
18600         (processing_explicit_specialization): Likewise.
18601         (note_template_header): Likewise.
18602         (is_member_template): Handle specializations.
18603         (end_template_decl): Call reset_specialization.
18604         (push_template_decl): Handle member template specializations.
18605         (tsubst): Likewise.
18606         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
18607         (instantiate_template): Handle specializations.
18608         (instantiate_decl): Likewise.
18609         (fn_type_unification): Handle explicit_targs.
18610         (type_unification): Likewise.  Allow incomplete unification
18611         without an error message, if allow_incomplete.
18612         (get_bindings): Use new calling sequence for fn_type_unification.
18613
18614         * spew.c (yylex): Handle PFUNCNAME.
18615
18616         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
18617         (really_overloaded_fn): Likewise.
18618         (get_first_fn): Handle function templates.
18619
18620         * typeck.c (build_x_function_call): Use really_overloaded_fn.
18621         Handle TEMPLATE_ID_EXPR.
18622         (build_x_unary_op): Likewise.
18623         (build_unary_op): Likewise.
18624         (mark_addressable): Templates whose address is taken are marked
18625         as used.
18626
18627 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
18628
18629         * decl.c (init_decl_processing): Declare __builtin_constant_p as
18630         accepting any kind of type, not only int.
18631
18632 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
18633
18634         * search.c (get_matching_virtual): Notice virtual bases when sorrying
18635         about covariant returns.
18636
18637         * parse.y (member_init): Also imply typename here.  Remove ancient
18638         extension for initializing base members.
18639
18640 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
18641
18642         Handle multi-level typenames and implicit typename in base list.
18643         * parse.y (typename_sub{,[0-2]}): New rules.
18644         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
18645         (nonnested_type): New rule.
18646         (complete_type_name): Use it.
18647         (base_class.1): Use typename_sub and nonnested_type.
18648         (nested_name_specifier): Don't elide std:: here.
18649         * decl.c (make_typename_type): Handle getting a type for NAME.
18650         (lookup_name_real): Turn std:: into :: here.
18651
18652         Rvalue conversions were removed in London.
18653         * call.c (is_subseq): Don't consider lvalue transformations.
18654         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
18655         (joust): Re-enable ?: kludge.
18656
18657 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
18658
18659         * decl.c (start_function): Up warning of no return type to be a
18660         pedwarn.
18661
18662 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
18663
18664         * init.c (expand_member_init): Don't set TREE_USED.
18665         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
18666         set,don't clear TREE_USED wholesale.
18667
18668 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
18669
18670         * call.c (build_over_call): Do require_complete_type before
18671         build_cplus_new.
18672
18673 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
18674
18675         * search.c (lookup_field): Call complete_type in all cases.
18676
18677         * decl.c (finish_function): Just warn about flowing off the end.
18678
18679 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
18680
18681         * decl.c (grokparms): Don't bash a permanent list node if we're
18682         in a function.
18683
18684 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
18685
18686         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
18687
18688 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
18689
18690         * call.c (build_new_op): Give better error for syntactically
18691         correct, but semantically invalid, use of undeclared template.
18692
18693         * call.c (compare_qual): Handle pmfs.
18694
18695         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
18696         after the exception spec.
18697
18698 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
18699
18700         * call.c (null_ptr_cst_p): Integer type, not integral type.
18701
18702         * call.c (joust): Disable warnings until they can be moved to the
18703         right place.
18704
18705 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
18706
18707         * Makefile.in, config-lang.in:  Convert to autoconf.
18708
18709 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
18710
18711         * decl.c (lookup_name_real): Add implicit 'typename' to types from
18712         base classes.
18713
18714         * pt.c (most_specialized_class): Fix typo.
18715         (tsubst): Move constant folding to TREE_VEC case.
18716
18717 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
18718
18719         * pt.c (do_poplevel): Don't warn about unused local variables
18720         while processing_template_decl since we don't always know whether
18721         or not they will need constructing/destructing.
18722
18723         * pt.c (uses_template_parms): Check the values of an enumeration
18724         type to make sure they don't depend on template parms.
18725
18726         * decl.c (make_typename_type): Don't lookup the field if the
18727         context uses template parms, even if we're not
18728         processing_template_decl at the moment.
18729
18730         * pt.c (coerce_template_parms): Avoid looking at the
18731         TYPE_LANG_DECL portion of a typename type, since there won't be
18732         one.
18733         (tsubst): Do constant folding as necessary to make sure that
18734         arguments passed to lookup_template_class really are constants.
18735
18736 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
18737
18738         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
18739         * decl2.c (finish_file): Only register exception tables if we
18740         need to.
18741
18742         * decl.c (init_decl_processing): Add __builtin_[fs]p.
18743
18744 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
18745
18746         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
18747
18748 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
18749
18750         * error.c (dump_decl): Avoid crashing when presented with a
18751         uninitialized constant, as can occur with a template parameter.
18752         (dump_expr): Make sure that there are enough levels of
18753         current_template_parms before we start diving through them.
18754
18755 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
18756
18757         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
18758         c-typeck.c.
18759
18760 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
18761
18762         * except.c (expand_throw): Call build_delete for all
18763         exception types, not just objects with destructors.
18764
18765 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
18766
18767         * decl.c (current_local_enum): Remove static.
18768         * pt.c (tsubst_enum): Save and restore value of current_local_enum
18769         in case template is expanded in enum decl.
18770         (instantiate_class_template): Use new tsubst_enum signature.
18771         (tsubst_expr): Likewise.
18772
18773 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
18774
18775         * pt.c (begin_member_template_processing): Take a function as
18776         argument, not a set of template arguments.  Use the template
18777         parameters, rather than the arguments.  Handle non-type parameters
18778         correctly.  Push a binding level for the parameters so that multiple
18779         member templates using the same parameter names can be declared.
18780         (end_member_template_processing): Pop the binding level.
18781         (push_template_decl): Mark member templates as static when
18782         appropriate.
18783
18784         * lex.c (do_pending_inlines): Pass the function, not its template
18785         arguments, to begin_member_template_processing.
18786         (process_next_inline): Likewise.
18787         (do_pending_defargs): Likewise.
18788
18789         * error.c (dump_expr): Obtain the correct declaration for a
18790         TEMPLATE_CONST_PARM.
18791
18792         * call.c (add_template_conv_candidate): New function.
18793         (build_object_call): Handle member templates, as done in the other
18794         build_ functions.
18795
18796 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
18797
18798         * decl.c (replace_defag): Undo previous change.
18799         * lex.c (do_pending_defargs): Deal with member templates.
18800
18801         * pt.c (is_member_template): Avoid crashing when passed a
18802         non-function argument.
18803
18804 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
18805
18806         * class.c (grow_method): Remove check for redeclaration.
18807
18808 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
18809
18810         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
18811         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
18812         (PRIMARY_TEMPLATE_P): Use it.
18813         * call.c (build_overload_call_real): Use it.
18814         * class.c (instantiate_type): Likewise.
18815         * decl.c (decls_match): Likewise.
18816         * method.c (build_overload_identifier): Likewise.
18817         * pt.c (push_template_decl): Likewise.
18818         (classtype_mangled_name): Likewise.
18819         (lookup_template_class): Likewise.
18820
18821         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
18822         DECL_NTPARMS to conform to usage elsewhere.
18823         * call.c (add_template_candidate): Likewise.
18824         * class.c (instantiate_type): Likewise.
18825         * pt.c (instantiate_template): Likewise.
18826         (get_bindings): Likewise.
18827
18828         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
18829         is_member_template.
18830
18831         * pt.c (unify): Undo changes to allow multiple levels of template
18832         parameters.
18833         (type_unification): Likewise.
18834         (fn_type_unification): Likewise.
18835         (get_class_bindings): Likewise.
18836         * cp-tree.h (Likewise).
18837
18838         * decl.c (replace_defarg): Check that the type of the default
18839         parameter does not invlove a template type before complaining
18840         about the initialization.
18841
18842         * error.c (dump_expr): Deal with template constant parameters in
18843         member templates correctly.
18844
18845         * pt.c (is_member_template): Deal with class specializations
18846         correctly.
18847         (tsubst): Handle "partial instantiation" of member templates
18848         correctly.
18849
18850 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
18851
18852         * pt.c (type_unification): Change calling sequence to allow for
18853         multiple levels of template parameters.
18854         (tsubst_expr): Likewise.
18855         (tsubst): Likewise.
18856         (tsubst_copy): Likewise.
18857         (instantiate_template): Likewise.
18858         (unify): Likewise.
18859         * call.c (build_overload_call_real): Use it.
18860         (add_builtin_candidate): Use it.
18861         (build_new_method_call): Use it.
18862         * class.c (instantiate_type): Use it.
18863         * decl.c (grokdeclarator): Use it.
18864         * decl2.c (finish_file): Use it.
18865         * method.c (build_overload_identifier): Use it.
18866
18867         * call.c (add_template_candidate):  Add additional parameter for
18868         the function return type.  Call fn_type_unification istead of
18869         type_unification.
18870         (build_user_type_conversion_1): Handle member templates.
18871         (build_new_function_call): Likewise.
18872         (build_new_op): Likewise.
18873         (build_new_method_call): Likewise.
18874
18875         * class.c (grow_method): Don't give an error message indicating
18876         that two member templates with the same name are ambiguous.
18877         (finish_struct): Treat member template functions just like member
18878         functions.
18879
18880         * cp-tree.h (check_member_template): Add declaration.
18881         (begin_member_template_processing): Likewise.
18882         (end_member_template_processing): Likewise.
18883         (fn_type_unification): Likewise.
18884         (is_member_template): Likewise.
18885         (tsubst): Change prototype.
18886         (tsubst_expr): Likewise.
18887         (tsubst_copy): Likewise.
18888         (instantiate_template): Likewise.
18889         (get_bindings): Likewise.
18890
18891         * decl.c (decls_match): Handle multiple levels of template
18892         parameters.
18893         (pushdecl): Handle template type params just like other type
18894         declarations.
18895         (push_class_level_binding): Return immediately if the
18896         class_binding_level is NULL.
18897         (grokfndecl): If check_classfn() returns a member_template, use
18898         the result of the template, not the template itself.
18899
18900         * decl2.c (check_member_template): New function.  Check to see
18901         that the entity declared to be a member template can be one.
18902         (check_classfn): Allow redeclaration of member template functions
18903         with different types; the new functions can be specializations or
18904         explicit instantiations.
18905
18906         * error.c (dump_decl): Handle multiple levels of template
18907         parameters.
18908         (dump_function_decl): Update to handle function templates.
18909
18910         * lex.c (do_pending_inlines): Set up template parameter context
18911         for member templates.
18912         (process_next_inline): Likewise.
18913
18914         * method.c (build_overload_identifier): Adjust for multiple levels
18915         of template parameters.
18916
18917         * parse.y (fn.def2): Add member templates.
18918         (component_decl_1): Likewise.
18919
18920         * pt.c (begin_member_template_processing): New function.
18921         (end_member_template_processing): Likewise.
18922         (is_member_template): Likewise.
18923         (fn_type_unification): Likewise.
18924         (current_template_parms): Return a vector of all the template
18925         parms, not just the innermost level of parms.
18926         (push_template_decl): Deal with the possibility of member
18927         templates.
18928         (lookup_template_class): Likewise.
18929         (uses_template_parms): Likewise.
18930         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
18931         TEMPLATE_CONST_PARM to deal with multiple levels of template
18932         arguments.   Add processing of TEMPLATE_DECL to produce new
18933         TEMPLATE_DECLs from old ones.
18934         (do_decl_instantiation): Handle member templates.
18935
18936         * search.c (lookup_fnfields_1): Handle member template conversion
18937         operators.
18938
18939         * tree.c (cp_tree_equal): Check the levels, as well as the
18940         indices, of TEMPLATE_CONST_PARMs.
18941
18942         * typeck.c (comptypes): Check the levels, as well as the indices,
18943         fo TEMPLATE_TYPE_PARMs.
18944         (build_x_function_call): Treat member templates like member
18945         functions.
18946
18947 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
18948
18949         * typeck.c (c_expand_return): Always convert_for_initialization
18950         before checking for returning a pointer to local.
18951
18952         * pt.c (type_unification): If strict and the function parm doesn't
18953         use template parms, just compare types.
18954
18955 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
18956
18957         * method.c (build_overloaded_value): Replace direct call
18958         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
18959
18960 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
18961
18962         * typeck.c (convert_arguments): Don't arbitrarily choose the first
18963         of a set of overloaded functions.
18964
18965 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
18966
18967         * lex.c (real_yylex): Don't elide __FUNCTION__.
18968
18969         * method.c (build_overload_value): Add in_template parm.
18970         (build_overload_int): Likewise.
18971         (build_overload_identifier): Pass it.
18972
18973         * decl.c (duplicate_decls): Don't bash a previous template
18974         definition with a redeclaration.
18975
18976         * pt.c (unify): float doesn't match double.
18977
18978         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
18979         TYPE_DECL.  Handle getting non-template types.
18980         * parse.y (explicit_instantiation): Use typespec instead of
18981         aggr template_type.
18982
18983 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
18984
18985         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
18986
18987 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
18988
18989         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
18990         (compare_ics): Likewise.
18991
18992 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
18993
18994         * call.c (joust): Warn about choosing one conversion op over
18995         another because of 'this' argument when the other return type is
18996         better.
18997         (source_type): New fn.
18998
18999         * call.c (build_new_op): Strip leading REF_BIND from first operand
19000         to builtin operator.
19001
19002         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
19003         use its RTL.
19004
19005 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
19006
19007         * call.c (null_ptr_cst_p): Remove support for (void*)0.
19008
19009 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
19010
19011         * typeck.c (expand_target_expr): Make definition match declaration.
19012
19013         * class.c (get_basefndecls): Make definition match declaration.
19014
19015 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
19016
19017         * input.c (sub_getch): Eventually give up and release the input file.
19018
19019         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
19020         right place.
19021
19022         * call.c (joust): Tweak message.
19023
19024 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
19025
19026         * error.c (type_as_string): Put const/volatile on template type
19027         parameters where appropriate.
19028
19029 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
19030
19031         * call.c (strictly_better): Make arguments unsigned ints.
19032
19033 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
19034
19035         * lex.c (real_yylex): Refer to __complex instead of complex.
19036
19037 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
19038
19039         * lex.c (real_yylex): Don't use getc directly.
19040
19041 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
19042
19043         * call.c (is_subseq): Don't try to be clever.
19044
19045 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
19046
19047         * parse.y, pt.c: Include "except.h".
19048         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
19049         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
19050         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
19051         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
19052         prototyping.
19053
19054 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
19055
19056         * decl2.c (mark_vtable_entries): Instead of replacing pure
19057         virtuals with a reference to __pure_virtual, copy the decl and
19058         change the RTL.
19059
19060 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
19061
19062         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
19063
19064         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
19065
19066         * pt.c (instantiate_class_template): Call repo_template_used
19067         before finish_prevtable_vardecl.
19068
19069         * call.c (is_subseq): New fn.
19070         (compare_ics): Use it.
19071
19072         * repo.c (finish_repo): Don't crash on no args.
19073
19074         * parse.y (named_complex_class_head_sans_basetype): Handle
19075         explicit global scope.
19076         * decl2.c (handle_class_head): New fn.
19077
19078         * pt.c (unify): Add CONST_DECL case.
19079
19080 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19081
19082         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
19083
19084         * cp-tree.h (report_type_mismatch): Add prototype.
19085         * call.c (build_overload_call_real): Remove erroneous fourth
19086         argument to report_type_mismatch.
19087         (build_user_type_conversion_1): Remove erroneous second arg to
19088         tourney.
19089         (build_new_function_call): Likewise.
19090         (build_object_call): Likewise.
19091         (build_new_op): Likewise.
19092         (build_new_method_call): Likewise.
19093
19094 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
19095
19096         * error.c (dump_decl): Don't bother processing a function with no
19097         DECL_LANG_SPECIFIC.
19098
19099         * method.c (emit_thunk): Call init_function_start in the macro case.
19100
19101 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
19102
19103         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
19104         defined and used to set flag_vtable_thunks.
19105
19106 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
19107
19108         * parse.y: Don't clear the inlines from their obstack until they've
19109         all been processed.
19110
19111         * decl.c (duplicate_decls): Don't complain about exception
19112         specification mismatch if flag_exceptions is off.
19113
19114 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
19115
19116         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
19117
19118 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
19119
19120         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
19121         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
19122         Include <stdio.h> before include files that formerly used STDIO_PROTO.
19123
19124         * decl.c, g++spec.c, lex.c, method.c, repo.c:
19125         Include "config.h" first, as per autoconf manual.
19126
19127 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
19128
19129         * decl.c (duplicate_decls): Tweak wording.
19130         * lex.c (do_pending_defargs): Don't die if we see a default arg
19131         that isn't a DEFAULT_ARG.
19132         * error.c (dump_expr): Handle DEFAULT_ARG.
19133
19134         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
19135         * lang-options.h: Add -fhandle-exceptions.
19136
19137         * class.c (build_vtable): Vtables are artificial.
19138         (prepare_fresh_vtable): Likewise.
19139
19140 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
19141
19142         * cvt.c (ocp_convert): After converting to the target type, set
19143         LOOKUP_NO_CONVERSION.
19144
19145         * call.c (joust): Warn about potentially confusing promotion rules
19146         with -Wsign-promo.
19147         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
19148
19149 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
19150
19151         * exception.cc: Declare __terminate_func with noreturn attribute.
19152
19153 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
19154
19155         * parse.y: Break out eat_saved_input, handle errors.
19156         (function_try_block): Use compstmt instead of compstmt_or_error.
19157
19158 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
19159
19160         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
19161
19162 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
19163
19164         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
19165         existence of cc1plus check whether $(LANGUAGES) contains C++.
19166
19167 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
19168
19169         * method.c (do_build_copy_constructor): When copying an anonymous
19170         union member loop around to handle nested anonymous unions.  Use
19171         the offset of the member relative to the outer structure, not the
19172         union.
19173
19174 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
19175
19176         * call.c (resolve_args): New fn.
19177         (build_new_function_call): Use it.
19178         (build_object_call): Likewise.
19179         (build_new_method_call): Likewise.
19180
19181 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
19182
19183         * call.c (build_over_call): tsubst all default parms from templates.
19184
19185 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
19186
19187         * decl.c (struct cp_function): Add static_labelno.
19188         (push_cp_function_context): Save it.
19189         (pop_cp_function_context): Restore it.
19190
19191 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
19192
19193         * typeck.c (build_component_ref_1): Convert from reference.
19194
19195 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19196
19197         * parse.y (current_declspecs, prefix_attributes): Initialize to
19198         NULL_TREE.
19199
19200         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
19201         before we try to force it to be a TREE_LIST.
19202         (decl): Make sure $1.t is non-nil.
19203
19204 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
19205
19206         * pt.c (uses_template_parms): Handle template first-parse codes.
19207
19208         * decl.c (cp_finish_decl): Only warn about user-defined statics.
19209
19210 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
19211
19212         * pt.c (unify): Handle BOOLEAN_TYPE.
19213
19214         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
19215         * pt.c (tsubst): Don't set it.
19216         * call.c (build_over_call): Use uses_template_parms.
19217
19218 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
19219
19220         * method.c (build_overload_nested_name): Use static_labelno
19221         instead of var_labelno.
19222         (build_qualified_name): New fn.
19223         (build_overload_name): Split out from here.
19224         (build_static_name): Use build_qualified_name.
19225         * decl.c (cp_finish_decl): Statics in extern inline functions
19226         have comdat linkage.
19227         (start_function): Initialize static_labelno.
19228
19229 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
19230
19231         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
19232         before "all member functions in class [] are private".
19233
19234 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
19235
19236         * lex.c (do_scoped_id): convert_from_reference.
19237         * init.c (build_offset_ref): Likewise.
19238
19239 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
19240
19241         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
19242
19243 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
19244
19245         * typeck.c (get_member_function_from_ptrfunc): Promote index
19246         before saving it.
19247
19248 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
19249
19250         * tree.c (layout_basetypes): Move non-virtual destructor warning.
19251         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
19252
19253 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
19254
19255         * decl.c (grokdeclarator): Call add_defarg_fn for the function
19256         type, too.
19257         * lex.c (add_defarg_fn): Adjust.
19258         (do_pending_defargs): Adjust.  Don't skip the first parm.
19259
19260 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
19261
19262         * decl.c (build_enumerator): Global enumerators are also readonly.
19263
19264         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
19265         (build_dynamic_cast): Call it and convert_from_reference.
19266
19267         * lex.c (add_defarg_fn): New fn.
19268         (snarf_defarg): Don't add to defarg_types.
19269         (do_pending_defargs): Lose defarg_types.  All fns we process now
19270         have defargs.
19271         * decl.c (grokfndecl): Call add_defarg_fn.
19272
19273         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
19274         * cp-tree.def: Add DEFAULT_ARG.
19275         * spew.c (yylex): Call snarf_defarg as appropriate.
19276         * parse.y: New tokens DEFARG and DEFARG_MARKER.
19277         (defarg_again, pending_defargs, defarg, defarg1): New rules.
19278         (structsp): Use pending_defargs.
19279         (parms, full_parm): Use defarg.
19280         * lex.c (init_lex): Initialize inline_text_firstobj.
19281         (do_pending_inlines): Never pass the obstack to feed_input.
19282         (process_next_inline): Call end_input instead of restore_pending_input.
19283         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
19284         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
19285         * input.c (end_input): New fn.
19286         (sub_getch): At the end of some fed input, just keep returning EOF
19287         until someone calls end_input.
19288         Remove 'obstack' field from struct input_source.
19289         * decl.c (grokparms): Handle DEFAULT_ARG.
19290         (replace_defarg): New fn.
19291         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
19292
19293 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
19294
19295         * call.c (implicit_conversion): If nothing else works, try binding
19296         an rvalue to a reference.
19297
19298 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
19299
19300         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
19301         ifndef for Cygwin32 to include SIGSEGV.
19302
19303 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
19304
19305         * class.c (finish_struct_1): Only complain about pointers without
19306         copy stuff if there are any constructors.
19307
19308         * rtti.c (build_dynamic_cast): Call complete_type on the types.
19309
19310         * decl.c (grokfndecl): If the function we chose doesn't actually
19311         match, die.
19312
19313         * decl2.c (grokclassfn): Don't specify 'const int' for the
19314         artificial destructor parm.
19315
19316         * pt.c (type_unification): If we are called recursively, nothing
19317         decays.
19318
19319 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
19320
19321         * decl.c (init_decl_processing): Stop trying to catch signals
19322         other than SIGABRT since the Cygwin32 library doesn't support
19323         them correctly yet.  This fixes a situation in which g++ causes
19324         a hang on SIGSEGVs and other such signals in our Win32-hosted
19325         tools.
19326
19327 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
19328
19329         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
19330
19331 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
19332
19333         * typeck2.c (store_init_value): Always return the value if our
19334         type needs constructing.
19335
19336         * method.c (hack_identifier): Convert class statics from
19337         reference, too.
19338
19339 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
19340
19341         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
19342
19343 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
19344
19345         * typeck.c (c_expand_return): Make sure we clean up temporaries at
19346         the end of return x;
19347
19348 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19349
19350         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
19351
19352 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
19353
19354         * except.c (expand_builtin_throw): Add support
19355         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
19356
19357 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
19358
19359         * repo.c (extract_string): Null-terminate.
19360
19361         * cp-tree.h (TI_SPEC_INFO): New macro.
19362         (CLASSTYPE_TI_SPEC_INFO): New macro.
19363         * pt.c (push_template_decl): Correctly determine # of template parms
19364         for partial specs.
19365
19366         * call.c (compare_ics): Really fix 'this' conversions.
19367
19368         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
19369         non-template fn.
19370
19371         * pt.c (push_template_decl): Complain about mismatch in # of
19372         template parms between a class template and a member template.
19373
19374 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
19375
19376         * method.c (synthesize_method): You can't call
19377         function_cannot_inline_p after finish_function.
19378         * decl.c (finish_function): Turn on flag_inline_functions and turn
19379         off DECL_INLINE before handing a synthesized method to the
19380         backend.
19381
19382 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
19383
19384         * method.c (synthesize_method): Remove July 30 change to never set
19385         DECL_INLINE if at_eof.
19386
19387 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
19388
19389         * xref.c (GNU_xref_member): Ensure that the node has a
19390         decl_lang_specific part before checking DECL_FRIEND_P.
19391
19392 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
19393
19394         * pt.c (instantiate_class_template): Diagnose non-class types used
19395         as bases.
19396
19397 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
19398
19399         * typeck.c (build_conditional_expr): Use convert_for_initialization
19400         instead of convert_and_check.
19401
19402 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19403
19404         * parse.y (typespec): Don't pedwarn for typeof.
19405
19406 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
19407
19408         * repo.c (finish_repo): Only check changes if we would write a
19409         repo file.
19410
19411         * call.c (compare_ics): Fix handling of 'this' conversions.
19412
19413         * pt.c (do_decl_instantiation): Support static data too.  Rename
19414         from do_function_instantiation.
19415         * cp-tree.h: Adjust.
19416         * parse.y: Adjust.
19417
19418         * repo.c (extract_string): New fn.
19419         (get_base_filename): Use it.
19420         (init_repo): Compare old args with current args.
19421
19422 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
19423
19424         * Makefile.in, Make-lang.in: Protect C-ls with a comment
19425         character, idea from Paul Eggert <eggert@twinsun.com>.
19426
19427 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
19428
19429         * typeck.c (c_expand_return): Be more persistent in looking for
19430         returned temps.
19431
19432         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
19433         pointer to reference.
19434
19435         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
19436
19437 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
19438
19439         * init.c (build_member_call, build_offset_ref):
19440         Use do_scoped_id instead of do_identifier.
19441
19442         * cvt.c (convert): Remove bogosity.
19443
19444 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19445
19446         * cvt.c (build_up_reference): Do checks of ARGTYPE and
19447         TARGET_TYPE before trying to use get_binfo.
19448
19449 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
19450
19451         * cvt.c (build_up_reference): Call get_binfo to get access control.
19452
19453         * decl2.c (import_export_decl): If we don't support weaks, leave
19454         statics undefined.
19455
19456 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
19457
19458         * except.c (expand_builtin_throw): Add support for machines that
19459         cannot access globals after throw's epilogue when
19460         -fno-sjlj-exceptions is used.
19461
19462 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
19463
19464         * parse.y: 'std::' becomes '::'.
19465         * lex.c (real_yylex): Remove 'namespace' warning.
19466         * init.c (build_member_call): Ignore 'std::'.
19467         (build_offset_ref): Likewise.
19468         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
19469         (do_toplevel_using_decl): Ignore 'using std::whatever'.
19470         * decl.c (push_namespace): Just sorry.
19471         (pop_namespace): Nop.
19472         (init_decl_processing): Declare std namespace.
19473
19474 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
19475
19476         * search.c (push_class_decls): A name which ambiguously refers to
19477         several instantiations of the same template just refers to the
19478         template.
19479
19480 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
19481
19482         * decl.c (build_enumerator): Fix problem with unsigned long
19483         enumerated values being smashed to ints, causing overflow
19484         when computing next enumerated value (for enum values around
19485         MAX_VAL).
19486
19487 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
19488
19489         * typeck.c (build_component_ref): Only call mark_used on a decl.
19490
19491 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19492
19493         * typeck.c (build_c_cast): Make the check for a ptr to function
19494         more specific before possible default_conversion call.
19495
19496 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
19497
19498         * except.c (expand_exception_blocks): Simplify and fix and make
19499         sure we don't end a region in a sequence, as expand_end_bindings
19500         doesn't like it.
19501
19502 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
19503
19504         * except.c (init_exception_processing): Mark terminate as not
19505         returning so that the optimizer can optimize better.
19506
19507 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
19508
19509         * cvt.c (convert): Don't do any extra work, if we can avoid it
19510         easily.
19511
19512 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
19513
19514         * *.[chy]: Change cp_convert to ocp_convert, change convert to
19515         cp_convert.  convert is now reserved for the backend, and doesn't
19516         have the semantics a frontend person should ever want.
19517
19518 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
19519
19520         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
19521         Lose -traditional support.
19522
19523 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
19524
19525         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
19526
19527         * parse.y (self_reference): Do it for templates, too.
19528         * class.c (pushclass): Don't overload_template_name; the alias
19529         generated by build_self_reference serves the same purpose.
19530
19531         * tree.c (list_hash): Make static, take more args.
19532         (list_hash_lookup): Likewise.
19533         (list_hash_add): Make static.
19534         (list_hash_canon): Lose.
19535         (hash_tree_cons): Only build a new node if one isn't already in the
19536         hashtable.
19537         (hash_tree_chain): Use hash_tree_cons.
19538         * cp-tree.h: Adjust.
19539         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
19540         of calling lookup_name.
19541
19542 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
19543
19544         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
19545         doesn't refer to the CONST_DECLs.
19546
19547 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
19548
19549         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
19550         is bigger.
19551         (expand_class_desc): Convert the last argument to a sizetype.
19552
19553 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19554
19555         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
19556         __real__): Add reswords.
19557         * hash.h: Regenerate.
19558         * lex.h (rid): Add RID_COMPLEX.
19559         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
19560         * lex.c (init_lex): Add building of RID_COMPLEX.
19561         (real_yylex): General cleanup in line with what c-lex.c also has,
19562         sans the cruft for traditional; add handling of SPEC_IMAG, complex
19563         types, and imaginary numeric constants.
19564         * parse.y (REALPART, IMAGPART): Add tokens.
19565         (unary_expr): Add REALPART and IMAGPART rules.
19566         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
19567         * decl.c (complex_{integer,float,double,long}_type_node): Define
19568         types.
19569         (init_decl_processing): Set up the types.
19570         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
19571         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
19572         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
19573         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
19574         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
19575         COMPLEX_TYPE case.
19576         * method.c (build_overload_name): Add handling of the different
19577         COMPLEX_TYPEs, prefixing them with `J'.
19578         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
19579         as a template parm.
19580         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
19581         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
19582         (mapcar): Handle COMPLEX_CST.
19583         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
19584         (common_type): Add code for complex types.
19585         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
19586         (convert_for_assignment): Likewise.
19587         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
19588
19589 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
19590
19591         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
19592         tsubst_expr, as it might try to do overload resolution.
19593
19594 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
19595
19596         * pt.c (instantiate_class_template): Oops.
19597
19598 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
19599
19600         * cp-tree.def: Add TAG_DEFN.
19601         * pt.c (tsubst_enum): New fn.
19602         (instantiate_class_template): Use it.
19603         (tsubst_expr): Support TAG_DEFN.
19604         (tsubst): Support local enums.
19605         (tsubst_copy): Likewise.
19606         * decl.c (finish_enum): Likewise.
19607         (start_enum): If this is a local enum, switch to permanent_obstack.
19608
19609 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
19610
19611         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
19612         (finish_function): Put the base init code for constructors just
19613         after the parm cleanup insns.
19614         (struct cp_function): Add last_parm_cleanup_insn.
19615         (push_cp_function_context): Likewise.
19616         (pop_cp_function_context): Likewise.
19617
19618 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
19619
19620         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
19621
19622 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19623
19624         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
19625         for THUNK_FNDECL before we switch to temporary allocation.
19626
19627 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
19628
19629         * call.c (build_new_op): Handle null arg2 for ?:.
19630
19631 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
19632
19633         * except.c (expand_exception_blocks): Ensure that we flow through
19634         the end of the exception region for the exception specification.
19635         Move exception region for the exception specification in, so that
19636         it doesn't protect the parm cleanup.  Remove some obsolete code.
19637         * decl.c (store_parm_decls): Likewise.
19638         (finish_function): Likewise.
19639
19640 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
19641
19642         * init.c (build_new): Fix nothrow handling.
19643
19644 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19645
19646         * init.c (emit_base_init): Don't warn about the initialization
19647         list for an artificial member.
19648
19649 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19650
19651         * expr.c (do_case): Handle !START case for the error msg.
19652
19653 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
19654
19655         * decl2.c, lang-options.h: New option -Weffc++.
19656         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
19657         to -Weffc++.
19658
19659         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
19660         to MULTIPLE_SYMBOL_SPACES.
19661
19662 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
19663
19664         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
19665
19666         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
19667
19668         * typeck.c (c_expand_return): Don't complain about returning void
19669         to void in an artificial function.
19670         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
19671         don't set DECL_RESULT, set DECL_ARTIFICIAL.
19672         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
19673
19674 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
19675
19676         * init.c (init_decl_processing): Add support for setjmp/longjmp based
19677         exception handling.
19678         * except.c (init_exception_processing): Likewise.
19679         (expand_end_catch_block): Likewise.
19680         (expand_exception_blocks): Likewise.
19681         (expand_throw): Likewise.
19682         * exception.cc (__default_terminate): Likewise.
19683
19684         * init.c (perform_member_init): Use new method of expr level
19685         cleanups, instead of cleanups_this_call and friends.
19686         (emit_base_init): Likewise.
19687         (expand_aggr_vbase_init_1): Likewise.
19688         (expand_vec_init): Likewise.
19689         * decl.c (cp_finish_decl): Likewise.
19690         (expand_static_init): Likewise.
19691         (store_parm_decls): Likewise.
19692         (cplus_expand_expr_stmt): Likewise.
19693         * decl2.c (finish_file): Likewise.
19694
19695         * Make-lang.in (exception.o): Ok to compile with -O now.
19696
19697         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
19698         we know it will be done later by the backend.
19699
19700         * decl2.c (lang_f_options): Remove support for short temps.
19701         * lang-options.h: Likewise.
19702
19703 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
19704
19705         * tree.c (varargs_function_p): New fn.
19706         * method.c (emit_thunk): Replace broken generic code with code to
19707         generate a heavyweight thunk function.
19708
19709 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
19710
19711         * pt.c (process_template_parm): pedwarn about floating-point parms.
19712
19713         * decl.c (grokdeclarator): inline no longer implies static.
19714
19715         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
19716
19717 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
19718
19719         * class.c (check_for_override): The signature of an overriding
19720         function is not changed.
19721
19722         * call.c (build_over_call): Move setting of conv into the loop.
19723         Note: this change, along with the related changes of the 18th thru
19724         the 20th of April, fix an infinite loop problem in conversions.
19725
19726 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
19727
19728         * call.c (build_user_type_conversion_1): Really ignore rvalue
19729         conversions when looking for a REFERENCE_TYPE.
19730
19731         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
19732         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
19733         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
19734         (build_unary_op): Likewise.
19735         * call.c (build_over_call): See through a CONVERT_EXPR around the
19736         ADDR_EXPR for on a temporary.
19737         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
19738         the ADDR_EXPR for a local variable.
19739
19740 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
19741
19742         * call.c (build_user_type_conversion_1): If we're trying to
19743         convert to a REFERENCE_TYPE, only consider lvalue conversions.
19744         (build_new_function_call): Print candidates.
19745         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
19746         (reference_binding): Binding a temporary of a reference-related type
19747         is BAD.
19748
19749 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19750
19751         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
19752         * tinfo2.cc (type_info::before): Likewise.
19753
19754 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
19755
19756         * call.c (implicit_conversion): Oops.
19757
19758 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
19759
19760         * call.c (implicit_conversion): Try to find a reference conversion
19761         before binding a const reference to a temporary.
19762
19763 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
19764
19765         * exception.cc (__default_unexpected): Call terminate by default,
19766         so that if the user overrides terminate, the correct function will
19767         be called.
19768
19769 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
19770
19771         * parse.y (left_curly): Avoid trying to use any fields of
19772         error_mark_node, as there aren't any.
19773
19774 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
19775
19776         * lex.c (do_identifier): Avoid breaking on overloaded methods
19777         as default arguments.
19778
19779 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
19780
19781         * call.c (add_template_candidate): Initialize the variable "dummy".
19782
19783 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
19784
19785         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
19786         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
19787
19788 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19789
19790         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
19791         (debug_binfo): Delete decl, not needed.
19792
19793         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
19794         promotes_to_aggr_type): Delete fns.
19795         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
19796         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
19797         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
19798
19799         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
19800
19801         * friend.c (is_friend_type): Delete fn.
19802         * cp-tree.h (is_friend_type): Delete decl.
19803
19804         * decl.c (original_result_rtx, double_ftype_double,
19805         double_ftype_double_double, int_ftype_int, long_ftype_long,
19806         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
19807         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
19808
19809         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
19810         fwd decls.
19811         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
19812
19813         * decl.c (pushdecl_nonclass_level): #if 0, unused.
19814         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
19815
19816         * lex.c (reinit_lang_specific): #if 0, unused.
19817         * cp-tree.h (reinit_lang_specific): #if 0 decl.
19818
19819         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
19820         * cp-tree.h (revert_static_member_fn): Delete decl.
19821
19822         * class.c (root_lang_context_p): Delete fn.
19823         * cp-tree.h (root_lang_context_p): Delete decl.
19824
19825         * decl.c (set_current_level_tags_transparency): #if 0, unused.
19826         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
19827
19828         * lex.c (set_vardecl_interface_info): Make static.
19829         * cp-tree.h (set_vardecl_interface_info): Delete decl.
19830
19831         * call.c (find_scoped_type): Make static.
19832         * cp-tree.h (find_scoped_type): Delete decl.
19833
19834         * search.c (convert_pointer_to_vbase): Make static.
19835         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
19836
19837         * decl.c (const_ptr_type_node): Likewise.
19838         * cp-tree.h (const_ptr_type_node): Delete decl.
19839
19840         * typeck.c (common_base_type): Make static.
19841         * cp-tree.h (common_base_types): Delete erroneous decl.
19842
19843         * pt.c (classtype_mangled_name): Make static.
19844         * cp-tree.h (classtype_mangled_name): Delete decl.
19845
19846         * lex.c (check_newline): Make static.
19847         * cp-tree.h (check_newline): Delete decl.
19848
19849         * typeck.c (build_x_array_ref): Delete fn, same idea as
19850         grok_array_decl.
19851         * cp-tree.h (build_x_array_ref): Delete decl.
19852
19853         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
19854         copy_lang_decl.
19855         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
19856
19857         * class.c (build_vtable_entry): Make static.
19858         * cp-tree.h (build_vtable_entry): Delete decl.
19859
19860         * class.c (build_vbase_pointer): Make static.
19861         * cp-tree.h (build_vbase_pointer): Delete decl.
19862
19863         * sig.c (build_sptr_ref): Add forward decl and make static.
19864         * cp-tree.h (build_sptr_ref): Delete decl.
19865
19866         * call.c (build_new_method_call): Add forward decl and make static.
19867         * cp-tree.h (build_new_method_call): Delete decl.
19868
19869         * call.c (build_object_call): Make static.
19870         * class.c (check_for_override, complete_type_p, mark_overriders):
19871         Likewise.
19872         * decl.c (cp_function_chain): Likewise.
19873         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
19874         Likewise.
19875         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
19876         Likewise.
19877         * tree.c (build_cplus_array_type_1): Likewise.
19878         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
19879         (comp_target_parms): Likewise.
19880
19881         * init.c (build_builtin_call): Make static.
19882         * cp-tree.h (build_builtin_call): Delete decl.
19883
19884         * typeck.c (binary_op_error): Delete decl.
19885         * cp-tree.h (binary_op_error): Likewise.
19886
19887 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19888
19889         * call.c (build_method_call): Compare against error_mark_node
19890         directly, rather than the ERROR_MARK tree code.
19891         * cvt.c (cp_convert): Likewise.
19892         * decl.c (print_binding_level): Likewise.
19893         (duplicate_decls): Likewise.
19894         (grokdeclarator): Likewise.
19895         (grokdeclarator): Likewise.
19896         * init.c (expand_aggr_init_1): Likewise.
19897         (decl_constant_value): Likewise.
19898         * method.c (build_opfncall): Likewise.
19899         (hack_identifier): Likewise.
19900         * typeck.c (build_modify_expr): Likewise.
19901
19902         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
19903
19904 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
19905
19906         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
19907
19908         * pt.c (coerce_template_parms): Add new error message.
19909
19910         * method.c (build_overload_value): Implement name mangling for
19911         floating-point template arguments.
19912
19913         * method.c (build_overload_int, icat, dicat): Fix mangling of template
19914         arguments whose absolute value doesn't fit in a signed word.
19915
19916 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19917
19918         * friend.c: New file; put all of the friend stuff in here.
19919         * init.c: Instead of here.
19920         * Makefile.in (CXX_OBJS): Add friend.o.
19921         (friend.o): Add dependencies.
19922         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
19923
19924 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
19925
19926         * call.c (build_scoped_method_call): Complain if the scope isn't a
19927         base.
19928
19929 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
19930
19931         * parse.y (left_curly): Don't crash on erroneous type.
19932
19933         * init.c (build_delete): Fix type of ref.
19934
19935 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
19936
19937         * search.c (get_vbase_1): Renamed from get_vbase.
19938         (get_vbase): Wrapper, now non-static.
19939         (convert_pointer_to_vbase): Now static.
19940
19941         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
19942         * init.c (build_delete): Pass one.
19943         (build_partial_cleanup_for): Use build_scoped_method_call.
19944         * decl.c (finish_function): Pass a binfo.
19945
19946 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
19947
19948         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
19949
19950         * typeck.c (build_c_cast): Lose other reference to flag.
19951
19952         * call.c (build_field_call): Don't look for [cd]tor_identifier.
19953         * decl2.c (delete_sanity): Remove meaningless use of
19954         LOOKUP_HAS_IN_CHARGE.
19955         * decl.c (finish_function): Use build_scoped_method_call instead
19956         of build_delete for running vbase dtors.
19957         * init.c (build_delete): Call overload resolution code instead of
19958         duplicating it badly.
19959
19960 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
19961
19962         * call.c (build_over_call): Call mark_used before trying to elide
19963         the call.
19964
19965         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
19966
19967 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
19968
19969         * typeck.c (build_modify_expr): Always pedwarn for a cast to
19970         non-reference used as an lvalue.
19971
19972 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
19973
19974         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
19975
19976 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
19977
19978         * parse.y (handler): Fix template typo.
19979
19980 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
19981
19982         * error.c (lang_decl_name): New fn.
19983         * tree.c (lang_printable_name): Use it.
19984
19985 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
19986
19987         * g++spec.c: Include config.h so that we can catch bzero #defines
19988         from the config file.
19989
19990 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
19991
19992         * new1.cc: Include a declaration for malloc, to avoid warning, and
19993         avoid lossing on systems that require one (ones that define malloc
19994         in xm.h).
19995
19996 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
19997
19998         * decl2.c (max_tinst_depth): New variable.
19999         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
20000         option.
20001         * pt.c (max_tinst_depth): Variable moved.
20002         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
20003         as legal.
20004
20005 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
20006
20007         * decl.c (xref_basetypes): Allow a base class that depends on
20008         template parms to be incomplete.
20009
20010         * decl2.c (build_expr_from_tree): Support typeid(type).
20011         * rtti.c (get_typeid): Support templates.
20012         (expand_si_desc, expand_class_desc): Fix string length.
20013         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
20014
20015 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
20016
20017         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
20018
20019         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
20020
20021 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
20022
20023         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
20024         smashes together template and non-template decls of the same
20025         signature.
20026
20027 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
20028
20029         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
20030
20031 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20032
20033         * decl.c (duplicate_decls): Next route, pedwarn about different
20034         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
20035
20036 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20037
20038         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
20039         (struct lang_type): Delete has_default_implementation member.
20040         Increase dummy to 21.
20041         * decl.c (start_method): Delete usage.
20042
20043         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
20044         store_after_parms, start_decl_1, auto_function): Add decls.
20045         (get_arglist_len_in_bytes, declare_implicit_exception,
20046         have_exceptions_p, make_type_decl, typedecl_for_tag,
20047         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
20048         build_component_type_expr, cplus_exception_name,
20049         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
20050         * call.c (build_this): Make static.
20051         (is_complete): Likewise.
20052         (implicit_conversion): Likewise.
20053         (reference_binding): Likewise.
20054         (standard_conversion): Likewise.
20055         (strip_top_quals): Likewise.
20056         (non_reference): Likewise.
20057         (build_conv): Likewise.
20058         (user_harshness): Likewise.
20059         (rank_for_ideal): Likewise.
20060         * decl.c (start_decl_1): Delete forward decl.
20061         (push_decl_level): Make static.
20062         (resume_binding_level): Make static.
20063         (namespace_bindings_p): Make static.
20064         (declare_namespace_level): Make static.
20065         (lookup_name_real): Make static.
20066         (duplicate_decls): Make static.  Take register off NEWDECL and
20067         OLDDECL parm decls.
20068         * decl2.c (get_sentry): Make static.
20069         (temp_name_p): Delete fn.
20070         * except.c (auto_function): Delete decl.
20071         * lex.c (handle_{cp,sysv}_pragma): Make static.
20072         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
20073         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
20074         * pt.c (tsubst_expr_values): Make static.
20075         * rtti.c (combine_strings): Delete decl.
20076
20077 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
20078
20079         * pt.c (push_template_decl): Handle getting a typedef.
20080
20081         * call.c (build_new_function_call): Complain about void arg.
20082
20083 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20084
20085         * decl.c (duplicate_decls): Give pedwarn of different exceptions
20086         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
20087
20088 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
20089
20090         * except.c (expand_throw): Don't expand the cleanup tree here,
20091         since we are not going to write the rtl out.  Fixes problem with
20092         -g -O on SPARC.
20093
20094 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
20095
20096         * Make-lang.in: Add $(exeext) as necessary.
20097
20098 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
20099
20100         * parse.y (handler_seq): Must have at least one catch clause.
20101
20102 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
20103
20104         * call.c (add_builtin_candidate): Restore ?: hack.
20105
20106         * decl.c (grok_op_properties): More warnings.
20107
20108 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20109
20110         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
20111         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
20112
20113         * decl.c (duplicate_decls): Scale back to a warning, and only do
20114         'em if -pedantic.
20115
20116 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
20117
20118         * decl.c (duplicate_decls): pedwarn mismatched exception
20119         specifications.
20120
20121 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
20122
20123         * call.c (build_new_method_call): Don't display the invisible
20124         argument for controlling virtual bases.
20125
20126 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
20127
20128         * new: Add nothrow new and delete, bad_alloc and throw specifications
20129         for delete.
20130         * decl.c (init_decl_processing): Add throw specification for delete.
20131         * new.cc (nothrow): Define.
20132         * lex.c (real_yylex): Removing warning that throw and friends are
20133         keywords.
20134         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
20135         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
20136         * Make-lang.in: Add new{1,2}.{cc,o}.
20137
20138 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
20139
20140         * lex.c (cons_up_default_function): Fix return type of synth op=.
20141
20142         * init.c (emit_base_init): Add warnings for uninitialized members
20143         and bases.
20144
20145         * decl.c (xref_basetypes): Add warning for non-polymorphic type
20146         with destructor used as base type.
20147
20148         * decl.c (grok_op_properties): Add warning for op= returning void.
20149         * typeck.c (c_expand_return): Add warning for op= returning anything
20150         other than *this.
20151
20152         * class.c (finish_struct_1): Add warning for class with pointers
20153         but not copy ctor or copy op=.
20154
20155         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
20156         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
20157         (instantiate_template): If -fexternal-templates, add this
20158         instantiation to pending_templates.
20159
20160         * decl2.c (copy_assignment_arg_p): Disable old hack to support
20161         Booch components.
20162
20163 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
20164
20165         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
20166
20167 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
20168
20169         * call.c (standard_conversion): Handle getting references.  Tack
20170         on RVALUE_CONV here.  Do it for non-class types, too.
20171         (reference_binding): Pass references to standard_conversion.
20172         (implicit_conversion): Likewise.
20173         (add_builtin_candidate): Disable one ?: kludge.
20174         (convert_like): Handle RVALUE_CONVs for non-class types.
20175         (joust): Disable the other ?: kludge.
20176
20177 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20178
20179         * decl.c (init_decl_processing): Add code to build up common
20180         function types beforehand, to avoid creation then removal of
20181         things already in the hash table.
20182
20183 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
20184
20185         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
20186         the arguments.
20187
20188         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
20189         current_template_parms.
20190
20191 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
20192
20193         * search.c (lookup_field): Don't return a function, check want_type.
20194
20195 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20196
20197         * init.c (build_new): Make sure PLACEMENT has a type.
20198
20199 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
20200
20201         * init.c (build_new): Support new (nothrow).
20202
20203 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
20204
20205         * pt.c (instantiate_decl): Also do push_to_top_level before setting
20206         up DECL_INITIAL.
20207
20208         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
20209         * pt.c (tsubst): Defer instantiation of default args.
20210         * call.c (build_over_call): Until here.
20211
20212 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20213
20214         * search.c (lookup_field): Make sure we have an
20215         IDENTIFIER_CLASS_VALUE before we try to return it.
20216
20217 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
20218
20219         * call.c (build_method_call): Delete unused var PARM.
20220         (build_overload_call_real): Likewise.
20221         (build_object_call): Delete unused var P.
20222         (build_new_op): Likewise.
20223         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
20224         var definitions, which are never used.
20225         (shadow_tag): Delete unused var FN.
20226         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
20227         * init.c (build_new): Delete unused var ALLOC_TEMP.
20228         * method.c (hack_identifier): Delete unused var CONTEXT.
20229         (do_build_copy_constructor): Delete unused var NAME.
20230         (synthesize_method): Delete unused var BASE.
20231         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
20232         * rtti.c (build_headof): Delete unused var VPTR.
20233         (get_typeid): Delete unused var T.
20234         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
20235         and ORIG_OP2.
20236         (build_ptrmemfunc): Delete unused vars U and NINDEX.
20237         * typeck2.c (build_functional_cast): Delete unused var BINFO.
20238
20239 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
20240
20241         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
20242         things in a type being defined.
20243         * decl.c (finish_enum): Reverse the values so that they are in
20244         the correct order.
20245
20246         * pt.c (instantiate_class_template): Don't initialize
20247         BINFO_BASETYPES until the vector is filled out.
20248         (unify): Don't abort on conflicting bindings, just fail.
20249         (instantiate_decl): Do push_tinst_level before any tsubsting.
20250
20251         * method.c (build_overload_value): Handle getting a
20252         TEMPLATE_CONST_PARM for a pointer.
20253
20254 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
20255
20256         * init.c (expand_member_init): Don't give 'not a base' error for
20257         templates.
20258
20259         * pt.c (instantiate_decl): Call import_export_decl later.
20260
20261         * pt.c (instantiate_class_template): Return a value.
20262
20263         * parse.y (extension): New rule for __extension__.
20264         (extdef, unary_expr, decl, component_decl): Use it.
20265
20266 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
20267
20268         * class.c (base_binfo): Remove unused base_has_virtual member.
20269         (finish_base_struct): Likewise.
20270         (finish_struct_1): Likewise.
20271
20272 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
20273
20274         * search.c (expand_upcast_fixups): Fix bogus code generation
20275         problem where the generated code uses the wrong index into the
20276         runtime built vtable on the stack.  Old code could clobber random
20277         stack values.
20278
20279 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
20280
20281         * init.c (perform_member_init): Make sure the partial EH cleanups
20282         live on the function_obstack.
20283
20284 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
20285
20286         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
20287         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
20288
20289 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
20290
20291         * decl.c (grokvardecl): Avoid ANSI style initialization.
20292
20293 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
20294
20295         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
20296
20297 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
20298
20299         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
20300
20301 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20302
20303         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
20304         arguments we compare against.  Start the count of I at 1, not 0,
20305         since argv[0] is still the command.
20306
20307 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
20308
20309         * lang-specs.h: Accept .cp as an C++ extension.
20310
20311 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20312
20313         * cp-tree.h (ptr_reasonably_similar): Add decl.
20314
20315 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20316
20317         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
20318         pointer.  New local SPECBITS with the parm's value.
20319         (grokdeclarator): Pass &specbits down.
20320
20321         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
20322         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
20323
20324         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
20325         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
20326
20327         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
20328         not an error_mark_node.
20329
20330 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
20331
20332         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
20333         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
20334
20335 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20336
20337         * decl.c (grokdeclarator): When giving an anonymous struct a name,
20338         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
20339         not affected).
20340
20341         * typeck2.c (build_m_component_ref): If component is a pointer
20342         to data member, resolve the OFFSET_REF now.
20343
20344         * call.c (convert_like): Don't go into infinite recursion.
20345
20346         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
20347
20348         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
20349         * tree.c (layout_basetypes): And on the vbase ptr.
20350
20351 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
20352
20353         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
20354         CHAR_TYPE_SIZE so bool is always the same size as another type.
20355
20356         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
20357
20358 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
20359
20360         * decl2.c (grok_x_components): Remove synthesized methods from
20361         TYPE_METHODS of an anonymous union, complain about member
20362         functions.
20363         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
20364         anonymous unions.
20365         (finish_function): Just clear the DECL_RTL of our arguments.
20366
20367 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
20368
20369         * decl2.c (finish_file): Emit DWARF debugging info for static data
20370         members.
20371
20372         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
20373
20374 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
20375
20376         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
20377         IDENTIFIER_NODE.
20378
20379 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
20380
20381         * Make-lang.in (g++-cross$(exeext)): Fix typo.
20382
20383 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20384
20385         Make the g++ driver now be a standalone program, rather than one
20386         that tries to run the gcc driver after munging up the options.
20387         * Make-lang.in (g++.c, g++spec.o): New rules.
20388         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
20389         added.
20390         (g++$(exeext)): New rule, based on xgcc rule.
20391         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
20392         * g++spec.c: New file.
20393         * g++.c: Removed file.
20394
20395 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
20396
20397         * cvt.c (build_up_reference): Arrange for any temporary values
20398         that have been keep in registers until now to be put into memory.
20399
20400 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20401
20402         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
20403         that make -j3 bootstrap works better.
20404
20405 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
20406
20407         * decl.c (pushtag): Do pushdecl for anon tags.
20408
20409 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
20410
20411         * typeck.c (c_expand_return): Fix logic.
20412         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
20413
20414 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
20415
20416         * g++.c (main): Make sure arglist has a final NULL entry.  Add
20417         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
20418         stdin/stdout of the invoked program are redirected to
20419         nowheresville.
20420
20421 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
20422
20423         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
20424
20425 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
20426
20427         * init.c (resolve_offset_ref): Handle obj.vfn better.
20428         * typeck.c (build_component_ref): Set TREE_TYPE on result from
20429         build_vfn_ref.
20430
20431 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
20432
20433         * typeck.c (convert_for_assignment): Also handle anachronistic
20434         implicit conversions from (::*)() to cv void*.
20435         * cvt.c (cp_convert_to_pointer): Likewise.
20436
20437 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
20438
20439         * lex.c (handle_cp_pragma): Fix bogus warning.
20440
20441 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
20442
20443         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
20444         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
20445
20446 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
20447
20448         * class.c (finish_struct_1): Support DWARF2_DEBUG.
20449         * search.c (dfs_debug_mark): Likewise.
20450         * decl2.c (finish_vtable_vardecl): Likewise.
20451         * decl.c (pushtag, finish_enum): Likewise.
20452         * lex.c (check_newline): Use debug_* instead of calling *out
20453         functions directly.
20454
20455 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20456
20457         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
20458         on some picky hosts.
20459
20460 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
20461
20462         * class.c (finish_struct_1): A class has a non-trivial copy
20463         constructor if it has virtual functions.
20464
20465         * cvt.c (cp_convert): Always call a constructor.
20466
20467         * call.c (reference_binding): Still tack on a REF_BIND
20468         for bad conversions.
20469         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
20470
20471         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
20472         (c_expand_return): Likewise.
20473         * typeck2.c (digest_init): Likewise for { }.
20474         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
20475         * cvt.c (cp_convert): Handle failure better.
20476
20477 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20478
20479         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
20480         of GCC be path-relative.
20481
20482 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
20483
20484         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
20485         it does need choose-temp.o and pexecute.o.
20486
20487 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20488
20489         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
20490         that we still use it.
20491         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
20492
20493 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
20494
20495         * init.c (expand_default_init): Avoid calling constructors to
20496         initialize reference temps.
20497
20498         * cvt.c (convert_to_reference): Fix.
20499
20500 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
20501
20502         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
20503         (convert_to_reference): Likewise.
20504         * typeck.c (convert_for_initialization): Likewise.
20505         * init.c (expand_default_init): Likewise.
20506         (expand_aggr_init_1): Likewise.
20507         * cp-tree.h (CONV_NONCONVERTING): Lose.
20508         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
20509         * *.c: Adjust.
20510         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
20511
20512 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
20513
20514         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
20515
20516 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
20517
20518         * init.c (expand_aggr_init_1): Don't crash on non-constructor
20519         TARGET_EXPR.
20520
20521 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20522
20523         * g++.c: Include gansidecl.h.
20524         (VPROTO, PVPROTO, VA_START): Delete.
20525         (choose_temp_base_try, choose_temp_base, perror_exec,
20526         run_dos) [__MSDOS__]: Delete fns.
20527         (pfatal_with_name): Delete fn.
20528         (temp_filename): Declare like in gcc.c.
20529         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
20530         (error_count, signal_count): Define.
20531         (error): Delete both definitions.
20532         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
20533         (pfatal_pexecute): Add fn from gcc.c.
20534         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
20535         code to use the pexecute stuff also used by gcc.c.
20536         (MIN_FATAL_STATUS): Define.
20537         * Make-lang.in (g++): Add dependency on and linking with
20538         choose-temp.o and pexecute.o.
20539
20540         * cp-tree.h: Include gansidecl.h.
20541         (STDIO_PROTO): Delete #undef/#define.
20542         * cvt.c (NULL): Delete #undef/#define.
20543         * expr.c (NULL): Likewise.
20544         * init.c (NULL): Likewise.
20545         * rtti.c (NULL): Likewise.
20546         * xref.c (NULL): Likewise.
20547
20548         * cp-tree.h (build_user_type_conversion): Add prototype.
20549         * call.c (build_user_type_conversion): Delete prototype.  Correct
20550         decl of FLAGS arg to be an int.
20551         * cvt.c (build_user_type_conversion): Likewise.
20552
20553 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
20554
20555         * cp-tree.def: Add TRY_BLOCK and HANDLER.
20556         * except.c (expand_start_catch_block): Support templates.
20557         * parse.y (try_block, handler_seq): Likewise.
20558         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
20559
20560 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
20561
20562         * pt.c (current_template_args): New fn.
20563         (push_template_decl): Use it.
20564         * decl.c (grokdeclarator): Use it.
20565
20566         * decl2.c (build_expr_from_tree): Dereference ref vars.
20567
20568         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
20569         the decl-specifier-seq.
20570
20571         * decl.c (grok_op_properties): Don't force the type of a conversion
20572         op to be complete.  Don't warn about converting to the same type
20573         for template instantiations.
20574
20575         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
20576         methods.
20577
20578 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
20579
20580         * typeck.c (get_delta_difference): Remove previous bogusness.
20581         Don't give errors if force is set.
20582
20583 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
20584
20585         * decl2.c (finish_file): Don't emit debug info.
20586         * decl.c (pushdecl): Lose obsolete code.
20587         (grokdeclarator): Still do the long long thing after complaining.
20588         * search.c (note_debug_info_needed): Don't do anything if we're in a
20589         template.
20590         * method.c (synthesize_method): For non-local classes,
20591         push_to_top_level first.
20592
20593 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
20594
20595         * typeck.c (get_delta_difference): Add no_error parameter.
20596         (build_ptrmemfunc): Call get_delta_difference with no_error set;
20597         we don't want error messages when converting unrelated
20598         pointer-to-member functions.
20599
20600 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
20601
20602         * error.c (dump_expr): Improve the wording on error messages that
20603         involve pointer to member functions.
20604
20605 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
20606
20607         * cvt.c (cp_convert_to_pointer): Move code for conversions from
20608         (::*)() to void* or (*)() up a bit, so that we can convert from
20609         METHOD_TYPEs as well.
20610
20611 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
20612
20613         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
20614         There are no 'member' types.
20615         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
20616         (build_x_typeid): Handle errors.
20617
20618 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
20619
20620         * typeck.c (convert_for_assignment): Handle anachronistic implicit
20621         conversions from (::*)() to void* or (*)().
20622         * cvt.c (cp_convert_to_pointer): Likewise.
20623         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
20624         conversions from here.
20625         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
20626         * lang-options.h: Likewise.
20627         * decl2.c (warn_pmf2ptr): Define.
20628         * cp-tree.h: Declare it.
20629         * typeck2.c (digest_init): Allow pmfs down into
20630         convert_for_initialization.
20631
20632 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
20633
20634         * typeck.c (c_expand_return): Fix for returning overloaded fn.
20635
20636 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
20637
20638         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
20639         * decl.c (grok_reference_init): Pass DIRECT_BIND.
20640         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
20641         DIRECT_BIND.
20642         * call.c (convert_like): Don't pass INDIRECT_BIND.
20643         * typeck.c (convert_arguments): Likewise.
20644         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
20645
20646 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
20647
20648         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
20649         similar code in build_up_ref.
20650         * cvt.c (build_up_reference): Drastically simplify.
20651
20652 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
20653
20654         * typeck.c (signed_or_unsigned_type): If the given type already
20655         as the correct signedness, then just return it.
20656
20657         * typeck.c ({un,}signed_type): If can't do anything, call
20658         signed_or_unsigned_type.
20659
20660 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
20661
20662         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
20663         current_class_type is NULL.
20664
20665 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
20666
20667         * class.c (finish_struct_1): Avoid empty structs by adding a field
20668         so layout_type gets the mode right.
20669
20670         * typeck.c (c_expand_return): Drastically simplify.
20671
20672 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
20673
20674         * typeck.c (decay_conversion): Handle overloaded methods.
20675
20676 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
20677
20678         * call.c (build_over_call): A TARGET_EXPR has side-effects.
20679
20680 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
20681
20682         * cvt.c (convert_to_pointer_force): Add code to support pointer to
20683         member function to pointer to function conversions.
20684         * init.c (resolve_offset_ref): Add code to allow faked up objects,
20685         ignoring them if they are not used, and giving an error, if they
20686         are needed.
20687         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
20688         code, and so that we can give an error, if we needed an object,
20689         and one was not provided.
20690         (build_c_cast): Don't call default_conversion when we want to
20691         convert to pointer to function from a METHOD_TYPE.
20692
20693 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
20694
20695         * Make-lang.in (cplib2.ready): Fix logic.
20696
20697         * decl.c (shadow_tag): Only complain about non-artificial function
20698         members.
20699
20700         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
20701
20702 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
20703
20704         * expr.c (cplus_expand_expr): Pre-tweak call_target like
20705         expand_inline_function would.
20706
20707         * pt.c (mark_decl_instantiated): If extern_p, call
20708         mark_inline_for_output.
20709
20710 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
20711
20712         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
20713         pmd conversions.
20714
20715         * typeck.c (get_delta_difference): Fix wording, as we can be used
20716         for pointer to data members.
20717
20718 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
20719
20720         * pt.c (tsubst): If the function decl isn't a member of this
20721         template, return a copy of the decl (including copying the
20722         lang-specific part) so we don't hose ourselves later.
20723
20724 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
20725
20726         * class.c (finish_struct): Remove DWARF-specific tag handling.
20727         * decl.c (pushtag): Likewise.
20728         (finish_function): Always clear DECL_ARGUMENTS on function decls with
20729         no saved RTX.
20730         * decl2.c (finish_file): Emit DWARF debugging info for static data
20731         members.
20732
20733 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
20734
20735         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
20736         isn't the same as the new one before we whack it.
20737
20738 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
20739
20740         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
20741         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
20742         warn_traditional and warn_strict_prototypes; remove ancient
20743         'overload' code; remove references to flag_traditional.
20744
20745 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
20746
20747         * input.c (sub_getch): Handle 8-bit characters in string literals.
20748
20749 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
20750
20751         * tree.c (mapcar): Handle CONSTRUCTORs.
20752         (copy_to_permanent): Handle expression_obstack properly.
20753
20754         * Make-lang.in (cplib2.txt): Also depend on the headers.
20755
20756         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
20757         INT_TYPE_SIZE.
20758         (expand_class_desc): Use USItype for offset field.
20759         * tinfo.h (struct __class_type_info): Likewise.
20760
20761         * method.c (build_overload_int): TYPE_PRECISION should be applied
20762         to types.
20763
20764 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
20765
20766         * call.c (build_new_op): A COND_EXPR involving void must be a
20767         builtin.
20768
20769 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20770
20771         * typeck.c (build_x_component_ref): New fn.
20772         (build_object_ref): Use it.
20773         * parse.y (primary): Use it.
20774         * decl2.c (build_expr_from_tree): Use it.
20775         * cp-tree.h: Declare it.
20776
20777         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
20778         * error.c (dump_type_suffix): Handle variable arrays.
20779
20780 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20781
20782         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
20783
20784 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20785
20786         * decl.c (lookup_name_real): Don't try to look up anything in a
20787         TYPENAME_TYPE.
20788
20789         * tinfo2.cc (__throw_type_match_rtti): Oops.
20790
20791 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20792
20793         * Make-lang.in (exception.o): Use -fno-PIC for now.
20794
20795 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
20796
20797         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
20798         calling them.
20799         (get_tinfo_fn_dynamic): Extracted from build_typeid.
20800         * tinfo2.cc (__dynamic_cast): Adjust.
20801
20802         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
20803         (build_x_typeid): Likewise.
20804
20805         * parse.y: Call build_x_typeid instead of build_typeid.
20806         * cp-tree.def: Add TYPEID_EXPR.
20807         * pt.c (tsubst_copy): Handle typeid.
20808         * decl2.c (build_expr_from_tree): Likewise.
20809         * rtti.c (build_x_typeid): Throw bad_typeid from here.
20810         (build_typeid): Not here.
20811         * cp-tree.h: Declare build_x_typeid.
20812
20813 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
20814
20815         * call.c (convert_like): Pull out constant values.
20816
20817         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
20818
20819 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
20820
20821         * decl.c (init_decl_processing): Create short int types before
20822         creating size_t in case a machine description needs to use
20823         unsigned short for size_t.
20824
20825 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
20826
20827         * Make-lang.in (exception.o): Turn off pic.
20828
20829         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
20830         type, multi-level ptr conversions.
20831
20832         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
20833         (throw_bad_cast): Use it.
20834         (throw_bad_typeid): New fn.
20835         (build_typeid): Throw bad_typeid as needed.
20836         Use build_call.
20837         (synthesize_tinfo_fn): Handle functions and arrays before checking
20838         for cv-quals.
20839
20840         * Remove .h from standard C++ headers, add new.h, move into inc
20841         subdirectory.
20842
20843         * exception*: Remove pointer from object, constructors.  Add
20844         default exception::what that uses type_info::name.  Add
20845         __throw_bad_typeid.
20846
20847         * init.c (build_new): Don't add a cookie to new (void *) T[2].
20848
20849 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
20850
20851         * Make-lang.in: Building C++ code depends on cc1plus.
20852
20853 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20854
20855         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
20856         a HOST_WIDE_INT, not a tree.
20857
20858 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
20859
20860         * exception.cc: Don't include <stdlib.h>.
20861
20862         * Make-lang.in (c++.clean): Remove cplib2.*.
20863
20864 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
20865
20866         * parse.y (component_decl_1, component_costructor_declarator case):
20867         Pass attributes/prefix_attributes in tree list.
20868
20869 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
20870
20871         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
20872
20873 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
20874
20875         * lex.c (do_identifier): Don't do deferred lookup in a template
20876         header.
20877
20878         * typeck2.c (store_init_value): Oops.
20879
20880         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
20881         New files for C++ lang-support library.
20882         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
20883         (CXX_LIB2FUNCS): Define.
20884         And rules for building the C++ lang-support code.
20885         * config-lang.in (headers): Define.
20886         (lib2funcs): Define.
20887
20888 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
20889
20890         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
20891         digest_init.
20892         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
20893         * typeck2.c (store_init_value): Check for initializing pmf with { }
20894         here.
20895         (process_init_constructor): Not here.
20896
20897 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
20898
20899         * pt.c (begin_template_parm_list): Increment
20900         processing_template_decl here.
20901         (end_template_parm_list): Not here.
20902         (process_template_parm): No need to add 1 to it now.
20903         * *.c: Use processing_template_decl instead of current_template_parms
20904         to check for being in a template.
20905
20906         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
20907         (tsubst_copy): Handle CONSTRUCTOR.
20908         (instantiate_decl): Set up context properly for variables.
20909         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
20910         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
20911
20912 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20913
20914         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
20915
20916 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
20917
20918         * method.c (make_thunk): Call comdat_linkage before setting the
20919         TREE_CODE.
20920
20921         * decl2.c (comdat_linkage): Use make_decl_one_only.
20922         (import_export_decl): Likewise.
20923         * decl.c (init_decl_processing): Check supports_one_only instead of
20924         SUPPORTS_WEAK.
20925
20926 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
20927
20928         * decl2.c (grokfield): Tighten checking for access decls.
20929
20930         * decl.c (make_typename_type): Resolve references to
20931         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
20932         (lookup_name_real): Types that depend on a template parameter get
20933         an implicit 'typename' unless they're in the current scope.
20934         (start_decl_1): We don't care about incomplete types that depend
20935         on a template parm.
20936         (grokdeclarator): Resolve 'typename's in the type specifier that
20937         refer to members of the current scope.
20938
20939         * call.c (build_over_call): Remove 'inline called before
20940         definition' diagnostic.
20941         (build_method_call): Likewise.
20942         * decl.c (duplicate_decls): Downgrade 'used before declared
20943         inline' to a warning, only with -Winline.
20944
20945 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
20946
20947         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
20948
20949 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
20950
20951         * call.c (build_method_call): When calling a signature
20952         default implementation, as in other cases, let instance_ptr simply
20953         be instance.
20954
20955 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
20956
20957         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
20958
20959 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
20960
20961         * except.c (expand_start_catch_block): Add a pushlevel so that -g
20962         works on hppa and SPARC.
20963
20964 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20965
20966         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
20967
20968 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
20969
20970         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
20971         before testing whether it's a signature.
20972
20973 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
20974
20975         * call.c (build_new_method_call): Don't complain about signature
20976         pointers and references not being an aggr type.
20977         (build_this): If a signature pointer or reference was passed in,
20978         just return it.
20979         (build_new_method_call): If instance is a signature pointer, set
20980         basetype to the signature type of instance.
20981         * sig.c (build_signature_method_call): Deleted basetype and
20982         instance parameters, they can be found as the DECL_CONTEXT of
20983         function and as the first argument passed in.
20984         * cp-tree.h: Changed declaration of build_signature_method_call.
20985         * call.c (build_method_call): Deleted first two arguments in call
20986         of build_signature_method_call.
20987         (build_over_call): Added call to build_signature_method_call.
20988
20989 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
20990
20991         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
20992         target_expr.
20993
20994 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20995
20996         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
20997
20998 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
20999
21000         * except.c (expand_start_try_stmts): Move to except.c in the backend.
21001         (expand_end_try_stmts): Remove.
21002
21003         * init.c (perform_member_init): Use add_partial_entry () instead
21004         of directly manipulating lists.
21005         (emit_base_init): Likewise.
21006
21007 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
21008
21009         * except.c (expand_exception_blocks): Always make sure USE and
21010         CLOBBER insns that came at the end still do, the backend relies
21011         upon this.
21012
21013 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
21014
21015         * call.c (build_over_call): We can only use a TARGET_EXPR of the
21016         right type.
21017
21018 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
21019
21020         * cvt.c (convert_to_reference): Revert last change, don't complain
21021         about temp without target decl.
21022
21023 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
21024
21025         * decl.c (grokdeclarator): Don't core dump when void() is given.
21026
21027 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
21028
21029         * decl.c (copy_args_p): Don't crash.
21030
21031 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
21032
21033         * pt.c (tsubst): And support template args inside the exception
21034         specification.
21035
21036         * pt.c (tsubst): Add support for exception specifications in
21037         template functions.
21038
21039 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
21040
21041         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
21042         fields now.
21043         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
21044         (start_function): Likewise.
21045         (start_method): Likewise.
21046         (grokfield): Likewise.
21047         (make_call_declarator): Add throw spec parameter.
21048         (set_quals_and_spec): Add routine.
21049         * lex.c (set_quals_and_spec): Likewise.
21050         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
21051         * decl.c (shadow_tag): Eliminate the throw spec parameter to
21052         grokdeclarator.
21053         (groktypename): Likewise.
21054         (start_decl): Eliminate the throw spec parameter.  Eliminate the
21055         throw spec parameter to grokdeclarator.  Eliminate the throw spec
21056         field in DECL_STMT.
21057         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
21058         (grokfndecl): Remove useless set of raises.
21059         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
21060         the throw spec parameter to start_decl.  Pull the throw spec out
21061         of the call declarator.
21062         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
21063         (start_function): Eliminate the throw spec parameter.  Eliminate
21064         the throw spec parameter to grokdeclarator.
21065         (start_method): Likewise.
21066         * decl2.c (grokfield): Likewise.
21067         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
21068         (grokoptypename): Likewise.
21069         (finish_file): Eliminate the throw spec parameter to
21070         start_function.  Add throw spec to make_call_declarator.
21071         * except.c (init_exception_processing): Add throw spec to
21072         make_call_declarator.  Eliminate the throw spec parameter to
21073         start_decl.
21074         (expand_start_catch_block): Eliminate the throw spec parameter to
21075         grokdeclarator.
21076         (expand_builtin_throw): Add throw spec to make_call_declarator.
21077         Eliminate the throw spec parameter to start_function.
21078         (start_anon_func): Likewise.
21079         * lex.c (make_call_declarator): Add throw spec parameter.
21080         (set_quals_and_spec): New routine.
21081         (cons_up_default_function): Add throw spec to make_call_declarator.
21082         Eliminate the throw spec parameter to grokfield.
21083         * method.c (synthesize_method): Eliminate the throw spec parameter
21084         to start_function.
21085         * pt.c (process_template_parm): Eliminate the throw spec parameter
21086         to grokdeclarator.
21087         (tsubst): Add throw spec to make_call_declarator.
21088         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
21089         (do_function_instantiation): Eliminate the throw spec parameter to
21090         grokdeclarator.  Eliminate the throw spec parameter to
21091         start_function.
21092         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
21093         to start_function.
21094         * parse.y (datadef): Remove non-winning optimization.
21095         (decl): Likewise.
21096         (fndef): Remove ambiguous error productions uncovered by grammar
21097         fixing.
21098         (constructor_declarator): Add exception_specification_opt here.
21099         (component_constructor_declarator): Likewise.
21100         (direct_after_type_declarator): Likewise.
21101         (complex_direct_notype_declarator): Likewise.
21102         (direct_abstract_declarator): Likewise.
21103         (fn.def1): Remove exception_specification_opt.
21104         (fn.def2): Likewise.
21105         (condition): Likewise.
21106         (initdcl0): Likewise.
21107         (initdcl): Likewise.
21108         (notype_initdcl0): Likewise.
21109         (nomods_initdcl0): Likewise.
21110         (component_decl_1): Likewise.
21111         (component_declarator): Likewise.
21112         (after_type_component_declarator0): Likewise.
21113         (after_type_component_declarator): Likewise.
21114         (notype_component_declarator): Likewise.
21115
21116 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
21117
21118         * call.c (build_over_call): Also use an INIT_EXPR when
21119         initializing anything from an rvalue.
21120
21121         * call.c (build_over_call): Call stabilize_reference when building
21122         an INIT_EXPR instead of calling the copy ctor.
21123
21124         * call.c (joust): Extend the previous change to all comparisons.
21125
21126         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
21127         NO_LINKAGE_HEURISTICS.
21128
21129         * decl2.c (finish_file): Emit any statics that weren't already.
21130
21131         * typeck.c (build_static_cast): Implement.
21132         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
21133         * decl.c (grokparms): Use can_convert_arg instead of
21134         implicit_conversion directly.
21135         (copy_args_p): New fn.
21136         * cvt.c (convert_to_reference): Don't complain about temp with
21137         static_cast.
21138         (build_up_reference): Handle TARGET_EXPRs.
21139         * call.c (build_over_call): Elide unnecessary temps.
21140         (can_convert*): Use new overloading code.
21141
21142 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
21143
21144         * call.c: Move TYPE_PTR*_MACROS ...
21145         * cp-tree.h: To here.
21146         * typeck.c (build_reinterpret_cast): Implement.
21147
21148         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
21149         ptr_complete_ob.
21150         (joust): If we're comparing a function to a builtin and the worst
21151         conversion for the builtin is worse than the worst conversion for the
21152         function, take the function.
21153
21154         * typeck.c (build_const_cast): Implement.
21155         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
21156         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
21157
21158 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
21159
21160         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
21161         too early.  Make sure we explode if exprtype turns out to be a
21162         NULL_TREE when it shouldn't be.
21163
21164 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
21165
21166         * cp-tree.h: New routine make_call_declarator.
21167         * lex.c (make_call_declarator): Define it.
21168         * except.c (init_exception_processing): Use it.
21169         (expand_builtin_throw): Likewise.
21170         (start_anon_func): Likewise.
21171         * decl2.c (finish_file): Likewise.
21172         * lex.c (cons_up_default_function): Likewise.
21173         * parse.y: Likewise.
21174         * pt.c (tsubst): Likewise.
21175
21176 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
21177
21178         * decl2.c (groktypefield): Remove unused code.
21179
21180 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
21181
21182         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
21183         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
21184         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
21185         nonempty_cv_qualifiers.
21186         * hash.h: Rebuild.
21187
21188         * lex.c (make_pointer_declarator): Change type_quals into
21189         cv_qualifiers.
21190         (make_reference_declarator): Likewise.
21191
21192 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
21193
21194         * decl.c (start_function): Only check interface_* for templates
21195         with flag_alt_external_templates.
21196
21197         * call.c (build_new_op): Check for comparison of different enum types.
21198         (build_over_call): Fix arg # output.
21199
21200         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
21201
21202 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
21203
21204         * call.c (build_new_op): Check for erroneous args.
21205
21206         * call.c (build_new_method_call): Add missing args to cp_error.
21207
21208         * tree.c (error_type): Don't print reference-to-array.
21209
21210         * typeck.c (convert_for_assignment): Don't say contravariance for
21211         removing const.
21212
21213 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
21214
21215         * call.c (build_over_call): Diagnose bad convs for `this'.
21216
21217         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
21218         on _ctor_arg.
21219
21220         * call.c (convert_like): Handle bad convs.
21221         (build_over_call): Handle bad convs better.
21222
21223         * decl2.c: -fansi-overloading is now the default.
21224
21225         * call.c (build_new_method_call): Check for erroneous args.
21226
21227         * pt.c (instantiate_class_template): Propagate
21228         TYPE_USES_MULTIPLE_INHERITANCE.
21229
21230 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
21231
21232         * call.c (enforce_access): Add static to routine.
21233
21234 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
21235
21236         * call.c (build_user_type_conversion_1): Fix bad handling.
21237         (compare_ics): Likewise.
21238
21239 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
21240
21241         * call.c (standard_conversion): Oops.
21242
21243 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
21244
21245         * g++.c: Update test for win32 (&& ! cygwin32).
21246
21247 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
21248
21249         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
21250         (ptr_reasonably_similar): New fn.
21251         * call.c (BAD_RANK): New rank.
21252         (ICS_BAD_FLAG): New macro.
21253         (standard_conversion): Handle almost-right pointer conversions.
21254         (reference_binding): Handle bad rvalue bindings.
21255         (add_*_candidate): Stuff.
21256         (build_over_call): Pass bad conversions to convert_for_initialization.
21257         (compare_ics): Handle bad convs.
21258         (joust): Likewise.
21259
21260 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
21261
21262         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
21263         integer_type_node when computing pointer offsets.
21264
21265 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
21266
21267         * tree.c (lvalue_type): New fn.
21268         (error_type): New fn.
21269         * call.c (op_error): Use error_type.
21270         (add_conv_candidate): Use lvalue_type.
21271         (add_builtin_candidates): Likewise.
21272         * error.c (args_as_string): Use error_type.
21273
21274 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
21275
21276         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
21277         (tsubst): Not here.
21278
21279         * decl.c (init_decl_processing): With -ansi, __null's type is the
21280         signed integral type with the same number of bits as a pointer.
21281         Introduce a new variable null_node for it.
21282         * cp-tree.h: Adjust.
21283         * call.c (null_ptr_cst_p): Adjust.
21284
21285 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
21286
21287         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
21288         optimize.
21289
21290 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
21291
21292         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
21293         fns of classes without virtual functions.
21294
21295         * call.c (add_function_candidate): Handle `this' specially.
21296         (compare_ics): Likewise.
21297
21298 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
21299
21300         * typeck.c (build_conditional_expr): Fix handling of __null.
21301
21302         * decl2.c (comdat_linkage): New fn.
21303         (import_export_vtable): Use it.
21304         (import_export_decl): Use it.
21305         * method.c (make_thunk): Use it.
21306
21307 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
21308
21309         * pt.c (end_template_decl): If we don't actually have parms, return.
21310         * parse.y (template_header): Accept 'template <>'.
21311
21312         * errfn.c: Allow 5 args.
21313
21314 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
21315
21316         * tree.c (make_temp_vec): New fn.
21317         * pt.c (push_template_decl): Handle partial specs.
21318         (instantiate_class_template): Likewise.
21319         (more_specialized): Use get_bindings.
21320         (more_specialized_class): New fn.
21321         (get_class_bindings): New fn.
21322         (most_specialized_class): New fn.
21323         (do_function_instantiation): List candidates for ambiguous case.
21324         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
21325         (shadow_tag): Call push_template_decl for partial specializations.
21326         * parse.y: Likewise.
21327         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
21328         DECL_TEMPLATE_MEMBERS.
21329         * call.c (print_z_candidates): Reduce duplication.
21330
21331 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
21332
21333         * decl2.c (lang_decode_option): Allow -fansi-overloading.
21334
21335 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
21336
21337         * pt.c (get_bindings): New fn.
21338         (most_specialized): Likewise.
21339         (do_function_instantiation): Use them.
21340         (add_maybe_template): New fn.
21341         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
21342         * call.c (build_new_op): Handle guiding decls.
21343         (build_new_function_call): Likewise.
21344         * decl2.c (finish_file): Likewise.
21345
21346         * decl2.c (mark_used): Do synthesis here.
21347         * call.c (build_method_call): Not here.
21348         (build_over_call): Or here.
21349         * typeck.c (build_function_call_real): Or here.
21350         * tree.c (bot_manip): Call mark_used on functions used in default
21351         args.
21352
21353 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
21354
21355         * decl2.c (import_export_vtable): Delete code that disabled vtable
21356         heuristic on systems with ASM_OUTPUT_EXTERNAL.
21357
21358 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
21359
21360         * typeck.c (build_x_function_call): Handle static call context
21361         better.
21362
21363         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
21364         the function, not its outer block.
21365
21366         * call.c (build_field_call): Pass fields on to build_opfncall
21367         regardless of TYPE_OVERLOADS_CALL_EXPR.
21368         (build_method_call): Pass on to build_new_method_call sooner.
21369
21370         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
21371         gives us.
21372         * class.c (instantiate_type): Don't put a POINTER_TYPE to
21373         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
21374         modifying it.
21375
21376 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
21377
21378         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
21379         (add_builtin_candidate): Don't take enums for ++.
21380         (build_new_method_call): Handle non-aggregates and field calls.
21381         Move new overloading code from...
21382         * cvt.c: Here.
21383
21384         * decl.c (grokparms): Don't check default args in templates.
21385
21386 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
21387
21388         * cvt.c (build_new_op): Fix args to build_unary_op.
21389         (add_builtin_candidates): Don't call type_promotes_to on float.
21390
21391         * decl.c (grokparms): Check the type of the default arg.
21392
21393         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
21394         returning NULL_TREE.
21395
21396         * typeck.c (build_x_binary_op): Avoid doing extra work.
21397         (build_x_unary_op): Likewise.
21398         (build_x_conditional_expr): Likewise.
21399         * cvt.c (build_over_call): Return.
21400         (add_builtin_candidate): Fix MEMBER_REF.
21401         (build_new_op): Likewise.
21402
21403 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
21404
21405         * method.c (build_overload_name): Put bug fix into code but leave
21406         disabled for now so we can be bug compatible with older releases
21407         that do repeats incorrectly.  In the future, we can enable it.
21408
21409 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
21410
21411         * cvt.c (convert_like): Don't call build_cplus_new twice.
21412
21413         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
21414         Control new overloading code with -fansi-overloading.
21415
21416 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
21417
21418         * cvt.c (build_over_call): Call build_cplus_new.
21419         * call.c (build_method_call): Likewise.
21420         * typeck.c (build_function_call_real): Likewise.
21421         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
21422         the COND_EXPR in a TARGET_EXPR so they use the same slot.
21423
21424         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
21425         recursive calls.
21426         * typeck.c (complete_type): Propagate
21427         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
21428
21429 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
21430
21431         * cvt.c (joust): More ?: kludging.  Sigh.
21432         (build_over_call): Don't try to synthesize global fns.
21433
21434         * search.c (lookup_conversions): Use binfo marking.
21435
21436 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
21437
21438         * search.c (build_mi_matrix): Use the correct value of cid
21439         when determining the new mi_size.
21440
21441 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
21442
21443         * cvt.c (add_builtin_candidates): Do consider type conversion ops
21444         for the first parms of += et al.
21445         (strip_top_quals): New fn.
21446         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
21447         (implicit_conversion): Likewise.
21448         (add_builtin_candidates): Be careful about arrays.
21449         (build_new_method_call): Handle vtable optimization.
21450
21451 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
21452
21453         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
21454         * cvt.c (reference_binding): Use it.
21455         (implicit_conversion): Use it.
21456         (add_builtin_candidate, COND_EXPR): Use it.
21457
21458         * cvt.c (build_new_function_call): Check for error args.
21459
21460         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
21461
21462         * gxx.gperf: Add __null.
21463         * hash.h: Regenerate.
21464         * lex.h: Add RID_NULL.
21465         * lex.c (init_lex): Create null_pointer_node here, stick it in
21466         RID_NULL.
21467         * decl.c (init_decl_processing): Still set its type here.
21468         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
21469         (convert_to_pointer_force): Likewise.
21470         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
21471         if (! pedantic).
21472         * call.c (convert_harshness): Use null_ptr_cst_p.
21473         * typeck.c (convert_for_assignment): Likewise.  Don't produce
21474         null_pointer_node.
21475
21476         * error.c (args_as_string): Handle lists of actual args, too.
21477         * cvt.c (null_ptr_cst): Support (void*)0 for now.
21478         (build_user_type_conversion_1): Improve diagnostics.
21479         (build_new_function_call): Likewise.
21480         (build_object_call): Likewise.
21481         (build_new_method_call): Likewise.  Move call before def diagnostic...
21482         (build_over_call): Here.
21483
21484         * cvt.c (build_new_method_call): Don't complain about no match if
21485         LOOKUP_SPECULATIVELY.
21486         (build_over_call): Fix 'this' for virtual fn.
21487         (build_new_method_call): Add diagnostic.
21488
21489 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
21490
21491         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
21492         constructors to be passed in.
21493         (build_over_call): Likewise.
21494         (build_user_type_conversion_1): Pass them in.
21495         (convert_like): Likewise.
21496         (build_object_call): Handle overloaded conversions.
21497         (build_over_call): Pass the right args to build_vfn_ref.
21498         (standard_conversion): Fix pmf convs.
21499         (joust): Handle comparing statics and non-statics.
21500         (build_new_method_call): New fn.
21501         * call.c (build_method_call): Call it if NEW_OVER.
21502
21503 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
21504
21505         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
21506         %D instead.
21507
21508 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
21509
21510         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
21511         instead of just maybe_build_cleanup so that we deallocate the
21512         thrown object.
21513
21514 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21515
21516         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
21517         * cp-tree.h (finish_prevtable_vardecl): Add decl.
21518
21519 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
21520
21521         * pt.c (instantiate_class_template): Call complete_type.  Also, if
21522         we're at the end of the file and we just instantiated a template
21523         class with a vtable, call finish_prevtable_vardecl.
21524
21525         * error.c (dump_decl): Don't explode (or explode more gracefully
21526         as appropriate) if the object being dumped has a null type.
21527         (dump_expr): Likewise.
21528
21529         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
21530         by counting the number of nodes that we'll need before allocating
21531         the array.
21532         (lookup_fnfields): Fix comment.
21533         (breadth_first_search): Fix comment.
21534
21535 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
21536
21537         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
21538         TYPE_ALIGN.
21539         * class.c (finish_struct): Call cplus_decl_attributes here.
21540         (finish_struct_1): Not here.
21541         * cp-tree.h: Adjust.
21542
21543         * pt.c (type_unification): New parameter STRICT.
21544         (unify): If STRICT, don't allow cv addition or base deduction.
21545         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
21546
21547 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
21548
21549         * search.c (get_template_base{_recursive}): New fns.
21550         * pt.c (more_specialized): New fn.
21551         (do_function_instantiation): Use it.
21552         (unify): Handle base deduction.
21553         * cvt.c (joust): Use more_specialized.
21554         Don't arbitrarily choose between non-builtin candidates.
21555         (build_over_call): Call require_complete_type.
21556
21557         * decl.c (start_function): Statics are static even in a #pragma
21558         interface file.
21559
21560         * decl2.c (import_export_vtable): Disable vtable heuristic on
21561         systems with ASM_OUTPUT_EXTERNAL.
21562
21563         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
21564         (standard_conversion): No std conv to enum type.
21565
21566         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
21567         for ptm's.
21568
21569         * cvt.c (reference_binding): Bind directly to a base subobject of
21570         a class rvalue.
21571
21572         * cvt.c (build_new_op): Enforce access control.
21573
21574 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
21575
21576         * typeck2.c (process_init_constructor): When scanning the
21577         union for a named field, skip things that aren't FIELD_DECLs.
21578
21579         * method.c (synthesize_method): Don't scan fndecl's rtl if
21580         we're at the end of the file; just assume the function can't
21581         be inlined.
21582
21583 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
21584
21585         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
21586         it failed.
21587
21588         * cvt.c (build_user_type_conversion_1): Handle overloaded
21589         conversion ops.
21590
21591         * cvt.c (add_builtin_candidates): Don't consider type conversion
21592         operators for the first parameter of operator=.
21593
21594 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
21595
21596         * typeck.c (complete_type): Only call layout_type if we're not
21597         expanding a template.
21598
21599 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
21600
21601         * cvt.c (compare_ics): Oops.
21602
21603         * cvt.c (op_error): Oops.
21604
21605         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
21606         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
21607         (build_conv): Use them.
21608         (implicit_conversion): Use them.
21609         (convert_like): Handle them.
21610         (build_new_op): Handle builtin COND_EXPR again.
21611         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
21612         in lists of types for COND_EXPR.
21613         (add_builtin_candidate): Add enum candidates for COND_EXPR.
21614
21615 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
21616
21617         * typeck.c (build_modify_expr): Always attempt to build a call to
21618         the assignment operator, even if we're using a default one.
21619         (convert_for_initialization): Call complete_type.
21620
21621 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
21622
21623         * cvt.c (reference_binding): A REF_BIND gets the reference type.
21624         (implicit_conversion): Likewise.
21625         (convert_like): Likewise.
21626         (compare_ics): Likewise.
21627         (compare_qual): Likewise.
21628         (print_z_candidates): Handle no candidates.
21629         (build_new_op): Don't handle builtin COND_EXPR for now.
21630
21631 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
21632
21633         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
21634
21635 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
21636
21637         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
21638
21639         * cvt.c (build_builtin_candidate): Oops.
21640         (build_new_op): Oops.
21641
21642         * method.c (build_opfncall): Pass COND_EXPR on.
21643         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
21644         (add_builtin_candidate{,s}): Likewise.
21645         (add_builtin_candidates): Likewise.
21646         (print_z_candidates, op_error, build_new_op): Likewise.
21647         (type_decays_to): New fn.
21648         * lex.c (init_lex): Just say ?: for COND_EXPR.
21649
21650 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21651
21652         * typeck.c (complete_type): Call layout_type rather than building
21653         a new array type.
21654
21655         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
21656         only use ptrdiff_t.
21657
21658 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
21659
21660         * cvt.c: Always compile the new overloading code (but don't use it).
21661         (implicit_conversion): Add a BASE_CONV when converting to
21662         the same class type.
21663         (convert_like): Handle BASE_CONV.
21664
21665 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
21666
21667         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
21668         (add_builtin_candidate): Likewise.
21669
21670         NEW_OVER changes:
21671         * typeck.c (build_x_function_call): Try an operator function
21672         whenever we call an object of class type.
21673         * method.c (build_opfncall): Pass CALL_EXPRs through.
21674         * cvt.c (implicit_conversion): Do const-ref case first.
21675         (add_conv_candidate, build_object_call, op_error): New fns.
21676         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
21677         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
21678         builtin candidates.
21679         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
21680         Fall back on preincrement handling.  Use op_error.
21681         Handle warn_synth.
21682         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
21683         an error_mark_node.
21684         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
21685         properly.
21686
21687 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
21688
21689         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
21690
21691 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
21692
21693         * typeck.c (build_component_ref_1): Use build_component_ref
21694         instead of open coding it here.
21695
21696 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
21697
21698         * g++.c (main): Don't link with -lg++.
21699
21700         NEW_OVER changes:
21701         * cvt.c (convert_to_reference): Don't use convert_from_reference on
21702         result of build_type_conversion.
21703         (cp_convert): Only call build_method_call for ctors if
21704         build_type_conversion failed.
21705         (ptr_complete_ob): New function.
21706         (TYPE_PTR{,OB,MEM}_P): New macros.
21707         ({add,build}_builtin_candidate{,s}): New functions.
21708         (print_z_candidates): Handle builtins.
21709         (build_user_type_conversion_1): Don't use conversion fns for
21710         converting to a base type.
21711         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
21712         (build_user_type_conversion): Use convert_from_reference.
21713         (build_new_op): New function.
21714         (build_over_call): Fix handling of methods.
21715         (compare_ics): Handle AMBIG_CONV properly.
21716         * typeck2.c: Increment abort count.
21717         * method.c (build_opfncall): Forward most requests to build_new_op.
21718         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
21719
21720 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21721
21722         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
21723         invalid second argument to dump_expr_list.
21724
21725 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
21726
21727         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
21728
21729 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
21730
21731         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
21732         ASSEMBLE_EXTERNAL.
21733
21734 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
21735
21736         * typeck2.c (process_init_constructor): New pedwarn for using { }
21737         to initialize a pointer to member function.
21738         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
21739         we can avoid the new error.
21740
21741 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
21742
21743         * typeck.c (build_ptrmemfunc1): New function to hide details of
21744         pointer to member functions better.
21745
21746 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
21747
21748         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
21749         methods into the actual method, as we know the implied object is
21750         not used.
21751
21752 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21753
21754         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
21755         inside a system header.
21756
21757 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
21758
21759         * call.c (build_method_call): Call complete_type on the
21760         instance type.
21761
21762 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
21763
21764         * typeck.c (build_component_ref): Always build up an OFFSET_REF
21765         for obj_ptr->func so that we can know which object to use in a
21766         method call.
21767
21768 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
21769
21770         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
21771         around things.  Also improve maintainability.
21772
21773 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
21774
21775         * decl.c (grokdeclarator): Check for overflow when evaluating an
21776         array dimension.
21777
21778 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
21779
21780         * cvt.c (cp_convert): Don't check for ambiguity with constructor
21781         if NEW_OVER.
21782
21783         * typeck.c (build_x_function_call): Pass function overload
21784         questions to new overloading code if NEW_OVER.
21785         * init.c (expand_aggr_init_1): Only check for type conversion ops
21786         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
21787         Don't check for ambiguity with constructor if NEW_OVER.
21788         * cvt.c (convert_to_reference): Dereference the result of a type
21789         conversion operator.
21790         (build_conv): Propagate ICS_USER_FLAG.
21791         (implicit_conversion): Call instantiate_type.
21792         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
21793         (add_function_candidate): Fix cv-quals on argtype.
21794         (print_z_candidates): New function.
21795         (build_new_function_call): Call it.
21796         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
21797         consider non-converting constructors.
21798         Call print_z_candidates.
21799         Return an AMBIG_CONV for an ambiguous conversion.
21800         (build_user_type_conversion): Handle AMBIG_CONV.
21801         (convert_like): Fix test for building TARGET_EXPR.
21802         Call instantiate_type.
21803         Handle AMBIG_CONV and LVALUE_CONV.
21804         (build_over_call): Handle 0 args and ellipsis.
21805         * cp-tree.def: Add AMBIG_CONV.
21806
21807 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
21808
21809         * decl.c (lookup_name_real): If we find mem in obj when parsing
21810         `obj->mem', make sure we return the right value.
21811
21812 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
21813
21814         * search.c (get_base_distance): Call complete_type.
21815
21816 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
21817
21818         * decl.c (store_bindings): Make static.
21819
21820 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
21821
21822         * init.c (expand_aggr_init_1): Don't check type conversions if
21823         NEW_OVER.
21824
21825         * cvt.c (z_candidate): Put back template field.
21826         (add_function_candidate): Set it.
21827         (add_template_candidate): Likewise.
21828         (joust): Use it.
21829         (compare_qual): Handle references and pointers to members.
21830         (compare_ics): Handle reference bindings.
21831
21832         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
21833
21834 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
21835
21836         * call.c (compute_conversion_costs): Call complete_type.
21837
21838         * tree.c (vec_binfo_member): Use comptypes instead of comparing
21839         pointers, so we can handle template parameters.
21840
21841 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
21842
21843         * cvt.c (cp_convert_to_pointer): We have to call complete_type
21844         here; let's make it explicit instead of a side effect of an
21845         error check.
21846
21847 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
21848
21849         * cvt.c (z_candidate): Remove template field.
21850         (reference_binding): Handle binding to temporary.
21851         (implicit_conversion): Likewise.
21852         (add_function_candidate): Handle artificial constructor parms.
21853         Handle functions with too few parms.
21854         (add_template_candidate): New function.
21855         (build_user_type_conversion_1): Handle constructors.
21856         (convert_like): Likewise.
21857         (build_over_call): Likewise.
21858         (build_new_function_call): Support templates.
21859         (compare_ics): Fix reference, inheritance handling.
21860
21861 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
21862
21863         * decl.c: Add signed_size_zero_node.
21864         (init_decl_processing): Build it.
21865         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
21866         when we're trying to make a negative delta.
21867
21868 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21869
21870         Stop doing this damn index==strchr variable name confusion.
21871         * class.c (add_virtual_function): Change local var INDEX to be
21872         named IDX.
21873         (add_method): Likewise.
21874         * lex.c (print_parse_statistics): Likewise.
21875         * search.c (make_memoized_table_entry): Likewise.
21876         (lookup_fnfields_here): Likewise.
21877         (lookup_field): Likewise.
21878         (lookup_fnfields): Likewise.
21879         (get_baselinks): Likewise.
21880         * sig.c (build_signature_table_constructor): Likewise.
21881         (build_signature_method_call): Likewise.
21882         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
21883         (get_member_function_from_ptrfunc): Likewise.
21884         (build_ptrmemfunc): Change local var INDEX to be IDX.
21885         (c_expand_start_case): Likewise.
21886
21887 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
21888
21889         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
21890         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
21891         (convert_to_reference): Use build_type_conversion to convert to
21892         the reference type directly.
21893         (standard_conversion): Fix void* case, non-conversions.
21894         (reference_binding): Fix expr == 0 case, non-conversions.
21895         (convert_like): Support REF_BIND.
21896         (compare_qual): Split out from compare_ics.
21897         (compare_ics): Use it, handle icses with only a qual_conv.
21898
21899         * init.c (expand_vec_init): Don't crash if decl is NULL.
21900
21901 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
21902
21903         * mpw-config.in: New file, configury for Mac MPW.
21904         * mpw-make.sed: New file, makefile editing for MPW.
21905
21906 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
21907
21908         * pt.c (instantiate_class_template): Call repo_template_used.
21909
21910         * search.c (lookup_conversions): Only lookup conversions in
21911         complete types.
21912
21913 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21914
21915         * cp-tree.def: Renamed from tree.def, to avoid confusion with
21916         gcc's tree.def.
21917         * cp-tree.h, lex.c: Include cp-tree.def.
21918         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
21919
21920 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
21921
21922         * init.c (build_vec_delete_1): Call complete_type.
21923
21924 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
21925
21926         * except.c (start_anon_func): Make sure anonymous functions are
21927         never external.
21928
21929 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
21930
21931         * decl.c (finish_function): If function_depth > 1, set nested.
21932
21933         * decl2.c (grokbitfield): Revert Bob's change.
21934         * class.c (finish_struct_1): Fix handling of named bitfield widths.
21935
21936 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
21937
21938         * pt.c (add_pending_template): Handle types.
21939         (lookup_template_class): With -fexternal-templates, just add the class
21940         to pending_templates instead of instantiating it now.
21941         * decl2.c (finish_file): Handle types in pending_templates.
21942
21943 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
21944
21945         * decl2.c (grokbitfield): Handle constant decls appropriately.
21946         Give an appropriate error message now instead of spewing core
21947         later.
21948
21949 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
21950
21951         * decl2.c: Don't turn on thunks by default for now.
21952
21953 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
21954
21955         * typeck.c (complete_type): Handle error_mark_node.
21956         (common_type, OFFSET_TYPE): Handle template_type_parms.
21957
21958 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
21959
21960         * pt.c (instantiate_decl): If at_eof, call import_export_decl
21961         regardless of DECL_INLINE.
21962
21963         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
21964
21965         * class.c (finish_struct_bits): Copy TYPE_SIZE.
21966
21967         * rtti.c (build_dynamic_cast): Support templates.
21968         * tree.def: Support DYNAMIC_CAST_EXPR.
21969         * pt.c (tsubst_copy): Likewise.
21970         * decl2.c (build_expr_from_tree): Likewise.
21971
21972 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
21973
21974         * typeck.c (build_static_cast): Support templates.
21975         (build_const_cast): Likewise.
21976         * tree.def: Support CONST/STATIC_CAST_EXPR.
21977         * pt.c (tsubst_copy): Likewise.
21978         * decl2.c (build_expr_from_tree): Likewise.
21979
21980 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
21981
21982         * decl2.c (finish_vtable_vardecl): Don't trust
21983         TREE_SYMBOL_REFERENCED for vtables of local classes.
21984
21985 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
21986
21987         * pt.c (tsubst_copy): Handle operator T.
21988
21989 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21990
21991         * init.c (build_delete): Move creation of PARMS inside test of
21992         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
21993
21994 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
21995
21996         * typeck.c (build_conditional_expr): Don't assume that
21997         the arguments to ?: are always pointers or records.
21998
21999 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
22000
22001         * decl2.c (import_export_decl): Still emit static/weak/comdat
22002         copies of inline template functions with -fno-implicit-templates.
22003
22004 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
22005
22006         * init.c (build_delete): Determine the complete basetype
22007         path to the destructor we're calling.
22008
22009 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
22010
22011         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
22012         initialize the enum, because we really and truly don't know where
22013         it came from.
22014         (start_enum): Don't copy integer_zero_node because
22015         build_enumerator will do it.
22016
22017 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
22018
22019         * decl.c (finish_function): Do access control on base destructors.
22020
22021         * pt.c (tsubst, case FUNCTION_DECL): Set up
22022         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
22023         hose us.
22024
22025 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
22026
22027         * cvt.c (build_up_reference): If we have already extended the
22028         lifetime of the temporary, don't try it again.
22029         * typeck.c (c_expand_return): Don't try and convert the return
22030         value twice when we want a reference, once is enough.
22031
22032 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
22033
22034         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
22035         LOOKUP_ONLYCONVERTING at all for now.
22036
22037         * search.c (add_conversions): Put the conversion function in
22038         TREE_VALUE, the basetype in TREE_PURPOSE.
22039         * cvt.c (build_type_conversion): Adjust.
22040         * cvt.c (build_expr_type_conversion): Adjust.
22041         * call.c (user_harshness): Adjust.
22042
22043 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
22044
22045         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
22046         backend's benefit.
22047
22048 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
22049
22050         * except.c (expand_start_catch_block): Add a dummy region, if we
22051         get an error, so that we can avoid core dumping later.
22052
22053 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
22054
22055         * cp-tree.h (OFFSET_REF): Remove.
22056         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
22057         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
22058         * init.c (expand_aggr_init_1): Likewise.
22059         (build_new): Likewise.
22060         * typeck.c (expand_target_expr): Likewise.
22061
22062 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
22063
22064         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
22065         TARGET_EXPR.
22066
22067 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
22068
22069         * cvt.c (build_up_reference): Redo how and when temporaries are
22070         created.
22071         * decl.c (grok_reference_init): Don't try and be smart about
22072         running cleanups.
22073
22074 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
22075
22076         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
22077         (TARGET_EXPR...), now that it has 4 arguments.
22078         * tree.c (build_cplus_new): Likewise.
22079
22080 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
22081
22082         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
22083
22084         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
22085         * decl.c (struct saved_scope): Remove named_labels,
22086         {base,member}_init_list.
22087         (maybe_push_to_top_level): Don't set them.  Call
22088         push_cp_function_context if appropriate.
22089         (pop_from_top_level): Likewise.
22090
22091         * method.c (do_build_assign_ref): Remove obsolete check of
22092         TYPE_HAS_ASSIGN_REF (basetype).
22093
22094         * decl.c (grokfndecl): Diagnose user definition of
22095         implicitly-declared methods.
22096
22097 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
22098
22099         * method.c (do_build_copy_constructor): Add code to give
22100         meaningful error messages instead of crashing.
22101         (do_build_assign_ref): Don't synthesize assignment operators for
22102         classes containing reference or const members.
22103
22104         * class.c (struct base_info): Remove cant_synth_copy_ctor
22105         and cant_synth_asn_ref.
22106         (finish_base_struct): Remove the code that tries to conditionalize
22107         synthesis of copy constructors & assignment operators based on
22108         access permissions.  Instead, let it fail when it tries to
22109         synthesize the copy constructor.  This will give meaningful error
22110         messages instead of silently generating code to perform a bitcopy.
22111
22112 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
22113
22114         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
22115         determining types for constant values.
22116
22117         * decl.c (struct named_label_list): Use instead of stuffing
22118         random items into a TREE_LIST node.
22119         (named_label_uses): Use the new struct.
22120         (poplevel): Likewise.
22121         (lookup_label): Likewise.
22122         (define_label): Add an error message to tell the user the line
22123         where the goto is located in addition to the destination of the
22124         goto.
22125         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
22126         named_label_uses.
22127         (finish_function): Likewise.
22128
22129         (start_decl): Complain about defining a static data member
22130         in a different type from which it was declared.
22131
22132 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
22133
22134         * cvt.c (build_expr_type_conversion): Adjust.
22135
22136 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
22137
22138         * call.c (build_method_call): Always convert 'this' to the
22139         appropriate type.
22140
22141         * search.c (add_conversions): Put the conversion function in
22142         TREE_VALUE, the type in TREE_PURPOSE.
22143         * cvt.c (build_type_conversion): Adjust.
22144         * call.c (user_harshness): Adjust.
22145
22146         * method.c (emit_thunk): Call temporary_allocation and
22147         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
22148
22149         * tree.c (build_cplus_array_type): Handle tweaking of
22150         TYPE_MAIN_VARIANT here.
22151         * typeck.c (common_type): Not here.
22152
22153         * typeck.c (complete_type): Only try to complete an array type if
22154         it has a domain.
22155
22156 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
22157
22158         * decl.c (grokvardecl): Call complete_type.
22159         (grokdeclarator): Call complete_type for PARM_DECLs.
22160
22161 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
22162
22163         * pt.c (instantiate_class_template): Re-set
22164         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
22165
22166 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
22167
22168         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
22169         smart enough to do it right.
22170         * tree.c (cp_expand_decl_cleanup): Likewise.
22171         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
22172         cp_expand_decl_cleanup.
22173         (store_parm_decls): Likewise.
22174         (hack_incomplete_structures): Likewise.
22175         * except.c (push_eh_cleanup): Likewise.
22176
22177 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
22178
22179         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
22180         frontend to the backend where it belongs.
22181         * tree.c (unsave_expr): Likewise.
22182         (unsave_expr_now): Likewise.
22183         * tree.def (UNSAVE_EXPR): Likewise.
22184         * cp-tree.h (unsave_expr): Likewise.
22185         (unsave_expr_now): Likewise.
22186
22187 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
22188
22189         * init.c (emit_base_init): Make sure the partial EH cleanups live
22190         on the function_obstack.
22191
22192 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
22193
22194         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
22195         when checking for pointer types.
22196
22197 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
22198
22199         * pt.c (instantiate_class_template): Remove obsolete check for
22200         access declarations.
22201
22202 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
22203
22204         * call.c (build_overload_call): Simplify calls to
22205         build_overload_call by removing last parameter.
22206         (build_method_call): Likewise.
22207         * cp-tree.h: Likewise.
22208         * method.c (build_opfncall): Likewise.
22209         * typeck.c (build_x_function_call): Likewise.
22210
22211 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
22212
22213         * call.c (default_parm_conversions): Factor out common code.
22214         (build_method_call): Use it.
22215         (build_overload_call_real): Use it.
22216
22217 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
22218
22219         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
22220         but pedwarn as the code is bogus.
22221         * typeck.c (decay_conversion): Likewise.
22222         (build_function_call_real): Use build_addr_func instead of
22223         default_conversion.  Don't allow pointer-to-method functions down
22224         here.
22225         (build_unary_op): Use real pointer-to-member functions instead of
22226         fake ones.
22227         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
22228         (convert_for_assignment): Removed some obsolete code.
22229         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
22230         build_x_function_call instead of current_class_ptr.  Only call
22231         digest_init once on an initializer, we do this just checking
22232         TREE_TYPE.
22233         (build_expr_from_tree): Pass current_class_ref to
22234         build_x_function_call instead of current_class_ptr.
22235         * init.c (build_member_call): Likewise.
22236         * pase.y: Likewise.
22237         * error.c (dump_expr): Handle OFFSET_REFs better.
22238         * pt.c (unify): Handle pointer-to-member functions better.
22239         * decl.c (finish_function): Clear out current_class_ref just like
22240         we do for current_class_ptr.
22241
22242         * typeck.c (get_delta_difference): Handle virtual bases better.
22243
22244 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
22245
22246         * sig.c (build_signature_table_constructor): Use the delta for
22247         the original basetype for this virtual function with thunks.
22248         (build_signature_method_call): We still need to adjust 'this'
22249         with thunks.
22250
22251 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
22252
22253         * call.c (build_addr_func): New routine.  Used to get the `real'
22254         address of a function or a method.  Needed to avoid getting a
22255         pointer-to-member function.
22256         (build_call): New routine to build CALL_EXPRs.
22257         (build_method_call): Use it.
22258         * cvt.c (convert_to_aggr): Likewise.
22259         * typeck.c (build_function_call_real): Likewise.
22260         * sig.c (build_signature_table_constructor): Use build_addr_func.
22261         * cp-tree.h (build_call, build_addr_func): Declare them.
22262
22263 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
22264
22265         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
22266         * parse.y: Remove uses of LOOKUP_AGGR.
22267
22268 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
22269
22270         * *.[chy]: Rename current_class_decl to current_class_ptr, and
22271         C_C_D to current_class_ref.
22272
22273 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
22274
22275         * call.c (convert_harshness): Tighten up pointer conversions.
22276
22277 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
22278
22279         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
22280         (finish_file): Likewise.
22281
22282 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
22283
22284         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
22285
22286         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
22287         code.
22288
22289 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
22290
22291         * decl2.c: Turn on thunks by default where supported.
22292
22293 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
22294
22295         * cp-tree.h (build_overload_call_maybe): Removed.
22296         * call.c (build_overload_call_real): Invert meaning of last arg to
22297         be require_complete.
22298         (build_overload_call): Likewise.
22299         * typeck.c (build_x_function_call): Use build_overload_call_real
22300         instead of build_overload_call_maybe.
22301
22302 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
22303
22304         * decl2.c (finish_file): Don't try to emit functions that haven't
22305         been compiled.
22306
22307 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
22308
22309         * decl2.c (finish_vtable_vardecl): Oops.
22310
22311         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
22312         Also store the bindings from previous_class_values.
22313         (pop_from_top_level): Restore them.
22314
22315 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
22316
22317         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
22318         symbol has been referenced.
22319         (finish_file): Re-join synthesis/vtable loop with inline emission
22320         loop, disable inlining when an inline is output.
22321
22322 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
22323
22324         * except.c (init_exception_processing): Setup saved_in_catch.
22325         (push_eh_cleanup): Reset __eh_in_catch.
22326         (expand_start_catch_block): Set __eh_in_catch.
22327
22328 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
22329
22330         * except.c (push_eh_cleanup): Add tracking for whether or not we
22331         have an active exception object.
22332         (expand_builtin_throw): Use it to make sure a rethrow without an
22333         exception object is caught.
22334
22335 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
22336
22337         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
22338         cache.
22339
22340 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
22341
22342         * decl2.c (finish_file): Also use sentries for vars with
22343         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
22344         created).
22345
22346         * lex.c (handle_cp_pragma): Disable #pragma
22347         interface/implementation if SUPPORTS_ONE_ONLY > 1.
22348
22349 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
22350
22351         * method.c (emit_thunk): Wrap default case in
22352         temporary/permanent_allocation.
22353
22354         * method.c (make_thunk): Use DECL_ONE_ONLY.
22355         (emit_thunk): Call assemble_end_function.
22356
22357 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
22358
22359         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
22360         (import_export_decl): Likewise.
22361         (finish_prevtable_vardecl): Disable vtable hack if
22362         SUPPORTS_ONE_ONLY > 1.
22363
22364 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
22365
22366         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
22367         PREDECREMENT_EXPRs take two arguments, not one.
22368
22369 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
22370
22371         * class.c (build_vtable_entry): Don't build thunks for abstract
22372         virtuals.
22373
22374         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
22375         frontend.
22376
22377 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
22378
22379         * class.c (set_rtti_entry): Use size_zero_node.
22380         (build_vtable): Likewise.
22381
22382 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
22383
22384         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
22385         (prepare_fresh_vtable): Likewise.
22386
22387 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
22388
22389         * method.c (emit_thunk): Call mark_used on the target function.
22390
22391         * call.c (build_method_call): Don't warn about pending templates.
22392
22393 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
22394
22395         * decl2.c (finish_file): Fix list walking logic.
22396
22397         * typeck2.c (check_for_new_type): Only warn if -pedantic.
22398
22399 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
22400
22401         * class.c (finish_struct_1): Remove old code for
22402         dont_allow_type_definitions.
22403         * cp-tree.h: Likewise.
22404         * spew.c: Make sure cp-tree.h is included before parse.h, so the
22405         definition of flagged_type_tree is found before it is used.
22406         * lex.c: Likewise.
22407         * parse.y: Added the ftype member to the type union, and changed a
22408         number of rules to use it instead of ttype.  Added calls to
22409         check_for_new_type() as appropriate.
22410         * typeck2.c (check_for_new_type): New function for checking
22411         if a newly defined type appears in the specified tree.
22412         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
22413         for check_for_new_type().
22414
22415 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
22416
22417         * decl2.c (finish_file): Only use a sentry if the decl is public.
22418
22419         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
22420         don't pass LOOKUP_ONLYCONVERTING.
22421
22422 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
22423
22424         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
22425         properly keeps track of const and volatile type modifiers.
22426
22427 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
22428
22429         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
22430         * pt.c (comp_template_args): Use it.
22431
22432         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
22433         assemble_external for artificial function decls.
22434
22435         * decl.c (cp_finish_decl): Oops.
22436
22437 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
22438
22439         * decl2.c (import_export_decl): Put static data member templates
22440         into common storage, or make them weak, depending on whether they
22441         are dynamically or statically initialized.
22442         (get_sentry): New function.
22443         (finish_file): Do import_export_decl for static data members before
22444         building the init/fini functions.  Don't init/fini a variable that's
22445         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
22446         push/pop_temp_slots.
22447         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
22448         expand_static_init thang.
22449         * method.c (get_id_2): New function.
22450
22451 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
22452
22453         * parse.y (empty_parms): Make sure we use C++-style prototypes
22454         when we're declaring member functions.
22455
22456 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
22457
22458         * Makefile.in (CONFLICTS): 16 s/r conflicts.
22459         * parse.y (self_template_type): New nonterminal.
22460
22461 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
22462
22463         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
22464         name.
22465         * parse.y (base_class.1): Allow 'typename foo::bar'.
22466
22467         * lex.c (check_newline): Remove #pragma code that plays with the
22468         input stream, since we now deal with tokens.  Clear nextchar when
22469         we're done.
22470         (handle_cp_pragma): Use real_yylex.
22471         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
22472         in one place.
22473
22474         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
22475
22476         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
22477
22478 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
22479
22480         * parse.y: New token SELFNAME for potential constructor.
22481         * spew.c (yylex): Handle it.
22482         * lex.c (identifier_type): Produce it.
22483
22484         * parse.y (complete_type_name): In :: case, don't push class binding.
22485         (complex_type_name): Likewise.
22486
22487 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
22488
22489         * typeck.c (build_reinterpret_cast): Handle pointer to member
22490         functions.
22491
22492 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22493
22494         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
22495         pragmas.
22496         (check_newline): Put the vtable/unit/implementation/interface pragma
22497         code into handle_cp_pragma, replacing it with a call.
22498         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
22499         args.  Get the next token after handling the pragma token.
22500
22501 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
22502
22503         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
22504         (convert_to_pointer_force): Likewise.
22505
22506         * init.c (build_new): Fix array new without -fcheck-new.
22507
22508 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
22509
22510         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
22511         tree.c: Lose TYPE_NESTED_NAME.
22512
22513         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
22514         as identifiers.
22515
22516         * tree.def: Add VEC_INIT_EXPR.
22517         * expr.c (cplus_expand_expr): Handle it.
22518         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
22519         the extra file-scope symbol nastiness.
22520
22521 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
22522
22523         * method.c (make_thunk): Thunks are static.
22524         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
22525
22526         * decl2.c (mark_vtable_entries): Emit thunks as needed.
22527         (finish_file): Don't emit them here.
22528
22529 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
22530
22531         * rtti.c (build_dynamic_cast): Handle null pointers.
22532         (ifnonnull): New function.
22533
22534 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
22535
22536         * call.c (build_method_call): Remember the original basetype we
22537         were called with.  Give an error message instead of trying
22538         (incorrectly) to call a non-static member function through a
22539         non-inherited class.
22540
22541         * search.c (expand_upcast_fixups): Mark the new fixup as
22542         DECL_ARTIFICIAL.
22543
22544 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
22545
22546         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
22547
22548         * class.c (set_rtti_entry): Fix for thunks.
22549
22550         * decl2.c (import_export_decl): Still emit typeinfo fns for
22551         cv-variants of builtin types.
22552
22553         * rtti.c (expand_class_desc): Set up base_info_type_node here.
22554         (init_rtti_processing): Instead of here.
22555
22556 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
22557
22558         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
22559         (build_typeid): Only complain about taking dynamic typeid without
22560         -frtti.
22561
22562         * decl2.c: flag_rtti defaults to 1.
22563
22564         * rtti.c (get_tinfo_var): The general class case is now smaller.
22565         (init_rtti_processing): Pack the latter three fields of base_info
22566         into 32 bits.
22567
22568 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
22569
22570         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
22571
22572 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
22573
22574         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
22575         (push_memoized_context): Split out code to undefer pop_type_level to
22576         (clear_memoized_cache): here.
22577         (pop_memoized_context): We can only handle one layer of deferral of
22578         pop_type_level so clear the cache, if there was a previous level.
22579
22580 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
22581
22582         * rtti.c (init_rtti_processing): Build up base_info_type_node.
22583         (expand_class_desc): Use one pointer to an array of base_info
22584         structs, passed using a CONSTRUCTOR.
22585
22586 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
22587
22588         * class.c (build_vbase_path): Remove block extern for
22589         flag_assume_nonnull_objects here.
22590         (build_vfn_ref): Split out functionality into build_vtbl_ref.
22591         (build_vtbl_ref): New routine.
22592         (build_vtable): Set up rtti info here.
22593         (add_virtual_function): Note in CLASSTYPE_RTTI the best
22594         place where we can get the rtti pointers from to avoid having to
22595         search around for a place.
22596         (finish_base_struct): Likewise.
22597         (finish_struct_1): Likewise.  Never create totally new vtables
22598         with totally new vtable pointers for rtti.  Disable code to layout
22599         vtable pointers better until we want to break binary
22600         compatibility.
22601         * rtti.c (build_headof_sub): New routine to convert down to a
22602         sub-object that has an rtti pointer in the vtable.
22603         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
22604         maintainable.
22605         (build_dynamic_cast): Make sure we have saved it, if we need to.
22606         * search.c (dfs_init_vbase_pointers): Disable code that deals with
22607         a more efficient vtable layout, enable later.
22608         * call.c (flag_assume_nonnull_objects): Moved declaration to
22609         * cp-tree.h: here.  Declare build_vtbl_ref.
22610         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
22611         function calls that want a tree.
22612
22613 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
22614
22615         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
22616         other X subobjects in the most derived type.  Ack.
22617
22618         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
22619         get_typeid will do it for us.
22620         (get_typeid_1): Break out call-building for expand_*_desc to use.
22621         (get_typeid): Call it.
22622         (expand_*_desc): Likewise.
22623         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
22624         and void *.
22625         (init_decl_processing): Lose builtin_type_tdescs lossage.
22626         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
22627
22628 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
22629
22630         * pt.c (tsubst): When calling set_nested_typename, use
22631         TYPE_NESTED_NAME (current_class_type) instead of
22632         current_class_name.
22633
22634         * decl.c (pushdecl): Likewise.
22635         (pushdecl_class_level): Likewise.
22636         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
22637         set_nested_typename.
22638
22639 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
22640
22641         * rtti.c (synthesize_tinfo_fn): Handle arrays.
22642
22643         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
22644
22645 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
22646
22647         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
22648         (init_rtti_processing): Lose bad_cast_type.
22649         (build_dynamic_cast): Use throw_bad_cast.
22650
22651         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
22652
22653         * decl2.c (finish_file): Don't synthesize artificial functions
22654         that are external and not inline.
22655
22656         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
22657
22658         * decl2.c (finish_file): Handle having new inlines added to
22659         saved_inlines by synthesis.
22660
22661         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
22662
22663 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
22664
22665         RTTI rewrite to initialize nodes as needed, not require that
22666         users #include <typeinfo>, complete functionality and reduce wasted
22667         space.
22668         * rtti.c (init_rtti_processing): New fn.
22669         (build_typeid): The vtable entry is now a function.
22670         (get_tinfo_var): New fn.
22671         (get_tinfo_fn): Likewise.
22672         (get_typeid): Use it.
22673         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
22674         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
22675         points __rtti_*.
22676         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
22677         (synthesize_tinfo_fn): New fn.
22678         * method.c (build_t_desc_overload): Lose.
22679         (build_overload_with_type): More generic.
22680         * decl.c (init_decl_processing): Call init_rtti_processing.
22681         * class.c (set_rtti_entry): Use get_tinfo_fn.
22682         * decl2.c (mark_vtable_entries): Mark the rtti function.
22683         (finish_prevtable_vardecl): Don't build_t_desc.
22684         (import_export_decl): Handle tinfo functions.
22685         (finish_file): Likewise.
22686         * typeck.c (inline_conversion): New fn.
22687         (build_function_call_real): Use it.
22688         * cp-tree.h: Add decls.
22689
22690         * method.c (hack_identifier): Also convert component_refs from
22691         references.
22692
22693         * lex.c (cons_up_default_function): Use the type, not the name, in
22694         declspecs.
22695
22696         * decl2.c (import_export_vtable): Fix weak vtables.
22697
22698 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
22699
22700         * search.c (get_base_distance_recursive): Fix access checks for
22701         protected bases.
22702
22703 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22704
22705         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
22706         cp-tree.h.
22707         (convert_harshness): Add prototypes wrapped by PROTO.
22708         * decl2.c (grok_function_init): Likewise.
22709         (do_toplevel_using_decl): Change to void return type.
22710         * class.c (build_vtable_entry): Remove decl of make_thunk.
22711         (merge_overrides): Fix order of arg definitions.
22712         (finish_vtbls): Likewise.
22713         (fixup_vtable_deltas): Likewise.
22714         (modify_all_direct_vtables): Likewise.
22715         (modify_all_indirect_vtables): Likewise.
22716         * search.c (get_base_distance_recursive): Likewise.
22717         (get_abstract_virtuals_1): Likewise.
22718         (fixup_virtual_upcast_offsets): Likewise.
22719         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
22720         * init.c (perform_member_init): Fix order of arg definitions.
22721         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
22722         * cp-tree.h (make_thunk): Add decl.
22723         (overload_template_name, push_template_decl): Add decls.
22724         (do_toplevel_using_decl): Change to void return type.
22725         (vec_binfo_member): Add decl.
22726
22727 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22728
22729         * typeck.c (mark_addressable, convert_for_assignment,
22730         convert_for_initialization, pointer_int_sum, pointer_diff,
22731         unary_complex_lvalue): Add prototypes wrapped by PROTO.
22732         (convert_sequence): #if 0 fn decl, since definition also is.
22733
22734 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
22735
22736         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
22737         cast to pointer types for type searching.
22738
22739 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22740
22741         * typeck.c (get_delta_difference): Use cp_error, not error, in the
22742         case where BINFO == 0.
22743
22744 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
22745
22746         * call.c (build_method_call): Fix wording of error messages so
22747         constructors come out right.
22748
22749 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
22750
22751         * decl.c (push_overloaded_decl): Don't warn about hidden
22752         constructors when both the type and the function are declared
22753         in a system header file.
22754
22755 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
22756
22757         * class.c (finish_struct_1): Propagate the TYPE_PACKED
22758         flag for the type to the type's fields.
22759
22760 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22761
22762         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
22763
22764 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
22765
22766         * class.c (base_info, finish_base_struct): Replace
22767         needs_virtual_dtor with base_has_virtual.
22768
22769         (finish_struct_1): Remove the old code that tried to make default
22770         destructors virtual.  Use base_has_virtual when checking if we need
22771         to add a vtable entry for the rtti code.
22772
22773 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
22774
22775         * pt.c (push_template_decl): Complain about template decl with
22776         inappropriate declaration.
22777
22778 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
22779
22780         * typeck.c (build_x_unary_op): Remove bogus check for taking
22781         the address of a member function.
22782
22783 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
22784
22785         * parse.y (constructor_declarator): Only push the class if
22786         we are not already in the class.
22787
22788 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
22789
22790         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
22791         Add additional argument to INIT_CUMULATIVE_ARGS.
22792
22793 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
22794
22795         * decl.c (shadow_tag): Fix error about anon union with methods.
22796
22797         * parse.y (self_reference): Only generate a self-reference if this
22798         is a non-template class.
22799         (opt.component_decl_list): Only use it if it was generated.
22800
22801         * parse.y (component_decl_1): Use constructor_declarator.
22802         (fn.def2): Likewise.
22803         (notype_component_declarator0): Likewise.
22804
22805 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
22806
22807         * typeck.c (build_x_unary_op): Add checks for taking the address
22808         of a TARGET_EXPR or of a member function, and give appropriate
22809         warnings.
22810
22811 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
22812
22813         * pt.c (process_template_parm): Allow template type parms to be
22814         used as types for template const parms.
22815
22816 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
22817
22818         * init.c (expand_vec_init): Ensure the eh cleanups are on the
22819         function_obstack.
22820
22821 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
22822
22823         * decl.c (lookup_name_real): Be even more picky about the
22824         ambiguous lookup warning.
22825         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
22826         * parse.y (constructor_declarator): Rather than here.
22827
22828         * parse.y (constructor_declarator): New nonterminal.
22829         (fn.def1): Use it.
22830         (explicit_instantiation): Likewise.
22831
22832 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
22833
22834         Add implicit declaration of class name at class scope.
22835         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
22836         * parse.y (self_reference): New nonterminal.
22837         (opt.component_decl_list): Use it.
22838         (fn.def1): Add nested_name_specifier type_name cases.
22839         * class.c (build_self_reference): New function.
22840         (finish_struct): Handle access_default later, move self-reference
22841         decl to the end.
22842         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
22843         * cp-tree.h: Adjust.
22844
22845         * pt.c (do_function_instantiation): Separate handling of member
22846         functions and non-member functions properly.
22847
22848 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
22849
22850         * pt.c (process_template_parm): Improve error for 'volatile class K'.
22851
22852         * class.c (finish_struct_1): Check the right slot for destructors.
22853
22854         * decl.c (start_enum): Complain about enum templates.
22855
22856 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
22857
22858         * init.c (resolve_offset_ref): Offset pointers to member data by one.
22859         * typeck.c (unary_complex_lvalue): Likewise.
22860
22861 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
22862
22863         * typeck.c (c_expand_return): Check for a returned local
22864         array name, similar to the check for an ADDR_EXPR.
22865
22866 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
22867
22868         * decl.c (cp_finish_decl): Don't build cleanups for static
22869         variables here.
22870
22871 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
22872
22873         * typeck.c (build_modify_expr): Fix error messages to be more
22874         accurate.
22875         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
22876         assignment operators.
22877         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
22878         assignment operators.
22879
22880 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
22881
22882         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
22883         give an error if initialized.  pedwarn about nested type with the
22884         same name as its enclosing class.
22885
22886         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
22887
22888         * typeck.c (require_complete_type): Be sure to instantiate the
22889         MAIN_VARIANT of the type.
22890
22891         * decl2.c (finish_file): Instantiate pending templates before
22892         processing static constructors and destructors.
22893
22894         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
22895         unless at_eof.
22896
22897 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
22898
22899         * decl2.c (delete_sanity): If error_mark_node is passed
22900         in as an expression, quit while we're ahead.
22901
22902         * decl.c (grokdeclarator): Give an error message if `friend'
22903         is combined with any storage class specifiers.
22904
22905 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
22906
22907         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
22908         definition of nonexistent nested type.
22909
22910         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
22911         not to say 'typedef'.
22912
22913 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22914
22915         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
22916         * search.c (dfs_walk, dfs_init_vbase_pointers,
22917         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
22918         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
22919
22920 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
22921
22922         * except.c (build_throw): Support minimal parse.
22923         * pt.c (tsubst_copy): Support THROW_EXPR.
22924         * decl2.c (build_expr_from_tree): Likewise.
22925
22926         * pt.c (mangle_class_name_for_template): Always allocate
22927         scratch_firstobj.
22928
22929 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
22930
22931         * cvt.c (cp_convert_to_pointer): Give an appropriate error
22932         when trying to cast from an incomplete type.
22933
22934 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
22935
22936         * pt.c (instantiate_class_template): Don't bother setting up
22937         CLASSTYPE_TAGS explicitly, as the nested types will add
22938         themselves.
22939
22940 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
22941
22942         * decl.c (shadow_tag): Remove old error check for usage of
22943         an enum without a previous declaration.
22944         (xref_tag): Add error message about usage of enums without a
22945         previous declaration.
22946
22947 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
22948
22949         * lex.c (do_identifier): Only do name consistency check if we're
22950         parsing.
22951
22952         * pt.c (push_template_decl): Don't crash if we get a member defn
22953         that doesn't match.
22954
22955         * decl.c (xref_tag_from_type): New function to do an xref without
22956         always having to figure out code_type_node.
22957         * cp-tree.h: Declare it.
22958         * pt.c (instantiate_class_template): Use it for friend classes.
22959         (lookup_template_class): Use it.
22960
22961         * typeck2.c (build_functional_cast): Pull out a single parm before
22962         passing it to build_c_cast.
22963
22964 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
22965
22966         * expr.c (do_case): Give an error message if a pointer is
22967         given as a case value.
22968
22969 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
22970
22971         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
22972         an overload list.
22973
22974         * lex.c (cons_up_default_function): Really, now, interface hackery
22975         does not apply to synthesized methods.
22976
22977 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
22978
22979         * call.c (build_method_call): Ctors and dtors now have special names
22980         with respect to lookups.
22981         * class.c (add_method): Likewise.
22982         (grow_method): Likewise.
22983         (finish_struct_methods): Likewise.
22984         (warn_hidden): Likewise.
22985         (finish_struct_1): Likewise.
22986         * cvt.c (convert_to_reference): Likewise.
22987         (convert_to_aggr): Likewise.
22988         (cp_convert): Likewise.
22989         * decl2.c (check_classfn): Likewise.
22990         * init.c (expand_member_init): Likewise.
22991         (expand_default_init): Likewise.
22992         (expand_aggr_init_1): Likewise.
22993         (build_offset_ref): Likewise.
22994         (build_new): Likewise.
22995         (build_delete): Likewise.
22996         * lex.c (do_inline_function_hair): Likewise.
22997         * search.c (lookup_field_1): Likewise.
22998         (lookup_fnfields_here): Likewise.
22999         (lookup_field): Likewise.
23000         (lookup_fnfields): Likewise.
23001         (get_virtual_destructor): Likewise.
23002         (dfs_debug_mark): Likewise.
23003         (dfs_pushdecls): Likewise.
23004         (dfs_compress_decls): Likewise.
23005         * tree.c (layout_basetypes): Likewise.
23006         * typeck.c (build_component_ref): Likewise.
23007         (build_x_function_call): Likewise.
23008         (build_modify_expr): Likewise.
23009         (convert_for_initialization): Likewise.
23010         (build_functional_cast): Likewise.
23011         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
23012         (CTOR_NAME): New.
23013         (DTOR_NAME): New.
23014         * decl.c (ctor_identifier): New.
23015         (dtor_identifier): New.
23016         (init_decl_processing): Set them.
23017
23018 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
23019
23020         * typeck.c (build_component_ref): Don't get confused by fields whose
23021         context has no type name, like pointer to member functions.
23022
23023 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
23024
23025         * decl.c (grokdeclarator): Handle typedef without declarator.
23026
23027         * pt.c (tsubst): Handle SCOPE_REF in declarator.
23028
23029         * parse.y (bad_parm): Catch another case of missing `typename'.
23030
23031         * lex.c (yyprint): Handle TYPE_DECLs.
23032
23033         * decl.c (start_function): Don't try to be clever.
23034
23035         * lex.c: Lose compiler_error_with_decl.
23036         * typeck2.c: Lose error_with_aggr_type.
23037         (incomplete_type_error): Use cp_* instead of old functions.
23038         (readonly_error): Likewise.
23039         * typeck.c (convert_arguments): Likewise.
23040         * search.c (lookup_nested_field): Likewise.
23041         * method.c (make_thunk): Likewise.
23042         * decl.c (grokparms): Likewise.
23043         * cp-tree.h: Update.
23044
23045         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
23046         and value.
23047
23048 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
23049
23050         * method.c (build_opfncall): When deleting a pointer to an
23051         array, build a new pointer to the tree past any ARRAY_TYPE
23052         nodes.
23053
23054 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23055
23056         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
23057
23058 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
23059
23060         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
23061         and ! DECL_INLINE.
23062
23063         * decl.c (finish_function): Don't set nested based on
23064         hack_decl_function_context.
23065         * parse.y (function_try_block): Check for nested function.
23066         (pending_inlines): Likewise.
23067
23068         * decl2.c (build_expr_from_tree): If a unary op already has a
23069         type, just return it.
23070
23071         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
23072
23073         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
23074         (finish_file): Check the return value of walk_vtables.
23075         (finish_prevtable_vardecl): Return int.
23076         (finish_vtable_vardecl): Likewise.
23077         (prune_vtable_vardecl): Likewise.
23078         * lex.c (set_vardecl_interface_info): Likewise.
23079         * cp-tree.h: Adjust return types.
23080
23081         * class.c (delete_duplicate_fields_1): Don't complain about
23082         duplicate nested types if they're the same type.
23083         (finish_struct): Remove check for duplicate.
23084         * decl2.c (grokfield): Don't check for typedef of anonymous type.
23085
23086 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
23087
23088         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
23089
23090         * decl.c (grokdeclarator): Lose special handling of class-level
23091         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
23092         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
23093
23094         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
23095
23096         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
23097
23098         * search.c (compute_access): Fix handling of anonymous union
23099         members.
23100         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
23101         from anonymous unions to their members.
23102
23103         * typeck.c (build_x_function_call): For static member functions,
23104         hand off to build_member_call.
23105
23106 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
23107
23108         * typeck.c (build_component_ref): Handle OFFSET_REFs.
23109
23110         * init.c (expand_vec_init): Fix init == 0 case.
23111
23112 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
23113
23114         * init.c (build_new): pedwarn about init and array new.
23115         (expand_vec_init): Handle lists, use convert_for_initialization.
23116
23117         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
23118         when converting to an aggregate type.
23119         * cvt.c (cp_convert): Pass it through.
23120
23121         * typeck.c (build_conditional_expr): Handle user-defined
23122         conversions to slightly different types.
23123
23124         * decl.c (grokdeclarator): Force an array type in a parm to be
23125         permanent.
23126
23127         * decl2.c (do_using_directive): Sorry.
23128         (do_namespace_alias): Likewise.
23129         * lex.c (real_yylex): Warn about using the `namespace' keyword.
23130
23131 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
23132
23133         * parse.y (datadef): Move call to note_list_got_semicolon up.
23134
23135 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
23136
23137         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
23138
23139 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
23140
23141         * decl.c (cp_finish_decl): The exception regions have to be
23142         nested, not overlapping.  We start the exception region for a
23143         decl, after it has been fully built, and all temporaries for it
23144         have been cleaned up.
23145
23146 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
23147
23148         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
23149
23150 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
23151
23152         * tree.def: Add RETURN_INIT.
23153         * pt.c (instantiate_decl): Handle RETURN_INIT.
23154         * decl.c (store_return_init): Handle minimal_parse_mode.
23155
23156         * tree.c (cp_build_type_variant): Just return an error_mark_node.
23157         * decl.c (make_typename_type): Don't try to get the file and line
23158         of an identifier.
23159         * typeck.c (comptypes): Handle TYPENAME_TYPE.
23160
23161 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
23162
23163         * decl.c (poplevel): Make sure we clear out and restore old local
23164         non-VAR_DECL values by default when they go out of scope.
23165
23166 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
23167
23168         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
23169         referring to addresses of variables and functions.
23170
23171         * error.c (dump_expr): Support SIZEOF_EXPR.
23172
23173         * init.c (do_friend): Use the return value of check_classfn.
23174
23175         * typeck.c (convert_arguments): Call complete_type.
23176
23177         * method.c (hack_identifier): After giving an error, set value to
23178         error_mark_node.
23179
23180 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
23181
23182         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
23183         lossage for local classes.
23184         * cp-tree.h: Declare it.
23185         * decl.c (lookup_name_real): Evil, painful hack for local classes.
23186         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
23187         Use hack_decl_function_context.
23188         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
23189         (start_function): Use hack_decl_function_context.
23190         (finish_function): Likewise.
23191         * method.c (synthesize_method): Likewise.
23192         * lex.c (process_next_inline): Likewise.
23193         (do_pending_inlines): Likewise.
23194         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
23195         done with it.
23196
23197 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
23198
23199         * sig.c (build_signature_pointer_or_reference_type): Align
23200         signature pointers/references on 8-byte boundaries so they can be
23201         grabbed 2 words at a time on a Sparc.
23202
23203 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
23204
23205         * method.c (hack_identifier): Requiring a static chain is now a
23206         hard error.
23207         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
23208         functions.
23209
23210 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
23211
23212         * init.c (build_offset_ref): Call complete_type.
23213
23214         * decl.c (pop_from_top_level): Always pop previous_class_type.
23215
23216         * parse.y: Handle multiple decls in a for-init-statement.
23217         * pt.c (tsubst_expr): Likewise.
23218
23219         * pt.c (tsubst): Use tsubst_expr for the second operand of an
23220         ARRAY_REF.
23221
23222         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
23223         (poplevel_class): Set it here.
23224         (pop_from_top_level): Pop it here if we're returning to class scope.
23225         * class.c (pushclass): Don't set it here.
23226
23227         * decl.c (maybe_push_to_top_level): Save current_template_parms,
23228         and clear it if !pseudo.
23229         (pop_from_top_level): Restore it.
23230
23231         * decl2.c (finish_file): Push the dummy each time we walk the list
23232         of vtables.
23233
23234         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
23235         something for CAST_EXPR.
23236
23237 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
23238
23239         * cvt.c (cp_convert): Warn about implicit conversion of the
23240         address of a function to bool, as it is always true.
23241
23242 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
23243
23244         * typeck.c (c_expand_return): Fix warning for local externs returned.
23245
23246 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
23247
23248         * tree.c (mapcar): Propagate const and volatile properly.
23249
23250         * typeck.c (complete_type): Be sure to instantiate the
23251         MAIN_VARIANT of the type.
23252
23253         * method.c (synthesize_method): Class interface hackery does not
23254         apply to synthesized methods.
23255
23256 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
23257
23258         * pt.c (comp_template_args): Use comptypes rather than just
23259         checking for TEMPLATE_TYPE_PARM equivalence.
23260
23261         * typeck.c (build_x_function_call): Call complete_type before
23262         checking TYPE_OVERLOADS_CALL_EXPR.
23263
23264 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
23265
23266         * g++.c (main): Check also for new define ALT_LIBM.
23267
23268 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
23269
23270         * pt.c (instantiate_class_template): If we don't have a pattern
23271         yet, that's OK.
23272         (coerce_template_parms): If we see a local class, bail.
23273
23274         * decl.c (grok_reference_init): Make sure there's a type before
23275         checking its code.
23276
23277         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
23278         (push_template_decl): Likewise.
23279
23280         * parse.y (named_class_head): Set
23281         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
23282
23283         * decl.c (xref_tag): Diagnose redeclaration of template
23284         type-parameter name.
23285
23286         * error.c (dump_type): Handle anonymous template type parms.
23287
23288         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
23289         TYPE_STUB_DECL.
23290         (coerce_template_parms): Likewise.
23291
23292 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
23293
23294         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
23295         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
23296
23297 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
23298
23299         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
23300         before trying to get its STUB_DECL.
23301         (coerce_template_parms): Likewise.
23302
23303         * parse.y (template_type_parm): If they didn't use 'class',
23304         pretend they did after giving an error.
23305
23306         * pt.c (coerce_template_parms): Diagnose use of local class.
23307
23308         * decl.c (grok_reference_init): Use instantiate_type.
23309
23310         * error.c (dump_expr): Handle TEMPLATE_DECLs.
23311
23312         * parse.y (named_class_head): Diagnose mismatching types and tags.
23313
23314         * decl.c (pushdecl): Type decls and class templates clash with
23315         artificial type decls, not hide them.
23316
23317         * decl.c (redeclaration_error_message): Diagnose redefinition of
23318         templates properly.
23319         (duplicate_decls): Diagnose disallowed overloads for template
23320         functions, too.
23321
23322         * decl.c (start_decl): Call complete_type before checking for a
23323         destructor.
23324
23325         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
23326
23327         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
23328
23329 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
23330
23331         * decl.c (grok_op_properties): Don't check for operator++(int) in
23332         a template.
23333
23334         * tree.c (perm_manip): Return a copy of variable and function
23335         decls with external linkage.
23336
23337         * tree.def: Change some of the min tree codes to type "1".
23338         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
23339         * method.c (build_overload_int): Emit something arbitrary for
23340         anything but an INTEGER_CST if we're in a template.
23341
23342         * decl.c (cp_finish_decl): Call complete_type before deciding
23343         whether or not to lay out the decl.
23344
23345         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
23346
23347 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
23348
23349         * typeck2.c (build_x_arrow): Call complete_type.
23350
23351         * pt.c (add_pending_template): Broken out.
23352         (lookup_template_class): If -fexternal-templates, call it for all
23353         the methods of implemented types.
23354         (instantiate_class_template): Instead of instantiating them here.
23355         (instantiate_decl): Handle -fexternal-templates earlier.
23356
23357 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23358
23359         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
23360         memoized lookup stuff inside GATHER_STATISTICS.
23361
23362 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
23363
23364         * decl.c (start_decl): Complain about array of incomplete type
23365         here.
23366         (grokdeclarator): Not here.
23367
23368         * parse.y (template_parm): Expand full_parm inline so we can set
23369         the rule's precedence.
23370
23371         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
23372         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
23373         * decl2.c (grokbitfield): Don't check for integer constant here.
23374         * class.c (finish_struct_1): Check here.
23375
23376         * decl.c (define_label): Make the min decl go on permanent_obstack.
23377
23378         * pt.c (unify): Don't handle CONST_DECLs.
23379         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
23380         (tsubst_copy): Likewise.
23381
23382         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
23383         CONST_DECL for a template parm.
23384
23385 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
23386
23387         * decl.c (grokdeclarator): Complain about array of incomplete type
23388         here.
23389         (start_decl_1): Not here.
23390
23391         * pt.c (tsubst): Handle pointer-to-function declarators.
23392
23393         * method.c (hack_identifier): If pedantic, diagnose local class
23394         methods that require a static chain.
23395
23396         * decl.c (grok_op_properties): No longer static.
23397         * cp-tree.h: Declare it.
23398         * pt.c (tsubst): Call it for operators.
23399         Use tsubst_copy for TREE_VECs.
23400
23401         * parse.y (template_arg): The expr has precedence like '>'.
23402
23403 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
23404
23405         * pt.c (coerce_template_parms): Don't coerce an expression using
23406         template parms.
23407         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
23408         (tsubst): Don't use build_index_2_type if the max_value uses template
23409         parms.
23410         * method.c (build_overload_int): Emit something arbitrary for an
23411         expression using template parms.
23412
23413         * parse.y (template_close_bracket): New non-terminal to catch use
23414         of '>>' instead of '> >' in template class names.
23415         (template_type): Use it.
23416         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
23417
23418         * tree.def: Add CAST_EXPR.
23419         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
23420         CONVERT_EXPR for minimal_parse_mode.
23421         * typeck.c (build_c_cast): Likewise.
23422         * pt.c (tsubst_copy): Likewise.
23423         * decl2.c (build_expr_from_tree): Likewise.
23424         * error.c (dump_expr): Likewise.
23425
23426 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23427
23428         * except.c (SetTerminate, SetUnexpected): Put back global vars.
23429         (init_exception_processing): Put back decl/init of
23430         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
23431         fns from libstdc++.
23432
23433         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
23434         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
23435         Delete unused fns.
23436         * cp-tree.h (declare_uninstantiated_type_level,
23437         uninstantiated_type_level_p): Delete prototypes.
23438
23439 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
23440
23441         * pt.c (tsubst_expr): Add default return.
23442
23443 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23444
23445         * error.c (fndecl_as_string): Delete unused arg CNAME.
23446         * sig.c (build_signature_table_constructor,
23447         build_signature_method_call): Fix calls.
23448
23449         * class.c (the_null_vtable_entry): Delete var definition.
23450         (init_class_processing): Delete tree the_null_vtable_entry init.
23451         * decl.c (no_print_{functions, builtins}): Declare as static.
23452         (__tp_desc_type_node): #if 0 var definition.
23453         (init_type_desc): #if 0 init of __tp_desc_type_node.
23454         (vb_off_identifier): Move var decl into init_decl_processing.
23455         (current_function_assigns_this): Declare as static.
23456         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
23457         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
23458         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
23459         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
23460         * init.c (BI_header_type, BI_header_size): Declare as static.
23461         * pt.c (template_classes): Delete unused var.
23462         (add_pending_template): Delete decl for non-existent fn.
23463         (lookup_template_class): Delete vars CODE and TAG_CODE.
23464         (instantiate_template): Delete unused var TARGS.
23465         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
23466         Delete decls.
23467         (__tp_desc_type_node): #if 0 var decl.
23468         (fndecl_as_string): Fix prototype.
23469
23470 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
23471
23472         * tree.def: Add GOTO_STMT.
23473         * pt.c (tsubst_expr): Support goto and labels.
23474         * decl.c (define_label): Support minimal parsing.
23475         * parse.y (simple_stmt): Likewise.
23476
23477 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23478
23479         * xref.c (GNU_xref_member): Only define/set var I if
23480         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
23481         used.
23482         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
23483         (GNU_xref_end): Fix call.
23484         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
23485         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
23486
23487         * tree.c (build_exception_variant): Delete unused vars I, A, T,
23488         T2, and CNAME.
23489         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
23490         (mapcar): Delete unused var CODE.
23491         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
23492         (break_out_cleanups): Fix call.
23493         (bot_manip): Likewise.
23494         * call.c (build_method_call): Likewise.
23495         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
23496         Likewise.
23497         * typeck.c (unary_complex_lvalue, build_modify_expr,
23498         convert_for_initialization): Likewise.
23499         * typeck2.c (build_functional_cast): Likewise.
23500         * cp-tree.h (build_cplus_new): Fix prototype.
23501
23502         * repo.c (open_repo_file): Delete unused var Q.
23503         (repo_compile_flags, repo_template_declared,
23504         repo_template_defined, repo_class_defined, repo_inline_used,
23505         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
23506         (repo_get_id, repo_vtable_used): Declare as static.
23507         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
23508         prototypes.
23509
23510 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
23511
23512         * parse.y (pending_inlines): Add function_try_block case.
23513
23514         * pt.c (unify): Fix for template const parms.
23515
23516 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23517
23518         * lex.c (extract_interface_info): Delete forward decl.
23519         (default_copy_constructor_body, default_assign_ref_body): Delete
23520         decls for non-existent functions.
23521         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
23522         (init_lex): Delete setting them.
23523         (cons_up_default_function): Delete unused vars FUNC_BUF,
23524         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
23525         #if 0'd synth code.
23526         (toplevel, expression_obstack): Delete unused extern decls.
23527         (tree_node_kind): Delete unused enum.
23528         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
23529         GATHER_STATISTICS.
23530         (tree_node_kind_names): Delete unused extern decl.
23531         (synth_obstack): Delete unused var.
23532         (init_lex): Don't set it.
23533         (init_parse): Add decl before use.
23534         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
23535         (current_unit_{name, language}): Delete unused vars.
23536         (check_newline): Don't bother setting them, just accept the #pragma.
23537         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
23538         (current_unit_{name, language}): Delete decls.
23539
23540         * search.c: Wrap all of the memoized functions, macros, and
23541         variables inside #ifdef GATHER_STATISTICS.
23542         (lookup_field, lookup_fnfields): Likewise.
23543         (init_search_processing): Likewise.
23544         (reinit_search_statistics): Wrap whole function.
23545         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
23546
23547         * decl.c (finish_function): Only call pop_memoized_context if
23548         GATHER_STATISTICS is defined.
23549         (start_function): Likewise for push_memoized_context.
23550         * class.c (pushclass, popclass): Likewise.
23551
23552         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
23553         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
23554
23555         * cvt.c (cp_convert): Delete unused local var FORM.
23556         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
23557         prototypes.
23558
23559 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
23560
23561         * pt.c (do_poplevel): Oops; really return what we get from
23562         poplevel this time.
23563
23564 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23565
23566         * cp-tree.h (is_aggr_type): Add prototype.
23567
23568         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
23569         * method.c ({push,pop}_cp_function_context): Delete decls.
23570         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
23571         (SetUnexpected, SetTerminate): Delete unused vars.
23572         (init_exception_processing): Don't set SetUnexpected or
23573         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
23574         (output_exception_table_entry): Delete unused array LABEL.
23575         (expand_internal_throw): Delete unused var PARAMS.
23576         (expand_start_catch_block): Delete unused var CLEANUP.
23577         (emit_exception_table): Delete unused var EH_NODE_DECL.
23578         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
23579         GOTO_UNWIND_AND_THROW.  Don't set them.
23580         (end_eh_unwinder): Add top decl.
23581         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
23582         (exception_section, push_rtl_perm, do_function_call,
23583         lang_interim_eh, push_eh_cleanup, eh_outer_context,
23584         expand_end_eh_spec, end_eh_unwinder): Declare as static.
23585         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
23586         throw_used): Likewise.
23587         * cp-tree.h (expand_end_eh_spec): Delete prototype.
23588
23589         * search.c (dfs_mark, dfs_mark_vtable_path,
23590         dfs_unmark_vtable_path, dfs_mark_new_vtable,
23591         dfs_unmark_new_vtable, dfs_clear_search_slot,
23592         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
23593         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
23594         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
23595         functions.
23596         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
23597         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
23598         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
23599         Only define #ifdef GATHER_STATISTICS.
23600         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
23601         is defined.
23602         (vbase_decl): Delete var definition.
23603         (init_search): Delete old decl.
23604         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
23605         never actually used.
23606         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
23607         (get_base_distance_recursive): Delete unused fourth arg
23608         BASETYPE_PATH.  Fix call .
23609         (get_base_distance): Fix call.
23610         (push_class_decls): Delete unused var ID.
23611         (make_memoized_table_entry): Declare as static.
23612         (breadth_first_search): Declare as static.
23613         (tree_has_any_destructor_p): Declare as static.
23614         (pop_class_decls): Delete unused arg pop_class_decls.
23615         * class.c (popclass): Fix call to pop_class_decls.
23616         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
23617         tree_has_any_destructor_p): Delete prototypes.
23618
23619         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
23620         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
23621         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
23622         (build_user_desc): Delete unused var T.
23623         (build_class_desc): Delete unused vars T and OFF.
23624         (build_t_desc): Delete unused var NAME_STRING.
23625         (build_headof): Make static.
23626         (get_bad_cast_node): Likewise.
23627         (get_def_to_follow): Likewise.
23628         * cp-tree.h (init_type_desc): Add prototype.
23629         (build_headof): Remove prototype.
23630
23631 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
23632
23633         * pt.c (tsubst): Only look for matching decls at file scope for
23634         non-member functions.
23635
23636         * call.c (build_scoped_method_call): Handle scoped destructor
23637         calls in templates.
23638
23639         * decl.c (*_top_level): Also save previous_class_values.
23640
23641         * pt.c (tsubst_expr): Support do {} while loops.
23642         * parse.y (simple_stmt): Likewise.
23643         * tree.def: Likewise.
23644
23645         * method.c (build_overload_identifier): For a class nested in a
23646         template class, don't mangle in the template parms from our
23647         context.
23648
23649         * lex.c, cp-tree.h: Remove support for template instantiations in
23650         the pending_inlines code.
23651         * pt.c: Remove dead functions and unused arguments.
23652         (uses_template_parms): TYPENAME_TYPEs always use template parms.
23653         * parse.y: Stop passing anything to end_template_decl.
23654         * tree.c (print_lang_statistics): Only print tinst info #ifdef
23655         GATHER_STATISTICS.
23656
23657 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23658
23659         * init.c (expand_recursive_init{,_1}): Delete decls.
23660         (sort_member_init): Delete unused var INIT.
23661         (emit_base_init): Delete unused var X.
23662         (build_offset_ref): Delete unused var CNAME.
23663         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
23664         (emit_base_init): Delete unused local var BASE.  Delete extern
23665         decl of IN_CHARGE_IDENTIFIER.
23666         (build_delete): Delete unused local var VIRTUAL_SIZE.
23667
23668         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
23669         (build_delete): Fix call.
23670         * decl2.c (delete_sanity): Likewise.
23671         * cp-tree.h (build_vec_delete): Update prototype.
23672
23673         * typeck.c (common_base_type): Delete unused var TMP.
23674         (build_binary_op): Delete local var ARGS_SAVE.
23675         (build_array_ref): Delete unused var ITYPE.
23676         (c_expand_return): Delete unused var USE_TEMP.
23677
23678         * typeck.c (compexcepttypes): Delete unused arg STRICT.
23679         (comptypes): Fix calls.
23680         * decl.c (duplicate_decls): Likewise.
23681         * cp-tree.h (compexcepttypes): Delete extra arg.
23682
23683         * decl2.c (check_classfn): Delete unused second arg CNAME.
23684         * decl.c (start_decl, grokfndecl): Fix calls.
23685         * init.c (do_friend): Likewise.
23686         * cp-tree.h (check_classfn): Update prototype.
23687
23688         * cp-tree.h (signature_error, import_export_vtable,
23689         append_signature_fields, id_in_current_class, mark_used,
23690         copy_assignment_arg_p): Add decls.
23691         * decl2.c (mark_used): Delete decl.
23692
23693         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
23694
23695         * class.c (get_vtable_entry): Disable unused function.
23696         (doing_hard_virtuals): Delete unused static global var.
23697         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
23698         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
23699         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
23700         (modify_one_vtable): Delete unused var OLD_RTTI.
23701         (finish_struct_anon): Delete unused vars OFFSET and X.
23702         (finish_struct_bits): Delete unused var METHOD_VEC.
23703         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
23704         for-scope local variable METHODS.
23705
23706         * call.c (user_harshness): Delete unused/unneeded arg PARM.
23707         (ideal_candidate): Delete unused args BASETYPE and PARMS.
23708         (build_method_call): Delete unused args passed into ideal_candidate.
23709         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
23710         * cp-tree.h (synthesize_method): Add decl.
23711
23712         * decl.c (note_level_for_for): Give void return type.
23713         (pushdecl_nonclass_level): Likewise.
23714         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
23715         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
23716         (suspend_binding_level): Delete unused var LEVEL.
23717         (duplicate_decls): Delete unused var CTYPE.
23718         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
23719         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
23720         PTR_ENDLINK.
23721         (grokdeclarator): Delete unused var C.
23722         (grokdeclarator): Delete unused var SIZE_VARIES.
23723         (grokparms): Delete unused var SAW_VOID.
23724         (start_function): Delete unused var OLDDECL.
23725         (cplus_expand_expr_stmt): Delete unused var
23726         REMOVE_IMPLICIT_IMMEDIATELY.
23727
23728         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
23729
23730         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
23731
23732 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
23733
23734         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
23735         (build_min_nt): Likewise.
23736         * pt.c (do_pushlevel): Emit line note.
23737         (do_poplevel): Return what we get from poplevel.
23738         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
23739         * parse.y: Use do_pushlevel and do_poplevel.
23740         * cp-tree.h: Declare do_poplevel.
23741
23742         * cp-tree.h: Declare at_eof.
23743         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
23744         * decl2.c (import_export_decl): Renamed from import_export_inline.
23745         (finish_file): Call it to do interface handling for statics.
23746         * pt.c (tsubst_copy): Call mark_used on variables and functions
23747         used here.
23748
23749         * decl2.c (finish_file): Don't emit statics we can't generate.
23750         * pt.c (instantiate_decl): Don't set interface on instantiations
23751         we can't generate.
23752
23753         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
23754         * tree.c (print_lang_statistics): Print max template depth.
23755         * pt.c (push_tinst_level): Dump entire instantiation context.
23756         (instantiate_class_template): Use it and pop_tinst_level.
23757         (instantiate_decl): Likewise.
23758
23759         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
23760         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
23761
23762 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
23763
23764         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
23765         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
23766         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
23767         the new template implementation.
23768
23769 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23770
23771         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
23772
23773 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
23774
23775         * decl.c (cp_finish_decl): Delay emitting the debug information for
23776         a typedef that has been installed as the canonical typedef, if the
23777         type has not yet been defined.
23778
23779 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
23780
23781         * decl2.c (grokfield): Still call pop_nested_class for access decls.
23782
23783 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23784
23785         * decl.c (lookup_label): Call label_rtx.
23786
23787         * decl.c (make_binding_level): New function.
23788         (pushlevel, pushlevel_class): Call it instead of explicit
23789         duplicate calls to xmalloc.
23790
23791         * decl.c (init_decl_processing): Delete useless build_pointer_type
23792         call.
23793
23794         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
23795         (sizet_ftype_string): Delete variable.
23796         (init_decl_processing): Add built-in functions fabsf, fabsl,
23797         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
23798         variable strlen_ftype, used for strlen.
23799
23800 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
23801
23802         * decl.c (push_to_top_level): Start from current_binding_level
23803         again for now; the stl hacks depend on g++ being broken in this
23804         way, and it'll be fixed in the template rewrite.
23805
23806         * tree.def: Add USING_DECL.
23807         * decl2.c (do_class_using_decl): Implement.
23808         (grokfield): Pass access decls off to do_class_using_decl instead of
23809         grokdeclarator.
23810         * error.c (dump_decl): Handle USING_DECLs.
23811         * decl.c (grokdeclarator): Remove code for handling access decls.
23812         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
23813         as access decls for now.
23814         (finish_struct): Don't check USING_DECLs for other uses of the name.
23815
23816         * search.c (get_matching_virtual): Use cp_error_at.
23817
23818 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23819
23820         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
23821         match c-typeck.c.
23822         (self_promoting_args_p): Move the check that TYPE is non-nil
23823         before trying to look at its main variant.
23824         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
23825
23826         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
23827         Delete macros.
23828         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
23829         (do_friend): Delete call to xref_friend.
23830         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
23831
23832         * typeck.c (convert_sequence): #if 0 unused function.
23833
23834         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
23835         be in decl_in_memory_p.
23836         (decl_in_memory_p): Delete decl.
23837         * expr.c (decl_in_memory_p): Delete fn.
23838         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
23839
23840         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
23841
23842 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
23843
23844         * class.c (finish_struct_1): Check for a pure-specifier on a
23845         non-virtual function here.
23846
23847         * decl2.c (grok_function_init): Don't check whether the function
23848         is virtual here.
23849         (grokfield): Don't call check_for_override here.
23850
23851         * decl.c (push_to_top_level): Start from inner_binding_level,
23852         check class_shadowed in class levels.
23853
23854 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
23855
23856         * decl.c (resume_level): Ignore things that don't have names, instead
23857         of core dumping.
23858
23859 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23860
23861         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
23862
23863 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
23864
23865         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
23866         synthesized dtor.
23867
23868         * parse.y (complete_type_name): Bind global_scope earlier.
23869         (complex_type_name): Likewise.
23870         (qualified_type_name): Remove.
23871
23872 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
23873
23874         * decl.c (grokfndecl): Move code that looks for virtuals in base
23875         classes...
23876         * class.c (check_for_override): ... to a new function.
23877         (finish_struct_1): Call it.
23878
23879         * cp-tree.h: Declare warn_sign_compare.
23880
23881         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
23882         rather than extra_warnings to decide whether to warn about
23883         comparison of signed and unsigned.
23884
23885         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
23886         implies -Wsign-compare.  -Wall doesn't imply -W.
23887
23888 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
23889
23890         * typeck.c (build_component_ref): Fix to handle anon unions in base
23891         classes as well.
23892
23893 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23894
23895         * class.c (resolves_to_fixed_type_p): Delete code dealing with
23896         a WITH_CLEANUP_EXPR, since we don't generate them any more.
23897         * cvt.c (build_up_reference): Likewise.
23898         * decl.c (grok_reference_init): Likewise.
23899         (cp_finish_decl): Likewise.
23900         * error.c (dump_expr): Likewise.
23901         * tree.c (real_lvalue_p): Likewise.
23902         (lvalue_p): Likewise.
23903         (build_cplus_new): Likewise.
23904         (unsave_expr_now): Likewise.
23905         * typeck.c (unary_complex_lvalue, build_modify_expr,
23906         c_expand_return): Likewise.
23907
23908 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23909
23910         Make the C++ front-end pay attention to attributes for structures.
23911         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
23912         finish_struct_1.
23913         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
23914         Take out old round_up_size use and setting the DECL_ALIGN possibly
23915         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
23916         can override what the attribute set.
23917         * cp-tree.h (finish_struct): Update prototype.
23918         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
23919         attributes to finish_struct.
23920         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
23921         value down into finish_struct.
23922         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
23923
23924 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
23925
23926         * decl.c (poplevel):  Re-word dead for local handling.
23927         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
23928         (cp_finish_decl):  If is_for_scope, check for duplicates so
23929         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
23930
23931         * lex.c (do_identifier):  Use global binding in preference of
23932         dead for local variable.
23933
23934 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
23935
23936         * init.c (initializing_context): Handle anon union changes, the
23937         context where fields of anon unions can be initialized now has to be
23938         found by walking up the TYPE_CONTEXT chain.
23939
23940 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
23941
23942         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
23943         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
23944         (obscure_complex_init): If bss is supported, always set
23945         DECL_INITIAL to error_mark_node.
23946
23947 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23948
23949         * init.c (is_friend): Make sure there's a context before we see if
23950         it's an aggr type.
23951
23952 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
23953
23954         * init.c (is_friend): Classes are not friendly with nested classes.
23955
23956 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
23957
23958         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
23959         and record its result.
23960
23961 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
23962
23963         * class.c (finish_struct_anon): Switch around code to not move anon
23964         union elements around, nor mess up their contexts, nor offsets,
23965         instead we now build up the right number of COMPONENT_REFs for all
23966         the anon unions that may be present at build_component_ref time.
23967         * typeck.c (lookup_anon_field): New routine to handle field lookup
23968         on fields without names.  We find them, based upon their unique type
23969         instead.
23970         * typeck.c (build_component_ref): Allow FIELD_DECL components.
23971         Handle finding components in anonymous unions, and ensure that a
23972         COMPONENT_REF is built for each level as necessary.
23973
23974 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
23975
23976         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
23977         code that ensures that copy ctors are used if appropriate.
23978
23979 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23980
23981         * init.c (build_vec_delete): Only give an error if base isn't an
23982         error_mark_node.
23983
23984 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
23985
23986         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
23987         (yylex): If we see `new', keep slurping.
23988
23989 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
23990
23991         * class.c (finish_struct_1): Move code for handling anon unions...
23992         (finish_struct_anon): to here.  Fixup so that we do the offset
23993         calculations right, and so that the fields are physically moved to
23994         the containers's chain.
23995
23996 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
23997
23998         * decl.c (grokdeclarator): Avoid trying to get an operand off an
23999         identifier node.
24000
24001 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
24002
24003         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
24004         POINTER_SIZE to agree with expr.c.
24005
24006 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
24007
24008         * search.c (lookup_field): Don't report ambiguities if protect is 0,
24009         instead return NULL_TREE.
24010
24011 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
24012
24013         * class.c (finish_struct_1): Call warn_hidden if we want warnings
24014         about overloaded virtual functions.
24015         (warn_hidden): New routine to warn of virtual functions that are
24016         hidden by other virtual functions, that are not overridden.
24017         (get_basefndecls): New routine, used by warn_hidden.
24018         (mark_overriders): New routine, used by warn_hidden.
24019         * search.c (get_matching_virtual): Remove old warning that just
24020         isn't very useful.
24021
24022 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24023
24024         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
24025
24026         * typeck.c (null_ptr_cst_p): Delete unused fn.
24027         (build_function_call_maybe): Delete unused fn.
24028
24029         * expr.c (extract_init): #if 0 the code after unconditional return 0
24030         for now.
24031
24032         Delete old cadillac code.
24033         * edsel.c: Remove file.
24034         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
24035         * Makefile.in (CXX_OBJS): Delete edsel.o.
24036         (edsel.o): Delete rule.
24037         * cp-tree.h (flag_cadillac): Delete var decl.
24038         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
24039         * decl2.c (flag_cadillac): Delete var definition.
24040         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
24041         (grokfield): Delete code depending on flag_cadillac.
24042         (finish_anon_union): Likewise.
24043         * class.c (finish_struct_1): Likewise.
24044         (pushclass): Likewise.
24045         (popclass): Likewise.
24046         (push_lang_context): Likewise.
24047         (pop_lang_context): Likewise.
24048         * decl.c (init_decl_processing): Likewise.
24049         (start_decl): Likewise.
24050         (cp_finish_decl): Likewise.
24051         (xref_tag): Likewise.
24052         (finish_enum): Likewise.
24053         (start_function): Likewise.
24054         (finish_function): Likewise.
24055         (finish_stmt): Likewise.
24056         * lex.c (lang_init): Likewise.
24057         (check_newline): Likewise.
24058
24059         * lex.c (do_pending_inlines): Delete synthesized method kludge.
24060
24061         Delete defunct, ancient garbage collection implementation.
24062         * rtti.c: New file with the RTTI stuff from gc.c.
24063         * gc.c: Removed file (moved the remaining stuff into rtti.c).
24064         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
24065         (rtti.o): New rule, replacing gc.o.
24066         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
24067         * cp-tree.h: Delete gc-related fn decls.
24068         (DECL_GC_OFFSET): Delete macro.
24069         (flag_gc): Delete extern decl.
24070         * decl.c (current_function_obstack_index): Delete var decl.
24071         (current_function_obstack_usage): Delete var decl.
24072         (start_function): Delete clearing of current_function_obstack_index
24073         and current_function_obstack_usage.
24074         (init_decl_processing): Delete code relying on -fgc.
24075         Delete call to init_gc_processing.
24076         (cp_finish_decl): Delete calls to build_static_gc_entry and
24077         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
24078         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
24079         and to expand_expr of a __gc_main call.
24080         (maybe_gc_cleanup): Delete var decl.
24081         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
24082         * decl2.c (flag_gc): Delete var decl.
24083         (lang_f_options): Delete offering of -fgc.
24084         (lang_decode_option): Delete -fgc and -fno-gc handling.
24085         (get_temp_regvar): Delete gc code.
24086         * init.c (build_new): Delete gc code.
24087         * lex.c (init_lex): Delete checking of flag_gc.
24088
24089         * typeck.c (convert_arguments): Delete gc code.
24090         (build_component_addr): Delete -fgc warning.
24091         (build_modify_expr): Delete gc code.
24092
24093         * decl2.c (build_push_scope): Delete fn.
24094         * cp-tree.h (build_push_scope): Delete decl.
24095
24096         * search.c (clear_search_slots): Delete fn.
24097         * cp-tree.h (clear_search_slots): Delete decl.
24098
24099         * search.c (tree_needs_constructor_p): Delete fn.
24100         * cp-tree.h (tree_needs_constructor_p): Delete decl.
24101
24102         * tree.c (id_cmp): Delete fn.
24103
24104         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
24105         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
24106
24107         * tree.c (decl_value_member): Delete fn.
24108         * cp-tree.h (decl_value_member): Delete decl.
24109
24110         * tree.c (list_hash_lookup_or_cons): Delete fn.
24111         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
24112
24113         * method.c (cplus_exception_name): Delete fn.
24114         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
24115
24116         * spew.c (shift_tokens): Delete fn.
24117
24118 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
24119
24120         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
24121         to cp_finish_decl.
24122         * parse.y: Likewise.
24123
24124 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24125
24126         * tree.c (build_cplus_staticfn_type): Delete function definition;
24127         never used.
24128         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
24129
24130         * tree.c (virtual_member): Delete function definition; never used.
24131         * cp-tree.h (virtual_member): Delete decl.
24132
24133 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
24134
24135         * typeck.c (build_component_ref): Handle getting vbase pointers
24136         out of complex multiple inheritance better.
24137
24138 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
24139
24140         * typeck.c (build_object_ref): Make sure we use the real type, not
24141         any reference type.
24142
24143 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
24144
24145         * tree.c (build_exception_variant): Don't create new types if we
24146         don't have to, also build new types on the right obstack.
24147
24148 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
24149
24150         * decl.c (store_bindings): Split out from push_to_top_level.
24151         (push_to_top_level): Call it for b->type_shadowed on class binding
24152         levels.
24153
24154 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
24155
24156         * search.c (expand_upcast_fixups): Fix so that offsets stored in
24157         vbase_offsets are always right.  Fixes a problem where virtual base
24158         upcasting and downcasting could be wrong during conversions on this
24159         during virtual function dispatch at ctor/dtor time when dynamic
24160         vtable fixups for deltas are needed.  This only sounds easier than
24161         it is.  :-)
24162         (fixup_virtual_upcast_offsets): Change to reflect new calling
24163         convention for expand_upcast_fixups.
24164
24165 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24166
24167         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
24168         check that it's usable as the bitfield width.
24169
24170 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24171
24172         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
24173         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
24174         only ever used for functions in it.
24175
24176 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
24177
24178         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
24179         (nested_type): Likewise.
24180         (nested_name_specifier): Use lastiddecl.
24181
24182         * decl.c (grokdeclarator): Adjust accordingly.
24183         * init.c (expand_member_init): Likewise.
24184         * parse.y (base_class): Likewise.
24185         * typeck2.c (build_functional_cast): Likewise.
24186
24187         * typeck2.c (build_functional_cast): Fill in name after we've
24188         checked for non-aggr type.
24189
24190 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
24191
24192         * decl2.c (warn_pointer_arith): Default to on.
24193
24194 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
24195
24196         * lex.c (is_rid): New function.
24197         * decl.c (grokdeclarator): Diagnose reserved words used as
24198         declarator-ids.
24199
24200 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
24201
24202         * tree.c (get_decl_list): Don't lose cv-quals.
24203
24204         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
24205         typespecs used as declarator-ids.
24206
24207 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
24208
24209         * decl.c (poplevel): When poping a level, don't give a warning for
24210         any subblocks that already exist.
24211
24212 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
24213
24214         * typeck.c (build_object_ref): Finish what I started.
24215
24216         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
24217
24218         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
24219
24220         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
24221         scope.
24222
24223 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
24224
24225         * decl.c (xref_tag): Handle passing a type in directly.
24226
24227         * parse.y (qualified_type_name): Pull out the type.
24228         (nested_type): Likewise.
24229         Take types directly instead of as identifiers.
24230         * call.c (build_scoped_method_call): Take types directly instead of
24231         as identifiers.
24232         * decl.c (xref_basetypes): Likewise.
24233         * init.c (expand_member_init): Likewise.
24234         (build_member_call): Likewise.
24235         (build_offset_ref): Likewise.
24236         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
24237         * method.c (do_build_assign_ref): Likewise.
24238         * decl.c (grokdeclarator): Handle a type appearing as the
24239         declarator-id for constructors.
24240         * method.c (do_build_copy_constructor): current_base_init_list now
24241         uses the types directly, not their names.
24242         * init.c (sort_base_init): Likewise.
24243         (expand_member_init): Likewise.
24244         * init.c (is_aggr_type): New function, like is_aggr_typedef.
24245
24246 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
24247
24248         * tree.c (layout_basetypes): Call build_lang_field_decl instead
24249         of build_lang_decl if first arg is a FIELD_DECL.
24250
24251 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24252
24253         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
24254         non-empty.
24255         * except.c (expand_start_catch_block): Set TREE_USED to avoid
24256         warnings about the catch handler.
24257
24258 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
24259
24260         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
24261         expand_target_expr.
24262
24263 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
24264
24265         Fix access control to use trees rather than integers.
24266         * class.c (access_{default, public, protected, private,
24267         default_virtual, public_virtual, private_virtual}_node): Add
24268         definitions.
24269         (init_class_processing): Do creation of those nodes.
24270         * cp-tree.h (access_type): Delete enum decl.
24271         (access_{default, public, protected, private, default_virtual,
24272         public_virtual, private_virtual}_node): Add decls.
24273         (compute_access): Change return type.
24274         * search.c (compute_access): Have tree return type, instead of enum.
24275         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
24276         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
24277         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
24278         * parse.y (VISSPEC): Make ttype rather than itype.
24279         (base_class_access_list): Likewise.
24280         * *.[cy]: Change all refs of `access_public' to `access_public_node',
24281         etc.
24282         * call.c (build_method_call): Make ACCESS be a tree.
24283         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
24284         * cvt.c (convert_to_aggr): Likewise.
24285         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
24286         Likewise.
24287         * method.c (hack_identifier): Likewise.
24288         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
24289
24290 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
24291
24292         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
24293         frontend, and make it more consistent with respect to
24294         warn_pointer_arith.
24295
24296 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
24297
24298         * decl.c (pushdecl): Check for duplicate parameter names.
24299
24300 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
24301
24302         * decl.c (expand_static_init): Call assemble_external for atexit.
24303
24304 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
24305
24306         * except.c (do_unwind): Remove some generated dead code.
24307         (eh_outer_context): New routine, factor out some common code from
24308         expand_builtin_throw and end_eh_unwinder.  Add code to do return
24309         address masking for the PA.
24310         (expand_builtin_throw): Use eh_outer_context instead of open coding
24311         it here.
24312         (end_eh_unwinder): Likewise.
24313
24314 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
24315
24316         * except.c (expand_throw): Call assemble_external for __empty, if we
24317         use it.
24318
24319 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
24320
24321         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
24322         NORMAL_RETURN_ADDR_OFFSET.
24323         (end_eh_unwinder): Likewise.
24324
24325 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
24326
24327         * gc.c (build_dynamic_cast): Make sure we don't cast away const
24328         when dealing with references, and make sure we handle dynamic
24329         casting to a cv qualified reference.
24330
24331 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
24332
24333         * except.c (struct eh_context): New structure top hold eh context
24334         information.
24335         (push_eh_context): New routine.
24336         (pop_eh_context): Likewise.
24337         * decl.c (push_cp_function_context): Use them.
24338         (pop_cp_function_context): Likewise.
24339
24340 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
24341
24342         * decl2.c (finish_file): Also prune uninteresting functions in the
24343         inline emission loop.
24344
24345 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
24346
24347         * sig.c (build_signature_table_constructor): Mark functions
24348         in the signature as referenced.
24349
24350 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
24351
24352         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
24353         the inline emission stuff.
24354
24355 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
24356
24357         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
24358         weak symbols.
24359         * lang-options.h: Add -f{no-,}weak.
24360         * decl.c (init_decl_processing): If the target does not support weak
24361         symbols, don't use them.
24362         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
24363
24364 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
24365
24366         * init.c (expand_member_init): warning for base init after members.
24367
24368 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
24369
24370         * cvt.c (build_expr_type_conversion): Don't convert to a reference
24371         type.
24372
24373 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
24374
24375         * method.c (report_type_mismatch): Improve wording for volatile
24376         mismatches.
24377
24378 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
24379
24380         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
24381         expand_assignment, as the later doesn't handle things that have
24382         copy constructors well.  The compiler would do bitwise copying,
24383         instead of ctor calling in some cases.
24384
24385 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
24386
24387         * g++.c (my_strerror): Return "cannot access" if errno is 0.
24388         (pfatal_with_name, perror_exec): Don't assume that
24389         the returned value from my_strerror contains no '%'s.
24390         (concat): Remove.
24391         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
24392
24393 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
24394
24395         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
24396         TYPE_METHODS/TREE_CHAIN mean what they used to.
24397         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
24398         instead of TYPE_METHODS.
24399         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
24400         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
24401         * cp-tree.h (CLASSTYPE_METHODS): Lose.
24402         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
24403         TYPE_METHODS.
24404         (struct lang_decl): Lose next_method field.
24405         (DECL_NEXT_METHOD): Lose.
24406         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
24407         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
24408         anymore.
24409         (finish_struct_methods): Don't mess with the TREE_CHAINs in
24410         fn_fields.
24411
24412         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
24413         vector.
24414
24415         * call.c (build_method_call): Synthesize here even when not inlining.
24416         * typeck.c (build_function_call_real): Likewise.
24417
24418 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
24419
24420         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
24421         == DBX_DEBUG, call dbxout_start_new_source_file and
24422         dbxout_resume_previous_source_file when appropriate.
24423
24424 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
24425
24426         * except.c (start_anon_func): Push to the top level.
24427         (end_anon_func): Pop from the top level.
24428
24429 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
24430
24431         * cp-tree.h (build_cleanup): New routine to build cleanups.
24432         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
24433         call at ctor time and use atexit to run it later.
24434         * decl2.c (build_cleanup): New routine, taken from finish_file.
24435         (finish_file): Use build_cleanup instead, and don't put function
24436         local statics in global dtor list.
24437
24438 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
24439
24440         * except.c (expand_throw): Ensure that we have cleanups, if we try
24441         and expand cleanups.
24442
24443 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
24444
24445         * except.c (expand_throw): Add logic to manage dynamic cleanups for
24446         the EH object.
24447         (expand_end_catch_block): Use the magic of expand_goto, instead of
24448         emit_jump so that we get the cleanup for any catch clause parameter
24449         and the cleanup for the exception object.  Update to reflect label
24450         changes.
24451         (push_eh_cleanup): New routine to register a cleanup for an
24452         exception object.
24453         (empty_fndecl): Used to default cleanup actions to
24454         nothing.
24455         (init_exception_processing): Setup empty_fndecl.  Setup
24456         saved_cleanup.
24457         (expand_start_catch_block): Update to reflect label changes.  Call
24458         push_eh_object to register the cleanup for the EH object.
24459         (start_anon_func): New routine to start building lambda expressions
24460         from trees.
24461         (end_anon_func): New routine to end them.
24462         (struct labelNode): Change so that we can use tree labels, or rtx
24463         labels.
24464         (saved_cleanup): Object to check for dynamic cleanups for the
24465         exception handling object.
24466         (push_label_entry): Change so that we can use tree labels, or rtx
24467         labels.
24468         (pop_label_entry): Likewise.
24469         (top_label_entry): Likewise.
24470         (expand_start_all_catch): Use tree label instead of rtx label, so
24471         that we can get the magic of expand_goto.
24472         (expand_end_all_catch): Update to reflect label changes.
24473
24474         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
24475         use UNSAVE_EXPRs.
24476         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
24477         building_cleanup logic, as we now use UNSAVE_EXPRs.
24478         * cp-tree.h (unsave_expr): Declare it.
24479         * decl.c (building_cleanup): Remove.
24480         (maybe_build_cleanup): Remove building_cleanup logic, and use
24481         UNSAVE_EXPR instead.
24482
24483 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
24484
24485         * gc.c (build_t_desc): Update error message to say <typeinfo>.
24486
24487 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
24488
24489         * decl.c (pushdecl): Only warn about shadowing a local variable if
24490         warn_shadow is true.
24491
24492 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
24493
24494         * typeck.c (build_binary_op_nodefault): Added warning about
24495         comparisons between different enum types with -Wall, unless
24496         -fenum-int-equiv set.
24497
24498 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
24499
24500         * class.c (finish_struct_1): Skip down to the inner type in
24501         multidimensional arrays.  Ensures ctors will be made for types that
24502         need constructing.
24503
24504 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
24505
24506         * decl.c (last_dtor_insn): New to track the last compiler generated
24507         insn in a dtor.
24508         (store_parm_decls): Set it.
24509         (finish_function): Use it to see if the dtor is empty.  Avoid doing
24510         vtable setup all the time, if we can.
24511         (struct cp_function): Add last_dtor_insn.
24512         (push_cp_function_context): Save it.
24513         (pop_cp_function_context): Restore it.
24514
24515 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
24516
24517         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
24518         warnings.
24519
24520 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
24521
24522         * typeck.c (expand_target_expr): Make sure targets get put into the
24523         current temp_slot_level, so that the free_temp_slots call will reuse
24524         them.
24525
24526 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
24527
24528         * class.c (finish_struct_1): Delay delta fixups for virtual bases
24529         until after we have done the hard virtuals, to avoid a bogus `every
24530         virtual function must have a unique final overrider' for virtual
24531         functions that are only overridden by hard virtuals.
24532
24533 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
24534
24535         * pt.c (do_function_instantiation): Don't try to find a file-scope
24536         template for a member function.
24537
24538 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
24539
24540         * g++.c (main): Add handling of -nodefaultlibs.
24541
24542 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
24543
24544         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
24545         distinguish between direct bindings of reference variables, and
24546         indirect bindings of reference variables.
24547         * cvt.c (build_up_reference): Use it.
24548         * typeck.c (convert_arguments): Use it to indicate this is an
24549         indirect binding.
24550         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
24551         as they are unused.
24552         (expand_static_init): Likewise.
24553         (cplus_expand_expr_stmt): Likewise.
24554         * decl2.c (finish_file): Likewise.
24555         * init.c (perform_member_init): Likewise.
24556         (emit_base_init): Likewise.
24557         (expand_aggr_vbase_init_1): Likewise.
24558
24559 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
24560
24561         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
24562         get a DECL_LANG_SPECIFIC node.
24563         * cp-tree.h (lang_decl_flags): Add new member `level'.
24564         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
24565         decl_flags level member.
24566
24567 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
24568
24569         * call.c (build_method_call): Make sure instance has a
24570         TYPE_LANG_SPECIFIC node before we dive into it.
24571
24572 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
24573
24574         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
24575
24576 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
24577
24578         * decl.c (duplicate_decls): When smashing decls, smash staticness in
24579         the usual way.
24580
24581 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
24582
24583         * decl.c (poplevel): Handle the merging of subblocks of cleanups
24584         when finishing blocks that have already been created (usually due to
24585         the fixup goto code).  Fixes bad debugging information.
24586
24587 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
24588
24589         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
24590         that's not a list of overloaded functions.
24591
24592 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
24593
24594         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
24595         before trying to use DECL_ABSTRACT_VIRTUAL_P.
24596
24597 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
24598
24599         * decl2.c (mark_used): New function for hooking into setting of
24600         TREE_USED on decls.
24601         * call.c (build_method_call): Use it.
24602         * class.c (instantiate_type): Likewise.
24603         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
24604         for all like-named functions.
24605         * method.c (hack_identifier): Likewise.
24606         (emit_thunk): Don't call assemble_external.
24607         (make_thunk): Create thunk as a FUNCTION_DECL so that it
24608         gets the right mode and ENCODE_SECTION_INFO works.
24609
24610         * parse.y: Use mark_used.  Pass operator names to do_identifier.
24611         * lex.c (do_identifier): Handle operator names.
24612
24613         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
24614
24615 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
24616
24617         * errfn.c: Include stdio.h.
24618         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
24619
24620 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
24621
24622         * typeck2.c (digest_init): Always convert initializers to the
24623         right type.
24624
24625 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
24626
24627         * init.c (member_init_ok_or_else): Don't allow member initializers
24628         for indirect members, as it is invalid.
24629
24630 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
24631
24632         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
24633
24634 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
24635
24636         * parse.y (for.init.statement): Catch compound statements inside for
24637         initializations, if we're being pedantic.
24638
24639 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
24640
24641         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
24642         looking for.
24643
24644 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
24645
24646         * error.c (dump_expr): Don't core dump when a boolean expression is
24647         used as a default argument.
24648
24649 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
24650
24651         * class.c (finish_struct_bits): Check aggregate_value_p instead of
24652         RETURN_IN_MEMORY.
24653
24654 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
24655
24656         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
24657         BLKmode type that would otherwise be returned in registers.
24658
24659 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
24660
24661         * g++.c (WITHLIBC): New macro.
24662         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
24663         saw_libc and pass it at the end if it was set.
24664
24665 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
24666
24667         * parse.y (fn.def1): Call split_specs_attrs in
24668         declmods notype_declarator case.