Use -static when testing --gc-sections on native targets
[official-gcc.git] / gcc / cp / ChangeLog
blobe6326728a1b47546d4cbddb7613aa4f278d727bf
1 2000-02-08  Nathan Sidwell  <nathan@acm.org>
3         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
4         strip array element qualifiers too.
6 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
8         * decl.c (store_parm_decls): Don't build cleanups for parameters
9         while processing_template_decl.
11 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
13         * cp-tree.h (struct saved_scope): Add incomplete field.
14         (namespace_scope_incomplete): New macro.
15         * decl.c (pushdecl): Use it.
16         (hack_incomplete_structures): Use it.  See through artificial
17         binding levels.
18         (mark_saved_scope): Mark it.
20         Implement access control for nested types.
21         * search.c (type_access_control): New fn.
22         (accessible_p): Now we do perform access control for types.
23         * semantics.c (deferred_type_access_control): New fn.
24         (initial_deferred_type_access_control): New fn.
25         (begin_function_definition): Call it.  Add lookups parm.
26         * decl.c (struct binding_level): Add this_class field.
27         (pushlevel_class): Set it.
28         (mark_binding_level): Mark it.
29         (lookup_name_real): Use it.  Call type_access_control.
30         (mark_saved_scope): Mark lookups field.
31         * cp-tree.h (flagged_type_tree): Add lookups field.
32         (struct saved_scope): Add lookups field.
33         (type_lookups): New macro.
34         * parse.y (declmods): Now <ftype>.
35         (parse_decl): Add lookups parm.  Call 
36         initial_deferred_type_access_control.
37         (lang_extdef): Clear type_lookups.
38         (typed_declspecs, declmods, typespec): Set lookups field.
39         (initdcl): Call deferred_type_access_control.
40         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
41         component_decl_1, named_parm): Adjust.
42         * friend.c (is_friend): Nested classes are friends of their
43         enclosing classes.
45         * class.c (currently_open_derived_class): New fn.
46         * method.c (hack_identifier): Use it.
48         * lex.c (do_identifier): Remove obsolete code.
50         * parse.y (typed_typespecs): Propagate new_type_flag properly.
52 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
54         * tinfo.h: Remove apostrophes from C++ comment (xgettext
55         thinks this file is plain C).
57 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
59         * Makefile.in (call.o): Depend on $(EXPR_H).
61         * call.c: Include "expr.h".
63         * class.c (dump_class_hierarchy): Add prototype.
65         * search.c (dfs_get_pure_virtuals): Likewise.
67 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
69         * parse.y (simple_stmt): Allow :: token in asm parameter list.
70         * parse.c: Rebuilt.
72 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
74         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
75         Store it in DECL_FCONTEXT.
76         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
78 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
80         * tinfo.h (old abi): #include "tconfig.h".
81         * tinfo.cc (convert_to_base): Move into old abi section.
83 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
85         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
86         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
87         (BINFO_PRIMARY_BINFO): New macro.
88         (BF_DELTA): Rename to ...
89         (BV_DELTA): ... this.
90         (BF_VCALL_INDEX): Rename to ...
91         (BV_VCALL_INDEX): ... this.
92         (BF_FN): Rename to ...
93         (BV_FN): ... this.
94         * class.c (build_vbase_path): Adjust for changes to reverse_path.
95         (set_rtti_entry): Rename BF_ macros to BV_ variants.
96         (modify_vtable_entry): Simplify.
97         (add_virtual_function): Rename BF_ macros to BV_ variants.
98         (build_vtable_initializer): Likewise.
99         (get_class_offset_1): Remove.
100         (dfs_get_class_offset): Likewise.
101         (get_class_offset): Likewise.
102         (dfs_find_final_overrider): New function.
103         (find_final_overrider): Likewise.
104         (modify_one_vtable): Remove.
105         (dfs_find_base): New function.
106         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
107         find_final_overrider.
108         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
109         virtuals.
110         (dfs_fixup_vtable_deltas): Remove.
111         (override_one_vtable): Remove.
112         (merge_overrides): Likewise.
113         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
114         unreal chilren of virtual bases.
115         (finish_struct_1): Don't use merge_overrides.  Don't use
116         dfs_fixup_vtable_deltas.
117         * tree.c (reverse_path): Return a TREE_LIST, not a chain of 
118         BINFOs.
119         
120 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
121             Jason Merrill  <jason@yorick.cygnus.com>
123         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
125 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
127         * exception.cc (__throw_bad_typeid): Add missing std::.
129 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
131         * cp-tree.h (make_thunk): PROTO -> PARAMS.
133 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
135         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
137         Runtime support for new-abi rtti.
138         * inc/typeinfo (type_info::operator!=): Define in class.
139         (type_info::before, type_info::name, type_info::operator==,
140         type_info::operator!=): Define new ABI implementations.
141         (type_info::is_pointer_p, type_info::is_function_p): Declare
142         new virtual functions.
143         (type_info::do_catch, type_info::do_upcast): Likewise.
144         
145         * tinfo.h (__base_class_info): Define new class.
146         (__class_type_info): Likewise.
147         (__si_class_type_info): Likewise.
148         (__vmi_class_type_info): Likewise.
149         (__dynamic_cast): Prototype.
150         
151         * tinfo.cc: Conditionalize old and new rtti mechanisms.
152         (type_info::is_pointer_p): Define new function.
153         (type_info::is_function_p): Likewise.
154         (type_info::do_catch): Likewise.
155         (type_info::do_upcast): Likewise.
156         (vtable_prefix): New structure for vtable access.
157         (adjust_pointer): Define new template function.
158         (contained_p, public_p, virtual_p, contained_public_p,
159         contained_nonpublic_p, contained_nonvirtual_p): Define new
160         functions.
161         (nonvirtual_base_type): New local variable.
162         (__class_type_info::~__class_type_info): Define.
163         (__si_class_type_info::~__si_class_type_info): Likewise.
164         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
165         (__class_type_info::do_catch): Define new function.
166         (__class_type_info::do_upcast): Likewise.
167         (__class_type_info::find_public_src): Likewise.
168         (__class_type_info::do_find_public_src): Likewise.
169         (__si_class_type_info::do_find_public_src): Likewise.
170         (__vmi_class_type_info::do_find_public_src): Likewise.
171         (__class_type_info::do_dyncast): Likewise.
172         (__si_class_type_info::do_dyncast): Likewise.
173         (__vmi_class_type_info::do_dyncast): Likewise.
174         (__class_type_info::do_upcast): Likewise.
175         (__si_class_type_info::do_upcast): Likewise.
176         (__vmi_class_type_info::do_upcast): Likewise.
177         (__dynamic_cast): Likewise.
178         
179         * tinfo2.cc (__fundamental_type_info): Define new class.
180         (__pointer_type_info): Likewise.
181         (__reference_type_info): Likewise.
182         (__array_type_info): Likewise.
183         (__function_type_info): Likewise.
184         (__enum_type_info): Likewise.
185         (__ptr_to_member_type_info): Likewise.
186         (__fundamental_type_info::~__fundamental_type_info): Define.
187         (__pointer_type_info::~__pointer_type_info): Likewise.
188         (__reference_type_info::~__reference_type_info): Likewise.
189         (__array_type_info::~__array_type_info): Likewise.
190         (__function_type_info::~__function_type_info): Likewise.
191         (__enum_type_info::~__enum_type_info): Likewise.
192         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
193         (__pointer_type_info::do_catch): Define new function.
194         (__ptr_to_member_type_info::do_catch): Define new function.
195         
196         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
197         (__is_pointer): Likewise.
199         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
201 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
203         * cp/class.c (build_vtable): Rename to build_primary_vtable.
204         (prepare_fresh_vtable): Rename to build_secondary_vtable.
205         (make_new_vtable): New function.
206         (modify_vtable_entry): Handle generation of new vtables correctly.
207         (modify_one_vtable): Remove unused parameter.
208         (dfs_fixup_vtable_deltas): Likewise.
209         (override_one_vtable): Use build_secondary_vtable.
210         (finish_struct_1): Use build_primary_vtable and
211         build_secondary_vtable.
212         
213 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
215         * cp/decl.c: Adjust variable names, comments, help strings.
217 2000-01-29  Nathan Sidwell  <nathan@acm.org>
219         * new2.cc (operator delete[]): Use operator delete, don't assume
220         implementation.
222 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
224         * class.c (build_vtbl_initializer): Add argument to
225         build_vtable_entry call.
227 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
229         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
230         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
231         (BF_DELTA): New macro.
232         (BF_VCALL_INDEX): Likewise.
233         (BF_FN): Likewise.
234         (THUNK_VCALL_OFFSET): Likewise.
235         (make_thunk): Change prototype.
236         * class.c (build_vtable_entry): Integrate
237         build_vtable_entry_for_fn.  Handle vcall indices.
238         (build_vtable_entry_for_fn): Remove.
239         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
240         BF_VCALL_INDEX, BF_FN.
241         (modify_vtable_entry): Integrate common code from
242         modify_one_vtable and dfs_fixup_vtable_deltas.
243         (add_virtual_function): Set BF_VCALL_INDEX.
244         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
245         and BF_FN.
246         (modify_one_vtable): Simplify.
247         (dfs_fixup_vtable_deltas): Likewise.
248         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. 
249         * method.c (make_thunk): Handle vcall indices.
250         
251 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
253         Compiler side new abi rtti (not enabled).
254         * cp-tree.h (new_abi_rtti_p): New macro.
255         (emit_support_tinfos): Prototype new function.
256         (tinfo_decl_p): Likewise.
257         (emit_tinfo_decl): Likwise.
258         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
259         macros.
260         (doing_runtime): New local static.
261         (init_rtti_processing): Add new-abi initializer.
262         (get_tinfo_decl): Add new-abi logic.
263         (tinfo_from_decl): Likewise.
264         (build_dynamic_cast_1): Likewise.
265         (qualifier_flags): New static function.
266         (tinfo_base_init): Likewise.
267         (generic_initializer): Likewise.
268         (ptr_ref_initializer): Likewise.
269         (ptmd_initializer): Likewise.
270         (class_hint_flags): Likewise.
271         (class_initializer): Likewise.
272         (synthesize_tinfo_var): Likewise.
273         (create_real_tinfo_var): Likewise.
274         (create_pseudo_type_info): Likewise.
275         (get_vmi_pseudo_type_info): Likewise.
276         (create_tinfo_types): Likewise.
277         (emit_support_tinfos): New global function.
278         (tinfo_decl_p): New global predicate.
279         (emit_tinfo_decl): New global function.
280         * class.c (set_rtti_entry): Generalize for old and new rtti.
281         (build_vtbl_initializer): Likewise.
282         * decl2.c (finish_file): Likewise.
284 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
286         * cp/optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
287         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
289 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
291         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
292         for scopes.
294 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
296         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
298 Wed Jan 26 22:19:14 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
300         * cp/optimize.c (calls_setjmp_r): Supply new argument
301         to special_function_p.
303 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
305         * call.c: PROTO -> PARAMS.
306         * class.c: Likewise.
307         * cp-tree.h: Likewise.
308         * cvt.c: Likewise.
309         * decl.c: Likewise.
310         * decl.h: Likewise.
311         * decl2.c: Likewise.
312         * dump.c: Likewise.
313         * errfn.c: Likewise.
314         * error.c: Likewise.
315         * except.c: Likewise.
316         * expr.c: Likewise.
317         * init.c: Likewise.
318         * input.c: Likewise.
319         * lex.c: Likewise.
320         * lex.h: Likewise.
321         * method.c: Likewise.
322         * optimize.c: Likewise.
323         * parse.y: Likewise.
324         * pt.c: Likewise.
325         * repo.c: Likewise.
326         * rtti.c: Likewise.
327         * search.c: Likewise.
328         * semantics.c: Likewise.
329         * spew.c: Likewise.
330         * tree.c: Likewise.
331         * typeck.c: Likewise.
332         * typeck2.c: Likewise.
333         * xref.c: Likewise.
335 2000-01-25  Richard Henderson  <rth@cygnus.com>
337         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
339 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
341         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
342         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
343         (struct vcall_offset_data_s): New type.
344         (dfs_vcall_offset_queue_p): New function.
345         (dfs_build_vcall_offset_vtbl_entries): Likewise.
346         (build_vcall_offset_vtbl_entries): Likewise.
347         (layout_vtable_decl): Likewise.
348         (num_vfun_entries): Likewise.
349         (num_extra_vtbl_entries): Add the entries for vcall offsets.
350         (build_vtbl_initializer): Likewise.
351         (dfs_finish_vtabls): Use layout_vtable_decl.
352         (modify_one_vtables): Always duplicate vtables under the new ABI.
353         (finish_struct_1): Use layout_vtable_decl.
354         
355 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
357         * decl.c (member_function_or_else): Change third arg from a format
358         specifier to an `enum overload_flags'.  Callers changed.
360 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
362         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
363         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
364         build_const_cast, get_delta_difference, check_return_expr): Avoid
365         ANSI string concatenation usage.  
367 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
369         * class.c (layout_class_type): Put the fields required to make a
370         class non-empty at the end, not the beginning, of the TYPE_FIELDs
371         list.
373 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
375         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
376         template.
378         * decl2.c (mark_used): Do instantiate inlines that have been
379         explicitly instantiated.
381 2000-01-24  Richard Henderson  <rth@cygnus.com>
383         * call.c (build_over_call): Use expand_tree_builtin.
384         * typeck.c (build_function_call_real): Likewise.
385         (build_binary_op_nodefault): Handle unordered compares.
387 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
389         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
390         cp_tree_index values.
391         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
392         New global node #defines for them.
393         * rtti.c (call_void_fn): Replace with ...
394         (build_runtime_decl): ... new static function.
395         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
396         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
397         (build_dynamic_cast_1): Always produce correctly typed result.
398         Explicitly produce type_info addresses. Use dynamic_cast_node.
399         * exception.cc (__throw_bad_cast): Return `void *'.
400         (__throw_bad_typeid): Return `const type_info &'.
402 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
404         * cp-tree.h (get_vtable_decl): Prototype new function.
405         * class.c (get_vtable_decl): New function. Broken out from ...
406         (build_vtable): ... here. Use it.
407         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
408         by get_vtable_decl.
410 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
412         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
413         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
414         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
415         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
416         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
417         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
418         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
419         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
420         (CPTI_TINFO_VAR_ID): New enumeration.
421         (__tp_desc_type_node, __access_mode_type_node,
422         __bltn_desc_type_node, __user_desc_type_node,
423         __class_desc_type_node, __ptr_desc_type_node,
424         __attr_desc_type_node, __func_desc_type_node,
425         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
426         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
427         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
428         enum_desc_type_node, class_desc_type_node,
429         si_class_desc_type_node, vmi_class_desc_type_node,
430         ptmd_desc_type_node, base_desc_type_node): New #defines.
431         (tinfo_fn_id, tinfo_fn_type): Rename to ...
432         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
433         (tinfo_var_id): New enumeration.
434         (DECL_TINFO_FN_P): Augment comment.
435         * decl.c (cp_global_trees): Adjust documentation.
436         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
437         tinfo_decl_type and tinfo_var_id.
438         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
439         (build_typeid): Remove unused variable.
440         (get_tinfo_var): Use tinfo_var_id.
441         (tinfo_name): New static function.
442         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
443         (tinfo_from_decl): Likewise.
444         (get_base_offset): New static function, broken out of
445         expand_class_desc.
446         (expand_si_desc): Use tinfo_name.
447         (expand_class_desc): Likewise. Lose local static variable.
448         Use base_desc_type_node. Use get_base_offset.
449         (expand_ptr_desc): Use tinfo_name.
450         (expand_attr_desc): Likewise.
451         (expand_generic_desc): Likewise.
453         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
454         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
456 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
458         * cp-tree.h (__eprintf): Remove declaration.
459         * tree.c (__eprintf): Remove definition.
461 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
462             Mark Mitchell  <mark@codesourcery.com>
464         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
465         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
467 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
469         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
471 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
473         * cp-tree.h (register_dtor_fn): New function.
474         * decl.c (destroy_local_static): Rename to ...
475         (register_dtor_fn): ... this.  Give it external linkage.
476         (expand_static_init): Use it.
477         * decl2.c (do_static_initialization): Likewise, if using
478         __cxa_atexit.
479         (do_static_destruction): Check that __cxa_atexit is not in use.
480         (finish_file): Don't call do_static_destruction if using
481         __cxa_atexit.
483         * typeck.c (convert_arguments): Restore two-message error
484         reporting.
485         
486 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
488         Remap dynamic cast hint values to be consistent across ABIs.
489         * search.c (dynamic_cast_base_recurse): Remap generated value.
490         (get_dynamic_cast_base_type): Adjust documentation.
491         * tinfo.h (__user_type_info::dyncast): Likewise.
492         (__user_type_info::find_public_subobj): Remap BOFF meaning.
493         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
494         (__class_type_info::do_dyncast): Likewise.
495         (__class_type_info::do_find_public_subobj): Likewise.
496         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.     
498 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.coom>
500         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
502         * typeck2.c (incomplete_type_error): Restore previous
503         cp_error and cp_error_at call sequence.
504         
505 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
507         * class.c (dump_class_hierarchy): Make format agree with argument;
508         cast pointer to unsigned long and print with %lx.
509         
510 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery>
512         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
513         
514         * typeck.c (composite_pointer_type, common_type,
515         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
516         build_function_call_real, convert_arguments,
517         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
518         build_unary_op, mark_addressable, build_compound_expr,
519         build_static_cast, build_reinterpret_cast, build_const_cast,
520         build_c_cast, build_modify_expr, get_delta_difference,
521         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with 
522         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
523         into a single one.
524         * typeck2.c (readonly_error, abstract_virtuals_error,
525         process_init_constructor, check_for_new_type): Likewise.
527 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
529         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
530         VAR_DECLs.
532 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
534         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
535         (build_x_typeid): Likewise.
536         (get_tinfo_fn): Likewise.
537         (get_tinfo_fn_unused): Rename to ...
538         (get_tinfo_decl): ... here.
539         * rtti.c (build_headof): Replace logic error with assertion.
540         (get_tinfo_fn_dynamic): Rename to ...
541         (get_tinfo_decl_dynamic): ... here. Make static. Use
542         complete_type_or_else.
543         (build_x_typeid): Move into ...
544         (build_typeid): ... here. Adjust call to
545         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
546         throw_bad_typeid expression.
547         (get_tinfo_fn_unused): Rename to ...
548         (get_tinfo_decl): ... here. Adjust comment.
549         (get_tinfo_fn): Delete.
550         (tinfo_from_decl): New static function.
551         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
552         (get_typeid): Use complete_type_or_else.
553         (build_dynamic_cast_1): Adjust calls to
554         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
555         * parse.y (primary): Adjust call to build_typeid.
556         * except.c (build_eh_type_type_ref): Adjust call to
557         get_tinfo_decl. Mark as used.
558         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
559         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
560         * parse.c: Regenerated.
562 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
564         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
565         calling convention.
566         (resolves_to_fixed_type_p): Document calling convention.
567         * rtti.c (build_x_typeid): Initialize NONNULL.
569         * cp-tree.h (build_shared_int_cst): New function.
570         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
571         * class.c (modify_vtable_entry): Likewise.
572         (add_virtual_function): Split out code to generated shared
573         INTEGER_CSTs to build_share_int_cst.
574         (modify_all_vtables): Handle all the overridden functions here.
575         Add overridden functions from non-primary virtual bases to the
576         primary vtable.
577         (finish_struct_1): Adjust call to modify_all_vtables.  Add
578         overridden functions from non-primary bases to the vtable.
579         * tree.c (build_shared_int_cst): New function.
580         
581         * cp-tree.h (scratchalloc): Remove.
582         (build_scratch_list): Likewise.
583         * call.c (convert_class_to_reference): Replace build_scratch_list
584         and build_expr_list with build_tree_list.
585         (add_candidate): Replace scratchalloc with expralloc.  Note memory
586         leak.
587         (build_user_type_conversion_1):  Replace build_scratch_list
588         and build_expr_list with build_tree_list.
589         (build_new_op): Likewise.
590         (build_op_delete_call): Likewise.
591         (convert_like): Likewise.
592         * cvt.c (ocp_convert): Likewise.
593         * decl.c (start_decl): Likewise.
594         (start_function): Likewise.
595         (finish_destructor_body): Likewise.
596         (maybe_build_cleanup_1): Likewise.
597         * decl2.c (reparse_decl_as_expr): Likewise.
598         * init.c (perform_member_init): Likewise.
599         (expand_cleanup_for_base): Likewise.
600         (build_builtin_delete_call): Likewise.
601         (build_new_1): Likewise.
602         (build_delete): Likewise.
603         * method.c (do_build_assign_ref): Likewise.
604         * parse.y (already_scoped_stmt): Likewise.
605         (nontrivial_exprlist): Likewise.
606         (net_initializer): Likewise.
607         (initlist): Likewise.
608         * parse.c: Regenerated.
609         * rtti.c (build_x_typeid): Likewise.
610         (build_dynamic_cast_1): Likewise.
611         * typeck.c (build_x_compound_expr): Likewise.
612         (build_static_cast): Likewise.
613         (build_modify_expr): Likewise.
614         
615         * cp-tree.h (DECL_VINDEX): Add documentation.
616         * class.c (build_vtable_entry): Likewise.
617         (start_vtable): Add comment.
618         (add_virtual_function): Replace pending_hard_virtuals with
619         overridden_virtuals and pending_virtuals with new_virtuals.
620         Replace redundant assignments with assertions.
621         (check_for_override): Add comment.
622         (check_bases_and_members): Replace pending_hard_virtuals with
623         overridden_virtuals and pending_virtuals with new_virtuals.
624         (create_vtbl_ptr): Likewise.
625         (layout_class_type): Likewise.
626         (finish_struct_1): Likewise.  Add comments.
627         
628 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
630         * class.c (finish_struct_1): Replace redundant code with
631         assertions.
633         * cp-tree.h (flag_new_abi): Move.
634         (flag_use_cxa_atexit): Likewise.
635         (flag_honor_std): Likewise.
636         (flag_rtti): Likewise.
637         (vbase_offsets_in_vtable_p): Define.
638         (vptrs_present_everywhere_p): Likewise.
639         (TYPE_CONTAINS_VPTR_P): Likewise.
640         (dfs_walk_real): Declare.
641         * class.c (build_vbase_pointer_fields): Check
642         vbase_offsets_in_vtable_p.
643         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
644         BINFO_VPTR_FIELD.
645         (build_vbase_offset_vtbl_entries): Simplify.
646         (build_vbase_offset_vtbl_entries): Adjust.
647         (build_vbase_pointer): Add ability to look up vbase offsets in
648         vtable. 
649         (start_vtable): New function.
650         (add_virtual_function): Use it.
651         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
652         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
653         (build_vtbl_initializer): Take the type of the complete object as
654         input.  Use it to correctly calculate vbase offsets.
655         (dfs_finish_vtbls): Pass the complete type to
656         build_vtbl_initializer.
657         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
658         (create_vtable_ptr): Create a vtable even if there are no
659         new virtual functions, under the new ABI.
660         (finish_struct_1): Likewise.
661         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
662         * decl.c (exapnd_static_init): Remove call to
663         preserve_initializer.
664         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
665         vtables.
666         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
667         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
668         (construct_virtual_bases): Don't initialize virtual base pointers
669         under the new ABI.
670         (build_aggr_init): Clean up comment.
671         (expand_aggr_init_1): Likewise.
672         * rtti.c (expand_class_desc): Store the virtual function table
673         index where the vbase offset lives in the offset field.
674         * search.c (dfs_walk_real): Make it global.
675         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
676         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
677         
678         * tinfo.h (USItype): Make it signed under the new ABI.
679         * tinfo.cc (convert_to_base): New function.  Encapsulate base
680         conversion logic here.
681         (__class_type_info::do_upcast): Use it.
682         (__class_type_info::do_dyncast): Likewise.
683         (__class_type_info::do_find_public_subobj): Likewise.
684         
685         * init.c (construct_virtual_bases): Don't look up the addresses of
686         virtual bases at run-time.
688         * class.c (build_vbase_pointer): Relocate.
689         (build_vbase_pointer_fields): Likewise.
690         (dfs_build_vbase_offset_vtbl_entries): Likewise.
691         (build_vbase_offset_vtbl_entries): Likewise.
693         * decl.c (init_decl_processing): Complain if -fnew-abi
694         -fno-vtable-thunks is used.
696         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
697         flag_new_abi.
699 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
701         * cp-tree.h (num_extra_vtbl_entries): New function.
702         (size_extra_vtbl_entries): Likewise.
703         (dfs_vtable_path_unmark): Likewise.
704         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
705         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
706         * class.c (num_extra_vtbl_entries): New function.
707         (size_extra_vtbl_entries): Likewise.
708         (dfs_build_vbase_offset_vtbl_entries): New function.
709         (build_vbase_offset_vtbl_entries): Likewise.
710         (build_vtbl_initializer): Use it.
711         (finish_struct_1): Adjust vtable sizes (using
712         num_extra_vtbl_entries).
713         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
714         THUNK_DECL is non-NULL before expanding it.
715         * init.c (expand_virtual_init): Adjust the vtable pointer by
716         size_extra_vtbl_entries before storing it.
717         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
718         Handle TREE_LIST parameters here, not in the dfs_* functions.
719         (dfs_unmarked_real_bases_queue_p): Adjust.
720         (dfs_marked_real_bases_queue_p): Likewise.
721         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
722         (dfs_vtable_path_marked_real_bases_queue_p): New function.
723         (dfs_vtable_path_unmark): Likewise.
724         
725 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
727         * optimize.c (copy_body_r): Clear the operand three of a
728         TARGET_EXPR when copying it.
730 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
732         * method.c (build_decl_overload_real): Check whether we are in ::
733         before returning __builtin_new/delete.
735 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
737         * pt.c (tsubst_friend_function): Improve comment.
738         (instantiate_decl): Avoid crashing when a "nested" function is
739         instantiated from the top level.
740         
741         * dump.c (dqeueue_and_dump): Dump
742         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
744 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
746         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
748 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
750         * g++spec.c (lang_specific_driver): Add -fnew-abi if
751         ENABLE_NEW_GXX_ABI defined.
752         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
753         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
754         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
756 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
758         * decl.c (start_cleanup_fn): Call pushdecl.
760         * call.c (convert_class_to_reference): Fix typos.
761         (build_conditional_expr): Handle errors gracefully.
762         * class.c (push_nested_class): Likewise.
763         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
764         (DECL_THIS_EXTERN): Use it.
765         (DECL_THIS_STATIC): Likewise.
766         * cvt.c (convert_to_void): Handle errors gracefully.
767         (build_expr_type_conversion): Likewise.
768         * decl.c (maybe_push_decl): Likewise.
769         (start_decl_1): Likewise.
770         (require_complete_types_for_parms): Likewise.
771         * parse.y (structsp): Likewise.
772         (base_class): Likewise.
773         * parse.c: Regenerated.
774         * pt.c (finish_member_template_decl): Likewise.
775         * typeck.c (decay_conversion): Likewise.
776         
777         * cp-tree.h (dfs_skip_vbases): New function.
778         (find_vbase_instance): Likewise.
779         * class.c (determine_primary_base): Allow a nearly empty base to
780         serve as a primary base class under the new ABI.
781         (get_class_offset_1): Rename to ...
782         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
783         messages here.
784         (get_class_offset): Use it.  Issue error messages here.
785         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
786         find the right copies of virtual bases.
787         (fixup_vtable_deltas1): Rename to ...
788         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
789         bases as primary bases.
790         (fixup_vtable_deltas): Remove.
791         (override_one_vtable): Handle virtual bases as primary bases.
792         (merge_overrides): Likewise.
793         (finish_struct_1): Likewise.
794         (dump_class_hierarchy): Dump primary-ness of bases as well.
795         * search.c (mark_primary_bases): Use a pre-order traversal to
796         handle primary virtual bases.
797         (dfs_skip_vbases): New fiunction.
798         (expand_upcast_fixups): Adjust to handle primary virtual bases.
799         (fixup_virtual_upcast_offsets): Likewise.
800         (fixup_all_virtual_upcast_offsets): Likewise.
801         (dfs_find_vbase_instances): New function.
802         (find_vbase_instance): Likewise.
803         
804 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
806         * lex.c (DIR_SEPARATOR): Delete macro.
808 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
810        * decl2.c (lang_decode_option): Handle automatic line wrapping
811        option.
812         
813 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
815         * friend.c (do_friend): Don't resolve scopes when processing
816         template declarations, even if the qualifying scope doesn't
817         involve template parameters.
819 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
821         * class.c (dfs_modify_vtables_queue_p): Remove.
822         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
823         and dfs_marked_real_bases_queue_p instead of
824         dfs_modify_vtables_queue_p.
826         * class.c (build_vbase_path): Simplify.
827         (dfs_propagate_binfo_offsets): New function.
828         (propagate_binfo_offsets): Use it.
829         (remove_base_field): Simplify.
830         (dfs_set_offset_for_vbases): Remove.
831         (dfs_set_offset_for_shared_vbases): New function.
832         (dfs_set_offset_for_unshared_vbases): Likewise.
833         (layout_virtual_bases): Use them.
834         (layout_basetypes): Don't call propagate_binfo_offsets.
835         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
836         for the vbases.
837         
838         * class.c (build_base_field): New function, split out from ...
839         (build_base_fields): ... here.  Use it.  Allocate primary bases
840         first, under the new ABI.
841         (get_vtable_entry): Remove.
842         (remove_base_field): New function, split out from ...
843         (remove_base_fields): ... here.  Adjust since primary bases come
844         first under the new ABI.
845         
846         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
847         (initialize_vtbl_ptrs): New function.
848         (expand_indirect_vtbls_init): Change prototype.
849         (convert_pointer_to_vbase): Declare.
850         * init.c (expand_direct_vtbls_init): Remove.
851         (dfs_initialize_vtbl_ptrs): New function.
852         (initialize_vtbl_ptrs): Likewise.
853         (emit_base_init): Use initialize_vtbl_ptrs.
854         * search.c (convert_pointer_to_vbase): Make it global.
855         (expand_indirect_vtbls_init): Remove vtable initialization code.
856         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
857         
858         * class.c (dfs_finish_vtbls): New function.
859         (finish_vtbls): Use it.
860         (dump_class_hierarchy): New function.
861         
862         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
863         (BINFO_VBASE_PRIMARY_P): New macro.
864         (BINFO_VIRTUALS): Add to documentation.
865         (SET_BINFO_PRIMARY_MARKED_P): Remove.
866         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
867         (dfs_mark_primary_bases_queue_p): Likewise.
868         (dfs_unmarked_real_bases_queue_p): New function.
869         (dfs_marked_real_bases_queue_p): Likewise.
870         * search.c (dfs_mark_primary_bases): Adjust.
871         (mark_primary_bases): Likewise.
872         (get_shared_vbase_if_not_primary): New function.
873         (dfs_unmarked_real_bases_queue_p): Likewise.
874         (dfs_marked_real_bases_queue_p): Likewise.
875         (dfs_get_pure_virtuals): Simplify.
876         (get_pure_virtuals): Likewise.
877         
878 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
880         * lex.c: Include tm_p.h.
882 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
884         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
886 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
888         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
889         * pt.c (instantiate_decl): Defer comdat templates that might not be
890         needed.
891         
892         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
893         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
894         (finish_file): Likewise.
896         * decl2.c (import_export_class): Undo 12/14 change.
898         * error.c (dump_decl): operator new, not operatornew.
900         * class.c (field_decl_cmp): A nontype is "greater" than a type.
901         * search.c (lookup_field_1): Look for the last field with the
902         desired name.
904 2000-01-05  Nathan Sidwell  <nathan@acm.org>
906         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
907         FUNCTION_DECL.
909 2000-01-05  Nathan Sidwell  <nathan@acm.org>
911         * typeck.c (build_static_cast): Don't strip target qualifiers
912         when casting from a class.
914 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
916         * class.c (warn_hidden): Initialize variable `fndecl'.
918 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
920         * decl.c (flag_isoc9x): New variable to be able to use code in
921         c-common.c.  For now always zero.
923 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
925         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
926         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
927         or unshare_base_binfos for virtual bases here.
928         * search.c (dfs_get_vbase_types): Do it here.
929         (get_vbase_types): Adjust.
930         
931 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
933         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
934         (BINFO_PRIMARY_MARKED_P): Use flag 5.
935         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
936         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
937         (unmark_primary_bases): Remove declaration.
938         (unmarkedp): Declare.
939         (dfs_vbase_unmark): Likewise.
940         * class.c (determine_primary_base): Return immediately if there
941         are no base classes.  Call mark_primary_bases here.
942         (modify_all_direct_vtables): Remove.
943         (modify_all_indirect_vtables): Remove.
944         (dfs_modify_vtables_queue_p): New function.     
945         (dfs_modify_vtables): New function.
946         (modify_all_vtables): Use them.
947         (build_base_fields): Build FIELD_DECLs for primary virtual base
948         classes.
949         (create_vtable_ptr): Don't call determine_primary_base here.
950         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
951         (dfs_set_offset_for_vbases): ... this.
952         (layout_virtual_bases): Use it.
953         (layout_class_type): Call determine_primary_base here.
954         * search.c (unmarkedp): Make it global.
955         (shared_marked_p): Simplify.
956         (shared_unmarked_p): Likewise.
957         (dfs_primary_bases_queue_p): Remove.
958         (dfs_unmark_primary_bases): Likewise.
959         (unmark_primary_bases): Likewise.
960         (mark_primary_bases): Simplify.
961         (get_pure_virtuals): Don't call mark_primary_bases here.
962         (dfs_vbase_unmark): New function.
963         (get_vbase_types): Simplify.
965         * class.c (struct base_info): Remove.
966         (determine_primary_base): Take has_virtual_p rather than a
967         base_info as input.  Don't calculate max_has_virtual.
968         (finish_struct_bits): Remove max_has_virtual argument.
969         (create_vtable_ptr): Remove max_has_virtual_p argument.
970         (layout_virtual_bases): Remove max argument.
971         (layout_basetypes): Likewise.
972         (layout_class_type): Remove max_has_virtual_p argument.
973         (finish_struct_1): Remove max_has_virtual.
975         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
976         (layout_basetypes): Remove.
977         * class.c (propagate_binfo_offsets): Moved here from tree.c.
978         Update to handle primary virtual bases.
979         (remove_base_fields): New function, split out from
980         layout_basetypes.
981         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
982         (layout_virtual_bases): New function, split out from
983         layout_basetypes.  Update to handle primary virtual bases.
984         (layout_basetypes): Moved here from tree.c.  Use
985         remove_base_fields and layout_virtual_bases.
986         * search.c (dfs_mark_primary_bases_queue_p): New function.
987         (mark_primary_bases): Use it.
988         * tree.c (CEIL): Remove.
989         (propagate_binfo_offsets): Remove.
990         (layout_basetypes): Remove.
991         
992 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
994         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
995         (BINFO_PRIMARY_MARKED_P): New macro.
996         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
997         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
998         (mark_primary_bases): New function.
999         (unmark_primary_bases): Likewise.
1000         * search.c (get_abstract_virtuals_1): Remove.
1001         (dfs_mark_primary_bases): New function.
1002         (mark_primary_bases): Likewise.
1003         (dfs_unmark_primary_bases): Likewise.
1004         (unmark_primary_bases): Likewise.
1005         (dfs_get_pure_virtuals): Likewise.
1006         
1007 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
1009         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
1010         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
1011         (modify_one_vtable): Adjust.
1012         (fixup_vtable_deltas1): Likewise.
1013         (override_one_vtable): Likewise.
1014         * search.c (get_abstract_virtuals_1): Likewise.
1015         (get_pure_virtuals): Likewise.
1016         (expand_upcast_fixups): Likewise.
1017         * tree.c (debug_binfo): Likewise.
1018         
1019         * class.c (build_vtable): Don't return a value.  Don't rebuild
1020         vtables for bases that have already been handled.
1021         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
1022         already been handled.
1023         (modify_one_vtable): Adjust accordingly.
1024         (fixup_vtable_deltas1): Likewise.
1025         (finish_struct_1): Likewise.
1027 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1029         * call.c (build_new_method_call): Also check destructors.
1031 1999-12-31  Mark Mitchell  <mark@codesourcery.com>
1033         * cp-tree.h (VF_NORMAL_VALUE): Remove.
1034         * class.c (struct base_info): Remove vfield, vfields, and rtti.
1035         (set_primary_base): New function, split out from ...
1036         (finish_base_struct): ... here.  Rename to ...
1037         (determine_primary_base): ... this.  Simplify.
1038         (create_vtable_ptr): Tweak accordingly.
1039         (finish_struct_1): Simplify.
1040         
1041         * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
1042         (CLASSTYPE_N_BASECLASSES): Likewise.
1043         (BINFO_FOR_VBASE): New macro.
1044         (get_vbase_types): Change prototype.
1045         * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
1046         (prepare_fresh_vtable): Likewise.
1047         (finish_vtbls): Likewise.
1048         (get_class_offset_1): Likewise.
1049         (modify_all_indirect_vtables): Likewise.
1050         (build_vbase_pointer_fields): Likewise.
1051         * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
1052         * init.c (sort_base_init): Use BINFO_FOR_VBASE.
1053         (expand_member_init): Likewise.
1054         * search.c (get_base_distance): Likewise.
1055         (lookup_field_queue_p): Likewise.
1056         (virtual_context): Likewise.
1057         (get_vbase_types): Don't return a value.  Set
1058         CLASSTYPE_VBASECLASSES here.
1059         * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
1060         
1061 1999-12-30  Mark Mitchell  <mark@codesourcery.com>
1063         * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
1065 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
1067         * class.c (create_vtable_ptr): Put the vtable at the beginning of
1068         the class, not the end, in the new ABI.
1069         * tree.c (propagate_binfo_offsets): Do the right thing for the new
1070         ABI.
1072 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
1074         * cp-tree.h (lang_type): Add nearly_empty_p.  Adjust dummy.
1075         (CLASSTYPE_NEARLY_EMPTY_P): New macro.
1076         * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
1077         (check_field_decls): Likewise.
1078         (check_bases_and_members): Likewise.
1080 1999-12-28  Mark Mitchell  <mark@codesourcery.com>
1082         * cp-tree.h (do_inline_function_hair): Remove.
1083         * class.c (layout_class_type): New function, split out from
1084         finish_struct_1.
1085         (fixup_pending_inline): Likewise.
1086         (fixup_inline_methods): New function.
1087         * method.c (fixup_pending_inline): Remove.
1088         (do_inline_function_hair): Likewise.
1089         
1090         * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
1091         new ABI.
1092         
1093         * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
1094         (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
1095         (CLASSTYPE_PURE_VIRTUALS): ... this.
1096         (lang_decl_flags): Replace abstract_virtual with pure_virtual.
1097         (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
1098         (DECL_PURE_VIRTUAL_P): ... this.
1099         (get_abstract_virtuals): Rename to ...
1100         (get_pure_virtuals): ... this.
1101         * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
1102         DECL_ABSTRACT_VIRTUAL_P.  Replace CLASSTYPE_ABSTRACT_VIRTUALS with
1103         CLASSTYPE_PURE_VIRTUALS.
1104         * class.c (build_vtable_entry): Likewise.
1105         (finish_struct_bits): Likewise.  Call get_pure_virtuals, not
1106         get_abstract_virtuals.
1107         (build_vtbl_initializer): Likewise.
1108         (override_one_vtable): Likewise.
1109         (check_methods): Likewise.
1110         * decl.c (duplicate_decls): Likewise.
1111         (redeclaration_error_message): Likewise.
1112         (lang_mark_tree): Likewise.
1113         * decl2.c (grok_function_init): Likewise.
1114         (import_export_vtable): Likewise.
1115         (import_expor_class): Likewise.
1116         * typeck2.c (abstract_virtuals_error): Likewise.
1117         * xref.c (GNU_xref_member): Likewise.
1118         * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
1119         
1120 1999-12-26  Zack Weinberg  <zack@wolery.cumb.org>
1122         * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
1123         throughout.
1125 1999-12-26  Mark Mitchell  <mark@codesourcery.com>
1127         * decl.c (store_return_init): Use mode of old RTL generated for
1128         DECL_RESULT, not the mode of DECL_RESULT itself.
1129         * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
1130         for functions that used named return values.
1131         
1132 1999-12-24  Mark Mitchell  <mark@codesourcery.com>
1134         * semantics.c (expand_body): Use
1135         note_deferral_of_defined_inline_function.
1137 1999-12-22  Mark Mitchell  <mark@codesourcery.com>
1139         * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
1141 1999-12-22  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
1143         * error.c (dump_decl): Support named return values.
1145 1999-12-20  Mark Mitchell  <mark@codesourcery.com>
1147         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
1148         (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
1149         (CLASSTYPE_PRIMARY_BINFO): Likewise.
1150         * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
1151         TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
1152         (check_bases_and_members): Set them here instead.
1153         (create_vtable_ptr): New function, split out from ...
1154         (finish_struct_1): ... here.  Use it.  Tidy.  Use
1155         CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
1156         * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
1157         the first field in the class.
1158         * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES.  Handle
1159         seeing TYPE_VFIELD as the first field in the class.
1160         
1161         * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
1162         (TYPE_POLYMORPHIC_P): ... this.
1163         (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
1164         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
1165         (TREE_CALLS_NEW): Remove.
1166         (TREE_MANGLED): Likewise.
1167         * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
1168         and TYPE_POLYMORPHIC_P.
1169         * class.c (check_bases): Likewise.
1170         (finish_base_struct): Likewise.
1171         (finish_struct_bits): Likewise.
1172         (check_for_override): Likewise.
1173         (finish_struct_1): Likewise.
1174         (get_vfield_name): Likewise.
1175         * decl.c (xref_basetypes): Likewise.
1176         * decl2.c (import_export_class): Likewise.
1177         (import_export_decl): Likewise.
1178         * error.c (dump_function_decl): Likewise.
1179         * pt.c (instantiate_class_template): Likewise.
1180         * repo.c (repo_inline_used): Likewise.
1181         * rtti.c (build_headof): Likewise.
1182         (get_tinfo_fn_dynamic): Likewise.
1183         (build_x_typeid): Likewise.
1184         (get_tinfo_var): Likewise.
1185         (build_dynamic_cast_1): Likewise.
1186         (synthesize_tinfo_fn): Likewise.
1187         * search.c (lookup_field_1): Likewise.
1188         (dfs_debug_mark): Likewise.
1189         (maybe_suppress_debug_info): Likewise.
1190         * typeck.c (build_component_ref): Likewise.
1191         (build_component_addr): Likewise.
1192         * typeck2.c (process_init_constructor): Likewise.
1193         
1194 1999-12-20  Nathan Sidwell  <nathan@acm.org>
1196         * typeck.c (strip_all_pointer_quals): New static function.
1197         (build_static_cast): Use it. Don't use at_least_as_qualified_p.
1199 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
1201         * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
1202         (dso_handle_node): New macro.
1203         (flag_use_cxa_atexit): New variable.
1204         (declare_global_var): New function.
1205         (start_anon_func): Remove declaration.
1206         (end_anon_func): Likewise.
1207         * decl.c (get_atexit_node): New function, split out from
1208         destroy_local_static.  Handle flag_use_cxa_atexit.
1209         (get_dso_handle_node): Likewise.
1210         (start_cleanup_fn): Renamed from start_anon_func.  Moved here from
1211         except.c.  Handle flag_use_cxa_atexit.
1212         (end_cleanup_fn): Renamed from end_anon_func.  Moved here from
1213         except.c.
1214         (declare_global_var): New variable.
1215         (destroy_local_static): Handle flag_use_cxa_atexit.
1216         * decl2.c (flag_use_cxa_atexit): New variable.
1217         (lang_f_options): Likewise.
1218         * except.c (start_anon_func): Remove.
1219         (end_anon_func): Liekwise.
1220         * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
1221         * rtti.c (get_tinfo_var): Use declare_global_var.
1223 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
1225         * class.c (check_field_decls): Don't return a value.
1226         (avoid_overlap): Moved here from tree.c.
1227         (build_base_fields): Likewise.
1228         (check_bases): New function, split out from finish_base_struct.
1229         (check_bases_and_members): New function, split out from 
1230         finish_struct_1.
1231         (struct base_info): Remove cant_have_default_ctor,
1232         cant_have_const_ctor, cant_have_asn_ref.
1233         (finish_base_struct): Split semantic analysis into check_bases.
1234         (finish_struct_methods): Fix bogus assertion.
1235         (check_field_decls): Call finish_struct_anon here.
1236         (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
1237         (finish_struct_1): Use check_bases_and_members.  Reorganize.
1238         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
1239         (build_base_fields): Don't declare.
1240         * tree.c (avoid_overlap): Remove.
1241         (build_base_fields): Likewise.
1242         
1243         * optimize.c (struct inline_data): Remove scope_stmt.
1244         (remap_block): Don't use insert_block_after_note.  Don't update
1245         scope_stmt.
1246         (expand_call_inline): Don't update scope_stmt.
1247         (optimize_function): Don't initialize scope_stmt.
1248         * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
1249         NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
1251 1999-12-15  Mark Mitchell  <mark@codesourcery.com>
1253         * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
1254         out of the class, rather than taking them as parameters.
1255         (build_vbase_pointer_fields): Move here from tree.c.
1256         (build_vtbl_or_vbase_field): New function.
1257         (check_methods): Likewise.
1258         (remove_zero_width_bitfields): Likewise.
1259         (add_virtual_function): Use tree_cons instead of temp_tree_cons.
1260         (delete_duplicate_fields_1): Tidy.  Don't delete duplicate
1261         USING_DECLs here.
1262         (finish_struct_methods): Handle the case where there are no
1263         methods here.
1264         (get_basefndecls): Use tree_cons instead of temp_tree_cons.
1265         (check_field_decls): Call delete_duplicate_fields here.
1266         (finish_struct_1): Tidy.  Use check_methods and
1267         remove_zero_width_bitfields.
1268         * cp-tree.h (build_vbase_pointer_fields): Remove.
1269         * decl.c (grokdeclarator): Use tree_cons instead of
1270         temp_tree_cons.
1271         * decl2.c (qualified_lookup_using_namespace): Use tree_cons
1272         instead of temp_tree_cons.
1273         * lex.c (cons_up_default_function): Remove dead code.
1274         * method.c (fixup_pending_inline): New function, split out from ...
1275         (do_inline_function_hair): ... here.
1276         * tree.c (build_vbase_pointer_fields): Remove.
1277         
1278 1999-12-15  Jason Merrill  <jason@casey.cygnus.com>
1280         * tree.c (walk_tree): Walk operand subtrees in forward order.
1281         * optimize.c (expand_call_inline): Likewise.
1282         (optimize_function): Initialize id->scope_stmt to something useful.
1283         (remap_block): Assume id->scope_stmt has a useful value.
1285 1999-12-15  Nathan Sidwell  <nathan@acm.org>
1287         * typeck.c (build_c_cast): Expand warning message. Move pointer
1288         alignment warning to after the cast. Don't warn about pointer
1289         alignment when given a pointer to incomplete.
1291 1999-12-15  Richard Henderson  <rth@cygnus.com>
1293         * cp-tree.h (make_aggr_type): Declare.
1294         * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
1295         (make_aggr_type): New.
1297         * decl.c (build_typename_type, init_decl_processing): Use it.
1298         (build_ptrmemfunc_type, xref_tag): Likewise.
1299         * except.c (call_eh_info): Likewise.
1300         * init.c (init_init_processing): Likewise.
1301         * pt.c (process_template_parm, lookup_template_class): Likewise.
1302         * rtti.c (expand_class_desc): Likewise.
1303         * semantics.c (begin_class_definition, finish_typeof): Likewise.
1304         * tree.c (copy_template_template_parm): Likewise.
1306 1999-12-15  Jason Merrill  <jason@yorick.cygnus.com>
1308         * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
1309         sizeof (struct tree_common).
1311 1999-12-14  Jason Merrill  <jason@casey.cygnus.com>
1313         * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
1314         outermost block to point to the inlined function decl.
1316         * error.c (dump_decl): operator==, not operator ==.
1317         (op_to_string): Likewise.
1319         * decl.c (compute_array_index_type): Handle null name.
1321         * decl2.c (ambiguous_decl): Fix to match comment.
1322         (lookup_using_namespace): Adjust.
1324         * decl2.c (import_export_class): Don't ignore dllimport.
1326 1999-12-14  Mark Mitchell  <mark@codesourcery.com>
1328         * class.c (check_field_decls): Split out from ...
1329         (finish_struct_1): ... here.  Use it.  Tidy.
1331         * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
1332         * optimize.c (copy_body_r): Pass it.
1333         * tree.c (remap_save_expr): Clear walk_subtrees for an
1334         already-handled SAVE_EXPR.
1335         (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
1337         * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
1338         * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
1340         * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
1342 1999-12-14  Mumit Khan  <khan@xraylith.wisc.edu>
1344         * class.c (finish_base_struct): Allow multiple COM base classes
1345         as well as non-COM bases as long as it's not the leftmost.
1347 1999-12-13  Mumit Khan  <khan@xraylith.wisc.edu>
1349         * lex.c (saving_parse_to_obstack): New global.
1350         (reinit_parse_for_block): Use.
1351         (reinit_parse_for_expr): Use.
1352         (check_newline): Use.
1354 1999-12-13  Mark Mitchell  <mark@codesourcery.com>
1356         * optimize.c (initialize_inlined_parameters): Take FN to which the
1357         parameters belong as an argument.
1358         (expand_call_inline): Expand calls into the parameter
1359         initializations before pushing the function onto the list of
1360         functions we are presently expanding.
1362 1999-12-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1364         * class.c (get_vtable_name): Use a literal format string and
1365         VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
1366         (prepare_fresh_vtable): Likewise.
1368         * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
1369         VTABLE_NAME_FORMAT.
1371         * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
1373         * init.c (build_vec_init): Initialize variable `try_body'.
1375         * lex.c (yyerror): Don't call a variadic function with a
1376         non-literal format string.
1378         * optimize.c (optimize_function): Call memset, not bzero.
1380         * pt.c (for_each_template_parm_r): Add static prototype.
1382 1999-12-09  Andreas Jaeger  <aj@suse.de>
1384         * except.c (expand_throw): Add static attribute to match
1385         prototype.
1387         * Makefile.in (semantics.o): Add dependency on output.h.
1388         * semantics.c: Include output.h for declaration of
1389         make_function_rtl.
1391 1999-12-09  Mark Mitchell  <mark@codesourcery.com>
1393         * decl.c (init_decl_processing): Reenable inlining on trees.
1394         (finish_function): Likewise.
1395         * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
1396         * semantics.c (simplify_aggr_init_exprs): New function.
1397         (expand_body): Use it.
1398         * tree.c (walk_tree): Special-case TARGET_EXPRs since they
1399         sometimes present the same sub-tree twice.
1400         
1401         * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
1402         `csl'.
1404         * semantics.c (finish_switch_cond): Do conversions here, not ...
1405         * typeck.c (c_expand_start_case): Here.
1407         * semantics.c (do_poplevel): Remove unused variable.
1408         
1409 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
1411         * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
1412         unless we're declaring the variable in question.
1414 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
1416         * decl.c (init_decl_processing): #if 0 last patch.
1417         (finish_function): Likewise.
1419 1999-12-05  Mark Mitchell  <mark@codesourcery.com>
1421         * decl.c (init_decl_processing): Set flag_inline_trees if
1422         !flag_no_inline.
1424         * cp-tree.h (calls_setjmp_p): Declare.
1425         * decl.c (finish_function): Mark functions that call setjmp as
1426         uninlinable.
1427         * optimize.c (calls_setjmp_r): New function.
1428         (calls_setjmp_p): Likewise.
1430 1999-12-04  Mark Mitchell  <mark@codesourcery.com>
1432         * optimize.c (expand_call_inline): Wrap the expanded call in an
1433         EXPR_WITH_FILE_LOCATION node to get correct line numbers for
1434         inlined functions.
1436         * optimize.c (inline_data): Remove fns_top.  Add scope_stmt.  Add
1437         in_target_cleanup_p.
1438         (remap_decl): New function.
1439         (remap_block): Likewise.
1440         (copy_scope_stmt): Likewise.
1441         (copy_body_r): Use remap_decl and copy_scope_stmt.
1442         (copy_body): Use VARRAY_TOP_TREE.
1443         (initialize_inlined_parameters): Likewise.
1444         (declare_return_variable): Likewise.
1445         (inlinable_function_p): Check flag_inline_trees.
1446         (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
1447         specially.  Use VARRAY_PUSH_TREE.  Create a BLOCK for the
1448         parameters of the inlined function.
1449         (optimize_function): Prevent recursion into partially complete
1450         functions.
1451         
1452         * cp-tree.def (SCOPE_STMT): Take one operand.
1453         * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
1454         (SCOPE_NULLIFIED_P): Redefine.
1455         (SCOPE_NO_CLEANUPS_P): New macro.
1456         (add_scope_stmt): Change prototype.
1457         * decl.c (poplevel): Tidy.  Warn about unused variables here.
1458         Record SCOPE_STMT_BLOCKs.
1459         (finish_function): Keep DECL_INITIAL for functions that might be
1460         inlined.
1461         * ir.texi: Document SCOPE_NO_CLEANUPS_P.
1462         * semantics.c: Include rtl.h.
1463         (add_scope_stmt): Return the new scope statement and, for an
1464         end-of-scope statement, its matching begin statement.  Don't set
1465         SCOPE_NULLIFIED_P.
1466         (do_pushlevel): Simplify, now that we are always
1467         function-at-a-time.
1468         (do_poplevel): Likewise.  Record SCOPE_STMT_BLOCKs.
1469         (expand_stmt): Don't call expand_start_bindings or
1470         expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
1471         * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
1472         SCOPE_NULLIFIED_P.
1473         * Makefile.in (semantics.o): Depend on RTL_H.
1474         
1475         * decl2.c (pending_statics_used): Make it a macro.
1476         (saved_inlines_used): Likewise.
1477         (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
1478         (mark_inline_for_output): Likewise.
1479         (ssdf_decls_used): Remove.
1480         (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
1481         (generate_ctor_or_dtor_function): Adjust accordingly.
1482         
1483 1999-11-24  Geoffrey Keating  <geoffk@cygnus.com>
1484             Greg McGary  <gkm@gnu.org>
1486         * decl.c (duplicate_decls): Merge
1487         DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
1488         DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
1490 1999-12-02  Mike Stump  <mrs@wrs.com>
1492         * init.c (perform_member_init): Handle parse errors better.
1494 1999-12-01  Mark Mitchell  <mark@codesourcery.com>
1496         * cp-tree.h (min_tree_cons): Remove.
1497         (scratch_ovl_cons): Likewise.
1498         * decl.c (saveable_obstack): Don't declare.
1499         (duplicate_decls): Tweak error-message.
1500         (initialize_local_var): Explicitly mark the definition as static.
1501         (finish_function): Call permanent_allocation, just so
1502         that the middle-end sees the obstacks it expects.
1503         (mark_cp_function_context): Likewise.
1504         * init.c (build_new): Don't use min_tree_cons.
1505         * lex.c (permanent_obstack): Don't declare.
1506         (current_obstack, saveable_obstack): Likewise.
1507         * spew.c (current_obstack, saveable_obstack): Likewise.
1508         * tree.c (current_obstack, saveable_obstack): Likewise.
1509         (scratch_ovl_cons): Remove.
1510         (build_min_nt): Don't mess with obstacks.
1511         (build_min): Likewise.
1512         (min_tree_cons): Remove
1513         * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
1514         (build_x_function_call): Likewise.
1515         (build_c_cast): Don't use min_tree_cons.
1516         
1517 1999-11-29  Mark Mitchell  <mark@codesourcery.com>
1519         * pt.c (tsubst_decl): Robustify.
1521 1999-11-27  Mark Mitchell  <mark@codesourcery.com>
1523         * decl2.c (finish_file): Call expand_body for inline functions
1524         that will be written out but that do not yet have RTL.
1525         * semantics.c (expand_body): Do not generate RTL For inline
1526         functions that do not yet need to be written out.
1528 1999-11-25  Mark Mitchell  <mark@codesourcery.com>
1530         * Make-lang.in (CXX_SRCS): Add optimize.c.  
1531         * Makefile.in (CXX_OBJS): Add optimize.o.
1532         (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
1533         (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
1534         (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
1535         (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
1536         (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
1537         (dump.o): Likewise.
1538         (optimize.o): New target.  
1539         * class.c: Don't include splay-tree.h.
1540         * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.  
1541         * cp-tree.h: Include splay-tree.h.
1542         (DECL_UNINLINABLE): New macro.
1543         (CTOR_BEGIN_P, CTOR_END_P): New macros.
1544         (flag_inline_trees): New variable.
1545         (local_variable_p): New function.
1546         (nonstatic_local_decl_p): Likewise.
1547         (optimize_function): Likewise.
1548         (cplus_unsave_expr_now): Remove.
1549         (copy_tree_r): Declare.
1550         (remap_save_expr): Likewise.  
1551         * decl.c (local_variable_p): Don't
1552         make it static.
1553         (local_variable_p_walkfn): New function.
1554         (make_rtl_for_local_static): Remove code to try to avoid writing
1555         out static constants.
1556         (emit_local_var): Fix indentation.
1557         (nonstatic_local_decl_p): New function.
1558         (check_default_argument): Use local_variable_p_walkfn, not
1559         local_variable_p, when walking the tree.
1560         (start_function): Set the DECL_CONTEXT for automatically generated
1561         labels.
1562         (finish_constructor_body): Use CTOR_STMT to mark the end of a
1563         constructor.  
1564         * decl2.c: Don't include splay-tree.h.
1565         (flag_inline_trees): Define.  
1566         * dump.c: Don't include
1567         splay-tree.h.  
1568         * except.c (expand_end_catch_block): Fix comment formatting.
1569         (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
1570         (expand_throw): Tidy comment.  
1571         * init.c (build_vec_delete_1): Use create_temporary_var.  
1572         * lex.c (cplus_tree_code_type): Make it static.
1573         (cplus_tree_code_length): Likewise.
1574         (cplus_tree_code_name): Likewise.  
1575         * optimize.c: New file.  
1576         * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
1577         with computed gotos.
1578         (setup_vtbl_ptr): Mark the beginnings of constructors with
1579         CTOR_STMT.
1580         (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
1581         (expand_body): Call optimize_function.  Save bodies if we're doing
1582         inlining on trees.
1583         * tree.c: Don't include splay-tree.h.  Include insn-config.h and
1584         integrate.h.
1585         (copy_tree_r): Make it public.
1586         (statement_code_p): New function.
1587         (mark_local_for_remap_r): Likewise.
1588         (cp_usave_r): Likewise.
1589         (cp_unsave): Likewise.
1590         (build_cplus_new): Set DECL_CONTEXT for temporary variables.
1591         (walk_tree): Walk into `s' class nodes.  Walk statement chains.
1592         (copy_tree_r): Handle 's' class nodes.  Restore chains for
1593         statements.  Nullify scopes.  Don't copy types.
1594         (init_tree): Set lang_unsave to cp_unsave.
1595         (remap_save_expr): Define.
1596         * ir.texi: Document CTOR_STMT.
1597         
1598 1999-11-24  Jason Merrill  <jason@casey.cygnus.com>
1600         * search.c (note_debug_info_needed): Do perform this optimization
1601         for dwarf2.  
1602         (maybe_suppress_debug_info): Likewise.  Start by clearing
1603         TYPE_DECL_SUPPRESS_DEBUG.
1605 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
1607         * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
1609         * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
1611 1999-11-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1613         * decl.c (pushdecl, grokdeclarator): Don't call a variadic
1614         function with a non-literal format string.
1616         * lex.c (do_identifier): Likewise.
1618         * typeck.c (build_unary_op): Likewise.
1620 1999-11-23  Mark Mitchell  <mark@codesourcery.com>
1622         * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
1624 1999-11-22  Mark Mitchell  <mark@codesourcery.com>
1626         * cp-tree.def (CTOR_COMPLETE): New tree node.
1627         * decl.c (finish_constructor_body): Add it, to mark the end of the
1628         constructor.
1629         (finish_function): Don't call end_protect_partials here.
1630         * ir.texi (CTOR_COMPLETE): Document it.
1631         * semantics.c (expand_stmt): Handle it.
1632         
1633         * cp-tree.def (FUNCTION_NAME): New tree node.
1634         * cp-tree.h (current_function_name_declared): Tweak documentation.
1635         (lang_decl_flags): Add pretty_function_p, adjust dummy.
1636         (DECL_PRETTY_FUNCTION_P): New macro.
1637         * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
1638         etc., in a template function.  Use at_function_scope_p instead of
1639         expanding it inline.
1640         * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
1641         specially.
1642         (tsubst): Handle FUNCTION_NAME.
1643         (tsubst_copy): Likewise.
1644         (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
1645         etc. in instantiation.
1646         * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
1647         even in template functions.
1648         (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
1649         conditional scope at the top of a destructor.
1650         
1651         * error.c (dump_function_decl): Use `[ with ... ]' syntax for
1652         specializations too.
1654 1999-11-22  Nathan Sidwell  <nathan@acm.org>
1656         * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
1657         when actually negative.
1659         * typeck.c (convert_for_assignment): Expand comment about
1660         strange NULL check, moved from ...
1661         (convert_for_initialization): ... here. Remove unneeded
1662         code.
1664 1999-11-21  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
1666         * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
1667         * init.c (build_vec_delete, build_vec_delete_1): Likewise.
1668         Always destruct virtual bases of array components, but never
1669         delete them.
1670         (build_vec_init): Adjust invocations.
1671         (build_delete): Likewise.
1672         * decl2.c (delete_sanity): Likewise.
1674 1999-11-19  Nathan Sidwell  <nathan@acm.org>
1676         * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
1677         * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
1678         * decl2.c (grok_method_quals): Accept `restrict' as applying to
1679         the object pointer. Return such qualifiers.
1680         (grokclassfn): Apply this pointer qualifiers. Cleanup unused
1681         variables.
1683 1999-11-18  Mark Mitchell  <mark@codesourcery.com>
1685         * except.c (expand_end_catch_block): Fix typo.
1686         (expand_exception_blocks): Simplify.  Don't call
1687         expand_leftover_cleanups.
1689 1999-11-15  Jason Merrill  <jason@casey.cygnus.com>
1691         * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
1692         * pt.c (tsubst, case INTEGER_TYPE): Call it.  
1693         Check uses_template_parms.
1695         * class.c (finish_struct): If we're a local class in a template
1696         function, add a TAG_DEFN.
1697         * pt.c (lookup_template_class): If this is a local class in a
1698         template function, call pushtag.
1699         (tsubst_expr, case TAG_DEFN): Handle classes, too.
1701         Emit debug info with the vtable.
1702         * search.c (maybe_suppress_debug_info): New function...
1703         * class.c (finish_struct_1): ...split out from here.
1704         * cp-tree.h: Declare it.
1705         * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
1706         if we're writing out the vtable.
1707         * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, 
1708         note_debug_info_needed): #if 0 out.
1710 1999-11-14  Mark Mitchell  <mark@codesourcery.com>
1712         * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
1713         * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
1714         TREE_PERMANENT.
1715         * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
1716         * decl2.c (lookup_arg_dependent): Use it.
1717         
1718         * cp-tree.h (cp_finish_decl): Change prototype.
1719         (finish_static_data_member_decl): Likewise.
1720         (push_permanent_obstack): Remove declaration.
1721         (push_expression_obstack): Likewise.
1722         (push_scratch_obstack): Likewise.
1723         (DECL_TEMPLATE_PARM_P): Robustify.
1724         (SET_DECL_TEMPLATE_PARM_P): New macro.
1725         * class.c (add_method): Don't manipulate obstacks.
1726         (finish_vtbls): Likewise.
1727         * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
1728         * decl.c (binding_for_name): Don't manipulate obstacks.
1729         (maybe_push_to_top_level): Likewise.
1730         (pop_from_top_level): Likewise.
1731         (duplicate_decls): Likewise.
1732         (pushdecl): Likewise.
1733         (implicitly_declare): Likewise.
1734         (build_typename_type): Likewise.
1735         (start_decl): Likewise.
1736         (cp_finish_decl): Likewise.
1737         (finish_decl): Likewise.
1738         (destroy_local_static): Likewise.
1739         (expand_static_init): Likewise.
1740         (complete_array_type): Likewise.
1741         (grokvardecl): Likewise.
1742         (build_ptrmemfnc_type): Likewise.
1743         (grokdeclarator): Likewise.
1744         (xref_tag): Likewise.
1745         (xref_basetypes): Likewise.
1746         (start_enum): Likewise.
1747         (finish_enum): Likewise.
1748         (start_function): Likewise.
1749         (finish_function): Likewise.
1750         (start_method): Adjust call to cp_finish_decl.
1751         * decl2.c (finish_static_data_member_decl): Don't manipulate
1752         obstacks.
1753         (grokfield): Likewise.
1754         (grokbitfield): Likewise.
1755         (get_temp_name): Likewise.
1756         (get_sentry): Likewise.
1757         (fnish_file): Likewise.
1758         (lookup_arg_dependent): Likewise.
1759         * except.c (call_eh_info): Likewise.
1760         (push_eh_info): Likewise.
1761         (do_pop_exception): Likewise.
1762         (initialize_handler_parm): Likewise.
1763         (expand_end_eh_spec): Likewise.
1764         (alloc_eh_object): Likewise.
1765         (expand_throw): Likewise.
1766         * expr.c (extract_scalar_init): Likewise.
1767         * init.c (build_java_class_ref): Likewise.
1768         * lex.c (get_time_identifier): Likewise.
1769         (snarf_defarg): Likewise.
1770         (add_defarg_fn): Likewise.
1771         (is_global): Simplify.
1772         (do_identifier): Don't check TREE_PERMANENT.
1773         * method.c (emit_thunk): Don't manipulate obstacks.
1774         * parse.y (condition): Adjust call to cp_finish_decl.
1775         (primary): Likewise.
1776         (initdcl): Likewise.
1777         (initdcl0_innards): Likewise.
1778         (nomods_initdcl0): Likewise.
1779         * pt.c (push_inline_template_parms_recursive): Use
1780         SET_DECL_TEMPLATE_PARM_P.
1781         (process_template_parm): Likewise.
1782         (lookup_template_class): Don't manipulate obstacks.
1783         (instantiate_class_template): Adjust call to
1784         finish_static_data_member_decl.
1785         (tsubst_decl): Don't manipulate obstacks.
1786         (tsubst_expr): Likewise.
1787         (instantiate_template): Likewise.
1788         (instantiate_decl): Adjust calls to cp_finish_decl.
1789         * rtti.c (call_void_fn): Don't manipulate obstacks.
1790         (get_tinfo_var): Likewise.
1791         (get_tinfo_fn_unused): Likewise.
1792         (build_dynamic_cast_1): Likewise.
1793         (expand_si_desc): Likewise.
1794         (expand_class_desc): Likewise.
1795         (expand_ptr_desc): Likewise.
1796         (expand_attr_desc): Likewise.
1797         (expand_generic_desc): Likewise.
1798         (synthesize_tinfo_fn): Likewise.
1799         * search.c (expand_upcast_fixups): Likewise.
1800         * semantics.c (finish_asm_stmt): Likewise.
1801         (finish_named_return_value): Likewise.
1802         (begin_class_definition): Likewise.
1803         (finish_class_definition): Likewise.
1804         (finish_typeof): Likewise.
1805         * tree.c (build_cplus_method_type): Likewise.
1806         (reverse_path): Likewise.
1807         (copy_template_template_parm): Likewise.
1808         (build_expr_ptr_wrapper): Likewise.
1809         (push_expression_obstack): Remove.
1810         (push_permanent_obstack): Likewise.
1811         * typeck.c (mark_addressable): Likewise.
1812         
1813 1999-11-13  Mark Mitchell  <mark@codesourcery.com>
1815         * call.c (build_conditional_expr): Use build_target_expr_with_type.
1816         (convert_like): Likewise.
1817         (build_over_call): Likewise.
1818         * cp-tree.h (build_target_expr): Remove.
1819         (build_target_expr_with_type): New function.
1820         * cvt.c (build_up_reference): Use get_target_expr.
1821         * decl.c (build_target_expr): Move to ...
1822         * tree.c (build_target_expr): Here.  Make it static.
1823         (build_target_expr_with_type): New function.  Set DECL_CONTEXT on
1824         the temporary VAR_DECLs.
1825         (get_target_expr): Use it.
1827 1999-11-13  Jason Merrill  <jason@yorick.cygnus.com>
1829         * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
1830         * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
1831         * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
1832         * class.c (set_rtti_entry): Use it.
1834 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
1836         * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
1837         here.
1838         * semantics.c (finish_expr_stmt): Call it here instead.  Move
1839         default_conversion logic to semantic-analysis time.
1841 1999-11-12  Jason Merrill  <jason@yorick.cygnus.com>
1843         * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
1845 Fri Nov 12 12:56:32 MST 1999    Diego Novillo <dnovillo@cygnus.com>
1847         * init.c (init_init_processing): Re-instated Nov 11 patch after
1848         approval.
1850 Fri Nov 12 10:42:02 MST 1999    Diego Novillo <dnovillo@cygnus.com>
1852         * init.c (init_init_processing): Undo patch from Nov 11, 1999.
1853         Patch had not been approved yet.
1855 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
1857         * decl.c (compute_array_index_type): New function, split out from
1858         grokdeclarator.
1859         (create_array_type_for_decl): Likewise.
1860         (grokdeclarator): Use them.
1862         * semantics.c (expand_stmt): Don't suspend_momentary or
1863         resume_momentary.
1865 Thu Nov 11 12:42:11 MST 1999    Diego Novillo <dnovillo@cygnus.com>
1867         * init.c (init_init_processing): Header information for
1868         arrays allocated via `new' should have the same alignment used by
1869         malloc.
1871 1999-11-10  Mark Mitchell  <mark@codesourcery.com>
1873         * error.c (dump_function_name): Don't crash if given a friend
1874         pseudo-instantiation.
1876         * cp-tree.h (build_enumerator): Change prototype.
1877         * decl.c (enum_next_value): Remove.
1878         (enum_overflow): Likewise.
1879         (init_decl_processing): Don't register enum_next_value as a root.
1880         (start_enum): Clear TYPE_VALUES for a redefined enum.
1881         (finish_enum): Reset the type of enumeration constants.
1882         (build_enumerator): Fix indentation.  Don't copy CONST_DECLs when
1883         we don't need to.  Maintain the TYPE_VALUES list and look there
1884         for the previously defined enumeration constant.  Let enumeration
1885         constants have the type of their values until the enumeration type
1886         is complete.
1887         * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
1888         (structsp): Adjust.
1889         * parse.c: Regenerated.
1890         * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
1891         
1892 Wed Nov 10 12:43:21 1999  Philippe De Muyter  <phdm@macqel.be>
1893                           Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1895         * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
1897 1999-11-09  Mark Mitchell  <mark@codesourcery.com>
1899         * cp-tree.h (language_function): Remove x_last_dtor_insn and
1900         x_last_parm_cleanup_insn.
1901         * decl.c (last_dtor_insn): Remove.
1902         (last_parm_cleanup_insn): Likewise.
1903         (expand_start_early_try_stmts): Don't set them.
1904         (store_parm_decls): Likewise.
1905         (save_function_data): Or save them.
1906         (mark_lang_function): Or mark them.
1908 1999-11-08  Mark Mitchell  <mark@codesourcery.com>
1910         * decl.c (store_parm_decls): Generate cleanup code at
1911         semantic-analysis time.  Destroy objects in the correct order.
1913 1999-11-07  Mark Mitchell  <mark@codesourcery.com>
1915         * cp-tree.h (begin_new_placement): Remove.
1916         (finish_new_placement): Likewise.
1917         * class.c (finish_struct_1): Don't suspend_momentary or
1918         resume_momentary.
1919         * decl.c (grokdeclarator): Likewise.
1920         (maybe_build_cleanup_1): Likewise.
1921         * except.c (push_eh_cleanup): Likewise.
1922         (build_terminate_handler): Likewise.
1923         * init.c (build_new_1): Likewise.
1924         * parse.y (parse_decl): Change prototype.
1925         (initdecls, notype_initdecls, initdcl): Don't return int.
1926         (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
1927         (.begin_new_placement): Remove.
1928         (.finish_new_placement): Likewise.
1929         (nonmomentary_expr): Likewise.
1930         (suspend_mom): Likewise.
1931         (condition): Don't suspend_momentary, resume_momentary, or keep
1932         track of need to resume.
1933         (unary_expr): Likewise.
1934         (new_placement): Likewise.
1935         (decl): Likewise.
1936         (structsp): Likewise.
1937         (new_type_id): Likewise.
1938         (maybe_parmlist): Likewise.
1939         (direct_after_type_declaration): Likewise.
1940         (direct_new_declarator): Likewise.
1941         (direct_abstract_declaration): Likewise.
1942         * parse.c: Regenerated.
1943         * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
1944         * semantics.c (begin_new_placement): Remove.
1945         (finish_new_placement): Likewise.
1946         
1947 1999-11-05  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1949         * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
1950         (DECL_TEMPLATE_INFO): Use it.
1951         * decl.c (warn_extern_redeclared_static): Do nothing for
1952         TEMPLATE_DECLs.
1953         * decl2.c (mark_used): Explicitly check for function or variable.
1954         * semantics.c (finish_unary_op_expr): Check whether result is also
1955         an INTEGER_CST.
1957 1999-11-05  Mark Mitchell  <mark@codesourcery.com>
1959         * Makefile.in (typeck2.o): Depend on output.h.
1960         * typeck2.c: Include output.h.
1962         * decl.c (flag_ansi): Remove declaration.
1964         * pt.c (tinst_level_tick): Make it static.
1965         (last_template_error_tick): Likewise.
1966         
1967         * cp-tree.h (mapcar): Remove declaration.
1968         (search_tree): Likewise.
1969         (walk_tree_fn): New typedef.
1970         (walk_tree): New function.
1971         * tree.c (bot_manip): Change prototype.  Adjust to be called via
1972         walk_tree.
1973         (bot_replace): Likewise.
1974         (no_linkage_helper): Likewise.
1975         (copy_tree_r): New function.
1976         (search_tree): Rename, and adjust, to become ...
1977         (walk_tree): New function.
1978         (mapcar): Remove.
1979         (target_remap): Remove.
1980         (target_remap_count): Likewise.
1981         (break_out_target_exprs): Use walk_tree.
1982         * decl.c (local_variable_p): Change prototype.
1983         (check_default_argument): Use walk_tree.
1984         * pt.c (for_each_template_parm_r): New function, split out from ...
1985         (for_each_template_parm): Here.  Use it, via walk_tree.
1986         
1987 1999-11-03  Mark Mitchell  <mark@codesourcery.com>
1989         * class.c (check_bitfield_decl): New function, split out from
1990         finish_stuct_1.
1991         (check_field_decl): Likewise.  Recursively examine members of
1992         anonymous structs.
1993         (finish_struct_1): Use them.
1994         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
1995         
1996 1999-11-02  Mark Mitchell  <mark@codesourcery.com>
1998         * decl.c (grokfndecl): Remove dead code.
2000         * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
2002 1999-11-02  Scott Snyder  <snyder@fnal.gov>
2004         * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
2005         IMAGPART_EXPR.
2006         * pt.c (tsubst_copy): Likewise.
2008 1999-11-01  Jason Merrill  <jason@yorick.cygnus.com>
2010         * decl2.c (maybe_make_one_only): Always make things comdat on
2011         ELF targets, too.
2013 1999-10-31  Mark Mitchell  <mark@codesourcery.com>
2015         * decl.c (finish_function): Call free_after_parsing for functions
2016         we are not immediately turning into RTL.
2018 1999-10-31  Brendan Kehoe  <brendan@cygnus.com>
2020         * cp-tree.h (flag_dump_translation_unit): Add decl.
2022 Sat Oct 30 22:42:50 1999  Stephen L Moshier <moshier@mediaone.net>
2024         * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
2026 1999-10-30  Mark Mitchell  <mark@codesourcery.com>
2028         * decl.c (pop_cp_function_context): Don't call free on a NULL
2029         pointer.
2030         * semantics.c: Include ggc.h.
2031         (expand_body): Do garbage-collection after processing a template
2032         function.  Clear DECL_SAVED_TREE after generating RTL for a
2033         function.
2034         * Makefile.in (semantics.o): Depend on ggc.h.
2035         
2036 1999-10-29  Mark Mitchell  <mark@codesourcery.com>
2038         * cp-tree.h (make_typename_type): Change prototype.
2039         * decl.c (make_typename_type): Only complain if so requested.
2040         * parse.y (nested_name_specifier): Adjust calls.
2041         (typename_sub0): Likewise.
2042         (typename_sub1): Likewise.
2043         * parse.c: Regenerated.
2044         * pt.c (convert_template_argument): Pass complain to
2045         make_typename_type.
2046         (tsubst): Likewise.
2047         
2048 1999-10-28  Mark Mitchell  <mark@codesourcery.com>
2050         * semantics.c (finish_handler): End the scope of the handler
2051         before attaching it to the statement-tree.
2053 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
2055         * rtti.c (build_dynamic_cast_1): Give a better error message for
2056         an attempt to dynamic_cast from a non-polymorphic type.
2058 1999-10-27  Mark Mitchell  <mark@codesourcery.com>
2060         * cp-tree.h (make_temp_vec): Remove.
2061         (make_scratch_vec): Likewise.
2062         * call.c (add_function_candidate): Use make_tree_vec.
2063         (add_conv_candidate): Likewise.
2064         (build_builtin_candidate): Likewise.
2065         (add_template_candidate_real): Likewise.
2066         * class.c (resolve_address_of_overloaded_function): Likewise.
2067         * decl.c (start_function): Don't fool with the momentary obstack.
2068         (finish_function): Likewise.
2069         * init.c (expand_direct_vtbls_init): Likewise.
2070         (begin_init_stmts): Likewise.
2071         (finish_init_stmts): Likewise.
2072         * pt.c (add_to_template_args): Use make_tree_vec.
2073         (check_explicit_specialization): Likewise.
2074         (coerce_template_parms): Likewise.
2075         (lookup_template_class): Don't fool with the momentary obstack.
2076         (instantiate_class_template): Likewise.
2077         (tsubst_template_arg_vector): Use make_tree_vec.
2078         (tsubst_aggr_type): Don't fool with the momentary obstack.
2079         (tsubst_decl): Likewise.  Use make_tree_vec.
2080         (try_one_overload): Likewise.
2081         (try_class_unification):  Don't fool with the momentary obstack.
2082         (get_bindings_real): Use make_tree_vec.
2083         (set_mangled_name_for_template_decl): Likewise.
2084         * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
2085         * semantics.c (finish_expr_stmt): Likewise.
2086         (finish_do_stmt): Likewise.
2087         (finish_for_expr): Likewise.
2088         (finish_switch_cond): Likewise.
2089         (do_pushlevel): Likewise.
2090         (do_poplevel): Likewise.
2091         * tree.c (make_temp_vec): Remove.
2092         
2093         * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.  Dump
2094         CLEANUP_P for a TRY_BLOCK.
2095         * ir.texi: Document SAVE_EXPR.
2097 Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
2099         * call.c (build_over_call):  Check that the built-in function is
2100         of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
2101         * typeck.c (build_function_call_real): Similarly. 
2103 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
2105         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
2106         remember_end_note.
2108 1999-10-24  Mark Mitchell  <mark@codesourcery.com>
2110         * decl.c (push_overloaded_decl_1): Use pushdecl.
2111         
2112         * decl.c (auto_function): Replace #ifdef'd __inline with just
2113         plain inline.
2114         * lex.c (my_get_run_time): Likeise.
2115         (yyprint): Likewise.
2116         (identifier_type): Likewise.
2117         * method.c (start_squangling): Likewise.
2118         (end_squangling): Likewise.
2119         (icat): Likewise.
2120         (old_backref_index): Likewise.
2121         (flush_repeats): Likewise.
2122         (issue_ktype): Likewise.
2123         * parse.y (empty_parms): Likewise.
2124         * parse.c: Regenerated.
2125         
2126 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
2128         * dump.c (dequeue_and_dump): Replace several uses of
2129         queue_and_dump_index with dump_child.
2131 1999-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2133         * expr.c: Include tm_p.h.
2135 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
2137         * cp-tree.h (SCOPE_PARTIAL_P): New macro.
2138         (pushlevel_temporary): Remove.
2139         (add_scope_stmt): New function.
2140         * decl.c (pushlevel_temporary): Remove.
2141         (poplevel): Use add_scope_stmt.
2142         (start_decl_1): Likewise.
2143         * semantics.c (add_scope_stmt): New function.
2144         (do_pushlevel): Use it.
2145         (do_poplevel): Use it.
2146         (expand_stmt): Check SCOPE_PARTIAL_P.
2147         
2148         * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
2149         * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
2150         * expr.c (cplus_expand_expr): Expand it.
2151         * ir.texi: Document EMPTY_CLASS_EXPR.
2152         
2153 1999-10-20  Mark Mitchell  <mark@codesourcery.com>
2155         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
2156         parameters as having namespace scope.
2158 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
2160         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
2161         (mangling_flags): New type.
2162         (build_overload_int): Change prototype.
2163         (build_overload_value): Likewise.
2164         (numeric_output_need_bar): Improve comment.
2165         (mangle_expression): New function, broken out from ...
2166         (build_overload_int): Here.
2167         (build_overload_value): Adjust for use of mangling flags.  Don't
2168         warn about real-valued template parameters here.  Do handle
2169         complex expressions involving real-valued template parameters.
2170         (build_template_parm_names): Encase non-type template parameters
2171         in underscores, if necessary.
2172         (process_overload_item): Remove conditional on
2173         PARM_CAN_BE_ARRAY_TYPE.
2175 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
2177         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
2179         * ir.texi: Clean up documentation of RETURN_INIT.
2180         
2181 1999-10-15  Greg McGary  <gkm@gnu.org>
2183         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
2184         (lang_init): Set default for flag_bounds_check if still "unspecified".
2186 1999-10-13  Andrew Haley  <aph@cygnus.com>
2188         * class.c (finish_struct_1): Force alignment of non-bitfields to
2189         BITS_PER_UNIT.
2191 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
2193         * typeck2.c (process_init_constructor): Handle empty constructors.
2195 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
2197         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
2199         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
2200         array error.
2202 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
2204         * decl.c (make_rtl_for_local_static): Don't create register RTL
2205         for addressable constants.
2207 1999-10-13  Nathan Sidwell  <nathan@acm.org>
2209         * cp-tree.h (build_x_va_arg): Prototype new function.
2210         * call.c (build_x_va_arg): Define it.
2211         * parse.y (unary_expr): Call build_x_va_arg.
2212         
2213         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
2214         * call.c (convert_type_from_ellipsis): Define it.
2215         * decl.c (init_decl_processing): Set lang_type_promotes_to.
2217         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
2219 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
2221         * class.c (fixed_type_or_null): Always set *nonnull.
2223 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2225         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
2226         __GNUC__ and __GNUC_MINOR__.
2228 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
2230         * cp-tree.h (make_rtl_for_local_static): New function.  
2231         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
2232         local statics ...
2233         (make_rtl_for_local_static): Here.
2234         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
2235         
2236 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2238         * method.c: Include tm_p.h.
2240 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
2242         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
2243         * lex.c (cp_make_lake_type): Likewise.
2244         * tree.c (init_tree): Init make_lang_type_fn.
2245         
2246 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
2248         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
2249         paramter.
2250         
2251         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
2252         local statics if we don't really have them.
2254         * ir.texi: Improve documentation for STMT_EXPR.  Describe
2255         CLEANUP_POINT_EXPR.
2257 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
2259         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
2261 1999-10-07  Greg McGary  <gkm@gnu.org>
2263         * class.c (finish_struct_1): Use simpler method of
2264         removing elements of a singly-linked list which doesn't
2265         lose for classes without data members.
2267 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
2269         * friend.c (make_friend_class): Robustify.
2271         * semantics.c (finish_object_call_expr): Reject calls to template
2272         types.
2274 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
2276         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
2278         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
2279         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
2280         CLASSTYPE_VFIELD.
2281         * class.c (get_vfield_offset): Likewise.
2282         (finish_base_struct): Likewise.
2283         (modify_one_vtable): Likewise.
2284         (fixup_vtable_deltas): Likewise.
2285         (finish_struct_1): Likewise.
2286         * init.c (expand_virtual_init): Likewise.
2287         * search.c (lookup_field_1): Likewise.
2288         (expand_upcast_fixups): Likewise.
2289         * typeck.c (build_component_ref): Likewise.
2290         (build_binary_op_nodefault): Likewise.
2291         
2292         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
2293         * ir.texi: Document TYPE_VFIELD.
2295 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
2297         * decl.c (grokdeclarator): Only warn about non-zero arrays if
2298         !in_system_header (linux socketbits.h can give this for
2299         __cmsg_data, which is using a GNU extension).
2301 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
2303         * decl2.c (start_static_storage_duration_function): Push the
2304         function declaration so it ends up in namespace scope.
2306         * dump.c (DUMP_CHILDREN): Remove.
2307         (DUMP_BINFO): Adjust.
2308         (struct dump_node_info): Remove dump_children_p.
2309         (queue_and_dump_type): Remove dump_children_p parameter.
2310         (queue): Don't set dump_children_p.
2311         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
2312         queue_and_dump_index.
2313         (dequeue_and_dump): Unconditionally print children.  Adjust calls
2314         to functions mentioned above.
2315         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
2316         
2317         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
2318         * dump.c (dequeue_and_dump): Dump them.
2319         
2320         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
2322         * decl.c (start_function): Set current_in_charge_parm for
2323         constructors, too, where appropriate.
2324         * search.c (fixup_all_virtual_upcast_offsets): New function.
2325         (expand_indirect_vtbls_init): Use it.
2326         
2327 1999-10-04  Nathan Sidwell  <nathan@acm.org>
2329         * decl2.c (grok_alignof): Don't decay lvalues.
2330         
2331         * init.c (build_new): Remove unused variable.
2333 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
2335         * cp-tree.h (struct language_function): Remove static_labelno.
2336         (static_labelno): Remove macro.
2337         * method.c (build_overload_nested_name): Make static_labelno
2338         static here.
2339         
2340         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
2341         to decide whether or not a function is defined.
2343         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
2344         situations where make_node will do it automatically.
2345         * decl.c (grok_reference_init): Likewise.
2346         (expand_static_init): Likewise.
2347         (do_static_initialization): Likewise.
2348         * init.c (perform_member_init): Likewise.
2349         (expand_aggr_init_1): Likewise.
2350         (build_new_1): Likewise.
2351         * method.c (do_build_copy_constructor): Likewise.
2352         (do_build_assign_ref): Likewise.
2353         * search.c (expand_upcast_fixups): Likewise.
2354         * semantics.c (finish_stmt_expr): Likewise.
2355         * typeck.c (build_unary_op): Likewise.
2356         (check_return_expr): Likewise.
2358 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
2360         * init.c (build_vec_delete_1): Fold COND_EXPRs.
2362 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
2364         * cp-tree.def (VEC_INIT_EXPR): Remove.
2365         * cp-tree.h (struct stmt_tree): New type.
2366         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
2367         x_stmt_tree.
2368         (class_cache_firstobj): Remove.
2369         (struct language_function): Remove stmts_are_full_exprs_p,
2370         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
2371         (current_stmt_tree): New macro.
2372         (last_tree): Adjust.
2373         (last_expr_type): Likewise.
2374         (doing_semantic_analysis_p): Simplify.
2375         (stmts_are_full_exprs_p): Adjust.
2376         (begin_tree): Remove prototype.
2377         (end_tree): Likewise.
2378         (begin_stmt_tree): Change prototype.
2379         (finish_stmt_tree): Likewise.
2380         (building_stmt_tree): Simplify.
2381         * decl.c (mark_stmt_tree): New function.
2382         (mark_saved_scope): Use it.
2383         (start_function): Rearrange slightly to call begin_stmt_tree 
2384         earlier.
2385         (save_function_data): Tweak.
2386         (finish_function): Adjust call to finish_stmt_tree.
2387         (mark_lang_function): Use mark_stmt_tree.
2388         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
2389         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
2390         (build_vec_init): Remove creation of stand-in intializer.
2391         * pt.c (begin_tree): Remove.
2392         (end_tree): Likewise.
2393         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
2394         (begin_compound_stmt): Handle a compound-statement outside of a
2395         function.
2396         (begin_stmt_expr): Handle a statement-expression outsidef of a
2397         function.
2398         (finish_stmt_expr): Likewise.
2399         (begin_class_definition): Don't call begin_tree.
2400         (finish_inline_definitions): Don't call end_tree.
2401         (begin_stmt_tree): Take a pointer to tree, not a function as input.
2402         (finish_stmt_tree): Likewise.
2403         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
2404         (mapcar): Likewise.
2405         
2406         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
2407         * parse.c: Regenerated.
2408         
2409         * dump.c (dqueue_and_dump): Dump bitfieldness.
2410         
2411         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
2412         bitfields, rather than DECL_BIT_FIELD.
2413         * ir.texi: Document how to tell whether or not a field is a
2414         bitfield.
2415         
2416         * lex.c (make_lang_type): Fix typo in comment.
2418 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
2420         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
2422 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
2424         * pt.c (tsubst_decl): If the type of a template instantiation is
2425         bogus, so is the whole instantiation.
2427 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
2429         * decl.c (initialize_local_var): Handle static variables here.
2430         (cp_finish_decl): Tweak handling of function-scope static
2431         variables.
2432         * semantics.c (expand_stmt): Handle DECL_STMTs for static
2433         variables.
2435         * method.c (emit_thunk): Don't crash when -fsyntax-only.
2437         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
2438         global_dtor_p.  Add init_priority.
2439         (DECL_ACCESS): Adjust accordingly.
2440         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
2441         (GLOBAL_INIT_PRIORITY): Likewise.
2442         * decl.c (lang_mark_tree): Adjust accordingly.
2443         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
2444         and GLOBAL_INIT_PRIORITY.
2445         * dump.c (dequeue_and_dump): Print them.
2446         * ir.texi: Document them.
2448         * decl2.c (struct priority_info_s): Remove initialization_sequence
2449         and destruction_sequence.
2450         (start_static_storage_duration_function): Return the body of the
2451         function.  Convert for function-at-a-time mode.
2452         (generate_inits_for_priority): Remove.
2453         (finish_static_storage_duration_function): Change prototype.
2454         Adjust for function-at-a-time mode.
2455         (do_static_initialization): Likewise.
2456         (do_static_destruction): Likewise.
2457         (do_static_initialization_and_destruction): Remove.
2458         (start_static_initialization_or_destruction): New function.
2459         (finish_static_initialization_or_destruction): Likewise.
2460         (get_priority_info): Don't manipulation initialization_sequence or
2461         destruction_sequence.
2462         (prune_vars_needing_no_initialization): New function.
2463         (write_out_vars): Likewise.
2464         (finish_file): Use the various new functions instead of the old.
2465         
2466 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
2468         * cp-tree.h (warn_float_equal): Declare.
2469         * decl2.c (warn_float_equal): Define.
2470         (lang_decode_option): Recognize -W[no-]float-equal.
2471         * typeck.c (build_binary_op_nodefault): Conditionally warn
2472         about equality tests of floating point types.
2474 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
2476         Support normal type_info-based EH mechanisms with -fno-rtti.
2477         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
2478         (build_eh_type_type_ref): Likewise.
2479         (build_eh_type): Remove.
2480         (expand_throw): Call build_eh_type_type, not build_eh_type.
2481         * decl2.c (import_export_decl): Don't associate the tinfo fn with
2482         the vtable if -fno-rtti.
2483         * decl.c (init_decl_processing): Always init_rtti_processing.
2485         * rtti.c (get_typeid): Don't complain about -fno-rtti.
2487         * class.c (class_cache_obstack, class_obstack): Remove.
2488         (init_class_processing): Don't initialize class_obstack.
2489         (push_cache_obstack): Remove.
2490         (pushclass): Don't call it.
2491         * cp-tree.h: Remove prototype for push_cache_obstack.
2492         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
2493         (pushlevel_class): Don't push_decl_level.
2494         (poplevel_class): Don't pop_stack_level.
2495         (push_class_level_binding): Don't push_cache_obstack.
2496         (init_decl_processing): Don't intialize decl_obstack.
2497         * search.c (push_class_decls): Don't push_cache_obstack.
2498         * tree.c (list_hash_add): Put hash node on permanent_obstack.
2499         (hash_tree_cons): Don't mess with obstacks.
2500         (print_lang_statistics): Don't print stats for class_obstack and
2501         decl_obstack.
2503 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
2505         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
2506         * ir.texi: Document DECL_EXTERNAL.
2508         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
2509         * ir.texi: Document THUNK_DECLs.
2511         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
2512         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
2513         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
2514         * error.c (dump_template_bindings): Remove unused parameter.
2515         Handle multiple levels of template parameters.
2516         (dump_template_decl): Use `parms', not `args', for template
2517         parameters.  Fix thinko.
2518         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
2519         flags to dump_template_bindings.
2520         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
2521         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
2522         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
2523         (tsubst_copy): Clarify variable name.
2524         (most_general_template): Robustify.
2525         
2526 1999-09-29  Nathan Sidwell  <nathan@acm.org>
2528         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
2529         to change primary template rendering.
2531 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
2533         * cp-tree.h (UPT_TEMPLATE): Remove.
2534         (UPT_PARMS): Likewise.
2535         (DECL_NEEDED_P): New macro.
2536         * decl2.c (finish_vtable_vardecl): Use it.
2537         (finish_objects): Don't crash with -fsyntax-only.
2538         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
2539         -fsyntax-only.
2540         * pt.c (tsubst_friend_function): Remove FIXME that talks about
2541         obstacks.
2542         (tsubst_expr): Correct handling of function try-blocks.
2543         * semantics.c: Include flags.h.
2544         (expand_body): Don't do RTL generation if -fsyntax-only.
2545         * Makefile.in (semantics.o): Depends on flags.h.
2546         
2547 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
2549         * pt.c (most_general_template): Adjust declaration.
2551         * cp-tree.h: (most_general_template): Declare.
2553         * error.c (dump_template_value): Rename to ...
2554         (dump_template_argument): This.
2555         (dump_template_argument_list): New function.
2556         (dump_type): Use it.
2557         (dump_template_parameter): New function.
2558         (dump_template_decl): Use it.
2559         (dump_template_bindings): New function.
2560         (dump_function_decl): Use it. Pretty print function template
2561         instantiations.
2563 1999-09-28  Nathan Sidwell  <nathan@acm.org>
2565         * decl.c (grokdeclarator): Distinguish parameter context for
2566         diagnostics. Tidy up missing type diagnostic.
2567         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
2569 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
2571         * ir.texi: Improve documentation for TARGET_EXPR.
2573 1999-09-27  Nathan Sidwell  <nathan@acm.org>
2575         Augment stringification of trees.
2576         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
2577         (fndecl_as_string, type_as_string_real, args_as_string,
2578         code_as_string, language_as_string, parm_as_string,
2579         op_as_string, assop_as_string, cv_as_string): Remove.
2580         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
2581         (context_as_string): Declare new function.
2582         * error.c (cp_printers): Move definition.
2583         (OB_UNPUT): Remove.
2584         (OB_END_TEMPLATE_ID): Adjust.
2585         (interesting_scope_p): Remove.
2586         (dump_scope): New static function.
2587         (dump_qualifiers): Adjust prototype, reimplement.
2588         (dump_template_value): Use tree_string_flags.
2589         (dump_type_real): Move back to dump_type.
2590         (dump_type): Adjust prototype. Use tree_string_flags.
2591         (dump_aggr_type): Likewise. Use dump_template_parms.
2592         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
2593         Return pad flag.
2594         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
2595         (dump_simple_decl): Likewise.
2596         (dump_decl): Likewise. Use dump_template_decl.
2597         (dump_template_decl): New static function broken out of dump_decl.
2598         (dump_function_decl): Adjust prototype. Use tree_string_flags.
2599         (dump_parameters): Likewise. Prefix space.
2600         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
2601         (dump_function_name): Likewise. Use dump_template_parms.
2602         (dump_template_parms): New static function broken out of
2603         dump_function_name.
2604         (dump_expr_list): Adjust prototype. Use tree_string_flags.
2605         (dump_expr): Likewise.
2606         (fndecl_as_string): Removed
2607         (type_as_string_real): Removed
2608         (dump_binary_op): Adjust prototype. Use tree_string_flags.
2609         (dump_unary_op): Likewise.
2610         (type_as_string): Likewise.
2611         (expr_as_string): Likewise.
2612         (decl_as_string): Likewise.
2613         (context_as_string): New function.
2614         (lang_decl_name): Adjust.
2615         (decl_to_string): New static print callback.
2616         (expr_to_string): Likewise.
2617         (fndecl_to_string): Likewise.
2618         (code_as_string): Renamed to ...
2619         (code_to_string): ... here. Adjust.
2620         (language_as_string): Renamed to ...
2621         (language_to_string): ... here. Adjust.
2622         (parm_as_string): Renamed to ...
2623         (parm_to_string): ... here.
2624         (op_as_string): Renamed to ...
2625         (op_to_string): ... here.
2626         (assop_as_string): Renamed to ...
2627         (assop_to_string): ... here.
2628         (type_to_string): New static print callback.
2629         (args_as_string): Renamed to ...
2630         (args_to_string): ... here. Adjust.
2631         (cv_as_string): Renamed to ...
2632         (cv_to_string): ... here. Adjust.
2633         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
2634         (print_template_context): Likewise.
2636 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
2638         * cp-tree.h (expand_throw): Remove prototype.
2639         * except.c (expand_throw): Make it static.  Use tree-generation
2640         functions, rather than RTL-generation functions.
2641         (build_throw): Use it.
2642         * expr.c: Include except.h.
2643         (cplus_expand_expr): Don't call expand_throw here.
2644         * Makefile.in (expr.o): Depend on except.h.
2645         * ir.texi: Update documentation for THROW_EXPR.
2646         
2647         * decl.c (start_function): Set x_dont_save_pending_sizes rather
2648         than calling get_pending_sizes.
2649         * init.c (build_new): Don't save and restore
2650         immediate_size_expand; instead, assert that it has the expected
2651         value already.
2653 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2655         * lex.c (compiler_error): Add missing call to va_end().
2657 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
2659         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
2660         * ir.texi: Document RESULT_DECL and DECL_RESULT.
2662         * cp-tree.h (check_return_expr): New function.
2663         * decl.c (finish_constructor_body): New function.
2664         (pushdecl): Put global friend functions in namespace binding
2665         level, not the class binding level.
2666         (finish_destructor_body): Make sure the dtor_label is always
2667         defined.  Fix typo in comment.
2668         (finish_function): Move generation of constructor-termination code
2669         to semantic-analysis time.  Move generation of implicit `main'
2670         return value to semantic-analysis time.
2671         * semantics.c (finish_return_stmt): Generate goto's to
2672         ctor_label/dtor_label here.  Use check_return_expr to do semantic
2673         analysis on the returned expression.
2674         * typeck.c (maybe_warn_about_returning_address_of_local): New
2675         function split out from c_expand_return.
2676         (check_return_expr): Likewise.
2677         (c_expand_return): Just generate the RTL for the return.
2678         
2679 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
2681         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
2682         (cleanup_type): Likewise.
2683         (search_tree): Change prototype.
2684         * decl.c (local_variable_p): Adjust for new interface to
2685         search_tree.
2686         (check_default_argument): Likewise.
2687         * error.c (dump_expr): Handle INIT_EXPR.
2688         * except.c (expand_throw): Don't make cleanup_type a local static.
2689         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
2690         * init.c (build_new): Call build_new_1 directly, rather than
2691         building a NEW_EXPR.
2692         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
2693         processing file-scope initializers.
2694         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
2695         * tree.c: Include splay-tree.h
2696         (no_linkage_helper): Adjust for new interface to search_tree.
2697         (search_tree): Pass around pointers to tree nodes, rather than the
2698         nodes themselves.  Handle VEC_INIT_EXPR.
2699         (no_linkage_check): Adjust for new interface to search_tree.
2700         (mapcar): Handle VEC_INIT_EXPR.
2701         (target_remap): New variable.
2702         (bot_manip): Use it.
2703         (bot_replace): New function.
2704         (break_out_target_exprs): Use it to remap all variables used in a
2705         default argument expression.
2706         * typeck.c (build_modify_expr): Don't crash when outside a
2707         function and presented with an INIT_EXPR assignment
2708         * Makefile.in (tree.o): Depend on splay-tree.h.
2710 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
2712         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
2713         DECL_BUILT_IN.
2714         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
2715         callers changed.
2716         Set the builtin's DECL_BUILT_IN_CLASS.
2718 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
2720         * decl.c (pushdecl): Don't make local declarations of extern
2721         variables give the variable a DECL_CONTEXT for the function.
2722         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
2723         Don't accidentally make RTL for local declarations.
2724         (emit_local_var): Handle declarations with asm-specifiers here.
2725         
2726 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
2728         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
2729         STMT_IS_FULL_EXPR_P.
2731         * cp-tree.h (language_function): Add cannot_inline.
2732         * decl.c (start_function): Restore current_function_cannot_inline
2733         from the saved value.
2734         (save_function_data): Save current_function_cannot_inline.
2735         * decl2.c (start_objects): Change prototype.  Build the function
2736         in function-at-a-time mode.
2737         (finish_objects): Likewise.
2738         (generate_ctor_or_dtor_function): Adjust accordingly.
2739         
2740         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
2741         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
2742         Don't call expand_anon_union_decl here
2743         * semantics.c (exapnd_stmt): Call it here, instead.
2744         * typeck.c (mark_addressable): Addressed variables are implicitly
2745         used.
2746         
2747 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2749         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
2750         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
2751         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
2752         * cp-tree.h: Add tree checking macros to various tree access
2753         macros. 
2754         * ptree.c (print_lang_decl): Test for function or variable
2755         before accessing template info.
2757 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
2759         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
2760         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
2761         * decl2.c (lang_f_options): Add -fshort-wchar.
2762         * cp-tree.h: Declare flag_short_wchar.
2763         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
2764         int' for wchar_t.
2766 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2768         * ir.texi: Fix formatting errors and typos.
2770 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
2772         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
2774         * decl.c (pushdecl): Do create a binding for extern "C" functions,
2775         but not for their DECL_ASSEMBLER_NAMEs.
2776         (lookup_name_current_level): Fix formatting.
2777         (xref_tag): Likewise.
2778         * decl2.c (start_objects): Mark static constructors and
2779         destructors as used.
2781 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
2783         * decl.c (define_case_label): Don't crash if we're not in a switch.
2785         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
2786         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
2787         for unsupported flags.
2789 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
2791         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
2792         Accept and warn about -fthis-is-variable.
2794 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
2796         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
2797         CLEANUP_STMT, and SCOPE_STMT.
2799         * decl2.c (lang_decode_option): Adjust, in the wake of recent
2800         changes to option processing.
2802 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2804         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
2805         function pointer from pmfs with no object given.
2806         (convert_for_assignment): Do not return error when converting
2807         pmfs.
2809 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
2811         * lex.c (internal_filename): New variable.
2812         (INTERNAL_FILENAME): New macro.
2813         (init_parse): Allocate internal_filename and mark as root.  Use it
2814         instead of a string constant.
2816 1999-09-21  Nathan Sidwell  <nathan@acm.org>
2818         Reimplement dynamic cast and catch matching.
2819         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
2820         * search.c (dynamic_cast_base_recurse): New function.
2821         (get_dynamic_cast_base_type): New function for dynamic cast.
2822         * rtti.c (build_dynamic_cast_1): Determine source and target
2823         class relationship. Call __dynamic_cast_2.
2824         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
2825         (__user_type_info::dyncast): New dynamic cast dispatcher.
2826         (__user_type_info::sub_kind): New nested enumeration.
2827         (__user_type_info::contained_p): sub_kind predicate.
2828         (__user_type_info::contained_public_p): Likewise.
2829         (__user_type_info::contained_nonpublic_p): Likewise.
2830         (__user_type_info::contained_nonvirtual_p: Likewise.
2831         (__user_type_info::upcast_result): New nested struct.
2832         (__user_type_info::dyncast_result): New nested struct.
2833         (*::do_upcast): New catch function.
2834         (*::do_dyncast): New dynamic cast function.
2835         (__user_type_info::find_public_subobj): New dynamic cast
2836         helper dispatcher.
2837         (*::do_find_public_subobj): New dynamic cast helper function.
2838         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
2839         (__user_type_info::dyncast): Define dynamic cast dispatcher.
2840         (*::do_upcast): Define catch function.
2841         (*::do_dyncast): Define dynamic cast function.
2842         (*::do_find_public_subobj): Define dynamic cast helper function.
2843         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
2844         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
2845         (__dynamic_cast_2): New dynamic cast runtime.
2847 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
2849         * cp-tree.h (finish_stmt_expr): Change prototype.
2850         * expr.c (cplus_expand_expr): Adjust call accordingly.
2851         * init.c (finish_init_stmts): Likewise.
2852         * parse.y (primary): Likewise.
2853         * pt.c (tsubst_copy): Likewise.
2854         * semantics.c (finish_stmt_expr): Don't take two parameters.
2855         Don't remove generated BLOCKs from the block-tree.
2857         Remove support for assigning to `this'.
2858         * NEWS: Note that fact.
2859         * class.c (build_vbase_path): Don't check flag_this_is_variable.
2860         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
2861         (language_function): Remove assigns_this, just_assigned_this, and
2862         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
2863         (base_init_expr): Remove.
2864         (current_vcalls_possible_p): New macro.
2865         (vtbls_set_up_p): Likewise.
2866         (emit_base_init): Change prototype.
2867         * decl.c (finish_destructor_body): New function, split out from
2868         finish_function.
2869         (current_function_assigns_this): Remove.
2870         (current_function_just_assigned_this): Likewise.
2871         (start_function): Don't set them.
2872         (finish_function): Don't check them.  Don't emit
2873         base-initialization code here.  Generate code for destructors when
2874         doing semantic analysis.
2875         (finish_stmt): Don't check current_function_just_assigned_this.
2876         * decl2.c (lang_f_options): Remove this-is-variable.
2877         (lang_decode_option): Likewise.
2878         (grokclassfn): Don't check flag_this_is_variable.
2879         * init.c (emit_base_init): Return the expression generated.
2880         (construct_virtual_bases): Don't push/pop obstacks.  Fix
2881         typo.
2882         (build_new_1): Don't check flag_this_is_variable.
2883         (get_temp_regvar): Don't set DECL_REGISTER.
2884         (build_vec_init): Don't call use_variable.
2885         * lang-options.h: Remove "-fthis-is-variable" and
2886         "-fno-this-is-variable".
2887         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
2888         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
2889         expand_expr_stmt.
2890         * semantics.c (finish_expr_stmt_real): Rename to ...
2891         (finish_expr_stmt): This.  Remove assigned_this parameter.
2892         (begin_if_stmt): Call do_pushlevel before starting the statement.
2893         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
2894         blocks.
2895         (setup_vtbl_ptr): Emit initialization code for bases and members
2896         at semantic-analysis time.  Emit code to initialize vtables in
2897         destructors here.
2898         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
2899         Don't handle CTOR_INITIALIZER any more.
2900         * typeck.c (build_modify_expr): Don't check for assignments to
2901         this.
2902         (c_expand_return): Don't suggest assigning to `this'.
2903         
2904         * Makefile.in (decl.o): Depend on RTL_H.
2905         (decl2.o): Likewise.
2906         (class.o): Likewise.
2907         (call.o): Likewise.
2908         (method.o): Likewise.
2909         (search.o): Likewise.
2910         (tree.o): Likewise.
2911         (pt.o): Likewise.
2913         * decl.c (duplicate_decls): When a builtin function is redeclared
2914         as static, make sure it is mangled correctly.
2916         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
2917         detail about the statement-tree.
2918         
2919 1999-09-20  Nathan Sidwell  <nathan@acm.org>
2921         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
2923 1999-09-20  Nick Clifton  <nickc@cygnus.com>
2925         * decl2.c (lang_decode_option): Extend comment.
2927 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
2929         * typeck.c: Include "tm_p.h".
2931 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
2933         * ir.texi: New file.
2935 1999-09-19  Paul Burchard <burchard@pobox.com>
2937         * semantics.c (expand_stmt): Initialize return value.
2939 1999-09-18  Paul Burchard <burchard@pobox.com>
2941         * gxxint.texi: G++ now implements namespaces.
2942         
2943 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
2945         * decl.c (pop_label): Don't warn about unused labels more than
2946         once.
2947         * semantics.c (finish_goto_stmt): Always marked used labels as
2948         used.
2950         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
2951         even when the declaration is external.
2952         (cp_finish_decl): Adjust call to layout_var_decl.
2953         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
2955 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
2957         * typeck.c (get_member_function_from_ptrfunc): Always consider
2958         virtuality inside member pointer.
2960 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
2962         Turn on function-at-a-time processing.  
2963         * cp-tree.h (doing_semantic_analysis_p): New macro.
2964         (SF_DEFAULT): Define to zero, not SF_EXPAND.
2965         (start_handler_parms): Change prototype.
2966         (expand_start_catch_block): Likewise.
2967         (expand_end_catch_block): Likewise.
2968         (expand_start_eh_spec): Likewise.
2969         (expand_end_eh_spec): Declare.
2970         (finish_handler_parms): Change prototype.
2971         (begin_catch_block): Declare.
2972         (finish_handler): Change prototype.
2973         (do_pushlevel): Declare.
2974         (do_poplevel): Likewise.  
2975         * decl.c (pushlevel): Don't create
2976         binding levels when not doing semantic analysis.
2977         (poplevel): Don't pop them.
2978         (pushdecl): Assert that we are never called when not doing
2979         semantic analysis.
2980         (pushdecl_top_level): Use push_to_top_level.
2981         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
2982         label when expanding.
2983         (cp_finish_decl): Only inject for-scope variables when doing
2984         semantic analysis.  Add comments.
2985         (start_handler_parms): Return the handler parm.
2986         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
2987         already set.  Reinitialize from saved function data if available.
2988         Don't pushlevel when not doing semantic analysis.
2989         (store_parm_decls): Only generate RTL when expanding.  Only
2990         pushdecl when doing semantic analysis.  Set
2991         current_eh_spec_try_block if appropriate.
2992         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
2993         Combine common code.  Don't poplevel when not doing semantic
2994         analysis.
2995         (push_cp_function_context): Don't expand functions without an
2996         explicit call to expand_body.
2997         (mark_lang_function): Make eh_spec_try_block and
2998         x_scope_stmt_stack.  
2999         * except.c (expand_end_eh_spec): Don't
3000         declare.
3001         (process_start_catch_block): Likewise.
3002         (push_eh_cleanup): Use finish_decl_cleanup.
3003         (initialize_handler_parm): New function.
3004         (expand_start_catch_block): Use it.
3005         (expand_end_catch_block): Use tree-generation functions, not
3006         RTL-generation functions.
3007         (expand_start_eh_spec): Likewise.
3008         (expand_end_eh_spec): Likewise.
3009         (expand_exception_blocks): Simplify.
3010         (start_anon_func): Use do_pushlevel.
3011         (end_anon_func): Use do_poplvel.  Call expand_body for the
3012         function.  
3013         * expr.c (do_case): Don't call define_case_label.  
3014         * init.c (create_temporary_var): Set DECL_CONTEXT for local
3015         variables.  
3016         * method.c (emit_thunk): Call expand_body for the
3017         thunk.
3018         (sythesize_method): Likewise.  
3019         * parse.y (handler_args): Give it ttype.
3020         (eat_saved_input): Call expand_body.
3021         (base_init): Use do_pushlevel.
3022         (pending_inline): Call expand_body.
3023         (handler): Adjust calls to finish_handler_parms and
3024         finish_handler.
3025         (handler_args): Don't call expand_start_catch_block.  Return the
3026         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
3027         * parse.c: Regenerated.
3028         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
3029         * semantics.c (do_pushlevel): Give it external linkage.  Build
3030         SCOPE_STMTs.
3031         (do_poplevel): Likewise.
3032         (finish_case_label): Call define_case_label when doing semantic
3033         analysis.
3034         (finish_goto_stmt): Create RTL for labels.
3035         (finish_function_try_block): Set in_function_try_handler
3036         unconditionally.
3037         (finish_function_handler_sequence): Unset it.
3038         (finish_handler_parms): Use expand_start_catch_block even when
3039         building a statement-tree.
3040         (begin_catch_block): New function.
3041         (finish_handler): Move a little RTL-generation logic here.
3042         (finish_decl_cleanup): Allow cleanups for empty declarations.
3043         (finish_named_return_value): Don't pushdecl when not doing
3044         semantic analysis.
3045         (expand_stmt): Don't do semantic analysis for variable
3046         declarations.  Handle START_CATCH_STMT.  Call expand_label
3047         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
3048         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
3049         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
3050         RETURN_INIT and function try blocks.
3051         
3052         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
3053         x_scope_stmt_stack.  Add x_in_charge_parm.
3054         (current_eh_spec_try_block): New macro.
3055         (current_scope_stmt_stack): Likewise.
3056         (current_in_charge_parm): Likewise.
3057         * decl.c (start_function): Initialize current_in_charge_parm.
3058         (finish_function): Use current_in_charge_parm rather than looking
3059         up __in_chrg.
3060         * search.c (expand_indirect_vtbls_init): Likewise.
3062         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
3063         (TRY_BLOCK): Likewise.
3064         (HANDLER): Likewise.
3065         (START_CATCH_STMT): New tree node.
3066         (SCOPE_STMT): Likewise.
3067         * cp-tree.h (SCOPE_BEGIN_P): New macro.
3068         (SCOPE_NULLIFIED_P): Likewise.
3069         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
3070         (struct lang_decl): Add saved_language_function.
3071         (DECL_PENDING_INLINE_INFO): Adjust documentation.
3072         (DECL_PENDING_INLINE_P): New macro.
3073         (TYPE_TI_ARGS): Fix typo in comment.
3074         (DECL_SAVED_TREE): Add to documentation.
3075         (DECL_SAVED_FUNCTION_DATA): New macro.
3076         (START_CATCH_TYPE): Likewise.
3077         (SCOPE_END_P): New macro.
3078         (declare_parm_level): Don't declare.
3079         * decl.c (mark_lang_function): New function, split out from
3080         mark_cp_function_context.
3081         (save_function_data): New function.
3082         (declare_parm_level): Remove.
3083         (finish_function): Use save_function_data to squirrel away
3084         important stuff for later use.
3085         (mark_cp_function_context): Use mark_function_data.
3086         (lang_mark_tree): Likewise.
3087         * lex.c (begin_definition_of_inclass_inline): Set
3088         DECL_PENDING_INLINE_P.
3089         (store_pending_inline): Clear it.
3090         * pt.c (tsubst_decl): Likewise.
3092 1999-09-17  Nathan Sidwell  <nathan@acm.org>
3094         * call.c (perform_implicit_conversion): Deal with error_mark_node.
3096 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
3098         * decl.c (warn_extern_redeclared_static): Don't get confused by
3099         static member functions.
3100         (duplicate_decls): Merge DECL_THIS_STATIC.
3102         * decl.c (expand_static_init): Make sure assignments to local
3103         statics actually occur.
3105 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
3107         * cp-tree.h (poplevel_class): Declare.
3108         * class.c (popclass): Use poplevel_class, not poplevel.
3109         * decl.c (poplevel_class): Don't make it static.  Don't return a
3110         value.
3111         (poplevel): Don't call poplevel_class; abort in a class
3112         binding level is seen.
3113         * semantics.c (finish_translation_unit): Use pop_everything.
3114         * parse.y (member_init): Allow errors.
3115         (pending_inline): Call finish_function.
3116         * parse.c: Regenerated.
3117         * Makefile.in (CONFLICTS): Adjust.
3119 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
3120         
3121         * error.c: Reduce code duplication.
3122         (dump_template_value): New function.
3123         (dump_type_real): Use it.
3124         (dump_decl): Likewise.
3125         (dump_function_name): Likewise.
3126         (dump_function_decl): Don't be too talkative about function return
3127         type variety.
3129 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3131         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
3133         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
3135 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
3137         * decl2.c (finish_file): Also call check_global_declarations for
3138         the pending_statics list.
3140 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
3142         * lex.c (cp_pragma_implementation): Allow #pragma implementation
3143         in header files.
3145 1999-09-15  Richard Henderson  <rth@cygnus.com>
3147         * lex.c (mark_impl_file_chain): Follow the next chain.
3149 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
3151         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
3152         problems with extern "C" functions redeclared as static.
3153         (duplicate_decls): When a builtin is redeclared static, make the
3154         new function have internal linkage.
3155         
3156 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
3158         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
3159         * pt.c (tsubst_copy): Likewise.
3160         * tree.c (search_tree): Likewise.
3161         (mapcar): Likewise.
3163 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3165         * typeck2.c (ack): Don't declare progname.
3167 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
3169         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
3170         filenames with ggc_alloc_string.
3172 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
3174         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
3175         TARGET_EXPR.
3176         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
3177         the TARGET_EXPR.
3178         * cvt.c (build_up_reference): Likewise.
3179         * tree.c (build_cplus_new): Likewise.
3180         (get_target_expr): Likewise.
3181         
3182 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
3184         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
3186 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
3188         * cp-tree.h (build_target_expr): New function.
3189         * call.c (build_conditional_expr): Use build_target_expr.
3190         (convert_like): Likewise.
3191         (build_over_call): Likewise.
3192         * cvt.c (build_up_reference): Likewise.
3193         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
3194         (destroy_local_var): Here.
3195         (build_target_expr): New function.
3196         * tree.c (build_cplus_new): Use it.
3197         (get_target_expr): Likewise.
3199 1999-09-13  Nathan Sidwell  <nathan@acm.org>
3201         * typeck.c (expr_sizeof): Don't decay arrays and functions.
3202         Remove misleading comment.
3203         (build_compound_expr): Don't decay arrays.
3205 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
3207         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
3208         class rvalues again.
3210 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3212         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
3214         * g++spec.c: Include gcc.h.
3215         (lang_specific_driver): Constify a char*.  Call xcalloc, not
3216         xmalloc/bzero.  All calls to the function pointer parameter now
3217         explicitly call `fatal'.
3219 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
3221         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
3222         * cvt.c (ocp_convert): Complete the from and destination types.
3223         Adjust warning about functions always being `true' in conditionals.
3224         * decl.c (duplicate_decls): Don't play funny games with abort.
3225         * error.c (dump_expr): Handle OVERLOADs.
3226         * spew.c (probe_obstack): Remove.
3227         * typeck.c (condition_conversion): Use perform_implicit_conversion.
3228         
3229 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
3231         * cp-tree.h (auto_function, define_function): Adjust prototypes.
3232         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
3233         changed.
3234         (auto_function): Likewise, for CODE arg.
3235         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
3236         (builtin_function): ... here.
3238 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
3240         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
3241         (init_decl_processing): Don't set TREE_PERMANENT for the
3242         error_mark_node.
3243         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
3244         (grokdeclarator): Likewise.
3245         (grokparms): Don't check TREE_PERMANENT when building up lists.
3246         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
3247         (mark_inline_for_output): Likewise.
3248         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
3249         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
3250         * lex.c (check_newline): Don't check ggc_p; it is always one.
3251         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
3252         * spew.c (yylex): Don't copy_node or probe_obstacks for
3253         non-permanent CONSTANTs and STRINGs.
3254         * tree.c (build_cplus_array_type_1): Don't fuss with
3255         TREE_PERMANENT on ARRAY_TYPEs.
3256         
3257         * cp-tree.def (CLEANUP_STMT): New node.
3258         * cp-tree.h (language_function): Add name_declared.
3259         (current_function_name_declared): New macro.
3260         (CLEANUP_DECL): New macro.
3261         (CLEANUP_EXPR): Likewise.
3262         (emit_local_var): Likewise.
3263         (finish_decl_cleanup): New function.
3264         * cvt.c (build_up_reference): Simplify.
3265         (ocp_convert): Remove dead code.
3266         * decl.c (start_decl): Remove call to add_decl_stmt.
3267         (grok_reference_init): Adjust, to handle bindings temporaries to
3268         references.  Remove dead code.
3269         (initialize_local_var): Don't generate RTL for
3270         declarations here, or build cleanups here.  Don't fuss with
3271         obstacks.  Replace expand_start_target_temps calls with explicit
3272         setting of stms_are_full_exprs_p.
3273         (destroy_local_var): New function.
3274         (emit_local_var): Likewise.
3275         (cp_finish_decl): Use them, as appropriate.
3276         (start_function): Announce template functions.
3277         (store_parm_decls): Don't call declare_function_name here.
3278         (finish_stmt): Don't start emit base-initialization code when just
3279         building the statement-tree.
3280         * init.c (create_temporary_var): Move add_decl_stmt call ...
3281         (get_temp_regvar): Here.
3282         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
3283         cp_finish_decl would expect.  Don't call add_decl_stmt.
3284         * semantics.c (begin_compound_stmt): Call declare_function_name,
3285         if appropriate.
3286         (finish_decl_cleanup): New function.
3287         (expand_stmt): Use emit_local_var to output variables.          
3288         (expand_body): Set current_funtion_name_declared.
3289         
3290 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
3292         * cp-tree.h (finish_cleanup_try_block): New function.
3293         * semantics.c (finish_cleanup_try_block): Add comment.
3295 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
3297         * cp-tree.h: Delete declarations for all tree nodes now moved to
3298         global_trees.
3299         * decl.c: Delete their definitions.
3300         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
3301         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
3302         provide defaults.
3303         (init_decl_processing): Call build_common_tree_nodes and
3304         build_common_tree_nodes_2 instead of building their nodes here.
3305         Don't add gc roots for them.
3307 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
3309         * cp-tree.h (language_function): Rename expanding_p to
3310         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
3311         (expanding_p): Adjust accordingly.
3312         (TREE_VIA_PRIVATE): Fix typo in comment.
3313         (DECL_REFERENCE_SLOT): Remove.
3314         (SET_DECL_REFERENCE_SLOT): Likewise.
3315         * decl.c (named_label_uses): Adjust. Remove chicken comment.
3316         (push_overloaded_decl): Don't truncate the chain of bindings when
3317         adding an overloaded function.
3318         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
3319         (initialize_local_var): Fix typo in comment.
3320         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
3321         * decl2.c (start_objects): Make the fact that we are expanding
3322         the generated function right away explicit.
3323         (start_static_storage_duration_function): Likewise.
3324         (finish_file): Fix typo in comment.
3325         * init.c (build_vec_init): Correct bugs in handling cleanups.
3326         * semantics.c (maybe_convert_cond): New function.
3327         (FINISH_COND): Always store the condition, even if there's
3328         a declaration.
3329         (finish_if_stmt_cond): Use maybe_convert_cond.
3330         (finish_while_stmt_cond): Likewise.
3331         (finish_do_stmt): Likewise.
3332         (finish_for_cond): Likewise.
3333         (expand_cond): Adjust.
3334         
3335         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
3336         * init.c (perform_member_init): Remove obstack machinations.
3337         (expand_cleanup_for_base): Likewise.
3338         (finish_init_stmts): Mark the statement-expression as used.
3339         * method.c (emit_thunk): Use tree-generating functions, not
3340         RTL.
3341         (do_build_copy_constructor): Likewise.
3342         (do_build_assign_ref): Likewise.
3343         (synthesize_method): Likewise.  Keep track of line numbers.
3344         * pt.c (tsubst_expr): Handle various kinds of try blocks.
3345         * semantics.c (expand_stmts): Remove.
3346         (begin_function_try_block): Set FN_TRY_BLOCK_P.
3347         (finish_function_try_block): Be careful rechaining 
3348         function try blocks.
3349         (expand_stmt): Loop through all the statements at a given level.
3350         (exapnd_body): Be careful with line-numbers here too.  Prepare for
3351         being called directly from the parser.
3353         * cp-tree.h (finish_function): Adjust prototype.
3354         * decl.c (finish_function): Return the function compiled.
3355         * pt.c (instantiate_decl): Don't play games with obstacks.
3356         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
3357         (search_tree): Likewise.
3358         * typeck.c: Fix typo in comment.
3359         * typeck2.c (store_init_value): Add comment.
3361         * cp-tree.h (CPTI_ATEXIT): New macro.
3362         (atexit_node): Likewise.
3363         * decl.c (destroy_local_static): New function, broken out from ...
3364         (expand_static_init): Here.
3366         * rtti.c (get_tinfo_var): These should always be global
3367         (expand_si_desc): Use tree, not RTL, functions to generate code.
3368         (expand_class_desc): Likewise.
3369         (expand_ptr_desc): Likewise.
3370         (expand_attr_desc): Likewise.
3371         (expand_generic_desc): Likewise.
3372         (synthesize_tinfo_fn): Likewise.
3374 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
3376         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
3377         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
3378         RECHAIN_STMTS. 
3379         (RECHAIN_STMST_FROM_CHAIN): Likewise.
3381         * parse.y (simple_stmt): Fix typo in last change.
3383         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
3384         (STMT_IS_FULL_EXPR_P): Likewise.
3385         (STMT_LINENO_FOR_FN_P): Likewise.
3386         (prep_stmt): New function.
3387         (building_stmt_tree): Tweak for safety.
3388         * pt.c (tsubst_expr): Use prep_stmt throughout.
3389         (add_tree): Move it to semantics.c
3390         * semantics.c (add_tree): Move it here.
3391         (finish_expr_stmt_real): New function.
3392         (finish_expr_stmt): Use it.
3393         (finish_if_stmt_cond): Use FINISH_COND.
3394         (finish_while_stmt_cond): Likewise.
3395         (finish_for_cond): Likewise.
3396         (finish_stmt_tree): Tweak line-number handling.
3397         (prep_stmt): New function.
3398         (expand_stmt): Use it.
3399         
3400         * cp-tree.h (begin_switch_stmt): Adjust prototype.
3401         (finish_switch_cond): Likewise.
3402         * parse.y (simple_stmt): Adjust accordingly.
3403         * parse.c: Regenerated.
3404         * pt.c (tsubst_expr): Adjust accordingly.
3405         * semantics.c (expand_cond): New function.
3406         (FINISH_COND): New macro.
3407         (begin_switch_stmt): Build the SWITCH_STMT here.
3408         (finish_switch_stmt_cond): Not here.
3409         (expand_stmt): Adjust calls to begin_switch_stmt and
3410         finish_switch_cond.  Use expand_cond throughout.
3412         * dump.c (dequeue_and_dump): Dump types for constants.
3413         Describe DECL_ARG_TYPE more intuitively.
3414         Handle ARRAY_REF.
3416         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
3417         (lang_cleanup_tree): Remove.
3418         * lex.c (make_lang_type): Use ggc_alloc to allocate
3419         TYPE_LANG_SPECIFIC.
3421         Reorganize per-function data.
3422         * cp-tree.h (saved_scope): Add function_decl, bindings.
3423         (language_function): Rename binding_level to bindings.
3424         (cp_function_chain): Use the current_function, not the
3425         outer_function_chain.
3426         (current_class_ptr): Make it work, even when there's no 
3427         current function.
3428         (current_class_ref): Likewise.
3429         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
3430         macros.
3431         (clear_temp_name): Remove.
3432         * decl.c (check_function_type): New function, broken out from
3433         start_function.
3434         (current_binding_level): Adjust definition.
3435         (pushlevel): Simplify.
3436         (poplevel): Don't use named_label_uses when we're outside
3437         a function scope.
3438         (mark_saved_scope): Mark function_decl and bindings.
3439         (maybe_push_to_top_level): Don't unconditionally push a new
3440         function context.  Save bindings and the current_function_decl.
3441         Don't clear named_labels.
3442         (pop_from_top_level): Pop function context if appropriate.
3443         (init_decl_processing): Set init_lang_status and free_lang_status,
3444         rather than save_lang_status and restore_lang_status.
3445         (start_function): Take SF_* flags.  Don't clear per-function data.
3446         Reorder and simplify to use new per-function data code.  Add
3447         asserts.
3448         (store_parm_decls): Don't call init_function_start here.
3449         (finish_function): Adjust for new handling of per-function data.
3450         (push_cp_function_context): Simplify.
3451         (mark_cp_function_context): Change binding_level to bindings.
3452         * decl2.c (clear_temp_name): Remove.
3453         (start_objects): Use SF flags to start_function.
3454         (start_static_storage_duration_function): Likewise.
3455         * except.c (start_anon_func): Remove redundant calls to 
3456         push_function_context_to.  Use SF flags to start function.
3457         (end_anon_func): Remove redundant call to pop_function_context
3458         from.
3459         * lex.c (reinit_parse_for_function): Don't initialize per-function 
3460         data.
3461         * method.c (emit_thunk): Clear current_function after calling
3462         assemble_end_function.  Use SF flags for start_function.
3463         (synthesize_method): Use SF flags for start_function.
3464         * parse.c: Regenerated.
3465         * parse.y (fn.defpen): Likewise.
3466         (pending_inline): Clear current_function, even if something goes
3467         wrong.
3468         * pt.c (instantiate_decl): Use SF flags to start_function.
3469         Don't save and restore expanding_p.
3470         (add_tree): Handle the case where we are outside any function.
3471         (end_tree): Likewise.
3472         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
3473         * semantics.c (begin_function_definition): Likewise.
3474         (expand_body): Likewise.
3475         
3476 1999-09-09  Nathan Sidwell  <nathan@acm.org>
3478         * cp-tree.h (convert_to_void): Prototype new function.
3479         (require_complete_type_in_void): Remove prototype.
3480         * cvt.c (convert_to_void): New function.
3481         (ocp_convert): Use convert_to_void.
3482         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
3483         expressions.
3484         * typeck.c (require_complete_type_in_void): Remove function.
3485         (build_compound_expr): Use convert_to_void.
3486         (build_static_cast): Likewise.
3487         (build_c_cast): Likewise.
3488         * semantics.c (finish_expr_stmt): Do not decay full expressions.
3489         
3490         * typeck.c (build_x_compound_expr): Add FIXME.
3492 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
3494         * cp-tree.h (scratch_tree_cons): Remove.
3495         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
3496         and perm_tree_cons with plain tree_cons.
3497         * class.c: Likewise.
3498         * decl.c: Likewise.
3499         * decl2.c: Likewise.
3500         * except.c: Likewise.
3501         * expr.c: Likewise.
3502         * init.c: Likewise.
3503         * lex.c: Likewise.
3504         * method.c: Likewise.
3505         * parse.y: Likewise.
3506         * pt.c: Likewise.
3507         * repo.c: Likewise.
3508         * rtti.c: Likewise.
3509         * search.c: Likewise.
3510         * typeck.c: Likewise.
3511         * parse.c: Regenerated.
3512         * tree.c (build_srcloc): Simplify.
3513         
3514 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
3516         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
3517         Remove next.
3518         (LANG_DECL_PERMANENT): Remove.
3519         * decl.c (duplicate_decls): Don't mess about with obstacks trying
3520         to free memory.
3521         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
3522         * lex.c (free_lang_decl_chain): Remove.
3523         (build_lang_decl): Don't use obstacks.
3524         (retrofit_lang_decl): Likewise.
3525         (copy_lang_decl): Likewise.
3527         * cp-tree.h (saved_scope): Remove old_binding_level and 
3528         function_decl.  Tidy up.
3529         * decl.c (mark_saved_scope): Don't set them.
3530         (maybe_push_to_top_level): Clear memory.
3532         * decl.c (layout_var_decl): Change prototype.  Don't complete
3533         types for external objects.
3534         (check_initializer): Likewise.  Tidy.
3535         (initialize_local_var): Complete types here.
3536         (cp_finish_decl): Not here.  Reorganize a little.
3537         (grokvardecl): Don't complete types here.
3539         * decl.c (start_function): Clear last_dtor_insn and
3540         last_parm_cleanup_insn. 
3541         (push_cp_function_context): Just copy over a little of
3542         the old context, not all of it.
3544         * cp-tree.h (copy_to_permanent): Remove.
3545         (permanent_p): Likewise.
3546         * decl.c (building_typename_type): Don't use copy_to_permanent.
3547         (start_decl): Likewise.
3548         (grok_reference_init): Likewise.
3549         (cp_finish_decl): Likewise.
3550         * init.c (build_new_1): Don't use mapcar.
3551         (build_vec_delete_1): Don't use copy_to_permanent.
3552         (build_vec_init): Likewise.
3553         * parse.y (primary): Likewise.
3554         * parse.c: Regenerated.
3555         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
3556         (lookup_template_class): Likewise.
3557         (tsubst_friend_function): Likewise.
3558         (instantiate_class_template): Likewise.
3559         (tsubst_decl): Likewise.
3560         (tsubst): Likewise.
3561         (instantiate_template): Likewise.
3562         (unify): Likewise.
3563         * rtti.c (get_tinfo_fn): Likewise.
3564         (build_dynamic_cast): Likewise.
3565         * semantics.c (finish_if_stmt_cond): Likewise.
3566         (finish_while_stmt_cond): Likewise.
3567         (finish_do_stmt): Likewise.
3568         (finish_for_cond): Likewise.
3569         (finish_for_expr): Likewise.
3570         (finish_cleanup): Likewise.
3571         (add_decl_stmt): Likewise.
3572         (finish_named_return_value): Likewise.
3573         (finish_qualified_call_expr): Likewise.
3574         * tree.c (perm_manip): Remove.
3575         (build_exception_variant): Don't use copy_to_permanent.
3576         (permanent_p): Remove.
3577         (copy_to_permament): Remove.
3578         (build_min_nt): Don't use copy_to_permanent.
3579         (build_min): Likewise.
3580         (min_tree_cons): Likewise.
3581         * typeckc.c (build_static_cast): Likewise.
3582         (build_reinterpret_cast): Likewise.
3583         (build_const_cast): Likewise.
3584         
3585 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
3587         * decl.c (ggc_p): Set it to 1.
3588         (mark_saved_scope): Add prototype.
3590 1999-09-07  Richard Henderson  <rth@cygnus.com>
3592         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
3593         * typeck.c (self_promoting_args_p): Delete.
3595 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
3597         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
3598         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
3600 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
3602         * Makefile.in (tree.o): Depend on ggc.h.
3603         * class.c (make_method_vec): Remove.
3604         (free_method_vec): Likewise.
3605         (free_method_vecs): Remove.
3606         (add_method): Don't use them.
3607         * cp-tree.def (PTRMEM_CST): Make it longer.
3608         (TEMPLATE_PARM_INDEX): Make it shorter.
3609         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
3610         (template_parm_index): Remove RTL field.
3611         (ptrmem_cst): Add RTL field.
3612         (finish_function): Removed parameter.
3613         (process_next_inline): Change prototype.
3614         (init_cplus_unsave): Rename to init_tree.
3615         (binding_init): Remove.
3616         * decl.c (free_binding_nodes): Remove.
3617         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
3618         (pop_binding): Don't use free_binding_nodes.
3619         (free_binding_vecs): Remove.
3620         (store_bindings): Don't use them.
3621         (pop_from_top_level): Likewise.
3622         (lookup_namespace_name): Simplify.
3623         (build_typename_type): Don't use obstack_free.
3624         (unqualified_namespace_lookup): Simplify.
3625         (lookup_name_real): Simplify.
3626         (start_function): Remove comment about leaks.
3627         (finish_function): Removed nested parameter.  Call
3628         expand_end_bindings even when building_stmt_tree.
3629         Call ggc_push_context and ggc_pop_context around
3630         rest_of_compilation, if necessary.
3631         (mark_cp_function_context): Handle a NULL language-context.
3632         (lang_mark_false_label_stack): Fix typo.
3633         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
3634         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
3635         pointer to method types.
3636         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
3637         * decl2.c (finish_objects): Adjust call to finish_function.
3638         (finish_static_store_duration_function): Likewise.
3639         (do_nonmember_using_decl): Remove call to binding_init.
3640         * except.c (end_anon_func): Adjust call to finish_function.
3641         * lex.c (mark_impl_file_chain): New function.
3642         (init_parse): Call init_tree, not init_cplus_unsave.
3643         Add GC roots.
3644         (cp_pramga_interface): Use xmalloc, not permalloc.
3645         (cp_pragma_implementation): Likewise.
3646         (begin_definition_of_inclass_inline): Simplify.
3647         (process_next_inline): Adjust prototype.
3648         (do_scoped_id): Don't call binding_init.
3649         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
3650         * method.c (emit_thunk): Adjust call to finish_function.
3651         (synthesize_method): Likewise.
3652         * parse.y (%union): Add a new `pi' variant.
3653         (PRE_PARSED_FUNCTION_DECL): Use it.
3654         (fn.defpen): Likewise.
3655         (fndef): Adjust call to finish_function.
3656         * pt.c (instantiate_decl): Likewise.
3657         * rtti.c (syntheisze_tinfo_fn): Likewise.
3658         * semantics.c (expand_body): Likewise.
3659         * tree.c: Include ggc.h.
3660         (mark_list_hash): New function.
3661         (binding_init): Remove.
3662         (init_cplus_unsave): Rename to ...
3663         (init_tree): This.  Add GC roots.
3664         
3665 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
3667         Get ready for garbage collection.
3668         * Makefile.in (CXX_TREE_H): Add varray.h
3669         (lex.o): Depend on ggc.h.
3670         (decl.o): Likewise.
3671         (decl2.o): Likewise.
3672         (method.o): Likewise.
3673         (search.o): Likewise.
3674         (pt.o): Likewise.
3675         (repo.o): Likewise.
3676         * class.c: Include ggc.h.
3677         (current_class_name): Remove.
3678         (current_class_type): Likewise.
3679         (current_access_specifier): Likewise.
3680         (previous_class_type): Likewise.
3681         (previous_class_values): Likewise.
3682         (class_cache_firstobj): Likewise.
3683         (current_lang_base): Likewise.
3684         (current_lang_stack): Likewise.
3685         (current_lang_stacksize): Likewise.
3686         (lang_name_c): Likewise.
3687         (lang_name_cplusplus): Likewise.
3688         (lang_name_java): Likewise.
3689         (current_lang_name): Likewise.
3690         (base_layout_decl): Likewise.
3691         (access_default_node): Likewise.
3692         (access_public_node): Likewise.
3693         (access_protected_node): Likewise.
3694         (access_private_node): Likewise.
3695         (access_default_virtual_node): Likewise.
3696         (access_public_virtual_node): Likewise.
3697         (access_protected_virtual_node): Likewise.
3698         (access_private_virtual_node): Likewise.
3699         (signed_zero_node): Likewise.
3700         (init_class_processing): Don't build base_layout_decl.
3701         (push_lang_context): Adjust now that current_lang_base is a varray.
3702         (pop_lang_context): Likewise.
3703         * cp-tree.h: Include varray.h.
3704         (cp_global_trees): Add access_default, access_public,
3705         access_protected, access_private, access_default_virtual,
3706         access_public_virtual, access_protected_virtual,
3707         access_private_virtual, ctor_identifier, delta2_identifier, 
3708         delta_identifier, dtor_identifier, in_charge_identifier,
3709         index_identifier, nelts_identifier, this_identifier,
3710         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
3711         lang_name_c, lang_name_cplusplus, lang_name_java,
3712         empty_except_spec, null, jclass, minus_one, terminate.
3713         (saved_scope): Move here from decl.c.  Define globals in terms of
3714         saved_scope: current_namespace, current_class_name,
3715         current_class_type, current_access_specifier, current_lang_stack,
3716         current_lang_base, current_lang_name, current_function_parms,
3717         current_template_parms, processing_template_decl,
3718         processing_specialization, processing_explicit_instantiation,
3719         previous_class_type, previous_class_values, class_cache_firstobj.
3720         (scope_chain): New variable.
3721         (init_pt): New function.
3722         * decl.c (current_namespace): Remove.
3723         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
3724         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
3725         (delta_identifier, delta2_identifier): Likewise.
3726         (pfn_or_delta2_identifier, tag_identifier): Likewise
3727         (vt_off_identifier, empty_except_spec, null_node): Likewise.
3728         (current_function_parms, current_lang_base): Remove.
3729         (current_lang_stack, previous_class_values): Remove.
3730         (class_binding_level): Macroize.
3731         (saved_scope): Remove.
3732         (current_saved_scope): Rename to scope_chain.
3733         (mark_saved_scope): Adjust for new scope structure.
3734         (maybe_push_to_top_level): Likewise.
3735         (pop_from_top_level): Likewise.
3736         (duplicate_decls): Adjust now that current_lang_base is a varray.
3737         (build_typename_type): Call ggc_add_tree_hash_table_root.
3738         (init_decl_processing): Call init_pt.  Call push_to_top_level to
3739         set up globals.  Add GC roots.
3740         (xref_basetypes): Adjust now that current_lang_base is a varray.
3741         * decl.h (this_identifier): Remove.
3742         (in_charge_identifier): Likewise.
3743         * decl2.c: Don't include varray.h.
3744         (current_namespace): Remove.
3745         (init_decl2): Add GC roots.
3746         * except.c (Terminate): Remove. 
3747         (init_exception_processing): Use terminate_node instead.
3748         (build_terminate_handler): Likewise.
3749         * init.c (nc_nelts_field_id): Remove.
3750         (minus_one): Likewise.
3751         (init_init_processing): Use minus_one_node and nelts_identifier
3752         instead.  Add GC roots.
3753         (jclass_node): Remove.
3754         (build_new_1): Use nelts_identifier.
3755         (build_vec_init): Likewise.
3756         (build_vec_delete): Likewise.
3757         * lex.c: Include ggc.h.
3758         (defarg_fn): Move declaration early.
3759         (defarg_parms): Likewise.
3760         (init_parse): Add GC roots.
3761         (handle_cp_pragma): Remove redundant declaration of
3762         pending_vtables.
3763         * method.c: Include ggc.h.
3764         (btypelist): Make it a varray.  All uses changed.
3765         (ktypelist): Likewise.
3766         (init_method): Add GC roots.
3767         * pt.c: Don't include varray.h.  Include ggc.h.
3768         (current_template_parms): Remove.
3769         (processing_template_decl): Likewise.
3770         (processing_specialization): Likewise.
3771         (processing_explicit_instantiation): Likewise.
3772         (init_pt): New function.
3773         * repo.c: Include ggc.h.
3774         (init_repo): Add GC roots.
3775         * search.c: Don't include varray.h.
3776         (_vptr_name): Remove.
3777         (lookup_field_1): Use vtpr_identifier instead.
3778         (expand_indirect_vtbls_init): Remove redundant declaration of
3779         in_charge_identifier.
3780         (init_search_processing): Use vptr_identifier.
3781         
3782 1999-09-05  Richard Henderson  <rth@cygnus.com>
3783             Bernd Schmidt <bernds@cygnus.co.uk>
3784             Mark Mitchell  <mark@codesourcery.com>
3786         * Makefile.in (parse.o): Depend on ggc.h.
3787         (decl2.o): Depend on ggc.h.
3788         (init.o): Depend on ggc.h.
3789         * cp-tree.h (init_decl2): Declare.
3790         (cp_parse_init): Likewise.
3791         * decl.c (ggc_p): Define to zero.
3792         (mark_saved_scope): New function.
3793         (init_decl_processing): Call cp_parse_init, and cp_decl2.
3794         Register GC roots.
3795         (expand_static_init): Add GC roots.
3796         * decl2.c: Include ggc.h.
3797         (init_decl2): New function.
3798         * init.c: Include ggc.h.
3799         (init_init_processing): Add GC roots.
3800         * parse.y: Include ggc.h.
3801         (cp_parse_init): New function.
3802         
3803 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
3805         * decl.c (init_decl_processing): Set mark_lang_status.
3806         (lang_mark_false_label_stack): Adjust prototype.
3807         * decl2.c (grok_function_init): Remove extraneous declaration of
3808         abort_fndecl.
3810         * Make-lang.in (cc1plus): Remove dependency on GGC.
3811         * Makefile.in (OBJS): Don't mention ggc-simple.o.
3812         (OBJDEPS): Don't mention ggc-simple.o.
3814         * Make-lang.in (cc1plus): Depend on $(GGC).
3815         * Makefile.in (OBJS): Add ggc-simple.o.
3816         (OBJDEPS): Likewise.
3817         * cp-tree.h (language_function): Rename members to `x_' versions;
3818         we now have x_named_labels, x_ctor_label, x_dtor_label,
3819         x_base_init_list, x_member_init_list, x_base_init_expr,
3820         x_current_class_ptr, x_current_class_ref, x_last_tree,
3821         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
3822         x_result_rtx. 
3823         (dtor_label, ctor_label, current_base_init_list,
3824         current_member_init_list, base_init_expr, current_class_ptr,
3825         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
3826         * decl.c: Include ggc.h.
3827         (last_dtor_insn): Adjust to use x_ names.
3828         (last_parm_cleanup_insn): Likewise.
3829         (original_result_rtx): Likewise.
3830         (named_labels): Likewise.
3831         (mark_binding_level): New function.
3832         (mark_cp_function_context): Likewise.
3833         (mark_false_label_stack): Likewise.
3834         (lang_mark_tree): Likewise.
3835         (lang_cleanup_tree): Likewise.
3836         
3837 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
3839         * Makefile.in (CXX_TREE_H): Include function.h.
3840         (decl.o): Don't depend on function.h.
3841         (decl2.o): Likewise.
3842         (typeck.o): Likewise.
3843         (init.o): Likewise.
3844         (method.o): Likewise.
3845         * cp-tree.h: Include function.h.
3846         (cp_function): Rename to language_function.  Remove next.
3847         (cp_function_chain): Make it a macro, not a variable.
3848         (push_cp_function_context): Don't declare.
3849         (pop_cp_function_context): Likewise.
3850         * decl.c: Don't include function.h.
3851         (push_cp_function_context): Make it static.  Make it suitable for
3852         a save_lang_status callback.
3853         (pop_cp_function_context): Likewise.
3854         (maybe_push_to_top_level): Call push_function_context_to, not
3855         push_cp_function_context.
3856         (pop_from_top_level): Call pop_function_context_from, not
3857         pop_cp_function_context.
3858         (init_decl_processing):  Set save_lang_status and
3859         restore_lang_status.  Call push_function_context_to, not
3860         push_cp_function_context.
3861         (cp_function_chain): Remove.
3862         * decl2.c: Don't include function.h.
3863         * except.c: Don't include function.h.
3864         (start_anon_func): Call push_function_context_to, not
3865         push_cp_function_context.
3866         (end_anon_func):  Call pop_function_context_from, not
3867         pop_cp_function_context.
3868         * init.c: Don't include function.h.
3869         * lex.c (begin_definition_of_inclass_inline): Call
3870         push_function_context_to, not push_cp_function_context. 
3871         (process_next_inline):  Call pop_function_context_from, not
3872         pop_cp_function_context.
3873         * method.c: Don't include function.h.
3874         (synthesize_method): Call push_function_context_to, not
3875         push_cp_function_context.  Call pop_function_context_from, not
3876         pop_cp_function_context.
3877         * typeck.c: Don't include function.h.
3878         
3879         * decl.c (expand_static_init): Tweak handling of static
3880         initializations for objects without constructors.
3882 1999-09-03  Nathan Sidwell  <nathan@acm.org>
3884         * typeck.c (build_indirect_ref): Reject dereference of pointer to
3885         void.
3887 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
3889         * cp-tree.h (cp_function): Move here, from decl.c.
3890         (cp_function_chain): Declare.
3891         (dtor_label): New macro, instead of variable.
3892         (ctor_label): Likewise.
3893         (current_base_init_list): Likewise.
3894         (current_member_init_list): Likewise.
3895         (base_init_expr): Likewise.
3896         (current_class_ptr): Likewise.
3897         (current_class_ref): Likewise.
3898         (last_tree): Likewise.
3899         (last_expr_type): Likewise.
3900         (current_function_returns_value): Likewise.
3901         (current_function_returns_null): Likewise.
3902         (current_function_just_assigned_this): Likewise.
3903         (current_function_parms_stored): Likewise.
3904         (temp_name_counter): Likewise.
3905         (static_labelno): Likewise.
3906         (expanding_p): Likewise.
3907         (stmts_are_full_exprs_p): Likewise.
3908         (in_function_try_handler): Likewise.
3909         (lang_type): Remove nested type_flags.  All uses changed.
3910         * call.c (ctor_label): Remove.
3911         (dtor_label): Likewise.
3912         * class.c (current_class_ptr): Remove.
3913         (current_class_ref): Likewise.
3914         * decl.c (static_labelno): Remove.
3915         (dtor_label): Likewise.
3916         (last_dtor_insn): New macro, instead of variable.
3917         (last_parm_cleanup_insn): Likewise.
3918         (original_result_rtx): Likewise.
3919         (in_function_try_handler): Remove.
3920         (named_label_uses): New macro, instead of variable.
3921         (named_labels): Likewise.
3922         (current_function_returns_value): Remove.
3923         (current_function_returns_null): Likewise.
3924         (current_function_assigns_this): New macro, instead of variable.
3925         (current_function_just_assigned_this): Likewise.
3926         (current_binding_level): Likewise.
3927         (init_decl_processing): Call push_cp_function_context.
3928         (cp_function): Move to cp-tree.h
3929         (cp_function_chain): Make it global.
3930         (temp_name_counter): Remove.
3931         (push_cp_function_context): Simplify.
3932         (pop_cp_function_context): Likewise.
3933         * decl2.c (temp_name_counter): Remove.
3934         * init_c (current_base_init_list): Likewise.
3935         (current_member_init_list): Likewise.
3936         (base_init_expr): Likewise.
3937         * method.c (static_labelno): Likewise.
3938         * pt.c (last_tree): Likewise.
3939         * semantics.c (expanding_p): Likewise.
3940         (stmts_are_full_exprs_p): Likewise.
3941         (last_expr_type): Likewise.
3942         * typeck.c (dtor_label): Likewise.
3943         (ctor_label): Likewise.
3944         
3945 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
3947         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
3948         (arg_assoc_class): Use arg_assoc_template_arg for template
3949         arguments. 
3950         (arg_assoc): Likewise.
3951         * pt.c (mangle_class_name_for_template): Allow member template
3952         template arguments.
3954 1999-09-02  Nathan Sidwell  <nathan@acm.org>
3956         * call.c (build_conditional_expr): Warn on enum mismatches.
3957         (convert_arg_to_ellipsis): Move non-pod check to after
3958         conversion.
3960 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3962         * gxx.gperf (hash, is_reserved_word): Add prototypes.
3964         * init.c (build_vec_init): Initialize variable `try_block'.
3966         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
3967         Likewise for bzero/memset.
3968         (token_getch, token_put_back): Add static prototypes.  Remove
3969         `inline' from the definitions.
3970         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
3972 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
3974         * cp-tree.h (lang_type): Move align into type_flags.
3975         (CLASSTYPE_ALIGN): Adjust accordingly.
3976         * call.c (direct_reference_binding): Remove misleading comment.
3978 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3980         * parse.y (language_string): Constify.
3982 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3984         * repo.c (getpwd): Don't prototype.
3985         * xref.c (getpwd): Likewise
3987 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3989         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
3990         Remove hacks for stuff which now comes from libiberty.
3992 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
3994         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
3996 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
3998         * cp-tree.h (begin_init_stmts): Declare.
3999         (finish_init_stmts): Likewise.
4000         * cvt.c (build_up_reference): Wrap the declaration of a temporary
4001         in a statement-expression so that we will see it when expanding
4002         tree structure later.
4003         * init.c (begin_init_stmts): Don't make it static.
4004         (finish_init_stmts): Likewise.
4006         * cp-tree.h (start_handler_parms): New function.
4007         (expand_start_catch_block): Take only one parameter.
4008         (start_handler_parms): New function.
4009         * decl.c (start_handler_parms): Define it.
4010         * except.c (process_start_catch_block): Take only one parameter.
4011         Don't call grokdeclarator here.
4012         (expand_start_catch_block): Don't call grokdeclarator here,
4013         either.
4014         * parse.y (handler_args): Adjust call to
4015         expand_start_catch_block.  Use start_handler_parms.
4016         * pt.c (push_template_decl_real): Make permanent lists have
4017         permanent elements.
4018         (tsubst_expr): Adjust calls to expand_start_catch_block
4019         appropriately.
4020         * semantics.c (expand_stmt): Likewise.
4021         
4022 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
4024         * pt.c (push_template_decl_real): Use template declaration from
4025         class type if it exists.
4027 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
4029         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
4030         (maybe_inject_for_scope_var): Declare it.
4031         (initialize_local_var): Likewise.
4032         * decl.c (maybe_inject_for_scope_var): Make it global.
4033         (initialize_local_var): Likewise.  Move cleanup handling here,
4034         from cp_finish_decl.
4035         (make_rtl_for_nonlocal_decl): Use
4036         push_obstacks_nochange/pop_obstacks, rather than
4037         end_temporary_allocation/resume_temporary_allocation.
4038         (cp_finish_decl): Try to complete the type of a variable when it
4039         is declared.  Move cleanup-handling to initialize_local_var.
4040         (expand_static_init): Use tree-building code, rather than
4041         RTL-building code.
4042         * decl2.c (get_temp_name): Assert non-initializedness of
4043         temporaries.
4044         * init.c (create_temporary_var): Move RTL-assigning code to ...
4045         (get_temp_regvar): Here.
4046         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
4047         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
4048         call initialize_local_var to generate initialization code.
4049         
4050 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4052         * cp-tree.h (fndecl_as_string, type_as_string,
4053         type_as_string_real, args_as_string, decl_as_string,
4054         expr_as_string, code_as_string, language_as_string,
4055         parm_as_string, op_as_string, assop_as_string, cv_as_string,
4056         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
4058         * errfn.c (cp_printer): Likewise.
4060         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
4061         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
4062         cp_file_of, code_as_string, language_as_string, parm_as_string,
4063         op_as_string, assop_as_string, args_as_string, cv_as_string):
4064         Likewise.
4066         * tree.c (lang_printable_name): Likewise.
4068 1999-08-28  Richard Henderson  <rth@cygnus.com>
4070         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
4072 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
4074         * cp-tree.h (strip_array_types): New function.
4075         * decl.c (maybe_deduce_size_from_array_init): New function, split
4076         out from cp_finish_decl.
4077         (layout_var_decl): Likewise.
4078         (maybe_commonize_var): Likewise.
4079         (maybe_inject_for_scope_var): Likewise.
4080         (initialize_local_var): Likewise.
4081         (build_cleanup_on_safe_obstack): Likewise.
4082         (check_initializer): Likewise.
4083         (make_rtl_for_nonlocal_decl): Likewise.
4084         (cp_finish_decl): Use them.
4085         * typeck.c (strip_array_types): New function.
4086         
4087         * cp-tree.def (LABEL_STMT): New tree node.
4088         * cp-tree.h (LABEL_STMT_LABEL): New macro.
4089         (shadow_label): Remove.
4090         (declare_local_label): New function.
4091         (finish_label_decl): Likewise.
4092         * decl.c (make_label_decl): New function, split out from
4093         lookup_label.
4094         (shadowed_labels): Remove.
4095         (binding_level): Add shadowed_labels.
4096         (clear_binding_level): Remove.
4097         (push_binding_level): Just bzero the new binding level.
4098         (pushlevel): Fix indentation.
4099         (pop_label): New function.
4100         (pop_labels): Likewise, split out from poplevel.
4101         (poplevel): Pop local labels.  Use pop_labels.
4102         (maybe_push_to_top_level): Don't clear shadowed_labels.
4103         (lookup_label): Use make_label_decl.
4104         (shadow_label): Remove.
4105         (declare_local_label): New function.
4106         (define_label): Simplify.
4107         (start_function): Don't clear shadowed_labels.
4108         (cp_function): Remove shadowed_labels.
4109         (push_cp_function_context): Don't save shadowed_labels.
4110         (pop_cp_function_context): Don't restore it.
4111         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
4112         * parse.y (label_decl): Use finish_label_decl.
4113         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
4114         declarations.
4115         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
4116         building_stmt_tree.
4117         (finish_label_decl): New function.
4118         (expand_stmt): Handle LABEL_STMTs and local label declarations.
4119         
4120 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
4122         * decl.c (lookup_label): Build labels on the permanent obstack
4123         when building statement trees.  Don't build RTL for labels when
4124         building statement trees.
4125         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
4126         building statement trees.
4127         (finish_label_stmt): Likewise.
4128         (expand_stmt): Adjust accordingly.
4129         * pt.c (tsubst_expr); Likewise.
4130         (do_decl_instantiation): Robustify.
4131         
4132         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
4133         * tree.c (build_cplus_new): Set it.
4134         * expr.c (cplus_expand_expr): Use it.
4135         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
4136         
4137         * decl.c (store_parm_decls): Reset immediate_size_expand.
4138         (finish_function): Likewise.
4139         
4140         * tree.c (cplus_unsave_expr_now): Don't return a value.
4142         * semantics.c (do_poplevel): Always initialize the return value.
4144 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
4146         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
4147         * tree.h (cplus_unsave_expr_now) : Same.
4149 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
4151         * decl.c (grokdeclarator): Amend comment.
4152         * except.c (expand_start_catch_block): Call push_template_decl for
4153         catch-block parameters.
4154         * method.c (synthesize_method): Build an empty compound statement
4155         for the body of a constructor.
4157 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
4159         * tree.c (cp_build_qualified_type_real): If we're asking for the
4160         same quals we already have, just return.
4162 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
4164         * cp-tree.def (SUBOBJECT): New tree node.
4165         * cp-tree.h (CLEANUP_P): New macro.
4166         (SUBOBJECT_CLEANUP): Likewise.
4167         (keep_next_level): Add parameter.
4168         (get_temp_regvar): Don't declare.
4169         (emit_base_init): Remove parameter.
4170         (expand_aggr_init): Rename to build_aggr_init.
4171         (expand_vec_init): Rename to build_vec_init.
4172         (do_pushlevel): Remove.
4173         (do_poplevel): Likewise.
4174         (finish_cleanup): New function.
4175         (finish_subobject): Likewise.
4176         (stmts_are_full_exprs_p): New variable.
4177         * decl.c (keep_next_level): Add parameter.
4178         (cp_finish_decl): Use build_aggr_init, not
4179         expand_aggr_init.  Use finish_expr_stmt to expand the code.
4180         (expand_static_init): Use tree-generating, not RTL-generating,
4181         functions to handle the initialization.
4182         (start_function): Remove dead code.  Always have a momentary
4183         obstack inside the function, even before hitting the first curly
4184         brace.
4185         (cplus_expand_expr_stmt): Move calls to
4186         expand_{start,end}_target_temps into semantics.c.
4187         (cp_function): Add stmts_are_full_exprs_p.
4188         (push_cp_function_context): Save it.
4189         (pop_cp_function_context): Restore it.
4190         * decl2.c (get_temp_regvar): Move to init.c.
4191         (do_static_initialization): Use build_{aggr,vec}_init.
4192         (do_static_destruction): Fix typo in comment.
4193         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
4194         * except.c (expand_throw): Use create_temporary_var.
4195         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
4196         * init.c (expand_vec_init_try_block): Remove.
4197         (expand_vec_init_catch_clause): Likewise.
4198         (get_temp_regvar): New function.
4199         (begin_init_stmts): Likewise.
4200         (finish_init_stmts): Likewise.
4201         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
4202         structure here.
4203         (emit_base_init): Likewise.  Remove unused parameter.
4204         (expand_virtual_init): Likewise.
4205         (expand_cleanup_for_base): Use finish_subobject.
4206         (expand_aggr_vbase_init_1): Simplify.
4207         (construct_virtual_bases): Use tree-generating functions to build
4208         up initialization.
4209         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
4210         (expand_default_init): Likewise.
4211         (expand_aggr_init_1): Likewise.
4212         (expand_vec_init): Rename to build_vec_init.
4213         * method.c (do_build_copy_constructor): Use tree-generating
4214         functions.  Don't call clear_last_expr.
4215         (do_build_assign_ref): Likewise.
4216         (synthesize_method): Call clear_last_expr here.
4217         * parse.y (base_init): Don't call clear_last_expr here.
4218         (nodecls): Likewise.
4219         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
4220         * semantics.c (do_pushlevel): Move to here.
4221         (do_poplevel): Likewise.
4222         (stmts_are_full_exprs_p): New variable.
4223         (finish_expr_stmt): Handle logic for temoprary cleanup here.
4224         (finish_for_stmt): Use finish_expr_stmt.
4225         (finish_cleanup): New function.
4226         (finish_function_try_block): Fix indentation.
4227         (finish_subobject): New function.
4228         (setup_vtbl_ptr): Call keep_next_level here.
4229         (finish_stmt_expr): Handle a block with no scope inside the
4230         statement-expression.
4231         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
4232         SUBOBJECT.
4233         * tree.c (search_tree): Handle INIT_EXPR.
4234         (mapcar): Likewise.
4235         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
4236         * typeck2.c (store_init_value): Change expand_aggr_init to
4237         build_aggr_init in comment.
4238         
4239 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
4241         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
4243 1999-08-25  Nathan Sidwell  <nathan@acm.org>
4245         * decl2.c (handle_class_head): Be graceful about additional
4246         scope qualifiers. Adjust comments to reflect reality.
4248 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
4250         * call.c (build_conditional_expr): Fix typo.
4251         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
4252         lvalue before trying to mess with the sides.
4254         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
4256 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
4258         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
4260 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
4262         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
4263         Return arbitrary pointer or NULL.
4264         (check_eh_spec): Call __throw_type_match_rtti_2.
4265         * tinfo.h (*::dcast): Return int.  Add valp parm.
4266         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
4267         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
4268         (__throw_type_match_rtti): Now just a wrapper.
4270         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
4271         (init_exception_processing): Don't initialize them.
4273 1999-08-23  Paul Burchard <burchard@pobox.com>
4275         * decl.c (check_default_argument): Fix typo.
4277 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
4279         * cp-tree.def (STMT_EXPR): Fix typo in node name.
4281         * dump.c (dump_next_stmt): New function.
4282         (dequeue_and_dump): Use it.
4283         
4284         * pt.c (tsubst_copy): Make sure to initialize return value for a
4285         STMT_EXPR, even when processing_template_decl.
4286         * semantics.c (finish_stmt_expr): A statement-expression whose
4287         last statement is not an expression-statement has type `void'.  
4288         
4289 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
4291         * semantics.c (finish_stmt_expr): Fix typo in comment.
4292         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
4293         (mapcar): Likewise.
4294         * init.c (build_vec_delete_1): Make the children of a permanent
4295         BIND_EXPR permanent.
4296         * pt.c (register_specialization): Don't register a specialization
4297         more than once.
4298         
4299 1999-08-18  Andrew Haley  <aph@cygnus.com>
4301         * method.c (process_overload_item): Call build_mangled_C9x_name ()
4302         for all integer parameter types larger than long long.
4304 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
4306         * pt.c (redeclare_class_template): Merge default template
4307         arguments in both directions.
4309         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
4310         compiler_error message.
4312 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
4314         * cp-tree.h: Declare flag_use_repository.
4315         * pt.c (do_decl_instantiation): Don't complain about duplicate
4316         instantiation with -frepo.
4317         (do_type_instantiation): Likewise.
4319         * pt.c (push_template_decl_real): Complain about everything
4320         that isn't a valid template.
4322         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
4323         affect inlines.
4325 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
4327         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
4328         * decl2.c (build_expr_from_tree): Handle it.
4329         * error.c (dump_expr): Likewise.
4330         * pt.c (for_each_template_parm): Likewise.
4331         (tsubst_copy): Likewise.
4332         * tree.c (search_tree): Likewise.
4333         * semantics.c (finish_pseudo_destructor_call): Create it.
4334         
4335 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
4337         * search.c (setup_class_bindings): Robustify.
4338         * typeck.c (common_type): Use same_type_p, not pointer equality,
4339         to compare types.
4341         * cp-tree.h (build_lang_field_decl): Remove.
4342         * class.c (build_vtable): Replace calls to build_lang_field_decl
4343         with build_lang_decl.
4344         (prepare_fresh_vtable): Likewise.
4345         (finish_struct_1): Likewise.
4346         (init_class_processing): Likewise.
4347         * decl.c (push_using_decl): Likewise.
4348         (init_decl_processsing): Likewise.
4349         (grokvardecl): Likewise.
4350         (build_ptrmemfunc_type): Likewise.
4351         (grokdeclarator): Likewise.
4352         (build_enumerator): Likewise.
4353         * decl2.c (grok_x_components): Likewise.
4354         (do_class_using_decl): Likewise.
4355         * except.c (call_eh_info): Likewise.
4356         * init.c (init_init_processing): Likewise.
4357         * rtti.c (expand_class_decl): Likewise.
4358         * tree.c (build_base_fields): Likewise.
4359         (build_vbase_pointer_fields): Likewise.
4360         * lex.c (build_lang_decl): Build declarations on the permanent
4361         obstack if we're building statmeent trees.
4362         (retrofit_lang_decl): Handle both the full lang_decl and also the
4363         smaller lang_decl_flags here.
4364         (build_lang_field_decl): Remove.
4365         * pt.c (push_template_decl_real): Issue errors for variable
4366         declarations that are not static members.
4368 1999-08-18  Richard Henderson  <rth@cygnus.com>
4370         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
4371         (mapcar): Likewise.
4373 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
4375         * cp-tree.h (back_end_hook): New variable.
4376         * decl2.c (back_end_hook): Define it.
4377         (finish_file): If it's non-NULL, call it.
4379         * decl.c (add_decl_to_level): New function.
4380         (push_local_binding): Use it.
4381         (find_binding): Fix typo in comment.
4382         (pushdecl): Use add_decl_to_level.  Put templates on the
4383         corresponding namespace-scope binding levels.
4384         * dump.c (dequeue_and_dump): Print the specializations of a
4385         template.
4386         * pt.c (push_template_decl_real): Don't push a template multiple
4387         times.
4389 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
4391         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
4392         (CALL_DECLARATOR_QUALS): Likewise.
4393         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
4394         * decl.c (grokdeclarator): Adjust to use them.
4395         * decl2.c (grokfield): Likewise.
4396         (reparse_absdcl_as_casts): Likewise.
4397         * lex.c (make_call_declarator): Likewise.
4398         (set_quals_and_spec): Likewise.
4399         * pt.c (tsubst): Likewise.
4400         * tree.c (mapcar): Remove special hack to handle third operand of
4401         a CALL_EXPR.
4403 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
4405         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
4406         * class.c (build_vtable): Use build_lang_field_decl to build the
4407         VAR_DECLs for vtables.
4408         (prepare_fresh_vtable): Likewise.
4409         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
4410         CAN_HAVE_FULL_LANG_DECL_P.
4411         (push_using_decl): Use build_lang_decl to build USING_DECLs.
4412         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
4413         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
4414         (build_lang_field_decl): Likewise.
4415         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
4416         to copy.
4417         
4418         * cp-tree.def (STMT_EXPR): New tree node.
4419         * cp-tree.h (STMT_EXPR_STMT): New macro.
4420         (store_return_init): Change prototype.
4421         (finish_named_return_value): New function.
4422         (expand_stmt): Likewise.
4423         (expand_body): Likewise.
4424         (begin_stmt_tree): Likewise.
4425         (finish_stmt_tree): Likewise.
4426         (expanding_p): New variable.
4427         (last_expr_type): Likewise.
4428         (building_stmt_tree): New macro.
4429         * decl.c (start_function): Use building_stmt_tree, not
4430         processing_template_decl, where appropriate.
4431         (store_parm_decls): Likewise.
4432         (store_return_init): Move most of the body to semantics.c.
4433         (finish_function): Use building_stmt_tree.
4434         (finish_stmt): Clear last_expr_type here.
4435         (cp_function): Add expanding_p, last_tree, last_expr_type.
4436         (push_cp_function_context): Save them.
4437         (pop_cp_function_context): Restore them.
4438         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
4439         * error.c (dump_expr): Handle STMT_EXPR.
4440         * except.c (expand_start_catch_block): Use building_stmt_tree.
4441         Use add_decl_stmt.
4442         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
4443         (do_case): Move add_tree call to semantics.c.
4444         * parse.y (return_init): Use finish_named_return_value.
4445         (for.init.statement): Use finish_expr_stmt.
4446         * parse.c: Regenerated.
4447         * pt.c (do_pushlevel): Move to semantics.c.
4448         (do_poplevel): Likewise.
4449         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
4450         (tsubst_expr): Don't expand all the way to RTL here.  Handle
4451         RETURN_INIT and CTOR_INITIALIZER.
4452         (instantiate_decl): Call expand_body after tsubst'ing into
4453         DECL_SAVED_TREE.
4454         * semantics.c (expand_stmts): New function.
4455         (expanding_p): New variable.
4456         (last_expr_type): Likewise.
4457         (finish_expr_stmt): Use building_stmt_tree.
4458         (begin_if_stmt): Likewise.
4459         (finish_if_stmt_cond): Likewise.
4460         (finish_then_clause): Likewise.
4461         (begin_else_clause): Likewise.
4462         (finish_else_clause): Likewise.
4463         (begin_while_stmt): Likewise.
4464         (finish_while_stmt_cond): Likewise.
4465         (finish_while_stmt): Likewise.
4466         (finish_do_body): Likewise.
4467         (finish_do_stmt): Likewise.
4468         (finish_return_stmt): Likewise.
4469         (begin_for_stmt): Likewise.
4470         (fnish_for_init_stmt): Likewise.
4471         (finish_for_cond): Likewise.
4472         (finish_for_expr): Likewise.
4473         (finish_for_stmt): Likewise.
4474         (finish_break_stmt): Likewise.
4475         (finish_continue_stmt): Likewise.
4476         (finish_switch_cond): Likewise.
4477         (finish_switch_stmt): Likewise.
4478         (finish_case_label): Call add_tree here if necessary.
4479         (finish_goto_statement): Use building_stmt_tree.
4480         (begin_try_block): Likewise.
4481         (begin_function_try_block): Likewise.
4482         (finish_try_block): Likewise.
4483         (finish_function_try_block): Likewise.
4484         (finish_handler_sequence): Likewise.
4485         (finish_function_handler_sequence): Likewise.
4486         (begin_handler): Likewise.
4487         (finish_handler_parms): Likewise.
4488         (finish_handler): Likewise.
4489         (begin_compound_stmt): Likewise.
4490         (finish_compound_stmt): Likewise.
4491         (finish_asm_stmt): Likewise.
4492         (finish_label_stmt): Likewise.
4493         (finish_named_return_value): New function.
4494         (setup_vtbl_ptr): Moved here from decl2.c.
4495         (do_pushlevel): Moved here from pt.c.
4496         (do_poplevel): Likewise.
4497         (begin_stmt_expr): Use building_stmt_tree.
4498         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
4499         when building_stmt_tree.
4500         (begin_stmt_tree): New function.
4501         (finish_stmt_tree): Likewise.
4502         (expand_stmt): Likewise.
4503         (expand_body): Likewise.
4504         * tree.c (build_cplus_method_type): Make sure the argument types
4505         end up on the same obstack as the METHOD_TYPE.
4506         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
4507         THROW_EXPR, STMT_EXPR.
4508         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
4509         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
4510         sorry, if an unsupported node is encountered.
4511         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
4512         (c_expand_return): Don't call add_tree here.
4513         
4514 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
4516         * pt.c (check_default_tmpl_args): Don't check in local scopes.
4517         (tsubst_decl): Make sure the declaration is on a saveable
4518         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
4519         variable.
4520         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
4521         
4522 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
4524         Speed up Koenig lookup.
4525         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
4526         to return namespaces we've looked at.
4527         * decl2.c (lookup_using_namespace): Likewise.
4528         (add_function): Don't call ovl_member.
4529         (lookup_arg_dependent): Initialize k.namespaces to the list of 
4530         namespaces seen in unqualified lookup.
4531         * call.c (equal_functions): Move here from tree.c.
4532         (joust): Use it to handle duplicate candidates.
4533         * tree.c (ovl_member): Use ==.
4535 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
4537         * cp-tree.def (DECL_STMT): Make it smaller.
4538         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
4539         (lang_decl): ... here.  Add next.
4540         (DECL_SAVED_TREE): Adjust accordingly.
4541         (DECL_IMPLICIT_TYPEDEF_P): New macro.
4542         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
4543         (DECL_STMT_DECL): Likewise.
4544         (create_implicit_typedef): New function.
4545         (maybe_push_decl): Likewise.
4546         (tsubst_default_argument): New function.
4547         (at_function_scope_p): Likewise.
4548         (add_decl_stmt): Likewise.
4549         (push_permanent_obstack): Likewise.
4550         * call.c (convert_default_arg): Use tsubst_default_argument.
4551         * class.c (add_method): Use push_permanent_obstack.
4552         (build_self_reference): Create a TEMPLATE_DECL for the
4553         self-reference, if necessary.
4554         * decl.c (pseudo_global_level_p): Only look at the current binding
4555         level.
4556         (push_binding): Use push_permanent_obstack.
4557         (create_implicit_typedef): New function.
4558         (pushtag): Use it.
4559         (duplicate_decls): Use push_permanent_obstack.
4560         (maybe_push_decl): New function.
4561         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
4562         (start_decl_1): Remove dead code.
4563         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
4564         pseudo_global_level_p.
4565         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
4566         template.
4567         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
4568         pseudo_global_level_p.
4569         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
4570         a template.
4571         (get_sentry): Use push_permanent_obstack.
4572         * dump.c (dequeue_and_dump): Enable DECL_STMT.
4573         * except.c (call_eh_info): Use push_permanent_obstack.
4574         (build_eh_type_ref): Likewise.
4575         (do_pop_exception): Likewise.
4576         (expand_eh_spec): Likewise.
4577         (alloc_eh_object): Likewise.
4578         (expand_throw): Likewise.
4579         * init.c (build_java_class_ref): Likewise.
4580         * lex.c (get_time_identifier): Likewise.
4581         (free_lang_decl_chain): Correct type.
4582         (retrofit_lang_decl): Adjust accordingly.
4583         (build_lang_field_decl): Likewise.
4584         * lex.h (free_lang_decl_chain): Likewise.
4585         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
4586         * parse.c: Regenerated.
4587         * pt.c (tsubst_default_arguments): New function.
4588         (retrieve_local_specialization): Likewise.
4589         (register_local_specialization): Likewise.
4590         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
4591         pseudo_global_level_p to determine whether or not a template is
4592         primary.
4593         (lookup_template_class): Likewise.  Use create_implicit_typedef.
4594         (instantiate_class_template): Call tsubst_default_arguments for
4595         member functions, if appropriate.
4596         (tsubst_default_argument): New function.
4597         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
4598         * search.c (at_function_scope_p): New function.
4599         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
4600         (finish_label_stmt): Likewise.
4601         (add_decl_stmt): New function.
4602         (begin_class_definition): Likewise.
4603         (finish_typeof): Likewise.
4604         * tree.c (copy_template_template_parm): Likewise.
4605         (copy_to_permanent): Likewise.
4606         (push_permanent_obstack): Define.
4607         (mark_addressable): Use it.
4608         * typeck.c (mark_addressable): Likewise.
4609         
4610 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
4612         * cp-tree.h (init_cplus_unsave): New.
4613         (cplus_unsave_expr_now): New.
4614         * lex.c (init_parse): Call init_cplus_unsave.
4615         * tree.c (init_cplus_unsave): New.
4616         (cplus_unsave_expr_now): New.
4618 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
4620         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
4621         decl_constant_value to simplify array bounds.
4623 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
4625         * lang-options.h: Add -fms-extensions.
4626         * cp-tree.h: Declare flag_ms_extensions.
4627         * decl2.c: Define it.
4628         * class.c (instantiate_type): Don't complain about taking the address
4629         of a bound member function if -fms-extensions.
4630         * typeck.c (build_unary_op): Likewise.
4631         * decl.c (grokdeclarator): Or about implicit int.
4632         * init.c (resolve_offset_ref): Or about implicit '&'.
4634 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
4636         * cp-tree.h (minimal_parse_mode): Remove.
4637         (finish_label_stmt): New function.
4638         * decl.c (saved_scope): Remove minimal parse mode.
4639         (maybe_push_to_top_level): Don't save it.
4640         (pop_from_top_level): Don't restore it.
4641         (define_label): Split out template-handling code to semantics.c.
4642         (start_decl): Don't use minimal_parse_mode.
4643         (cp_finish_decl): Likewise.
4644         (start_function): Don't increment it.
4645         (store_return_init): Don't use it.
4646         (finish_function): Don't decrement it.
4647         * parse.y (label_colon): Use finish_label_stmt throughout.
4648         * parse.c: Regenerated.
4649         * pt.c (minimal_parse_mode): Don't define it.
4650         (tsubst_expr): Use finish_label_stmt.
4651         * semantics.c (finish_label_stmt): New function.
4653         * dump.c (queue): Be careful when computing bitmasks.
4654         (dequeue_and_dump): Describe binfos as binfos, not as
4655         vectors.
4656         
4657         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
4658         throughout.     
4659         * parse.c: Regenerated.
4660         
4661         * Make-lang.in (CXX_SRCS): Remove sig.c.
4662         * Makefile.in (CXX_OBJS): Remove sig.o.
4663         (sig.o): Remove.
4664         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
4665         (CPTI_SIGNATURE_TYPE): Likewise.
4666         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
4667         (opaque_type_node): Likewise.
4668         (signature_type_node): Likewise.
4669         (sigtable_entry_type): Likewise.
4670         (flag_handle_signatures): Likewise.
4671         (lang_type): Remove is_signature, is_signature_pointer,
4672         is_signature_reference, has_opaque_typedecls,
4673         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
4674         signature_pointer_to, signature_reference_to.
4675         (IS_SIGNATURE): Remove.
4676         (SET_SIGNATURE): Remove.
4677         (CLEAR_SIGNATURE): Remove.
4678         (IS_SIGNATURE_POINTER): Remove.
4679         (IS_SIGNATURE_REFERENCE): Remove.
4680         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
4681         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
4682         (CLASSTYPE_SIGNATURE): Remove.
4683         (SIGNATURE_TYPE): Remove.
4684         (SIGNATURE_METHOD_VEC): Remove.
4685         (SIGNATURE_POINTER_TO): Remove.
4686         (SIGNATURE_REFERENCE_TO): Remove.
4687         (lang_decl_flags): Remove is_default_implementation.  Rename
4688         memfunc_pointer_to to saved_tree.
4689         (IS_DEFAULT_IMPLEMENTATION): Remove.
4690         (DECL_MEMFUNC_POINTER_TO): Remove.
4691         (DECL_MEMFUNC_POINTING_TO): Remove.
4692         (DECL_SAVED_TREE): Adjust definition.
4693         (tag_types): Remove signature_type_node.
4694         (SIGNATURE_FIELD_NAME): Remove.
4695         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
4696         (SIGNATURE_OPTR_NAME): Likewise.
4697         (SIGNATURE_SPTR_NAME): Likewise.
4698         (SIGNATURE_POINTER_NAME): Likewise.
4699         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
4700         (SIGNATURE_REFERENCE_NAME): Likewise.
4701         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
4702         (SIGTABLE_PTR_TYPE): Likewise.
4703         (SIGTABLE_NAME_FORMAT): Likewise.
4704         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
4705         (SIGTABLE_TAG_NAME): Likewise.
4706         (SIGTABLE_VB_OFF_NAME): Likewise.
4707         (SIGTABLE_VT_OFF_NAME): Likewise.
4708         (finish_base_specifiers): Change prototype.
4709         (build_signature_pointer_type): Remove.
4710         (build_signature_reference_type): Remove.
4711         (build_signature_pointer_constructor): Remove.
4712         (build_signature_method_call): Remove.
4713         (build_optr_ref): Likewise.
4714         (append_signature_fields): Likewise.
4715         (signature_error): Likewise.
4716         * call.c (build_this): Remove signature support.
4717         (build_over_call): Likewise.
4718         (build_new_method_call): Likewise.
4719         * class.c (add_implicitly_declared_members): Likewise.
4720         (finish_struct_1): Likewise.
4721         (finish_struct): Likewise.
4722         * cvt.c (cp_convert_to_pointer): Likewise.
4723         (convert_to_pointer_force): Likewise.
4724         (ocp_convert): Likewise.
4725         * decl.c (sigtable_decl_p): Remove.
4726         (init_decl_processing): Remove support for signatures.
4727         (cp_finish_decl): Likewise.
4728         (grokdeclarator): Likewise.
4729         (grokparms): Likewise.
4730         (xref_tag): Likewise.
4731         (start_function): Likewise.
4732         (start_method): Likewise.
4733         * decl2.c (finish_sigtable_vardecl): Remove.
4734         (flag_handle_signatures): Remove.
4735         (lang_f_options): Remove handle-signatures.
4736         (grokfield): Remove support for signatures.
4737         (grokbitfield): Likewise.
4738         (finish_file): Likewise.
4739         (reparse_absdcl_as_casts): Likewise.
4740         * error.c (dump_type_real): Likewise.
4741         (dump_function_decl): Likewise.
4742         * friend.c (make_friend_class): Likewise.
4743         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
4744         * hash.h: Regenerated.
4745         * init.c (build_new_1): Remove support for signatures.
4746         * lang-options.h: Remove -fhandle-signatures,
4747         -fno-handle-signatures. 
4748         * lex.c (init_parse): Remove support for signatures.
4749         (yyprint): Likewise.
4750         * lex.h (rid): Remove RID_SIGNATURE.
4751         * method.c (build_decl_overload_real): Remove support for
4752         signatures. 
4753         (hack_identifier): Likewise.
4754         * parse.y (base_class): Likewise.
4755         (base_class.1): Likewise.
4756         (access_specifier): Likewise.
4757         * search.c (lookup_member): Likewise.
4758         * semantics.c (finish_qualified_object_call_expr): Likewise.
4759         (finish_template_type_parm): Likewise.
4760         (begin_class_definition): Likewise.
4761         (finish_base_specifier): Likewise.
4762         * sig.c: Remove.
4763         * tree.c (build_cplus_method_type): Remove support for signatures.
4764         * typeck.c (require_complete_type): Likewise.
4765         (c_sizeof): Likewise.
4766         (c_alignof): Likewise.
4767         (build_object_ref): Likewise.
4768         (build_component_ref): Likewise.
4769         (build_indirect_ref): Likewise.
4770         (build_c_cast): Likewise.
4771         (build_modify_expr): Likewise.
4772         (convert_for_initialization): Likewise.
4773         * typeck2.c (signature_error): Remove.
4774         (store_init_value): Remove support for signatures.
4775         (digest_init): Likewise.
4776         (build_x_arrow): Likewise.
4777         (build_functional_cast): Likewise.
4778         * xref.c (GNU_xref_decl): Likewise.
4779         
4780 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
4782         * lex.c (do_identifier): Remove unnecessary lookup of class field.
4784 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
4786         * decl2.c (set_decl_namespace): Do not complain about non-matching
4787         decls if processing a template.
4789 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
4791         * decl.c (build_ptrmemfunc_type): Handle qualified
4792         pointer-to-member types here.
4793         * tree.c (cp_build_qualified_type_real): Simplify handling here.
4795 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4797         * lex.c (lang_identify): Likewise.
4799 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
4801         * Makefile.in: Update dependencies.
4802         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
4803         NULL_RTX.
4804         * decl.c: Include "function.h"
4805         (cleanup_label, return_label): Delete declarations.
4806         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
4807         (finish_function): Rename last_parm_insn variable to
4808         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
4809         * decl2.c: Include "function.h".
4810         (rtl_expr_chain): Delete declaration.
4811         * method.c: Include "function.h"
4812         * tree.c (build_vbase_pointer_fields): Don't initialize
4813         DECL_SAVED_INSNS with NULL_RTX.
4814         * typeck.c: Include "function.h"
4816 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
4818         * semantics.c (begin_function_try_block, finish_function_try_block,
4819         finish_function_handler_sequence): New fns.
4820         * parse.y (function_try_block): Use them.
4821         * pt.c (instantiate_decl): Likewise.
4823         * cp-tree.h: Declare in_function_try_handler.
4824         * decl.c: Define it.
4825         (start_function): Clear it.
4826         (struct cp_function, push_cp_function_context): Save it.
4827         (pop_cp_function_context): Restore it.
4828         * parse.y (function_try_block): Set and clear it.
4829         * except.c (expand_end_catch_block): Rethrow if we reach the end
4830         of a function-try-block handler in a ctor or dtor.
4831         * typeck.c (c_expand_return): Complain about returning from a
4832         function-try-block handler of a ctor.
4834         * parse.y (function_try_block): Call end_protect_partials
4835         before expand_start_all_catch.
4837 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
4839         * decl.c (struct binding_level): Add eh_region field.
4840         (push_binding_level): Set it.
4841         (define_label): Complain about jumping into an EH block.
4843         * ptree.c (print_lang_type): Print the real type of a PMF.
4844         Print what exceptions a fn type throws.
4846 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4848         * class.c (count_fields, add_fields_to_vec): Add static prototype.
4850         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
4851         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
4852         char*.
4854         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
4855         Constify a char*.
4857         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
4858         char*.
4860         * dump.c (queue_and_dump_index, dump_int, dump_string,
4861         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
4862         a char*.
4863         (dump_stmt): Add static prototype.
4865         * errfn.c (cp_thing): Constify a char*.
4867         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
4868         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
4869         dump_expr): Constify a char*.
4871         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
4872         read_line_number): Add static prototype.
4873         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
4874         (real_yylex): Move label `letter' into the scope where it is used.
4876         * method.c (build_mangled_template_parm_index, build_overload_int,
4877         build_decl_overload_real, get_id_2): Constify a char*.
4879         * search.c (check_final_overrider): Make static.
4881         * typeck.c (composite_pointer_type): Constify a char*.
4883 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
4885         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
4886         we're looking at a class.
4888         * decl.c (lookup_name_real): Set the complain flag if we're
4889         looking for a namespace member.
4891         * lex.c (real_yylex): We can have a number with no digits.
4893         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
4895         * search.c (binfo_from_vbase): New fn.
4896         * cp-tree.h: Declare it.
4897         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
4898         from pointer to member of virtual base.  
4899         * typeck.c (get_delta_difference): Likewise.
4901 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
4903         * pt.c (tsubst): Use build_index_type to build in-template array
4904         index type.  Fixes g++.oliva/dwarf1.C.
4905         * decl.c (grokdeclarator): Likewise, just for consistency, as it
4906         doesn't seem to trigger the bug without it.
4908 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
4910         * typeck2.c (add_exception_specifier): Use complete_type.
4912 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
4914         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
4915         (dump_binary_op): Bulletproof.
4916         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
4917         * tree.c (search_tree): Don't enumerate all the nodes of classes
4918         `1', `2', and `<'; handle them generically.  Don't be sorry about
4919         "unrecognized tree codes"; just abort.
4920         (no_linkage_check): Don't do linkage checks for templates.
4921         
4922         * tree.c (cp_build_qualified_type_real): Handle
4923         pointer-to-member-function types correctly.
4925 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
4927         * decl.c (pushdecl): Only give an error for shadowing a parm 
4928         from *this* function.
4930 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
4932         * typeck2.c: Update URLs and mail addresses.
4934 1999-08-04  Nathan Sidwell  <nathan@acm.org>
4936         * cp-tree.h (empty_except_spec): New global var.
4937         (compexcepttypes): Remove prototype.
4938         (comp_except_specs): Prototype new global function.
4939         (add_exception_specifier): Prototype new global function.
4940         * decl.c (empty_except_spec): Define new global var.
4941         (duplicate_decls): Use comp_except_specs, reword error message.
4942         (init_decl_processing): Initialize empty_except_spec.
4943         Adjust build_exception_variant calls.
4944         * parse.y (exception_specification_opt): Use empty_except_spec.
4945         (ansi_raise_identifier): Call check_for_new_type.
4946         (ansi_raise_identifiers): Use add_exception_specifier.
4947         * pt.c (tsubst): Use add_exception_specifier to build exception
4948         specifier.
4949         * search.c (check_final_overrider): New static function, broken
4950         out of get_matching_virtual. Check throw specifiers, reword
4951         diagnostics.
4952         (get_matching_virtual): Use check_final_overrider.
4953         * tree.c (build_exception_variant): Use comp_except_specs.
4954         * typeck.c (compexcepttypes): Remove.
4955         (comp_except_types): New static function, helper for
4956         comp_except_specs. Compare two types as exception specifiers.
4957         (comp_except_specs): New global function, compare two exception
4958         specifiers.
4959         (comptypes): Adjust for comp_except_specs.
4960         * typeck2.c (add_exception_specifier): New global function.
4961         
4962         * class.c (check_for_override): Reword error message.
4964 1999-08-03  Nathan Sidwell  <nathan@acm.org>
4966         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
4967         * cp-tree.h (struct lang_type): Added non_pod_class flag.
4968         (CLASSTYPE_NON_POD_P): New macro to access it.
4969         * class.c (finish_struct_1): Determine non-PODness.
4970         Check for arrays of pointers (-Weffc++).
4971         Remove array inspection duplicated code.
4972         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
4973         Use CLASSTYPE_NON_POD_P.
4975 1999-08-03  Nathan Sidwell  <nathan@acm.org>
4977         * class.c (duplicate_tag_error): Preserve template information.
4979 1999-08-03  Nathan Sidwell  <nathan@acm.org>
4981         * decl.c (start_enum): Show location of previous definition.
4982         * parse.y (enumlist_opt): New reduction.
4983         (structsp): Simplify enum rules to use enumlist_opt.
4985 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
4987         * lex.c (yyprint): Handle PFUNCNAME.
4989         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
4990         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
4992 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
4994         * decl.c (start_decl): Set attributes before duplicate_decls call.
4996 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
4998         * Make-lang.in (CXX_SRCS): Add dump.c.
4999         * Makefile.in (CXX_OBJS): Add dump.o.
5000         (dump.o): New target.
5001         * cp-tree.h (DECL_CONV_FN_P): Document.
5002         (DECL_OVERLOADED_OPERATOR_P): New function.
5003         (TYPE_PTRMEM_CLASS_TYPE): New macro.
5004         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5005         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
5006         (ASM_VOLATILE_P): New macro.
5007         (STMT_LINENO): Likewise.
5008         (cp_namespace_decls): New function.
5009         (dump_node_to_file): New function.
5010         * decl.c (cp_namespace_decls): New function.
5011         (walk_namespaces_r): Use it.
5012         (wrapup_globals_for_namespace): Likewise.
5013         * decl2.c (flag_dump_translation_unit): New variable.
5014         (lang_decode_option): Handle -fdump-translation-unit.
5015         (finish_file): If flag_dump_translation_unit is set, dump the
5016         translation unit.
5017         * dump.c: New file.
5018         * lang-options.h: Add -fdump-translation-unit.
5019         * pt.c (tsubst_template_parms): Robustify.
5020         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
5021         (tsubst_expr): Use STMT_LINENO.
5022         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
5023         for invalid cv-qualifiers even while building templates.
5024         
5025 1999-08-02  Richard Henderson  <rth@cygnus.com>
5027         * call.c: Include defaults.h instead of expr.h.
5028         * decl.c: Likewise.
5029         * pt.c: Likewise.
5030         * typeck.c: Include defaults.h.
5032 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
5034         * lex.c (errorcount, sorrycount): Don't declare.
5035         * repo.c (errorcount, sorrycount): Likewise.
5036         * typeck2.c (errorcount, sorrycount): Likewise.
5038 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
5040         * call.c (convert_default_arg, build_over_call): Change all uses of
5041         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
5042         Ensure expr.h is included.
5043         * decl.c (grokparams): Ditto.
5044         * pt.c (tsubst_decl): Ditto.
5045         * typeck.c (convert_arguments): Ditto.
5047 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
5049         * class.c (mark_overriders): Fix order of args to overrides.
5050         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
5051         functions with the same name.
5053 1999-08-02  Richard Henderson  <rth@cygnus.com>
5055         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
5057 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
5059         * call.c (build_conditional_expr): Fix typo in comment.
5061 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
5063         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
5064         case_stack; use in_control_zone_p.
5065         * typeck.c (c_expand_return): Likewise.
5067 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
5069         * except.c (catch_clauses): Delete declaration.
5071 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
5073         * call.c (build_conditional_expr): Call convert_from_reference to
5074         avoid reference/non-reference type confusion.  Fix typo.
5076 1999-07-30  Richard Henderson  <rth@cygnus.com>
5078         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
5079         * cp-tree.h (initializer_constant_valid_p): Remove.
5081 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
5083         * call.c (conditional_conversion): Don't build BASE_CONVs for
5084         conversions between things that have the same type.
5085         (build_conditional_expr): Tweak.
5086         (convert_like): Some BASE_CONVs really do require the generation
5087         of code.
5088         
5089         * init.c (perform_member_init): Don't go through build_modify_expr
5090         for simple initializations.
5092 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
5094         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
5095         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
5096         virtual functions and MI.  Simplify.
5098         * method.c: Remove prototype for largest_union_member.
5099         * pt.c (determine_specialization): Fix uninitialized warning.
5100         * lex.c (real_yylex): Likewise.
5102 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
5104         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
5105         here too.
5107         * cp-tree.h (BINFO_VIRTUALS): Document new format.
5108         * class.c (modify_one_vtable): Change prototype accordingly.
5109         (modify_all_vtables): Likewise.
5110         (modify_all_direct_vtables): Likewise.
5111         (modify_all_indirect_vtables): Likewise.
5112         (build_vtable_entry_for_fn): New function.
5113         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
5114         (modify_vtable_entry): Likewise.
5115         (add_virtual_function): Likewise.
5116         (build_vtbl_initializer): New function.
5117         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
5118         (fixup_vtable_deltas1): Likewise.
5119         (fixup_vtable_deltas): Likewise.
5120         (override_one_vtable): Likewise.
5121         (finish_struct_1): Likewise.
5123         * error.c (dump_expr): Likewise.
5124         * search.c (get_abstract_virtuals_1): Likewise.
5125         (get_abstract_virtuals): Likewise.
5126         (expand_upcast_fixups): Likewise.
5127         * tree.c (debug_binfo): Likewise.
5128         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
5129         __pure_virtual here.
5130         
5131 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
5133         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
5134         as per 1999-07-26 change.
5136         * typeck.c (c_sizeof): Don't allow non-static data members.
5137         (expr_sizeof): Likewise.
5139 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
5141         * input.c (feed_input): Only touch lineno and input_filename
5142         if !USE_CPPLIB.  Save the old values before setting the new ones.
5144         * input.c (feed_input): Add file, line parms.
5145         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
5146         (real_yylex): Check linemode before input_redirected().
5148         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
5149         from op new to warning.
5151 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
5153         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
5154         * call.c: All uses changed.
5155         * typeck.c: Likewise.
5157 1999-07-26  Nathan Sidwell  <nathan@acm.org>
5159         * exception.cc (__cplus_type_matcher): Match __eh_matcher
5160         prototype.
5162 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
5164         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
5165         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
5166         (strip_top_quals): Declare.
5167         (ncp_convert): Likewise.
5168         (type_after_usual_arithmetic_converions): Likewise.
5169         (composite_pointer_type): Likewise.
5170         * call.c (strip_top_quals): Don't make it static.
5171         (promoted_arithmetic_type_p): New function.
5172         (conditional_conversion): Likewise.
5173         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
5174         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
5175         for converting a type to itself.
5176         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
5177         (implicit_conversion): Make sure the from and to types are
5178         complete.
5179         (add_builtin_candidate): Correct handling of ?: operator.
5180         (add_builtin_candidates): Improve documentation.
5181         (build_conditional_expr): New function.
5182         (can_convert): Implement in terms of can_convert_arg.
5183         (ncp_convert): New function.
5184         * typeck.c (type_after_usual_arithmetic_conversions): New
5185         function, split out from common_type.
5186         (composite_pointer_type): New function, split out from
5187         build_conditional_expr.
5188         (common_type): Use type_after_usual_arithmetic_conversions.
5189         Remove redundant attribute merging.
5190         (comptypes): Tidy.  Handle COMPLEX_TYPE.
5191         (build_binary_op_nodefault): Use null_ptr_cst_p.
5192         (build_conditional_expr): Remove.
5193         (convert_for_assignment): Use new conversion functions.
5194         
5195         * cp-tree.h (abstract_virtuals_error): Change declaration.
5196         * typeck2.c (abstract_virtuals_error): Check to see if an error
5197         ocurred, and return a boolean value accordingly.
5198         (build_functional_cast): Adjust accordingly.
5199         * class.c (finish_struct_1): Likewise.
5200         * cvt.c (ocp_convert): Likewise.
5201         * decl.c (cp_finish_decl): Likewise.
5202         (grokparams): Likewise.
5203         (grok_op_properties): Likewise.
5204         (start_function): Likewise.
5205         * init.c (build_new_1): Likewise.
5207         * pt.c (unify): Don't get confused by pointers-to-member functions.
5209         * search.c (build_cplus_new): Robustify.
5210         
5211 1999-07-24  Richard Henderson  <rth@cygnus.com>
5213         * gxx.gperf (__builtin_va_arg): New.
5214         * parse.y (VA_ARG): New token.
5215         (unary_expr): Recognize it.
5217 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
5219         * g++FAQ.texi: Deleted per Joe Buck's request.
5220         * Makefile.in: Corresponding changes.
5222 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
5224         * lex.c: Sync with C frontend.
5225         (whitespace_cr): New fn.
5226         (skip_white_space): Use it.
5227         (init_parse): Reorder.
5228         (yyprint): Support CONSTANT.
5229         (pragma_getc, pragma_ungetc): Bring back.
5230         (read_line_number): Change in_system_header directly.
5231         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
5232         (parse_float): Update to C version.
5233         (yylex): Handle '$' under the letter case.
5234         Remove looking_for_typename handling.
5235         Support hex floating point constants.
5236         Follow C's lead for choosing type of integer constants.
5237         Rearrange stuff to match C frontend.
5238         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
5239         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
5241 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
5243         * call.c (reference_binding): Tweak.
5244         (mayble_handle_implicit_object): Use direct_reference_binding to
5245         create the right implicit conversion sequence.
5247 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
5249         * pt.c (convert_nontype_argument): Don't call decl_constant_value
5250         if we're converting to a reference type.
5252         * call.c (NEED_TEMPORARY_P): New macro.
5253         (standard_conversion): Set it, for derived-to-base conversions.
5254         (reference_related_p): New function.
5255         (reference_compatible_p): Likewise.
5256         (convert_class_to_reference): Likewise.
5257         (direct_reference_binding): Likewise.
5258         (reference_binding): Rework for standards-compliance.
5259         (convert_like): Adjust accordingly.
5260         (maybe_handle_ref_bind): Simplify; the right conversion sequences
5261         are now built up in reference_binding.
5262         (initialize_reference): New function.
5263         * cp-tree.h (ICS_USER_FLAG): Document.
5264         (ICS_THIS_FLAG): Likewise.
5265         (ICS_BAD_FLAG): Likewise.
5266         (NEED_TEMPORARY_P): Likewise.
5267         (cp_lvalue_kind): New type.
5268         (real_lvalue_p): Return it.
5269         * error.c (dump_expr): Provide more accurate representation for
5270         AGGR_INIT_EXPRs.
5271         * init.c (expand_default_init): Do not try to perform implicit
5272         conversions for a brace-enclosed initializer.
5273         * search.c (lookup_conversions): Document.
5274         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
5275         appropriately.
5276         (real_lvalue_p): Adjust accordingly.
5277         (lvalue_p): Likewise.
5278         (build_cplus_new): Don't allow the creation of an abstract class.
5279         * typeck.c (convert_for_initialization): Use initialize_reference.
5280         
5281 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
5283         * lex.c (real_yylex) : Correct the test for overflow when lexing
5284         integer literals.
5286 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
5288         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
5289         not DECL_BUILT_IN, to determine if a function is internally declared.
5290         (duplicate_decls): Likewise.  Improve handling of builtins.
5291         (push_overloaded_decl): Remove special handling of builtins.
5293         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
5295         * decl.c (grokdeclarator): Pull out decl_constant_value in
5296         templates, too.
5298         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
5299         * cp-tree.h, pt.c, semantics.c: Adjust.
5300         * method.c (largest_union_member): Remove.
5302         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
5304         * lex.c (token_getch, token_put_back): New fns.
5305         (real_yylex): Use them.
5307         * lex.c (lang_init): Generalize.
5308         (lang_init_options): Tell cpplib this is C++.
5309         (nextchar): Remove.  Replace uses with put_back.
5310         (skip_white_space): Handle linemode here.  Optimize for cpplib.
5311         (extend_token_buffer_to): New fn.
5312         (extend_token_buffer): Use it.
5313         (read_line_number, check_newline): Just deal with tokens.
5314         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
5315         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
5316         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
5317         * parse.y (PAREN_STAR_PAREN): Remove.
5318         * input.c: Don't use the putback machinery with cpplib.
5319         (sub_getch): Fold back into getch.
5320         (getch): Don't handle linemode here.
5321         (feed_input): Unget any text in the token buffer.
5323         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
5324         nextyychar, nextyylval): Remove.
5326 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
5327             Jason Merrill  <jason@yorick.cygnus.com>
5329         * lex.c (indent_level): New variable.
5330         (init_parse): Set cpp_token to CPP_DIRECTIVE.
5331         (consume_string): Make this smart about USE_CPPLIB.
5332         (yyungetc): Use put_back function.
5333         (pragma_getc, pragma_ungetc): Functions deleted.
5334         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
5335         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
5336         pragma_ungetc.
5337         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
5338         Also, clean up cases where we redundantly set token_buffer[0].
5339         (read_line_number): New fn.
5340         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
5341         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
5342         (sub_getch): Conditionalize out code that's not appropriate if
5343         USE_CPPLIB.
5344         (put_back): Rewrite in case USE_CPPLIB is defined.
5345         (input_redirected): Ditto.
5347 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
5349         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
5350         c_global_trees and accessor macros defined in c-common.h.
5351         (cp_tree_index): New enumeration.
5352         (cp_global_trees): Declare new array.  Add accessor macros for it, and
5353         delete declarations of tree nodes replaced by it.
5354         (builtin_function): Delete macro, add declaration for new function.
5355         Include c-common.h.
5356         * decl.c: Delete definitions for tree nodes that were replaced by
5357         cp_global_trees and c_global_trees.
5358         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
5359         to generate the common builtins here.
5360         (builtin_function): New function.
5361         * decl2.c (abort_fndecl): Delete declaration.
5362         * except.c (expand_builtin_return_address): Delete declaration.
5363         (builtin_return_address_fndecl): Delete variable.
5364         (const_ptr_type_node): Delete declaration.
5365         * lex.c (cons_up_default_function): Delete declaration of
5366         void_list_node.
5367         * parse.y (void_list_node): Delete declaration.
5368         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
5369         Delete variables.
5370         (const_string_type_node): Delete declaration.
5371         * search.c (abort_fndecl): Delete declaration.
5372         * Makefile.in: Update dependencies.
5374 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
5376         * pt.c (check_default_tmpl_args): Move test for missing default
5377         arguments here, from ...
5378         (end_template_parm_list): Here.
5380 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
5382         * decl.c (lookup_nested_type): Remove.
5383         (pushtag): Don't call it.
5385 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
5387         * Makefile.in (INTERFACE): Bump to 2.
5389 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
5390         
5391         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
5392         instructions to gcc.gnu.org.  Removed e-mail address.
5394 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
5396         * pt.c (determine_specialization): Tighten error-checking.
5397         (end_template_parm_list): Likewise.
5399 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
5401         * pt.c (check_default_tmpl_args): Handle friends defined in the
5402         class just like member functions defined in the class.
5404 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
5405             Jason Merrill  <jason@yorick.cygnus.com>
5407         * cp-tree.h (struct lang_decl): Added field for storing sorted
5408         FIELD_DECLs (used in TYPE_DECLs).
5409         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
5410         (DECL_SORTED_FIELDS): New macro.
5411         * class.c (method_name_cmp): New function.
5412         (finish_struct_methods): Modified to support sorting and searching
5413         methods.
5414         (finish_struct_anon): Changed code in inner loop to use ELT rather 
5415         than UELT (which required an extra indirection for every reference).
5416         (field_decl_cmp): New function to support sorting FIELD_DECLs.
5417         (finish_struct_1): Sort fields.
5418         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
5419         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
5420         Also, switch to using array indexing rather than a changing pointer.
5421         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
5422         DECL_SORTED_FIELDS.
5424 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
5426         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
5427         casts in system headers or extern "C" blocks.
5429         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
5430         errors to pedwarn.
5432 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
5434         * decl2.c (write_virtuals): Deleted declaration.
5435         * cp-tree.h (write_virtuals): Deleted extern declaration.
5436         * class.c (finish_struct_1): Removed #if 0'd code that mentions
5437         write_virtuals.
5438         * semantics.c (begin_class_definition): Rewrite code to not depend
5439         on write_virtuals.
5441         * lex.c (cp_pragma_interface): New function.
5442         (cp_pragma_implementation): Likewise.
5443         (handle_cp_pragma): Call them.
5445         * typeck.c (comptypes): Simplify C code in look_hard.
5447         * xref.c (PALLOC): Use xcalloc, not calloc.
5448         (SALLOC): Use xmalloc, not malloc.
5450         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
5452         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
5453         is NO_DEBUG.
5455         * decl.c (duplicate_decls): If a redeclaration doesn't match the
5456         initial declaration, then don't save the inline info and by all
5457         means don't mark the function as a builtin function.
5459         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
5460         CURRENT_CLASS_TYPE is 0.
5462         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
5463         NULL_TREE.
5465         * ptree.c (print_lang_type): Added vtable-needs-writing.
5467 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
5469         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
5471 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
5473         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
5474         Merged into c-common.
5476 1999-07-05  Dave Brolley  <brolley@cygnus.com>
5478         * lex.c (errorcount): Declare it.
5479         (finish_parse): Update errorcount for when using CPPLIB.
5481 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
5483         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
5484         parameters.
5485         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
5486         * decl.c (push_class_binding): Use it.
5487         (lookup_name_real): Likewise.
5489 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
5491         * cp-tree.h (widest_integer_literal_type_node,
5492         widest_unsigned_literal_type) : New.
5493         * decl.c (widest_integer_literal_type_node,
5494         widest_unsigned_literal_type) : New.
5495         (init_decl_processing): Handle/use the two new types.
5496         * lex.c (real_yylex): Same.
5497         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
5498         Same. 
5500 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
5502         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
5503         to anonymous cv-qualified types.
5505 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
5507         * lex.c (real_yylex) : Change integer literal overflow handling to
5508         be like c-lex.c.
5510         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
5512 1999-06-28  Richard Henderson  <rth@cygnus.com>
5514         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
5516 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
5518         * error.c (dump_type_real): Handle TREE_LIST again.
5520         * typeck.c (comp_target_parms): Don't complain about 
5521         converting from () to (...) if !flag_strict_prototype.
5523         * decl.c (grokdeclarator): Update the names of all variants when
5524         de-anonymizing.
5526 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
5528         * init.c (expand_aggr_vbase_init): Rename to
5529         construct_virtual_bases.  Conditionalize construction here, 
5530         rather than ...
5531         (emit_base_init): Here.
5533 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
5535         * semantics.c (finish_asm_stmt): Apply decay conversions to
5536         input operands.
5538         * decl.c (expand_static_init): When building an anonymous function
5539         for use with atexit, compute its body before and after entering
5540         the function.
5542         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
5543         EXIT_EXPR.
5544         
5545 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
5547         * init.c (expand_aggr_vbase_init): Add flag parameter.
5548         (build_partial_cleanup_for): Remove, inlining into ..
5549         (expand_cleanup_for_base): ... here.  Take flag parameter.
5550         (emit_base_init): Pass the in_chrg parameter to
5551         emit_aggr_vbase_init. 
5552         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
5553         
5554 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
5556         * decl2.c (import_export_decl): Use same_type_p, rather than
5557         relying on pointer-equality for types.
5559         * method.c (do_build_copy_constructor): Simplify.
5561         * call.c (build_method_call): Remove bogus code for two-argument
5562         delete.
5563         * init.c (build_new_1): Expand on comment, and remove dead code.
5565         * init.c (expand_cleanup_for_base): New function, split out
5566         from ...
5567         (emit_base_init): Here.
5568         (expand_aggr_vbase_init): Use it.
5570 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
5572         * cp-tree.h (class_cache_firstobj): Declare.
5573         (maybe_push_cache_obstack): Rename to push_cache_obstack.
5574         * class.c (permanent_obstack): Remove declaration.
5575         (class_cache_firstobj): Make it global.
5576         (add_method): Don't use permanent_obstack directly.
5577         (pushclass): Only free the class_cache_obstack if we know how far
5578         back to free it.
5579         (maybe_push_cache_obstack): Rename to push_cache_obstack.
5580         * decl.c: Remove dead comment.
5581         (saved_scope): Add class_cache_firstobj.
5582         (push_to_top_level): Save it.
5583         (pop_from_top_level): Restore it.
5584         (push_class_level_binding): Use push_cache_obstack, not
5585         maybe_push_cache_obstack.
5586         * search.c (push_class_decls): Likewise.
5587         
5588 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5590         * pt.c (tsubst_friend_function): Push into namespace of friend
5591         function before pushdecl'ing it.
5593 1999-06-14  Nathan Sidwell  <nathan@acm.org>
5595         * call.c (build_new_op): Remove REF_BIND from all operands.
5597 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
5599         * init.c (build_new_1): Look up operator delete even if there was
5600         no explicit new placement.
5602 1999-06-08  Nathan Sidwell  <nathan@acm.org>
5604         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
5605         of ...
5606         (build_throw): ... here. Call it.
5607         (process_start_catch_block): Call it.
5609 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
5611         * search.c (convert_pointer_to_single_level): Reimplement without
5612         using get_binfo.
5614 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
5616         * method.c (is_back_referenceable_type): Back-reference bools when
5617         not squangling.
5619 1999-06-07  Dave Brolley  <brolley@cygnus.com>
5621         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
5622         * input.c (putback_buffer): New structure type.
5623         (putback): Replaces putback_char member.
5624         (putback): Replaces putback_char static variable.
5625         (feed_input): Use putback.
5626         (end_input): Use putback.
5627         (sub_getch): Use putback.
5628         (put_back): Use putback.
5630 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
5632         * decl.c (grokdeclarator): Fix typo in last change.
5634 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
5636         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
5637         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
5639 1999-06-04  Nathan Sidwell  <nathan@acm.org>
5641         * except.c (build_throw): Check throw expression validity.
5643 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
5645         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
5646         just because flag_signed_bitfields is false.
5648 1999-06-03  Nathan Sidwell  <nathan@acm.org>
5650         * semantics.c (begin_class_definition): Update the struct's
5651         location here ...
5652         * class.c (finish_struct): ... rather than here.
5654         * decl.c (make_typename_type): Don't rely on uninitialized
5655         variable.
5657 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5659         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
5661 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
5663         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
5664         and friends rather than messing with current_obstack directly.
5665         (cp_build_qualified_type_real): Rework ARRAY_TYPE
5666         allocation to match practice throughout the rest of the 
5667         compiler.
5669 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
5671         * lex.c (make_lang_type): Create TYPE_BINFO for
5672         TEMPLATE_TYPE_PARMs just like for non-template types.
5674         * decl.c (start_decl): Move checks on initialization to ...
5675         (cp_finish_decl): Here.  Tidy formatting slightly.
5677 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
5679         * decl.c (add_binding): Don't complain about a redeclaration of a
5680         semantically identical typedef in a local scope.
5682 1999-05-28  Nathan Sidwell  <nathan@acm.org>
5684         * decl.c (complete_array_type): Allocate off same obstack. Fix
5685         DO_DEFAULT comment to match reality.
5687         * friend.c (make_friend_class): Fix diagnostic typo.
5689 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
5691         * decl.c (lookup_namespace_name): Handle getting a
5692         TEMPLATE_ID_EXPR.
5693         (expand_static_init): Don't call pushdecl for implicitly declared
5694         `atexit' used to register destructors.
5696 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
5698         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
5699         intialize a vtable.
5701         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
5702         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
5703         by combining TEMPLATE_INFO and LEVEL into a single union.
5704         (DECL_TEMPLATE_INFO): Reformat.
5705         (DECL_SAVED_TREE): Document.
5706         (DECL_TEMPLATE_INJECT): Remove.
5707         * class.c (finish_struct): Remove code to deal with
5708         DECL_TEMPLATE_INJECT. 
5710         * decl.c (maybe_process_template_type_declaration): Handle all new
5711         types in templates uniformly.
5712         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
5713         DECL_CONTEXT.
5714         * pt.c (lookup_template_class): Inject template instantiations of
5715         forward-declarations.
5716         (instantiate_class_template): Remove code processing
5717         DECL_TEMPLATE_INJECT.
5718         
5719         * pt.c (lookup_template_class): Tweak lookup to find member
5720         templates.
5722         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
5723         ASM_CV_QUAL.
5724         * semantics.c (finish_asm_stmt): Make strings permanent if they're
5725         used in a template.
5726         
5727 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
5729         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
5730         parts of pointer to data member types.
5732 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
5734         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
5735         and then make it look like `abort'.  Just use `abort' instead.
5736         
5737         * typeck.c (build_static_cast): Don't allow static_casts that cast
5738         away constness.
5739         (casts_away_constness_r): New function.
5740         (casts_away_constness): Likewise.
5742         * decl.c (lookup_tag): Remove code no longer needed after
5743         name-lookup improvements.
5744         * decl2.c (handle_class_head): Make error-recovery more robust.
5745         * friend.c (make_friend_class): Reject templated typename types.
5746         * lex.c (is_global): A template parameter isn't global.
5747         * parse.y (class_head): Robustify.
5748         * parse.c: Regenerated.
5749         
5750 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
5752         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
5753         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
5754         
5755         * cp-tree.h (push_nested_namespace): Declare.
5756         (pop_nested_namespace): Likewise.
5757         * decl.c (push_nested_namespace): New function.
5758         (pop_nested_namespace): Likewise.
5759         * pt.c (instantiate_class_template): Use them.
5761         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
5763         * cp-tree.h (cplus_expand_constant): Declare.
5764         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
5765         converted from one pointer-to-object type to another.
5766         * expr.c (cplus_expand_constant): Don't make it static.
5767         * typeck.c (build_component_ref): Don't crash when presented with
5768         a component which is a TEMPLATE_DECL.
5769         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
5770         cast from a pointer-to-member constant to its own type does not
5771         result in a valid non-type template argument.
5773 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
5774             Nathan Sidwell  <nathan@acm.org>
5775         
5776         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
5777         * cp-tree.h: Fix typo in documentation on pointers-to-members.
5778         (cp_build_qualified_type): Make it a macro.
5779         (cp_build_qualified_type_real): Declare.
5780         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
5781         problem with template parameters and restrict-qualification.
5782         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
5783         * hash.h: Regenerated.
5784         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
5785         the enumeration.
5786         (NORID): Remove definition.
5787         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
5788         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
5789         (fn_type_unification): Check that the function type resulting from
5790         the deduction is legal.
5791         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
5792         (unify): Use cp_build_qualified_type_real.
5793         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
5794         (cp_build_qualified_type): Rename to ...
5795         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
5796         and modify appropriately.
5797         
5798         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
5799         reveal optimization opportunities.
5801         * pt.c (tsubst): Don't issue error messages when we're not
5802         complaining, even if we see a qualified function type.
5803         (check_cv_quals_for_unify): Don't allow a qualified function
5804         type.
5806 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
5808         * class.c (instantiate_type): Downgrade errors for object-dependent
5809         memfn refs to pedwarn.
5811 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
5813         * decl.c (grokdeclarator): Don't treat [] as indicating a
5814         zero-sized array in a typedef.
5816         * call.c (build_object_call): Don't look at DECL_NAME for a type.
5817         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
5818         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
5820         * pt.c (for_each_template_parm): Rework to match documentation.
5821         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
5823 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
5825         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
5827         * class.c (finish_base_struct): Allow non-COM bases for COM classes
5828         except at the leftmost position.
5829         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
5830         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
5831         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
5833         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
5834         (build_cplus_new): Make sure that what we return is of the right type.
5836 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
5838         * cp-tree.h (make_ptrmem_cst): New function.
5839         * expr.c (cplus_expand_constant): Split out from ...
5840         (cplus_expand_expr): Here.  Use cplus_expand_constant.
5841         (init_cplus_expand): Set lang_expand_constant.
5842         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
5844         * tree.c (make_ptrmem_cst): Define.
5845         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
5846         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
5848 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
5850         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
5852         * decl2.c (start_static_storage_duration_function): Fix comment.
5853         (finish_file): Create static storage duration functions lazily.
5855 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
5857         Implement anonymous structs.
5858         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
5859         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
5860         * class.c (finish_struct_1): Remove redundant check for anon struct.
5861         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
5862         (check_tag_decl): Check for anonymous struct here.
5863         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
5864         * init.c (sort_member_init, emit_base_init): Handle getting fields
5865         as well as names in current_member_init_list.
5866         (perform_member_init): Handle getting an anon aggr.
5867         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
5868         (do_build_copy_constructor): Likewise.
5870 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
5872         * tree.c (cp_build_qualified_type): Don't allow qualified function
5873         types.
5875 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
5877         * gxxint.texi: Fix typo.
5879 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
5881         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
5882         * class.c (finish_struct_1): Use CLASS_TYPE_P.
5883         * ptree.c (print_lang_type): Likewise.
5884         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
5885         IS_AGGR_TYPE_CODE.
5886         * typeck2.c (digest_init): Likewise.
5888 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
5890         * call.c (joust): Compare the types of the conv ops, not the
5891         target types of the conversions.
5893 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5895         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
5896         was not given.
5898 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
5900         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
5901         * decl.c (grokfndecl): Don't allow inline declarations of friend
5902         template specializations, or friend template specializations with
5903         default arguments.
5904         * pt.c (tsubst): Handle substitution into array types that does
5905         not yield a fixed upper bound, even when not processing a
5906         template.
5907         (tsubst_copy): Deal with the fact that the second operand to a
5908         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
5909         * search.c (marked_pushdecls_p): Don't descend into
5910         TEMPLATE_TYPE_PARMs and the like.
5911         (unmarked_pushdecls_p): Likewise.
5912         
5913         * call.c (build_over_call): Don't throw away
5914         initializations/copies of empty classes; use MODIFY_EXPR and
5915         INIT_EXPR as for non-empty classes.
5916         * class.c (finish_struct_1): Put the padding byte for an empty
5917         class on the TYPE_NONCOPIED_PARTS list for the class.
5919 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
5921         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
5922         indicate a reference to a field that is a qualified name.
5924 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
5926         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
5927         ASM_OUTPUT_CONSTRUCTOR.
5929         * friend.c (do_friend): Add attrlist arg.  Remove support for
5930         getting a non-decl as 'decl'.
5931         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
5932         rtl.
5933         (grokdeclarator): Adjust.
5934         * cp-tree.h: Adjust.
5936 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
5938         * cp-tree.h (permanent_p): New function.
5939         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
5940         possibly complex tree node.
5941         * tree.c (mapcar): Adjust comments, and follow coding standards in
5942         conditional.
5943         (permanent_p): New function.
5945 1999-05-13  Per Bothner  <bothner@cygnus.com>
5947         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
5948         primitive Java types, if we actually see `extern "Java"'.
5950 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5952         * lang-specs.h: Pass -$ to the preprocessor.
5954 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
5956         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
5957         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
5958         (resolve_offset_ref): Don't handle a raw baselink.
5959         * cvt.c (build_expr_type_conversion): Likewise.
5960         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
5961         convert_for_initialization): Likewise.
5962         * class.c (instantiate_type): Handle seeing a baselink under an
5963         OFFSET_REF.
5964         * error.c (dump_expr): Likewise.        
5965         * pt.c (for_each_template_parm): Likewise.
5966         (resolve_overloaded_unification): Likewise.
5967         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
5968         * typeck.c (expr_sizeof): Also complain about other permutations
5969         of overloaded functions.
5971 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
5973         * init.c (resolve_offset_ref): Don't return a raw method.
5974         Use BASELINK_P.
5975         * typeck.c (decay_conversion): Don't handle a raw method.
5976         Resolve all OFFSET_REFs.
5977         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
5978         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
5979         same_type_p for pmf bits.  Don't use build_binary_op to compare
5980         raw pointers to methods.
5981         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
5982         to decide when to call resolve_offset_ref.
5983         (build_c_cast, convert_for_initialization): Likewise.
5984         * cvt.c (build_expr_type_conversion): Likewise.
5986 1999-05-06  Nathan Sidwell  <nathan@acm.org>
5988         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
5990 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
5992         * decl2.c (start_objects): Don't let static constructors and
5993         destructors get inlined.
5995         * parse.y (nested_name_specifier): Make sure ordinary types are
5996         complete, just like template types.
5997         * parse.c: Regenerated.
5999         * pt.c (check_explicit_specialization): Improve error messages.
6001 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6003         * typeck.c (string_conv_p): Use same_type_p to check whether we
6004         try to convert between char and wchar_t.
6006 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
6008         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
6009         lookup to error_mark_node here.
6010         (lookup_member): Revise documentation.  Add comments.  Don't set
6011         the TREE_TYPE to error_mark_node here, and don't build up an extra
6012         TREE_LIST for ambiguous lookups.
6013         (setup_class_bindings): Adjust accordingly.
6014         (push_class_decls): Revise out-of-date comments.
6015         
6016         * typeck.c (build_const_cast): Tighten checks for legality.
6018 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6020         * init.c (build_member_call): Lookup names coming from
6021         namespace-scoped LOOKUP_EXPR.
6023 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
6025         * gxxint.texi: Add documentation for 'I'.
6027 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6029         * tinfo.cc (operator==): Qualify type_info with std::.
6031 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
6033         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
6034         (DECL_COMDAT): Remove definition.
6036 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
6038         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
6039         change.
6041 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
6043         * class.c (build_vtable): Use build_lang_decl when building
6044         vtables, not just build_decl.
6045         (prepare_fresh_vtable): Likewise.
6046         * decl.c (wrapup_globals_for_namespace): Mark vtables as
6047         DECL_EXTERNAL when calling wrapup_global_declarations.
6048         * decl2.c (priority_info_s): Add initializations_p and
6049         destructions_p members.
6050         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
6051         when deciding what vtables to write out.
6052         (ssdf_decls): New variable.
6053         (ssdf_decls_used): Likewise.
6054         (start_static_storage_duration_function): Deal with being called
6055         multiple times.  Avoid inlining this function.
6056         (generate_inits_for_priority): Deal with reuse of priority map.
6057         (get_priority_info): Clear initializations_p and destructions_p.
6058         (do_static_initialization): Tweak comment.
6059         (do_static_destruction): Likewise.  Fix condition on sentries for
6060         destruction.
6061         (generate_ctor_or_dtor_function): Call all of the static storage
6062         duration functions.
6063         (generate_ctor_or_dtor_function_for_priority): Check
6064         initializations_p and destructions_p to see what priorities need
6065         initialization functions.
6066         (finish_file): Rework to generate multiple static storage duration
6067         functions, rather than just one.
6069         * typeck.c (build_const_cast): Tweak last change to handle
6070         templates correctly.
6072         * typeck.c (build_const_cast): Disallow use of const_cast to
6073         anything but a pointer or reference type.
6075 1999-04-30  Nathan Sidwell  <nathan@acm.org>
6077         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
6078         signature type.
6080 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
6082         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
6083         (finish_file): Indent comments properly.
6085 1999-04-29  Richard Henderson  <rth@cygnus.com>
6087         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
6088         (do_static_destruction): Likewise.
6090 1999-04-29  Nathan Sidwell  <nathan@acm.org>
6092         * cp-tree.h (TYPE_NOTHROW_P): New macro.
6093         * decl2.c (delete_sanity): Warn on deleting void *.
6094         * init.c (build_new_1): Use TYPE_NOTHROW_P.
6095         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
6096         throwing operator new.
6098 1999-04-28  Nathan Sidwell  <nathan@acm.org>
6100         * cp-tree.h (build_component_addr): Remove prototype.
6101         * typeck.c (build_component_addr): Make static. Remove MSG
6102         argument.
6103         (build_component_addr): Remove MSG parameter, clean up
6104         comment.
6105         (build_x_function_call): Use cp_error.
6106         (build_unary_op): Adjust call of build_component_addr.
6108 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
6110         * pt.c (tsubst_friend_class): Check for NULL.
6112 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6114         * search.c (binfo_for_vtable): Initialize bfvi.var.
6116 1999-04-27  Nathan Sidwell  <nathan@acm.org>
6118         * rtti.c (build_x_typeid): Check rtti is enabled.
6120 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
6122         * search.c (is_subobject_of_p): Make sure we're looking at the
6123         right baseclasses.
6125 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
6127         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
6129 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
6131         * decl2.c (finish_file): Tweak handling of extern inlines so that
6132         they are not unnecessarily put out.
6134         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
6135         such as base classes.
6137 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
6139         * tree.c (build_exception_variant): Fix typo: use the chain of U,
6140         not trying V, while cycling through U.
6142 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
6144         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
6145         preserves_first_arg.  Enlarge dummy accordingly.
6146         (DECL_TINFO_FN_P): New macro.
6147         (SET_DECL_TINFO_FN_P): Likeiwse.
6148         (DECL_RETURNS_FIRST_ARG): Remove.
6149         (DECL_PRESERVES_THIS): Likewise.
6150         (DECL_INIT_PRIORITY): New macro.
6151         (finish_struct_1): Change prototype.
6152         (cat_namespace_levels): Remove prototype.
6153         (vtable_decl_p): New prototype.
6154         (vtype_decl_p): Likewise.
6155         (sigtable_decl_p): Likewise.
6156         (walk_globals_pred): New typedef.
6157         (walk_globals_fn): Likewise.
6158         (walk_globals): New prototype.
6159         (walk_namespaces_fn): New typedef.
6160         (walk_namespaces): New prototype.
6161         (wrapup_globals_for_namespace): Likewise.
6162         (walk_vtables): Remove prototype.
6163         (walk_sigtables): Likewise.
6164         (instantiate_pending_templates): New prototype.
6165         * class.c (finish_struct_1): Don't return a value.
6166         * decl.h (pending_statics): Remove declaration.
6167         * decl.c (walk_namespaces_r): New function.
6168         (walk_globals_r): Likewise.
6169         (vtable_decl_p): Likewise.
6170         (vtype_decl_p): Likewise.
6171         (sigtable_decl_p): Likewise.
6172         (walk_namespaces): Likewise.
6173         (walk_globals_data): New type.
6174         (walk_globals): New function.
6175         (wrapup_globals_for_namespace): Likewise.
6176         (expand_static_init): Remove assertion.  Remove redundancy in
6177         conditional.  Don't put static data members in static_aggregates
6178         Tidy.
6179         (finish_function): Remove redundancy in conditional.  Don't set
6180         DECL_RETURNS_FIRST_ARG.
6181         (cat_namespace_levels): Remove.
6182         * decl2.c: Include splay-tree.h and varray.h.
6183         (priority_info_s): New structure.
6184         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
6185         conventions.
6186         (prune_vtable_vardecl): Likewise.
6187         (finish_sigtable_vardecl): Likewise.
6188         (setup_initp): Remove.
6189         (do_dtors): Remove.
6190         (do_ctors): Remove.
6191         (start_static_storage_duration_function): New function.
6192         (generate_inits_for_priority): Likewise.
6193         (finish_static_storage_duration_function): Likewise.
6194         (get_priority_info): Likewise.
6195         (do_static_initialization): Likewise.
6196         (do_static_destruction): Likewise.
6197         (do_static_initialization_and_destruction): Likewise.
6198         (generate_ctor_or_dtor_function): Likewise.
6199         (generate_ctor_and_dtor_functions_for_priority): Likewise.
6200         (pending_statics): Make it a varray.
6201         (pending_statics_used): New variable.
6202         (saved_inlines): Make it a varray.
6203         (saved_inlines_used): New variable.
6204         (finish_static_data_member): Change method of updating
6205         pending_statics.
6206         (mark_inline_for_output): Remove #if 0'd code.  Change method of
6207         updating saved_inlines.
6208         (walk_vtables): Remove.
6209         (walk_sigtables): Likewise.
6210         (import_export_decl): Use DECL_TINFO_FN_P.
6211         (pending_templates): Remove declaration.
6212         (maybe_templates): Likewise.
6213         (static_aggregates_initp): Likewise.
6214         (setup_initp): Likewise.
6215         (finish_objects): Simplify.
6216         (INITIALIZE_P_IDENTIFIER): New macro.
6217         (PRIORITY_IDENTIFIER): New macro.
6218         (SSDF_IDENTIFIER): New macro.
6219         (initialize_p_decl): New variable.
6220         (priority_decl): Likewise.
6221         (ssdf_decl): Likewise.
6222         (priority_info_map): Likewise.
6223         (finish_file): Recode output of static intializers and other
6224         file-scope finalization tasks.
6225         * error.c (OB_END_TEMPLATE_ID): New macro.
6226         (dump_type_real): Use it.
6227         (dump_decl): Likewise.
6228         (dump_function_name): Likewise.
6229         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
6230         interface.
6231         (check_newline): Use walk_globals, not walk_vtables.
6232         * pt.c (pending_tempalte_expansions): Remove.
6233         (set_vardecl_interface_info): Likewise.
6234         (pending_templates): Make static.
6235         (maybe_templates): Likewise.
6236         (instantiate_class_template): Adjust call to finish_struct_1.
6237         (instantiate_pending_templates): New function.
6238         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
6239         * tree.c (static_aggregates_initp): Remove.
6240         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
6241         instead.
6242         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
6244         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
6245         with the RTL code RETURN.
6246         * hash.h: Regenerated.
6247         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
6248         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
6249         * parse.c: Regenerated.
6250         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
6251         it.
6252         (inline_parm_levels): New variable.
6253         (inline_parm_levels_used): Likewise.
6254         (maybe_begin_member_template_processing): Update them.
6255         (maybe_end_member_template_processing): Use them, rather than
6256         guessing how many levels to pop.
6258         * decl.c (make_typename_type): Tighten error-checking.
6260 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
6262         * cp-tree.h (build_binary_op): Remove unneeded parameter.
6263         * class.c (build_vrable_entry_ref): Adjust call to
6264         build_binary_op.
6265         * decl.c (expand_static_init): Likewise.
6266         (grokdeclarator): Likewise.
6267         (finish_function): Likewise.
6268         * decl2.c (delete_sanity): Likewise.
6269         (do_dtors): Likewise.
6270         (do_ctors): Likewise.
6271         * error.c (dump_type_suffix): Likewise.
6272         * expr.c (cplus_expand_expr): Likewise.
6273         * init.c (resolve_offset_ref): Likewise.
6274         (build_new): Likewise.
6275         (build_new_1): Likewise.
6276         (build_vec_delete_1): Likewise.
6277         (expand_vec_init_catch_clause): Likewise.
6278         (build_delete): Likewise.
6279         * pt.c (tsubst): Likewise.
6280         * rtti.c (synthesize_tinfo_fn): Likewise.
6281         * search.c (expand_upcast_fixups): Likewise.
6282         (expand_direct_vtbls_init): Likewise.
6283         * typeck.c (get_member_function_from_ptrfunc): Likewise.
6284         (build_binary_op_nodefault): Likewise.
6285         (point_int_sum): Likewise.
6286         (pointer_diff): Likewise.
6287         (build_unary_op): Likewise.
6288         (build_modify_expr): Likewise.
6289         (get_delta_difference): Likewise.
6290         (build_ptrmemfunc): Likewise.
6291         (expand_ptrmemfunc_cst): Likewise.
6293 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
6295         * decl.c (grokfndecl): Always call cplus_decl_attributes.
6296         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
6298 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
6300         * cp-tree.h (finish_static_data_member_decl): New function.
6301         * decl2.c (finish_static_data_member_decl): Split out from ...
6302         (grokfield): Here.
6303         * pt.c (instantiate_class_template): Use it here instead of
6304         trying to fake it.
6305         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
6306         finish_static_data_member_decl will do that.  Explicit set
6307         DECL_EXTERNAL to match non-template processing.
6309 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
6311         * cp-tree.h (finish_class_definition): Add parameter.
6312         * parse.y (structsp): Use it.  Don't call pop_scope here.
6313         * parse.c: Regenerated.
6314         * semantics.c (finish_class_definition): Pop it here.
6316 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
6318         * decl.c (xref_tag): Revise handling of nested template
6319         declarations.
6320         * pt.c (check_explicit_specialization): Tweak handling of friend
6321         templates in template classes.
6322         (tsubst_friend_class): Handle friend declarations for nested
6323         member template classes.
6325 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
6327         * class.c (finish_struct): Remove unused variable.
6328         (pushclass): Likewise.
6329         (invalidate_class_lookup_cache): Likewise.
6330         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
6331         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
6332         doesn't get obliterated.
6333         (make_typename_type): Handle template classes correctly.
6335         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
6336         (storetags): Declare.
6337         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
6338         (pushclass): Likewise.  Use storetags to install tag declarations,
6339         not pushtag.
6340         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
6341         * decl.c (storetags): Make it global.
6342         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
6343         implicit typename declaration.
6344         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
6345         * method.c (hack_identifier): Likewise.
6346         * search.c (lookup_member): Likewise.
6348         * decl.c (warn_about_implicit_typename_lookup): New function.
6349         (lookup_name_real): Use it.  Rework handling of implicit typename
6350         extension.
6352 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
6354         * cp-tree.h (lookup_nested_field): Remove.
6355         * class.c (push_nested_class): Handle UNION_TYPEs.
6356         (pop_nested_class): Likewise.
6357         * decl.c (lookup_name_real): Don't call lookup_nested_field.
6358         (start_decl): Use push_nested_class, not just pushclass.
6359         (cp_finish_decl): Use pop_nested_class, not just popclass.
6360         * search.c (lookup_nested_field): Remove.
6362         * cp-tree.h (lang_type): Add documentation.
6363         * decl2.c (handle_class_head): Create template declarations here,
6364         as appropriate.
6365         * parse.y (class_head): Return whether or not we entered a new
6366         scope, as well as the type named.
6367         (named_class_head): Likewise.
6368         (named_complex_class_head_sans_basetype): Likewise.
6369         (structsp): Adjust accordingly.  Pop scope when required.
6370         * parse.c: Regenerated.
6371         * pt.c (check_default_tmpl_args): Robustify.
6372         (redeclare_class_template): Likewise.
6373         (instantiate_class_template): An instantiation of an
6374         anonymous union is itself an anonymous union.
6375         * semantics.c (begin_class_definition): Don't create template
6376         declarations here.
6378 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
6380         * parse.y (after_type_declarator_intern): New nonterminal.
6381         (after_type_declarator): Use it.
6382         (direct_after_type_declarator): Likewise.  Move above
6383         nonnested_type to fix reduce/reduce conflict resolution.
6384         (declmods): Reducing from just 'attributes' has EMPTY precedence.
6385         * Makefile.in (CONFLICTS): Update.
6387         * decl.c (define_label): Downgrade error for jumping over a
6388         non-POD decl to pedwarn.
6390 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
6392         * cp-tree.h (popclass): Change declaration.
6393         (pop_nested_class): Likewise.
6394         (poplevel_class): Remove declaration.
6395         * call.c (convert_default_argument): Pass no arguments to
6396         popclass.
6397         * class.c (finish_struct_1): Likewise.
6398         (finish_struct): Likewise.
6399         (popclass): Remove argument.  Simplify code accordingly.
6400         (pop_nested_class): Likewise.
6401         * decl.c (poplevel_class): Declare it here, and make it static.
6402         (poplevel): Handle class scopes.
6403         (poplevel_class): Don't take an rgument.  Simplify.
6404         (pop_everything): Pass no arguments to pop_nested_class.
6405         (cp_finish_decl): Pass no arguments to popclass.
6406         (grokdeclarator): Pass no arguments to pop_nested_class.
6407         (finish_function): Likewise.
6408         * decl2.c (grokfield): Likewise.
6409         (pop_scope): Pass no arguments to popclass.
6410         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
6411         * pt.c (instantiate_class_template): Move call to pushclass, and
6412         document.  Pass no arguments to popclass.
6413         (regenerate_decl_from_template): Likewise.
6415 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
6417         * typeck.c (build_unary_op): Handle taking the address of a unique
6418         bound non-static member function.
6420 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6422         * lang-options.h (-Wdeprecated): New flag.
6423         * decl2.c (warn_deprecated): New flag.
6424         (lang_decode_option): Deprecated this-is-variable,
6425         external-templates, alt-external-templates.
6426         Support -Wdeprecated.
6427         * errfn.c (cp_deprecated): New function.
6429 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
6431         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
6432         of the decls themselves.
6434         * pt.c (tsubst_function_type): Copy attributes over.
6436         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
6437         and com_interface.
6438         * cp-tree.h: Add prototype.
6439         * decl.c (init_decl_processing): Set valid_lang_attribute.
6441 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
6443         * class.c (finish_struct_1): Look at the const-ness of the field's
6444         type, not the TREE_READONLY-ness of the declaration.
6445         * method.c (synthesize_method): Likewise.
6446         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
6447         creating new declarations.
6449 1999-04-13  Mike Stump  <mrs@wrs.com>
6451         * decl2.c (import_export_decl): Because vtables always reference
6452         virtual functions, even if they are inlined, don't allow
6453         -fno-implement-inlines to not emit them, instead, emit them with
6454         the vtable.
6455         * decl.c (start_function): Likewise.
6457 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
6459         * cp-tree.h (struct lang_type): Add com_interface.
6460         (CLASSTYPE_COM_INTERFACE): New macro.
6461         * class.c (set_rtti_entry): COM interface classes have no RTTI
6462         entries in their vtables; adjust.
6463         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
6464         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
6465         finish_struct_1): Likewise.
6466         * decl2.c (mark_vtable_entries): Likewise.
6467         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
6468         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
6469         expand_upcast_fixups): Likewise.
6470         * tree.c (debug_binfo): Likewise.
6472         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
6473         * typeck.c (comptypes): If we get it, ignore attributes.
6474         * class.c (instantiate_type): Use BASELINK_P.  Change complain
6475         parameter to flags; 2 means ignore attributes.
6476         * call.c (build_op_delete_call): Pass it.
6478         * decl.c (xref_tag): Only complain once about using a typedef-name
6479         with 'struct'.  Downgrade to pedwarn.
6481         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
6483         * parse.y (absdcl_intern): New nonterminal.
6484         (absdcl, direct_abstract_declarator): Use it.
6486         * pt.c (lookup_template_class): Look through implict typename.
6488 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
6490         * friend.c (add_friend): Deal gracefully with error_mark_node.
6491         * method.c (build_overload_value): Handle pointers-to-members as
6492         template parameters.
6494         * decl.c (push_binding): Fix typo in comment.
6496 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
6498         * error.c (dump_type_real): If a typename is a template-id, put
6499         out the template arguments.
6500         (dump_expr): Handle TEMPLATE_ID_EXPR.
6501         * pt.c (lookup_template_class): Now that full arguments are
6502         available everywhere, remove code that tried to guess them.
6504 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
6506         * decl.c (make_typename_type): Complain if we don't find a type
6507         when trying to make a typename type for a non-template type.
6509 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
6511         * decl.c (start_decl): Pass attributes to grokdeclarator.
6512         (grokdeclarator): Handle attributes on constructor-syntax
6513         initializers.
6515 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
6517         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
6518         don't have types.
6520         * search.c (template_self_reference_p): Tweak.
6522 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
6524         * init.c (build_offset_ref): Don't build yet another weird data
6525         structure to describe overloaded functions.
6527 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
6529         * cp-tree.h (BASELINK_P): New macro.
6530         (SET_BASELINK_P): Likewise.
6531         * init.c (build_member_call): Remove needless assignment in if
6532         statement.
6533         * search.c (lookup_field_r): Fix handling when we are looking
6534         specifically for a type; these are not hidden by functions and
6535         variables.
6536         (lookup_member): Use SET_BASELINK_P.
6537         * tree.c (is_overloaded_fn): Use BASELINK_P.
6538         (really_overloaed_fn): Likewise.
6539         (get_first_fn): Likewise.
6541 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
6543         * decl.c (lookup_name_current_level): Tweak, and improve
6544         documentation.
6546         * class.c (maybe_fixup_vptrs): Remove declaration.
6547         (build_class_init_list): Likewise.
6548         * decl.c (pushdecl_class_level): Call check_template_shadow here
6549         ...
6550         (push_class_level_binding): ... not here.
6551         * search.c (dfs_push_type_decls): Only avoid
6552         template-self-reference TYPE_DECLs if they are from base classes.
6554 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
6556         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
6557         nodes.  Tidy.
6559 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
6561         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
6562         (finish_struct_1): Don't call build_class_init_list.
6564 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
6566         * tinfo.h (__class_type_info): Fix illegal declaration.
6568         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
6569         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
6570         (IDENTIFIER_CLASS_VALUE): Improve documentation.
6571         (is_properly_derived_from): Declare.
6572         (invalidate_class_lookup_cache): Likewise.
6573         (maybe_maybe_note_name_used_in_class): Likewise.
6574         (note_name_declared_in_class): Likewise.
6575         (push_using_decl): Remove duplicate declaration.
6576         (id_in_current_class): Remove declaration.
6577         (push_class_binding): Change prototype.
6578         (clear_identitifer_class_values): Declare.
6579         * call.c (is_properly_derived_from): Make it global.
6580         (build_new_function_call): Be careful about updating candidates.
6581         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
6582         asked to make illegal calls.
6583         * class.c: Include splay-tree.h.
6584         (class_stack_node): Add names_used slot.
6585         (check_member_decl_is_same_in_complete_scope): Remove.
6586         (add_method): Fix comment.  Push the declaration into class
6587         scope.
6588         (finish_struct_1): When popping the class, pop the bindings too.
6589         Remove check for data member/function member conflict.
6590         (finish_struct): Remove calls to
6591         check_member_decl_is_same_in_complete_scope.  Change calls to
6592         popclass.
6593         (pushclass): Clear names_used in the class stack entry.
6594         Use invalidate_class_lookup_cache to remove cached entries, rather
6595         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
6596         before entering a new class.  Remove dead code.  Don't mess with
6597         current_function_decl when pushing declarations.
6598         (invalidate_class_lookup_cache): New function, split out from ...
6599         (popclass): Here.  Clean up names_used on our way out.
6600         (instantiate_type): Adjust.
6601         (build_self_reference): Don't push the declaration here.
6602         (maybe_note_name_used_in_class): New function.
6603         (note_name_declared_in_class): Likewise.
6604         * decl.c (add_binding): Change prototype.
6605         (find_class_binding_level): New function.
6606         (innermost_nonclass_level): Likewise.
6607         (current_binding_level): Update documentation.
6608         (inner_binding_level): Remove.  Replace with current_binding_level
6609         throughout.
6610         (push_binding_level): Remove special handling of
6611         class_binding_level.
6612         (pop_binding_level): Likewise.  Use find_class_binding_level.
6613         (suspend_binding_level): Likewise.
6614         (global_bindings_p): Use innermost_nonclass_level.
6615         (toplevel_bindings_p): Likewise.
6616         (namespace_bindings_p): Likewise.
6617         (pseudo_global_level_p): Likewise.
6618         (push_binding): Clear INHERITED_VALUE_BINDING_P.
6619         (add_binding): Check for illegal multiple declarations.  Return a
6620         value indicating whether or not the new binding was legal.
6621         (push_local_binding): Skip over class binding levels.  Check
6622         return value from add_binding.
6623         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
6624         note_name_declared_in_class.
6625         (pushlevel_class): Remove "fake out the rest of the compiler"
6626         code.
6627         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
6628         (clear_identifier_class_values): New function.
6629         (pop_from_top_level): Use it.
6630         (pop_everything): Tweak.
6631         (maybe_process_template_type_declaration): Don't push the
6632         declaration for the template here.
6633         (pushtag): Don't push tag declarations into class scope here.
6634         (pushdecl): Apply DeMorgan's law for readability.
6635         (pushdecl_class_level): Remove special-case code for
6636         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
6637         (push_class_level_bindng): Deal with inherited bindings.
6638         (lookup_name_real): Remove special-case code for
6639         TYPE_BEING_DEFINED, and some implicit typename magic.
6640         (grokdeclarator): Handle COMPONENT_REF for a template function.
6641         (build_enumerator): Don't call pushdecl_class_level here.
6642         (id_in_current_class): Remove.
6643         * decl2.c (grokfield): Don't call pushdecl_class_level or
6644         check_template_shadow.
6645         * errfn.c (cp_file_of): Don't declare.
6646         (cp_line_of): Likewise.
6647         * error.c (dump_decl): Handle an OVERLOAD.
6648         (cp_file_of): Likewise.
6649         (cp_line_of): Likewise.
6650         * init.c (build_member_call): Handle a COMPONENT_REF.
6651         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
6652         pushdecl_class_level.
6653         * method.c (hack_identifier): Build COMPONENT_REFs for references
6654         to member templates as well as member functions.  Remove dead
6655         code.
6656         * parse.y (left_curly): Remove.
6657         (nonnested_type): Call maybe_note_name_used_in_class, not
6658         pushdecl_class_level.
6659         * parse.c: Regenerated.
6660         (nested_name_specifier_1): Likewise.
6661         * pt.c (check_explicit_specialization): Adjust, for robustness.
6662         (check_template_shadow): Handle OVERLOADs.
6663         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
6664         TEMPLATE_DECL, if appropriate.
6665         * search.c (envelope_add_decl): Remove.
6666         (dfs_pushdecls): Likewise.
6667         (dfs_compress_decls): Likewise.
6668         (dfs_push_decls): New function.
6669         (dfs_push_type_decls): Likewise.
6670         (setup_class_bindings): Likewise.
6671         (template_self_reference_p): Likewise.
6672         (lookup_field_r): Use it.
6673         (looup_member): Remove old comment.  Deal with ambiguity.
6674         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
6675         and remove envelope processing.
6676         * semantics.c (begin_class_definition): Let pushclass push
6677         declarations for base classes.
6678         (finish_member_declaration): Push declarations into class scope.
6679         * typeck.c (build_component_ref): Just put an OVERLOAD into the
6680         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
6681         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
6682         * Makefile.in (class.o): Depend on splay-tree.h.
6684 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
6686         * cvt.c (convert_pointer_to_real): Use same_type_p.
6687         * typeck.c (comp_target_types): Use same_type_p.
6689 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
6691         * semantics.c (begin_inline_definitions,
6692         finish_inline_definitions): Rename from finish_default_args and
6693         begin_inline_definitions, respectively, to something that isn't a
6694         total lie.  :)
6695         * parse.y (structsp): Adjust.
6697         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
6698         (list_hash_lookup): Likewise.
6699         (hash_tree_chain): Adjust.
6700         * pt.c (tsubst): Adjust.
6701         (tsubst_arg_types): Use plain hash_tree_cons.
6702         * cp-tree.h (hash_tree_cons_simple): Lose.
6703         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
6705 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6707         * Makefile.in (hash.h): Generate using gperf language 'C', not
6708         'KR-C', so gperf uses the `const' keyword on strings.
6710         * gxx.gperf (resword): Const-ify a char*.
6712 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
6714         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
6715         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
6716         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
6717         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
6718         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
6719         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
6720         tree.c: Adjust.
6722 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
6724         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
6726 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
6728         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
6730 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
6732         * cp-tree.h (add_friend): Declare.
6733         (add_friends): Likewise.
6734         * friend.c (add_friend): Make it global.  Don't add to
6735         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
6736         (add_friends): Make it global.
6737         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
6738         befriending class is a template.
6739         * parse.y (component_decl_1): Fix typo in comment.
6740         * parse.c: Regenerated.
6741         * pt.c (instantiate_class_template): Use add_friend and
6742         add_friends rather that duplicating some of their functionality
6743         here.
6745 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
6747         * call.c (build_field_call): Unify 'this' and non-'this' cases.
6749         * typeck.c (build_indirect_ref): Check for 'this' sooner.
6751 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6753         * call.c (op_error): Const-ify a char*.
6754         (add_candidate, source_type, add_warning): Add static prototype.
6755         (print_z_candidates): Const-ify a char*.
6757         * class.c (resolve_address_of_overloaded_function,
6758         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
6759         (get_vtable_name, finish_struct_1): Const-ify a char*.
6761         * cvt.c (convert_to_reference): Likewise.
6763         * decl.c (redeclaration_error_message, record_builtin_type,
6764         record_unknown_type, member_function_or_else, bad_specifiers):
6765         Likewise.
6766         (find_binding, select_decl, unqualified_namespace_lookup,
6767         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
6768         Add static prototype.
6769         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
6770         implicitly_declare, record_builtin_java_type, define_function,
6771         grok_op_properties, tag_name): Const-ify a char*.
6773         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
6774         (define_function, finish_builtin_type): Const-ify a char*.
6775         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
6776         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
6777         (file_name_nondirectory): Const-ify a char*.
6778         (init_filename_times): Don't prototype.
6779         (compiler_error): Prototype.
6780         (yyerror, init_repo): Const-ify a char*.
6781         (build_srcloc): Don't prototype.
6782         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
6783         Const-ify a char*.
6784         (warn_for_assignment): Don't prototype.
6785         (convert_for_initialization, readonly_error, check_for_new_type,
6786         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
6787         Const-ify a char*.
6789         * decl2.c (acceptable_java_type, output_vtable_inherit,
6790         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
6791         merge_functions, decl_namespace, validate_nonmember_using_decl,
6792         do_nonmember_using_decl): Add static prototype.
6793         (lang_f_options): Const-ify a char*.
6794         (finish_builtin_type): Likewise.
6795         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
6796         prototype.
6798         * errfn.c: Include cp-tree.h.
6799         (cp_thing): Add static prototype.
6800         (compiler_error): Don't protoptype.
6801         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
6802         passing it to `cp_thing'.
6804         * error.c (interesting_scope_p): Add static prototype.
6806         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
6807         a char*.
6809         * init.c (compiler_error): Don't prototype.
6810         (member_init_ok_or_else): Const-ify a char*.
6811         (build_java_class_ref): Add static prototype.
6813         * lex.c (compiler_error): Don't prototype.
6814         (get_time_identifier, interface_strcmp, extend_token_buffer,
6815         handle_cp_pragma): Const-ify a char*.
6816         (is_global, init_filename_times): Add static prototype.
6817         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
6818         (compiler_error): Change from fixed args to variable args.
6819         (yyerror): Const-ify a char*.
6821         * parse.y (cond_stmt_keyword): Const-ify a char*.
6822         (parse_decl): Add static prototype.
6824         * pt.c (template_args_equal, print_template_context): Likewise.
6825         (print_candidates, check_default_tmpl_args): Const-ify a char*.
6826         (instantiate_class_template): Likewise.
6828         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
6830         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
6831         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
6833         * search.c (lookup_field_info, lookup_member): Likewise.
6834         (lookup_member): Cast the first argument of `bzero' to a PTR.
6836         * sig.c (compiler_error): Don't prototype.
6837         (build_signature_pointer_or_reference_nam): Const-ify a char*.
6838         (get_sigtable_name, build_member_function_pointer): Likewise.
6840         * tree.c (compiler_error): Don't prototype.
6841         (no_linkage_helper, build_srcloc): Add static prototype.
6842         (build_vbase_pointer_fields): Const-ify a char*.
6843         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
6845         * typeck.c (compiler_error): Don't prototype.
6846         (convert_for_assignment): Const-ify a char*.
6847         (comp_cv_target_types): Add static prototype.
6848         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
6849         build_component_addr, build_unary_op, convert_for_initialization):
6850         Const-ify a char*.
6852         * typeck2.c (ack): Add static prototype and change from fixed args
6853         to variable args.
6854         (readonly_error, check_for_new_type): Const-ify a char*.
6856         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
6857         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
6858         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
6859         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
6860         gen_assign, GNU_xref_member): Const-ify a char*.
6862 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6864         * gxxint.texi: Remove old discussion on copying virtual bases.
6866 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
6868         * Make-lang.in: Remove all references to g++.o/g++.c.
6869         Link g++ from gcc.o.
6871 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
6873         * decl2.c (comdat_linkage): Treat vtables like functions.
6875 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
6877         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
6879 1999-03-25  Nathan Sidwell  <nathan@acm.org>
6881         * decl.c (init_decl_processing): Add `signed' type as a synonym
6882         for `int'.
6884 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
6886         * typeck.c (common_type): Handle cv-qual unification for pointers
6887         to members.
6889         * decl.c (unqualified_namespace_lookup): Return error_mark_node
6890         on error.
6891         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
6892         * lex.c (do_identifier): If we got error_mark_node, call
6893         lookup_name again.
6895 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6897         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
6898         classes.
6900 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
6902         * decl.c (lookup_name_real): Do nested field lookup regardless of
6903         TYPE_BEING_DEFINED.
6905 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
6907         * cp-tree.h (lang_type): Remove has_assignment and
6908         has_real_assignment.  Add befriending_classes.
6909         (TYPE_HAS_ASSIGNMENT): Remove.
6910         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
6911         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
6912         (lang_decl): Document.
6913         (DECL_BEFRIENDING_CLASSES): New macro.
6914         (FRIEND_NAME): Move declaration to more obvious location.
6915         (FRIEND_DECLS): Likewise.
6916         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
6917         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
6918         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
6919         (grok_op_properties): Likewise.
6920         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
6921         (add_friend): Likewise.  Don't do weird things with assignment
6922         operators.  Update DECL_BEFRIENDING_CLASSES.
6923         (add_friends): Don't do weird things with assignment operators.
6924         (make_friend_class): Likewise.  Update
6925         CLASSTYPE_BEFRIENDING_CLASSES.
6926         * pt.c (instantiate_class_template): Don't set
6927         TYPE_HAS_ASSIGNMENT.
6928         (tsubst_copy): Substitute the TREE_TYPE for more unary
6929         expressions.
6930         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
6931         * search.c (protected_accessible_p): New function.
6932         (friend_accessible_p): Likewise.
6933         (accessible_p): Use them.
6935 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
6937         * pt.c (convert_nontype_argument): Don't create things that aren't
6938         PTRMEM_CSTs when applying a qualification conversion to a
6939         PTRMEM_CST.
6941 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
6943         * Makefile.in (OBJS): Don't mention hash.o.
6944         (OBJDEPS): Likewise.
6946 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
6948         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
6949         * decl.c (expand_static_init): Make sure we don't add any after
6950         then.
6952         * decl.c (cp_finish_decl): Move intelligence about handling
6953         DECL_COMDAT for variables from here...
6954         * decl2.c (comdat_linkage): ...to here.
6955         (maybe_make_one_only): Tweak.
6956         (import_export_decl): Call comdat_linkage for variables, too.
6957         (finish_file): Handle template statics properly.
6959 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
6961         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
6962         Document internals of pointer-to-member-functions.
6963         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
6964         (PFN_FROM_PTRMEMFUNC): Likewise.
6965         (build_type_conversion): Remove unused parameter.
6966         (build_ptrmemfunc1): Declare.
6967         (expand_ptrmemfunc_cst): New function.
6968         (delta2_from_ptrmemfunc): Likewise.
6969         (pfn_from_ptrmemfunc): Likewise.
6970         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
6971         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
6972         (convert_to_reference): Remove unused parameter to
6973         build_type_conversion.
6974         (ocp_convert): Likewise.
6975         (build_user_type_conversion): Likewise.
6976         * error.c (dump_expr): Handle NULL pointer-to-member functions.
6977         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
6978         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
6979         open when handling pointer-to-member functions.
6980         * pt.c (convert_nontype_argument): Clean up error messages.  Be
6981         more stringent with pointers-to-members.
6982         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
6983         (build_unary_op): Tidy ever-so-slightly.
6984         (build_conditional_expr): Remove extra parameter to
6985         build_type_conversion.
6986         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
6987         we're using.
6988         (expand_ptrmemfunc_cst): Define.
6989         (delta2_from_ptrmemfunc): Likewise.
6990         (pfn_from_ptrmemfunc): Likewise.
6992 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
6994         * init.c (build_member_call): Handle template-id expressions
6995         correctly.
6996         * typeck.c (build_x_function_call): Likewise.
6998 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
7000         * friend.c (make_friend_class): Avoid core dump when
7001         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
7003 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
7005         * decl.c (start_function): Suppress normal linkage heuristics
7006         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
7008 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
7010         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
7011         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
7013 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7015         * parse.y (named_complex_class_head_sans_basetype):
7016         Do not push a scope for error_mark_node.
7017         (maybe_base_class_list): Likewise.
7019         * decl.c (start_decl): Check for error_mark_node as a type.
7020         Detected by g++.brendan/array-refs.C.
7021         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
7022         (maybe_build_cleanup_1): Likewise.  Detected by
7023         g++.jason/incomplete1.C.
7025         * tree.c (build_dummy_object): Use void_zero_node instead of the
7026         error_mark_node.
7027         (is_dummy_object): Check for such a node.
7028         Detected by g++.bob/inherit1.C
7030 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
7032         * method.c (old_backref_index): Split out...
7033         (flush_repeats): From here.  Rename back from try_old_backref.
7034         (build_mangled_name): Put back some old-style repeat handling.
7036 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7038         * lex.c: Don't include setjmp.h.
7039         (parse_float): New static function.
7040         (pf_args): New struct.
7041         (real_yylex): Use them in call to `do_float_handler'.
7043 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
7045         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
7046         * tree.c (layout_basetypes): Not here.
7047         * search.c (dfs_search): Remove; no longer used.
7049 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
7051         * decl2.c (validate_nonmember_using_decl): Issue sensible
7052         error-messages on bogus qualifiers.
7054 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
7056         * call.c (add_function_candidate): Fix uninitialized variable.
7058         * Makefile.in (search.o): Add dependency on varray.h.
7060 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
7062         * decl.c (duplicate_decls): Use same_type_p.
7063         * method.c (try_old_backref): Renamed from flush_repeats.  Use
7064         same_type_p.  Don't try to handle repeats.  Return success.
7065         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
7066         calls from old-style code, too.
7067         (check_ktype): Use same_type_p.
7068         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
7069         (build_qualified_name): Simplify logic.
7070         (process_overload_item): Strip typedefs and quals at the top.
7071         (build_mangled_name_for_type_with_Gcode): Remove call to
7072         type_canonical_variant.
7073         (build_mangled_name): Likewise.  Remove support for old-style
7074         repeats, which have been disabled since 2.7.2.  Don't mess with
7075         TREE_USED.
7076         (build_decl_overload_real): Don't mess with TREE_USED.
7078 1999-03-13  Nathan Sidwell  <nathan@acm.org>
7080         * error.c (cp_printers): Add 'F' escape character.
7081         (dump_type_real): Remove TREE_LIST (fnargs) printing.
7082         Functionality moved to dump_parameters.
7083         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
7084         (dump_function_decl): Extend meaning of V parameter.  Use
7085         dump_parameters and dump_exception_spec.
7086         (dump_parameters): New static function.
7087         (dump_exception_spec): New static function.
7088         (fndecl_as_string): Change argument semantics.  Use
7089         dump_function_decl directly.
7091         * sig.c (build_signature_table_constructor): Use cp_error.
7093 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7095         * semantics.c (finish_switch_cond): Handle error cases gracefully.
7096         Detected by g++.law/enum5.C.
7098         * typeck.c (build_modify_expr): Check for errors after resolving
7099         offsets.  Detected by g++.brendan/static1.C.
7101         * decl.c (complete_array_type): Ignore initial_value if it is an
7102         error.  Detected by g++.benjamin/17930.C.
7104         * typeck2.c (process_init_constructor): Return error if one argument
7105         is in error.  Detected by g++.benjamin/13478.C.
7107 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7109         * decl.c (select_decl): Allow class templates when we need types.
7110         * decl2.c (ambiguous_decl): Likewise.
7112 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
7114         * lex.c (do_identifier): Correct call to enforce_access.
7115         * search.c (accessible_p): Tweak comment.
7117 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
7119         * semantics.c (begin_class_definition): Call build_self_reference.
7120         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
7122         * search.c (assert_canonical_unmarked): Fix typo in prototype.
7124         * search.c (dfs_canonical_queue): New function.
7125         (dfs_assert_unmarked_p): Likewise.
7126         (assert_canonical_unmarked): Likewise.
7127         (access_in_type): Use it.
7128         (accessible_p): Likewise.  Walk the whole tree when umarking.
7130         * sig.c (build_signature_table_constructor): Use accessible_p
7131         instead of compute_access.
7133 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
7135         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
7137 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
7139         * cp-tree.h (flag_access_control): Declare.
7140         (TREE_VIA_PPUBLIC): Document.
7141         (DECL_NONSTATIC_MEMBER_P): New macro.
7142         (enforce_access): Return an indication of whether or not access
7143         was permitted.
7144         (build_self_reference): Change prototype.
7145         (compute_access): Replace with ...
7146         (accessible_p): New function.
7147         (dfs_walk): Change prototype.
7148         (dfs_unmark): Likewise.
7149         (markedp): Likewise.
7150         * call.c (enforce_access): Use accessible_p.
7151         * class.c (build_self_reference): Insert the declaration into the
7152         list of members for this type, and make it public.
7153         * decl.c (xref_basetypes): Avoid ill-timed recursion.
7154         * init.c (build_offset_ref): Use lookup_member, not three separate
7155         name-lookups.  Call enforce_access rather than checking for
7156         illegal accesses here.
7157         (resolve_offset_ref): Likewise.
7158         * lex.c (do_identifier): Likewise.
7159         * method.c (hack_identifier): Likewise.
7160         * parse.y (self_reference): Remove.
7161         (opt_component_decl_list): Don't use it.
7162         * parse.c: Regenerated.
7163         * pt.c (print_candidates): Generalize to handle lists of
7164         overloaded functions.
7165         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
7166         not set.
7167         (get_template_base): Use new calling convention for dfs_walk.
7168         * search.c: Include varray.h.  Add prototypes.
7169         (dfs_walk): Accept a data pointer to pass to the work functions.
7170         All callers changed.  All work functions changed.
7171         (breadth_first_search): Rename to bfs_walk, and make consistent
7172         with dfs_walk.
7173         (dfs_walk_real): New function.
7174         (canonical_binfo): New function.
7175         (context_for_name_lookup): Likewise.
7176         (shared_marked_p): Likewise.
7177         (shared_unmarked_p): Likewise.
7178         (lokup_field_queue_p): Likewise.
7179         (lookup_field_r): Generalize to handle both functions and fields.
7180         (lookup_field): Just call lookup_member.
7181         (lookup_fnfields): Likewise.
7182         (lookup_member): Move body of lookup_field here and generalize.
7183         (dfs_accessible_queue_p): Likewise.
7184         (dfs_accessible_p): Likewise.
7185         (dfs_access_in_type): Likewise.
7186         (access_in_type): Likewise.
7187         (compute_access): Remove, and replace with ...
7188         (accessible_p): New function.
7189         (vbase_types): Remove.
7190         (vbase_decl_ptr_intermediate): Likewise.
7191         (vbase_decl_ptr): Likewise.
7192         (vbase_init_result): Likewise.
7193         (closed_envelopes): Likewise.
7194         (bvtable): Likewise.
7196 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
7198         * call.c (add_function_candidate): Check for proper number of args
7199         before checking the validity of those args.
7201 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
7203         * cp-tree.h (struct lang_type): Add anon_union field.
7204         (ANON_UNION_TYPE_P): Use it instead of examining type.
7205         (SET_ANON_UNION_TYPE_P): New macro.
7206         * decl.c (check_tag_decl): Use it.
7208         * search.c (compute_access): Handle non-type contexts earlier, and
7209         handle NULL_TREE.
7211         * tree.c (build_exception_variant): Use copy_to_permanent.
7213         * decl2.c (setup_initp): Give statics with no priority the default
7214         priority here.
7215         (do_dtors, do_ctors, finish_file): Remove special handling of
7216         non-prioritized statics.
7218 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
7220         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
7221         * decl.c (make_typename_type): Don't issue an error if an
7222         immediate lookup fails; it migt be resolved later.
7223         * friend.c (is_friend): Add comment.
7224         * search.c (breadth_first_search): Add POSTFN and DATA
7225         parameters.  Tidy.  All callers changed.
7226         (lookup_field_queue_p): New function.
7227         (lookup_field_r): Likewise.
7228         (lookup_field_post): Likewise.
7229         (lookup_field): Use them, via breadth_first_search, instead of
7230         duplicating logic.
7231         (compute_access): Robustify.
7232         (lookup_fnfield_info): New structure.
7234 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
7236         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
7238 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
7240         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
7241         cc happy.
7243         * decl2.c (import_export_class): Also return if
7244         CLASSTYPE_INTERFACE_ONLY is set.
7246 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7248         * decl.c (push_overloaded_decl): Only overwrite the old binding if
7249         there was one.
7250         * decl2.c (do_local_using_decl): Fix loop termination.
7252 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
7254         * cp-tree.h (determine_specialization): Don't declare.
7255         * pt.c (determine_specialization): Make it static.  Eliminate
7256         complain parameter.  Note that decl is always non-NULL now, and
7257         simplify accordingly.
7259         * decl.c (maybe_push_to_top_level): Always call
7260         push_cp_function_context.
7261         (pop_from_top_level): Always call pop_cp_function_context.
7263 1999-02-26  Nathan Sidwell  <nathan@acm.org>
7265         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
7266         diagnostics.
7267         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
7268         * init.c (build_new_1): Extra arg to complete_type_or_else.
7269         (build_delete): Likewise.
7270         * typeck.c (require_complete_type): Likewise.
7271         (pointer_int_sum): Likewise.
7272         (pointer_diff): Likewise.
7273         (build_component_ref): Likewise.
7275         * typeck2.c (incomplete_type_error): Always use cp_error.
7276         Show declaration of undefined type, if appropriate.
7277         Deal with UNKNOWN_TYPE nodes.
7279         * typeck.c (require_complete_type): Use TYPE_SIZE as
7280         size_zero_node to mean incomplete type.
7281         (require_complete_type_in_void): New function.
7282         (build_compound_expr): Call complete_type_in_void for LHS.
7283         (build_c_cast): Call complete_type_in_void for void cast.
7284         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
7285         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
7286         require_complete_type_in_void.  Call it.
7287         * cp-tree.h (require_complete_type_in_void): Prototype new function.
7289         * typeck.c (convert_arguments): Use alternative format for
7290         function decls.  Don't require_complete_type here.  Simplify
7291         diagnostic printing.
7292         (convert_for_initialization): Don't require_complete_type on RHS yet.
7293         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
7295         * call.c (build_over_call): Cope with qualified void return type.
7296         * semantics.c (finish_call_expr): Likewise.
7297         * typeck.c (build_function_call_real): Likewise.
7298         (c_expand_return): Likewise.
7299         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
7301         * call.c (print_z_candidates): Use alternate print format, to be
7302         consistent with (pt.c) print_candidates.
7303         * method.c (hack_identifier): List candidate members.
7304         * search.c (lookup_field): Build ambiguous list, and show it, if
7305         ambiguous.
7307 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
7309         * typeck.c (decay_conversion): Don't confuse constant array
7310         variables with their initializers.
7312         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
7313         merging decls.
7314         * pt.c (regenerate_decl_from_template): Tweak for clarity.
7315         (instantiate_decl): Mark a decl instantiated before regenerating
7316         it to avoid recursion.
7317         * tree.c (mapcar): Don't call decl_constant_value unless we know
7318         something is TREE_READONLY_DECL_P.
7320         * class.c (check_for_override): Don't stop checking when we find
7321         the first overridden function.  Delete #if 0'd code.
7322         * search.c (get_matching_virtual): Likewise.
7324 1999-02-25  Richard Henderson  <rth@cygnus.com>
7326         * lang-specs.h: Define __FAST_MATH__ when appropriate.
7328 1999-02-24  Mike Stump  <mrs@wrs.com>
7330         * typeck.c (convert_for_assignment): Allow boolean integral constant
7331         expressions to convert to null pointer.
7333 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
7335         * decl.c (lookup_namespace_name): Resolve namespace aliases.
7337         * class.c (push_nested_class): Allow namespaces.
7339         * decl2.c (set_decl_namespace): Add friendp parameter.
7340         * decl.c (grokfndecl): Pass it.
7341         (grokvardecl): Likewise.
7342         * cp-tree.h: Change declaration.
7344 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
7346         * pt.c (tsubst): Allow an array of explicit size zero.
7348 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
7350         * errfn.c: Change varargs code to look like toplev.c.
7352         * method.c (process_modifiers): Don't prepend 'U' for char or
7353         wchar_t.
7355 1999-02-20  Craig Burley  <craig@jcb-sc.com>
7357         * Make-lang.in (cplib2.ready): Don't consider updating
7358         cplib2 stuff if the current directory isn't writable, as
7359         it won't work (such as during a `make install').
7361 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
7363         * decl2.c (start_objects): Make file scope constructors and
7364         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
7365         ASM_OUTPUT_DESTRUCTOR are defined.
7367 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
7369         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
7370         (fn_type_unification): Adjust prototype.
7371         (lookup_fnfields_1): Declare.
7372         * call.c (add_template_candidate_real): Adjust call to
7373         fn_type_unification.
7374         * class.c (add_method): Don't allow duplicate declarations of
7375         constructors or destructors.
7376         (resolve_address_of_overloaded_function): Remove unused variable.
7377         Adjust call to fn_type_unification.
7378         * decl.c (grokfndecl): Be more robust in the face of illegal
7379         specializations.
7380         * decl2.c (check_classfn): Remove hokey handling of member
7381         templates.
7382         * pt.c (determine_specialization): Improve comments.  Adjust to
7383         handle template argument deduction as per the standard.
7384         (check_explicit_specialization): Fix comment spacing.  Handle
7385         type-conversion operators correctly.  Improve error-recovery.
7386         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
7387         (get_bindings_real): Simplify handling of static members.
7388         * search.c (lookup_fnfields_1): Make it have external linkage.
7389         * typeck.c (compparms): Fix comment.
7390         (build_unary_op): Don't try to figure out which template
7391         specialization is being referred to when when the address-of
7392         operator is used with a template function.
7394 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7396         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
7397         keyword to match an analogous change at the top level.
7399         * tree.c (lvalue_or_else): Likewise.
7401 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
7403         * decl.c (xref_basetypes): Comment.
7404         * pt.c (instantiate_class_template): Use xref_basetypes.
7406 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
7408         * cp-tree.h (tsubst): Change prototype.
7409         (tsubst_expr): Likewise.
7410         (tsubst_copy): Likewise.
7411         (type_unification): Remove prototype.
7412         * call.c (convert_default_arg): Adjust call to tsubst_expr.
7413         * class.c (resolve_address_of_overloaded_function): Just use
7414         fn_type_unification.
7415         * decl.c (grokdeclarator): Adjust call to tsubst.
7416         * method.c (build_template_parm_names): Likewise.
7417         * pt.c (GTB_VIA_VIRTUAL): New macro.
7418         (GTB_IGNORE_TYPE): Likewise.
7419         (resolve_overloaded_unification): Add `complain' parameter.
7420         (try_one_overload): Likewise.
7421         (tsubst_template_arg_vector): Likewise.
7422         (tsubst_template_parms): Likewise.
7423         (tsubst_aggr_type): Likewise.
7424         (tsubst_arg_types): Likewise.
7425         (tsubst_call_declarator_parms): Likewise.
7426         (unify): Remove explicit_mask.
7427         (type_unification_real): Likewise.
7428         (get_template_base_recursive): Likewise.
7429         (coerce_template_template_parms): Provide prototype.
7430         (tsubst_function_type): Likewise.
7431         (try_class_unification): New function.
7432         All callers changed to use new complain parameter.
7433         (get_template_base): Use try_class_unification.
7434         (unify): Adjust handling of classes derived from template types.
7435         (fn_type_unification): Substitute explicit arguments before
7436         unification.
7438 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7440         * decl.c (pushdecl): Remove dead code.
7442 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
7444         * decl2.c (finish_objects): Fix code I missed in previous change.
7446 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
7448         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
7449         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
7451         * pt.c (maybe_process_partial_specialization): Complain about
7452         'template <>' on non-specialization.
7454 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
7456         * decl.c (grokdeclarator): Catch wierd declarators.
7457         * decl2.c (finish_file): Don't abort because of namespace parsing
7458         failure.
7459         (check_decl_namespace): Remove.
7461 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
7463         * cp-tree.h (get_template_base): Don't declare.
7464         (dfs_walk): Declare.
7465         (dfs_unmark): Likewise.
7466         (markedp): Likewise.
7467         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
7468         targs to get_template_base.
7469         (get_template_base_recursive): Move here from search.c.  Check to
7470         see that the base found can be instantiated to form the desired
7471         type.
7472         (get_template_base): Likewise.
7473         (get_class_bindings): Simplify.
7474         * search.c (get_template_base_recursive): Move to pt.c.
7475         (get_template_base): Likewise.
7476         (markedp): Make it global.
7477         (dfs_walk): Likewise.
7478         (dfs_unmark): Likewise.
7480 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
7482         * pt.c (maybe_process_partial_specialization): Complain about
7483         specialization in wrong namespace.
7484         * tree.c (decl_namespace_context): New fn.
7486 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7488         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
7489         * pt.c (coerce_template_template_parms): Handle nested
7490         template template parameters.
7492 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
7494         * typeck2.c: Update email addresses.
7496 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7498         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
7499         turned off.
7501 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
7503         * lex.c (retrofit_lang_decl): Split out...
7504         (build_lang_decl): From here.
7505         * decl.c (pushdecl): Call it for functions generated by the middle
7506         end that don't have DECL_LANG_SPECIFIC.
7507         * cp-tree.h: Declare it.
7509         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
7510         (start_objects, finish_objects): Only use special
7511         init_priority code if the user specified a priority.
7512         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
7513         objects.
7515 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
7517         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
7518         mkstemp.o.  Get them from libiberty now.
7519         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
7521 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
7523         * decl2.c (lang_decode_option): Use read_integral_parameter.
7525 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
7527         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
7528         before calling complete_type_or_else.
7530 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7532         * input.c (inline): Don't define, its handled by system.h.
7534 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
7536         * decl2.c: Don't define flag_no_ident here.  Don't process
7537         -f(no-)ident here.
7538         * cp-tree.h: Don't declare flag_no_ident here.
7539         * lang-specs.h: Map -Qn to -fno-ident.
7541 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
7543         * cp-tree.h (struct tree_binding): Replace scope field with a union.
7544         (BINDING_SCOPE): Adjust.
7545         * decl.c (BINDING_LEVEL): Adjust.
7547 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
7549         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
7550         member constants.
7552         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
7553         a ctor initializer.
7555         * tree.c (equal_functions): Fix name in prototype.
7557         * decl.c (push_local_binding): Add FLAGS argument.
7558         (pushdecl, push_overloaded_decl): Pass it.
7559         * decl2.c (do_local_using_decl): Likewise.
7560         * cp-tree.h: Adjust prototype.
7561         * decl.c (poplevel): Fix logic.
7563         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
7564         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
7565         (cat_namespace_levels): Don't loop forever.
7567 1999-01-25  Richard Henderson  <rth@cygnus.com>
7569         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
7571 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
7573         * class.c (resolve_address_of_overloaded_function): Mark the
7574         chosen function used.
7576         * call.c (build_call): Make sure that a function coming in has
7577         been marked used already.
7578         * decl.c (expand_static_init): Call mark_used instead of
7579         assemble_external.
7580         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
7581         alloc_eh_object, expand_throw): Likewise.
7582         * init.c (build_builtin_delete_call): Likewise.
7583         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
7584         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
7585         expand_generic_desc): Likewise.
7587 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7589         * tree.c (equal_functions): New function.
7590         (ovl_member): Call it.
7592 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
7594         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
7596 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
7598         * decl.c (decls_match): Return 1 if old and new are identical.
7599         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
7601 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
7603         * decl.c (start_function): Make member functions one_only on windows.
7604         * decl2.c (import_export_decl): Likewise.
7606         * decl.c (grokdeclarator): Don't complain about implicit int in
7607         a system header.  Change same-name field check to not complain in
7608         a system header instead of within extern "C".
7610 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
7612         * cp-tree.h (PUSH_GLOBAL): New macro.
7613         (PUSH_LOCAL): Likewise.
7614         (PUSH_USING): Likewise.
7615         (namespace_bindings_p): Declare.
7616         (push_overloaded_decl): Likewise.
7617         * decl.c (push_overloaded_decl): Don't make it static.  Check for
7618         illegal declarations after using declarations here.
7619         (namespace_bindings_p): Likewise.
7620         (duplicate_decls): Don't consider declarations from different
7621         namespaces to be the same.
7622         (pushdecl): Use symbolic PUSH_ constants in calls to
7623         push_overloaded_decl.
7624         (push_overloaded_decl_1): Likewise.
7625         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
7626         (do_nonmember_using_decl): Check for illegal using declarations
7627         after ordinary declarations here.
7628         (do_local_using_decl): Call pushdecl to insert declarations.
7630 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
7632         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
7634 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
7636         * tree.c (build_cplus_array_type_1): Don't call build_array_type
7637         for types involving template parameters.
7639         * cp-tree.h (PARM_DECL_EXPR): Delete.
7640         (convert_default_arg): Change prototype.
7641         (check_default_argument): Declare.
7642         (search_tree): Likewise.
7643         * call.c (convert_default_arg): Take the function to which the
7644         default argument belongs as a parameter, and do any necessary
7645         instantiation here, instead of ...
7646         (build_over_call): Here.
7647         * decl.c (local_variable_p): New function.
7648         (check_default_argument): Likewise, split out and tidied from ...
7649         (grokparms): Here.
7650         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
7651         * pt.c (tsubst_call_declarator_parms): New function.
7652         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
7653         with CALL_EXPRs, rather than trying to be clever.
7654         (tsubst): Use tsubst_call_declarator_parms.
7655         * tree.c (search_tree): Don't make it static.
7656         * typeck.c (convert_arguments): Use new interface to
7657         convert_default_arg.
7659 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
7661         * error.c (dump_function_decl): Don't print the argument types for
7662         a function when the verbosity level is negative.
7664         * call.c (build_over_call): Check format attributes at call-time.
7666         * pt.c (tsubst_copy): Fix comment.
7667         (unify): Don't allow unification with variable-sized arrays.
7669         * semantics.c (finish_stmt_expr): When processing a template make
7670         the BIND_EXPR long-lived.
7672 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
7674         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
7675         (import_export_vtable): Not here.
7677 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
7679         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
7680         non-static member function.
7682 1999-01-18  Nathan Sidwell  <nathan@acm.org>
7684         * class.c (instantiate_type): Only diagnose illegal address of member
7685         function if complaining.
7687         * decl.c (lookup_name_real): Remove duplicate code.
7689 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
7691         * tree.c (copy_template_template_parm): Use permanent_obstack.
7693 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7695         * pt.c (unify): Remove restrictions on deduction of argument
7696         of template template parameters.
7698 1999-01-18  Nathan Sidwell  <nathan@acm.org>
7700         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
7702         * class.c (resolve_address_of_overloaded_function): Show list of
7703         all candidates, when none of them match.
7705 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
7707         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
7708         definition of 'casting away const' in reinterpret_cast<>.
7710 1999-01-18  Graham  <grahams@rcp.co.uk>
7712         * cvt.c: Add include for decl.h, remove extern for
7713         static_aggregates which is now provided by decl.h.
7715         * Makefile.in (cvt.o): Add dependency for decl.h and missing
7716         dependencies for convert.h and flags.h.
7718 1999-01-18  Nathan Sidwell  <nathan@acm.org>
7720         * decl2.c (do_dtors): Set current location to that of the
7721         decl, for sensible diagnostics and debugging.
7722         (check_classfn): Issue `incomplete type' error, if
7723         class is not defined.
7725 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
7727         * cp-tree.h: Add prototype for bound_pmf_p.
7729 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
7730             Manfred Hollstein <manfred@s-direktnet.de>
7732         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
7733         -Wreturn-type.
7735 1999-01-16  Nathan Sidwell  <nathan@acm.org>
7737         * cp-tree.h (struct lang_type): Added has_mutable flag.
7738         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
7739         (TYPE_HAS_MUTABLE_P): New macro to read it.
7740         (cp_has_mutable_p): Prototype for new function.
7741         * class.c (finish_struct_1): Set has_mutable from members.
7742         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
7743         it contains a mutable.
7744         * typeck.c (cp_has_mutable_p): New function.
7746 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
7748         * pt.c (process_template_parm): Ignore top-level qualifiers on
7749         non-type parameters.
7751         * decl.c (start_function): Use current_function_parms in the call
7752         to require_complete_type_for_parms, not the probably empty
7753         DECL_ARGUMENTS.
7755 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
7757         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
7759         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
7760         that we don't suppress the other copies.
7761         * lex.c (handle_cp_pragma): Likewise.
7763 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
7765         * decl.c (grokdeclarator): Undo 1998-12-14 change.
7766         * tree.c (build_cplus_array_type_1): Likewise.
7767         * pt.c (instantiate_class_template): Remove misleading comment.
7768         (tsubst_aggr_type): Substitute if there are template parameters,
7769         regardless of whether or not they use template arguments.
7770         (unify): Likewise, but for unification.
7772 1999-01-12  Richard Henderson  <rth@cygnus.com>
7774         * cp-tree.h (flag_permissive): Declare extern.
7776 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
7778         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
7779         here.
7780         (lang_type): Add is_partial_instantiation.  Decrease width of
7781         dummy.
7782         (PARTIAL_INSTANTIATION_P): New macro.
7783         (OPERATOR_TYPENAME_P): Remove.
7784         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
7785         OPERATOR_TYPENAME_P.
7786         (grok_op_properties): Likewise.
7787         * friend.c (do_friend): Handle friends that are member functions
7788         correctly.
7789         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
7790         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
7791         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
7792         any more partial instantiation than is absolutely necessary for
7793         implicit typename.  Set PARTIAL_INSTANTIATION_P.
7794         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
7795         * semantics.c (begin_class_definition): Handle partial
7796         specializations of a type that was previously partially
7797         instantiated.
7799 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
7801         * g++spec.c (LIBSTDCXX): Provide default definition.
7802         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
7804 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7806         * Make-lang.in (g++.o): Depend on prefix.h.
7808 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
7810         * tree.c (bound_pmf_p): New fn.
7811         * typeck.c (build_c_cast): Use it.
7813         * decl.c (grok_op_properties): Use same_type_p.
7815 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7817         * Makefile.in (cvt.o): Depend on toplev.h.
7819         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
7821         * cvt.c: Include toplev.h.
7823         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
7824         definitions.
7826         * init.c (expand_vec_init): Initialize variable `itype'.
7828         * lex.c (yyerror): Cast the argument passed to a ctype function to
7829         an unsigned char.
7831         * method.c (build_mangled_C9x_name): Wrap prototype and definition
7832         in "HOST_BITS_PER_WIDE_INT >= 64".
7834         * typeck.c (build_binary_op): Mark parameter `convert_p' with
7835         ATTRIBUTE_UNUSED.
7837 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
7839         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
7840         * tree.c (build_exception_variant): Don't crash on empty throw
7841         specs.
7843 1998-12-18  DJ Delorie  <dj@cygnus.com>
7845         * cvt.c (convert_to_reference): Check for both error_mark_node
7846         and NULL_NODE after call to convert_for_initialization.
7848 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
7850         * error.c (interesting_scope_p): New fn.
7851         (dump_simple_decl): Use it.
7852         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
7853         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
7855 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
7857         * class.c (resolve_address_of_overloaded_function): Do conversion
7858         to correct type here, rather than ...
7859         (instantiate_type): Here.
7861         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
7862         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
7863         (decl_template_parm_p): Remove.
7864         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
7865         parameter.
7866         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
7867         * pt.c (push_inline_template_parms_recursive): Set it.
7868         (decl_template_parm_p): Remove.
7869         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
7870         (process_template_parm): Set it.
7872 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
7874         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
7875         if configured with cpplib.
7877 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
7879         * decl.c (poplevel): Make sure ns_binding is initialized.
7881         * decl.c (finish_function): Undo inadvertent change in previous
7882         patch.
7884 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
7886         * class.c (pushclass): Tweak handling of class-level bindings.
7887         (resolve_address_of_overloaded_function): Update pointer-to-member
7888         handling.
7889         (instantiate_type): Likewise.
7890         * cvt.c (cp_convert_to_pointer): Likewise.
7891         * decl.c (pop_binding): Take the DECL to pop, not just the name.
7892         Deal with `struct stat' hack.
7893         (binding_level): Add to documentation.
7894         (push_binding): Clear BINDING_TYPE.
7895         (add_binding): New function.
7896         (push_local_binding): Use it.
7897         (push_class_binding): Likewise.
7898         (poplevel): Adjust calls to pop_binding.
7899         (poplevel_class): Likewise.
7900         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
7901         declarations to current binding level.
7902         (push_class_level_binding): Likewise.
7903         (push_overloaded_decl): Adjust handling of OVERLOADs in local
7904         bindings.
7905         (lookup_namespace_name): Don't crash when confronted with a
7906         TEMPLATE_DECL.
7907         (lookup_name_real): Do `struct stat' hack in local binding
7908         contexts.
7909         (build_ptrmemfunc_type): Adjust documentation.
7910         (grokdeclarator): Don't avoid building real array types when
7911         processing templates unless really necessary.
7912         (finish_method): Adjust calls to pop_binding.
7913         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
7914         not reparse_decl_as_expr.
7915         (build_expr_from_tree): Deal with a template-id as the function to
7916         call in a METHOD_CALL_EXPR.
7917         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
7918         (maybe_adjust_types_For_deduction): Don't do peculiar things with
7919         METHOD_TYPEs here.
7920         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
7921         pointer-to-member types where necessary.
7922         * tree.c (build_cplus_array_type_1): Don't avoid building real
7923         array types when processing templates unless really necessary.
7924         (build_exception_variant): Compare the exception lists correctly.
7926 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
7928         * cp-tree.def (CPLUS_BINDING): Update documentation.
7929         * cp-tree.h (LOCAL_BINDING_P): New macro.
7930         (lang_identifier): Rename local_value to bindings.
7931         (tree_binding): Make `scope' of type `void*', not `tree'.
7932         (BINDING_SCOPE): Update documentation.
7933         (IDENTIFIER_LOCAL_VALUE): Remove.
7934         (IDENTIFIER_CLASS_VALUE): Document.
7935         (IDENTIFIER_BINDING): New macro.
7936         (IDENTIFIER_VALUE): Likewise.
7937         (TIME_IDENTIFIER_TIME): Likewise.
7938         (TIME_IDENTIFIER_FILEINFO): Likewise.
7939         (IMPLICIT_TYPENAME_P): Likewise.
7940         (set_identifier_local_value): Remove.
7941         (push_local_binding): New function.
7942         (push_class_binding): Likewise.
7943         * class.c (pushclass): Update comments; use push_class_binding.
7944         * decl.c (set_identifier_local_value_with_scope): Remove.
7945         (set_identifier_local_value): Likewise.
7946         (push_binding): New function.
7947         (pop_binding): Likewise.
7948         (binding_level): Update documentation.  Remove shadowed.
7949         (BINDING_LEVEL): New macro.
7950         (free_binding_nodes): New variable.
7951         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
7952         BLOCK_VARs when doing for-scope extension.  Remove effectively
7953         dead code.
7954         (pushlevel_class): Tweak formatting.
7955         (poplevel_class): Adjust for new name-lookup scheme.
7956         (print_binding_level): Likewise.
7957         (store_bindings): Likewise.
7958         (pushdecl): Likewise.
7959         (pushdecl_class_level): Likewise.
7960         (push_class_level_binding): Likewise.
7961         (push_overloaded_decl): Update comments.  Adjust for new
7962         name-lookup scheme.
7963         (lookup_name_real): Likewise.
7964         (lookup_name_current_level): Likewise.
7965         (cp_finish_decl): Likewise.
7966         (require_complete_types_for_parms): Likewise.  Remove misleading
7967         #if 0'd code.
7968         (grok_parms): Likewise.  Don't call
7969         require_complete_types_for_parms here.
7970         (grok_ctor_properties): Don't treat templates as copy
7971         constructors.
7972         (grop_op_properties): Or as assignment operators.
7973         (start_function): Document.  Adjust for new name-lookup scheme.
7974         (finish_function): Likewise.
7975         * decl2.c (do_local_using_decl): Use push_local_binding.
7976         * lex.c (begin_definition_of_inclass_inline): New function, split
7977         out from ...
7978         (do_pending_inlines): Here, and ...
7979         (process_next_inline): Here.
7980         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
7981         (init_filename_times): Likewise.
7982         (extract_interface_info): Likewise.
7983         (ste_typedecl_interface_info): Likewise.
7984         (check_newline): Likewise.
7985         (dump_time_statistics): Likewise.
7986         (handle_cp_pragma): Likewise.
7987         (do_identifier): Adjust for new name-lookup scheme.
7988         * parse.y (function_try_block): Return ctor_initializer_opt value.
7989         (fndef): Use it.
7990         (fn.defpen): Pass appropriate values to start_function.
7991         (pending_inline): Use functor_try_block value, and pass
7992         appropriate values to finish_function.
7993         * pt.c (is_member_template): Update documentation; remove handling
7994         of FUNCTION_DECLs.  As per name, this function should deal only in
7995         TEMPLATE_DECLs.
7996         (decl_template_parm_p): Change name of olddecl parameter to decl.
7997         (check_template_shadow): Adjust for new name-lookup scheme.
7998         (lookup_template_class): Likewise.
7999         (tsubst_decl): Tweak so as not to confuse member templates with
8000         copy constructors and assignment operators.
8001         (unify): Handle UNION_TYPEs.
8002         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
8003         (lang_print_xnode): Adjust for new name-lookup scheme.
8004         * typeck.c (mark_addressable): Likewise.
8005         (c_expand_return): Likewise.
8007 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
8009         * decl.c (grokdeclarator): Allow field with same name as class
8010         in extern "C".
8012         * decl.c (lookup_name_real): Don't limit field lookup to types.
8013         * class.c (check_member_decl_is_same_in_complete_scope): No error
8014         if icv and x are the same.
8015         * lex.c (do_identifier): Tweak error message.
8017 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
8019         * decl.c (start_enum): Use push_obstacks, not
8020         end_temporary_allocation.
8021         (finish_enum): Call pop_obstacks.
8023 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
8025         * class.c (instantiate_type): Return error_mark_node rather than
8026         junk.
8028 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
8030         * cp-tree.h (most_specialized_instantiation): New function.
8031         (print_candidates): Likewise.
8032         * class.c (validate_lhs): Remove.
8033         (resolve_address_of_overloaded_function): New function, split out
8034         and then substantially reworked, from ...
8035         (instantiate_type): Use it.  Simplify.
8036         * cvt.c (convert_to_reference): Complain when caller has indicated
8037         that's the right thing to do.  Don't crash if instantiate_type
8038         fails.
8039         * pt.c: Substitute `parameters' for `paramters' throughout.
8040         (print_candidates): Don't make it static.
8041         (most_specialized_instantiation): Split out from ...
8042         (most_specialized): Here.
8044 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
8046         * lex.c (lang_init_options): Initialize cpplib.
8047         * decl2.c (parse_options,cpp_initialized): Removed.
8048         (lang_decode_option): Move initialization of cpplib to
8049         lang_init_options.
8051 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
8053         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
8054         well as the TYPE_DECL, when a typedef name is assigned to a
8055         previously anonymous type.
8057 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
8059         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
8060         __cp_eh_info for getting the eh info pointer.  Add table_index to
8061         field list.
8062         (push_eh_cleanup): Don't increment 'handlers' data field.
8063         (process_start_catch_block): Don't set the 'caught' field.
8065         * cp/exception.cc (CP_EH_INFO): New macro for getting the
8066         exception info pointer within library routines.
8067         (__cp_eh_info): Use CP_EH_INFO.
8068         (__start_cp_handler): Get exception info pointer, set caught field,
8069         and increment the handlers field.  Avoids this being done by handlers.
8070         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
8071         (uncaught_exception): Use CP_EH_INFO macro.
8073 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
8075         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
8077 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
8079         * lex.c (check_newline): Add support for \ as `natural'
8080         characters in file names in #line to be consistent with #include
8081         handling.  We support escape processing in the # 1 "..." version of
8082         the command.  See also support in cp/lex.c.
8084 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
8086         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
8087         structure.
8089 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
8091         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
8093         * error.c (dump_simple_decl): Also print namespace context.
8094         (dump_function_decl): Likewise.
8096         * decl2.c (ambiguous_decl): Don't print old value if it's
8097         error_mark_node.
8099         * decl.c (lookup_name_real): Fix handling of local types shadowed
8100         by a non-type decl.  Remove obsolete code.
8101         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
8103         * lang-options.h: Add -fpermissive.
8104         * decl2.c: Likewise.
8105         * cp-tree.h: Add flag_permissive.
8106         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
8107         were specified, set flag_pedantic_errors.
8108         * call.c (build_over_call): Turn dropped qualifier messages
8109         back into pedwarns.
8110         * cvt.c (convert_to_reference): Likewise.
8111         * typeck.c (convert_for_assignment): Likewise.
8113 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
8115         * decl2.c (coerce_new_type): Use same_type_p.
8116         (coerce_delete_type): Likewise.
8118         * call.c (check_dtor_name): Return 1, not error_mark_node.
8120 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
8122         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
8123         if MULTIPLE_SYMBOL_SPACES.
8125         * pt.c (check_template_shadow): New fn.
8126         * decl2.c (grokfield): Use it.
8127         * decl.c (pushdecl): Likewise.
8128         (pushdecl_class_level): Likewise.
8129         (start_method): Likewise.
8130         (xref_tag): Don't try to use 't' if we're defining.
8132         * call.c (check_dtor_name): Just return an error_mark_node.
8133         * pt.c (lookup_template_class): Complain about using non-template here.
8134         * parse.y (apparent_template_type): Not here.
8136         * pt.c (check_explicit_specialization): Complain about specialization
8137         with C linkage.
8139         * lang-options.h: Add -f{no-,}implicit-inline-templates.
8141         * pt.c (convert_nontype_argument): Don't assume that any integer
8142         argument is intended to be a constant-expression.
8144 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
8146         * class.c (handle_using_decl): Fix comment.  Don't lookup
8147         constructors in base classes.
8148         (validate_lhs): Fix typo in comment.
8149         * search.c (lookup_field_1): Don't return a USING_DECL.
8151         * cp-tree.h (DECL_ACCESS): Improve documentation.
8153         * decl.c (expand_static_init): Don't set the initialization-done
8154         flag until the initialization is done.
8156 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
8158         * decl2.c (validate_nonmember_using_decl): Complain about using
8159         declarations for class members.
8161 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
8163         * typeck2.c (process_init_constructor): Use same_type_p.
8165         * decl.c (check_tag_decl): Don't warn about null decl inside a
8166         class.
8168         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
8169         UNIFY_ALLOW_NONE.
8170         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
8171         (resolve_overloaded_unification): Strip baselinks.
8173 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8175         * g++spec.c: Don't prototype xmalloc.
8177 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
8179         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
8181         * decl.c (check_tag_decl): Do complain about null friend decl at
8182         file scope.
8184 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
8186         * lex.c (make_lang_type): Clear the whole struct lang_type, not
8187         only the first multiple of sizeof (int).
8189 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
8191         * decl.c (start_decl): An explicit specialization of a static data
8192         member is only a definition if it has an initializer.
8194         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
8195         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
8196         cp_finish_decl.
8197         * init.c (expand_default_init): Check for DIRECT_BIND instead of
8198         DECL_ARTIFICIAL.
8200         * call.c (build_over_call): Use build_decl.
8202         * except.c (expand_throw): Just use convert, not
8203         build_reinterpret_cast.
8205         * lex.c (handle_generic_pragma): Use token_buffer.
8207         * decl.c (check_tag_decl): Don't complain about null friend decl.
8209 1998-11-24  Dave Pitts  <dpitts@cozx.com>
8211         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
8212         first position.
8213         * lex.c (check_newline): Use ISALPHA.
8214         (readescape): Use ISGRAPH.
8215         (yyerror): Use ISGRAPH.
8217 1998-11-24  Nathan Sidwell  <nathan@acm.org>
8219         * search.c (get_abstract_virtuals): Do not use initial
8220         CLASSTYPE_ABSTRACT_VIRTUALS.
8221         * typeck2.c (abstract_virtuals_error): Show location of abstract
8222         declaration.
8223         * call.c (build_new_method_call): Use
8224         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
8225         * class.c (finish_struct_bits): Don't bother working out whether
8226         get_abstract_virtuals will do anything, just do it.
8228 1998-11-24  Graham  <grahams@rcp.co.uk>
8230         * typeck.c (build_component_ref): Remove unused statement.
8232 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
8234         * class.c (add_method): Catch invalid overloads.
8236         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
8237         * search.c (lookup_conversions): Handle getting real OVERLOADs.
8238         (add_conversions): Likewise.  Revert last change.
8239         * call.c (add_conv_candidate): Pass totype to add_candidate instead
8240         of fn.  Don't add a new candidate if the last one was for the same
8241         type.
8242         (print_z_candidates): Handle getting a type as a function.
8243         (joust): If we got two conversion candidates to the same type,
8244         just pick one.
8245         (build_object_call): Lose 'templates'.
8246         (build_user_type_conversion_1): Handle getting real OVERLOADs.
8248 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
8250         * typeck2.c (process_init_constructor): If there are elements
8251         that don't have initializers and they need to have constructors
8252         run, supply them with initializers.
8254         * class.c (finish_struct_1): A class with a 0-width bitfield is
8255         still empty.
8257 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
8259         * pt.c (instantiate_class_template): Don't try to figure out what
8260         specialization to use for a partial instantiation.  Correct
8261         typos in a couple of comments.  Avoid calling uses_template_parms
8262         multiple times.
8264 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
8266         * method.c (process_overload_item): Add call to
8267         build_mangled_C9x_name for intTI_type_nodes.
8268         (build_mangled_C9x_name): Add prototype, define.
8269         * decl.c (init_decl_processing): Add names for
8270         TImode_type_node.
8272 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
8274         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
8276         * class.c (finish_struct_1): Set things up for 0-width bitfields
8277         like we do for others.
8279         * decl.c (check_tag_decl): New fn.
8280         (shadow_tag): Split out from here.
8281         * decl2.c (grok_x_components): Call it.
8283 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
8285         * decl.c: Lose warn_about_return_type.
8286         (grokdeclarator): Always complain about implicit int, except for
8287         `main () { ... }'.
8289         * decl.c (tag_name): New fn.
8290         (xref_tag): Complain about using typedef-name after class-key.
8292         * init.c (expand_vec_init): Also keep going if from_array.
8294         * tree.c (is_overloaded_fn): Also handle the output of
8295         build_offset_ref.
8297         * decl.c (grokdeclarator): Use constructor_name when comparing
8298         field name against enclosing class.
8299         * class.c (finish_struct_anon): Likewise.
8301 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
8303         * decl.c (poplevel): Remove code to handle KEEP == 2.
8304         (finish_function): Don't confuse BLOCK-order when
8305         processing a destructor.
8307 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
8309         * decl.c (require_complete_types_for_parms): Call layout_decl
8310         after we've completed the type.
8312 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8314         * decl2.c (validate_nonmember_using_decl): Allow using templates
8315         from the global namespace.
8317 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
8319         Handle specifying template args to member function templates.
8320         * tree.c (build_overload): Always create an OVERLOAD for a template.
8321         * search.c (add_conversions): Handle finding an OVERLOAD.
8322         * decl2.c (check_classfn): Likewise.
8323         * lex.c (identifier_type): See through a baselink.
8324         * parse.y (do_id): Don't call do_identifier if we got a baselink.
8325         * class.c (instantiate_type, case TREE_LIST): Recurse.
8327         * decl.c (grokdeclarator): Allow a boolean constant for array
8328         bounds, odd as that sounds.
8330         * pt.c (unify): Be more strict about non-type parms, except for
8331         array bounds.
8332         (UNIFY_ALLOW_INTEGER): New macro.
8334 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
8336         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
8338 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
8340         * semantics.c (begin_class_definition): Call
8341         maybe_process_partial_specialization before push_template_decl.
8342         Don't call push_template_decl for a specialization.
8343         * search.c (lookup_field): Do return a member template class.
8344         * decl2.c (handle_class_head): Handle member template classes.
8346         * decl.c (grokdeclarator): A parm type need not be complete.
8348         * pt.c (convert_nontype_argument): Fix thinko.
8350 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
8352         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
8353         (global_delete_fndecl): New variable.
8354         * decl.c (global_delete_fndecl): Define it.
8355         (init_decl_processing): Set it.
8356         * init.c (build_builtin_delete_call): Use it.
8357         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
8358         nodes.
8360 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
8362         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
8363         type.
8365         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
8366         * call.c (build_object_call): Also support references to functions.
8367         * typeck.c (convert_for_initialization): Don't decay a function
8368         if the target is a reference to function.
8370         * search.c (add_conversions): Get all the overloads from a class.
8372         * decl.c (grok_ctor_properties): Complain about any constructor
8373         that will take a single arg of the class type by value.
8375         * typeck2.c (build_functional_cast): Can't create objects of
8376         abstract classes this way.
8377         * cvt.c (ocp_convert): Likewise.
8379         * decl.c (grokfndecl): Member functions of local classes are not
8380         public.
8382 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
8384         * Make-lang.in (cc1plus): Add dependency on hash.o.
8386 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
8388         * search.c (get_abstract_virtuals): Complain about virtuals with
8389         no final overrider.
8390         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
8391         with no final overrider.
8392         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
8393         on virtuals with no final overrider.
8395         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
8397         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
8398         after layout_type.
8400         * friend.c (do_friend): Don't set_mangled_name_for_decl.
8402         * class.c (finish_struct_anon): Complain about non-fields.
8403         * decl2.c (build_anon_union_vars): Likewise.
8405         * decl.c (grokdeclarator): Normal data members can't have the same
8406         name as the class, either.
8407         * class.c (finish_struct_anon): Neither can members of an
8408         anonymous union.
8410 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
8412         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
8413         (TYPE_BINFO): Likewise.
8414         (IS_AGGR_TYPE): Tweak.
8415         (SET_IS_AGGR_TYPE): New macro.
8416         (CLASS_TYPE_P): Tweak.
8417         (lang_type): Group mark bitfields together.  Remove linenum.
8418         (CLASSTYPE_SOURCE_LINE): Remove macro.
8419         (CLASSTYPE_MARKED_N): New macro.
8420         (SET_CLASSTYPE_MARKED_N): Likewise.
8421         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
8422         (CLASS_TYPE_MARKED_*): Use them.
8423         (SET_CLASSTYPE_MARKED_*): Likewise.
8424         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
8425         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
8426         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
8427         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
8428         * class.c (class_cache_obstack): New variable.
8429         (class_cache_firstobj): Likewise.
8430         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
8431         (pushclass): Free the cache, when appropriate.
8432         (popclass): Tidy.
8433         (maybe_push_cache_obstack): Use class_cache_obstack.
8434         * decl.c (include hash.h).
8435         (typename_hash): New function.
8436         (typename_compare): Likewise.
8437         (build_typename_type): Check the hash table to avoid creating
8438         duplicates.
8439         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
8440         (grokdeclarator): Use CLASS_TYPE_P.
8441         (xref_basetypes): Likewise.
8442         (start_function): Likewise.  Don't put current_class_ref on the
8443         permanent obstack.
8444         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
8445         and TYPE_TI_ARGS.
8446         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
8447         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
8448         fields for types other than class types.  Do clear TYPE_ALIAS_SET
8449         for types other than class types, though.
8450         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
8451         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8452         * pt.c (process_template_parm): Don't set
8453         CLASSTYPE_GOT_SEMICOLON.
8454         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8455         Coerce arguments on the momentary obstack.
8456         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8457         (instantiate_class_template): Calculate template arguments on the
8458         momentary obstack.  Tidy.
8459         (tsubst_template_arg_vector): Use make_temp_vec.
8460         (tsubst_aggr_type): Put template arguments on the momentary
8461         obstack.
8462         (tsubst_decl): Likewise.
8463         (tsubst): Copy the array bounds index to the permanent obstack
8464         before building index types.  Use new macros.
8465         (unify): Use new macros.
8466         (do_type_instantiation): Likewise.
8467         * search.c (lookup_fnfields_1): Use new macros.
8468         (dfs_pushdecls): Build envelopes on the cache obstack.
8469         (dfs_compress_decls): Use new macros.
8470         (push_class_decls): Build on the cache obstack.
8471         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
8472         * sign.c (build_signature_pointer_or_reference_type): Use
8473         SET_IS_AGGR_TYPE.
8474         * tree.c (make_binfo): Check CLASS_TYPE_P.
8475         (copy_template_template_parm): Adjust.
8476         (make_temp_vec): Use push_expression_obstack.
8477         * typeck.c (complete_type): Use new macros.
8478         (comptypes): Likewise.
8480 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
8482         * pt.c (tsubst): Add diagnostics for invalid array, reference
8483         and pointer to member types.
8485 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
8487         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
8489         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
8490         Simplify.
8492         * parse.y (structsp): Fix cut-and-paste error.
8494         * init.c (build_new): Complain about non-integral size.
8496         * parse.y (unary_expr): Complain about defining types in sizeof.
8498         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
8500         * rtti.c (build_x_typeid): Complain about typeid without
8501         including <typeinfo>.
8502         (get_typeid): Likewise.  Complain about typeid of incomplete type.
8503         (get_tinfo_fn_dynamic): Likewise.
8504         (get_typeid_1): Not static anymore.
8505         * except.c (build_eh_type_type): Use get_typeid_1.
8507         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
8508         ambiguous or private bases.  Fix warning for reference cast.
8510 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
8512         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
8513         * decl.c (duplicate_decls): Remove special-case code to deal with
8514         template friends, and just do the obvious thing.
8515         * pt.c (register_specialization): Tweak for clarity, and also to
8516         clear DECL_INITIAL for an instantiation before it is merged with a
8517         specialization.
8518         (check_explicit_specialization): Fix indentation.
8519         (tsubst_friend_function): Handle both definitions in friend
8520         declaration and outside friend declarations.
8521         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
8522         (regenerate_decl_from_template): Tweak accordingly.
8523         (instantiate_decl): Likewise.
8525 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
8527         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
8528         member function reference to error.
8529         * cvt.c (ocp_convert): Complain about converting an overloaded
8530         function to void.
8532         * init.c (build_offset_ref): Just return a lone static member
8533         function.
8535         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
8536         not internal ones.
8538         * typeck.c (build_binary_op_nodefault): Improve error handling.
8540         * decl.c (grokfndecl): Complain about making 'main' a template.
8542         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
8544         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
8545         TYPE_DECL in a template.
8547 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
8549         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
8551         * decl.c (struct cp_function): Add named_label_uses.
8552         (push_cp_function_context): Save it.
8553         (pop_cp_function_context): Restore it.
8554         (define_label): Also complain about jumping into the scope of
8555         non-POD objects that don't have constructors.
8556         * tree.c (pod_type_p): New fn.
8558         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
8559         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
8560         (get_tinfo_fn): Not here.
8561         * repo.c (repo_get_id): Abort if we get called for an incomplete
8562         type.
8564 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
8566         * except.c (expand_throw): Make sure first argument to
8567         __cp_push_exception is of type `void*' to avoid spurious error
8568         messages.
8570 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
8572         * pt.c (try_one_overload): Take orig_targs again.  Only check for
8573         mismatches against them; we don't care what a previous call found.
8574         (resolve_overloaded_unification): Adjust.
8576         * search.c (lookup_field): Don't return anything for a non-type
8577         field from a dependent type.
8578         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
8579         in an array declarator.
8580         (start_decl): Push into the class before looking for the field.
8582 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
8584         * method.c (build_overload_value): Handle REFERENCE_TYPE.
8586 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8588         * decl.c (grokdeclarator): Allow namespace-scoped members if they
8589         are friends.
8591 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
8593         * pt.c (tsubst_decl): Don't mess with the global value of an
8594         un-mangled DECL_ASSEMBLER_NAME.
8596 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
8598         * decl.c (init_decl_processing): Remove CYGWIN conditional
8599         since CYGWIN is now able to deal with trapping signals.
8601 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8603         * cp-tree.h: Don't include gansidecl.h.
8604         * exception.cc: Include gansidecl.h (since we don't include config.h)
8605         * g++spec.c: Don't include gansidecl.h.
8607 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
8609         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
8610         size of dummy.
8611         (DECL_DEFINED_IN_CLASS_P): New macro.
8612         (TEMPLATE_PARMS_FOR_INLINE): Document.
8613         (check_static_variable_definition): New function.
8614         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
8615         appropriate.
8616         (check_static_variable_definition): Split out from ...
8617         (grokdeclarator): Here.
8618         * pt.c (check_default_tmpl_args): New function, split out from ...
8619         (push_template_decl_real): Here.
8620         (instantiate_template): Fix comment.
8622 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
8624         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
8625         (CP_TYPE_VOLATILE_P): Likewise.
8626         (CP_TYPE_RESTRICT_P): Likewise.
8628 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
8630         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
8632 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
8634         * class.c (instantiate_type): Be more helpful.
8636         * decl2.c (import_export_decl): Call import_export_class.
8638         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
8639         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
8640         * pt.c (tsubst_copy): Likewise.
8642 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
8644         * init.c (expand_vec_init): Fix off-by-one error.
8646 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
8648         * parse.y (apparent_template_type): New type.
8649         (named_complex_class_head_sans_basetype): Use it.
8650         * Makefile.in (CONFLICTS): One new conflict.
8651         * parse.c: Regenerated.
8653 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
8655         * cp-tree.h (COMPARE_STRICT): New macro.
8656         (COMPARE_BASE): Likewise.
8657         (COMPARE_RELAXED): Likewise.
8658         (COMPARE_REDECLARATION): Likewise.
8659         (same_type_p): Likewise.
8660         (same_or_base_type_p): Likewise.
8661         * call.c (standard_conversion): Use them, in place of comptypes
8662         with numeric arguments.
8663         (reference_binding): Likewise.
8664         (convert_like): Likewise.
8665         (build_over_call): Likewise.
8666         (is_subseq): Likewise.
8667         (is_properly_derived_from): Likewise.
8668         (compare_ics): Likewise.
8669         (joust): Likewise.
8670         * class.c (delete_duplicate_fields_1): Likewise.
8671         (resolves_to_fixed_type_p): Likewise.
8672         (instantiate_type): Likewise.  Remove #if 0'd code.
8673         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
8674         (pushdecl): Likewise.
8675         (lookup_name_real): Likewise.
8676         (grokdeclarator): Likewise.  Check for illegal array declarations.
8677         (grokparms): Likewise.
8678         (grok_op_properties): Likewise.
8679         * decl2.c (check_classfn): Likewise.
8680         * friend.c (is_friend): Likewise.
8681         (make_friend_class): Likewise.
8682         * init.c (expand_aggr_init): Likewise.
8683         (expand_vec_init): Likewise.
8684         * pt.c (is_member_template_class): Remove declaration.
8685         (is_specialization_of): Use COMPARE_* and new macros.
8686         (comp_template_parms): Likewise.
8687         (convert_nontype_argument): Likewise.
8688         (coerce_template_template_parms): Likewise.
8689         (template_args_equal): Likewise.
8690         (lookup_template_class): Likewise.
8691         (type_unification_real): Likewise.
8692         (unify): Likewise.
8693         (get_bindings_real): Likewise.
8694         * search.c (covariant_return_p): Likewise.
8695         (get_matching_virtual): Likewise.
8696         * sig.c (match_method_types): Likewise.
8697         * tree.c (vec_binfo_member): Likewise.
8698         (cp_tree_equal): Likewise.
8699         * typeck.c (common_type): Likewise.
8700         (comp_array_types): Likewise.  Get issues involving unknown array
8701         bounds right.
8702         (comptypes): Update comments.  Use new flags.
8703         (comp_target_types): Use new macros.
8704         (compparms): Likewise.
8705         (comp_target_parms): Likewise.
8706         (string_conv_p): Likewise.
8707         (build_component_ref): Likewise.
8708         (build_indirect_ref): Likewise.
8709         (build_conditional_expr): Likewise.
8710         (build_static_cast): Likewise.
8711         (build_reinterpret_cast): Likewise.
8712         (build_const_cast): Likewise.
8713         (build_modify_expr): Likewise.
8714         (convert_for_assignment): Likewise.
8715         (comp_ptr_ttypes_real): Likewise.
8716         (ptr_reasonably_similar): Likewise.
8717         (comp_ptr_ttypes_const): Likewise.
8719 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
8721         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
8723 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
8725         * decl2.c (delete_sanity): Pass integer_zero_node, not
8726         integer_two_node, to build_vec_delete.
8727         * init.c (build_array_eh_cleanup): Remove.
8728         (expand_vec_init_try_block): New function.
8729         (expand_vec_init_catch_clause): Likewise.
8730         (build_vec_delete_1): Don't deal with case that auto_delete_vec
8731         might be integer_two_node anymore.
8732         (expand_vec_init): Rework for initialization-correctness and
8733         exception-correctness.
8734         * typeck2.c (process_init_constructor): Make mutual exclusivity
8735         of cases more obvious.
8737 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
8739         * decl.c (lookup_name_real): OK, only warn if not lexing.
8740         Simplify suggested fix.
8742         * cp-tree.h (IDENTIFIER_MARKED): New macro.
8743         * search.c (lookup_conversions): Use breadth_first_search.
8744         (add_conversions): Avoid adding two conversions to the same type.
8745         (breadth_first_search): Work with base binfos, rather
8746         than binfos and base indices.
8747         (get_virtual_destructor): Adjust.
8748         (tree_has_any_destructor_p): Adjust.
8749         (get_matching_virtual): Adjust.
8751         * pt.c (push_template_decl_real): Generalize check for incorrect
8752         number of template parms.
8753         (is_member_template_class): #if 0.
8755 1998-10-29  Richard Henderson  <rth@cygnus.com>
8757         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
8758         last.
8760 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
8762         * lex.c: Call check_newline from lang_init always.  After
8763         calling cpp_start_read, set yy_cur and yy_lim to read from the
8764         cpplib token buffer.
8766 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
8768         * class.c (instantiate_type): Don't consider templates for a normal
8769         match.
8771         * class.c (finish_struct_1): Don't complain about non-copy
8772         assignment ops in union members.
8774         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
8775         (prepare_fresh_vtable): Likewise.
8776         (finish_struct_1): Don't call import_export_class.
8777         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
8778         (finish_prevtable_vardecl): Lose.
8779         (finish_file): Don't call it.
8780         * pt.c (instantiate_class_template): Likewise.
8781         * cp-tree.h: Remove it.
8783         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
8784         * decl.c (finish_function): Not here.
8785         (start_function): Do set DECL_INITIAL.
8787         * pt.c (push_template_decl_real): Complain about default template
8788         args for enclosing classes.
8790         * call.c (add_function_candidate): Treat conversion functions
8791         as coming from the argument's class.
8792         * cp-tree.h (DECL_CONV_FN_P): New fn.
8793         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
8794         * class.c (add_method): Use DECL_CONV_FN_P.
8795         * decl2.c (check_classfn): Likewise.
8796         * error.c (dump_function_name): Likewise.
8797         (dump_function_decl): Likewise.
8798         * pt.c (fn_type_unification): Likewise.
8799         * search.c (add_conversions): Likewise.
8801 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
8803         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
8804         * method.c (hack_identifier): Also check for using RESULT_DECL
8805         from outer context.
8807 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
8809         * decl.c (grokdeclarator): Use type_quals, rather than constp,
8810         consistently.
8812 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
8814         * call.c (standard_conversion): instantiate_type here.
8815         (reference_binding): And here.
8816         (implicit_conversion): Not here.
8817         (build_op_delete_call): No need to cons up an OVERLOAD.
8818         * cvt.c (cp_convert_to_pointer): instantiate_type here.
8819         (convert_to_reference): And here.
8820         * decl.c (grok_reference_init): Not here.
8821         (grokparms): Or here.
8822         * typeck2.c (digest_init): Or here.
8823         * typeck.c (decay_conversion): Take the address of overloaded
8824         functions, too.
8825         (require_instantiated_type): Lose.
8826         (convert_arguments): Don't handle unknown types here.
8827         (build_c_cast): Likewise.
8828         (build_binary_op): Gut.
8829         (build_conditional_expr): Don't require_instantiated_type.
8830         (build_modify_expr): Likewise.
8831         (build_static_cast): Don't instantiate_type.
8832         (build_reinterpret_cast): Likewise.
8833         (build_const_cast): Likewise.
8834         (convert_for_initialization): Likewise.
8835         (build_ptrmemfunc): Use type_unknown_p.
8836         (convert_for_assignment): Also do default_conversion on overloaded
8837         functions.  Hand them off to ocp_convert.
8839 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
8841         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
8842         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
8844         * class.c (finish_struct_1): Use build_cplus_array_type to build
8845         array types.
8846         * decl.c (init_decl_processing): Likewise.
8847         * except.c (expand_end_eh_spec): Likewise.
8848         * search.c (expand_upcast_fixups): Simplify very slightly.
8850 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
8852         * decl.c (grokdeclarator): Complain about a variable using
8853         constructor syntax coming back null from start_decl.
8855         * friend.c (make_friend_class): Complain about trying to make
8856         a non-class type a friend.
8858         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
8859         (start_function): Not here.
8861 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
8863         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
8865 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
8867         * typeck2.c (process_init_constructor): Only skip anonymous fields
8868         if they are bitfields.
8870         * cp-tree.def (TYPEOF_TYPE): New code.
8871         * error.c (dump_type_real): Handle it.
8872         * pt.c (tsubst): Likewise.
8873         * tree.c (search_tree): Likewise.
8874         * semantics.c (finish_typeof): New fn.
8875         * parse.y (typespec): Use it.
8876         * cp-tree.h: Declare it.
8878 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
8880         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
8882 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
8884         * typeck.c (convert_arguments): Don't handle pmf references
8885         specially.
8887         * init.c (build_member_call): Don't try to convert to the base type
8888         if it's ambiguous or pedantic.
8890         * typeck2.c (check_for_new_type): Only depend on pedantic for
8891         C-style casts.
8893 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
8895         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
8896         non-converting constructors.
8898 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8900         * gxxint.texi: Correct documentation for n, N, Q, and B.
8902 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8904         * parse.y (condition): Convert VAR_DECL from reference to indirect
8905         reference.
8907 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
8909         * exception.cc (__cp_pop_exception): Free the original exception
8910         value, not the potentially coerced one.
8912 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
8914         * Makefile.in (hash.h): Run gperf when necessary.
8916         * cp-tree.h (CP_TYPE_READONLY): Remove.
8917         (CP_TYPE_VOLATILE): Likewise.
8918         (CP_TYPE_QUALS): New macro.
8919         (CP_TYPE_CONST_P): Likewise.
8920         (CP_TYPE_VOLATILE_P): Likewise.
8921         (CP_TYPE_RESTRICT_P): Likewise.
8922         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
8923         (cp_build_type_variant): Rename to ...
8924         (cp_build_qualified_type): New function.
8925         (c_apply_type_quals_to_decl): Declare.
8926         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
8927         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
8928         (cp_type_qual_from_rid): New function.
8929         (compparms): Remove unused parameter.  All callers changed.
8930         (cp_type_quals): New function.
8931         (at_least_as_qualified_p): Likewise.
8932         (more_qualified_p): Likewise.
8934         * call.c (standard_conversion): Replace calls to
8935         cp_build_type_variant with cp_build_qualified_type.  Use
8936         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
8937         compare them.  Use CP_TYPE_* macros to check qualifiers.
8938         (reference_binding): Likewise.
8939         (implicit_conversion): Likewise.
8940         (add_builtin_candidates): Likewise.
8941         (build_over_call): Likewise.
8942         * class.c (overrides): Compare all qualifiers, not just `const',
8943         on method declarations.
8944         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
8945         (convert_pointer_to_real): Likewise.
8946         (type_promotes_to): Likewise.
8947         * decl.c (check_for_uninitialized_const_var): New function.
8948         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
8949         (cp_finish_decl): Use check_for_uninitialized_const_var.
8950         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
8951         handle `restrict'.
8952         (grok_ctor_properties): Likewise.
8953         (grok_op_properties): Likewise.
8954         (start_function): Likewise.
8955         (rever_static_member_fn): Likewise.
8956         * decl2.c (grok_method_quals): Likewise.
8957         (grokfield): Likewise.
8958         * error.c (dump_readonly_or_volatile): Rename to ...
8959         (dump_qualifiers): New function.  Handle `restrict'.
8960         (dump_type_real): Use it.
8961         (dump_aggr_type): Likewise.
8962         (dump_type_prefix): Likewise.
8963         (dump_type_suffix): Likewise.
8964         (dump_function_decl): Likewise.
8965         (cv_as_string): Likewise.
8966         * gxx.gperf: Add __restrict and __restrict__.
8967         * gxxint.texi: Document `u' as used for `__restrict', and a few
8968         other previously undocumented codes.
8969         * hash.h: Regenerated.
8970         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
8971         (build_member_call): Likewise.
8972         (build_new_1): Likewise.
8973         * lex.c (init_parse): Add entry for RID_RESTRICT.
8974         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
8975         (cp_type_qual_from_rid): Define.
8976         * lex.h (enum rid): Add RID_RESTRICT.
8977         * method.c (process_modifiers): Deal with `restrict'.
8978         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
8979         * parse.c: Regenerated.
8980         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
8981         (tsubst_aggr_type): Likewise.
8982         (tsubst): Likewise.
8983         (check_cv_quals_for_unify): Likewise.
8984         (unify): Likewise.
8985         * rtti.c (init_rtti_processing): Likewise.
8986         (build_headof): Likewise.
8987         (get_tinfo_var): Likewise.
8988         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
8989         (expand_class_desc): Likewise.
8990         (expand_attr_desc): Likewise.
8991         (synthesize_tinfo_fn): Likewise.
8992         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
8993         (get_matching_virtual): Likewise.
8994         (expand_upcast_fixups): Likewise.
8995         * sig.c (build_signature_pointer_or_reference_name): Take
8996         type_quals, not constp and volatilep.
8997         (build_signature_pointer_or_reference_type): Likewise.
8998         (match_method_types): More CP_TYPE_QUALS conversion, etc.
8999         (build_signature_pointer_constructor): Likewise.
9000         (build_signature_method_call): Likewise.
9001         * tree.c (build_cplus_array_type): Likewise.
9002         (cp_build_type_variant): Rename to ...
9003         (cp_build_qualified_type): New function.  Deal with `__restrict'.
9004         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
9005         (build_exception_variant): Likewise.
9006         (mapcar): Likewise.
9007         * typeck.c (qualif_type): Likewise.
9008         (common_type): Likewise.
9009         (comptypes): Likewise.
9010         (comp_cv_target_types): Likewise.
9011         (at_least_as_qualified_p): Define.
9012         (more_qualified_p): Likewise.
9013         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
9014         (compparms): Likewise.
9015         (inline_conversion): Likewise.
9016         (string_conv_p): Likewise.
9017         (build_component_ref): Likewise.
9018         (build_indirect_ref): Likewise.
9019         (build_array_ref): Likewise.
9020         (build_unary_op): Likewise.
9021         (build_conditional_expr): Likewise.
9022         (build_static_cast): Likewise.
9023         (build_c_cast): Likewise.
9024         (build_modify_expr): Likewise.
9025         (convert_For_assignment): Likewise.
9026         (comp_ptr_ttypes_real): Likewise.
9027         (cp_type_quals): New function.
9029 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
9031         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
9032         (CP_TYPE_VOLATILE): Likewise.
9033         * decl.c (grokdeclarator): Use them.
9034         * tree.c (canonical_type_variant): Likewise.
9036 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9038         * parse.y (named_class_head): Push into class while parsing the
9039         base class list.
9040         * decl2.c (push_scope, pop_scope): New functions.
9041         * cp-tree.h: Declare them.
9042         * init.c (build_new_1): Delay cleanup until end of full expression.
9044 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
9046         * typeck.c (build_component_ref): Use of a type here is an error.
9048 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
9050         Revamp references to member functions.
9051         * method.c (hack_identifier): Call build_component_ref for a
9052         reference to a member function.
9053         * typeck.c (build_component_ref): Only return a single function
9054         if it's static.  Otherwise, return a COMPONENT_REF.
9055         (build_x_function_call): Handle a COMPONENT_REF.
9056         (build_unary_op): Handle all unknown-type things.
9057         * decl2.c (arg_assoc): Handle COMPONENT_REF.
9058         * class.c (instantiate_type): Complain if the function we get is a
9059         nonstatic member function.  Remove code for finding "compatible"
9060         functions.
9061         * pt.c (tsubst_copy): Handle NOP_EXPR.
9062         * tree.c (build_dummy_object): New fn.
9063         (maybe_dummy_object): New fn.
9064         (is_dummy_object): New fn.
9065         * cp-tree.h: Declare them.
9066         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
9067         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
9068         * init.c (build_member_call): Use maybe_dummy_object and
9069         is_dummy_object.
9070         (build_offset_ref): Use maybe_dummy_object.
9071         (resolve_offset_ref): Use is_dummy_object.
9072         * typeck.c (build_x_function_call): Call build_dummy_object.
9073         (unary_complex_lvalue): Call is_dummy_object.
9075         * typeck.c (build_component_addr): Make sure field is a field.
9077         * call.c (build_new_op): Delete obsolete code.
9079         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
9081 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9083         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
9084         std if std is ignored.
9086 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
9088         * decl.c (grokvardecl): Fix thinko.
9090         * decl.c (grokdeclarator): Embedded attrs bind to the right,
9091         not the left.
9093         * parse.y (fn.def2): Fix 'attrs' format.
9095 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
9097         * Makefile.in (CONFLICTS): Update.
9098         * parse.y (expr_or_declarator_intern): New rule.
9099         (expr_or_declarator, direct_notype_declarator, primary,
9100         functional_cast): Use it.
9101         (notype_declarator_intern): New rule.
9102         (notype_declarator, complex_notype_declarator): Use it.
9104 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
9106         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
9107         (grokvardecl): Likewise.
9109 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9111         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
9112         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
9114         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
9116         * pt.c (process_partial_specialization): Cast 1st argument of
9117         `bzero' to (PTR).
9119         * tree.c (build_base_fields): Cast `base_align' to (int) when
9120         comparing against one.
9122 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
9124         * decl.c (lookup_name_real): Handle template parameters for member
9125         templates where said parameters have the same name as the
9126         surrounding class.
9128         * decl.c (expand_static_init): Build cleanups before entering the
9129         anonymous function used to do them to avoid access-checking
9130         confusion.
9132         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
9133         accidentally removed by previous change, and make DECL_RTL here.
9134         * class.c (add_method): Don't make DECL_RTL here.
9136         * pt.c (for_each_template_parm): Don't examine uninstantiated
9137         default arguments.
9139 1998-10-16  Dave Brolley  <brolley@cygnus.com>
9141         * lex.c (real_yylex): Fix unaligned access of wchar_t.
9143 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
9145         * class.c (add_method): Fix documentation to reflect previous
9146         changes.  Check for duplicate method declarations here.
9147         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
9148         correctly; such things never match.
9149         (grokfndecl): Don't look for duplicate methods here.
9150         * decl2.c (check_classfn): Don't assume names are mangled.
9151         Don't add bogus member function declarations to a class before the
9152         class type is complete.
9153         (grokfield): Reformat error message.
9154         * method.c (set_mangled_name_for_decl): Don't mangle names while
9155         processing_template_decl.
9157 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
9159         * typeck.c (build_indirect_ref): Complain about a pointer to data
9160         member, too.
9161         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
9162         data member.
9163         * init.c (resolve_offset_ref): Don't undo the above.
9165         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
9166         (struct lang_decl_flags): Add `bitfield'.
9167         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
9168         DECL_BIT_FIELD.
9169         * decl2.c (grokbitfield, grok_alignof): Likewise.
9170         * init.c (build_offset_ref): Likewise.
9171         * typeck.c (build_component_addr, expr_sizeof): Likewise.
9172         * cvt.c (build_up_reference): Don't crash if taking the address
9173         returns error_mark_node.
9175         * decl.c (grokfndecl): Also check ctype when checking for ::main().
9177 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
9179         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
9180         Do mangling here.
9181         (grokdeclarator): Instead of here.
9182         * friend.c (do_friend): Lose special handling of ::main and
9183         __builtin_*.
9184         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
9186         * spew.c (yylex): Clear looking_for_typename if we got
9187         'enum { ... };'.
9189 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
9191         * class.c (maybe_warn_about_overly_private_class): Improve error
9192         messages for class with only private constructors.
9194         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
9195         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
9196         (build_typename_type): New function.
9197         * decl.c (build_typename_type): Broken out from ...
9198         (make_typename_type): Use it.
9199         * search.c (lookup_field): Likewise.
9201 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
9203         * pt.c (convert_nontype_argument): Check against type_referred_to.
9204         * decl.c (grokvardecl): Check for declarator name before building
9205         DECL_ASSEMBLER_NAME.
9207 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
9209         * pt.c (lookup_template_class): Add comment.
9210         (instantiate_class_template): Don't mark the _TYPE node for
9211         member class templates as an instantiation.
9213 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
9215         * decl.c (grokfndecl): Fix my thinko.
9217 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
9219         * tinfo2.cc (fast_compare): Remove.
9220         (before): Just use strcmp.
9221         * tinfo.cc (operator==): Just use strcmp.
9223 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
9225         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
9226         declarations.
9228 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
9230         * cp-tree.h (specializations_of_same_template_p): Remove.
9231         * search.c (get_template_base): Don't use it.
9232         (get_template_base_recursive): Likewise.
9233         * pt.c (specializations_of_same_template_p): Remove.
9234         (unify): Don't use it.
9235         (lookup_template_class): Find the correct parent when setting
9236         CLASSTYPE_TI_TEMPLATE.
9238 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
9240         * tinfo.cc (operator==): Always compare names.
9242 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
9244         * decl.c (start_function): Fix cut-and-paste error.
9246 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
9248         * inc/typeinfo: Add #pragma interface.
9249         (operator!=): Just call operator==.
9250         * tinfo.cc: Add #pragma implementation.
9251         (operator==): Move from inc/typeinfo and tinfo2.cc.
9252         Check __COMMON_UNRELIABLE instead of _WIN32.
9254         * typeck2.c (my_friendly_abort): Add URL.
9256 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
9258         * decl.c (start_method): Added extra parameter for attributes.
9259         * cp-tree.h (start_method): Update prototype.
9260         * parse.y (fn.def2): Update start_method parameter list.
9262 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
9264         * cp-tree.h (specializations_of_same_template_p): Declare.
9265         * pt.c (specializations_of_same_template_p): New function.
9266         (unify): Use it.
9267         * search.c (get_template_base): Use it.
9268         (get_template_base_recursive): Likewise.
9270 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
9272         * decl2.c (start_objects): Add new variable `joiner' and
9273         initialize it properly.
9275 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
9277         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
9278         change to vtable types.
9280         * cvt.c (ocp_convert): Avoid infinite recursion caused by
9281         1998-10-03 change.
9283 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
9285         * pt.c (resolve_overloaded_unification): New fn.
9286         (try_one_overload): Likewise.
9287         (unify): Don't fail on unknown type.
9288         (type_unification_real): Likewise.  Use resolve_overloaded_unification
9289         to handle an overloaded argument.
9290         (template_args_equal): Split out...
9291         (comp_template_args): From here.
9292         (determine_specialization): Also allow a template with more
9293         parms than were explicitly specified.
9294         * cp-tree.h: Add template_args_equal.
9295         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
9297 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
9299         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
9300         change.
9302 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
9304         * typeck.c (unsigned_type): Only return TItype nodes when
9305         HOST_BITS_PER_WIDE_INT is >= 64 bits.
9306         (signed_type): Likewise.
9307         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
9308         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
9309         (init_decl_processing): Only create TItype nodes when
9310         HOST_BITS_PER_WIDE_INT is >= 64 bits.
9311         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
9312         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
9314 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9316         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
9317         (gxx.gperf): Update comments describing invocation flags.
9318         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
9320 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
9322         * class.c (finish_struct_1): Add commentary on previous change.
9324         * cp-tree.h (vtbl_ptr_type_node): New variable.
9325         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
9326         already of the right type.
9327         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
9328         Simplify code to grow vtable.
9329         * decl.c (vtbl_ptr_type_node): Define.
9330         (init_decl_processing): Initialize it.
9332 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
9334         * cp-tree.def (PTRMEM_CST): New tree node.
9335         * cp-tree.h (ptrmem_cst): New type.
9336         (lang_type): Remove local_typedecls.
9337         (dummy): Increase to 12 bits from 11.
9338         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
9339         (PTRMEM_CST_CLASS): New macro.
9340         (PTRMEM_CST_MEMBER): Likewise.
9341         (current_access_specifier): New variable.
9342         (current_class_type): Remove duplicate declaration.
9343         (finish_struct): Change prototype.
9344         (unreverse_member_declarations): New function.
9345         (pushdecl_class_level): Change prototype.
9346         (grok_enum_decls): Remove.
9347         (fixup_anonymous_union): New function.
9348         (grok_x_components): Change prototype.
9349         (tsubst_chain): Remove.
9350         (finish_member_template_decl): Likewise.
9351         (check_explicit_specialization): Fix indentation.
9352         (finish_class_definition): Change prototype.
9353         (finish_member_class_template): Likewise.
9354         (finish_member_declaration): New function.
9355         (check_multiple_declarators): Likewise.
9356         * class.c (class_stack_node_t): New type.
9357         (current_class_base): Remove.
9358         (current_class_stack): Change type.
9359         (current_access_specifier): New variable.
9360         (grow_method): Remove.
9361         (check_member_decl_is_same_in_complete_scope): Break out from
9362         finish_struct.
9363         (make_method_vec): New function.
9364         (free_method_vec): Likewise.
9365         (add_implicitly_declared_members): Break out from finish_struct_1.
9366         (free_method_vecs): New variable.
9367         (add_method): Rework for direct use from parser.
9368         (handle_using_decl): Watch for NULL_TREE while iterating through
9369         CLASSTYPE_METHOD_VEC.
9370         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
9371         just do some error-checking.
9372         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
9373         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
9374         (finish_struct): Change prototype.  Simplify; fields and methods
9375         are already set up at this point.
9376         (init_class_processing): Set up current_class_stack.
9377         (pushclass): Save current_access_specifier.
9378         (popclass): Restore it.
9379         (currently_open_class): Simplify.
9380         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
9381         * decl.c (saved_scope): Add access_specifier.
9382         (maybe_push_to_top_level): Save it.
9383         (pop_from_top_level): Restore it.
9384         (maybe_process_template_type_declaration): Use
9385         finish_member_declaration.
9386         (pushtag): Likewise.
9387         (pushdecl_class_level): Don't return a value.
9388         (fixup_anonymous_union): Break out from grok_x_components.
9389         (shadow_tag): Use it.
9390         (xref_tag): Complain about using an elaborated type specifier to
9391         reference a template type parameter or typedef name.
9392         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
9393         (current_local_enum): Remove.
9394         (build_enumerator): Call finish_member_declaration.
9395         (grok_enum_decls): Remove.
9396         * decl2.c (grok_x_components): Simplify.
9397         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
9398         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
9399         (merge_functions): Add to comment.
9400         (arg_assoc_type): Prototype.
9401         (arg_assoc): Pass as many arguments as there are parameters.
9402         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
9403         OFFSET_REF.
9404         * expr.c (cpls_expand_expr): Remove dead code.  Handle
9405         PTRMEM_CST.
9406         * friend.c (do_friend): Lookup friends when in nested classes.
9407         Change comments.
9408         * init.c (build_offset_ref): Do lookup even for classes that are
9409         only partially defined.
9410         (decl_constant_value): Remove dead code.
9411         * method.c (build_overload_value): Remove hack where by TYPE was
9412         not a TYPE.  Handle PTRMEM_CST.
9413         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
9414         should go.
9415         * parse.y (components, notype_components, component_decl,
9416         component_decl_1, component_declarator, component_declarator0):
9417         Now all are itype rather than ttype.  Rework to add members to
9418         classes on the fly.
9419         (typesqpecqual_reserved): Use check_multiple_declarators.
9420         (structsp): Update class to finish_class_definition.
9421         (do_xref_defn): Unsplit into named_class_head.
9422         (access_specifier): Set current_access_specifier.
9423         * pt.c (set_current_access_from_decl): New function.
9424         (finish_member_template_decl): Don't take the parameters.
9425         (comp_template_args): Make more robust.
9426         (lookup_template_class): Don't use current_local_enum.
9427         (for_each_template_parm): Handle PTRMEM_CST.
9428         (instantiate_class_template): Use set_current_access_from_decl,
9429         finish_member_declaration and unreverse_member_declarations.  Set
9430         lineno/input_filename before generating implicit member functions.
9431         (type_unification_real): Don't assume back-unification happens
9432         only for the last argument.
9433         (regenerate_decl_from_template): Call pushclass a bit earlier.
9434         (tsubst_chain): Remove.
9435         (tsubst_enum): Use set_current_access_from_decl.
9436         (set_mangled_name_for_template_decl): Fix indentation.
9437         * search.c (lookup_fnfields_1): Change iteration through
9438         CLASSTYPE_METHOD_VEC.
9439         (dfs_pushdecls): Likewise.
9440         (dfs_compress_decls): Likewise.
9441         (add_conversions): Likewise.
9442         * semantics.c (finish_class_definition): Don't take components.
9443         Change call to finish_struct.
9444         (finish_member_declaration): New function.
9445         (finish_member_class_template): Don't take template parameters.
9446         Change call to grok_x_components.  Call finish_member_template_decl.
9447         (check_multiple_declarators): New function.
9448         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
9449         a passed in fieldlist.
9450         * tree.c (search_tree): Handle PTRMEM_CST.
9451         (mapcar): Likewise.
9452         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
9453         INTEGER_CSTs, for pointer-to-data members.
9455         * call.c (resolve_args): Resolve template specializations, if
9456         possible.
9458 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9460         * Makefile.in (spew.o): Depend on toplev.h.
9462         * call.c (compare_ics): Initialize variables `deref_from_type2',
9463         `deref_to_type1' and `deref_to_type2'.
9465         * except.c (get_eh_type): Hide prototype and definition.
9466         (process_start_catch_block_old): Remove unused static prototype.
9468         * pt.c (tsubst_decl): Initialize variable `argvec'.
9470         * spew.c: Include toplev.h.
9472 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
9474         * pt.c (instantiate_decl): Do save and restore file position.
9476 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9478         * method.c (build_decl_overload_real): Clear
9479         numeric_output_need_bar after __.
9481 1998-10-05  Nathan Sidwell  <nathan@acm.org>
9483         * call.c (build_new_method_call): Issue 'incomplete type' error,
9484         if class is not defined.
9486 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9488         * call.c (build_object_call): Move declaration of variable
9489         `fn' into the scope where it is used.  Don't access variable
9490         `fn' when it is uninitialized, instead use `fns'.
9492 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
9494         * errfn.c (cp_thing): Print buf as a string not as a printf format
9495         to avoid problems with the operator%.  Consequently, `%%' sequences
9496         in format are copied as `%' in buf.
9498 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
9500         * pt.c (pop_tinst_level): Call extract_interface_info.
9501         (instantiate_decl): Don't save and restore file position.
9503         * decl.c (cp_finish_decl): Make statics in extern inlines and
9504         templates common, if possible and the target doesn't support weak
9505         symbols.
9507         * decl.c (grokdeclarator): Remove redundant calls to
9508         build_type_variant and some duplicated code.
9509         * sig.c (build_signature_reference_type): Only take the type parm.
9510         (build_signature_pointer_type): Likewise.
9511         * tree.c (build_cplus_method_type): Adjust.
9512         * cp-tree.h: Update.
9514 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
9516         * call.c (build_over_call): Make pedwarns about dropped qualifiers
9517         into full-fledged errors.
9518         * cvt.c (convert_to_reference): Likewise.
9519         * typeck.c (convert_for_assignment): Likewise.
9521         * search.c (expand_upcast_vtables): In addition to unsetting
9522         TREE_READONLY, remove top-level const type qualifier.
9524 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
9526         * class.c (current_class_ptr, current_class_ref): Clarify
9527         documentation.
9528         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
9529         NOP type conversions.
9530         * decl.c (decls_match): Use comptypes directly; ignore
9531         qualifiers on the DECL.
9532         (duplicate_decls): Remove qualifier checks on DECL.
9533         (grokdeclarator): Make the type built up include top-level
9534         qualifiers.
9535         * decl2.c (do_dtors): Fix spelling error.
9536         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
9537         when printing type information.
9538         * init.c (build_new_1): Add documentation.  Deal with the fact
9539         that type of allocated memory now contains qualifiers.
9540         * lex.c (is_global): Improve error-recovery.
9541         * sig.c (build_member_function_pointer): Don't cast away const
9542         on fields of sigtable_entry_type.
9543         * tree.c (lvalue_type): Don't look at top-level qualifiers on
9544         expressions.
9545         * typeck.c (decay_conversion): Likewise.
9546         (build_component_ref): Make sure the type of the COMPONENT_REF
9547         contains top-level qualifiers, as appropriate.  Improve
9548         error-handling.
9549         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
9550         (build_array_ref): Likewise.
9551         (build_unary_op): Improve error-recovery.
9552         (unary_complex_lvalue): Make taking the address a bound member
9553         function an error, not a sorry.
9554         (build_conditional_expr): Look at the type qualifiers, not the
9555         qualifiers on the expression itself.
9557 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
9559         * decl2.c (merge_functions): Remove duplicates.
9561         * decl2.c: Add -f{no-,}implicit-inline-templates.
9562         (import_export_decl): Check it.
9564         * decl.c (lookup_name_real): Template parms also take precedence
9565         over implicit typename.  Only warn if yylex.
9567         * typeck.c (build_conditional_expr): Only fold if ifexp is an
9568         INTEGER_CST.
9570         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
9571         instead of linkage.
9573 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
9575         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
9576         * class.c (build_vbase_pointer): Use it.
9577         * rtti.c (expand_class_desc): Likewise.
9578         * tree.c (build_vbase_pointer_fields): Likewise.
9580 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
9582         * decl.c (start_decl): Add invocation of
9583         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
9584         (start_function): Add invocation of
9585         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
9587         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
9588         HANDLE_GENERIC_PRAGMAS.
9590 1998-09-28  Anthony Green  <green@cygnus.com>
9592         * semantics.c (finish_asm_stmt): Always permit volatile asms.
9594 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
9596         * decl.c (grokdeclarator): Tighten checks for invalid
9597         destructors.  Improve error-messages and error-recovery.
9598         * decl2.c (check_classfn): Don't assume that mangled destructor
9599         names contain type information.
9601 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
9603         * search.c (get_base_distance): Remove assert.
9605         * decl2.c (build_anon_union_vars): Don't process a field with no
9606         name.
9607         (finish_anon_union): Also complain about local anon unions with no
9608         members.
9610 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9612         * decl.c (lookup_namespace_name): If the name is a namespace,
9613         return it immediately.
9615 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9617         * cp-tree.h (define_case_label): Remove unused parameter.
9618         (check_java_method): Likewise.
9619         (grokclassfn): Likewise.
9620         (expand_aggr_init): Likewise.
9621         (build_x_delete): Likewise.
9622         (maybe_end_member_template_processing): Likewise.
9623         (unshare_base_binfos): Add prototype.
9624         (string_conv_p): Likewise.
9625         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
9627         * cvt.c (build_up_reference): Remove unused parameter
9628         `checkconst', all callers changed.
9629         (build_type_conversion): Mark parameter `code' with
9630         ATTRIBUTE_UNUSED.
9631         (build_expr_type_conversion): Initialize variable `conv'.
9633         * decl.c (push_namespace): Initialize variable `d'.
9634         (define_case_label): Remove unused parameter `decl', all callers
9635         changed.
9637         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
9638         `argc' with ATTRIBUTE_UNUSED.
9639         (grokclassfn): Remove unused parameter `cname', all callers
9640         changed.
9641         (check_java_method): Likewise for parameter `ctype'.
9642         (copy_assignment_arg_p): Mark parameter `virtualp' with
9643         ATTRIBUTE_UNUSED.
9644         (finish_prevtable_vardecl): Likewise for parameter `prev'.
9646         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
9648         * init.c (expand_aggr_init_1): Remove unused parameter
9649         `alias_this', all callers changed.
9650         (expand_aggr_init): Likewise.
9651         (expand_default_init): Likewise.
9652         (build_new_1): Initialize variable `susp'.
9653         (build_x_delete): Remove unused parameter `type', all callers
9654         changed.
9656         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
9657         ATTRIBUTE_UNUSED.
9658         (readescape): Use (unsigned) value in shift.
9659         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
9660         comparing to a signed quantity.
9662         * pt.c (maybe_end_member_template_processing): Remove unused
9663         parameter `decl', all callers changed.
9664         (check_explicit_specialization): Add braces around empty body in
9665         an else-statement.
9666         (current_template_args): Initialize variable `args'.
9667         (lookup_template_class): Likewise for variable `prev_local_enum'.
9668         (tsubst_decl): Likewise for variable `r'.
9669         (set_mangled_name_for_template_decl): Initialize variable
9670         `context'.
9672         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
9673         Likewise for variable `i'.
9674         (yylex): Initialize variable `trrr'.
9676         * typeck.c (compparms): Mark variable `strict' with
9677         ATTRIBUTE_UNUSED.
9679         * xref.c (simplify_type): Cast argument of ctype function to
9680         `unsigned char'.
9682 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
9684         * cp-tree.h (language_lvalue_valid): Remove.
9685         * decl.c (grokdeclarator): Don't disallow references to functions.
9686         * tree.c (lvalue_p_1): New function, combining duplicated
9687         code from ...
9688         (lvalue_p): Use it.
9689         (real_lvalue_p): Likewise.
9690         * typeck.c (language_lvalue_valid): Remove.
9691         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
9692         they don't have TREE_READONLY set.
9693         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
9695 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9697         * spew.c (yylex): Give diagnostic.
9698         * hash.h (is_reserved_word): Add export.
9699         * gxx.gperf: Likewise.
9700         * lex.h (rid): Add RID_EXPORT.
9701         * lex.c (init_parse): Likewise.
9703 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
9705         * friend.c (do_friend): Make warning a full sentence.
9707 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
9709         * parse.y (component_decl_list): Improve error-recovery.
9711 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9713         * decl.c (make_typename_type): Move error to point where name
9714         variable can be used by dump_type.
9716 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
9718         * decl.c (grokfndecl): Improve error-recovery.
9719         * decl2.c (grokfield): Likewise.
9720         * pt.c (finish_member_template_decl): Likewise.
9722 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9724         * method.c (hack_identifier): Finding multiple members is always
9725         an error.
9727 1998-09-21  Per Bothner  <bothner@cygnus.com>
9729         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
9731 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
9733         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
9735 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
9737         * class.c (maybe_warn_about_overly_private_class): Reformat.
9739 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
9741         * exception.cc (__cplus_type_matcher): Realign some code.
9743 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
9745         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
9746         (tinfo2.o): Likewise.
9747         (exception.o): Likewise.
9748         (new.o): Likewise.
9749         (opnew.o): Likewise.
9750         (opnewnt.o): Likewise.
9751         (opvnew.o): Likewise.
9752         (opvnewnt.o): Likewise.
9753         (opdel.o): Likewise.
9754         (opdelnt.o): Likewise.
9755         (opvdel.o): Likewise.
9756         (opvdelnt.o): Likewise.
9758 1998-09-16  Richard Henderson  <rth@cygnus.com>
9760         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
9762 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
9764         * call.c (build_field_call): Handle static data members too.
9766         * typeck.c (comptypes): When comparing pointer types, check
9767         whether referred types match even in strictest modes.
9769 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
9771         * cp-tree.h: Revert previous change.
9772         (finish_struct_methods): Remove declaration.
9773         * class.c: Revert previous change.
9774         (maybe_warn_about_overly_private_class): New function.
9775         (finish_struct_methods): Declare here, and make static.  Remove
9776         unnecessary parameters.  Tidy slightly.  Use
9777         maybe_warn_about_overly_private_class.
9778         (finish_struct_1): Adjust.  Remove check for private constructors,
9779         now done elsewhere.
9780         (finish_struct): Adjust.
9782 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
9784         * except.c (expand_start_catch_block): No need to check for new
9785         exception model.
9786         (process_start_catch_block_old): Deleted.
9787         (process_start_catch_block): Add call to start_decl_1().
9788         (expand_end_catch_block): Add call to end_catch_handler().
9789         * exception.cc (__cplus_type_matcher): Only check the exception
9790         language if there is an exception table.
9792 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
9794         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
9795         as used to prevent conflicts with virtual function tables.
9797 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
9799         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
9800         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
9801         * class.c (maybe_class_too_private_p): New function.
9802         (finish_struct_methods): Use it.
9803         (finish_struct_1): Likewise.
9804         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
9805         appropriate.
9807         * pt.c (check_specialization_scope): Fix spelling error.
9808         (check_explicit_specialization): Remove code to handle explicit
9809         specializations in class scope; they are now correctly diagnosed
9810         as errors.
9812 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
9814         * decl.c (pushdecl): Don't copy types if the
9815         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
9816         type.
9818 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
9820         * class.c (get_enclosing_class): New function.
9821         (is_base_of_enclosing_class): Likewise.
9822         * cp-tree.h (get_enclosing_class): Declare.
9823         (is_base_of_enclosing_class): Likewise.
9824         * pt.c (coerce_template_parms): Use them.
9826 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
9828         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
9829         null to decide whether to use it.
9831         * error.c (dump_type_real): Handle NAMESPACE_DECL.
9832         * parse.y (base_class.1): Avoid crash on error.
9834 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9836         * decl.c (make_typename_type): If context is a namespace, the code
9837         is in error.
9839 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
9841         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
9843 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
9845         * cp-tree.h (anonymous_namespace_name): Declare.
9846         * decl.c: Define it.
9847         (push_namespace): Use anonymous_namespace_name, rather than local
9848         static anon_name.
9849         * error.c (dump_decl): If a namespace is named
9850         anonymous_namespace_name, call it {anonymous}.
9852         * decl.c (grokparms): Distinguish between references and pointers
9853         in error message.
9855 1998-09-08  Richard Henderson  <rth@cygnus.com>
9856             Mark Mitchell  <mark@markmitchell.com>
9858         * pt.c (process_partial_specialization): Consistently allocate
9859         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
9860         tpd.parms, where appropriate.
9862 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
9864         * Makefile.in (INCLUDES): Update after recent toplevel gcc
9865         reorganizations.
9867 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
9869         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
9870         * class.c (finish_struct): Remove hackery to deal with explicit
9871         specializations in class scope.
9872         * decl.c (grokfndecl): Improve error-recovery.
9873         * decl2.c (grokfield): Likewise.
9874         * pt.c (check_specialization_scope): New function.
9875         (begin_specialization): Call it.
9876         (process_partial_specialization): New function, split out from
9877         push_template_decl.  Check partial specializations more
9878         stringently.
9879         (push_template_decl): Call it.
9880         (check_explicit_specialization): Don't attempt to handle explicit
9881         specializations in class scope.
9882         (template_parm_data): Document.  Add current_arg and
9883         arg_uses_template_parms.
9884         (mark_template_parm): Set it.
9885         (tsubst_arg_types): Remove unused variable.
9886         * semantics.c (begin_class_definition): Tweak.
9888 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
9890         * inc/typeinfo (type_info::type_info(const char*)): Make
9891         `explicit'.
9893         * cp-tree.h (hash_tree_cons_simple): New macro.
9894         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
9895         (coerce_template_parms): Use make_temp_vec, instead of
9896         make_tree_vec.  Document this behavior.
9897         (lookup_template_class): Likewise.
9898         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
9899         Remove dead code (and add assertion to check its deadness).  Fix
9900         bug w.r.t. exception specifications.
9902 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
9904         * decl2.c (import_export_vtable): Always make artificials comdat.
9905         (import_export_decl): Likewise.
9906         * pt.c (mark_decl_instantiated): Likewise.
9908 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
9910         * cp-tree.h (finish_globally_qualified_member_call_expr):
9911         Rename to ...
9912         (finish_qualified_call_expr).
9913         * semantics.c: Likewise.
9914         * parse.y (primary): Use it.
9915         * method.c (hack_identifier): Remove redundant code.
9917         * init.c (resolve_offset_ref): Call convert_from_reference to
9918         handle members of reference type.  Improve error recovery.
9920 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
9922         * cp-tree.h: Declare warn_nontemplate_friend.
9923         * decl2.c (lang_decode_option): Set.
9924         * lang-options.h: Add -Wnon-template-friend.
9925         * friend.c (do_friend): Use to toggle non-template function warning.
9927 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
9929         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
9930         corresponding INTEGER_CSTs when processing_template_decl.
9931         * pt.c (tsubst_enum): Tweak accordingly.
9933 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
9935         * decl.c (pushdecl_class_level): Add warning here.
9936         (pushdecl): Tweak.
9938 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
9940         * cvt.c (convert_pointer_to_real): Tidy.
9941         * search.c (get_base_distance_recursive): Simplify.
9942         (get_base_distance): Likewise.
9944         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
9945         parms.
9947 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
9949         * lex.c (check_newline):  Call HANDLE_PRAGMA before
9950         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
9951         if unknown pragmas are encountered.
9952         (handle_sysv_pragma): Interpret return code from
9953         handle_pragma_token ().  Return success/failure indication rather
9954         than next unprocessed character.
9955         (pragma_getc): New function: retrieves characters from the
9956         input stream.  Defined when HANDLE_PRAGMA is defined.
9957         (pragma_ungetc): New function: replaces characters back into the
9958         input stream.  Defined when HANDLE_PRAGMA is defined.
9960 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
9962         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
9963         * class.c (build_vtable_entry_ref): Likewise.
9965 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
9967         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
9968         * decl2.c (import_export_decl): Likewise.
9969         * pt.c (instantiate_decl): Use it.
9971 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
9973         * decl.c (lookup_name_real): Also do implicit typename thing for
9974         artificial TYPE_DECLs.
9975         * search.c (lookup_field): Likewise.
9976         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
9977         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
9978         (enter_scope_of): Extract type from implicit typename.
9979         (begin_class_definition): Likewise.
9980         * lex.c (identifier_type): Handle implicit typename when checking
9981         for SELFNAME.
9983         * cp-tree.h: Declare flag_strict_prototype.
9984         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
9985         -fstrict-prototype.
9986         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
9987         specified, set it to the value of pedantic.
9989 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
9991         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
9993 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
9995         * decl.c (finish_enum): Handle member enums of classes declared in
9996         template functions.
9998         * decl2.c (grok_x_components): Strip attributes before calling
9999         groktypename.
10001 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
10003         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
10004         -fenum-int-equivalence and -fno-nonnull-objects.
10005         * class.c (check_for_override): Remove support for -fall-virtual.
10006         (finish_struct_1): Likewise.
10007         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
10008         * typeck.c (build_binary_op_nodefault): Likewise.
10009         * cvt.c (ocp_convert): Likewise.
10010         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
10011         * class.c (build_vbase_path): Likewise.
10013 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
10015         * Makefile.in (INTERFACE): New, set to 1.
10017 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
10019         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
10020         comparing with global_namespace.
10021         (dump_aggr_type): Likewise.
10023         * decl.c (grokfndecl): Issue error on declaration of friend
10024         templates with explicit template arguments.
10026         * pt.c (convert_template_argument): New function, split out
10027         from...
10028         (coerce_template_parms): Here.
10029         (tsubst): Attempt better error-recovery.
10031 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10033         * pt.c (decl_template_parm_p): Add checks for
10034         TEMPLATE_TEMPLATE_PARM.
10036 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
10038         * lex.c (do_identifier): Fix thinko in previous change.
10040 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
10042         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
10043         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
10045 1998-08-28  Richard Henderson  <rth@cygnus.com>
10047         Add support for discarding unused virtual functions.
10048         * lang-options.h: Add -fvtable-gc.
10049         * cp-tree.h: Add flag_vtable_gc.
10050         * decl2.c (output_vtable_inherit): New fn.
10051         (finish_vtable_vardecl): Call it.
10052         * class.c (build_vtable_entry_ref): New fn.
10053         (build_vtbl_ref): Call it.
10055 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
10057         * cp-tree.h (build_enumerator): Take the enumeration type as a
10058         parameter.
10059         * decl.c (finish_enum): Don't set the TREE_TYPE for the
10060         enumeration constant values if we're processing_template_decls.
10061         Don't set the type for the CONST_DECLs either; that's done in
10062         build_enumerator.
10063         (build_enumerator): Take the enumeration type as a
10064         parameter.
10065         * lex.c (do_identifier): Don't resolve enumeration constants while
10066         processing template declarations, even if they happen to be
10067         TEMPLATE_PARM_INDEXs.
10069         * parse.y (current_enum_type): New variable.
10070         (primary): Don't allow statement-expression in local classes just
10071         as we don't in global classes.
10072         (structsp): Use current_enum_type.
10073         (enum_list): Likewise.
10074         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
10075         finish_enum; they no longer occur.
10077         * cp-tree.h (finish_base_specifier): New function.
10078         * parse.y (base_class): Use it.
10079         * semantics.c (finish_base_specifier): Define it.
10081         * parse.y (structsp): Warn on use of typename outside of template
10082         declarations.
10084 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
10086         * lex.c (handle_cp_pragma): Remove #pragma vtable.
10087         * lang-options.h: Remove +e options.
10088         * decl2.c (lang_decode_option): Likewise.
10089         (import_export_vtable): Don't check write_virtuals.
10090         (finish_vtable_vardecl, finish_file): Likewise.
10091         * search.c (dfs_debug_mark): Likewise.
10092         * semantics.c (begin_class_definition): Likewise.
10093         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
10095         * call.c (build_over_call): Check flag_elide_constructors.
10096         * decl2.c: flag_elide_constructors defaults to 1.
10097         * typeck.c (convert_arguments): Remove return_loc parm.
10098         (build_function_call_real): Adjust.
10100         * search.c: Tear out all mi_matrix and memoize code.
10101         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
10102         * lang-options.h: Remove documentation for -fhandle-exceptions,
10103         -fmemoize-lookups and -fsave-memoized.
10104         * cp-tree.h: Lose mi_matrix and memoize support.
10105         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
10106         * class.c: Lose struct class_level.
10107         (pushclass, popclass): Lose memoize support.
10108         * init.c (build_offset_ref): Likewise.
10110         Never change BINFO_INHERITANCE_CHAIN.
10111         * init.c (emit_base_init): Change modification of
10112         BINFO_INHERITANCE_CHAIN to an assert.
10113         * search.c (get_base_distance_recursive): Likewise.
10114         (get_base_distance): Likewise.
10115         (lookup_member): Likewise.
10116         (convert_pointer_to_single_level): Likewise.
10117         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
10118         (lookup_fnfields): Likewise.
10119         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
10120         (unshare_base_binfos): Don't call propagate_binfo_offsets.
10121         (layout_basetypes): Call propagate_binfo_offsets instead of
10122         unshare_base_binfos.
10123         * decl.c (xref_basetypes): Call unshare_base_binfos.
10124         * pt.c (instantiate_class_template): Likewise.
10125         * tree.c (reverse_path): Remove 'copy' parm; always make a
10126         temporary copy.
10127         * class.c (build_vbase_path): Just call it.
10128         * search.c (compute_access): Likewise.  Don't re-reverse.
10130 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
10132         * class.c (build_vbase_path): Use reverse_path.
10133         (finish_base_struct): Move warnings for inaccessible bases to
10134         layout_basetypes.
10135         (modify_one_vtable): Remove check of TREE_USED (binfo).
10136         (fixup_vtable_deltas1): Likewise.
10137         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
10138         (xref_tag): Remove binfos parameter.
10139         (make_binfo): Remove chain parameter.
10140         (reverse_path): Add copy parameter.
10141         * decl.c (init_decl_processing): Change calls to xref_tag.
10142         (xref_tag): Remove binfos parameter.
10143         (xref_basetypes): Change calls to make_binfo.
10144         * decl2.c (grok_x_components): Change calls to xref_tag.
10145         (handle_class_head): Likewise.
10146         * friend.c (do_friend): Likewise.
10147         * lex.c (make_lang_type): Change calls to make_binfo.
10148         * parse.y (structsp): Change calls to xref_tag.
10149         (named_complex_class_head_sans_basetype): Likewise.
10150         (named_class_head): Likewise.
10151         * rtti.c (init_rtti_processing): Likewise.
10152         * search.c (compute_access): Change calls to reverse_path.
10153         (dfs_get_vbase_types): Change calls to make_binfo.
10154         (get_vbase_types): Remove dead code.
10155         * tree.c (unshare_base_binfos): Change calls to make_binfo.
10156         (layout_basetypes): Warn here about inaccessible bases.
10157         (make_binfo): Remove chain parameter.
10158         (reverse_path): Add copy parameter.
10160 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
10162         * class.c: #if 0 complete_type_p.
10163         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
10164         * method.c (process_overload_item): Likewise.
10165         * typeck.c (comp_target_types): Likewise.
10167         Stop sharing binfos for indirect virtual bases.
10168         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
10169         (layout_basetypes): Likewise.
10170         (unshare_base_binfos): Copy vbases, too.
10171         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
10172         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
10173         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
10174         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
10175         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
10176         reference to BINFO_VIA_PUBLIC.
10177         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
10178         (push_class_decls): Use them.
10179         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
10180         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
10182 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
10184         * decl.c (build_enumerator): Set DECL_CONTEXT for the
10185         CONST_DECLs.
10187 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
10189         * cp-tree.h (finish_enum): Change prototype.
10190         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
10191         VALUES parameter.  Don't try to compute mins/maxs if
10192         processing_template_decl.
10193         * parse.y (structsp): Use new calling sequence for finish_enum.
10194         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
10195         (lookup_template_class): Remove unused variables.  Tweak.
10196         Register enums on instantiation list before substituting
10197         enumeration constants.
10198         (tsubst_decl): Remove unused variables.
10199         (regenerate_decl_from_template): Likewise.
10201         * decl.c (duplicate_decls): Don't obliterate the
10202         DECL_TEMPLATE_INFO for a template if we're not replacing it with
10203         anything.
10205         * lex.c (do_identifier): Fix typo in comment.
10207 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10209         * errfn.c: Remove stdarg.h/varargs.h.
10210         * tree.c: Likewise.
10212 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
10214         * pt.c (tsubst_copy): Only do typename overloading on an
10215         IDENTIFIER_NODE that happens to look like a typename if it actually
10216         has a type for us to use.
10218 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
10220         * typeck.c (comp_cv_target_types): Split out...
10221         (comp_target_types): From here.  Don't allow cv-qual changes under
10222         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
10223         (build_ptrmemfunc): Pass 1 to nptrs.
10224         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
10226 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
10228         * search.c (dependent_base_p): Don't compare a binfo to
10229         current_class_type; use the TREE_TYPE of the binfo instead.
10231         * cp-tree.h (CLASS_TYPE_P): Revise definition.
10233 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
10235         * decl.c (duplicate_decls): Don't complain about different
10236         exceptions from an internal decl even if pedantic.
10238         * typeck.c (convert_for_assignment): Converting from pm of vbase
10239         to derived is an error, not a sorry.
10241         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
10242         * class.c (fixed_type_or_null): Rename from
10243         resolves_to_fixed_type_p.  Return the dynamic type of the
10244         expression, if fixed, or null.
10245         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
10246         does not match the static type.
10247         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
10248         resolves_to_fixed_type_p again.
10250 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
10252         * pt.c (tsubst_decl): Move special case code for dealing with
10253         tricky friend templates here from ...
10254         (regenerate_decl_from_template): Here.
10256 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
10258         * decl.c (start_decl): Remove redundant linkage check.
10260 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
10262         * typeck.c (c_expand_return): Handle the case that valtype
10263         is wider than the functions return type.
10265 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
10267         * cp-tree.h (CLASS_TYPE_P): New macro.
10268         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
10269         * pt.c (process_template_parm): Undo previous change.
10271 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
10273         * cp-tree.h: Declare.
10274         * pt.c (decl_template_parm_p): New function.
10275         * decl.c (pushdecl): Check decls for redeclaring template parms.
10276         (xref_tag): Make redeclaration an error, print decl.
10277         * decl2.c (grokfield): Check field_decls for redeclaration as well.
10279 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
10281         * parse.y (primary): Fix up the type of string constants.
10283 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
10285         * typeck.c (convert_for_initialization): Move check for odd uses
10286         of NULL to avoid duplicate warnings.
10288 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
10290         * tree.c (lvalue_type): Fix for arrays.
10291         * typeck.c (string_conv_p): New fn.
10292         (convert_for_assignment): Use it.
10293         (build_unary_op): Use lvalue_type.
10294         * call.c (standard_conversion, convert_like): Use string_conv_p.
10295         (add_function_candidate): Use lvalue_type.
10296         * cvt.c (convert_to_reference): Likewise.
10297         * decl2.c (lang_decode_option): Ignore -traditional.
10298         * decl.c (init_decl_processing): flag_writable_strings inhibits
10299         flag_const_strings.
10301 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
10303         * lang-options.h (lang_options): Add fconst-strings to the list
10304         of valid options.
10305         * decl2.c (lang_f_options, lang_decode_option): Likewise.
10307 1998-08-24  Nathan Sidwell  <nathan@acm.org>
10309         * lex.c (real_yylex): Don't warn about long long constants if
10310         we're allowing long long.
10312 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10314         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
10315         accessing bindings directly.
10317         * search.c (my_tree_cons): Reimplement.
10319         * lang-specs.h: Remove __HONOR_STD.
10320         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
10322 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
10324         * decl.c (grokdeclarator): Complain about in-class initialization
10325         of aggregates and/or references.
10326         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
10327         TEMPLATE_TYPE_PARMs.
10329         * decl2.c (grok_array_decl): Add comment.
10330         (mark_used): Don't instantiate an explicit instantiation.
10331         * friend.c (make_friend_class): Remove bogus comment.  Fix check
10332         for partial specializations.
10333         * pt.c (check_explicit_specialization): Don't
10334         SET_DECL_EXPLICIT_INSTANTIATION here.
10335         (mark_decl_instantiated): Or here.
10336         (do_decl_instantiation): Do it here, instead.  Add checks for
10337         duplicate explicit instantiations, etc.  Tidy.
10338         (do_type_instantiation): Likewise.
10339         (instantiate_decl): Improve comments.  Complain about explicit
10340         instantiations where no definition is available.
10342         * cp-tree.h (ansi_null_node): Remove.
10343         * call.c (build_over_call): Warn about converting NULL to an
10344         arithmetic type.
10345         * cvt.c (build_expr_type_conversion): Likewise.  Use
10346         null_ptr_cst_p instead of expanding it inline.
10347         * decl.c (ansi_null_node): Remove.
10348         (init_decl_processing): Make null_node always have integral type.
10349         * except.c (build_throw): Warn about converting NULL to an
10350         arithmetic type.
10351         * lex.c (init_parse): Remove handling of ansi_null_node.
10352         * pt.c (type_unification_real): Don't convert NULL to void* type.
10353         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
10354         (convert_for_assignment): Warn about converting NULL to an
10355         arithmetic type.
10356         (convert_for_initialization): Likewise.
10358 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
10360         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
10361         * pt.c (coerce_template_parms): Use no_linkage_check.
10362         * decl.c (grokvardecl): Likewise.
10363         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
10365         * method.c (process_overload_item): Remove useless code.
10367 1998-08-20  Per Bothner  <bothner@cygnus.com>
10369         Handle new'ing of Java classes.
10370         * init.c (build_class_classref):  New function.
10371         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
10372         constructor does not return this;  don't need to exception-protect.
10374         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
10375         * decl2.c (acceptable_java_type):  Handle template-derived types.
10377 1998-08-20  Per Bothner  <bothner@cygnus.com>
10379         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
10381 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
10383         * decl.c (duplicate_decls): Always merge the old and new patterns
10384         for templates, regardless of whether or not the new one has
10385         DECL_INITIAL.  Don't throw away specializations.  Merge
10386         DECL_SAVED_TREE.
10387         * pt.c (tsubst_decl): Use the right pattern when calculating the
10388         complete args for a new template instance.
10389         (do_decl_instantiation): Fix typo in comment.
10390         (regenerate_decl_from_template): Deal with tricky friend template
10391         case.
10392         (instantiate_decl): Likewise.
10394 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
10396         * init.c (build_builtin_delete_call): Add missing assemble_external
10397         call.
10399 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
10401         * parse.y (notype_unqualified_id): Also accept ~A<int>.
10403 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
10405         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
10406         arithmetic.
10407         * except.c (build_throw): Warn when NULL is thrown, even with
10408         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
10409         thrown expression.
10411         * cp-tree.h (ansi_null_node): New variable.
10412         * decl.c (ansi_null_node): New variable.
10413         (init_decl_processing): Initialize its type.
10414         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
10415         for null_node in non-ANSI mode.
10416         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
10417         place of null_node to avoid spurious errors.
10419 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
10421         * cp-tree.h (enter_scope_of): New function.
10422         * parse.y (complex_direct_notype_declarator): Use it.
10423         * semantics.c (enter_scope_of): New function.
10425 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
10427         * decl.c (grokparms): No, here.
10429         * decl.c (grokdeclarator): Catch parm with pointer to array of
10430         unknown bound here...
10431         * method.c (process_overload_item): ...not here.
10433         * gxxint.texi: Remove obsolete documentation of overloading code.
10435         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
10436         * class.c (finish_struct_bits): Likewise.
10438         * tree.c (lvalue_type): Fix for arrays.
10439         * typeck.c (build_unary_op): Use lvalue_type.
10440         * call.c (add_function_candidate): Likewise.
10441         * cvt.c (convert_to_reference): Likewise.
10443         * decl2.c (lang_decode_option): Ignore -traditional.
10445         * init.c (build_offset_ref): Don't mess with error_mark_node.
10446         * lex.c (do_scoped_id): Use cp_error.
10448         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
10450 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10452         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
10454 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
10456         * cp-tree.h (set_identifier_local_value): Provide prototype.
10458         * decl2.c (do_namespace_alias): Remove unused variables `binding'
10459         and `old'.
10461 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
10463         * Makefile.in: Rename BBISON to BISON so that it can be properly
10464         inherited from the parent makefile.
10466 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
10468         * lang-options.h: Add -finit-priority.
10469         * decl2.c: Likewise.  Check flag_init_priority instead of
10470         USE_INIT_PRIORITY.
10472         * decl2.c (setup_initp): New fn.
10473         (start_objects, finish_objects, do_ctors): Handle init_priority.
10474         (do_dtors, finish_file): Likewise.
10476 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
10478         * pt.c (tsubst_copy): Hush warning.
10480         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
10482 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
10484         * pt.c (print_template_context): Don't abort when instantiating a
10485         synthesized method.
10487         * decl.c (grokdeclarator): Issue errors on namespace qualified
10488         declarators in parameter lists or in class scope.
10490 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
10492         * pt.c (check_explicit_specialization): Don't abort on bogus
10493         explicit instantiations.
10495 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
10497         * typeck.c (require_complete_type): Use complete_type_or_else.
10498         (complete_type_or_else): Always return NULL_TREE on failure, as
10499         documented.
10501         * pt.c (tsubst_aggr_type): Prototype.
10502         (tsubst_decl): New function, split out from tsubst.  Set
10503         input_filename and lineno as appropriate.
10504         (pop_tinst_level): Restore the file and line number saved in
10505         push_tinst_level.
10506         (instantiate_class_template): Set input_filename and lineno as
10507         appropriate.
10508         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
10509         context for a TYPENAME_TYPE is complete.
10511         * decl2.c (grokbitfield): Issue errors on bitfields declared with
10512         function type.
10513         (do_dtors): As in do_ctors, pretend to be a member of the same
10514         class as a static data member while generating a call to its
10515         destructor.
10517         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
10518         conversions, even in complex virtual base class hierarchies.
10520 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
10522         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
10523         (TYPE_TEMPLATE_INFO): Likewise.
10524         (SET_TYPE_TEMPLATE_INFO): Likewise.
10525         (ENUM_TI_TEMPLATE): Likewise.
10526         (ENUM_TI_ARGS): Likewise.
10527         (lookup_nested_type_by_name): Remove.
10528         * decl.c (maybe_process_template_type_declaration): Handle enums.
10529         (start_enum): Don't check for primary-template enum declarations
10530         here.
10531         (finish_enum): Clean up, document.  Make sure template enum
10532         constants get the correct type.
10533         (build_enumerator): Copy initializers for template enumerations,
10534         too.
10535         (grok_enum_decls): Document.
10536         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
10537         better.  Build LOOKUP_EXPRs for local variables, even if they are
10538         TREE_PERMANENT.
10539         * pt.c (tsubst_enum): Remove field_chain parameter.
10540         (template_class_depth): Include the depth of surrounding function
10541         contexts.
10542         (push_template_decl): Check for primary-template enum declarations
10543         here.  Deal with enumeration templates.
10544         (lookup_template_class): Likewise.
10545         (for_each_template_parm): Likewise.
10546         (instantiate_class_template): Don't call tsubst_enum directly,
10547         call tsubst instead, to instantiate enums.  Deal with all
10548         field_chain issues here, not in tsubst_enum.
10549         (lookup_nested_type_by_name): Remove.
10550         (tsubst_aggr_type): Revise handling of enumeration types.
10551         (tsubst): Likewise.
10552         (tsubst_copy): Likewise.
10553         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
10555 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
10557         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
10558         uses template parameters.
10559         * method.c (build_template_parm_names): Use the full set of
10560         template arguments for tsubst'ing.
10561         (build_overload_identifier): Pass the full set of template
10562         arguments to build_template_parm_names, not just the
10563         innermost_args.
10564         * pt.c (TMPL_ARGS_DEPTH): Define using
10565         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
10566         (NUM_TMPL_ARGS): New macro.
10567         (add_outermost_template_args): Deal with the case where the outer
10568         args will be completely discarded.
10569         (coerce_template_parms): Use the full set of template arguments
10570         for tsubst'ing.  Simplify.  Add some asserts.  Improve
10571         error messages.
10572         (lookup_template_class): Pass the full set of template arguments
10573         to coerce_template_parms.
10574         (tsubst): Add assertion.
10575         (do_type_instantiation): Don't instantiate member template
10576         classes.
10578         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
10579         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
10581 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
10583         * method.c (set_mangled_name_for_decl): Change return type to void.
10585         * decl.c (lookup_name_real): A namespace-level decl takes priority
10586         over implicit typename.  Avoid doing the same lookup twice.
10588         * search.c (dependent_base_p): New fn.
10589         (dfs_pushdecls, dfs_compress_decls): Use it.
10591         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
10592         virtual functions if the type doesn't have any.
10594 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
10596         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
10597         uses template parameters.
10599 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
10601         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
10602         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
10603         * lex.c (do_identifier): Don't use a second argument, or a type,
10604         when building LOOKUP_EXPRs.
10605         (do_identifier): Likewise.
10606         (do_scoped_id): Likewise.
10607         * method.c (hack_identifier): Improve error message.
10608         * pt.c (lookup_template_function): Don't needlessly call
10609         copy_to_permanent or build_min.
10610         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
10611         necessary.
10612         (do_decl_instantiation): Improve error message.
10613         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
10614         (build_min): Copy the type to the permanent obstack, too.
10616 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
10618         * init.c (init_init_processing): Remove BI* handling.
10619         (build_builtin_call): Remove.
10620         (build_builtin_delete_call): New fn.
10621         (build_delete): Use it.
10623 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
10625         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
10626         (maybe_check_template_type): New function.
10627         * decl.c (maybe_process_template_type_declaration): New function,
10628         split out from pushtag  Call maybe_check_template_type.
10629         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
10630         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
10631         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
10632         * pt.c (template_class_depth_real): Generalization of ...
10633         (template_class_depth): Use it.
10634         (register_specialization): Use duplicate_decls for duplicate
10635         declarations of specializations.
10636         (maybe_check_template_type): New function.
10637         (push_template_decl_real): Fix comment.
10638         (convert_nontype_argument): Likewise.
10639         (lookup_template_class): Likewise.  Avoid an infinite loop on
10640         erroneous code.
10641         (tsubst_friend_function): Fix comment.
10642         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
10643         an IDENTIFIER_NODE.
10644         * semantics.c (begin_function_definition): Use
10645         reset_specialization to note that template headers don't apply
10646         directly to declarations after the opening curly for a function.
10648 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
10650         * decl.c (push_overloaded_decl): Use current_namespace instead of
10651         DECL_CONTEXT (decl) to determine where we go.
10653         * decl.c (lookup_name_real): Fix typo.
10655 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
10657         * friend.c (is_friend): Be lenient with member functions to deal
10658         with nested friends.
10660 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
10662         * class.c (finish_struct_1): Convert integer_zero_node to
10663         ssizetype before passing it to set_rtti_entry.
10664         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
10665         of any size to a pointer.
10667 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
10669         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
10670         (build_template_decl_overload): Remove.
10671         (set_mangled_name_for_decl): New function.
10672         (innermost_args): Remove is_spec parameter.
10673         (most_specialized, most_specialized_class): Remove declarations.
10674         (lookup_template_class): Add entering_scope parameter.
10675         (maybe_process_partial_specialization): New function.
10676         (finish_template_decl): Likewise.
10677         (finish_template_type): Likewise.
10678         * class.c (finish_struct): Clean up processing of member template
10679         specializations.
10680         * decl.c (pushtag): Fix formatting.
10681         (lookup_tag): Improve handling of pseudo-global levels.
10682         (make_typename_type): Adjust call to lookup_template_class.
10683         (shadow_tag): Use maybe_process_partial_specialization.
10684         (xref_tag): Improve handling of member friends.
10685         (start_function): Call push_nested_class before
10686         push_template_decl.  Don't call push_template_decl for
10687         specializations.
10688         * decl2.c (grok_x_components): Don't call xref_tag for
10689         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
10690         (grokclassfn): Use set_mangled_name_for_decl.
10691         (arg_assoc_class): Adjust call to innermost_args.
10692         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
10693         * error.c (dump_function_name): Improve printing of template
10694         function names.
10695         * friend.c (is_friend): Don't compare types of decls to determine
10696         friendship, unless flag_guiding_decls.
10697         (make_friend_class): Partial specializations cannot be friends.
10698         (do_friend): Use set_mangled_name_for_decl.  Call
10699         push_template_decl_real instead of push_template_decl.
10700         * method.c (build_decl_overload_real): Remove prototype.  Give it
10701         external linkage.
10702         (build_overload_identififer): Adjust call to innermost_args.
10703         (build_template_decl_overload): Remove.
10704         (set_mangled_name_for_decl): New function.
10705         * parse.y (.finish_template_type): New non-terminal.
10706         (template_def): Use finish_template_decl.  Use template_extdef
10707         instead of extdef.
10708         (template_extdef, template_datadef): New non-terminals, containing
10709         only those rules for things which can be templates.
10710         (datadef): Tidy.
10711         (template_type, self_template_type): Use .finish_template_type.
10712         (named_class_head): Use maybe_process_partial_specialization.
10713         * pt.c (mangle_class_name_for_template): Remove context parameter.
10714         (get_class_bindings): Remove outer_args parameter.
10715         (complete_template_args): Remove.
10716         (add_outermost_template_args): New function.
10717         (register_specialization): Return the specialization.
10718         (unregister_specialization): New function.
10719         (tsubst_template_parms): Likewise.
10720         (most_specialized, most_specialized_class): Prototype here as
10721         static.
10722         (original_template): Rename to most_general_template.
10723         (tsubst_template_parms): New function.
10724         (set_mangled_name_for_template_decl): Likewise.
10725         (TMPL_ARGS_DEPTH): New macro.
10726         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
10727         (TMPL_ARGS_LEVEL): New macro.
10728         (SET_TMPL_ARGS_LEVEL): Likewise.
10729         (TMPL_ARG): Likewise.
10730         (SET_TMPL_ARG): Likewise.
10731         (TMPL_ARGS_DEPTH): Likewise.
10732         (finish_member_template_decl): Use finish_template_decl.
10733         (maybe_process_partial_specialization): New function, split out
10734         from tsubst.
10735         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
10736         (maybe_begin_member_template_processing): Use new macros.
10737         (is_member_template): Likewise.
10738         (is_member_template_class): Likewise.
10739         (add_to_template_args): Likewise.  Deal with multiple levels of
10740         args.
10741         (maybe_process_partial_specialization): New function.
10742         (retrieve_specialization): Add consistency check.
10743         (determine_specialization): Return full argument list.
10744         (check_explicit_specialization): Tweak friend handling.  Use full
10745         argument lists.  Simplify.
10746         (current_template_args): Use new macros.
10747         (push_template_decl_real): Change ill-named mainargs to specargs.
10748         Check that a partial specialization actually specializes at least
10749         one parameter.   Improve friend handling.  Modify for full
10750         template arguments.
10751         (classtype_mangled_name): Don't mangle the names of
10752         specializations.
10753         (lookup_template_class): Add entering_scope parameter.  Use it to
10754         avoid finding a template type when an instantiation is required.
10755         Simplify.  Use full template arguments.
10756         (tsubst_friend_function): Use unregister_specialization.  Use new
10757         macros.  Use full template arguments.
10758         (tsubst_friend_class): Substitute, using tsubst_template_parms,
10759         into the template parameters before passing them to
10760         redeclare_class_template.
10761         (instantiate_class_template): Simplify.  Use full template
10762         arguments.  Adjust calls to get_class_bindings.  Use
10763         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
10764         (innermost_args): Use new macros.
10765         (tsubst_aggr_type): New function, split out from tsubst.
10766         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
10767         conventions for lookup_template_class.  Refine handling of partial
10768         instantiations.   Remove calls to complete_template_args.
10769         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
10770         and set_mangled_name_for_template_decl.
10771         (tsubst_copy): Use tsubst_aggr_type.
10772         (instantiate_template): Use full template arguments.
10773         (more_specialized): Improve formatting.
10774         (more_specialized_class): Adjust calls to get_class_bindings.
10775         (get_bindings_real): Don't call complete_template_args.
10776         (most_specialized): Don't overwrite input; create a new list.
10777         (most_specialized_class): Use most_general_template.
10778         (regenerate_decl_from_template): Use unregister_specialization.
10779         Use full template arguments.
10780         (instantiate_decl): Use full template arguments.
10781         (set_mangled_name_for_template_decl): New function.
10782         * semantics.c (begin_class_definition): Use
10783         maybe_process_partial_specialization.
10784         (finish_member_class_template): New function.
10785         (finish_template_decl): Likewise.
10786         (finish_template_type): Likewise.
10787         (typeck.c): Don't crash after issuing a compiler_error.
10788         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
10790 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
10792         * typeck2.c (build_functional_cast): Handle default-initialization.
10794         * call.c (build_over_call): Pass 1 to popclass.
10796         * parse.y (direct_notype_declarator): Add precedence declaration
10797         to notype_unqualified_id case.
10798         * Makefile.in (EXPECT): Adjust.
10800         * tree.c (ovl_member): Fix for single function in OVL.
10802 1998-07-27  Dave Brolley  <brolley@cygnus.com>
10804         * c-lex.c (yylex): Fix boundary conditions in character literal and
10805         string literal loops.
10807 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
10809         * decl.c (lookup_name_real): OK, do return the from_obj value
10810         unless got_object depends on template parms.
10812         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
10814         * pt.c (coerce_template_parms): Also complain about local enums.
10816         * cp-tree.h: Add prototype for set_identifier_local_value.
10817         * decl.c (set_identifier_local_value_with_scope): Make static,
10818         prototype.
10819         * search.c (covariant_return_p): Likewise.
10820         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
10822         * call.c (build_method_call): Only pull out the type of a destructor
10823         if it's a template type parm.
10824         * decl.c (lookup_name_real): Never return the from_obj value.
10826 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
10828         * except.c (process_start_catch_block_old): Call start_decl_1 for
10829         catch parm.
10830         * decl.c (start_decl_1): Avoid duplicate error.
10832         * init.c (expand_default_init): Only perform the initialization if
10833         it will do something.
10835 1998-07-23  H.J. Lu  (hjl@gnu.org)
10837         * parse.y (base_class): Check for invalid base class.
10839 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
10841         * decl2.c (import_export_template): Fold in...
10842         (import_export_class): ...to here.  Handle dllimport/export.
10844         * class.c (build_vtable): Pass at_eof to import_export_vtable.
10845         (prepare_fresh_vtable): Likewise.
10846         * decl2.c (import_export_class): Split out...
10847         (finish_prevtable_vardecl): From here.
10848         * class.c (finish_struct_1): Call import_export_class if at_eof.
10850         * decl.c (start_function): #if 0 mysterious code I wrote and have
10851         forgotten why.
10852         * rtti.c (get_tinfo_fn): If this is for a class type, set
10853         DECL_CONTEXT.
10855 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
10857         * inc/exception: Change terminate and unexpected to ().
10859         * parse.y (named_class_head_sans_basetype_defn): A
10860         named_class_head_sans_basetype followed by '{' or ':' is a defn.
10862 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
10864         * tree.c (canonical_type_variant): New fn to handle arrays.
10865         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
10866         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
10867         * method.c (process_overload_item): Use build_overload_value for
10868         arrays.
10870 1998-07-20  Dave Brolley  <brolley@cygnus.com>
10872         * lex.c (mbchar.h): #include it.
10873         (GET_ENVIRONMENT): New macro.
10874         (init_parse): Set character set based on LANG environment variable.
10875         (real_yylex): Handle multibyte characters in character literals.
10876         (real_yylex): Handle multibyte characters in string literals.
10878 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
10880         * lex.c (do_identifier): Look for class value even if we don't
10881         have a global value.  Do implicit declaration if parsing is 2.
10882         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
10883         lookup.
10885 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
10887         * decl.c (pushtag): Revert previous change.
10888         * pt.c (lookup_template_class): Don't put out debugging
10889         information for types that use template parameters.
10891         * decl.c (pushtag): Don't put out debugging information for
10892         compiler-generated typedefs.
10894         * error.c (dump_type_real): Don't crash when presented with
10895         intQI_type_node or the like.
10897         * semantics.c (finish_translation_unit): Fix spelling error in
10898         comment.
10900 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
10902         * decl.c (lookup_name_real): Pull out single function here.
10903         (select_decl): Not here.
10904         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
10906         * decl.c (qualify_lookup): Tweak again.
10908         * pt.c (lookup_template_class): Don't mess with the context of the
10909         instantiation.
10910         * decl2.c (current_decl_namespace): Remove special handling for
10911         templates.
10913         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
10914         a member template specialization.
10916         * tree.c (ovl_member): Use decls_match to compare functions.
10917         * decl.c (decls_match): Check the context of a function.
10919         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
10920         in Koenig lookup support rules.
10921         * semantics.c (finish_call_expr): Handle the new cases.
10923         * typeck.c (build_x_function_call): Handle overloaded methods.
10925         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
10927 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
10929         * semantics.c (finish_object_call_expr): Revert previous change.
10930         * call.c (build_new_method_call): Likewise.  Instead, convert
10931         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
10933 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
10935         * decl.c (qualify_lookup): Handle templates.
10937         * decl2.c (do_using_directive): Don't pass ancestor.
10938         * decl.c (push_using_directive): Calculate ancestor.
10940         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
10941         * decl.c (pushdecl): Move type shadowing handling from here...
10942         (duplicate_decls): ...to here.
10943         * decl.c (set_identifier_local_value_with_scope): New fn.
10944         (pushdecl): Use it.
10945         (set_identifier_local_value, lookup_type_current_level): New fns.
10946         * decl2.c (do_local_using_decl): Handle types and binding level
10947         stuff properly.
10949         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
10950         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
10951         (lookup_namespace_name): Likewise.
10952         * typeck.c (build_unary_op): Not here anymore.
10954         * decl2.c (do_class_using_decl): Make sure we get an identifier.
10955         * class.c (handle_using_decl): Ignore TYPE_DECLs.
10957         * decl.c (qualify_lookup): New fn.
10958         (lookup_name_real): Use it.
10960 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
10962         * decl2.c (add_using_namespace): When directly using a namespace
10963         that was indirect before, promote it.
10965         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
10966         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
10967         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
10968         * decl.c (select_decl): Replace two flag parameters by one.
10969         (unqualified_namespace_lookup): Likewise, pass flag.
10970         (lookup_flags): New function.
10971         (lookup_name_real): Compute flags, pass them.
10972         (lookup_namespace_name): Call with zero-flag.
10973         * decl2.c (ambiguous_decl): Add flag parameter, complain only
10974         according to flags.
10975         (lookup_using_namespace, qualified_lookup_using_namespace):
10976         Add flag parameter, pass them through.
10977         * lex.c (do_scoped_id): Call with zero-flag.
10979 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
10981         * typeck.c (convert_for_assignment): Use comptypes.
10983 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
10985         * semantics.c (finish_object_call_expr): Move test for the
10986         function called being a TYPE_DECL to ...
10987         * call.c (build_new_method_call): Here.
10989 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
10991         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
10992         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
10994         * lex.c (looking_for_typename): Don't initialize.
10996         * decl2.c (ambiguous_decl): Clarify error message.
10998         * decl.c (push_using_directive): Iterate over namespaces used
10999         indirectly.
11001 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11003         * decl2.c (add_using_namespace): Iterate over namespaces used
11004         indirectly.
11006         * decl.c (lookup_name_real): Accept namespace aliases as locals.
11007         (cat_namespace_levels): Ignore aliases.
11008         (duplicate_decls): Ignore duplicate aliases.
11009         * decl2.c (do_namespace_alias): Process block level namespace
11010         aliases.  Store alias with pushdecl.  Remove odr errors.
11011         * parse.y (namespace_alias): New non-terminal.
11012         (extdef): Use it.
11014 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
11016         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
11017         Handle TEMPLATE_TYPE_PARM.
11018         (arg_assoc): Rewrite.
11020         * pt.c (complete_template_args): Don't look at the context unless
11021         we have to.
11023         * method.c (build_decl_overload_real): Fix namespace handling.
11025         * typeck.c (build_unary_op): Extract a lone function from an
11026         OVERLOAD.
11028         * call.c (build_scoped_method_call): Handle getting a namespace
11029         for basetype in a destructor call.
11030         (check_dtor_name): Handle enums.
11032         * parse.y (using_directive): New nonterminal.
11033         (extdef, simple_stmt): Use it.
11035 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11037         * decl2.c (add_function): Move error message ...
11038         (arg_assoc_namespace): ... from here.
11040 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
11042         * parse.y (namespace_qualifier): Fix multiple level handling.
11043         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
11044         (arg_assoc): Don't skip the first argument of a function.
11046 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
11048         * search.c (my_tree_cons): Clean up.
11050 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
11052         * call.c (joust): Don't warn about "confusing" conversions to the
11053         same type.
11055 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11057         * class.c (push_nested_class): Complain about namespaces.
11058         * decl.c (start_decl): Enter the object's namespace.
11059         (cp_finish_decl): Leave it.
11060         (grokdeclarator): Likewise.
11061         * decl2.c (check_decl_namespace): New function.
11062         (finish_file): Call it.
11063         * parse.y (complex_direct_notype_declarator): Set complexity
11064         of namespace-qualified ids to -1, enter the namespace.
11066         * method.c (build_template_decl_overload): Expect _DECL as first
11067         parameter.  Put context temporarily into current_namespace.
11068         * pt.c (check_explicit_specialization): Change caller.
11069         (tsubst): Likewise.
11071         * init.c (build_offset_ref): Call mark_used and
11072         convert_from_reference for namespace members.
11074 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11076         * search.c (my_tree_cons): The bitfield is at index 2.
11078 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
11080         * lang-options.h: Format changed to work with new --help support
11081         in gcc/toplev.c
11083 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11085         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
11086         Do Koenig lookup in CALL_EXPR.
11087         (arg_assoc): Handle error_mark.
11088         * lex.c (is_global): New function.
11089         (do_identifier): Expect arguments for Koenig lookup.
11090         * parse.y (primary): Add rules for calls of unqualified function calls.
11091         (do_id): Change call of do_identifier.
11092         * pt.c (finish_stmt_expr): Likewise.
11093         * semantics.c (finish_id_expr): Likewise.
11094         (finish_call_expr): Add integer parameter to indicate
11095         argument-dependent lookup.
11097         * decl.c (struct binding_level): New field using_directives.
11098         (push_using_decl): Not sorry anymore.
11099         (push_using_directive): New function.
11100         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
11101         (unqualified_namespace_lookup): New function, code from ...
11102         (lookup_name_real): ... here.
11103         * decl2.c (lookup_using_namespace): Pass using list instead of
11104         initial scope.
11105         (validate_nonmember_using_decl): New function.
11106         (do_nonmember_using_decl): New function.
11107         (do_toplevel_using_decl): Use them.
11108         (do_local_using_decl): New function.
11109         (do_using_directive): Support block-level directives.
11110         * parse.y (simple_stmt): Support using declarations and
11111         directives.
11112         (namespace_qualifier, namespace_using_decl): New non-terminals.
11114         * xref.c (classname): New function.
11115         (GNU_xref_hier): Change class and base parameters to tree.
11116         * decl.c (xref_baseypes): Change caller.
11117         * friend.c (make_friend_class): Likewise.
11119 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
11121         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
11122         comparison.
11124         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
11125         template template parameter, record its use.
11126         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
11127         its template arguments if exists.
11129         * pt.c (coerce_template_template_parms): New function equivalent
11130         to coerce_template_parms when IS_TMPL_PARM is true.
11131         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
11132         all callers changed.
11134         (coerce_template_parms): Access ARGLIST properly when creating a
11135         new vector.  Only accept implicit TYPE_DECL as valid argument for
11136         a template template parameter when it is a base class of
11137         current_class_type.  Don't display error message when COMPLAIN is
11138         false.
11140 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
11142         * repo.c (get_base_filename): Use file_name_nondirectory.
11143         (open_repo_file): Likewise.
11144         * cp-tree.h (file_name_nondirectory): Add prototype.
11146 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
11148         * friend.c (do_friend): Pull the identifier out of declarator.
11149         Use cp_error and friends.
11150         * decl2.c (qualified_lookup_using_namespace): Fix call to
11151         purpose_member.
11152         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
11153         (grokvardecl): Use DECL_CLASS_SCOPE_P.
11154         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
11155         * class.c (warn_hidden): Fix for OVERLOAD.
11156         From grahams@rcp.co.uk:
11157         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
11158         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
11160 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
11162         * g++.1 (-traditional): Remove duplicated documentation.
11164 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
11166         * method.c (flush_repeats): Add nrepeats parameter.
11167         (issue_nrepeats): Likewise.
11168         (is_back_referenceable_type): New function.  Don't back-reference
11169         TEMPLATE_TYPE_PARMs as well as simple types like integers.
11170         (build_mangled_name_for_type): Likewise.
11171         (build_mangled_name_for_type_with_Gcode): Likewise.
11172         (lasttype): Remove.
11173         (nrepeats): Likewise.
11174         (Nrepeats): Likewise.
11175         (start_squangling): Don't clear the variables removed above.
11176         (end_squangling): Likewise.
11177         (flush_repeats): Tidy.  Use nrepeats parameter rather than
11178         Nrepeats global.
11179         (issue_nrepeats): Likewise, but with nrepeats global.  Use
11180         is_backreferenceable_type.
11181         (build_overload_nested_name): Tidy.  Add comment.  Use
11182         build_mangled_name_for_type.
11183         (build_underscore_int): Comment.
11184         (build_overload_scope_ref): Use build_mangled_name_for_type.
11185         (build_overload_int): Likewise.
11186         (build_template_template_parm_names): Tidy.
11187         (build_template_parm_names): Use build_mangled_name_for_type.
11188         (build_overload_identifier): Add comments.
11189         (build_mangled_name_for_type_with_Gcode): Split out from
11190         build_mangled_name.
11191         (build_mangled_name_for_type): Use it.
11192         (build_mangled_name): Rework to use build_mangled_name_for_type
11193         and to not use global nrepeats/Nrepeats.  Tidy.
11194         (process_modifiers): Tidy.
11195         (check_btype): Use is_backreferenceable_type.  Add comment.
11196         Rename `node' to `type'.
11197         (process_overload_item): Set numeric_output_need_bar here.
11198         Use build_mangled_name_for_type.  Tidy.
11199         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
11200         build_mangled_name_for_type.
11202         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
11203         for TYPE_DECLs.
11205 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
11207         * cp-tree.h (warn_long_long): Define.
11208         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
11209         warning "ANSI C++ does not support `long long'".
11210         * decl2.c (warn_long_long): Define.
11211         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
11213 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
11215         * decl.c (xref_tag): Handle attributes between 'class' and name.
11216         * parse.y (aggr): Likewise.
11217         * semantics.c (finish_class_definition): Likewise.
11218         * Makefile.in (EXPECTED): Adjust.
11220         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
11221         * decl2.c: Define them.
11222         (lang_decode_option): Handle them.
11223         * lang-options.h: Add -foptional-diags.
11224         * class.c (finish_struct): Don't complain about multiple meanings of
11225         name if -fno-optional-diags.
11226         * decl.c (pushdecl_class_level): Likewise.
11227         * lex.c (real_yylex): Check warn_multichar.
11229 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
11231         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
11233         * tree.c (make_binfo): Fix length.
11235 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
11237         * decl2.c (lang_decode_option): Remove warn_template_debugging.
11238         * lang-options.h: Likewise.
11240 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11242         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
11243         (process_start_catch_block): Likewise for variables
11244         `false_label_rtx', `call_rtx' and `return_value_rtx'.
11246 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
11248         * tree.c (build_srcloc): Make sure we allocate this node on the
11249         permanent obstack.
11251 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
11253         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
11254         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
11255         (lang_specific_driver): Only add -lm automatically if need_math is
11256         nonzero.
11258 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
11260         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
11262 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11264         * Makefile.in (EXPR_H): New dependency variable.
11265         (decl2.o): Depend on $(EXPR_H).
11266         (typeck.o): Likewise.
11267         (init.o): Likewise.
11268         (expr.o): Likewise.
11270 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
11272         * decl.c (start_enum): Put local enums on permanent_obstack.
11274 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
11276         * cp-tree.h (c_get_alias_set): Declare.
11277         * decl.c (init_decl_processing): Set lang_get_alias_set.
11279 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
11281         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
11282         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
11283         flag for all function decls which are in the exception table.
11284         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
11285         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
11286         code is emitted for any referenced rtti function.
11288 1998-06-25  Dave Brolley  <brolley@cygnus.com>
11290         * lang-specs.h: Use new | syntax to eliminate
11291         string concatenation.
11293 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
11295         * cp-tree.h (CP_DECL_CONTEXT): New macro.
11296         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
11297         * method.c (build_overload_nested_name): Likewise.
11298         * sig.c (build_signature_pointer_or_reference_type): Don't set
11299         DECL_CONTEXT.
11301 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11303         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
11304         * cp-tree.h (FROB_CONTEXT): New macro.
11305         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
11306         * decl.c (namespace_binding): Replace NULL_TREE with
11307         global_namespace.
11308         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
11309         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
11310         Likewise.
11311         * decl.c (pushtag): Use FROB_CONTEXT.
11312         (pushdecl, make_typename_type, define_function, grokdeclarator):
11313         Likewise.
11314         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
11315         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
11316         Likewise.
11317         * decl2.c (decl_namespace): Return global_namespace if no context.
11318         * method.c (build_overload_nested_name): Expect null as context.
11319         * pt.c (mangle_class_name_for_template): Do nothing for null
11320         contexts.
11321         (lookup_template_class): Allow for null id_context.
11323 1998-06-25  Richard Henderson  <rth@cygnus.com>
11325         * method.c (emit_thunk): Set current_function_is_thunk for the
11326         ASM_OUTPUT_MI_THUNK case as well.
11328 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
11330         * exception.cc (__cplus_type_matcher): Get a match_info pointer
11331         instead of an exception table entry as a parameter.
11333 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
11335         * parse.y (function_try_block): Don't call start_catch_handler.
11336         * except.c (call_eh_info): Remove coerced field from declaration.
11337         (build_eh_type_type_ref): New function to create an address of a
11338         rtti function for the new style exception tables.
11339         (expand_start_catch_block): Split function, this contains the
11340         common part.
11341         (process_start_catch_block_old): New function to perform the rest
11342         of expand_start_catch_block under old style exceptions.
11343         (process_start_catch_block_old): New function to perform the rest
11344         of expand_start_catch_block under new style exceptions.
11345         (expand_end_catch_block): Only pop the false label off the stack under
11346         the old style of exceptions.
11347         * semantics.c (finish_try_block): Don't call start_catch_handler.
11348         * exception.cc (struct cp_eh_info): Add original_value field.
11349         (__cplus_type_matcher): Perform type matching on the original exception
11350         value, and if we have a match, set the current value.
11351         (__cp_push_exception): Set the original exception value.
11353 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
11355         * call.c (joust): Fix confusing conversion warning.
11357         * call.c (build_op_delete_call): Add placement parm.  Check
11358         LOOKUP_SPECULATIVELY.
11359         * cp-tree.h, decl2.c, init.c: Adjust.
11360         * decl.c (finish_function): Use it.
11362         * pt.c (tsubst): Diagnose creating void fields or variables.
11364 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11366         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
11368         * cp-tree.h (check_dtor_name): Add prototype.
11370         * init.c (expand_member_init): Remove unused variables
11371         `ptr_type_node', `parm' and `rval'.
11373         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
11374         in call to fprintf.
11375         (lang_print_xnode): Likewise.
11377         * typeck2.c (enum_name_string): Cast argument to sprintf to long
11378         and use %ld specifier.
11380         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
11381         specifier in call to fprintf.
11382         (GNU_xref_member): Cast argument to sprintf to int.
11384 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
11386         * typeck2.c (pop_init_level): Warn about implicit zero initialization
11387         of struct members.
11389 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11391         * cp-tree.h: Prototype function `check_java_method'.
11393 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
11395         * class.c (finish_struct): Make conflicting use of id a pedwarn.
11396         * decl.c (pushdecl_class_level): Likewise.
11398 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
11400         * pt.c (convert_nontype_argument): Issue an error when presented
11401         with an integer (real) constant that cannot be simplified to an
11402         INT_CST (REAL_CST).
11404         * cp-tree.h (c_get_alias_set): Remove declaration added in
11405         1998-06-13 change that should never have been checked in.
11407 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
11409         * typeck.c (build_binary_op_nodefault): Change % in format strings
11410         to %%.
11412         * decl.c (grokvardecl): Don't build_static_name for decls that
11413         aren't at namespace scope.
11415         * init.c (perform_member_init): Catch default-initialization of
11416         references.
11418 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
11420         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
11422 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
11424         * method.c (hack_identifier): Complain about getting a namespace
11425         or class template.
11426         * typeck.c (decay_conversion): Remove check for namespaces.
11427         * typeck2.c (incomplete_type_error): Likewise.
11428         * parse.y (template_arg): Add PTYPENAME expansion.
11430 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
11432         * decl.c (grokvardecl): Don't build external assembler names for
11433         TYPENAMEs in other namespaces as there is no declarator.
11434         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
11435         info from DECL_CONTEXT if it is NULL.
11437 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
11439         * call.c (check_dtor_name): Split out.
11440         (build_scoped_method_call): Use it.
11441         (build_method_call): Use it.
11442         * init.c (build_offset_ref): Use it.
11444         * typeck.c (build_static_cast): Fix handling of pointers to members.
11446         * decl.c (finish_function): Just return nothing from a constructor.
11447         * typeck.c (c_expand_return): Complain about returning a void
11448         expression from a destructor.
11450 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
11452         * class.c (alter_access): Accept a BINFO explaining how to get
11453         from the entity whose accessed is being altered to the type doing
11454         the altering.
11455         (handle_using_decl): New function containing code split out from ...
11456         (finish_struct_1): Here.
11458         * cp-tree.h (complete_type_or_else): Declare.
11459         * init.c (build_new_1, build_delete): Use it.
11460         * typeck.c (require_complete_type): Use complete_type, rather than
11461         expanding it inline.
11462         (complete_type_or_else): New function.
11463         (build_component_ref): Use it.
11464         (pointer_int_sum): Make sure the type pointed to is complete.
11465         (pointer_diff): Likewise.
11467         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
11468         types.
11470         * search.c (get_matching_virtual): Note that member templates
11471         cannot override virtual functions.
11473 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
11475         * pt.c (check_explicit_specialization): If DECLARATOR turned into
11476         an error_mark_node from lookup_template_function, return the same.
11477         (determine_specialization): Also make sure TEMPLATE_ID isn't an
11478         error_mark_node, before we try to read its operands.
11479         * decl.c (grokdeclarator): If we got an error_mark_node from
11480         check_explicit_specialization, just return it right back.
11482 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
11484         * class.c (instantiate_type): Don't treat template-ids that don't
11485         specify any template arguments as equivalent to ordinary
11486         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
11487         pointer-to-members for member templates.  Tidy slightly.
11488         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
11489         * init.c (build_offset_ref): Handle template-ids like ordinary
11490         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
11491         offset part of the OFFSET_REF.
11492         * typeck.c (build_unary_op): Change check for unknown types to
11493         look for OFFSET_REFs, not SCOPE_REFs.
11495 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
11497         * pt.c (is_member_template_class): New function.
11498         (push_template_decl_real): Use it.
11500 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
11502         * friend.c (do_friend): Add support for nested classes using
11503         member functions of the enclosing class as friends.
11505 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
11507         * call.c (convert_default_arg): Make global, not static.
11508         (convert_arg_for_ellipsis): Split out from ...
11509         (build_over_call): Here.
11510         * cp-tree.h (convert_default_arg); Declare.
11511         (convert_arg_to_ellipsis): Likewise.
11512         (do_member_init): Remove.
11513         * init.c (do_member_init): Remove; this code is dead.
11514         (expand_member_init): Remove much of this code; it is dead.
11515         * typeck.c (convert_arguments): Use convert_default_arg and
11516         convert_arg_for_ellipsis, rather than duplicating here.
11518         * call.c (convert_like): Don't fail silently if
11519         build_user_type_conversion fails.  Always return error_mark_node
11520         for failure.
11522 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
11524         * search.c (covariant_return_p): Complain about ambiguous base.
11526         * typeck.c (build_component_ref): Diagnose ref to nested type.
11528 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
11530         * decl.c (grokparms): Check that INIT isn't an error_mark_node
11531         before giving error about invalid type for default arg.
11533 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
11535         * call.c (build_method_call): Fix thinko.
11537 1998-06-10  Dave Brolley  <brolley@cygnus.com>
11539         * decl2.c (lang_decode_option): New argc/argv interface.
11540         * cp-tree.h (lang_decode_option): New argc/argv interface.
11541         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
11542         specified for cpplib-enabled compilers.
11543         * lex.c (lang_init): Don't check_newline for cpplib.
11544         (init_parse): Don't initialize cpplib here.
11546 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
11548         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
11549         piece before checking DECL_MUTABLE_P.
11551 1998-06-10  John Carr  <jfc@mit.edu>
11553         * tree.c (debug_binfo): Make printf format match arguments.
11555         * error.c (OB_PUTI): Make printf format match arguments.
11557 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
11559         * init.c (perform_member_init): Handle default-initialization.
11561         * except.c (build_throw): Handle throwing NULL.
11563         * typeck.c (build_x_function_call): Use resolve_offset_ref.
11565         * search.c (compute_access): Only strip an anonymous union
11566         for a FIELD_DECL.
11568         * call.c (add_builtin_candidates): Tweak.
11570         * cvt.c (build_expr_type_conversion): Restore code for conversion
11571         from class types.
11572         * decl2.c (delete_sanity): Use it.  Clean up.
11574         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
11576 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
11578         * typeck.c (c_expand_return): Don't warn about void expressions on
11579         return statements in functions returning void.
11581 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
11583         * pt.c (fn_type_unification): Revise documentation.  Tidy.
11584         (type_unification): Likewise.
11586 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
11588         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
11589         expand_end_catch.
11590         * parse.y (function_try_block): Rename expand_start_catch, and delete
11591         expand_end_catch.
11592         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
11593         expand_end_catch.
11595 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
11597         * search.c (lookup_member): New fn.
11598         * class.c (finish_struct_1): Use it.
11599         * decl.c (lookup_name_real): Use it.
11601 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11603         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
11605         * cp-tree.h: Add prototype for `maybe_print_template_context' and
11606         `maybe_make_one_only'.
11608         * decl.c (auto_function): Remove unused variable `decl'.
11610         * decl2.c: Include dwarf2out.h and dwarfout.h.
11612         * lex.c: Remove redundant declarations of `set_float_handler' and
11613         `asm_out_file'.
11615 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
11617         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
11618         time flag.  Call __cp_eh_info instead of __cp_exception_info.
11619         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
11620         (__cp_exception_info): Return offset into cp_eh_info structure to
11621         match what use to be the start of this structure.
11622         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
11623         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
11624         compile time flag.
11625         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
11626         __cp_eh_info instead of __cp_exception_info.
11628 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
11630         * decl.c (cp_finish_decl): Disable inlining of extern inlines
11631         with static variables.
11633 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
11635         * init.c (build_offset_ref): Correct previous change to use build,
11636         not build_min.
11638 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
11640         * class.c (instantiate_type): Handle pointer-to-members where the
11641         member is a template.
11642         * init.c (build_offset_ref): Likewise.
11643         * typeck.c (build_unary_op): Likewise.
11645 1998-06-07  Richard Henderson  <rth@cygnus.com>
11647         * lex.c (lang_init_options): New function.
11648         (lang_init): Remove flag_exceptions == 2 hack.
11650 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
11652         * search.c (envelope_add_decl): Tweak for implicit typename.
11654         * call.c (joust): Also warn about confusing conversion op/constructor
11655         overload resolution.
11657         * spew.c (yylex): Also return the TYPE_DECL if got_object.
11658         Don't clear got_object after '~'.
11659         * call.c (build_scoped_method_call): Tweak destructor handling.
11660         (build_method_call): Likewise.
11661         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
11662         TYPE_MAIN_VARIANT for destructors.
11663         * semantics.c (finish_object_call_expr): Complain about calling a
11664         TYPE_DECL.
11666 1998-06-05  Per Bothner  <bothner@cygnus.com>
11668         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
11669         Define - update needed by gcc.c change.
11671 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
11673         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
11675 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
11677         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
11678         * decl.c (lookup_name_real): Add namespaces_only parameter.
11679         If set, return only NAMESPACE_DECLs.
11680         (select_decl): Likewise.
11681         (identifier_type_value): Give additional parameter.
11682         (lookup_name_nonclass): Likewise.
11683         (lookup_name): Likewise.
11684         (find_binding): Skip namespace aliases.
11685         (binding_for_name): Likewise.
11686         (push_namespace): Check for namespace aliases.
11687         (lookup_name_namespace_only): New function.
11688         (begin_only_namespace_names, end_only_namespace_names): New functions.
11689         * decl2.c (set_decl_namespace): Skip namespace aliases.
11690         (do_using_directive): Likewise.
11691         (do_namespace_alias): Produce namespace aliases, fix alias
11692         redeclaration.
11693         * error.c (dump_decl): Support SCOPE_REF.
11694         * parse.y (extdef): Wrap lookup with namespace_only for namespace
11695         aliases and using declarations.
11697 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
11699         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
11701         * error.c (dump_expr): Clean up NEW_EXPR case.
11703 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11705         Suggested by Brendan Kehoe
11706         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
11707         treat it as using ::decl.
11709         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
11711         * tree.c (mapcar): Support NEW_EXPR.
11713         * error.c (dump_expr): Support NEW_EXPR.
11715 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
11717         * method.c (make_thunk): Use overload machinery to make name.
11718         * search.c (covariant_return_p): New fn.
11719         (get_matching_virtual): Use it.
11721         * init.c (build_new_1): Fix check for void.
11723 1998-06-01  Per Bothner  <bothner@cygnus.com>
11725         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
11726         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
11727         java_int_type_node, java_long_type_node, java_float_type_node,
11728         java_double_type_node, java_char_type_node, java_boolean_type_node):
11729         New "primitive" types, with predefined names __java_byte etc.
11730         (record_builtin_java_type):  New function.
11731         (init_decl_processing):  Make Java types with record_builtin_java_type.
11732         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
11733         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
11734         (grokfndecl):  Call check_java_method for Java classes.
11735         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
11736         (process_overload_item):  Match types against specific
11737         java_XX_type_node types, rather than using is_java_type.
11738         * class.c (finish_struct_1):  Don't add default copy constructor
11739         or operator= if TYPE_FOR_JAVA.
11740         (pop_lang_conext):  Restore strict_prototyp proper if Java.
11741         * decl2.c (acceptable_java_type, check_java_method):  New functions.
11742         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
11743         (tsubst):  Move common statement after if statement.
11744         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
11746 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
11748         * pt.c (for_each_template_parm): Use first_rtl_op.
11750         * tree.c (build_cplus_array_type_1): Also check index_type for
11751         template parms.
11753 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
11755         * pt.c (tsubst): Always copy BINFO_BASETYPES.
11757 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
11759         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
11760         TYPE_SIZE_UNIT too.
11762 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
11764         * decl.c (grokdeclarator): Don't complain about in-class
11765         initialization of static consts if we don't really know the type
11766         of the variable.
11768 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
11770         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
11771         * method.c (build_destructor_name): New fn.
11772         * decl2.c (maybe_retrofit_in_chrg): Split out...
11773         (grokclassfn): From here.  Reorganize.
11774         * decl.c (grok_ctor_properties): Make sure ctors for types with
11775         vbases have the in_chrg parm.
11776         * pt.c (instantiate_class_template): Update
11777         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
11778         grok_*_properties.
11779         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
11781 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
11783         * pt.c (instantiate_decl): Make test for whether or not static
11784         variables should be instantiated early match its comment.
11786 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
11788         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
11789         a member.
11790         (start_function): Call check_default_args.
11791         * decl2.c (grokfield): Don't call check_default_args.
11792         (check_default_args): Use cp_error_at.
11793         * lex.c (do_pending_defargs): Call check_default_args.
11795 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
11797         * call.c (build_method_call): Make sure get_type_value returns
11798         something before we try to use its TYPE_MAIN_VARIANT.
11799         (build_scoped_method_call): Likewise.
11801 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
11803         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
11804         initialize an array.
11806         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
11807         DECL_VIRTUAL_P.
11809         * friend.c (do_friend): Clarify template warning.
11811 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
11813         * decl.c (shadow_label): Don't treat decls as identifiers.
11814         (maybe_push_to_top_level): Clear shadowed_labels.
11816         * pt.c (instantiate_decl): Reset lineno and filename after calling
11817         regenerate_decl_from_template.
11819         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
11820         error_mark_node.
11822 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
11824         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
11826 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11828         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
11829         (convert_nontype_argument): Handle cases when nontype template
11830         parameters become classes after substitution.
11832 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
11834         * friend.c (is_friend): Use comptypes, rather than == to compare
11835         types.  Modify for new representation of template friends.
11836         (make_friend_class): Likewise.
11837         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
11838         (instantiate_class_template): Deal with template friends.
11840         * decl.c (store_parm_decls): Remove redundant call to
11841         expand_main_function.
11843 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11845         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
11846         DECL_USE_TEMPLATE.
11848 1998-05-26  Per Bothner  <bothner@cygnus.com>
11850         * language_as_string:  Handle lang_java.
11852 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
11854         * decl.c (pushdecl): Don't copy the type_decl.
11856 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11858         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
11859         current_class_type.
11860         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
11862         * parse.y (complex_direct_notype_declarator): Use $1 to access
11863         scope of notype_qualified_id.
11865 1998-05-26  Dave Brolley  <brolley@cygnus.com>
11867         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
11868         (init_parse): Initialize cpplib interface.
11870         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
11871         empty continuation.
11873 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
11875         * decl.c (pushtag): Avoid crashing on erroneous input.
11877 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11879         * decl.c (push_namespace): Only produce one unique name for
11880         anonymous namespaces.
11881         (get_unique_name): Remove.
11883 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
11885         * call.c (tourney): Don't do any extra comparisons.
11887         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
11889         * cp-tree.h (processing_template_parmlist): Declare.
11890         * decl.c (pushtag): Don't call push_template_decl when we
11891         shouldn't.
11892         * pt.c (processing_template_parmlist): New variable.
11893         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
11894         (complete_template_args): Use it.
11895         (add_to_template_args): Likewise.
11896         (innermost_args): Likewise.
11897         (tsubst): Likewise.
11898         (begin_template_parm_list): Use processing_template_parmlist.
11899         (end_template_parm_list): Likewise.
11901         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
11902         * decl.c (grokdeclarator): Use it.
11903         * decl2.c (grok_x_components): Likewise.
11904         * init.c (initializing_context): Likewise.
11905         * method.c (do_build_copy_constructor): Likewise.
11906         (do_build_assign_ref): Likewise.
11907         * search.c (compute_access): Likewise.
11908         * typeck.c (build_component_ref): Likewise.
11910         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
11911         unnamed type a typedef name "for linkage purposes".
11913         * pt.c (lookup_template_class): Don't look at
11914         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
11916         * method.c (build_overload_int): Handle error cases gracefully.
11918         * pt.c (instantiate_decl): Handle static member variables
11919         correctly.
11921         * pt.c (tsubst): Use the tsubst'd type when producing new
11922         TEMPLATE_PARM_INDEX nodes.
11924 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
11926         * tree.c (cp_tree_equal): Handle pointers to member functions.
11928         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
11929         sure the type of the REF_BIND is a reference type.
11930         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
11931         target_type for clarity.
11933         * parse.y (xcond): Move call to condition_conversion ...
11934         * semantics.c (finish_for_cond): Here.
11935         * parse.c: Regenerated.
11937 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
11939         * decl.c (push_namespace): Namespaces have type void.
11940         * typeck2.c (incomplete_type_error): Complain about namespace
11941         used as expression.
11942         * typeck.c (decay_conversion): Likewise.
11944 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11946         * error.c (dump_expr): Support namespaces.
11948 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
11950         * cp-tree.def: Add SRCLOC.
11951         * cp-tree.h: Add struct tree_srcloc and accessor macros.
11952         * tree.c (build_srcloc, build_srcloc_here): New fns.
11953         * pt.c (add_pending_template): Use build_srcloc_here.
11954         (push_tinst_level): Update last_template_error_tick before erroring.
11955         (instantiate_decl): Restore lineno and input_filename before
11956         calling add_pending_template.
11957         * decl2.c (finish_file): Set up lineno and input_filename for
11958         pending templates.
11960 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
11962         * decl.c (lang_print_error_function): New fn.
11963         (init_decl_processing): Set print_error_function to use it.
11964         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
11966         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
11967         ICS_BAD_FLAG.
11969         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
11970         copy-initialization.
11972         * class.c (build_vtable_entry): Use int_fits_type_p.
11973         (build_vtable): Pass a signed offset to build_vtable_entry.
11974         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
11975         set_rtti_entry): Likewise.
11977 1998-05-22  Per Bothner  <bothner@cygnus.com>
11979         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
11980         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
11982 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
11984         * pt.c (print_template_context): Use fprintf instead of cp_error.
11986         * pt.c (determine_specialization): Just return an error_mark_node.
11987         Also print the decl we want in error messages.  If we complain,
11988         return error_mark_node.
11989         (tsubst_friend_function): Set lineno and input_filename so
11990         error messages will be useful.
11991         (instantiate_template): Just return an error_mark_node.
11992         (check_explicit_specialization): Don't mess with a returned
11993         error_mark_node.
11995         * pt.c (print_template_context): Add new argument.
11996         (maybe_print_template_context): New fn.
11997         (push_tinst_level): Increment tinst_level_tick.
11998         (pop_tinst_level): Likewise.
11999         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
12000         xrealloc instead of xmalloc.
12002         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
12004 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
12006         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
12007         if the template we looked up is the same as the one we already
12008         have.
12010 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
12012         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
12013         (cpp_reader,parse_in): Add for cpplib.
12014         (check_newline): Call handle_sysv_pragma with new interface.
12015         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
12017         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
12018         (sub_getch): Call GETC for cpplib.
12020         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
12021         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
12023         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
12025 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
12027         * decl2.c (maybe_make_one_only): New fn.
12028         (import_export_vtable): Use it.
12029         (import_export_decl): Likewise.
12030         * pt.c (mark_decl_instantiated): Likewise.
12032 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
12034         * decl2.c (find_representative_member): Rename to ...
12035         (build_anon_union_vars): New function.
12036         (finish_anon_union): Fix stupidity of previous change.
12038 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
12040         * decl.c (grokfndecl): Handle definition of specialization in
12041         friend declaration.
12043         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
12045 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
12047         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
12048         to look for type declarations.
12049         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
12050         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
12051         (finish_member_class_template): Declare.
12052         * decl.c (pushtag): Put member class templates on the
12053         CLASSTYPE_TAGS list, just as for ordinary member classes.
12054         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
12055         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
12056         IDENTIFIER_NAMESPACE_VALUEs.
12057         * parse.y (component_decl): Move code to ...
12058         * semantics.c (finish_member_class_template): New function.
12059         Don't put member class templates on the list of components for a
12060         class.
12061         * parse.c: Regenerated.
12062         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
12063         In fact, don't use DECL_CONTEXT at all here.
12065 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12067         * decl.c (record_unknown_type): New function.
12068         (init_decl_processing): Call it for the unknown and global type
12069         nodes.
12071 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
12073         * decl2.c (find_representative_member): New function.
12074         (finish_anon_union): Use it.
12076         * cp-tree.h (MAIN_NAME_P): New macro.
12077         (DECL_MAIN_P): Likwise.
12078         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
12079         (grokfndecl): Use the new macros.
12080         (grokdeclarator): Likewise.
12081         (start_function): Likewise.
12082         (store_parm_decls): Likewise.
12083         (finsh_function): Likewise.
12084         * friend.c (do_friend): Likewise.
12085         * typeck.c (build_function_call_real): Likewise.
12086         (build_unary_op): Likewise.
12088 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
12090         * decl2.c (start_objects, finish_objects, do_dtors,
12091         do_ctors): Split out from...
12092         (finish_file): ...here.
12094 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
12096         * tree.c (is_overloaded_fn): Don't abort on placeholders from
12097         push_class_decls.
12099 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
12101         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
12103         * error.c (dump_expr): Handle an ARROW_EXPR.
12105 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
12107         * decl.c (saveable_obstack): Declare.
12108         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
12109         declare, if necessary.
12111 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
12113         * call.c (compare_qual): Remove.
12114         (is_subseq): Tweak.
12115         (is_properly_derived_from): New function.
12116         (maybe_handle_ref_bind): Likewise.
12117         (maybe_handle_implicit_object): Likewise.
12118         (compare_ics): Modify substantially to bring into conformance with
12119         the standard.
12120         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
12121         (comp_cv_qualification): Declare.
12122         (comp_cv_qual_signature): Likewise.
12123         * typeck.c (comp_cv_qualification): Likewise.
12124         (comp_cv_qual_signature): Likewise.
12126 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12128         * Makefile.in (parse.o): Depend on toplev.h.
12130         * class.c (typecode_p): Remove prototype and definition.
12132         * cp-tree.h (currently_open_class, is_empty_class, member_p):
12133         Add prototype.
12135         * decl.c (push_overloaded_decl_top_level): Remove prototype and
12136         definition.
12138         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
12139         in call to `cp_thing'.
12140         (cp_warning): Likewise for function pointer `warning'.
12142         * except.c (do_function_call): Remove prototype and definition.
12143         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
12145         * method.c (is_java_type): Add prototype and make it static.
12147         * parse.y: Include toplev.h.
12149         * pt.c (type_unification): Remove unused variable `arg'.
12150         (instantiate_decl): Likewise for `save_ti'.
12152         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
12154 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
12156         * init.c (build_member_call): Handle template_ids.
12157         * parse.y (primary): Add global_scope template_id.
12159 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
12161         * decl2.c (get_sentry): Use end_temporary_allocation.
12162         Don't declare permanent_obstack.
12164 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
12166         * parse.y (.finish_new_placement): New non-terminal.
12167         (unary_expr, new_type_id): Use it.
12168         * parse.c: Regenerated.
12170 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
12172         * pt.c (redeclare_class_template): Say where the original definition
12173         of the template-parameter's default argument appeared.
12175 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
12177         * call.c (build_over_call): Tweak empty class handling.
12179         * decl.c (make_typename_type): Use currently_open_class.
12181         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
12183 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12185         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
12186         for a type unless it is one.
12188         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
12190 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
12192         * Makefile.in (program_transform_name, objdir): Define.
12194         * Makefile.in (BISON): Use bison from the build tree if it exists.
12195         (FLEX): Likewise.
12197 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12199         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
12201         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
12203 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
12205         * call.c (build_scoped_method_call): Likewise.
12207 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
12209         * init.c (build_new_1): Call suspend_momentary around the creation
12210         of values that must be saved for exception handling.
12211         * parse.y (.build_new_placement): New non-terminal.
12212         (unary_expr, new_placement): Use it.
12213         * parse.c: Regenerated.
12215 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
12217         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
12218         old and new types.
12220         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
12221         canonical type.
12223         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
12225 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
12227         * decl.c (start_decl): Revert problem change.
12229         * Makefile.in (CONFLICTS): Fix.
12231 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12233         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
12235 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
12237         * class.c (finish_struct_1): Use BINFO_SIZE.
12239         * decl.c (start_decl): Use 'tem'.
12241 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
12243         * exception.cc: Include eh-common.h.
12244         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
12245         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
12246         (__cp_push_exception): Initialize eh_info struct as well.
12247         * except.c: Remove local structs and include eh-common.h.
12248         (init_exception_processing): Set language and version codes.
12249         (call_eh_info): Add presence of eh_info to runtime description of
12250         struct cp_eh_info.
12251         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
12252         * semantics.c (finish_try_block): Call start_catch_block() and
12253         end_catch_block().
12254         * parse.y (function_try_block): Call start_catch_block() and
12255         end_catch_block().
12257 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
12259         * typeck.c (original_type): New function.
12260         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
12261         to see if they're actually the same.
12262         * cp-tree.h (original_type): Declare.
12264 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12266         * Makefile.in (lex.o): Depend on output.h.
12268         * call.c (add_function_candidate): Remove unused variable `cand'.
12269         (add_conv_candidate): Likewise.
12270         (build_builtin_candidate): Likewise.
12272         * cp-tree.h: Add prototype for `types_overlap_p'.
12274         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
12276         * decl2.c (merge_functions): Remove unused variables `tmp' and
12277         `tempn'.
12279         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
12280         (code_as_string): Likewise.
12281         (language_as_string): Likewise.
12282         (parm_as_string): Likewise.
12283         (op_as_string): Likewise.
12284         (assop_as_string): Likewise.
12285         (cv_as_string): Likewise.
12287         * lex.c: Include output.h.
12289         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
12291         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
12292         ATTRIBUTE_UNUSED.
12294         * tinfo.cc (__class_type_info::dcast): Change the type of variable
12295         `i' from int to size_t.
12297         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
12298         ATTRIBUTE_UNUSED.
12300 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
12302         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
12303         DECL_NAMESPACE_SCOPE_P.
12304         (lang_decl_name): Likewise.
12305         * pt.c (tsubst_friend_function, tsubst): Likewise.
12306         * decl.c (pushdecl, redeclaration_error_message, start_decl,
12307         cp_finish_decl, start_function): Likewise.
12308         * class.c (finish_struct_1): Likewise.
12309         * call.c (build_over_call): Likewise.
12310         (compare_ics): Use DERIVED_FROM_P.
12312 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
12314         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
12315         * method.c (build_mangled_name): Use it.
12316         (build_decl_overload_real): Likewise.
12318         * error.c (dump_simple_decl): New function, broken out from ...
12319         (dump_decl): Use it.
12321 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
12323         * ptree.c (lang_print_xnode): Add missing `break'.
12325         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
12327         * call.c (add_template_candidate): Adjust for changes to
12328         fn_type_unification.
12329         (add_template_candidate_real): Likewise.
12330         (add_template_conv_candidate): Likewise.
12331         (build_user_type_conversion_1): Likewise.
12332         (build_new_function_call): Likewise.
12333         (build_object_call): Likewise.
12334         (build_new_op): Likewise.
12335         (build_new_method_call): Likewise.
12336         * class.c (instantiate_type): Likewise.
12337         * cp-tree.h (unification_kind_t): New type.
12338         (fn_type_unification): Adjust prototype.
12339         (type_unificaiton): Likewise.
12340         * pt.c (UNIFY_ALLOW_NONE): New macro.
12341         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
12342         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
12343         (UNIFY_ALLOW_DERIVED): Likewise.
12344         (unify): Change prototype.
12345         (maybe_adjust_types_for_deduction): New function.
12346         (check_cv_quals_for_unify): Likewise.
12347         (determine_specialization): Adjust.
12348         (fn_type_unification): Likewise.
12349         (type_unification): Likewise.
12350         (type_unification_real): Likewise.  Use
12351         maybe_adjust_types_for_deduction.  Fix mishandling of
12352         back-unification of template functions passed as arguments.  Pass
12353         appropriate combination of UNIFY_ALLOW_* to unify.
12354         (unify): Remove unused NTPARMS parameter.  Use
12355         check_cv_quals_for_unify.  Remove bogus code that allowed
12356         too-generous unification in order to adhere more closely to standard.
12357         (get_bindings_real): Adjust.
12358         (get_class_bindings): Likewise.
12360         * method.c (build_overload_identifier): Only use the innermost
12361         template arguments when mangling.
12362         * pt.c (tsubst_template_argument_vector): New function.
12363         (complete_template_args): Deal with the situation where the
12364         extra_args contain more than one level of arguments.
12365         (lookup_template_class): Deal with member template classes, which
12366         may have more than one level of arguments.
12367         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
12368         Improve handling of member template classes.  Use
12369         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
12370         tsubst_template_argument_vector where appropriate.
12371         (regenerate_decl_from_template): Break out from ...
12372         (instantiate_decl): Here.
12374         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
12375         * parse.h: Regenerated.
12376         * parse.c: Really regenerated.
12378         * cp-tree.h (finish_unary_op_expr): New function.
12379         (finish_id_expr): Likewise.
12380         (begin_new_placement): Likewise.
12381         (finish_new_placement): Likewise.
12382         (finish_declarator): Likewise.
12383         (finish_translation_unit): Likewise.
12384         (finish_parmlist): Likewise.
12385         (begin_class_definition): Likewise.
12386         (finish_class_definition): Likewise.
12387         (finish_default_args): Likewise.
12388         (finish_inline_definitions): Likewise.
12389         * parse.y (GCC_ASM_KEYWORD): Remove.
12390         (TYPENAME_ELLIPSIS): Likewise.
12391         * parse.c: Regenerated.
12392         Use new functions in semantics.c in the actions for many rules.
12393         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
12394         * hash.h: Regenerated.
12395         * semantics.c (finish_expr_stmt): Allow NULL expr.
12396         (finish_unary_op_expr): New function, containing
12397         code previously in parse.y.
12398         (finish_id_expr): Likewise.
12399         (begin_new_placement): Likewise.
12400         (finish_new_placement): Likewise.
12401         (finish_declarator): Likewise.
12402         (finish_translation_unit): Likewise.
12403         (finish_parmlist): Likewise.
12404         (begin_class_definition): Likewise.
12405         (finish_class_definition): Likewise.
12406         (finish_default_args): Likewise.
12407         (finish_inline_definitions): Likewise.
12409 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
12411         * typeck.c (build_c_cast): Don't decay arrays and functions to
12412         pointer type when converting to a class type.
12414 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
12416         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
12417         (DECL_CLASS_SCOPE_P): Likewise.
12419 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
12421         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
12422         * decl2.c (constructor_name_full): Likewise.
12424 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
12426         * tree.c (mapcar): Add OVERLOAD support.
12428         * init.c (resolve_offset_ref): We must use basetype_path before we
12429         destroy it with a call to convert_pointer_to.
12431 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
12433         * class.c (currently_open_class): New fn.
12434         * decl.c (lookup_name_real): Use it.
12435         * search.c (lookup_field): Likewise.
12437 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12439         * cp-tree.def (OVERLOAD): New node.
12440         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
12441         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
12442         (NAMESPACE_BINDING): Remove.
12443         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
12444         namespace_binding.
12445         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
12446         Define.
12447         (tree_overload): New struct.
12448         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
12449         (REAL_IDENTIFIER_TYPE_VALUE): Define.
12450         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
12451         (lang_decl_flags): Remove in_namespace.
12452         (lang_decl): Remove chain.
12453         (DECL_CHAIN, DECL_NAMESPACE): Remove.
12454         (flag_honor_std): Declare extern.
12455         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
12456         namespace_binding, set_namespace_binding,
12457         lookup_function_nonclass, cat_namespace_levels,
12458         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
12459         scratch_ovl_cons, ovl_member, build_overload): Declare.
12460         (decl_list_length, get_namespace_id, current_namespace_id,
12461         overloaded_globals_p): Remove.
12462         (lookup_using_namespace, qualified_lookup_using_namespace): Change
12463         return type.
12464         (push_scratch_obstack): New macro.
12465         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
12466         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
12467         convs, fns.
12468         (build_new_function_call): Iterate using OVL_CHAIN.
12469         Print DECL_NAME in when reporting ambiguities.
12470         (build_object_call): Iterate using OVL_NEXT for fns, convs.
12471         (build_new_op): Call lookup_function_nonclass.
12472         Iterate using OVL_NEXT.
12473         (build_op_delete_call): Change detection of members.
12474         Do not wrap TREE_LIST around fields and single global functions.
12475         (build_over_call): Don't push a class level if the context is a
12476         namespace.
12477         (build_new_method_call): Iterate using OVL_NEXT.
12478         * class.c (add_method): Chain overloaded members using
12479         build_overload.  Remove copying of method.
12480         (grow_method): When iterating through the obstack, expect OVERLOAD
12481         nodes.  Chain overload members.
12482         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
12483         nodes in call to get_baselinks.
12484         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
12485         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
12486         fdecls that are OVERLOAD nodes.
12487         (validate_lhs): New function.
12488         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
12489         code.  Use DECL_NAME in error messages.  Split code between global
12490         and member function processing.
12491         * decl.c (global_type_node): New static variable.
12492         (in_std): New global.
12493         (struct binding_level): New field usings.
12494         (resume_binding_level): Assert that we are not in a class.
12495         (toplevel_bindings_p): Just check for namespace_p or
12496         pseudo_global.
12497         (resume_level): Remove.
12498         (find_binding): New function.
12499         (binding_for_name): Call it.
12500         (namespace_binding, set_namespace_binding): New functions.
12501         (push_namespace): Associate binding level with new namespace,
12502         resume_binding_level for existing namespace.  Remove old code.
12503         Fake std by counting.
12504         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
12505         (maybe_push_to_top_level): Save current namespace.
12506         (pop_from_top_level): Restore saved namespace.
12507         (pop_namespace): Call suspend_binding_level.  Remove old code.
12508         (cat_namespace_levels): New function.
12509         (set_identifier_type_value_with_scope): For namespace bindings,
12510         set BINDING_TYPE, and use global_type_node.
12511         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
12512         (identifier_type_value): New function.
12513         (pushtag): If no context, use current_namespace.
12514         (duplicate_decls): Don't process DECL_CHAIN.
12515         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
12516         already set.  Never reset it to NULL_TREE.  Lookup global variables
12517         in their namespace.  Push overloaded templates if they are on
12518         namespace level.
12519         (pushdecl_namespace_level): New function.
12520         (pushdecl_top_level): Implement using pushdecl_namespace_level.
12521         (pushdecl_using_decl): New function.
12522         (overloaded_globals_p): Remove.
12523         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
12524         them.  Use namespace_binding and set_namespace_value.
12525         (redeclaration_error_message): Complain if the declarations come
12526         from different namespaces.
12527         (lookup_tag): On namespace level, look in the BINDING_TYPE.
12528         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
12529         old code.
12530         (select_decl): New function.
12531         (lookup_name_real): Call it for qualified and unqualified lookup.
12532         Pass tree_bindings from the stack.
12533         If prefer_type is 1, also accept namespaces.
12534         (lookup_function_nonclass): New function.
12535         (init_decl_processing): Set the binding level of the global
12536         namespace to global_binding_level.
12537         Build a proper type list for __builtin_apply.
12538         Initialize std_node to "fake std" if flag_honor_std is set.
12539         Initialize global_type_node.
12540         Allocated bad_alloc in namespace std if flag_honor_std.
12541         (define_function): Set the DECL_CONTEXT to the current_namespace.
12542         (start_decl): A namespace is not considered as a context here.  If
12543         the DECL_CONTEXT is a namespace, push the decl.
12544         (cp_finish_decl): Check for namespaces used as initializers.
12545         (grokfndecl): Add namespace parameter.  Remove processing of
12546         DECL_CHAIN.
12547         (grokvardecl): Add namespace parameter.
12548         (grokdeclarator): Process SCOPEs that are namespaces.  For
12549         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
12550         (start_function): Check for contexts that are namespaces.
12551         Set context for declarations that have not been pushed.
12552         (store_parm_decls): Check for ::main only.
12553         (finish_function): Likewise.
12554         (start_method): Check for contexts that are namespaces.
12555         (start_method): Remove DECL_CHAIN processing.
12556         * decl2.c (flag_honor_std): Declare.
12557         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
12558         (decl_namespace_list): New static global.
12559         (grok_x_components): Ignore namespaces as type contexts.
12560         (check_classfn): Expect OVERLOAD nodes.
12561         (grokfield): Remove DECL_CHAIN processing.
12562         (finish_file): Call cat_namespace_levels.
12563         (merge_functions): New function.
12564         (ambiguous_decl): Rewrite.
12565         (lookup_using_namespace): Produce tree_bindings.
12566         (qualified_lookup_using_namespace): Likewise.
12567         (set_decl_namespace, decl_namespace, current_decl_namespace,
12568         push_decl_namespace, pop_decl_namespace): New functions.
12569         (arg_lookup): New struct.
12570         (add_function, arg_assoc_namespace, arg_assoc_class,
12571         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
12572         New functions.
12573         (get_namespace_id, current_namespace_id): Remove.
12574         (do_toplevel_using_decl): Rewrite.
12575         (do_class_using_decl): Complain about namespace qualifiers.
12576         (do_using_directive): Sorry if not on namespace level.  Complain
12577         about unknown namespaces.
12578         * error.c (dump_aggr_type): Check for namespace contexts.
12579         * except.c (init_exception_processing): Push terminate into std.
12580         * friend.c (is_friend): A namespace is not a context, here.
12581         * init.c (expand_member_init): Remove DECL_CHAIN processing.
12582         (build_offset_ref): Process OVERLOAD nodes.
12583         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
12584         * lex.c (identifier_type): Loop using OVL_CHAIN.
12585         (see_typename): Set looking_for_typename to 2.
12586         (real_yylex): Likewise.
12587         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
12588         (do_scoped_id): Expect OVERLOAD nodes.
12589         Change calling convention for qualified_lookup_using_namespace.
12590         (build_lang_decl): Don't set in_namespace anymore.
12591         * method.c (typevec_size): New global.
12592         (build_overload_nested_name): Return if global_namespace.
12593         Otherwise, always expect a declaration context.
12594         (build_qualified_name): Likewise.
12595         Make sure we don't write beyond typevec_size.
12596         (build_decl_overload_real): Likewise.
12597         Allocate one extra slot for the namespace.
12598         (hack_identifier): Mark code dead.
12599         Process OVERLOAD and NAMESPACE_DECL nodes.
12600         * parse.y (program): Pop namespaces until in global namespace.
12601         (extdef): In a using-declaration, don't discard the identifier if
12602         there is no declaration.
12603         (left_curly): Ignore type contexts which are namespaces.
12604         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
12605         used as scope.
12606         * pt.c (template_class_depth): Expect types to be namespaces.
12607         (determine_specialization): Simplify by expecting OVERLOAD nodes.
12608         (push_template_decl): Push into namespace level.
12609         Reset ctx if it is a namespace.
12610         Set DECL_CONTEXT to current_namespace if not set already.
12611         Ignore real contexts that are namespaces.
12612         (mangle_class_name_for_template): Skip global_namespace.
12613         Mangle other namespaces as declarations.
12614         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
12615         (lookup_template_class): Push into namespace of context.
12616         If the context is a namespace, set it to global_namespace.
12617         Use id_context for mangling.
12618         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
12619         (tsubst_friend_function): Ignore namespace contexts.
12620         Push into namespace level.
12621         (tsubst): Handle NAMESPACE_DECL nodes.
12622         Remove DECL_CHAIN processing.
12623         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
12624         * ptree.c (print_lang_identifier): Print bindings.
12625         (lang_print_xnode): Print OVERLOAD nodes.
12626         * rtti.c (init_rtti_processing): Push type_info into std.
12627         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
12628         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
12629         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
12630         lookup_fnfields_here): Likewise.
12631         Process all nodes, instead of going through TREE_CHAIN.
12632         * sig.c (build_signature_pointer_or_reference_type): Set context
12633         to global_namespace.
12634         (build_signature_table_constructor): Expect OVERLOAD nodes.
12635         * spew.c (yylex): Save old setting of looking_for_typename.
12636         * tree.c (decl_list_length): Remove.
12637         (binding_init): New function.
12638         (count_functions): Rewrite.
12639         (is_overloaded_fn): Expect OVERLOAD nodes.
12640         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
12641         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
12642         ovl_member): New functions.
12643         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
12644         (type_unknown_p): Likewise.
12645         (require_instantiated_type): Likewise.
12646         (build_component_ref): Declare code dead.
12647         (build_x_function_call): Create and expect OVERLOAD nodes.
12648         (build_function_call_real): Check for ::main only.
12649         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
12650         (convert_for_assignment): Check for TREE_LIST before accessing
12651         TREE_VALUE.
12652         * decl.c (duplicate_decls): Check for namespace bindings instead
12653         of global bindings.
12654         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
12655         lookup_name_current_level, start_decl, xref_tag,
12656         finish_enum): Likewise.
12657         * init.c (build_offset_ref): Likewise.
12658         * search.c (lookup_field): Likewise.
12659         (lookup_fnfields): Likewise.
12660         (dfs_debug_mark): Likewise.
12661         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
12662         (poplevel_class, pop_from_top_level): Likewise.
12663         * decl2.c (finish_method): Likewise.
12664         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
12665         * decl.c (record_builtin_type): Likewise.
12666         (init_decl_processing, grokfndecl): Likewise.
12667         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
12668         (make_lang_type): Likewise.
12669         * parse.y (make_thunk): Likewise.
12670         * pt.c (tsubst): Likewise.
12671         * tree.c (debug_binfo): Likewise.
12672         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
12673         tinfo2.cc, inc/new.h: Add std qualifications.
12674         * inc/new: Wrap with namespace std if __HONOR_STD.
12675         * inc/typeinfo: Likewise.
12677 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
12679         * call.c (build_user_type_conversion_1): Handle second_conv
12680         properly for templates.
12682 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
12684         * method.c (build_decl_overload_real): Set TREE_USED flag to
12685         zero for build_type_variants nodes as well.
12687 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
12689         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
12691 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
12693         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
12694         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
12695         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
12696         xref.o): Add toplev.h dependencies.
12698 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
12700         * errfn.c (cp_error, cp_warning): Remove declarations for
12701         error and warning respectively.
12703 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12705         * error.c: Convert to using ctype macros defined in system.h.
12706         * method.c: Likewise.
12707         * xref.c: Likewise.
12708         * lex.c: Likewise.  Also remove redundant system header stuff.
12710 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
12712         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
12713         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
12714         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
12715         xref.c: Add include of toplev.h.
12717 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
12719         * tree.c (perm_manip): Also regenerate the RTL of an extern.
12720         (copy_to_permanent): Use end_temporary_allocation.
12722 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
12724         * init.c (expand_vec_init): The initialization of each array
12725         element is a full-expression.
12727 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
12729         * method.c (build_mangled_name): Add a call to build_type_variant
12730         to get the right type.
12732 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
12734         * Makefile.in: Add .SUFFIXES.
12736         * cp-tree.def: Remove NAMESPACE_DECL.
12738 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
12740         * call.c (build_over_call): Do evaluate arg even if it has empty
12741         class type.
12742         * decl.c (start_function): Don't push a member function.
12744 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
12746         * Makefile.in (g++FAQ.info): Put -o option before input file.
12748 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
12750         * gxxint.texi: Add info for squangling codes K and B.
12752 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
12754         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
12755         the expression in templates.
12756         (finish_stmt_expr): Likewise.
12758 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
12760         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
12762 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
12764         * decl.c (maybe_push_to_top_level): Always clear
12765         current_template_parms and processing_template_decl.
12766         (pushtag): Remove check of current_class_type and some comments,
12767         since maybe_push_to_top_level no longer creates confusion.
12769 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
12771         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
12772         (DECL_CLASS_TEMPLATE_P): Likewise.
12773         (DECL_PRIMARY_TEMPLATE): Likewise.
12774         (PRIMARY_TEMPLATE_P): Use it.
12775         (push_template_decl_real): New function.
12776         (redeclare_class_template): Take new template parameters as
12777         input.
12778         (is_specialization_of): New function.
12779         (comp_template_args): Declare.
12780         * decl.c (pushtag): Handle friend template classes.
12781         (xref_tag): Likewise.  Use new calling convention for
12782         redeclare_class_template.
12783         * decl2.c (grok_x_components): Handle friend templates.
12784         * friend.c (is_friend): Use is_specialization_of where
12785         appropriate.  Deal with friend class templates.
12786         (make_friend_class): Let a class template be friends with itself.
12787         * pt.c (comp_template_args): Remove declaration.
12788         (tsubst_friend_class): New function.
12789         (push_template_decl_real): New function.
12790         (push_template_decl): Use it.
12791         (redeclare_class_template): Adjust for new calling convention.
12792         (comp_template_args): Give it external linkage.
12793         (instantiate_class_type): Use tsubst_friend_class to deal
12794         with friend templates.
12795         * typeck.c (comptypes): Use comp_template_args, rather than
12796         expanding it inline.
12797         * parse.y (component_decl): Handle a nested template type
12798         like other component type declarations.
12800         * pt.c (check_explicit_specialization): Handle overloaded
12801         constructors correctly.
12803         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
12804         (lookup_template_class): Use it.
12806 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
12808         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
12809         * cp-tree.h: Add WRAPPER support.
12810         * call.c (add_candidate): Split out from add_*_candidate fns.
12811         (build_over_call): Take the candidate instead of function and args.
12812         Enforce access control here.  Emit overload warnings here.
12813         (add_warning): New fn.
12814         (joust): Add WARN parm.  If not set, call add_warning instead of
12815         printing a warning.  Re-enable some warnings.
12816         (tourney): Pass it.
12817         (convert_like): Adjust.
12818         (build_new_op): Adjust.
12819         (build_new_function_call): Adjust.
12820         (build_user_type_conversion_1): Adjust.
12821         (USER_CONV_FN): Adjust.
12822         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
12823         build_int_wrapper): New fns.
12825 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
12827         * pt.c (unify): Fix typo in previous change.
12829 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
12831         * error.c (dump_type_real): Declare canonical_name.
12833         * typeck.c (comp_target_types): Fix PMFs.
12835 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
12837         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
12838         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
12839         TEMPLATE_DECL.
12841         * pt.c (tsubst): Decrease the template-level of
12842         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
12843         TEMPLATE_PARM_INDEX.
12844         (template_decl_level): New function.
12845         (unify): Make sure to record unifications for template
12846         parameters, even when the parameters exactly match the arguments.
12847         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
12848         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
12849         aren't from the level we're currently working on.
12851 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
12853         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
12855         * decl2.c (check_member_template): Set DECL_IGNORED for member
12856         class templates, too.
12858         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
12860 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12862         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
12864 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
12866         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
12867         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
12868         (init_decl_processing): Handle TI types.
12869         * typeck.c (unsigned_type, signed_type): Handle TI types.
12871 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
12873         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
12874         New local added_libraries.  Increment count when add library to
12875         arglist.
12877 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
12879         * cp-tree.h (type_as_string_real): New function.
12880         * pt.c (mangle_class_name_for_template): Use it.
12881         * error.c (dump_aggr_type): Change prototype.
12882         (dump_type_prefix): Likewise.
12883         (dump_type_suffix): Likewise.
12884         (dump_type_real): Convert from dump_type.  If desired, the
12885         "canonica" name of a typedef, i.e., the name of the underlying
12886         type, can be printed.
12887         (dump_type): Call dump_type_real.
12889 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
12891         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
12893         * typeck.c (comp_target_types): Tweak pedantic case.
12894         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
12895         Return -1 or 1 instead of 1 or 2.
12896         (compparms): Remove STRICT handling.
12897         (convert_for_assignment): Fix handling of pmfs.
12899 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
12901         * typeck.c (comp_target_types): Handle references like pointers.
12902         (comp_target_parms): Note that return code from comp_target_types
12903         can be negative to indicate failure.
12905 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
12907         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
12908         which requires a working target compiler to build.
12910 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
12912         * tree.c (avoid_overlap): Add prototype.
12914         * spew.c (num_tokens): Add prototype.
12915         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
12917         * search.c (dfs_check_overlap): Add prototype.
12918         (dfs_no_overlap_yet): Likewise.
12920         * pt.c (original_template): Add prototype.
12921         (inline_needs_template_parms): Likewise.
12922         (push_inline_template_parms_recursive): Likewise.
12923         (retrieve_specialization, register_specialization): Likewise.
12924         (print_candidates, reduce_template_parm_level): Likewise.
12925         (build_template_decl, mark_template_parm): Likewise.
12926         (tsubst_friend_function, get_bindings_real): Likewise.
12928         * method.c (start_squangling): Add prototype.
12929         (end_squangling, check_ktype, issue_ktype): Likewise.
12930         (build_overloaded_scope_ref, check_btype): Likewise.
12931         (build_mangled_template_parm_index): Likewise.
12933         * lex.c (init_cpp_parse): Add prototype.
12934         (handle_cp_pragma, handle_sysv_pragma): Likewise.
12935         (reduce_cmp, token_cmp): Likewise.
12937         * except.c (call_eh_info): Add prototype.
12938         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
12939         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
12941         * decl2.c (is_namespace_ancestor): Add prototype.
12942         (namespace_ancestor, add_using_namespace): Likewise.
12943         (ambiguous_decl): Likewise.
12945         * decl.c (indent): Add prototype.
12947         * call.c (add_template_candidate_real): Add prototype.
12949 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
12951         * decl2.c (build_expr_from_tree): Just return a PMF.
12953 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
12955         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
12956         when doing initializations.
12958         * pt.c (unify): Use comptypes to compare type args.
12960 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
12962         * decl.c (duplicate_decls): Fix check for when it's safe to free
12963         the new decl.
12965         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
12966         to type_as_string.
12968 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
12970         * pt.c (build_template_parm_index): Add prototype.
12972         * search.c (my_tree_cons): Don't clear words outside the
12973         newly allocated node.
12975 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
12977         * lex.c (init_parse): Now returns char* containing the filename.
12979 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
12980                           Jeff Law   <law@cygnus.com>
12982         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
12983         than a pointer.
12985 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12987         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
12989 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
12991         * decl.c (duplicate_decls): Don't warn for redundant decls if
12992         friend: let add_friend take care of it.
12994 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
12996         * sig.c (build_signature_pointer_constructor): Don't set
12997         TREE_HAS_CONSTRUCTOR for a signature pointer.
12998         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
12999         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
13000         here, too.
13001         * typeck.c (build_unary_op): Only allow taking the address of a
13002         real constructor.
13003         * typeck2.c (digest_init): Simplify.
13004         (store_init_value): Don't pedwarn about using { } for pmfs.
13006 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
13008         * cp-tree.h (start_decl):  Update prototype.
13009         * decl.c (start_decl):  Like the C version, new parameters
13010         for the attributes.  Call cplus_decl_attributes here,
13011         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
13012         (grokdeclarator):  Pass NULL for new start_decl arguments.
13013         * pt.c (tsubst_expr):  Likewise.
13014         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
13015         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
13016         * lex.c (build_lang_decl): Add lang_name_java.
13017         * class.c (push_lang_context): Add lang_name_java.
13018         * method.c (build_mangled_name): Check for is_java_type.
13020 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13022         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
13023         * call.c (build_scoped_method_call): Check for TREE_CODE for
13024         VOID_TYPE instead of type ==  void_type_node.
13025         (build_method_call): Likewise.
13026         * decl.c (lookup_name_real): Likewise.
13027         (grokdeclarator): Likewise.
13028         (start_decl): Likewise.
13029         (grokparms): Likewise.
13030         (start_function): Likewise.
13031         (finish_function): Likewise.
13032         (start_method): Likewise.
13034 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
13036         * lex.c (finput): New variable.
13037         (init_cpp_parse):  Renamed from init_parse.
13038         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
13039         (finish_parse): New function.
13040         * cp-tree.h (init_lex, init_parse): Remove declarations.
13042 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
13044         * call.c (build_call): Still evaluate the actual argument.
13045         * class.c (is_empty_class): Update for -fnew-abi.
13047         * decl2.c: -fnew-abi implies -fsquangle.
13049         * method.c (do_build_assign_ref): Don't do anything to copy
13050         an empty class.
13051         (do_build_copy_constructor): Likewise.
13052         * call.c (build_over_call): Likewise.
13054 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
13056         * tree.c (avoid_overlap): Return a value.
13058 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
13060         * method.c (check_btype): Add missing argument to xrealloc.
13061         (check_ktype): Likewise.
13063 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
13065         Implement empty base optimization.
13066         * class.c (finish_struct_1): Add vbase fields earlier.  Set
13067         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
13068         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
13069         (types_overlap_p): New fn.
13070         * tree.c (avoid_overlap): New fn.
13071         (build_base_fields): Use it to avoid overlapping empty bases.
13072         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
13074         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
13076         Re-implement allocation of base class subobjects.
13077         * tree.c (unshare_base_binfos): New fn.
13078         (layout_basetypes): Use it.  Now handles offsets of both virtual and
13079         non-virtual bases, after layout_type.
13080         (layout_vbasetypes): Remove.
13081         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
13082         (build_vbase_pointer_fields): Split out from old layout_basetypes.
13083         * class.c (finish_base_struct): Lose offset handling code.
13084         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
13085         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
13086         * cp-tree.h: Adjust.
13088 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
13090         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
13091         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
13092         * class.c (duplicate_tag_error): Likewise.
13093         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
13094         * tree.c (layout_vbasetypes): Update from layout_record, remove
13095         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
13096         (layout_basetypes): Likewise.
13098 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
13100         * class.c, Make sure system.h is included just after config.h.
13101         Delete lingering stdio and errno references too.
13102         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
13104 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
13106         * friend.c (is_friend): Fix access control for local classes.
13108         * class.c (is_empty_class): New fn.
13109         * call.c (build_call): Don't pass empty class objects to a function.
13111 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
13113         * call.c (build_over_call): Do name resolution for default
13114         arguments of function templates in the scope of the templates.
13116 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
13118         * call.c: Include system.h.  Remove includes, declarations and
13119         defines provided by system.h.
13120         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
13121         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
13122         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
13123         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
13124         * typeck2.c, xref.c: Likewise.
13125         * Makefile.in: Dependencies updated as appropriate.
13126         * Make-lang.in: Likewise.
13128 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
13130         * pt.c (fn_type_unification): Allow incomplete unification without
13131         an immediate error message.
13133 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
13135         * tree.c (member_p): New fn.
13136         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
13137         initializing class members.
13139         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
13140         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
13142         * call.c (build_method_call): Handle non-scoped destructors, too.
13143         * pt.c (tsubst_copy): Likewise.
13145         * pt.c (print_template_context): Split out...
13146         (push_tinst_level): ...from here.
13148         * friend.c (is_friend): Don't pass a type to decl_function_context.
13150         * typeck.c (convert_for_initialization): Always hand off
13151         conversions to class type.
13153 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
13155         * friend.c (is_friend): Local classes have the same access as the
13156         enclosing function.
13158 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
13160         * typeck.c (expand_target_expr): Delete dead function.
13162         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
13164         * repo.c (save_string): Delete dead function.
13166         * method.c (thunk_printable_name): Delete dead function.
13168         * lex.c (yynextch): Delete dead function.
13170         * expr.c (tree_extract_aggr_init): #if 0 out.
13172         * except.c (do_unwind): Delete dead function.
13173         (easy_expand_asm): Likewise.
13175         * cvt.c (build_conversion_type_1): Delete dead function.
13177         * cp-tree.h (push_expression_obstack): Declare.
13179         * call.c (source_type): #if 0 out.
13181         * class.c (alter_access): Remove unused label.  Add braces
13182         around empty else clause.
13184         * lex.c (yyprint): Fix argument to printf.
13186 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
13188         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
13190         * pt.c (instantiate_class_template): Make sure template
13191         arguments are permanent.
13192         * init.c (resolve_offset_ref): Don't go looking around in
13193         template types.
13195         * semantics.c: Add routines to handle expressions, and some
13196         declaration processing.
13197         * parse.y: Use them.
13198         (current_class_depth): Move declaration to cp-tree.h.
13199         * parse.c: Regenerated.
13200         * cp-tree.h: Use them.
13201         (current_class_depth): Declare.
13202         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
13204 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
13206         * error.c (dump_decl): Be a bit more explicit with template
13207         type arguments, when verbose.
13209 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
13211         * inc/exception: Reorder closing braces.
13213 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
13215         * pt.c (redeclare_class_template): New function.
13216         * cp_tree.h (redeclare_class_template): Declare it.
13217         * decl.c (xref_tag): Use it.
13219 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
13221         * call.c (build_over_call): Check IS_AGGR_TYPE, not
13222         TYPE_LANG_SPECIFIC.
13223         * typeck.c (convert_arguments): Likewise.
13225         * decl.c (grokdeclarator): Remove const and volatile from type after
13226         setting constp and volatilep.
13228         * class.c (finish_struct_1): Don't warn about bool bitfield larger
13229         than one bit.
13231 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
13233         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
13235 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
13237         * call.c (build_object_call): Complain about ambiguous operator(),
13238         rather that crashing.
13239         (build_new_op): Likewise.
13240         (build_op_delete_call): Likewise.
13242 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
13244         * cvt.c (perform_qualification_conversions): Use comp_target_types
13245         instead of comp_ptr_ttypes.
13247 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
13249         * cp-tree.h (enforce_access): Declare.
13250         * call.c (enforce_access): Make it extern, not static.
13251         * class.c (alter_access): Use enforce_access; modify code for ISO
13252         compliance, rather than ARM rules.
13254 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13256         * cp-tree.h: Fix typo.
13258 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
13260         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
13261         if (aggregate_value_p (type)).
13263         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
13265 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
13267         * tree.c (mapcar): When dealing with a DECL, use it's constant
13268         value, if any.
13269         * pt.c (lookup_template_class): Don't mangle the names of template
13270         classes whose arguments are unknown.
13272         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
13274 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
13276         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
13278 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
13280         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
13281         boolean_type_node to 1.
13283 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
13285         * error.c (dump_expr): Remove unused variable `l'.
13287         * pt.c (for_each_template_parm): New function, created by
13288         converting uses_template_parms.
13289         (tree_fn_t): New typedef.
13290         (uses_template_parms): Use it.
13291         (mark_template_parm): New function.
13292         (push_template_decl): Check that the argument list of a partial
13293         specialization uses all the template parameters.
13295         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
13296         with it; we might want it for debugging.
13297         * cp-tree.h (type_unification): Change interface.
13298         * class.c (finish_struct_1): Skip nested template types, just like
13299         ordinary nested types.
13300         (instantiate_type): Use new interface to type_unification.
13301         * lex.c (init_lex): Add __sz as opname for sizeof.
13302         * method.c (build_overload_scope_ref): New function.
13303         (build_overload_int): Handle complex expressions.  Set
13304         numeric_output_need_bar if necessary.
13305         (build_overload_value): Handle non-PARM_DECL nodes; this
13306         routine is now used by build_overload_int.  Remove some
13307         assignments to numeric_output_need_bar.  Use
13308         build_overload_scope_ref.
13309         (build_qualified_name): Note that some template mangled names end
13310         with digits, and set numeric_output_need_bar appropriately.  Use
13311         build_underscore_int.
13312         * pt.c (unify): Change interface.
13313         (type_unification_real): Likewise.
13314         (determine_specialization): Use new interfaces.
13315         (tsubst): Deal gracefully with situations in which the argument
13316         vector is not fully filled.
13317         (fn_type_unification): Use new interfaces.
13318         (type_unification): Likewise.  Remove NOP_EXPR hack.
13319         (type_unification_real): Likewise.
13320         (unify): Likewise.  Deal with unification of complex expressions.
13322 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
13324         * pt.c (complete_template_args): Initialize skip properly.
13326         * decl.c (make_typename_type): Revert.
13327         (make_implicit_typename): Remove.
13328         (lookup_name_real): Don't call it.  Call lookup_field if we see a
13329         TYPE_DECL from a template base.
13330         * search.c (lookup_field): Do implicit typename stuff.
13332 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
13333                           Geoff Noer    <noer@cygnus.com>
13335         * Makefile.in: Various fixes for building cygwin32 native toolchains.
13336         * Make-lang.in: Likewise.
13338 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13340         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
13342 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
13344         * decl.c (make_implicit_typename): Rewrite removed code.
13345         (make_typename_type): Call it if the type we look up comes from
13346         a base that uses template parms.
13348         * pt.c (complete_template_args): Rewrite.
13349         (tsubst, FUNCTION_DECL): Use it.
13351 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
13353         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
13354         c_expand_asm_operands () if output_operands, input_operands or
13355         clobbers is not NULL_TREE.
13357 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13359         * pt.c (complete_template_args): New function.
13360         (get_bindings): Deal with specializations of function templates
13361         with return type containing parameters from outer class
13362         templates.
13363         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
13364         substitute arguments and compose a new type.
13366 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
13368         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
13369         FUNCTION_DECLs.
13371 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
13373         * decl.c (make_implicit_typename): Lose useless code.
13375         * call.c (standard_conversion): Handle A* -> const A* properly.
13377         * pt.c (get_bindings_real): Rename from get_bindings.  Add
13378         check_rettype parm.
13379         (get_bindings): Pass 1.
13380         (get_bindings_overload): Pass 0.
13382 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
13384         * pt.c (check_explicit_specialization): When reverting a static
13385         member function, also remove the `this' parameter from
13386         last_function_parms.
13388 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
13390         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
13391         a function context.
13393         * decl.c (store_bindings): Use free_binding_vecs.
13394         (pop_from_top_level): Likewise.
13396 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
13398         * decl.c (make_implicit_typename): Only change the type of a
13399         TYPENAME_TYPE.
13401 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
13403         * semantics.c: New file, containing routines to perform the
13404         semantic phase of parsing.
13405         * parse.y: Use it.
13406         * pt.c (tsubst_expr): Likewise.
13407         * cp-tree.h: Declare the various functions in semantics.c.
13408         Provide macros to access _STMT tree nodes.
13409         * cp-tree.def: Add ASM_STMT tree node.
13410         * Makefile.in, Make-lang.in: Add dependencies on and for
13411         semantics.c.
13413 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
13415         * pt.c (push_template_decl): Only check primary templates.
13417         * pt.c (check_explicit_specialization): Complain about default args
13418         in explicit specialization.
13420         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
13421         constructor_declarator.
13423 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
13425         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
13426         has no overloaded operator ->.
13428         * call.c (build_field_call): Don't crash when presented with a
13429         field that is actually a nested type.
13431         * decl.c (pushtag): Deal with friend class injection in local
13432         classes.
13434         * call.c (build_object_call): Don't crash if OBJ is a
13435         pointer-to-member-function.
13437 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
13439         * pt.c (push_template_decl): Complain about template with C linkage,
13440         anonymous template class.
13442 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
13444         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
13445         * search.c: Likewise.
13447         * lex.c (do_pending_defargs): Only call
13448         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
13450         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
13452 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
13454         * parse.y: Deal with CONSTRUCTORS in new_initializers.
13456 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
13458         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
13459         closely mimics the behavior in parse.y.
13460         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
13461         into a compound statement.
13463 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
13465         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
13466         * pt.c (inline_needs_template_parms): New fn.
13467         (original_template): New fn.
13468         (push_inline_template_parms_recursive): New fn.
13469         (maybe_begin_member_template_processing): Use them.
13470         (maybe_end_member_template_processing): Likewise.
13471         (is_member_or_friend_template): Rename to is_member_template.
13472         Member functions of local classes are never member templates.
13474 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13476         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
13477         added in the class scope to catch redefinition error.
13479         * pt.c (reduce_template_parm_level): Also copy
13480         the DECL_TEMPLATE_PARMS field.
13482 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
13484         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
13485         reduced-level template type parameter.
13487 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
13489         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
13490         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
13491         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
13492         * decl.c (duplicate_decls): Propagate it.
13493         * typeck2.c (abstract_virtuals_error): Use two loops to emit
13494         abstract virtual functions and virtual functions which need a
13495         final overrider separately.
13497 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
13499         * lang-specs.h: Properly put brackets around array elements in
13500         initializer.
13502         * typeck.c (build_binary_op_nodefault): Correctly place parens around
13503         && and || in expression.
13505 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
13507         * call.c (default_parm_conversions): Remove prototype definition.
13508         (build_method_call): Remove unused variable result.
13510         * cvt.c (ocp_convert): Remove unused variable conversion.
13512         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
13514         * except.c (do_unwind): #if 0 definition of unused variables fcall
13515         and next_pc.
13517         * expr.c (extract_scalar_init): #if 0 prototype and function
13518         definition.
13520         * init.c (expand_aggr_init_1): Remove unused variable init_type.
13521         (build_new_1): Remove unused variable t.
13523         * pt.c (instantiate_class_template): Remove unused variable newtag;
13524         cast called function return value to void.
13525         (do_decl_instantiation): Remove unused variables name and fn.
13527         * tree.c (get_type_decl): Add default return to shut up compiler from
13528         complaining control reaches end of non-void function.
13530         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
13532 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
13534         * call.c (default_parm_conversions): Remove prototype definition.
13535         (build_method_call): Remove unused variable result.
13536         (build_over_call): Add default case in enumeration switch.
13538 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
13540         * decl2.c (lang_decode_option): Change j's type to size_t.
13542         * tree.c (layout_vbasetypes): record_align and desired_align are of
13543         type unsigned int; const_size and nonvirtual_const_size likewise.
13545 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
13547         * parse.y (new_initializer): Make sure all initializers are
13548         lists.
13550 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
13552         * decl2.c (import_export_decl): Mark tinfo functions for
13553         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
13555 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
13557         * method.c: Fix typo.
13559 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13561         * method.c: Include "system.h" to get stdlib.h, stdio.h,
13562         ctype.h, string.h, etc.
13563         (issue_nrepeats): Add default case in enumeration switch.
13564         (check_btype): Likewise.
13565         (process_overload_item): Likewise.
13567         * Makefile.in (method.o): Depend on system.h.
13569 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13571         * lex.c (do_scoped_id): Fix parenthesizing.
13573 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
13575         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
13576         FLAG_RTTI is unset, initialize type info machinery and continue
13577         with FLAG_RTTI enabled.
13578         (get_typeid): Likewise.
13580 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
13582         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
13583         from B.
13585 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
13587         * pt.c (finish_member_template_decl): Deal more gracefully with
13588         invalid declarations.
13590 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
13592         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
13593         cp-tree.h: Clean up more old overloading code, old RTTI code, and
13594         some formatting quirks.
13596         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
13597         method.c, pt.c, ptree.c, typeck.c: Remove support for
13598         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
13599         * class.h: Remove.
13600         * Makefile.in: Adjust.
13602         * pt.c (unify): Don't allow reduced cv-quals when strict.
13604         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
13605         *type_unification* and unify.
13607 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
13609         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
13610         (nested_name_specifier): And add it before this use.
13611         (typename_sub0): And this use.  Also add use without the keyword.
13612         (typename_sub1): Likewise.
13613         * pt.c (instantiate_class_template): Don't actually instantiate
13614         anything if our type uses template parms.
13616 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
13618         * decl.c (start_function): Don't call temporary_allocation for a
13619         nested function.
13621 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
13623         * pt.c (instantiate_class_template): Don't mess with friends if
13624         our type uses template parms.
13626 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
13628         * parse.y (nested_name_specifier): Use explicit_template_type.
13629         (typename_sub): Allow a template_type, an explicit_template_type,
13630         or an implicit template type at the end.
13631         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
13632         * decl.c (make_typename_type): Handle template-id where the name
13633         is a TEMPLATE_DECL.
13634         * call.c (build_scoped_method_call): Handle member template
13635         destructor call.
13636         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
13637         destructor is represented by the type.
13639         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
13640         * parse.y (nested_name_specifier): Add 'template' case.
13641         (explicit_template_type): New rule.
13642         (typename_sub): Use it.
13643         * decl.c (make_typename_type): Handle getting a template-id for NAME.
13644         * pt.c (tsubst): Likewise.
13646 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
13648         * pt.c (add_to_template_args): Fix thinko.
13649         (instantiate_class_template): Call it later.
13651         * pt.c (get_class_bindings): Add outer_args parm.
13652         (most_specialized_class): Likewise.
13653         (instantiate_class_template): Pass it.
13654         (more_specialized_class): Likewise.
13655         (lookup_template_class): Get context from template if none
13656         was specified.
13657         (finish_member_template_decl): Don't do anything with a
13658         partial specialization.
13659         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
13660         AGGREGATE_TYPE_P.
13661         * class.c (finish_struct): Member class templates have already been
13662         checked for name clashes.
13663         * decl.c (pushdecl_with_scope): Handle pushing at class level.
13665 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
13667         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
13668         (tsubst, *_PARM): Support multiple levels of template classes.
13669         (instantiate_class_template): Look up the pattern from the
13670         original template.
13671         (lookup_template_class): Handle getting a template for d1.
13672         (push_template_decl): Correct setting of 'primary'.
13673         (reduce_template_parm_level): Add 'levels' parm.
13674         (finish_member_template_decl): Support member class templates.
13675         (template_class_depth): Handle multiple levels.
13676         * parse.y (component_decl_1, fn.def2): Remove member template case.
13677         (component_decl): Add member template cases.
13678         * decl2.c (check_member_template): We now handle member template
13679         classes.
13680         * decl.c (pushtag): Handle member templates.
13681         * method.c (do_inline_function_hair): Don't touch
13682         IDENTIFIER_GLOBAL_VALUE.
13683         * init.c (build_offset_ref): If name isn't an identifier, just
13684         return it.
13685         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
13687         * typeck.c (get_delta_difference): Do adjust for conversions to
13688         and from virtual base.
13690 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
13692         * typeck.c (get_delta_difference): Give hard error for conversion
13693         from virtual base.
13695         * cp-tree.h: Tweak formatting.
13697 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
13699         * decl.c (push_namespace): Handle redeclaration error.
13701         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
13702         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
13703         (NAMESPACE_BINDING): New macro.
13704         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
13705         * *.c: Use them.
13707         * pt.c (push_template_decl): Use innermost_args.
13709         * decl.c (get_unique_name): Tweak from earlier in the name.
13711 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
13713         * cp-tree.def: Add CPLUS_BINDING node.
13714         * cp-tree.h (tree_binding): New struct.
13715         (BINDING_SCOPE, BINDING_VALUE): New macros.
13716         (current_namespace, global_namespace): Declare extern.
13717         (struct lang_decl_flags): New field in_namespace.
13718         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
13719         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
13720         (TREE_INDIRECT_USING): New macro.
13721         * decl2.c (current_namespace, global_namespace): Declare.  The
13722         value is a NAMESPACE_DECL now, not a TREE_LIST.
13723         (is_namespace_ancestor, namespace_ancestor): New static functions.
13724         (add_using_namespace, ambiguous_decl): Likewise.
13725         (lookup_using_namespace): New support function for lookup_name.
13726         (qualified_lookup_using_namespace): New support function for
13727         do_scoped_id and lookup_namespace_name.
13728         (get_namespace_id): Mark as obsolete.
13729         (current_namespace_id): Likewise.
13730         (do_namespace_alias): Implement.
13731         (do_using_directive): Implement as call to add_using_namespace.
13732         * decl.c (binding_for_name): New function.
13733         (push_namespace, pop_namespace): Implement.
13734         (push_decl): Don't install a FUNCTION_DECL in the global branch.
13735         (lookup_namespace_name): Implement using qualified lookup.
13736         (lookup_name_real): For global scoping, lookup in
13737         global_namespace.  For namespace scoping, lookup in given
13738         namespace.  For unscoped lookup, iterate over namespace,
13739         considering using directives.
13740         (init_decl_processing): Initialize global_namespace.
13741         (grokvardecl): Build assembler name as static name for globals.
13742         (grokdeclarator): Remove old namespace mangling.
13743         (xref_tag): When installing a global binding for the
13744         tag, make sure we have an identifier.
13745         * method.c (build_overload_nested_name): Mangle namespaces.
13746         (build_qualified_name): Likewise.
13747         (build_decl_overload_real): Likewise.
13748         * lex.c (build_lang_decl): Set namespace for new declaration to
13749         current_namespace.
13750         (do_scoped_id): Find global names in global or current
13751         namespace, or using qualified namespace lookup, depending on
13752         context.
13753         * init.c (build_member_call): When scope is namespace, use
13754         build_x_function_call instead.
13755         (build_offset_ref): When scope is namespace, collapse processing
13756         to lookup_namespace_name instead.
13757         * error.c (dump_decl): Support NAMESPACE_DECL.
13758         * decl.c (pushdecl): Bind globals to current namespace.
13759         (push_overloaded_decl): Likewise.
13760         (lookup_tag): Likewise.
13761         (lookup_name_current_level): Likewise.
13762         (xref_tag): Likewise.
13763         (start_function): Likewise.
13764         * lex.c (do_identifier): Likewise.
13765         (identifier_typedecl_value): Likewise.
13766         (real_yylex): Likewise.
13767         * method.c (do_inline_function_hair): Likewise.
13768         * parse.y (unscoped): Likewise.
13769         * pt.c (check_explicit_specialization): Likewise.
13770         (lookup_template_class): Likewise.
13771         * rtti.c (call_void_fn): Likewise.
13772         * sig.c (build_sigtable): Likewise.
13773         * ptree.c (lang_print_xnode): New function.
13775 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
13777         * pt.c (instantiate_class_template): Don't instantiate if pedantic
13778         and the args use template parms.
13780         * pt.c (push_tinst_level): If the instantiation uses template parms,
13781         fail silently.
13782         * decl.c (xref_basetypes): Do call complete_type for basetypes
13783         that involve template parameters.
13785 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
13787         * typeck2.c (process_init_constructor): Fix labeled init check.
13789 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
13791         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
13792         argument to tsubst and friends.
13794         * pt.c (tsubst, FUNCTION_DECL): Tidy.
13796         * typeck.c (build_x_function_call): Handle static member function
13797         templates like non-templates.  Handle friend templates like normal
13798         function templates.
13799         * pt.c (tsubst, *_PARM): Don't use orig_level.
13800         (get_bindings): Don't call add_to_template_args.
13801         (instantiate_template): Likewise.
13802         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
13803         * ptree.c (print_lang_type): Print index/level for template parms.
13805 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
13807         * Make-lang.in (cc1plus): Note that cc1plus depends on
13808         cp/cp-tree.h and cp/cp-tree.def.
13810         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
13811         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
13812         position in a template parameter list.
13813         * cp-tree.h (template_parm_index): New structure, used as the tree
13814         structure for a TEMPLATE_PARM_INDEX.
13815         (TEMPLATE_PARM_IDX): New macro.
13816         (TEMPLATE_PARM_LEVEL): Likewise.
13817         (TEMPLATE_PARM_DESCENDANTS): Likewise.
13818         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
13819         (TEMPLATE_PARM_DECL): Likewise.
13820         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
13821         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
13822         (TEMPLATE_TYPE_DECL): Likewise.
13823         (TEMPLATE_CONST_IDX): Remove.
13824         (TEMPLATE_CONST_LEVEL): Likewise.
13825         (TEMPLATE_CONST_SET_INFO): Likewise.
13826         (TEMPLATE_TYPE_SET_INFO): Likewise.
13827         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
13828         node.
13829         (TEMPLATE_TYPE_LEVEL): Likewise.
13830         * decl.c (decls_match): Call comp_template_parms, rather than
13831         expanding it inline.
13832         (duplicate_decls): If two template declarations are being merged,
13833         then their TEMPLATE_INFOs should be merged as well.
13834         (grokfndecl): Save template-id information when declaring a friend
13835         with explicit template arguments.  Pass arguments to
13836         check_explicit_specialization via correct convention; at some
13837         point check_explicit_specialization changed, but these call-sites
13838         did not.
13839         (grokdeclarator): Tidy up slightly.
13840         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
13841         two template functions with the same DECL_ASSEMBLER_NAME the same,
13842         since the names are not yet mangled.
13843         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
13844         TEMPLATE_CONST_PARM.
13845         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
13846         decl for a non-type parameter, rather than printing `<tparm ...>'.
13847         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
13848         (do_friend): Deal with template friends.
13849         * lex.c (do_pending_inlines): Call
13850         maybe_begin_member_template_processing, rather than
13851         conditionally calling begin_member_template_processing.
13852         (process_next_inline): Likewise.  Call
13853         maybe_end_member_template_processing, rather than
13854         conditionally calling end_member_template_processing.
13855         (do_pending_defargs): Likewise.
13856         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
13857         TEMPLATE_CONST_PARM.
13858         * method.c (build_mangled_template_parm_index): New function.
13859         (build_overload_value): Use it.
13860         (build_overload_name): Likewise.
13861         * pt.c (finish_member_template_decl): Allow friend declarations.
13862         (template_class_depth): New function.
13863         (is_member_template): Rename, and modify, to become...
13864         (is_member_or_friend_template): New function.
13865         (end_member_template_processing): Rename, and modify, to become...
13866         (maybe_end_member_template_processing).
13867         (build_template_parm_index): New function.
13868         (reduce_template_parm_level): New function.
13869         (process_template_parm): Modify to use build_template_parm_index.
13870         (push_template_decl): Deal with friend templates.
13871         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
13872         TEMPLATE_CONST_PARM.
13873         (tsubst_friend_function): New function.
13874         (instantiate_class_template): Generate the DECL_FRIENDLIST
13875         for a new instantiation by using tsubst_friend_function rather
13876         than just tsubst.
13877         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
13878         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
13879         appropriate new macros.  Use reduce_template_parm_level to
13880         generate lower-level template parameters.  Handle tsubst'ing into
13881         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
13882         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
13883         templates.  Similarly for the template parameters for a new
13884         template.
13885         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
13886         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
13887         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
13888         (get_bindings): Call add_to_template_args if necessary.
13889         (instantiate_decl): Handle instantiations of friend templates.
13890         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
13891         TEMPLATE_TYPE_PARM as a list of fields; it's not!
13892         * spew.c (yylex): Do a little manual constant propagation to
13893         clarify the code.
13895 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
13897         * error.c: Include sys/types.h.
13899 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
13901         * method.c (build_mangled_name): Start CPP directives in column zero.
13903 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
13905         * typeck2.c (process_init_constructor): Sorry about non-trivial
13906         labeled initializers.
13907         * parse.y (initlist): Re-enable labeled initializers.
13909 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13911         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
13912         all callers changed.  Rely on the new parameter instead of arg
13913         being a TREE_LIST when determine whether we are working inside
13914         template template parameter.  Clean up is_type test.
13916 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
13918         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
13919         * typeck2.c (initializer_constant_valid_p): Allow conversions
13920         between pointers and references.
13922 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
13924         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
13925         if pedantic || warn_pointer_arith.
13927 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13929         * pt.c (unify): Handle TEMPLATE_DECL.
13931 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
13933         * cp-tree.h (strip_attrs): Remove decl.
13935 1998-02-18  Doug Evans  <devans@cygnus.com>
13937         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
13938         Update olddecl's attributes too.
13939         (strip_attrs): Remove function.
13940         * typeck.c (common_type): Call merge_machine_type_attributes.
13942 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
13944         * parse.y (initdcl0_innards): New grammar symbol.
13945         (nomods_initdecls, nomods_initdcl0): Change type from itype to
13946         none, since the resulting value is never used.
13947         (parse_decl): New function.
13948         (datadef): Remove redundant actions.
13949         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
13950         * parse.c: Regenerated.
13952 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
13954         * parse.y (simple_stmt): Use getdecls() to check for decl.
13956 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
13958         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
13959         macros.
13960         (c++.install-common): Install c++filt properly as native or as cross
13961         variant.
13962         (c++.uninstall): Add c++filt.
13964 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
13966         * call.c (standard_conversion): Fix multi-level ptr conversions.
13968 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
13970         * init.c (build_new): Propagate error_mark_node up.
13972 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
13974         * parse.y (simple_stmt): If the condition isn't a declaration,
13975         start the controlled block after the test.
13977 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13979         * call.c (build_over_call): Convert builtin abs, labs and fabs to
13980         tree-codes.
13981         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
13982         builtins.
13984 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
13986         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
13988 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
13990         * cp-tree.h: Add access_protected_virtual_node.
13991         * class.c (init_class_processing): Initialize it.
13992         * decl.c (xref_basetypes): Use it.
13993         * parse.y (base_class_access_list): Likewise.
13995         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
13996         (c++.install-common): Install c++filt.
13998 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14000         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
14002 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
14004         * call.c (reference_binding): Use comptypes when comparing
14005         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
14007 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
14009         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
14010         (really_overloaded_fn): Move check here from is_overloaded_fn.
14011         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
14013 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
14015         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
14016         conversions.
14018 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
14020         * cp-tree.h (push_template_decl): Return the decl passed in, or an
14021         equivalent duplicate.
14022         * decl.c (pushtag): Use the return value from push_template_decl.
14023         (duplicate_decls): When duplicating a template declaration, merge
14024         the DECL_TEMPLATE_RESULTs as well.
14025         (make_implicit_typename): Don't try to dive into typename types to
14026         find a context for making a new implicit typename.
14027         (start_decl): Use the return value from push_template_decl.
14028         (grokdeclarator): Complain about declarations list `const operator
14029         int'.  Since we don't correctly handle in-class initializations of
14030         non-static data members, complain about this (now illegal)
14031         practice.  Issue an error for initializations of non-const statics
14032         since that is illegal as well, and since we don't handle that case
14033         correctly either.
14034         (start_function): Use the return value from push_template_decl.
14035         (start_method): Likewise.
14036         * decl2.c (grokfield): Likewise.  Since the change to
14037         grokdeclarator ensures that all initialized fields are in fact
14038         static, remove a redundant test for TREE_PUBLIC.
14039         * parse.y (initlist): Disable labeled initializers since they do
14040         not work as per the documentation, and since they do not use the
14041         same syntax as the C front end.
14042         * pt.c (push_template_decl): Return the decl passed in, or an
14043         equivalent duplicate.
14044         (lookup_template_class): When searching in a nested context,
14045         use the right arguments.
14046         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
14047         * typeck.c (build_component_ref): Assign the correct type to the
14048         result of build_vfn_ref.
14050 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
14052         * pt.c (convert_nontype_argument): Fix typo.
14053         (check_explicit_specialization): Allow old-style specialization
14054         of class template members.
14056 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
14057                           Manfred Hollstein  <manfred@s-direktnet.de>
14059         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
14060         when deciding to override DECL_ASSEMBLER_NAME.
14062 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
14064         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
14065         * cp-tree.h (flag_do_squangling): Add declaration.
14066         * lang-options.h: Add -fsquangle and -fno-squangle.
14067         * method.c: Add macros and static variables for squangling.
14068         (build_overload_name): Rename to build_mangled_name, add logic for B
14069         compression, and split into process_modifiers and
14070         process_overload_item.
14071         (process_modifiers): New function, to handle constant, reference,
14072         and pointer types.
14073         (process_overload_item): New function, handles issue of type codes.
14074         (build_overload_name): New function, start squangling and call
14075         build_mangled_name.
14076         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
14077         (start_squangling): New function to initialize squangling structs.
14078         (end_squangling): New function to destroy squangling structs.
14079         (nrepeats): Rename variable to Nrepeats.
14080         (issue_nrepeats): New function for issuing 'n' type repeats.
14081         (check_ktype): New function to check for type K name compression.
14082         (build_overload_nested_name): Add a check for K name compression.
14083         (build_qualified_name): Add a check for K name compression and don't
14084         use DECL_ASSEMBLER_NAME when squangling is on.
14085         (check_btype): New function, checks for B type compression.
14086         (build_static_name, build_decl_overload_real): Initiate squangling.
14087         (build_typename_overload, build_overload_with_type): Initiate
14088         squangling
14090 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
14092         * method.c (make_thunk): Avoid name buffer overflow.
14094 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
14096         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
14097         don't define them yet.
14099         * parse.y (nomods_initdcl0): Add constructor_declarator case.
14101 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14103         * config-lang.in (diff_excludes): Use basename only.
14105 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
14107         * tinfo2.cc: Add tinfo for signed char.
14109 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
14111         * search.c (compute_access): Handle protected constructors in derived
14112         classes as accessible.
14114 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
14116         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
14117         Call convert_from_reference sooner.
14119 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
14121         * cvt.c (ocp_convert): Obtain the constant values from constant
14122         decls even if the destination type is the same as the type of the
14123         decl.
14125         * decl2.c (finish_file): Make sure that static inlines with
14126         definitions are not marked DECL_EXTERNAL before returning.
14128 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
14130         * decl.c: Lose arg_looking_for_template.
14131         (lookup_name_real): Likewise.
14132         * parse.y: Lose processing_template_arg, template_arg1.
14133         (primary): Likewise.
14134         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
14136 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14138         * error.c (dump_decl): Fix type of default arguments for template
14139         template parameters and nontype template parameters.
14140         * parse.y (template_parm): Handle invalid default template
14141         template arguments here.
14143         * parse.y (template_parm): Use template_arg instead of PTYPENAME
14144         for default template template argument.
14145         * pt.c (coerce_template_parms): Merge default template argument
14146         codes.  Can treat RECORD_TYPE as template name if it is implicitly
14147         created.  Fix argument index in error message.
14148         * typeck.c (comptypes): Merge template argument comparison codes in
14149         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
14151 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
14153         * lex.c (file_name_nondirectory): Also check for '/'.
14155 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
14157         * parse.y (primary): Deal with statement-expressions in
14158         templates.
14159         * pt.c (tsubst_copy): Handle BIND_EXPR.
14160         * tree.c (mapcar): Likewise.
14162         * call.c (add_template_candidate_real): Pass extra parameter to
14163         fn_type_unification.
14164         * cp-tree.h (fn_type_unification): Add parameter.
14165         * pt.c (fn_type_unification): Add additional parameter to deal with
14166         static member functions.
14167         (get_bindings): Deal with static member functions.
14169         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
14170         (revert_static_member_fn): Declare.
14171         * decl.c (revert_static_member_fn): Remove declaration.  Change
14172         linkage from internal to external.
14173         (cp_finish_decl): Deal with virtual functions in classes local to
14174         template functions.
14175         * decl2.c (finish_file): Don't forget to emit increment/decrement
14176         expressions in initializers for file-scope variables.
14177         * parse.y (typename_sub2): If the typename doesn't names a
14178         template, rather than a type, issue an error message.
14179         * pt.c (check_explicit_specialization): Handle specializations of
14180         static member functions.
14181         (coerce_template_parms): Handle offset references to lists of
14182         member functions.
14183         * search.c (note_debug_info_needed): Don't crash when handed a
14184         type which is being defined.
14185         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
14186         that can happen with some illegal code.
14188 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14190         * call.c (user_harshness): Initialize `code' to 0.
14191         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
14192         (null_ptr_cst_p): Add parentheses around && within ||.
14193         (standard_conversion): Likewise.
14194         (z_candidate): Likewise.
14195         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
14196         (build_object_call): Likewise for `mem_args'.
14197         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
14198         default case in enumeration switch.
14200         * class.c (build_vtable_entry): Add explicit braces to avoid
14201         ambiguous `else'.
14202         (build_class_init_list): Likewise.
14203         (finish_struct_1): Initialize `width' to 0.
14204         (instantiate_type): Initialize `name' to NULL_TREE.  Add
14205         explicit braces to avoid ambiguous `else'.
14207         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
14208         `else'.
14210         * decl.c (grok_reference_init): Eliminate unused parameter, all
14211         callers changed.
14212         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
14213         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
14214         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
14215         (grokdeclarator): Add parentheses around && within ||.  Add
14216         explicit braces to avoid ambiguous `else'.
14217         (grokparms): Initialize `type' to NULL_TREE.
14218         (xref_tag): Remove unused label `just_return'.
14219         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
14220         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
14221         (hack_incomplete_structures): Add parentheses around assignment
14222         used as truth value.
14224         * decl2.c (coerce_delete_type): Hide definition of `e3'.
14226         * error.c: Include <stdlib.h>.
14227         (dump_expr): Change the type of `i' to size_t.  Remove unused
14228         label `error'.
14230         * except.c (init_exception_processing): Remove unused variable `d'.
14231         (expand_throw): Likewise for `label'.
14233         * friend.c (add_friends): Add explicit braces to avoid ambiguous
14234         `else'.
14236         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
14237         (sort_base_init): Likewise for `binfo'.
14238         (expand_member_init): Likewise for `rval'.
14239         (build_member_call): Add parentheses around assignment used as
14240         truth value.
14241         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
14242         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
14243         `old_immediate_size_expand' to 0.
14244         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
14245         (build_vec_delete_1): Remove unused variable `block'.
14246         (expand_vec_init): Initialize `itype' to NULL_TREE.
14248         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
14249         declaration of `index' and `rindex' with autoconf macros.
14250         (reinit_parse_for_expr): Remove unused variables
14251         `look_for_semicolon' and `look_for_lbrac'.
14252         (cons_up_default_function): Initialize `args' to NULL_TREE.
14253         (readescape): Initialize `firstdig' to 0.
14254         (real_yylex): Add parentheses around assignment used as truth value.
14256         * method.c: Include <strings.h> if we don't have <string.h>.
14257         Protect declaration of `index' with autoconf macro.
14259         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
14260         Initialize `type' to NULL_TREE.
14261         (structsp): Remove unused variable `id'.
14263         * pt.c (coerce_template_parms): Add explicit braces to avoid
14264         ambiguous `else'.
14265         (lookup_template_class): Initialize `template' to NULL_TREE.
14266         (instantiate_class_template): Remove unused variable `name' and `e'.
14267         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
14268         (do_poplevel): Initialize `saved_warn_unused' to 0.
14269         (type_unification): Remove unused varable `parm'.
14270         (unify): Likewise for `j'.
14272         * repo.c (init_repo): Add parentheses around assignment used as
14273         truth value.
14274         (finish_repo): Remove unused varable `p'.
14276         * search.c (get_binfo): Initialize `type' to NULL_TREE.
14277         (get_base_distance): Likewise.
14278         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
14279         and `new_v' to NULL_TREE.
14280         (lookup_fnfields): Likewise for `rval_binfo_h'.
14281         (breadth_first_search): Add parentheses around assignment used as
14282         truth value.
14283         (get_template_base): Initialize `type' to NULL_TREE.
14285         * sig.c (append_signature_fields): Initialize `last_mfptr' to
14286         NULL_TREE.
14287         (build_signature_table_constructor): Likewise for
14288         `last_rhs_field', `pfn' and `vt_off'.
14289         (build_sigtable): Likewise for `init'.
14291         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
14292         (propagate_binfo_offsets): Likewise for `delta'.
14293         (hash_tree_cons): Initialize hashcode to 0.
14294         (can_free): Likewise for `size'.
14295         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
14297         * typeck.c (convert_sequence): Hide prototype.
14298         (common_type): Add explicit braces to avoid ambiguous `else'.
14299         (comp_target_types): Likewise.
14300         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
14301         (build_function_call_real): Add explicit braces to avoid ambiguous
14302         `else'.
14303         (convert_arguments): Initialize `called_thing' to 0.
14304         (convert_for_initialization): Initialize `savew' and `savee' to 0.
14306         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
14307         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
14308         (build_x_arrow): Likewise for `last_rval'.
14310         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
14312 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
14314         * decl.c (init_decl_processing): Use set_sizetype.
14315         * decl2.c (sizetype): Don't declare.
14316         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
14317         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
14318         (build_component_addr, unary_complex_lvalue): Likewise.
14319         * rtti.c (expand_class_desc): Likewise.
14320         * class.c (get_vfield_offset): Likewise.
14322 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
14324         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
14325         early to avoid bogus error.  Handle overloaded function
14326         names provided as template arguments correctly.
14327         (coerce_template_parms): Don't mishandle overloaded functions when
14328         dealing with template template parameters.
14329         (lookup_template_class): Issue an error message, rather than
14330         crashing, when the TYPE_DECL provided is not a template type.
14332 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
14334         * class.c (instantiate_type): Don't just return a known type if
14335         it's wrong.
14337 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
14339         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
14340         since that code could never be reached.
14342         * error.c (dump_decl): Avoid aborting in the midst of printing an
14343         error message about an illegal template declaration.
14345         * parse.y (structsp): Print an error message, rather than crashing,
14346         when a class-head does not name a class.
14348         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
14349         template arguments as a g++ extension.
14351         * cp-tree.def (ALIGNOF_EXPR): New tree code.
14352         * decl2.c (grok_alignof): If processing_template_decl, just store
14353         the expression.
14354         * typeck.c (c_alignof): Likewise.
14355         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
14356         * error.c (dump_expr): Likewise.
14357         * pt.c (tsubst_copy): Likewise.
14358         * tree.c (cp_tree_equal): Likewise.
14359         * pt.c (uses_template_parms): Correctly determine whether or not a
14360         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
14361         folding can be done.
14363         * cp-tree.h (grok_enum_decls): Remove type parameter.
14364         * decl.c (grok_enum_decls): Likewise.
14365         * decl2.c (grok_x_components): Call grok_enum_decls
14366         unconditionally, since it will do nothing if there is no
14367         current_local_enum.  Use the new calling sequence.
14368         * pt.c (tsubst_enum): Use the new calling sequence for
14369         grok_enum_decls.
14371         * decl.c (start_function): Make member functions of local classes
14372         in extern inline functions have comdat linkage here...
14373         (grokdeclarator): Rather than here.
14375 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
14377         * pt.c (convert_nontype_argument): Use decl_constant_value.
14379 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
14381         * call.c (add_template_candidate_real): New function.
14382         (add_template_candidate): Use it.
14383         (add_template_conv_candidate): Likewise.
14384         (joust): Pass extra argument to more_specialized.
14385         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
14386         (is_local_class): Remove.
14387         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
14388         * cp-tree.h (is_local_class): Remove.
14389         (perform_array_to_pointer_conversion): Likewise.
14390         (finish_member_template_decl): Add.
14391         (check_explicit_specialization): Return a tree, not an int.
14392         (more_specialized): Take additional argument.
14393         (get_bindings): Likewise.
14394         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
14395         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
14396         (perform_array_to_pointer_conversion): Remove.
14397         * decl.c (saved_scope): Add processing_specialization,
14398         processing_explicit_instantiation fields.
14399         (maybe_push_to_top_level): Save them.
14400         (pop_from_top_level): Restore them.
14401         (grokfndecl): Use new return value from
14402         check_explicit_specialization.
14403         (start_decl): Don't check flag_guiding_decls before pushing
14404         decls.
14405         (cp_finish_decl): Remove previous (bogus) change.
14406         (grok_declarator): Use decl_function_context rather than
14407         is_local_class.
14408         * decl2.c (finish_file): Pass extra argument to get_bindings.
14409         (build_expr_from_tree): Let build_x_component_ref check
14410         validity of arguments rather than doing it here.
14411         * lex.c (cons_up_default_function): Remove code fooling with
14412         processing_specialization, processing_explicit_instantiation
14413         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
14414         * method.c (build_overload_identifier): Mangle local classes in
14415         template functions correctly.
14416         * parse.y (finish_member_template_decl): Move to pt.c.
14417         * pt.c (finish_member_template_decl): Moved here from parse.y.
14418         (print_candidates): New function.
14419         (determine_specialization): Change interface.  Properly look for
14420         most specialized versions of template candidates.
14421         (check_explicit_specialization): Fully process explicit
14422         instantiations.
14423         (push_template_decl): Avoid looking at CLASSTYPE fields in
14424         FUNCTION_DECLS.
14425         (determine_overloaded_function): Remove.
14426         (convert_nontype_argument): Change name from
14427         convert_nontype_parameter.  Use determine_overloaded_function
14428         instead of instantiate_type.
14429         (mangle_class_name_for_template): Handle type contexts as well as
14430         function contexts.
14431         (classtype_mangled_name): Likewise.
14432         (lookup_template_class): Likewise.
14433         (tsubst): Likewise.
14434         (more_specialized): Take explict template arguments as a
14435         parameter.
14436         (most_specialized): Likewise.
14437         (get_bindings): Likewise.  Check that return types match before
14438         proclaiming a function a match.
14439         (do_decl_instantiation): Remove code searching for function to
14440         instantiate; that is now done in check_explicit_specialization.
14441         (add_maybe_template): Pass extra argument to get_bindings.
14442         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
14443         implementation.
14444         * typeck.c (build_component_ref): Check for invalid arguments.
14446 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
14448         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
14449         return_target and call_target are equivalent.
14451         * pt.c (type_unification_real): Just accept function parms that
14452         don't use any template parms.
14454 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
14456         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
14457         unset DECL_NOT_REALLY_EXTERN.
14459         * parse.y (typename_sub*): Fix std::.
14461 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
14463         * error.c (dump_decl): Fix type default template args.
14464         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
14466 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
14468         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
14469         (file_name_nondirectory): Use.
14471 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14473         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
14474         that are not really present.  Substitute default arguments in
14475         template template arguments.  Correctly convert TEMPLATE_DECL to
14476         TEMPLATE_TEMPLATE_PARM.
14477         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
14478         are no longer treated specially here.
14479         * parse.y (template_template_parm): Fix copy error.
14480         * decl.c (grokdeclarator): Warn about missing `typename' for nested
14481         type created from template template parameters.
14482         * parse.y (bad_parm): Likewise
14484         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
14485         (push_nested_class): Likewise.
14486         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
14487         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
14488         (copy_template_template_parm): Declare.
14489         * decl.c (arg_looking_for_template): New variable.
14490         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
14491         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
14492         node if arg_looking_for_template is nonzero.
14493         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
14494         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
14495         (grokdeclarator): Handle TEMPLATE_DECL.
14496         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
14497         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
14498         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
14499         (dump_decl): Handle unnamed template type parameters.
14500         Handle template template parameters.
14501         (dump_function_name): Handle template template parameters.
14502         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
14503         Handle TEMPLATE_TEMPLATE_PARM.
14504         * method.c (build_template_template_parm_names): New function.
14505         (build_template_parm_names): Handle TEMPLATE_DECL.
14506         (build_overload_nested_name, build_overload_name):
14507         Handle TEMPLATE_TEMPLATE_PARM.
14508         * parse.y (maybe_identifier): New nonterminal.
14509         (template_type_parm): Use it.
14510         (template_template_parm, template_arg1): New nonterminal.
14511         (template_parm): Add template_template_parm rules.
14512         (template_arg): Set processing_template_arg.
14513         (template_arg1): Rules moved from template_arg.
14514         (primary, nonnested_type): Set arg_looking_for_template if we are
14515         processing template arguments.
14516         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
14517         (process_template_parm): Handle template template parameters.
14518         (coerce_template_parms, comp_template_args): Likewise.
14519         (mangle_class_name_for_template, lookup_template_class): Likewise.
14520         (uses_template_parms): Handle TEMPLATE_DECL and
14521         TEMPLATE_TEMPLATE_PARM.
14522         (current_template_args): Handle TEMPLATE_DECL.
14523         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
14524         * search.c (dfs_walk, dfs_record_inheritance):
14525         Handle TEMPLATE_TEMPLATE_PARM.
14526         * tree.c (copy_template_template_parm): New function.
14527         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
14528         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
14530 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
14532         * decl.c (start_decl): Don't allow duplicate definitions of static
14533         data members.
14535         * call.c (build_user_type_conversion_1): Handle user-defined
14536         template conversion operators correctly.
14538         * decl2.c (build_expr_from_tree): Issue an error message if the
14539         object in a COMPONENT_REF is a TEMPLATE_DECL.
14541         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
14543         * class.c (is_local_class): New function.
14544         * cp-tree.h (is_local_class): Declare it.
14545         (last_tree): Likewise.
14546         (begin_tree): Likewise.
14547         (end_tree): Likewise.
14548         (lookup_template_class): Change prototype.
14549         * decl.c (cp_finish_decl): Check for NULL where necessary.
14550         Consider FUNCTION_DECLS to declare objects with top-level binding,
14551         when calling make_decl_rtl.
14552         (grokdeclarator): Give members of local classes internal linkage.
14553         (start_function): Remove declaration of last_tree.
14554         (finish_function): Set flag_keep_inline_functions around call to
14555         rest_of_compilation if we are processing a member function in a
14556         local class.
14557         (start_method): Call push_template_decl for member functions of
14558         local classes in template functions.
14559         * decl2.c (import_export_decl): Don't give external linkage to
14560         instantiations of templates with internal linkage.
14561         * parse.y (last_tree): Remove declaration.
14562         (template_type): Pass extra parameter to lookup_template_class.
14563         (self_template_type): Likewise.
14564         (structsp): Move call to reset_specialization into left_curly.
14565         (left_curly): Call reset_specialization, and begin_tree.
14566         * pt.c (saved_trees): New variable.
14567         (mangle_class_name_for_template): Change prototype.  Use
14568         additional function context to name local classes in templates
14569         correctly.
14570         (classtype_mangled_name): Pass the context.
14571         (push_template_decl): Handle local classes and templates, and
14572         member functions for such classes.
14573         (convert_nontype_parameter): Fix handling of pointer-to-member
14574         constants.
14575         (lookup_template_class): Handle local classes in templates.
14576         (tsubst): Likewise.  Don't assume that template instantiations
14577         have external linkage; pay attention to the template declaration.
14578         (mark_decl_instantiated): Likewise.
14579         (begin_tree): New function.
14580         (end_tree): Likewise.
14582         * decl.c (xref_basetypes): Don't call complete_type for basetypes
14583         that involve template parameters; that can lead to infinite
14584         recursion unnecessarily.
14586         * pt.c (register_specialization): Do not register specializations
14587         that aren't ready to be registered yet.
14588         (check_explicit_specialization): Handle explicit specialization of
14589         constructors and destructors.
14590         (build_template_decl): New function.
14591         (push_template_delc): Handle out-of-class specializations of
14592         member templates.
14594         * pt.c (check_explicit_specialization): Set up the template
14595         information before registering the specialization.
14596         (coerce_template_parms): Fix thinko.
14597         (tsubst): Handle specializations of member templates correctly.
14599         * class.c (finish_struct_methods): Remove calls to
14600         check_explicit_specialization from here.
14601         (finish_struct): And insert them here.
14602         * cp-tree.h (perform_qualification_conversions): New function.
14603         (perform_array_to_pointer_conversion): Likewise.
14604         (begin_explicit_instantiation): Likewise.
14605         (end_explicit_instantiation): Likewise.
14606         (determine_specialization): Renamed from
14607         determine_explicit_specialization.
14608         (comp_template_parms): New function.
14609         (processing_explicit_instantiation): New variable.
14610         * cvt.c (perform_qualification_conversions): New function.
14611         (perform_array_to_pointer_conversion): Likewise.
14612         * decl.c (duplicate_decls): Don't consider template functions
14613         alike unless they have the same parameters.  Refine handling of
14614         instantiation/specialization mismatches.
14615         (start_decl): Don't call pushdecl for template specializations,
14616         since they don't affect overloading.
14617         (start_function): Likewise.
14618         (grokfndecl): Call check_explicit_specialization a little later.
14619         Don't call duplicate_decls for memberm template specializations.
14620         (grokdeclarator): Don't update template_count for classes that are
14621         themselves specializations.  Remove use of `2' as parameter to
14622         grokfndecl since that value isn't used.
14623         * lex.c (cons_up_default_function): Save and restore
14624         processing_explicit_instantiation around calls to grokfield.
14625         * parse.y (finish_member_template_decl): New function.
14626         (component_decl_1): Use it.
14627         (fn.def2): Likewise.
14628         (template_arg_list_opt): New nonterminal.
14629         (template_type): Use it.
14630         (self_template_type): Likewise.
14631         (template_id): Likewise.
14632         (object_template_id): Likewise.
14633         (notype_template_declarator): Likwise.
14634         (begin_explicit_instantiation): Likewise.
14635         (end_explicit_instantiation): Likewise.
14636         (explicit_instantiation): Use them.
14637         * pt.c (coerce_template_parms): Add parameters.
14638         (processing_explicit_instantiation): New variable.
14639         (convert_nontype_parameter): New function.
14640         (determine_overloaded_function): Likewise.
14641         (begin_explicit_instantiation): Likewise.
14642         (end_explicit_instantiation): Likewise.
14643         (retrieve_specialization): Likewise.
14644         (register_specialization): Likewise.
14645         (processing_explicit_specialization): Removed.
14646         (determine_specialization): Handle specializations of member
14647         functions of template class instantiations.
14648         (check_explicit_specialization): Refine to conform to standard.
14649         (comp_template_parms): New function.
14650         (coerce_template_parms): Call convert_nontype_parameter.
14651         (tsubst): Refine handling of member templates.  Use
14652         register_specialization.
14653         (instantiate_template): Use retrieve_specialization.
14654         (do_decl_instantiation): Likewise.
14655         (instantiate_decl): Likewise.
14656         (type_unification): Improve handling of explict template
14657         arguments.
14658         * tree.c (mapcar): Return error_mark_node, rather than aborting,
14659         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
14660         * typeck.c (build_unary_op): Call determine_specialization, rather
14661         than determine_explicit_specialization.
14663 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
14665         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
14667 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14669         * error.c (dump_decl): For enum tags, output the tag, not its value.
14671 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
14673         * decl.c (init_decl_processing): Only call init_rtti_processing
14674         FLAG_RTTI is set.
14676 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
14678         * init.c (build_new_1): Split out from build_new.
14679         (build_new): Just return a NEW_EXPR.
14680         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
14682         * decl2.c (get_temp_regvar): Tweak.
14684         * cp-tree.h (TREE_CALLS_NEW): Comment out.
14685         * class.c (resolves_to_fixed_type_p): Remove use.
14686         * method.c (build_opfncall): Likewise.
14687         * call.c (build_new_op): Likewise.
14689 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
14691         * exception.cc (__eh_alloc, __eh_free): New fns.
14692         (__cp_push_exception, __cp_pop_exception): Use them.
14693         (__uncatch_exception): Call terminate here if no exception.
14694         * except.c (build_terminate_handler): New fn.
14695         (expand_start_catch_block): Use it.
14696         (expand_exception_blocks): Likewise.
14697         (alloc_eh_object): New fn.
14698         (expand_throw): Use it.  Protect exception init with terminate.
14699         * typeck.c (build_modify_expr): Remove code that ignores trivial
14700         methods.
14702 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14704         * call.c (add_builtin_candidate): Add default case in enumeration
14705         switch.
14706         (build_new_op): Likewise.
14707         (convert_like): Likewise.
14708         * cvt.c (build_expr_type_conversion): Likewise.
14709         * tree.c (real_lvalue_p): Likewise.
14710         (lvalue_p): Likewise.
14711         (cp_tree_equal): Likewise.
14712         * typeck.c (comptypes): Likewise.
14713         (build_component_ref): Likewise.
14714         (build_function_call_real): Likewise.
14715         (build_binary_op_nodefault): Likewise.
14716         (build_unary_op): Likewise.
14717         (build_modify_expr): Likewise.
14718         * typeck2.c (initializer_constant_valid_p): Likewise.
14720 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
14722         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
14724 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
14726         * pt.c (coerce_template_parms): Make sure to digest_init if
14727         possible.
14729         * decl.c (duplicate_decls): Make the newdecl virtual if the
14730         olddecl was, just as is done with other attributes of olddecl.
14732 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
14734         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
14735         address of an OFFSET_REF.
14737         * cp-tree.def: Add AGGR_INIT_EXPR.
14738         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
14739         AGGR_INIT_EXPR where appropriate.
14740         * expr.c (cplus_expand_expr): Likewise.  Simplify.
14742         * decl2.c (finish_file): Remove call to register_exception_table.
14744 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14746         * pt.c (instantiate_class_template): Don't do injection when
14747         processing_template_decl is true, as pollutes current_binding_level
14748         for base classes.
14750 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
14752         * pt.c (maybe_fold_nontype_arg): Add prototype.
14754 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
14756         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
14757         * error.c (dump_expr): Likewise.
14759 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
14761         * typeck.c (build_function_call_real): Remove "inline called before
14762         definition" pedwarn.
14764         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
14766 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
14768         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
14770         * pt.c (type_unification_real): Change __null to type void* with
14771         a warning.
14773 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
14775         * call.c (implicit_conversion): Don't call
14776         build_user_type_conversion_1 with a NULL expr, since it will
14777         crash.
14779         * pt.c (unify): Don't try to unify array bounds if either array is
14780         unbounded.
14782 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14784         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
14785         Replace extern decls with casts.
14787         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
14788         Update last_parm_cleanup_insn.
14789         (store_after_parms): Remove.
14790         * cp-tree.h: Adjust.
14792 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
14794         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
14795         (finish_file): Check DECL_COMDAT instead of weak|one_only.
14796         (import_export_vtable): Use make_decl_one_only instead of
14797         comdat_linkage for win32 tweak.
14798         (import_export_decl): Likewise.
14799         * pt.c (mark_decl_instantiated): Likewise.
14801         * decl2.c (finish_file): Lose handling of templates in pending_statics.
14803 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
14805         * decl2.c (finish_file): Lose call to expand_builtin_throw.
14806         * except.c (expand_builtin_throw): Remove.
14807         * cp-tree.h: Remove ptr_ptr_type_node.
14808         * decl.c: Likewise.
14810 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
14812         * decl.c (ptr_ptr_type_node): Define.
14813         (init_decl_processing): Initialize it.
14814         * cp-tree.h: Declare it.
14815         * exception.cc (__cp_exception_info): Use __get_eh_info.
14816         (__cp_push_exception): Likewise.
14817         (__cp_pop_exception): Likewise.
14819         From Scott Snyder <snyder@d0sgif.fnal.gov>:
14820         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
14821         saved_pc.
14822         (init_exception_processing): Removed saved_pc initialization.
14824 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
14826         * pt.c (instantiate_decl): Defer all templates but inline functions.
14828 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
14830         * init.c (expand_vec_init): Don't fold a list of parameters.
14832         * decl.c (copy_args_p): Handle copy elision for types with virtual
14833         bases.
14834         * call.c (build_over_call): Likewise.
14836 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
14838         * pt.c (lookup_template_function): Copy the template arguments,
14839         not just the list containing them, to the permanent obstack.
14841 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14843         * except.c (expand_start_catch_block): suspend_momentary for the
14844         terminate handler.
14846         * error.c (dump_decl): Handle LOOKUP_EXPR.
14848 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
14850         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
14851         permanent obstack if we are processing a template decl.
14852         * typeck.c (build_static_cast): Likewise.
14853         (build_const_cast): Likewise.
14854         (build_reinterpret_cast): Likewise.
14856         * pt.c (coerce_template_parms): Coerce some expressions, even
14857         when processing_template_decl.
14859 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14861         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
14862         handling of pointer difference expressions.
14864         * typeck.c (comp_target_types): Comparison of function/method types
14865         is independent of nptrs.
14867 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
14869         * pt.c (tsubst): Avoid creating pointer to reference and
14870         reference to reference types.
14872 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
14874         * parse.y (do_id): New nonterminal.
14875         (template_id): Use it.
14877 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
14879         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
14880         * spew.c (yylex): Don't do_identifier here.
14881         * decl2.c (build_expr_from_tree): Revert last change.
14883         * decl2.c (build_expr_from_tree): Expand the name for a method call.
14884         * parse.y (object_template_id): Don't try to take the DECL_NAME.
14886 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
14888         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
14889         alloc_expr.
14890         * call.c (build_op_delete_call): Adjust.
14892         * except.c (expand_end_catch_block): Lose rethrow region.
14893         (expand_start_catch_block): Likewise.
14894         (expand_end_catch_block): Don't expand_leftover_cleanups.
14896 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14898         * pt.c (tsubst): Remove tree_cons call (places redundant info into
14899         DECL_TEMPLATE_INSTANTIATION).
14901 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
14903         * tree.c (is_overloaded_fn): Handle getting a fn template.
14904         (really_overloaded_fn): Likewise.
14905         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
14906         * pt.c (check_explicit_specialization): Tweak.
14907         (determine_explicit_specialization): Tweak.
14909         * tree.c, cp-tree.h (get_target_expr): New fn.
14911 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
14913         * pt.c (check_explicit_specialization): Fix misspelling in
14914         diagnostic: `preceeded'.
14915         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
14916         `conversiona'.
14918 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
14920         * pt.c (determine_explicit_specialization): Avoid an internal
14921         error for bad specializations.
14923         * method.c (build_overload_value): Handle SCOPE_REF.
14925 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
14927         * class.c (prepare_fresh_vtable): Enable even more complex MI
14928         vtable names.
14930 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
14932         * exception.cc (__check_eh_spec): Optimize a bit.
14934         * exception.cc (__cp_pop_exception): Lose handler arg.
14935         * except.c (do_pop_exception): Likewise.
14936         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
14937         (expand_end_catch_block): Likewise.
14939 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14941         * pt.c (check_explicit_specialization): Complain about using a
14942         template-id for a non-specialization.
14944 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
14946         * repo.c: Prototype rindex only if needed.
14947         * xref.c: Likewise.
14949 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14951         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
14953 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
14955         * typeck.c (build_const_cast): Handle references here instead of
14956         handing off to convert_to_reference.
14958         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
14959         TerminateFunctionCall.
14960         (init_exception_processing): Likewise.  Terminate et al are now
14961         the fns, not ADDR_EXPRs.
14962         (various): Lose redundant assemble_external calls.
14963         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
14965         * cp-tree.h (struct lang_decl_flags): Add comdat.
14966         (DECL_COMDAT): New macro.
14967         * decl.c (duplicate_decls): Propagate it.
14968         (cp_finish_decl): Handle it.
14969         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
14971         * class.c: Remove static pending_hard_virtuals.
14972         (add_virtual_function): Take pointers to pending_virtuals
14973         and pending_hard_virtuals.
14974         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
14976 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
14978         * decl2.c (import_export_vtable): If we support one_only but not
14979         weak symbols, mark instantiated template vtables one_only.
14980         (import_export_decl): Likewise for tinfo functions.
14981         (finish_vtable_vardecl): Also write out vtables from explicitly
14982         instantiated template classes.
14983         * pt.c (mark_class_instantiated): Revert last change.
14985         * except.c (expand_throw): Call mark_used on the destructor.
14987 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
14989         * lex.c (lang_init): Enable flag_exceptions by default if no
14990         command line switch was specified.
14992 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
14994         * pt.c (unify): Handle `void' template parameters in
14995         specializations.
14997 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
14999         * rtti.c (build_dynamic_cast): Handle template case here.
15000         (build_dynamic_cast_1): Not here.
15002         * typeck2.c (digest_init): Make copies where appropriate.
15004         * decl2.c (delete_sanity): resolve_offset_ref.
15006         * except.c: Call terminate without caching so many bits.
15008         * except.c (expand_start_catch_block): Fix catching a reference
15009         to pointer.
15011 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
15013         * init.c (build_new): Copy size to the saveable obstack.
15015         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
15016         TRY_CATCH_EXPR for now.
15018 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
15020         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
15021         has DECL_LANG_SPECIFIC.
15023         * exception.cc (struct cp_eh_info): Add handlers field.
15024         (__cp_push_exception): Initialize it.
15025         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
15026         (__throw_bad_exception): Remove.
15027         * except.c (call_eh_info): Add handlers field.
15028         (get_eh_handlers): New fn.
15029         (push_eh_cleanup): Increment handlers.
15031 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
15033         * except.c (expand_start_eh_spec): Use the try/catch code.
15034         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
15035         doing everything inline.
15036         (init_exception_processing): throw_type_match now takes
15037         const void pointers.
15038         * exception.cc (__check_eh_spec): New fn.
15039         * inc/exception: Neither terminate nor unexpected return.
15040         * decl.c: Make const_ptr_type_node public.
15041         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
15043         * except.c (expand_start_catch_block): We only need the rethrow
15044         region for non-sjlj exceptions.
15045         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
15047 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
15049         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
15050         (various.o): Likewise.
15051         * inc/new: Add placement deletes.  Add throw specs for default new.
15052         * new.cc (set_new_handler): Move here from libgcc2.
15053         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
15054         (new): Move from libgcc2.  Throw bad_alloc.
15055         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
15056         * decl.c (init_decl_processing): Update exception specs on new and
15057         delete.
15059         * method.c (build_decl_overload_real): Don't mess with global
15060         placement delete.
15062         * init.c (build_new): Check for null throw spec, not nothrow_t.
15064         * decl.c (duplicate_decls): Don't complain about different exceptions
15065         from an internal declaration.
15067         * call.c (build_op_delete_call): Fix check for member fns again.
15069         * decl2.c (import_export_decl): Interface hackery affects
15070         virtual synthesized methods.
15072 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15074         * decl.c (start_decl): Don't just complain about a mismatched
15075         scope, fix it.
15077         * decl.c (make_implicit_typename): Handle case where t is not
15078         actually from context.
15079         * tree.c (get_type_decl): Lose identifier case.
15080         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
15081         * parse.y (nonnested_type): Just use lookup_name.
15082         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
15084 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
15086         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
15087         T was built in C language context (for example, by
15088         output_func_start_profiler).
15090 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
15092         * decl.c (make_implicit_typename): New fn.
15093         (lookup_name_real): Use it.  Use current_class_type as the context.
15095 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
15097         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
15099 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15101         * friend.c (do_friend): Warn about non-template friends in templates.
15103         * call.c (build_op_delete_call): Fix handling of inherited delete.
15105         * search.c (dfs_record_inheritance): Ignore template type parms.
15107 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
15109         * call.c (build_new_op): Fix copy error.
15110         (build_op_new_call): New fn.
15111         (build_op_delete_call): New fn.
15112         * cp-tree.h: Declare them.
15113         * init.c (build_new): Use them.  Support placement delete.
15114         (build_x_delete): Use build_op_delete_call.
15115         (build_delete): Likewise.
15116         * decl2.c (delete_sanity): Likewise.
15117         (coerce_delete_type): Don't complain about placement delete.
15119 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
15121         * call.c (build_new_function_call): Remove unused 'obj' parm.
15122         * cp-tree.h, typeck.c: Adjust.
15124         * init.c (build_new): Make the cleanup last longer.
15125         (expand_vec_init): Call do_pending_stack_adjust.
15127 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
15129         * pt.c (do_type_instantiation): Fix typo.
15130         (mark_class_instantiated): If we support one_only but not weak
15131         symbols, don't mark this as known.
15133         * init.c (build_new): Handle vec delete in EH cleanup.
15135 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15137         * call.c (build_method_call): Call complete_type before checking
15138         for destructor.
15140 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
15142         * decl.c (add_block_current_level): Delete.
15143         * init.c (build_vec_delete_1): Delete build_block and
15144         add_block_current_level calls.
15146 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
15148         * init.c (build_new): Handle freeing allocated memory when the
15149         constructor throws.
15151         * call.c (build_new_method_call): Fix flags arg.
15153         * pt.c (do_type_instantiation): Don't try to instantiate
15154         member templates.
15155         (mark_decl_instantiated): If we support one_only but not
15156         weak symbols, mark this one_only.
15157         * decl2.c (import_export_vtable): Don't defer handling of vtables
15158         if MULTIPLE_SYMBOL_SPACES.
15160 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
15162         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
15164 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
15166         * except.c (do_pop_exception): Return a value.
15168 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
15170         * call.c (build_new_method_call): Handle getting a
15171         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
15172         if we got template parms.
15173         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
15174         not just the args.
15175         * decl2.c (build_expr_from_tree): Tweak last change.
15176         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
15177         (maybe_fold_nontype_arg): Split out from tsubst_copy.
15178         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
15180 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
15182         * pt.c (tsubst_copy): Handle explicit template arguments in
15183         function calls.
15184         * typeck.c (build_x_function_call): Likewise.
15185         * decl2.c (build_expr_from_tree): Lookup function name if it
15186         hasn't been done.
15188         * pt.c (tsubst): Instantiate template functions properly when
15189         template parameter does not appear in function arguments and return
15190         type.
15191         (comp_template_args): Handle member templates required by tsubst.
15193 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
15195         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
15196         previous change.
15198 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15200         * pt.c (coerce_template_parms): Tweak error message.
15202         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
15203         return type defaults to `int', even if there are storage-class
15204         specifiers.
15206 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
15208         Complete nested exception support.
15209         * except.c (do_pop_exception): Split out...
15210         (push_eh_cleanup): From here.  Handle the EH region by hand.
15211         (expand_start_catch_block): Add a new level for the catch parm.
15212         Move the rethrow region outside the two cleanup regions.
15213         Protect the initializer for the catch parm with terminate.
15214         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
15215         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
15216         popping off the middle of the stack.
15217         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
15218         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
15219         (build_cplus_new): Only wrap CALL_EXPRs.
15220         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
15221         the constructor call.
15223 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15225         * Make-lang.in (c++.distdir): Make inc subdirectory.
15227 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15229         * decl2.c (finish_file): Put back some code.
15231 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15233         * decl2.c (finish_file): Remove redundant code.
15234         * method.c (emit_thunk): Don't let the backend defer generic thunks.
15236 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
15238         * except.c (call_eh_info): Split out...
15239         (push_eh_info): From here.
15240         (expand_builtin_throw): Use it.
15241         (expand_start_catch_block): Move region start back.
15243 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
15245         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
15246         (real_yylex): Record wide strings using target endianness, not host.
15248 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
15250         * repo.c (rindex): Add decl unconditionally.
15251         (get_base_filename, open_repo_file): Don't cast rindex.
15252         * xref.c (rindex): Add decl unconditionally.
15253         (index): Remove unused decl.
15254         (open_xref_file): Don't cast rindex.
15256 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
15258         * class.c (build_vbase_path): Propagate the result type properly.
15260 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
15262         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
15263         remaining use of saved_throw_type with a call to get_eh_type.
15265 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
15267         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
15268         (file_name_nondirectory): New function, doing the same as the macro.
15269         (set_typedecl_interface_info): Use it instead of the macro.
15270         (check_newline): Likewise.
15271         (handle_cp_pragma): Likewise.
15273         * repo.c (get_base_filename): Cast result of rindex to char*.
15274         (open_repo_file): Likewise.
15275         * xref.c (open_xref_file): Likewise.
15276         * error.c (dump_char): Make its arg int, not char.
15278         * except.c (push_eh_info): Pass the number of fields - 1 down, not
15279         the exact number of fields.
15281 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
15283         Support for nested exceptions.
15284         * tinfo2.cc (__is_pointer): New fn.
15285         * exception.cc (struct cp_eh_info): Define.
15286         (__cp_exception_info, __uncatch_exception): New fns.
15287         (__cp_push_exception, __cp_pop_exception): New fns.
15288         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
15289         Lose empty_fndecl.
15290         (init_exception_processing): Likewise.  __eh_pc is now external.
15291         (push_eh_info): New fn.
15292         (get_eh_{info,value,type,caught}): New fns.
15293         (push_eh_cleanup): Just call __cp_pop_exception.
15294         (expand_start_catch_block): Use push_eh_info.  Start the eh region
15295         sooner.
15296         (expand_end_eh_spec): Use push_eh_info.
15297         (expand_throw): Call __cp_push_exception to set up the exception info.
15298         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
15299         when we rethrow.
15300         (expand_builtin_throw): Don't refer to empty_fndecl.
15302 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
15304         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
15306 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
15308         * method.c (build_template_parm_names, build_decl_overload_real):
15309         Add static to definitions.
15310         * pt.c (add_to_template_args, note_template_header,
15311         processing_explicit_specialization, type_unification_real): Likewise.
15312         ({determine,check}_explicit_specialization): Use a single string for
15313         error messages.
15315 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
15317         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
15318         (expand_end_catch_block): Likewise.
15319         (expand_end_eh_spec): Likewise.
15321 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
15323         * decl.c (duplicate_decls): Handle template specializations
15324         correctly.
15325         * error.c (dump_function_name): Fix printing of specializations of
15326         member functions that are not member templates.
15327         * cp-tree.h (processing_specialization): Make global.
15328         * pt.c (processing_specialization): Likewise.
15329         * lex.c (cons_up_default_function): Save and restore
15330         processing_specialization to avoid confusion.
15332 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
15334         * decl.c (init_decl_processing): Give null_node unknown* type.
15335         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
15336         (common_type): Likewise.
15337         * error.c (args_as_string): Recognize null_node.
15339 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15341         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
15342         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
15344         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
15346         * Make-lang.in (g++): Include prefix.o.
15348 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
15350         * pt.c (determine_explicit_specialization): Initialize "dummy"
15351         to keep Purify quiet.
15353 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
15355         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
15356         (build_overload_int): Not here.
15358 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
15360         * class.c (build_type_pathname): Remove.
15361         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
15363 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
15365         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
15366         &&label GNU extension.
15368 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
15370         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
15371         so as to avoid incorrect manglings.
15372         * method.c (build_decl_overload_real): Don't mangle return types
15373         for constructors.
15375 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15377         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
15378         scratch_tree_cons): Define as macros for now.
15379         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
15380         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
15381         typeck2.c: Use them and the expression_obstack variants.
15383 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15385         * decl.c (store_return_init): Allow classes with explicit ctors to
15386         be used with the named return values extension.
15388 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
15390         * pt.c (instantiate_decl): Fix previous change.
15392 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
15394         * pt.c (tsubst): Fix thinko.
15395         (instantiate_decl): Really use the original template.
15397         * call.c (build_new_method_call): Use simple constructor_name for
15398         error messages.
15400 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
15402         * method.c (build_underscore_int): Don't use ANSI specific
15403         features.
15405 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
15407         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
15408         for our key method; it might have been inlined by -O3.
15410 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
15412         * decl.c (make_typename_type): Do not try to call lookup_field for
15413         non-aggregate types.
15415 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
15417         * typeck.c (build_reinterpret_cast): Tweak.
15419 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
15421         * typeck.c (build_reinterpret_cast): Converting a void pointer
15422         to function pointer with a reinterpret_cast produces a warning
15423         if -pedantic is issued.
15425 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15427         * typeck.c (c_expand_return): Don't warn about returning a
15428         reference-type variable as a reference.
15430 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
15432         * method.c (build_static_name): Fix typo.
15434 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
15436         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
15437         OLDDECL before we try to do DECL_USE_TEMPLATE.
15439 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
15441         * decl.c (duplicate_decls): Don't warn about template instances.
15443         * typeck.c (mark_addressable): Lose ancient code that unsets
15444         DECL_EXTERNAL.
15446         * pt.c (do_decl_instantiation): Lose support for instantiating
15447         non-templates.
15449         * call.c (build_new_function_call): Fix handling of null explicit
15450         template args.
15451         (build_new_method_call): Likewise.
15453 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
15455         * method.c (build_underscore_int): Fix typo.
15457 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
15459         * tree.c (print_lang_statistics): #if 0 call to
15460         print_inline_obstack_statistics until its definition is checked in.
15462 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
15464         * decl2.c (finish_file): Move dump_tree_statistics to end.
15466         * pt.c (instantiate_decl): Look for the original template.
15467         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
15468         of member templates.
15470 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
15472         * Makefile.in (g++FAQ.*): New rules.
15473         (CONFLICTS): Update.
15474         * g++FAQ.texi: Moved from libg++.
15476         * parse.y (PFUNCNAME): Only specify the type once.
15478 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
15480         * lex.c (real_yylex): Clean up the code to fully behave the way
15481         the c-lex.c parser does for complex and real numbers.
15483 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
15485         * method.c (build_decl_overload_real): Reformat.
15487 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
15489         * method.c (synthesize_method): If at_eof, determine our linkage.
15491 1997-09-29  Paul Eggert  <eggert@twinsun.com>
15493         * lex.c (real_yylex): Treat `$' just like `_', except issue a
15494         diagnostic if !dollars_in_ident or if pedantic.
15496         * lang-specs.h (@c++): -ansi no longer implies -$.
15498         * decl2.c (lang_decode_option):
15499         -traditional and -ansi now do not mess with
15500         dollars_in_ident.
15502 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
15504         * Makefile.in (parse.o, decl.o): Also depend on
15505         $(srcdir)/../except.h $(srcdir)/../output.h.
15506         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
15507         $(srcdir)/../except.h $(srcdir)/../output.h.
15508         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
15509         ../insn-codes.h.
15511         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
15513         * expr.c (cplus_expand_expr): Make it static.
15515         * decl2.c, init.c, typeck.c: Include "expr.h".
15516         (expand_expr): Use proper values when calling the function.
15518 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
15520         * lang-options.h: New -Wold-style-cast flag.
15521         * cp-tree.h (warn_old_style_cast): New variable.
15522         * decl2.c (warn_old_style_cast): Likewise.
15523         (lang_decode_option): Support -Wold-style-cast.
15524         (reparse_absdcl_as_casts): Produce old-style-cast warning.
15526 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15528         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
15529         TREE_USED, reset value based on already_used.
15531         * init.c (expand_member_init): Revert change.
15533 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
15535         * cp-tree.h, decl.c, decl2.c, pt.c:
15536         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
15538         * decl2.c (lang_decode_option): Add missing ;.
15540 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
15542         * friend.c (do_friend): Disable injection for all template-derived
15543         decls.
15544         * decl2.c (lang_decode_option): Handle -fguiding-decls.
15545         * parse.y (notype_template_declarator): New nonterminal.
15546         (direct_notype_declarator): Use it.
15547         (complex_direct_notype_declarator): Likewise.
15548         (object_template_id): Accept any kind of identifier after TEMPLATE.
15549         (notype_qualified_id): Don't add template declarators here.
15551 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
15553         * call.c (add_template_candidate): Add explicit_targs parameter.
15554         (build_scoped_method_call): Use it.
15555         (build_overload_call_real): Likewise.
15556         (build_user_type_conversion_1): Likewise.
15557         (build_new_function_call): Likewise.
15558         (build_object_call): Likewise.
15559         (build_new_op): Likewise.
15560         (build_new_method_call): Likewise.
15561         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
15562         (build_new_method_call): Likewise.
15564         * class.c (finish_struct_methods): Add specialization pass to
15565         determine which methods were specializing which other methods.
15566         (instantiate_type): Handle TEMPLATE_ID_EXPR.
15568         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
15570         * cp-tree.h (name_mangling_version): New variable.
15571         (flag_guiding_decls): Likewise.
15572         (build_template_decl_overload): New function.
15573         (begin_specialization): Likewise.
15574         (reset_specialization): Likewise.
15575         (end_specialization): Likewise.
15576         (determine_explicit_specialization): Likewise.
15577         (check_explicit_specialization): Likewise.
15578         (lookup_template_function): Likewise.
15579         (fn_type_unification): Add explicit_targs parameter.
15580         (type_unification): Likewise.
15582         * decl.c (duplicate_decls): Add smarts for explicit
15583         specializations.
15584         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
15585         specializations.
15586         (grokfndecl): Call check_explicit_specialization.
15588         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
15589         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
15590         (check_classfn): Handle specializations.
15592         * error.c (dump_function_name): Print specialization arguments.
15594         * friend.c (do_friend): Don't call pushdecl for template
15595         instantiations.
15597         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
15599         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
15600         and -fno-guiding-decls.
15602         * lex.c (identifier_type): Return PFUNCNAME for template function
15603         names.
15605         * method.c (build_decl_overload_real): New function.
15606         (build_template_parm_names): New function.
15607         (build_overload_identifier): Use it.
15608         (build_underscore_int): New function.
15609         (build_overload_int): Use it.  Add levels for template
15610         parameters.
15611         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
15612         (build_overload_nested_names): Handle template type parameters.
15613         (build_template_decl_overload): New function.
15615         * parse.y (YYSTYPE): New ntype member.
15616         (nested_name_specifier): Use it.
15617         (nested_name_specifier_1): Likewise.
15618         (PFUNCNAME): New token.
15619         (template_id, object_template_id): New non-terminals.
15620         (template_parm_list): Note specializations.
15621         (template_def): Likewise.
15622         (structsp): Likewise.
15623         (fn.def2): Handle member template specializations.
15624         (component_decl_1): Likewise.
15625         (direct_notype_declarator): Handle template-ids.
15626         (component_decl_1): Likewise.
15627         (direct_notype_declarator): Handle template-ids.
15628         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
15630         * pt.c (processing_specializations): New variable.
15631         (template_header_count): Likewise.
15632         (type_unification_real): New function.
15633         (processing_explicit_specialization): Likewise.
15634         (note_template_header): Likewise.
15635         (is_member_template): Handle specializations.
15636         (end_template_decl): Call reset_specialization.
15637         (push_template_decl): Handle member template specializations.
15638         (tsubst): Likewise.
15639         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
15640         (instantiate_template): Handle specializations.
15641         (instantiate_decl): Likewise.
15642         (fn_type_unification): Handle explicit_targs.
15643         (type_unification): Likewise.  Allow incomplete unification
15644         without an error message, if allow_incomplete.
15645         (get_bindings): Use new calling sequence for fn_type_unification.
15647         * spew.c (yylex): Handle PFUNCNAME.
15649         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
15650         (really_overloaded_fn): Likewise.
15651         (get_first_fn): Handle function templates.
15653         * typeck.c (build_x_function_call): Use really_overloaded_fn.
15654         Handle TEMPLATE_ID_EXPR.
15655         (build_x_unary_op): Likewise.
15656         (build_unary_op): Likewise.
15657         (mark_addressable): Templates whose address is taken are marked
15658         as used.
15660 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
15662         * decl.c (init_decl_processing): Declare __builtin_constant_p as
15663         accepting any kind of type, not only int.
15665 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
15667         * search.c (get_matching_virtual): Notice virtual bases when sorrying
15668         about covariant returns.
15670         * parse.y (member_init): Also imply typename here.  Remove ancient
15671         extension for initializing base members.
15673 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
15675         Handle multi-level typenames and implicit typename in base list.
15676         * parse.y (typename_sub{,[0-2]}): New rules.
15677         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
15678         (nonnested_type): New rule.
15679         (complete_type_name): Use it.
15680         (base_class.1): Use typename_sub and nonnested_type.
15681         (nested_name_specifier): Don't elide std:: here.
15682         * decl.c (make_typename_type): Handle getting a type for NAME.
15683         (lookup_name_real): Turn std:: into :: here.
15685         Rvalue conversions were removed in London.
15686         * call.c (is_subseq): Don't consider lvalue transformations.
15687         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
15688         (joust): Re-enable ?: kludge.
15690 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
15692         * decl.c (start_function): Up warning of no return type to be a
15693         pedwarn.
15695 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15697         * init.c (expand_member_init): Don't set TREE_USED.
15698         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
15699         set,don't clear TREE_USED wholesale.
15701 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
15703         * call.c (build_over_call): Do require_complete_type before
15704         build_cplus_new.
15706 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
15708         * search.c (lookup_field): Call complete_type in all cases.
15710         * decl.c (finish_function): Just warn about flowing off the end.
15712 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
15714         * decl.c (grokparms): Don't bash a permanent list node if we're
15715         in a function.
15717 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
15719         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
15721 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
15723         * call.c (build_new_op): Give better error for syntactically
15724         correct, but semantically invalid, use of undeclared template.
15726         * call.c (compare_qual): Handle pmfs.
15728         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
15729         after the exception spec.
15731 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
15733         * call.c (null_ptr_cst_p): Integer type, not integral type.
15735         * call.c (joust): Disable warnings until they can be moved to the
15736         right place.
15738 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
15740         * Makefile.in, config-lang.in:  Convert to autoconf.
15742 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
15744         * decl.c (lookup_name_real): Add implicit 'typename' to types from
15745         base classes.
15747         * pt.c (most_specialized_class): Fix typo.
15748         (tsubst): Move constant folding to TREE_VEC case.
15750 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
15752         * pt.c (do_poplevel): Don't warn about unused local variables
15753         while processing_template_decl since we don't always know whether
15754         or not they will need constructing/destructing.
15756         * pt.c (uses_template_parms): Check the values of an enumeration
15757         type to make sure they don't depend on template parms.
15759         * decl.c (make_typename_type): Don't lookup the field if the
15760         context uses template parms, even if we're not
15761         processing_template_decl at the moment.
15763         * pt.c (coerce_template_parms): Avoid looking at the
15764         TYPE_LANG_DECL portion of a typename type, since there won't be
15765         one.
15766         (tsubst): Do constant folding as necessary to make sure that
15767         arguments passed to lookup_template_class really are constants.
15769 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
15771         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
15772         * decl2.c (finish_file): Only register exception tables if we
15773         need to.
15775         * decl.c (init_decl_processing): Add __builtin_[fs]p.
15777 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
15779         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
15781 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
15783         * error.c (dump_decl): Avoid crashing when presented with a
15784         uninitialized constant, as can occur with a template parameter.
15785         (dump_expr): Make sure that there are enough levels of
15786         current_template_parms before we start diving through them.
15788 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
15790         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
15791         c-typeck.c.
15793 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15795         * except.c (expand_throw): Call build_delete for all
15796         exception types, not just objects with destructors.
15798 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
15800         * decl.c (current_local_enum): Remove static.
15801         * pt.c (tsubst_enum): Save and restore value of current_local_enum
15802         in case template is expanded in enum decl.
15803         (instantiate_class_template): Use new tsubst_enum signature.
15804         (tsubst_expr): Likewise.
15806 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
15808         * pt.c (begin_member_template_processing): Take a function as
15809         argument, not a set of template arguments.  Use the template
15810         parameters, rather than the arguments.  Handle non-type parameters
15811         correctly.  Push a binding level for the parameters so that multiple
15812         member templates using the same parameter names can be declared.
15813         (end_member_template_processing): Pop the binding level.
15814         (push_template_decl): Mark member templates as static when
15815         appropriate.
15817         * lex.c (do_pending_inlines): Pass the function, not its template
15818         arguments, to begin_member_template_processing.
15819         (process_next_inline): Likewise.
15820         (do_pending_defargs): Likewise.
15822         * error.c (dump_expr): Obtain the correct declaration for a
15823         TEMPLATE_CONST_PARM.
15825         * call.c (add_template_conv_candidate): New function.
15826         (build_object_call): Handle member templates, as done in the other
15827         build_ functions.
15829 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
15831         * decl.c (replace_defag): Undo previous change.
15832         * lex.c (do_pending_defargs): Deal with member templates.
15834         * pt.c (is_member_template): Avoid crashing when passed a
15835         non-function argument.
15837 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
15839         * class.c (grow_method): Remove check for redeclaration.
15841 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
15843         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
15844         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
15845         (PRIMARY_TEMPLATE_P): Use it.
15846         * call.c (build_overload_call_real): Use it.
15847         * class.c (instantiate_type): Likewise.
15848         * decl.c (decls_match): Likewise.
15849         * method.c (build_overload_identifier): Likewise.
15850         * pt.c (push_template_decl): Likewise.
15851         (classtype_mangled_name): Likewise.
15852         (lookup_template_class): Likewise.
15854         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
15855         DECL_NTPARMS to conform to usage elsewhere.
15856         * call.c (add_template_candidate): Likewise.
15857         * class.c (instantiate_type): Likewise.
15858         * pt.c (instantiate_template): Likewise.
15859         (get_bindings): Likewise.
15861         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
15862         is_member_template.
15864         * pt.c (unify): Undo changes to allow multiple levels of template
15865         parameters.
15866         (type_unification): Likewise.
15867         (fn_type_unification): Likewise.
15868         (get_class_bindings): Likewise.
15869         * cp-tree.h (Likewise).
15871         * decl.c (replace_defarg): Check that the type of the default
15872         parameter does not invlove a template type before complaining
15873         about the initialization.
15875         * error.c (dump_expr): Deal with template constant parameters in
15876         member templates correctly.
15878         * pt.c (is_member_template): Deal with class specializations
15879         correctly.
15880         (tsubst): Handle "partial instantiation" of member templates
15881         correctly.
15883 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
15885         * pt.c (type_unification): Change calling sequence to allow for
15886         multiple levels of template parameters.
15887         (tsubst_expr): Likewise.
15888         (tsubst): Likewise.
15889         (tsubst_copy): Likewise.
15890         (instantiate_template): Likewise.
15891         (unify): Likewise.
15892         * call.c (build_overload_call_real): Use it.
15893         (add_builtin_candidate): Use it.
15894         (build_new_method_call): Use it.
15895         * class.c (instantiate_type): Use it.
15896         * decl.c (grokdeclarator): Use it.
15897         * decl2.c (finish_file): Use it.
15898         * method.c (build_overload_identifier): Use it.
15900         * call.c (add_template_candidate):  Add additional parameter for
15901         the function return type.  Call fn_type_unification istead of
15902         type_unification.
15903         (build_user_type_conversion_1): Handle member templates.
15904         (build_new_function_call): Likewise.
15905         (build_new_op): Likewise.
15906         (build_new_method_call): Likewise.
15908         * class.c (grow_method): Don't give an error message indicating
15909         that two member templates with the same name are ambiguous.
15910         (finish_struct): Treat member template functions just like member
15911         functions.
15913         * cp-tree.h (check_member_template): Add declaration.
15914         (begin_member_template_processing): Likewise.
15915         (end_member_template_processing): Likewise.
15916         (fn_type_unification): Likewise.
15917         (is_member_template): Likewise.
15918         (tsubst): Change prototype.
15919         (tsubst_expr): Likewise.
15920         (tsubst_copy): Likewise.
15921         (instantiate_template): Likewise.
15922         (get_bindings): Likewise.
15924         * decl.c (decls_match): Handle multiple levels of template
15925         parameters.
15926         (pushdecl): Handle template type params just like other type
15927         declarations.
15928         (push_class_level_binding): Return immediately if the
15929         class_binding_level is NULL.
15930         (grokfndecl): If check_classfn() returns a member_template, use
15931         the result of the template, not the template itself.
15933         * decl2.c (check_member_template): New function.  Check to see
15934         that the entity declared to be a member template can be one.
15935         (check_classfn): Allow redeclaration of member template functions
15936         with different types; the new functions can be specializations or
15937         explicit instantiations.
15939         * error.c (dump_decl): Handle multiple levels of template
15940         parameters.
15941         (dump_function_decl): Update to handle function templates.
15943         * lex.c (do_pending_inlines): Set up template parameter context
15944         for member templates.
15945         (process_next_inline): Likewise.
15947         * method.c (build_overload_identifier): Adjust for multiple levels
15948         of template parameters.
15950         * parse.y (fn.def2): Add member templates.
15951         (component_decl_1): Likewise.
15953         * pt.c (begin_member_template_processing): New function.
15954         (end_member_template_processing): Likewise.
15955         (is_member_template): Likewise.
15956         (fn_type_unification): Likewise.
15957         (current_template_parms): Return a vector of all the template
15958         parms, not just the innermost level of parms.
15959         (push_template_decl): Deal with the possibility of member
15960         templates.
15961         (lookup_template_class): Likewise.
15962         (uses_template_parms): Likewise.
15963         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
15964         TEMPLATE_CONST_PARM to deal with multiple levels of template
15965         arguments.   Add processing of TEMPLATE_DECL to produce new
15966         TEMPLATE_DECLs from old ones.
15967         (do_decl_instantiation): Handle member templates.
15969         * search.c (lookup_fnfields_1): Handle member template conversion
15970         operators.
15972         * tree.c (cp_tree_equal): Check the levels, as well as the
15973         indices, of TEMPLATE_CONST_PARMs.
15975         * typeck.c (comptypes): Check the levels, as well as the indices,
15976         fo TEMPLATE_TYPE_PARMs.
15977         (build_x_function_call): Treat member templates like member
15978         functions.
15980 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
15982         * typeck.c (c_expand_return): Always convert_for_initialization
15983         before checking for returning a pointer to local.
15985         * pt.c (type_unification): If strict and the function parm doesn't
15986         use template parms, just compare types.
15988 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
15990         * method.c (build_overloaded_value): Replace direct call
15991         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
15993 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
15995         * typeck.c (convert_arguments): Don't arbitrarily choose the first
15996         of a set of overloaded functions.
15998 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
16000         * lex.c (real_yylex): Don't elide __FUNCTION__.
16002         * method.c (build_overload_value): Add in_template parm.
16003         (build_overload_int): Likewise.
16004         (build_overload_identifier): Pass it.
16006         * decl.c (duplicate_decls): Don't bash a previous template
16007         definition with a redeclaration.
16009         * pt.c (unify): float doesn't match double.
16011         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
16012         TYPE_DECL.  Handle getting non-template types.
16013         * parse.y (explicit_instantiation): Use typespec instead of
16014         aggr template_type.
16016 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
16018         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
16020 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
16022         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
16023         (compare_ics): Likewise.
16025 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
16027         * call.c (joust): Warn about choosing one conversion op over
16028         another because of 'this' argument when the other return type is
16029         better.
16030         (source_type): New fn.
16032         * call.c (build_new_op): Strip leading REF_BIND from first operand
16033         to builtin operator.
16035         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
16036         use its RTL.
16038 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
16040         * call.c (null_ptr_cst_p): Remove support for (void*)0.
16042 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
16044         * typeck.c (expand_target_expr): Make definition match declaration.
16046         * class.c (get_basefndecls): Make definition match declaration.
16048 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
16050         * input.c (sub_getch): Eventually give up and release the input file.
16052         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
16053         right place.
16055         * call.c (joust): Tweak message.
16057 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
16059         * error.c (type_as_string): Put const/volatile on template type
16060         parameters where appropriate.
16062 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
16064         * call.c (strictly_better): Make arguments unsigned ints.
16066 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
16068         * lex.c (real_yylex): Refer to __complex instead of complex.
16070 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
16072         * lex.c (real_yylex): Don't use getc directly.
16074 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
16076         * call.c (is_subseq): Don't try to be clever.
16078 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
16080         * parse.y, pt.c: Include "except.h".
16081         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
16082         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
16083         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
16084         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
16085         prototyping.
16087 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
16089         * decl2.c (mark_vtable_entries): Instead of replacing pure
16090         virtuals with a reference to __pure_virtual, copy the decl and
16091         change the RTL.
16093 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
16095         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
16097         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
16099         * pt.c (instantiate_class_template): Call repo_template_used
16100         before finish_prevtable_vardecl.
16102         * call.c (is_subseq): New fn.
16103         (compare_ics): Use it.
16105         * repo.c (finish_repo): Don't crash on no args.
16107         * parse.y (named_complex_class_head_sans_basetype): Handle
16108         explicit global scope.
16109         * decl2.c (handle_class_head): New fn.
16111         * pt.c (unify): Add CONST_DECL case.
16113 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16115         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
16117         * cp-tree.h (report_type_mismatch): Add prototype.
16118         * call.c (build_overload_call_real): Remove erroneous fourth
16119         argument to report_type_mismatch.
16120         (build_user_type_conversion_1): Remove erroneous second arg to
16121         tourney.
16122         (build_new_function_call): Likewise.
16123         (build_object_call): Likewise.
16124         (build_new_op): Likewise.
16125         (build_new_method_call): Likewise.
16127 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
16129         * error.c (dump_decl): Don't bother processing a function with no
16130         DECL_LANG_SPECIFIC.
16132         * method.c (emit_thunk): Call init_function_start in the macro case.
16134 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
16136         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
16137         defined and used to set flag_vtable_thunks.
16139 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
16141         * parse.y: Don't clear the inlines from their obstack until they've
16142         all been processed.
16144         * decl.c (duplicate_decls): Don't complain about exception
16145         specification mismatch if flag_exceptions is off.
16147 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
16149         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
16151 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
16153         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
16154         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
16155         Include <stdio.h> before include files that formerly used STDIO_PROTO.
16157         * decl.c, g++spec.c, lex.c, method.c, repo.c:
16158         Include "config.h" first, as per autoconf manual.
16160 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
16162         * decl.c (duplicate_decls): Tweak wording.
16163         * lex.c (do_pending_defargs): Don't die if we see a default arg
16164         that isn't a DEFAULT_ARG.
16165         * error.c (dump_expr): Handle DEFAULT_ARG.
16167         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
16168         * lang-options.h: Add -fhandle-exceptions.
16170         * class.c (build_vtable): Vtables are artificial.
16171         (prepare_fresh_vtable): Likewise.
16173 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16175         * cvt.c (ocp_convert): After converting to the target type, set
16176         LOOKUP_NO_CONVERSION.
16178         * call.c (joust): Warn about potentially confusing promotion rules
16179         with -Wsign-promo.
16180         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
16182 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
16184         * exception.cc: Declare __terminate_func with noreturn attribute.
16186 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
16188         * parse.y: Break out eat_saved_input, handle errors.
16189         (function_try_block): Use compstmt instead of compstmt_or_error.
16191 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
16193         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
16195 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
16197         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
16198         existence of cc1plus check whether $(LANGUAGES) contains C++.
16200 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
16202         * method.c (do_build_copy_constructor): When copying an anonymous
16203         union member loop around to handle nested anonymous unions.  Use
16204         the offset of the member relative to the outer structure, not the
16205         union.
16207 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
16209         * call.c (resolve_args): New fn.
16210         (build_new_function_call): Use it.
16211         (build_object_call): Likewise.
16212         (build_new_method_call): Likewise.
16214 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16216         * call.c (build_over_call): tsubst all default parms from templates.
16218 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
16220         * decl.c (struct cp_function): Add static_labelno.
16221         (push_cp_function_context): Save it.
16222         (pop_cp_function_context): Restore it.
16224 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
16226         * typeck.c (build_component_ref_1): Convert from reference.
16228 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16230         * parse.y (current_declspecs, prefix_attributes): Initialize to
16231         NULL_TREE.
16233         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
16234         before we try to force it to be a TREE_LIST.
16235         (decl): Make sure $1.t is non-nil.
16237 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
16239         * pt.c (uses_template_parms): Handle template first-parse codes.
16241         * decl.c (cp_finish_decl): Only warn about user-defined statics.
16243 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
16245         * pt.c (unify): Handle BOOLEAN_TYPE.
16247         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
16248         * pt.c (tsubst): Don't set it.
16249         * call.c (build_over_call): Use uses_template_parms.
16251 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
16253         * method.c (build_overload_nested_name): Use static_labelno
16254         instead of var_labelno.
16255         (build_qualified_name): New fn.
16256         (build_overload_name): Split out from here.
16257         (build_static_name): Use build_qualified_name.
16258         * decl.c (cp_finish_decl): Statics in extern inline functions
16259         have comdat linkage.
16260         (start_function): Initialize static_labelno.
16262 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16264         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
16265         before "all member functions in class [] are private".
16267 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
16269         * lex.c (do_scoped_id): convert_from_reference.
16270         * init.c (build_offset_ref): Likewise.
16272 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
16274         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
16276 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
16278         * typeck.c (get_member_function_from_ptrfunc): Promote index
16279         before saving it.
16281 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
16283         * tree.c (layout_basetypes): Move non-virtual destructor warning.
16284         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
16286 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
16288         * decl.c (grokdeclarator): Call add_defarg_fn for the function
16289         type, too.
16290         * lex.c (add_defarg_fn): Adjust.
16291         (do_pending_defargs): Adjust.  Don't skip the first parm.
16293 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
16295         * decl.c (build_enumerator): Global enumerators are also readonly.
16297         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
16298         (build_dynamic_cast): Call it and convert_from_reference.
16300         * lex.c (add_defarg_fn): New fn.
16301         (snarf_defarg): Don't add to defarg_types.
16302         (do_pending_defargs): Lose defarg_types.  All fns we process now
16303         have defargs.
16304         * decl.c (grokfndecl): Call add_defarg_fn.
16306         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
16307         * cp-tree.def: Add DEFAULT_ARG.
16308         * spew.c (yylex): Call snarf_defarg as appropriate.
16309         * parse.y: New tokens DEFARG and DEFARG_MARKER.
16310         (defarg_again, pending_defargs, defarg, defarg1): New rules.
16311         (structsp): Use pending_defargs.
16312         (parms, full_parm): Use defarg.
16313         * lex.c (init_lex): Initialize inline_text_firstobj.
16314         (do_pending_inlines): Never pass the obstack to feed_input.
16315         (process_next_inline): Call end_input instead of restore_pending_input.
16316         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
16317         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
16318         * input.c (end_input): New fn.
16319         (sub_getch): At the end of some fed input, just keep returning EOF
16320         until someone calls end_input.
16321         Remove 'obstack' field from struct input_source.
16322         * decl.c (grokparms): Handle DEFAULT_ARG.
16323         (replace_defarg): New fn.
16324         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
16326 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
16328         * call.c (implicit_conversion): If nothing else works, try binding
16329         an rvalue to a reference.
16331 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
16333         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
16334         ifndef for Cygwin32 to include SIGSEGV.
16336 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
16338         * class.c (finish_struct_1): Only complain about pointers without
16339         copy stuff if there are any constructors.
16341         * rtti.c (build_dynamic_cast): Call complete_type on the types.
16343         * decl.c (grokfndecl): If the function we chose doesn't actually
16344         match, die.
16346         * decl2.c (grokclassfn): Don't specify 'const int' for the
16347         artificial destructor parm.
16349         * pt.c (type_unification): If we are called recursively, nothing
16350         decays.
16352 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
16354         * decl.c (init_decl_processing): Stop trying to catch signals
16355         other than SIGABRT since the Cygwin32 library doesn't support
16356         them correctly yet.  This fixes a situation in which g++ causes
16357         a hang on SIGSEGVs and other such signals in our Win32-hosted
16358         tools.
16360 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
16362         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
16364 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
16366         * typeck2.c (store_init_value): Always return the value if our
16367         type needs constructing.
16369         * method.c (hack_identifier): Convert class statics from
16370         reference, too.
16372 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
16374         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
16376 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
16378         * typeck.c (c_expand_return): Make sure we clean up temporaries at
16379         the end of return x;
16381 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16383         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
16385 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
16387         * except.c (expand_builtin_throw): Add support
16388         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
16390 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
16392         * repo.c (extract_string): Null-terminate.
16394         * cp-tree.h (TI_SPEC_INFO): New macro.
16395         (CLASSTYPE_TI_SPEC_INFO): New macro.
16396         * pt.c (push_template_decl): Correctly determine # of template parms
16397         for partial specs.
16399         * call.c (compare_ics): Really fix 'this' conversions.
16401         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
16402         non-template fn.
16404         * pt.c (push_template_decl): Complain about mismatch in # of
16405         template parms between a class template and a member template.
16407 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
16409         * method.c (synthesize_method): You can't call
16410         function_cannot_inline_p after finish_function.
16411         * decl.c (finish_function): Turn on flag_inline_functions and turn
16412         off DECL_INLINE before handing a synthesized method to the
16413         backend.
16415 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
16417         * method.c (synthesize_method): Remove July 30 change to never set
16418         DECL_INLINE if at_eof.
16420 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
16422         * xref.c (GNU_xref_member): Ensure that the node has a
16423         decl_lang_specific part before checking DECL_FRIEND_P.
16425 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
16427         * pt.c (instantiate_class_template): Diagnose non-class types used
16428         as bases.
16430 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
16432         * typeck.c (build_conditional_expr): Use convert_for_initialization
16433         instead of convert_and_check.
16435 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16437         * parse.y (typespec): Don't pedwarn for typeof.
16439 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
16441         * repo.c (finish_repo): Only check changes if we would write a
16442         repo file.
16444         * call.c (compare_ics): Fix handling of 'this' conversions.
16446         * pt.c (do_decl_instantiation): Support static data too.  Rename
16447         from do_function_instantiation.
16448         * cp-tree.h: Adjust.
16449         * parse.y: Adjust.
16451         * repo.c (extract_string): New fn.
16452         (get_base_filename): Use it.
16453         (init_repo): Compare old args with current args.
16455 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
16457         * Makefile.in, Make-lang.in: Protect C-ls with a comment
16458         character, idea from Paul Eggert <eggert@twinsun.com>.
16460 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
16462         * typeck.c (c_expand_return): Be more persistent in looking for
16463         returned temps.
16465         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
16466         pointer to reference.
16468         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
16470 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
16472         * init.c (build_member_call, build_offset_ref):
16473         Use do_scoped_id instead of do_identifier.
16475         * cvt.c (convert): Remove bogosity.
16477 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16479         * cvt.c (build_up_reference): Do checks of ARGTYPE and
16480         TARGET_TYPE before trying to use get_binfo.
16482 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
16484         * cvt.c (build_up_reference): Call get_binfo to get access control.
16486         * decl2.c (import_export_decl): If we don't support weaks, leave
16487         statics undefined.
16489 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
16491         * except.c (expand_builtin_throw): Add support for machines that
16492         cannot access globals after throw's epilogue when
16493         -fno-sjlj-exceptions is used.
16495 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
16497         * parse.y: 'std::' becomes '::'.
16498         * lex.c (real_yylex): Remove 'namespace' warning.
16499         * init.c (build_member_call): Ignore 'std::'.
16500         (build_offset_ref): Likewise.
16501         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
16502         (do_toplevel_using_decl): Ignore 'using std::whatever'.
16503         * decl.c (push_namespace): Just sorry.
16504         (pop_namespace): Nop.
16505         (init_decl_processing): Declare std namespace.
16507 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
16509         * search.c (push_class_decls): A name which ambiguously refers to
16510         several instantiations of the same template just refers to the
16511         template.
16513 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
16515         * decl.c (build_enumerator): Fix problem with unsigned long
16516         enumerated values being smashed to ints, causing overflow
16517         when computing next enumerated value (for enum values around
16518         MAX_VAL).
16520 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
16522         * typeck.c (build_component_ref): Only call mark_used on a decl.
16524 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16526         * typeck.c (build_c_cast): Make the check for a ptr to function
16527         more specific before possible default_conversion call.
16529 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
16531         * except.c (expand_exception_blocks): Simplify and fix and make
16532         sure we don't end a region in a sequence, as expand_end_bindings
16533         doesn't like it.
16535 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
16537         * except.c (init_exception_processing): Mark terminate as not
16538         returning so that the optimizer can optimize better.
16540 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
16542         * cvt.c (convert): Don't do any extra work, if we can avoid it
16543         easily.
16545 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
16547         * *.[chy]: Change cp_convert to ocp_convert, change convert to
16548         cp_convert.  convert is now reserved for the backend, and doesn't
16549         have the semantics a frontend person should ever want.
16551 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
16553         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
16554         Lose -traditional support.
16556 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
16558         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
16560         * parse.y (self_reference): Do it for templates, too.
16561         * class.c (pushclass): Don't overload_template_name; the alias
16562         generated by build_self_reference serves the same purpose.
16564         * tree.c (list_hash): Make static, take more args.
16565         (list_hash_lookup): Likewise.
16566         (list_hash_add): Make static.
16567         (list_hash_canon): Lose.
16568         (hash_tree_cons): Only build a new node if one isn't already in the
16569         hashtable.
16570         (hash_tree_chain): Use hash_tree_cons.
16571         * cp-tree.h: Adjust.
16572         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
16573         of calling lookup_name.
16575 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
16577         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
16578         doesn't refer to the CONST_DECLs.
16580 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
16582         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
16583         is bigger.
16584         (expand_class_desc): Convert the last argument to a sizetype.
16586 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16588         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
16589         __real__): Add reswords.
16590         * hash.h: Regenerate.
16591         * lex.h (rid): Add RID_COMPLEX.
16592         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
16593         * lex.c (init_lex): Add building of RID_COMPLEX.
16594         (real_yylex): General cleanup in line with what c-lex.c also has,
16595         sans the cruft for traditional; add handling of SPEC_IMAG, complex
16596         types, and imaginary numeric constants.
16597         * parse.y (REALPART, IMAGPART): Add tokens.
16598         (unary_expr): Add REALPART and IMAGPART rules.
16599         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
16600         * decl.c (complex_{integer,float,double,long}_type_node): Define
16601         types.
16602         (init_decl_processing): Set up the types.
16603         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
16604         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
16605         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
16606         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
16607         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
16608         COMPLEX_TYPE case.
16609         * method.c (build_overload_name): Add handling of the different
16610         COMPLEX_TYPEs, prefixing them with `J'.
16611         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
16612         as a template parm.
16613         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
16614         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
16615         (mapcar): Handle COMPLEX_CST.
16616         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
16617         (common_type): Add code for complex types.
16618         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
16619         (convert_for_assignment): Likewise.
16620         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
16622 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
16624         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
16625         tsubst_expr, as it might try to do overload resolution.
16627 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
16629         * pt.c (instantiate_class_template): Oops.
16631 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
16633         * cp-tree.def: Add TAG_DEFN.
16634         * pt.c (tsubst_enum): New fn.
16635         (instantiate_class_template): Use it.
16636         (tsubst_expr): Support TAG_DEFN.
16637         (tsubst): Support local enums.
16638         (tsubst_copy): Likewise.
16639         * decl.c (finish_enum): Likewise.
16640         (start_enum): If this is a local enum, switch to permanent_obstack.
16642 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
16644         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
16645         (finish_function): Put the base init code for constructors just
16646         after the parm cleanup insns.
16647         (struct cp_function): Add last_parm_cleanup_insn.
16648         (pu