OSDN Git Service

* configure (gcc_version): When setting, narrow search to
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2
3         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
4
5 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
6
7         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
8
9 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
10
11         * decl2.c (lang_decode_option): Enable automatic line wrapping.
12
13 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
14
15         * parse.y (frob_specs): Split out...
16         (parse_decl): From here.
17         (fn.def2): Call initial_deferred_type_access_control.
18         (after_type_component_declarator0): Call frob_specs.
19         (notype_component_declarator0): Likewise.
20         * search.c (friend_accessible_p): Nested classes are friends of their
21         enclosing classes.
22
23 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
24
25         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
26         used to create an implicit temporary.
27
28         * class.c (dfs_modify_vtables): Tweak calculation of functions to
29         override.
30
31 2000-02-08  Nathan Sidwell  <nathan@acm.org>
32
33         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
34         strip array element qualifiers too.
35
36 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
37
38         * decl.c (store_parm_decls): Don't build cleanups for parameters
39         while processing_template_decl.
40
41 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
42
43         * cp-tree.h (struct saved_scope): Add incomplete field.
44         (namespace_scope_incomplete): New macro.
45         * decl.c (pushdecl): Use it.
46         (hack_incomplete_structures): Use it.  See through artificial
47         binding levels.
48         (mark_saved_scope): Mark it.
49
50         Implement access control for nested types.
51         * search.c (type_access_control): New fn.
52         (accessible_p): Now we do perform access control for types.
53         * semantics.c (deferred_type_access_control): New fn.
54         (initial_deferred_type_access_control): New fn.
55         (begin_function_definition): Call it.  Add lookups parm.
56         * decl.c (struct binding_level): Add this_class field.
57         (pushlevel_class): Set it.
58         (mark_binding_level): Mark it.
59         (lookup_name_real): Use it.  Call type_access_control.
60         (mark_saved_scope): Mark lookups field.
61         * cp-tree.h (flagged_type_tree): Add lookups field.
62         (struct saved_scope): Add lookups field.
63         (type_lookups): New macro.
64         * parse.y (declmods): Now <ftype>.
65         (parse_decl): Add lookups parm.  Call 
66         initial_deferred_type_access_control.
67         (lang_extdef): Clear type_lookups.
68         (typed_declspecs, declmods, typespec): Set lookups field.
69         (initdcl): Call deferred_type_access_control.
70         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
71         component_decl_1, named_parm): Adjust.
72         * friend.c (is_friend): Nested classes are friends of their
73         enclosing classes.
74
75         * class.c (currently_open_derived_class): New fn.
76         * method.c (hack_identifier): Use it.
77
78         * lex.c (do_identifier): Remove obsolete code.
79
80         * parse.y (typed_typespecs): Propagate new_type_flag properly.
81
82 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
83
84         * tinfo.h: Remove apostrophes from C++ comment (xgettext
85         thinks this file is plain C).
86
87 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
88
89         * Makefile.in (call.o): Depend on $(EXPR_H).
90
91         * call.c: Include "expr.h".
92
93         * class.c (dump_class_hierarchy): Add prototype.
94
95         * search.c (dfs_get_pure_virtuals): Likewise.
96
97 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
98
99         * parse.y (simple_stmt): Allow :: token in asm parameter list.
100         * parse.c: Rebuilt.
101
102 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
103
104         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
105         Store it in DECL_FCONTEXT.
106         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
107
108 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
109
110         * tinfo.h (old abi): #include "tconfig.h".
111         * tinfo.cc (convert_to_base): Move into old abi section.
112
113 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
114
115         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
116         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
117         (BINFO_PRIMARY_BINFO): New macro.
118         (BF_DELTA): Rename to ...
119         (BV_DELTA): ... this.
120         (BF_VCALL_INDEX): Rename to ...
121         (BV_VCALL_INDEX): ... this.
122         (BF_FN): Rename to ...
123         (BV_FN): ... this.
124         * class.c (build_vbase_path): Adjust for changes to reverse_path.
125         (set_rtti_entry): Rename BF_ macros to BV_ variants.
126         (modify_vtable_entry): Simplify.
127         (add_virtual_function): Rename BF_ macros to BV_ variants.
128         (build_vtable_initializer): Likewise.
129         (get_class_offset_1): Remove.
130         (dfs_get_class_offset): Likewise.
131         (get_class_offset): Likewise.
132         (dfs_find_final_overrider): New function.
133         (find_final_overrider): Likewise.
134         (modify_one_vtable): Remove.
135         (dfs_find_base): New function.
136         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
137         find_final_overrider.
138         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
139         virtuals.
140         (dfs_fixup_vtable_deltas): Remove.
141         (override_one_vtable): Remove.
142         (merge_overrides): Likewise.
143         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
144         unreal chilren of virtual bases.
145         (finish_struct_1): Don't use merge_overrides.  Don't use
146         dfs_fixup_vtable_deltas.
147         * tree.c (reverse_path): Return a TREE_LIST, not a chain of 
148         BINFOs.
149         
150 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
151             Jason Merrill  <jason@yorick.cygnus.com>
152
153         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
154
155 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
156
157         * exception.cc (__throw_bad_typeid): Add missing std::.
158
159 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
160
161         * cp-tree.h (make_thunk): PROTO -> PARAMS.
162
163 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
164
165         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
166
167         Runtime support for new-abi rtti.
168         * inc/typeinfo (type_info::operator!=): Define in class.
169         (type_info::before, type_info::name, type_info::operator==,
170         type_info::operator!=): Define new ABI implementations.
171         (type_info::is_pointer_p, type_info::is_function_p): Declare
172         new virtual functions.
173         (type_info::do_catch, type_info::do_upcast): Likewise.
174         
175         * tinfo.h (__base_class_info): Define new class.
176         (__class_type_info): Likewise.
177         (__si_class_type_info): Likewise.
178         (__vmi_class_type_info): Likewise.
179         (__dynamic_cast): Prototype.
180         
181         * tinfo.cc: Conditionalize old and new rtti mechanisms.
182         (type_info::is_pointer_p): Define new function.
183         (type_info::is_function_p): Likewise.
184         (type_info::do_catch): Likewise.
185         (type_info::do_upcast): Likewise.
186         (vtable_prefix): New structure for vtable access.
187         (adjust_pointer): Define new template function.
188         (contained_p, public_p, virtual_p, contained_public_p,
189         contained_nonpublic_p, contained_nonvirtual_p): Define new
190         functions.
191         (nonvirtual_base_type): New local variable.
192         (__class_type_info::~__class_type_info): Define.
193         (__si_class_type_info::~__si_class_type_info): Likewise.
194         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
195         (__class_type_info::do_catch): Define new function.
196         (__class_type_info::do_upcast): Likewise.
197         (__class_type_info::find_public_src): Likewise.
198         (__class_type_info::do_find_public_src): Likewise.
199         (__si_class_type_info::do_find_public_src): Likewise.
200         (__vmi_class_type_info::do_find_public_src): Likewise.
201         (__class_type_info::do_dyncast): Likewise.
202         (__si_class_type_info::do_dyncast): Likewise.
203         (__vmi_class_type_info::do_dyncast): Likewise.
204         (__class_type_info::do_upcast): Likewise.
205         (__si_class_type_info::do_upcast): Likewise.
206         (__vmi_class_type_info::do_upcast): Likewise.
207         (__dynamic_cast): Likewise.
208         
209         * tinfo2.cc (__fundamental_type_info): Define new class.
210         (__pointer_type_info): Likewise.
211         (__reference_type_info): Likewise.
212         (__array_type_info): Likewise.
213         (__function_type_info): Likewise.
214         (__enum_type_info): Likewise.
215         (__ptr_to_member_type_info): Likewise.
216         (__fundamental_type_info::~__fundamental_type_info): Define.
217         (__pointer_type_info::~__pointer_type_info): Likewise.
218         (__reference_type_info::~__reference_type_info): Likewise.
219         (__array_type_info::~__array_type_info): Likewise.
220         (__function_type_info::~__function_type_info): Likewise.
221         (__enum_type_info::~__enum_type_info): Likewise.
222         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
223         (__pointer_type_info::do_catch): Define new function.
224         (__ptr_to_member_type_info::do_catch): Define new function.
225         
226         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
227         (__is_pointer): Likewise.
228
229         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
230
231 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
232
233         * cp/class.c (build_vtable): Rename to build_primary_vtable.
234         (prepare_fresh_vtable): Rename to build_secondary_vtable.
235         (make_new_vtable): New function.
236         (modify_vtable_entry): Handle generation of new vtables correctly.
237         (modify_one_vtable): Remove unused parameter.
238         (dfs_fixup_vtable_deltas): Likewise.
239         (override_one_vtable): Use build_secondary_vtable.
240         (finish_struct_1): Use build_primary_vtable and
241         build_secondary_vtable.
242         
243 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
244
245         * cp/decl.c: Adjust variable names, comments, help strings.
246
247 2000-01-29  Nathan Sidwell  <nathan@acm.org>
248
249         * new2.cc (operator delete[]): Use operator delete, don't assume
250         implementation.
251
252 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
253
254         * class.c (build_vtbl_initializer): Add argument to
255         build_vtable_entry call.
256
257 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
258
259         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
260         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
261         (BF_DELTA): New macro.
262         (BF_VCALL_INDEX): Likewise.
263         (BF_FN): Likewise.
264         (THUNK_VCALL_OFFSET): Likewise.
265         (make_thunk): Change prototype.
266         * class.c (build_vtable_entry): Integrate
267         build_vtable_entry_for_fn.  Handle vcall indices.
268         (build_vtable_entry_for_fn): Remove.
269         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
270         BF_VCALL_INDEX, BF_FN.
271         (modify_vtable_entry): Integrate common code from
272         modify_one_vtable and dfs_fixup_vtable_deltas.
273         (add_virtual_function): Set BF_VCALL_INDEX.
274         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
275         and BF_FN.
276         (modify_one_vtable): Simplify.
277         (dfs_fixup_vtable_deltas): Likewise.
278         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. 
279         * method.c (make_thunk): Handle vcall indices.
280         
281 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
282
283         Compiler side new abi rtti (not enabled).
284         * cp-tree.h (new_abi_rtti_p): New macro.
285         (emit_support_tinfos): Prototype new function.
286         (tinfo_decl_p): Likewise.
287         (emit_tinfo_decl): Likwise.
288         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
289         macros.
290         (doing_runtime): New local static.
291         (init_rtti_processing): Add new-abi initializer.
292         (get_tinfo_decl): Add new-abi logic.
293         (tinfo_from_decl): Likewise.
294         (build_dynamic_cast_1): Likewise.
295         (qualifier_flags): New static function.
296         (tinfo_base_init): Likewise.
297         (generic_initializer): Likewise.
298         (ptr_ref_initializer): Likewise.
299         (ptmd_initializer): Likewise.
300         (class_hint_flags): Likewise.
301         (class_initializer): Likewise.
302         (synthesize_tinfo_var): Likewise.
303         (create_real_tinfo_var): Likewise.
304         (create_pseudo_type_info): Likewise.
305         (get_vmi_pseudo_type_info): Likewise.
306         (create_tinfo_types): Likewise.
307         (emit_support_tinfos): New global function.
308         (tinfo_decl_p): New global predicate.
309         (emit_tinfo_decl): New global function.
310         * class.c (set_rtti_entry): Generalize for old and new rtti.
311         (build_vtbl_initializer): Likewise.
312         * decl2.c (finish_file): Likewise.
313
314 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
315
316         * cp/optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
317         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
318
319 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
320
321         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
322         for scopes.
323
324 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
325
326         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
327
328 Wed Jan 26 22:19:14 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
329
330         * cp/optimize.c (calls_setjmp_r): Supply new argument
331         to special_function_p.
332
333 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
334
335         * call.c: PROTO -> PARAMS.
336         * class.c: Likewise.
337         * cp-tree.h: Likewise.
338         * cvt.c: Likewise.
339         * decl.c: Likewise.
340         * decl.h: Likewise.
341         * decl2.c: Likewise.
342         * dump.c: Likewise.
343         * errfn.c: Likewise.
344         * error.c: Likewise.
345         * except.c: Likewise.
346         * expr.c: Likewise.
347         * init.c: Likewise.
348         * input.c: Likewise.
349         * lex.c: Likewise.
350         * lex.h: Likewise.
351         * method.c: Likewise.
352         * optimize.c: Likewise.
353         * parse.y: Likewise.
354         * pt.c: Likewise.
355         * repo.c: Likewise.
356         * rtti.c: Likewise.
357         * search.c: Likewise.
358         * semantics.c: Likewise.
359         * spew.c: Likewise.
360         * tree.c: Likewise.
361         * typeck.c: Likewise.
362         * typeck2.c: Likewise.
363         * xref.c: Likewise.
364
365 2000-01-25  Richard Henderson  <rth@cygnus.com>
366
367         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
368
369 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
370
371         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
372         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
373         (struct vcall_offset_data_s): New type.
374         (dfs_vcall_offset_queue_p): New function.
375         (dfs_build_vcall_offset_vtbl_entries): Likewise.
376         (build_vcall_offset_vtbl_entries): Likewise.
377         (layout_vtable_decl): Likewise.
378         (num_vfun_entries): Likewise.
379         (num_extra_vtbl_entries): Add the entries for vcall offsets.
380         (build_vtbl_initializer): Likewise.
381         (dfs_finish_vtabls): Use layout_vtable_decl.
382         (modify_one_vtables): Always duplicate vtables under the new ABI.
383         (finish_struct_1): Use layout_vtable_decl.
384         
385 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
386
387         * decl.c (member_function_or_else): Change third arg from a format
388         specifier to an `enum overload_flags'.  Callers changed.
389
390 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
391
392         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
393         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
394         build_const_cast, get_delta_difference, check_return_expr): Avoid
395         ANSI string concatenation usage.  
396
397 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
398
399         * class.c (layout_class_type): Put the fields required to make a
400         class non-empty at the end, not the beginning, of the TYPE_FIELDs
401         list.
402
403 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
404
405         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
406         template.
407
408         * decl2.c (mark_used): Do instantiate inlines that have been
409         explicitly instantiated.
410
411 2000-01-24  Richard Henderson  <rth@cygnus.com>
412
413         * call.c (build_over_call): Use expand_tree_builtin.
414         * typeck.c (build_function_call_real): Likewise.
415         (build_binary_op_nodefault): Handle unordered compares.
416
417 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
418
419         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
420         cp_tree_index values.
421         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
422         New global node #defines for them.
423         * rtti.c (call_void_fn): Replace with ...
424         (build_runtime_decl): ... new static function.
425         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
426         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
427         (build_dynamic_cast_1): Always produce correctly typed result.
428         Explicitly produce type_info addresses. Use dynamic_cast_node.
429         * exception.cc (__throw_bad_cast): Return `void *'.
430         (__throw_bad_typeid): Return `const type_info &'.
431
432 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
433
434         * cp-tree.h (get_vtable_decl): Prototype new function.
435         * class.c (get_vtable_decl): New function. Broken out from ...
436         (build_vtable): ... here. Use it.
437         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
438         by get_vtable_decl.
439
440 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
441
442         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
443         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
444         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
445         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
446         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
447         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
448         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
449         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
450         (CPTI_TINFO_VAR_ID): New enumeration.
451         (__tp_desc_type_node, __access_mode_type_node,
452         __bltn_desc_type_node, __user_desc_type_node,
453         __class_desc_type_node, __ptr_desc_type_node,
454         __attr_desc_type_node, __func_desc_type_node,
455         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
456         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
457         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
458         enum_desc_type_node, class_desc_type_node,
459         si_class_desc_type_node, vmi_class_desc_type_node,
460         ptmd_desc_type_node, base_desc_type_node): New #defines.
461         (tinfo_fn_id, tinfo_fn_type): Rename to ...
462         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
463         (tinfo_var_id): New enumeration.
464         (DECL_TINFO_FN_P): Augment comment.
465         * decl.c (cp_global_trees): Adjust documentation.
466         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
467         tinfo_decl_type and tinfo_var_id.
468         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
469         (build_typeid): Remove unused variable.
470         (get_tinfo_var): Use tinfo_var_id.
471         (tinfo_name): New static function.
472         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
473         (tinfo_from_decl): Likewise.
474         (get_base_offset): New static function, broken out of
475         expand_class_desc.
476         (expand_si_desc): Use tinfo_name.
477         (expand_class_desc): Likewise. Lose local static variable.
478         Use base_desc_type_node. Use get_base_offset.
479         (expand_ptr_desc): Use tinfo_name.
480         (expand_attr_desc): Likewise.
481         (expand_generic_desc): Likewise.
482
483         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
484         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
485
486 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
487
488         * cp-tree.h (__eprintf): Remove declaration.
489         * tree.c (__eprintf): Remove definition.
490
491 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
492             Mark Mitchell  <mark@codesourcery.com>
493
494         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
495         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
496
497 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
498
499         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
500
501 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
502
503         * cp-tree.h (register_dtor_fn): New function.
504         * decl.c (destroy_local_static): Rename to ...
505         (register_dtor_fn): ... this.  Give it external linkage.
506         (expand_static_init): Use it.
507         * decl2.c (do_static_initialization): Likewise, if using
508         __cxa_atexit.
509         (do_static_destruction): Check that __cxa_atexit is not in use.
510         (finish_file): Don't call do_static_destruction if using
511         __cxa_atexit.
512
513         * typeck.c (convert_arguments): Restore two-message error
514         reporting.
515         
516 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
517
518         Remap dynamic cast hint values to be consistent across ABIs.
519         * search.c (dynamic_cast_base_recurse): Remap generated value.
520         (get_dynamic_cast_base_type): Adjust documentation.
521         * tinfo.h (__user_type_info::dyncast): Likewise.
522         (__user_type_info::find_public_subobj): Remap BOFF meaning.
523         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
524         (__class_type_info::do_dyncast): Likewise.
525         (__class_type_info::do_find_public_subobj): Likewise.
526         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.     
527
528 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.coom>
529
530         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
531
532         * typeck2.c (incomplete_type_error): Restore previous
533         cp_error and cp_error_at call sequence.
534         
535 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
536
537         * class.c (dump_class_hierarchy): Make format agree with argument;
538         cast pointer to unsigned long and print with %lx.
539         
540 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery>
541
542         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
543         
544         * typeck.c (composite_pointer_type, common_type,
545         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
546         build_function_call_real, convert_arguments,
547         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
548         build_unary_op, mark_addressable, build_compound_expr,
549         build_static_cast, build_reinterpret_cast, build_const_cast,
550         build_c_cast, build_modify_expr, get_delta_difference,
551         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with 
552         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
553         into a single one.
554         * typeck2.c (readonly_error, abstract_virtuals_error,
555         process_init_constructor, check_for_new_type): Likewise.
556
557 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
558
559         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
560         VAR_DECLs.
561
562 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
563
564         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
565         (build_x_typeid): Likewise.
566         (get_tinfo_fn): Likewise.
567         (get_tinfo_fn_unused): Rename to ...
568         (get_tinfo_decl): ... here.
569         * rtti.c (build_headof): Replace logic error with assertion.
570         (get_tinfo_fn_dynamic): Rename to ...
571         (get_tinfo_decl_dynamic): ... here. Make static. Use
572         complete_type_or_else.
573         (build_x_typeid): Move into ...
574         (build_typeid): ... here. Adjust call to
575         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
576         throw_bad_typeid expression.
577         (get_tinfo_fn_unused): Rename to ...
578         (get_tinfo_decl): ... here. Adjust comment.
579         (get_tinfo_fn): Delete.
580         (tinfo_from_decl): New static function.
581         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
582         (get_typeid): Use complete_type_or_else.
583         (build_dynamic_cast_1): Adjust calls to
584         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
585         * parse.y (primary): Adjust call to build_typeid.
586         * except.c (build_eh_type_type_ref): Adjust call to
587         get_tinfo_decl. Mark as used.
588         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
589         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
590         * parse.c: Regenerated.
591
592 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
593
594         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
595         calling convention.
596         (resolves_to_fixed_type_p): Document calling convention.
597         * rtti.c (build_x_typeid): Initialize NONNULL.
598
599         * cp-tree.h (build_shared_int_cst): New function.
600         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
601         * class.c (modify_vtable_entry): Likewise.
602         (add_virtual_function): Split out code to generated shared
603         INTEGER_CSTs to build_share_int_cst.
604         (modify_all_vtables): Handle all the overridden functions here.
605         Add overridden functions from non-primary virtual bases to the
606         primary vtable.
607         (finish_struct_1): Adjust call to modify_all_vtables.  Add
608         overridden functions from non-primary bases to the vtable.
609         * tree.c (build_shared_int_cst): New function.
610         
611         * cp-tree.h (scratchalloc): Remove.
612         (build_scratch_list): Likewise.
613         * call.c (convert_class_to_reference): Replace build_scratch_list
614         and build_expr_list with build_tree_list.
615         (add_candidate): Replace scratchalloc with expralloc.  Note memory
616         leak.
617         (build_user_type_conversion_1):  Replace build_scratch_list
618         and build_expr_list with build_tree_list.
619         (build_new_op): Likewise.
620         (build_op_delete_call): Likewise.
621         (convert_like): Likewise.
622         * cvt.c (ocp_convert): Likewise.
623         * decl.c (start_decl): Likewise.
624         (start_function): Likewise.
625         (finish_destructor_body): Likewise.
626         (maybe_build_cleanup_1): Likewise.
627         * decl2.c (reparse_decl_as_expr): Likewise.
628         * init.c (perform_member_init): Likewise.
629         (expand_cleanup_for_base): Likewise.
630         (build_builtin_delete_call): Likewise.
631         (build_new_1): Likewise.
632         (build_delete): Likewise.
633         * method.c (do_build_assign_ref): Likewise.
634         * parse.y (already_scoped_stmt): Likewise.
635         (nontrivial_exprlist): Likewise.
636         (net_initializer): Likewise.
637         (initlist): Likewise.
638         * parse.c: Regenerated.
639         * rtti.c (build_x_typeid): Likewise.
640         (build_dynamic_cast_1): Likewise.
641         * typeck.c (build_x_compound_expr): Likewise.
642         (build_static_cast): Likewise.
643         (build_modify_expr): Likewise.
644         
645         * cp-tree.h (DECL_VINDEX): Add documentation.
646         * class.c (build_vtable_entry): Likewise.
647         (start_vtable): Add comment.
648         (add_virtual_function): Replace pending_hard_virtuals with
649         overridden_virtuals and pending_virtuals with new_virtuals.
650         Replace redundant assignments with assertions.
651         (check_for_override): Add comment.
652         (check_bases_and_members): Replace pending_hard_virtuals with
653         overridden_virtuals and pending_virtuals with new_virtuals.
654         (create_vtbl_ptr): Likewise.
655         (layout_class_type): Likewise.
656         (finish_struct_1): Likewise.  Add comments.
657         
658 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
659
660         * class.c (finish_struct_1): Replace redundant code with
661         assertions.
662
663         * cp-tree.h (flag_new_abi): Move.
664         (flag_use_cxa_atexit): Likewise.
665         (flag_honor_std): Likewise.
666         (flag_rtti): Likewise.
667         (vbase_offsets_in_vtable_p): Define.
668         (vptrs_present_everywhere_p): Likewise.
669         (TYPE_CONTAINS_VPTR_P): Likewise.
670         (dfs_walk_real): Declare.
671         * class.c (build_vbase_pointer_fields): Check
672         vbase_offsets_in_vtable_p.
673         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
674         BINFO_VPTR_FIELD.
675         (build_vbase_offset_vtbl_entries): Simplify.
676         (build_vbase_offset_vtbl_entries): Adjust.
677         (build_vbase_pointer): Add ability to look up vbase offsets in
678         vtable. 
679         (start_vtable): New function.
680         (add_virtual_function): Use it.
681         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
682         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
683         (build_vtbl_initializer): Take the type of the complete object as
684         input.  Use it to correctly calculate vbase offsets.
685         (dfs_finish_vtbls): Pass the complete type to
686         build_vtbl_initializer.
687         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
688         (create_vtable_ptr): Create a vtable even if there are no
689         new virtual functions, under the new ABI.
690         (finish_struct_1): Likewise.
691         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
692         * decl.c (exapnd_static_init): Remove call to
693         preserve_initializer.
694         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
695         vtables.
696         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
697         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
698         (construct_virtual_bases): Don't initialize virtual base pointers
699         under the new ABI.
700         (build_aggr_init): Clean up comment.
701         (expand_aggr_init_1): Likewise.
702         * rtti.c (expand_class_desc): Store the virtual function table
703         index where the vbase offset lives in the offset field.
704         * search.c (dfs_walk_real): Make it global.
705         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
706         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
707         
708         * tinfo.h (USItype): Make it signed under the new ABI.
709         * tinfo.cc (convert_to_base): New function.  Encapsulate base
710         conversion logic here.
711         (__class_type_info::do_upcast): Use it.
712         (__class_type_info::do_dyncast): Likewise.
713         (__class_type_info::do_find_public_subobj): Likewise.
714         
715         * init.c (construct_virtual_bases): Don't look up the addresses of
716         virtual bases at run-time.
717
718         * class.c (build_vbase_pointer): Relocate.
719         (build_vbase_pointer_fields): Likewise.
720         (dfs_build_vbase_offset_vtbl_entries): Likewise.
721         (build_vbase_offset_vtbl_entries): Likewise.
722
723         * decl.c (init_decl_processing): Complain if -fnew-abi
724         -fno-vtable-thunks is used.
725
726         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
727         flag_new_abi.
728
729 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
730
731         * cp-tree.h (num_extra_vtbl_entries): New function.
732         (size_extra_vtbl_entries): Likewise.
733         (dfs_vtable_path_unmark): Likewise.
734         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
735         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
736         * class.c (num_extra_vtbl_entries): New function.
737         (size_extra_vtbl_entries): Likewise.
738         (dfs_build_vbase_offset_vtbl_entries): New function.
739         (build_vbase_offset_vtbl_entries): Likewise.
740         (build_vtbl_initializer): Use it.
741         (finish_struct_1): Adjust vtable sizes (using
742         num_extra_vtbl_entries).
743         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
744         THUNK_DECL is non-NULL before expanding it.
745         * init.c (expand_virtual_init): Adjust the vtable pointer by
746         size_extra_vtbl_entries before storing it.
747         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
748         Handle TREE_LIST parameters here, not in the dfs_* functions.
749         (dfs_unmarked_real_bases_queue_p): Adjust.
750         (dfs_marked_real_bases_queue_p): Likewise.
751         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
752         (dfs_vtable_path_marked_real_bases_queue_p): New function.
753         (dfs_vtable_path_unmark): Likewise.
754         
755 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
756
757         * optimize.c (copy_body_r): Clear the operand three of a
758         TARGET_EXPR when copying it.
759
760 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
761
762         * method.c (build_decl_overload_real): Check whether we are in ::
763         before returning __builtin_new/delete.
764
765 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
766
767         * pt.c (tsubst_friend_function): Improve comment.
768         (instantiate_decl): Avoid crashing when a "nested" function is
769         instantiated from the top level.
770         
771         * dump.c (dqeueue_and_dump): Dump
772         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
773
774 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
775
776         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
777
778 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
779
780         * g++spec.c (lang_specific_driver): Add -fnew-abi if
781         ENABLE_NEW_GXX_ABI defined.
782         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
783         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
784         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
785
786 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
787
788         * decl.c (start_cleanup_fn): Call pushdecl.
789
790         * call.c (convert_class_to_reference): Fix typos.
791         (build_conditional_expr): Handle errors gracefully.
792         * class.c (push_nested_class): Likewise.
793         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
794         (DECL_THIS_EXTERN): Use it.
795         (DECL_THIS_STATIC): Likewise.
796         * cvt.c (convert_to_void): Handle errors gracefully.
797         (build_expr_type_conversion): Likewise.
798         * decl.c (maybe_push_decl): Likewise.
799         (start_decl_1): Likewise.
800         (require_complete_types_for_parms): Likewise.
801         * parse.y (structsp): Likewise.
802         (base_class): Likewise.
803         * parse.c: Regenerated.
804         * pt.c (finish_member_template_decl): Likewise.
805         * typeck.c (decay_conversion): Likewise.
806         
807         * cp-tree.h (dfs_skip_vbases): New function.
808         (find_vbase_instance): Likewise.
809         * class.c (determine_primary_base): Allow a nearly empty base to
810         serve as a primary base class under the new ABI.
811         (get_class_offset_1): Rename to ...
812         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
813         messages here.
814         (get_class_offset): Use it.  Issue error messages here.
815         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
816         find the right copies of virtual bases.
817         (fixup_vtable_deltas1): Rename to ...
818         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
819         bases as primary bases.
820         (fixup_vtable_deltas): Remove.
821         (override_one_vtable): Handle virtual bases as primary bases.
822         (merge_overrides): Likewise.
823         (finish_struct_1): Likewise.
824         (dump_class_hierarchy): Dump primary-ness of bases as well.
825         * search.c (mark_primary_bases): Use a pre-order traversal to
826         handle primary virtual bases.
827         (dfs_skip_vbases): New fiunction.
828         (expand_upcast_fixups): Adjust to handle primary virtual bases.
829         (fixup_virtual_upcast_offsets): Likewise.
830         (fixup_all_virtual_upcast_offsets): Likewise.
831         (dfs_find_vbase_instances): New function.
832         (find_vbase_instance): Likewise.
833         
834 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
835
836         * lex.c (DIR_SEPARATOR): Delete macro.
837
838 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
839  
840        * decl2.c (lang_decode_option): Handle automatic line wrapping
841        option.
842         
843 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
844
845         * friend.c (do_friend): Don't resolve scopes when processing
846         template declarations, even if the qualifying scope doesn't
847         involve template parameters.
848
849 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
850
851         * class.c (dfs_modify_vtables_queue_p): Remove.
852         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
853         and dfs_marked_real_bases_queue_p instead of
854         dfs_modify_vtables_queue_p.
855
856         * class.c (build_vbase_path): Simplify.
857         (dfs_propagate_binfo_offsets): New function.
858         (propagate_binfo_offsets): Use it.
859         (remove_base_field): Simplify.
860         (dfs_set_offset_for_vbases): Remove.
861         (dfs_set_offset_for_shared_vbases): New function.
862         (dfs_set_offset_for_unshared_vbases): Likewise.
863         (layout_virtual_bases): Use them.
864         (layout_basetypes): Don't call propagate_binfo_offsets.
865         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
866         for the vbases.
867         
868         * class.c (build_base_field): New function, split out from ...
869         (build_base_fields): ... here.  Use it.  Allocate primary bases
870         first, under the new ABI.
871         (get_vtable_entry): Remove.
872         (remove_base_field): New function, split out from ...
873         (remove_base_fields): ... here.  Adjust since primary bases come
874         first under the new ABI.
875         
876         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
877         (initialize_vtbl_ptrs): New function.
878         (expand_indirect_vtbls_init): Change prototype.
879         (convert_pointer_to_vbase): Declare.
880         * init.c (expand_direct_vtbls_init): Remove.
881         (dfs_initialize_vtbl_ptrs): New function.
882         (initialize_vtbl_ptrs): Likewise.
883         (emit_base_init): Use initialize_vtbl_ptrs.
884         * search.c (convert_pointer_to_vbase): Make it global.
885         (expand_indirect_vtbls_init): Remove vtable initialization code.
886         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
887         
888         * class.c (dfs_finish_vtbls): New function.
889         (finish_vtbls): Use it.
890         (dump_class_hierarchy): New function.
891         
892         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
893         (BINFO_VBASE_PRIMARY_P): New macro.
894         (BINFO_VIRTUALS): Add to documentation.
895         (SET_BINFO_PRIMARY_MARKED_P): Remove.
896         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
897         (dfs_mark_primary_bases_queue_p): Likewise.
898         (dfs_unmarked_real_bases_queue_p): New function.
899         (dfs_marked_real_bases_queue_p): Likewise.
900         * search.c (dfs_mark_primary_bases): Adjust.
901         (mark_primary_bases): Likewise.
902         (get_shared_vbase_if_not_primary): New function.
903         (dfs_unmarked_real_bases_queue_p): Likewise.
904         (dfs_marked_real_bases_queue_p): Likewise.
905         (dfs_get_pure_virtuals): Simplify.
906         (get_pure_virtuals): Likewise.
907         
908 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
909
910         * lex.c: Include tm_p.h.
911
912 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
913
914         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
915
916 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
917
918         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
919         * pt.c (instantiate_decl): Defer comdat templates that might not be
920         needed.
921         
922         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
923         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
924         (finish_file): Likewise.
925
926         * decl2.c (import_export_class): Undo 12/14 change.
927
928         * error.c (dump_decl): operator new, not operatornew.
929
930         * class.c (field_decl_cmp): A nontype is "greater" than a type.
931         * search.c (lookup_field_1): Look for the last field with the
932         desired name.
933
934 2000-01-05  Nathan Sidwell  <nathan@acm.org>
935
936         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
937         FUNCTION_DECL.
938
939 2000-01-05  Nathan Sidwell  <nathan@acm.org>
940
941         * typeck.c (build_static_cast): Don't strip target qualifiers
942         when casting from a class.
943
944 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
945
946         * class.c (warn_hidden): Initialize variable `fndecl'.
947
948 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
949
950         * decl.c (flag_isoc9x): New variable to be able to use code in
951         c-common.c.  For now always zero.
952
953 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
954
955         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
956         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
957         or unshare_base_binfos for virtual bases here.
958         * search.c (dfs_get_vbase_types): Do it here.
959         (get_vbase_types): Adjust.
960         
961 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
962
963         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
964         (BINFO_PRIMARY_MARKED_P): Use flag 5.
965         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
966         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
967         (unmark_primary_bases): Remove declaration.
968         (unmarkedp): Declare.
969         (dfs_vbase_unmark): Likewise.
970         * class.c (determine_primary_base): Return immediately if there
971         are no base classes.  Call mark_primary_bases here.
972         (modify_all_direct_vtables): Remove.
973         (modify_all_indirect_vtables): Remove.
974         (dfs_modify_vtables_queue_p): New function.     
975         (dfs_modify_vtables): New function.
976         (modify_all_vtables): Use them.
977         (build_base_fields): Build FIELD_DECLs for primary virtual base
978         classes.
979         (create_vtable_ptr): Don't call determine_primary_base here.
980         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
981         (dfs_set_offset_for_vbases): ... this.
982         (layout_virtual_bases): Use it.
983         (layout_class_type): Call determine_primary_base here.
984         * search.c (unmarkedp): Make it global.
985         (shared_marked_p): Simplify.
986         (shared_unmarked_p): Likewise.
987         (dfs_primary_bases_queue_p): Remove.
988         (dfs_unmark_primary_bases): Likewise.
989         (unmark_primary_bases): Likewise.
990         (mark_primary_bases): Simplify.
991         (get_pure_virtuals): Don't call mark_primary_bases here.
992         (dfs_vbase_unmark): New function.
993         (get_vbase_types): Simplify.
994
995         * class.c (struct base_info): Remove.
996         (determine_primary_base): Take has_virtual_p rather than a
997         base_info as input.  Don't calculate max_has_virtual.
998         (finish_struct_bits): Remove max_has_virtual argument.
999         (create_vtable_ptr): Remove max_has_virtual_p argument.
1000         (layout_virtual_bases): Remove max argument.
1001         (layout_basetypes): Likewise.
1002         (layout_class_type): Remove max_has_virtual_p argument.
1003         (finish_struct_1): Remove max_has_virtual.
1004
1005         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
1006         (layout_basetypes): Remove.
1007         * class.c (propagate_binfo_offsets): Moved here from tree.c.
1008         Update to handle primary virtual bases.
1009         (remove_base_fields): New function, split out from
1010         layout_basetypes.
1011         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
1012         (layout_virtual_bases): New function, split out from
1013         layout_basetypes.  Update to handle primary virtual bases.
1014         (layout_basetypes): Moved here from tree.c.  Use
1015         remove_base_fields and layout_virtual_bases.
1016         * search.c (dfs_mark_primary_bases_queue_p): New function.
1017         (mark_primary_bases): Use it.
1018         * tree.c (CEIL): Remove.
1019         (propagate_binfo_offsets): Remove.
1020         (layout_basetypes): Remove.
1021         
1022 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
1023
1024         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
1025         (BINFO_PRIMARY_MARKED_P): New macro.
1026         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
1027         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1028         (mark_primary_bases): New function.
1029         (unmark_primary_bases): Likewise.
1030         * search.c (get_abstract_virtuals_1): Remove.
1031         (dfs_mark_primary_bases): New function.
1032         (mark_primary_bases): Likewise.
1033         (dfs_unmark_primary_bases): Likewise.
1034         (unmark_primary_bases): Likewise.
1035         (dfs_get_pure_virtuals): Likewise.
1036         
1037 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
1038
1039         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
1040         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
1041         (modify_one_vtable): Adjust.
1042         (fixup_vtable_deltas1): Likewise.
1043         (override_one_vtable): Likewise.
1044         * search.c (get_abstract_virtuals_1): Likewise.
1045         (get_pure_virtuals): Likewise.
1046         (expand_upcast_fixups): Likewise.
1047         * tree.c (debug_binfo): Likewise.
1048         
1049         * class.c (build_vtable): Don't return a value.  Don't rebuild
1050         vtables for bases that have already been handled.
1051         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
1052         already been handled.
1053         (modify_one_vtable): Adjust accordingly.
1054         (fixup_vtable_deltas1): Likewise.
1055         (finish_struct_1): Likewise.
1056
1057 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1058
1059         * call.c (build_new_method_call): Also check destructors.
1060
1061 1999-12-31  Mark Mitchell  <mark@codesourcery.com>
1062
1063         * cp-tree.h (VF_NORMAL_VALUE): Remove.
1064         * class.c (struct base_info): Remove vfield, vfields, and rtti.
1065         (set_primary_base): New function, split out from ...
1066         (finish_base_struct): ... here.  Rename to ...
1067         (determine_primary_base): ... this.  Simplify.
1068         (create_vtable_ptr): Tweak accordingly.
1069         (finish_struct_1): Simplify.
1070         
1071         * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
1072         (CLASSTYPE_N_BASECLASSES): Likewise.
1073         (BINFO_FOR_VBASE): New macro.
1074         (get_vbase_types): Change prototype.
1075         * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
1076         (prepare_fresh_vtable): Likewise.
1077         (finish_vtbls): Likewise.
1078         (get_class_offset_1): Likewise.
1079         (modify_all_indirect_vtables): Likewise.
1080         (build_vbase_pointer_fields): Likewise.
1081         * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
1082         * init.c (sort_base_init): Use BINFO_FOR_VBASE.
1083         (expand_member_init): Likewise.
1084         * search.c (get_base_distance): Likewise.
1085         (lookup_field_queue_p): Likewise.
1086         (virtual_context): Likewise.
1087         (get_vbase_types): Don't return a value.  Set
1088         CLASSTYPE_VBASECLASSES here.
1089         * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
1090         
1091 1999-12-30  Mark Mitchell  <mark@codesourcery.com>
1092
1093         * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
1094
1095 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
1096
1097         * class.c (create_vtable_ptr): Put the vtable at the beginning of
1098         the class, not the end, in the new ABI.
1099         * tree.c (propagate_binfo_offsets): Do the right thing for the new
1100         ABI.
1101
1102 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
1103
1104         * cp-tree.h (lang_type): Add nearly_empty_p.  Adjust dummy.
1105         (CLASSTYPE_NEARLY_EMPTY_P): New macro.
1106         * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
1107         (check_field_decls): Likewise.
1108         (check_bases_and_members): Likewise.
1109
1110 1999-12-28  Mark Mitchell  <mark@codesourcery.com>
1111
1112         * cp-tree.h (do_inline_function_hair): Remove.
1113         * class.c (layout_class_type): New function, split out from
1114         finish_struct_1.
1115         (fixup_pending_inline): Likewise.
1116         (fixup_inline_methods): New function.
1117         * method.c (fixup_pending_inline): Remove.
1118         (do_inline_function_hair): Likewise.
1119         
1120         * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
1121         new ABI.
1122         
1123         * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
1124         (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
1125         (CLASSTYPE_PURE_VIRTUALS): ... this.
1126         (lang_decl_flags): Replace abstract_virtual with pure_virtual.
1127         (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
1128         (DECL_PURE_VIRTUAL_P): ... this.
1129         (get_abstract_virtuals): Rename to ...
1130         (get_pure_virtuals): ... this.
1131         * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
1132         DECL_ABSTRACT_VIRTUAL_P.  Replace CLASSTYPE_ABSTRACT_VIRTUALS with
1133         CLASSTYPE_PURE_VIRTUALS.
1134         * class.c (build_vtable_entry): Likewise.
1135         (finish_struct_bits): Likewise.  Call get_pure_virtuals, not
1136         get_abstract_virtuals.
1137         (build_vtbl_initializer): Likewise.
1138         (override_one_vtable): Likewise.
1139         (check_methods): Likewise.
1140         * decl.c (duplicate_decls): Likewise.
1141         (redeclaration_error_message): Likewise.
1142         (lang_mark_tree): Likewise.
1143         * decl2.c (grok_function_init): Likewise.
1144         (import_export_vtable): Likewise.
1145         (import_expor_class): Likewise.
1146         * typeck2.c (abstract_virtuals_error): Likewise.
1147         * xref.c (GNU_xref_member): Likewise.
1148         * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
1149         
1150 1999-12-26  Zack Weinberg  <zack@wolery.cumb.org>
1151
1152         * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
1153         throughout.
1154
1155 1999-12-26  Mark Mitchell  <mark@codesourcery.com>
1156
1157         * decl.c (store_return_init): Use mode of old RTL generated for
1158         DECL_RESULT, not the mode of DECL_RESULT itself.
1159         * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
1160         for functions that used named return values.
1161         
1162 1999-12-24  Mark Mitchell  <mark@codesourcery.com>
1163
1164         * semantics.c (expand_body): Use
1165         note_deferral_of_defined_inline_function.
1166
1167 1999-12-22  Mark Mitchell  <mark@codesourcery.com>
1168
1169         * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
1170
1171 1999-12-22  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
1172
1173         * error.c (dump_decl): Support named return values.
1174
1175 1999-12-20  Mark Mitchell  <mark@codesourcery.com>
1176
1177         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
1178         (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
1179         (CLASSTYPE_PRIMARY_BINFO): Likewise.
1180         * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
1181         TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
1182         (check_bases_and_members): Set them here instead.
1183         (create_vtable_ptr): New function, split out from ...
1184         (finish_struct_1): ... here.  Use it.  Tidy.  Use
1185         CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
1186         * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
1187         the first field in the class.
1188         * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES.  Handle
1189         seeing TYPE_VFIELD as the first field in the class.
1190         
1191         * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
1192         (TYPE_POLYMORPHIC_P): ... this.
1193         (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
1194         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
1195         (TREE_CALLS_NEW): Remove.
1196         (TREE_MANGLED): Likewise.
1197         * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
1198         and TYPE_POLYMORPHIC_P.
1199         * class.c (check_bases): Likewise.
1200         (finish_base_struct): Likewise.
1201         (finish_struct_bits): Likewise.
1202         (check_for_override): Likewise.
1203         (finish_struct_1): Likewise.
1204         (get_vfield_name): Likewise.
1205         * decl.c (xref_basetypes): Likewise.
1206         * decl2.c (import_export_class): Likewise.
1207         (import_export_decl): Likewise.
1208         * error.c (dump_function_decl): Likewise.
1209         * pt.c (instantiate_class_template): Likewise.
1210         * repo.c (repo_inline_used): Likewise.
1211         * rtti.c (build_headof): Likewise.
1212         (get_tinfo_fn_dynamic): Likewise.
1213         (build_x_typeid): Likewise.
1214         (get_tinfo_var): Likewise.
1215         (build_dynamic_cast_1): Likewise.
1216         (synthesize_tinfo_fn): Likewise.
1217         * search.c (lookup_field_1): Likewise.
1218         (dfs_debug_mark): Likewise.
1219         (maybe_suppress_debug_info): Likewise.
1220         * typeck.c (build_component_ref): Likewise.
1221         (build_component_addr): Likewise.
1222         * typeck2.c (process_init_constructor): Likewise.
1223         
1224 1999-12-20  Nathan Sidwell  <nathan@acm.org>
1225
1226         * typeck.c (strip_all_pointer_quals): New static function.
1227         (build_static_cast): Use it. Don't use at_least_as_qualified_p.
1228
1229 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
1230
1231         * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
1232         (dso_handle_node): New macro.
1233         (flag_use_cxa_atexit): New variable.
1234         (declare_global_var): New function.
1235         (start_anon_func): Remove declaration.
1236         (end_anon_func): Likewise.
1237         * decl.c (get_atexit_node): New function, split out from
1238         destroy_local_static.  Handle flag_use_cxa_atexit.
1239         (get_dso_handle_node): Likewise.
1240         (start_cleanup_fn): Renamed from start_anon_func.  Moved here from
1241         except.c.  Handle flag_use_cxa_atexit.
1242         (end_cleanup_fn): Renamed from end_anon_func.  Moved here from
1243         except.c.
1244         (declare_global_var): New variable.
1245         (destroy_local_static): Handle flag_use_cxa_atexit.
1246         * decl2.c (flag_use_cxa_atexit): New variable.
1247         (lang_f_options): Likewise.
1248         * except.c (start_anon_func): Remove.
1249         (end_anon_func): Liekwise.
1250         * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
1251         * rtti.c (get_tinfo_var): Use declare_global_var.
1252
1253 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
1254
1255         * class.c (check_field_decls): Don't return a value.
1256         (avoid_overlap): Moved here from tree.c.
1257         (build_base_fields): Likewise.
1258         (check_bases): New function, split out from finish_base_struct.
1259         (check_bases_and_members): New function, split out from 
1260         finish_struct_1.
1261         (struct base_info): Remove cant_have_default_ctor,
1262         cant_have_const_ctor, cant_have_asn_ref.
1263         (finish_base_struct): Split semantic analysis into check_bases.
1264         (finish_struct_methods): Fix bogus assertion.
1265         (check_field_decls): Call finish_struct_anon here.
1266         (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
1267         (finish_struct_1): Use check_bases_and_members.  Reorganize.
1268         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
1269         (build_base_fields): Don't declare.
1270         * tree.c (avoid_overlap): Remove.
1271         (build_base_fields): Likewise.
1272         
1273         * optimize.c (struct inline_data): Remove scope_stmt.
1274         (remap_block): Don't use insert_block_after_note.  Don't update
1275         scope_stmt.
1276         (expand_call_inline): Don't update scope_stmt.
1277         (optimize_function): Don't initialize scope_stmt.
1278         * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
1279         NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
1280
1281 1999-12-15  Mark Mitchell  <mark@codesourcery.com>
1282
1283         * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
1284         out of the class, rather than taking them as parameters.
1285         (build_vbase_pointer_fields): Move here from tree.c.
1286         (build_vtbl_or_vbase_field): New function.
1287         (check_methods): Likewise.
1288         (remove_zero_width_bitfields): Likewise.
1289         (add_virtual_function): Use tree_cons instead of temp_tree_cons.
1290         (delete_duplicate_fields_1): Tidy.  Don't delete duplicate
1291         USING_DECLs here.
1292         (finish_struct_methods): Handle the case where there are no
1293         methods here.
1294         (get_basefndecls): Use tree_cons instead of temp_tree_cons.
1295         (check_field_decls): Call delete_duplicate_fields here.
1296         (finish_struct_1): Tidy.  Use check_methods and
1297         remove_zero_width_bitfields.
1298         * cp-tree.h (build_vbase_pointer_fields): Remove.
1299         * decl.c (grokdeclarator): Use tree_cons instead of
1300         temp_tree_cons.
1301         * decl2.c (qualified_lookup_using_namespace): Use tree_cons
1302         instead of temp_tree_cons.
1303         * lex.c (cons_up_default_function): Remove dead code.
1304         * method.c (fixup_pending_inline): New function, split out from ...
1305         (do_inline_function_hair): ... here.
1306         * tree.c (build_vbase_pointer_fields): Remove.
1307         
1308 1999-12-15  Jason Merrill  <jason@casey.cygnus.com>
1309
1310         * tree.c (walk_tree): Walk operand subtrees in forward order.
1311         * optimize.c (expand_call_inline): Likewise.
1312         (optimize_function): Initialize id->scope_stmt to something useful.
1313         (remap_block): Assume id->scope_stmt has a useful value.
1314
1315 1999-12-15  Nathan Sidwell  <nathan@acm.org>
1316
1317         * typeck.c (build_c_cast): Expand warning message. Move pointer
1318         alignment warning to after the cast. Don't warn about pointer
1319         alignment when given a pointer to incomplete.
1320
1321 1999-12-15  Richard Henderson  <rth@cygnus.com>
1322
1323         * cp-tree.h (make_aggr_type): Declare.
1324         * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
1325         (make_aggr_type): New.
1326
1327         * decl.c (build_typename_type, init_decl_processing): Use it.
1328         (build_ptrmemfunc_type, xref_tag): Likewise.
1329         * except.c (call_eh_info): Likewise.
1330         * init.c (init_init_processing): Likewise.
1331         * pt.c (process_template_parm, lookup_template_class): Likewise.
1332         * rtti.c (expand_class_desc): Likewise.
1333         * semantics.c (begin_class_definition, finish_typeof): Likewise.
1334         * tree.c (copy_template_template_parm): Likewise.
1335
1336 1999-12-15  Jason Merrill  <jason@yorick.cygnus.com>
1337
1338         * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
1339         sizeof (struct tree_common).
1340
1341 1999-12-14  Jason Merrill  <jason@casey.cygnus.com>
1342
1343         * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
1344         outermost block to point to the inlined function decl.
1345
1346         * error.c (dump_decl): operator==, not operator ==.
1347         (op_to_string): Likewise.
1348
1349         * decl.c (compute_array_index_type): Handle null name.
1350
1351         * decl2.c (ambiguous_decl): Fix to match comment.
1352         (lookup_using_namespace): Adjust.
1353
1354         * decl2.c (import_export_class): Don't ignore dllimport.
1355
1356 1999-12-14  Mark Mitchell  <mark@codesourcery.com>
1357
1358         * class.c (check_field_decls): Split out from ...
1359         (finish_struct_1): ... here.  Use it.  Tidy.
1360
1361         * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
1362         * optimize.c (copy_body_r): Pass it.
1363         * tree.c (remap_save_expr): Clear walk_subtrees for an
1364         already-handled SAVE_EXPR.
1365         (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
1366
1367         * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
1368         * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
1369
1370         * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
1371
1372 1999-12-14  Mumit Khan  <khan@xraylith.wisc.edu>
1373
1374         * class.c (finish_base_struct): Allow multiple COM base classes
1375         as well as non-COM bases as long as it's not the leftmost.
1376
1377 1999-12-13  Mumit Khan  <khan@xraylith.wisc.edu>
1378
1379         * lex.c (saving_parse_to_obstack): New global.
1380         (reinit_parse_for_block): Use.
1381         (reinit_parse_for_expr): Use.
1382         (check_newline): Use.
1383
1384 1999-12-13  Mark Mitchell  <mark@codesourcery.com>
1385
1386         * optimize.c (initialize_inlined_parameters): Take FN to which the
1387         parameters belong as an argument.
1388         (expand_call_inline): Expand calls into the parameter
1389         initializations before pushing the function onto the list of
1390         functions we are presently expanding.
1391
1392 1999-12-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1393
1394         * class.c (get_vtable_name): Use a literal format string and
1395         VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
1396         (prepare_fresh_vtable): Likewise.
1397
1398         * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
1399         VTABLE_NAME_FORMAT.
1400
1401         * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
1402
1403         * init.c (build_vec_init): Initialize variable `try_body'.
1404
1405         * lex.c (yyerror): Don't call a variadic function with a
1406         non-literal format string.
1407
1408         * optimize.c (optimize_function): Call memset, not bzero.
1409
1410         * pt.c (for_each_template_parm_r): Add static prototype.
1411
1412 1999-12-09  Andreas Jaeger  <aj@suse.de>
1413
1414         * except.c (expand_throw): Add static attribute to match
1415         prototype.
1416
1417         * Makefile.in (semantics.o): Add dependency on output.h.
1418         * semantics.c: Include output.h for declaration of
1419         make_function_rtl.
1420
1421 1999-12-09  Mark Mitchell  <mark@codesourcery.com>
1422
1423         * decl.c (init_decl_processing): Reenable inlining on trees.
1424         (finish_function): Likewise.
1425         * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
1426         * semantics.c (simplify_aggr_init_exprs): New function.
1427         (expand_body): Use it.
1428         * tree.c (walk_tree): Special-case TARGET_EXPRs since they
1429         sometimes present the same sub-tree twice.
1430         
1431         * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
1432         `csl'.
1433
1434         * semantics.c (finish_switch_cond): Do conversions here, not ...
1435         * typeck.c (c_expand_start_case): Here.
1436
1437         * semantics.c (do_poplevel): Remove unused variable.
1438         
1439 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
1440
1441         * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
1442         unless we're declaring the variable in question.
1443
1444 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
1445
1446         * decl.c (init_decl_processing): #if 0 last patch.
1447         (finish_function): Likewise.
1448
1449 1999-12-05  Mark Mitchell  <mark@codesourcery.com>
1450
1451         * decl.c (init_decl_processing): Set flag_inline_trees if
1452         !flag_no_inline.
1453
1454         * cp-tree.h (calls_setjmp_p): Declare.
1455         * decl.c (finish_function): Mark functions that call setjmp as
1456         uninlinable.
1457         * optimize.c (calls_setjmp_r): New function.
1458         (calls_setjmp_p): Likewise.
1459
1460 1999-12-04  Mark Mitchell  <mark@codesourcery.com>
1461
1462         * optimize.c (expand_call_inline): Wrap the expanded call in an
1463         EXPR_WITH_FILE_LOCATION node to get correct line numbers for
1464         inlined functions.
1465
1466         * optimize.c (inline_data): Remove fns_top.  Add scope_stmt.  Add
1467         in_target_cleanup_p.
1468         (remap_decl): New function.
1469         (remap_block): Likewise.
1470         (copy_scope_stmt): Likewise.
1471         (copy_body_r): Use remap_decl and copy_scope_stmt.
1472         (copy_body): Use VARRAY_TOP_TREE.
1473         (initialize_inlined_parameters): Likewise.
1474         (declare_return_variable): Likewise.
1475         (inlinable_function_p): Check flag_inline_trees.
1476         (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
1477         specially.  Use VARRAY_PUSH_TREE.  Create a BLOCK for the
1478         parameters of the inlined function.
1479         (optimize_function): Prevent recursion into partially complete
1480         functions.
1481         
1482         * cp-tree.def (SCOPE_STMT): Take one operand.
1483         * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
1484         (SCOPE_NULLIFIED_P): Redefine.
1485         (SCOPE_NO_CLEANUPS_P): New macro.
1486         (add_scope_stmt): Change prototype.
1487         * decl.c (poplevel): Tidy.  Warn about unused variables here.
1488         Record SCOPE_STMT_BLOCKs.
1489         (finish_function): Keep DECL_INITIAL for functions that might be
1490         inlined.
1491         * ir.texi: Document SCOPE_NO_CLEANUPS_P.
1492         * semantics.c: Include rtl.h.
1493         (add_scope_stmt): Return the new scope statement and, for an
1494         end-of-scope statement, its matching begin statement.  Don't set
1495         SCOPE_NULLIFIED_P.
1496         (do_pushlevel): Simplify, now that we are always
1497         function-at-a-time.
1498         (do_poplevel): Likewise.  Record SCOPE_STMT_BLOCKs.
1499         (expand_stmt): Don't call expand_start_bindings or
1500         expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
1501         * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
1502         SCOPE_NULLIFIED_P.
1503         * Makefile.in (semantics.o): Depend on RTL_H.
1504         
1505         * decl2.c (pending_statics_used): Make it a macro.
1506         (saved_inlines_used): Likewise.
1507         (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
1508         (mark_inline_for_output): Likewise.
1509         (ssdf_decls_used): Remove.
1510         (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
1511         (generate_ctor_or_dtor_function): Adjust accordingly.
1512         
1513 1999-11-24  Geoffrey Keating  <geoffk@cygnus.com>
1514             Greg McGary  <gkm@gnu.org>
1515
1516         * decl.c (duplicate_decls): Merge
1517         DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
1518         DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
1519
1520 1999-12-02  Mike Stump  <mrs@wrs.com>
1521
1522         * init.c (perform_member_init): Handle parse errors better.
1523
1524 1999-12-01  Mark Mitchell  <mark@codesourcery.com>
1525
1526         * cp-tree.h (min_tree_cons): Remove.
1527         (scratch_ovl_cons): Likewise.
1528         * decl.c (saveable_obstack): Don't declare.
1529         (duplicate_decls): Tweak error-message.
1530         (initialize_local_var): Explicitly mark the definition as static.
1531         (finish_function): Call permanent_allocation, just so
1532         that the middle-end sees the obstacks it expects.
1533         (mark_cp_function_context): Likewise.
1534         * init.c (build_new): Don't use min_tree_cons.
1535         * lex.c (permanent_obstack): Don't declare.
1536         (current_obstack, saveable_obstack): Likewise.
1537         * spew.c (current_obstack, saveable_obstack): Likewise.
1538         * tree.c (current_obstack, saveable_obstack): Likewise.
1539         (scratch_ovl_cons): Remove.
1540         (build_min_nt): Don't mess with obstacks.
1541         (build_min): Likewise.
1542         (min_tree_cons): Remove
1543         * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
1544         (build_x_function_call): Likewise.
1545         (build_c_cast): Don't use min_tree_cons.
1546         
1547 1999-11-29  Mark Mitchell  <mark@codesourcery.com>
1548
1549         * pt.c (tsubst_decl): Robustify.
1550
1551 1999-11-27  Mark Mitchell  <mark@codesourcery.com>
1552
1553         * decl2.c (finish_file): Call expand_body for inline functions
1554         that will be written out but that do not yet have RTL.
1555         * semantics.c (expand_body): Do not generate RTL For inline
1556         functions that do not yet need to be written out.
1557
1558 1999-11-25  Mark Mitchell  <mark@codesourcery.com>
1559
1560         * Make-lang.in (CXX_SRCS): Add optimize.c.  
1561         * Makefile.in (CXX_OBJS): Add optimize.o.
1562         (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
1563         (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
1564         (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
1565         (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
1566         (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
1567         (dump.o): Likewise.
1568         (optimize.o): New target.  
1569         * class.c: Don't include splay-tree.h.
1570         * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.  
1571         * cp-tree.h: Include splay-tree.h.
1572         (DECL_UNINLINABLE): New macro.
1573         (CTOR_BEGIN_P, CTOR_END_P): New macros.
1574         (flag_inline_trees): New variable.
1575         (local_variable_p): New function.
1576         (nonstatic_local_decl_p): Likewise.
1577         (optimize_function): Likewise.
1578         (cplus_unsave_expr_now): Remove.
1579         (copy_tree_r): Declare.
1580         (remap_save_expr): Likewise.  
1581         * decl.c (local_variable_p): Don't
1582         make it static.
1583         (local_variable_p_walkfn): New function.
1584         (make_rtl_for_local_static): Remove code to try to avoid writing
1585         out static constants.
1586         (emit_local_var): Fix indentation.
1587         (nonstatic_local_decl_p): New function.
1588         (check_default_argument): Use local_variable_p_walkfn, not
1589         local_variable_p, when walking the tree.
1590         (start_function): Set the DECL_CONTEXT for automatically generated
1591         labels.
1592         (finish_constructor_body): Use CTOR_STMT to mark the end of a
1593         constructor.  
1594         * decl2.c: Don't include splay-tree.h.
1595         (flag_inline_trees): Define.  
1596         * dump.c: Don't include
1597         splay-tree.h.  
1598         * except.c (expand_end_catch_block): Fix comment formatting.
1599         (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
1600         (expand_throw): Tidy comment.  
1601         * init.c (build_vec_delete_1): Use create_temporary_var.  
1602         * lex.c (cplus_tree_code_type): Make it static.
1603         (cplus_tree_code_length): Likewise.
1604         (cplus_tree_code_name): Likewise.  
1605         * optimize.c: New file.  
1606         * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
1607         with computed gotos.
1608         (setup_vtbl_ptr): Mark the beginnings of constructors with
1609         CTOR_STMT.
1610         (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
1611         (expand_body): Call optimize_function.  Save bodies if we're doing
1612         inlining on trees.
1613         * tree.c: Don't include splay-tree.h.  Include insn-config.h and
1614         integrate.h.
1615         (copy_tree_r): Make it public.
1616         (statement_code_p): New function.
1617         (mark_local_for_remap_r): Likewise.
1618         (cp_usave_r): Likewise.
1619         (cp_unsave): Likewise.
1620         (build_cplus_new): Set DECL_CONTEXT for temporary variables.
1621         (walk_tree): Walk into `s' class nodes.  Walk statement chains.
1622         (copy_tree_r): Handle 's' class nodes.  Restore chains for
1623         statements.  Nullify scopes.  Don't copy types.
1624         (init_tree): Set lang_unsave to cp_unsave.
1625         (remap_save_expr): Define.
1626         * ir.texi: Document CTOR_STMT.
1627         
1628 1999-11-24  Jason Merrill  <jason@casey.cygnus.com>
1629
1630         * search.c (note_debug_info_needed): Do perform this optimization
1631         for dwarf2.  
1632         (maybe_suppress_debug_info): Likewise.  Start by clearing
1633         TYPE_DECL_SUPPRESS_DEBUG.
1634
1635 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
1636
1637         * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
1638
1639         * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
1640
1641 1999-11-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1642
1643         * decl.c (pushdecl, grokdeclarator): Don't call a variadic
1644         function with a non-literal format string.
1645
1646         * lex.c (do_identifier): Likewise.
1647
1648         * typeck.c (build_unary_op): Likewise.
1649
1650 1999-11-23  Mark Mitchell  <mark@codesourcery.com>
1651
1652         * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
1653
1654 1999-11-22  Mark Mitchell  <mark@codesourcery.com>
1655
1656         * cp-tree.def (CTOR_COMPLETE): New tree node.
1657         * decl.c (finish_constructor_body): Add it, to mark the end of the
1658         constructor.
1659         (finish_function): Don't call end_protect_partials here.
1660         * ir.texi (CTOR_COMPLETE): Document it.
1661         * semantics.c (expand_stmt): Handle it.
1662         
1663         * cp-tree.def (FUNCTION_NAME): New tree node.
1664         * cp-tree.h (current_function_name_declared): Tweak documentation.
1665         (lang_decl_flags): Add pretty_function_p, adjust dummy.
1666         (DECL_PRETTY_FUNCTION_P): New macro.
1667         * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
1668         etc., in a template function.  Use at_function_scope_p instead of
1669         expanding it inline.
1670         * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
1671         specially.
1672         (tsubst): Handle FUNCTION_NAME.
1673         (tsubst_copy): Likewise.
1674         (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
1675         etc. in instantiation.
1676         * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
1677         even in template functions.
1678         (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
1679         conditional scope at the top of a destructor.
1680         
1681         * error.c (dump_function_decl): Use `[ with ... ]' syntax for
1682         specializations too.
1683
1684 1999-11-22  Nathan Sidwell  <nathan@acm.org>
1685
1686         * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
1687         when actually negative.
1688
1689         * typeck.c (convert_for_assignment): Expand comment about
1690         strange NULL check, moved from ...
1691         (convert_for_initialization): ... here. Remove unneeded
1692         code.
1693
1694 1999-11-21  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
1695
1696         * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
1697         * init.c (build_vec_delete, build_vec_delete_1): Likewise.
1698         Always destruct virtual bases of array components, but never
1699         delete them.
1700         (build_vec_init): Adjust invocations.
1701         (build_delete): Likewise.
1702         * decl2.c (delete_sanity): Likewise.
1703
1704 1999-11-19  Nathan Sidwell  <nathan@acm.org>
1705
1706         * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
1707         * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
1708         * decl2.c (grok_method_quals): Accept `restrict' as applying to
1709         the object pointer. Return such qualifiers.
1710         (grokclassfn): Apply this pointer qualifiers. Cleanup unused
1711         variables.
1712
1713 1999-11-18  Mark Mitchell  <mark@codesourcery.com>
1714
1715         * except.c (expand_end_catch_block): Fix typo.
1716         (expand_exception_blocks): Simplify.  Don't call
1717         expand_leftover_cleanups.
1718
1719 1999-11-15  Jason Merrill  <jason@casey.cygnus.com>
1720
1721         * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
1722         * pt.c (tsubst, case INTEGER_TYPE): Call it.  
1723         Check uses_template_parms.
1724
1725         * class.c (finish_struct): If we're a local class in a template
1726         function, add a TAG_DEFN.
1727         * pt.c (lookup_template_class): If this is a local class in a
1728         template function, call pushtag.
1729         (tsubst_expr, case TAG_DEFN): Handle classes, too.
1730
1731         Emit debug info with the vtable.
1732         * search.c (maybe_suppress_debug_info): New function...
1733         * class.c (finish_struct_1): ...split out from here.
1734         * cp-tree.h: Declare it.
1735         * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
1736         if we're writing out the vtable.
1737         * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, 
1738         note_debug_info_needed): #if 0 out.
1739
1740 1999-11-14  Mark Mitchell  <mark@codesourcery.com>
1741
1742         * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
1743         * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
1744         TREE_PERMANENT.
1745         * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
1746         * decl2.c (lookup_arg_dependent): Use it.
1747         
1748         * cp-tree.h (cp_finish_decl): Change prototype.
1749         (finish_static_data_member_decl): Likewise.
1750         (push_permanent_obstack): Remove declaration.
1751         (push_expression_obstack): Likewise.
1752         (push_scratch_obstack): Likewise.
1753         (DECL_TEMPLATE_PARM_P): Robustify.
1754         (SET_DECL_TEMPLATE_PARM_P): New macro.
1755         * class.c (add_method): Don't manipulate obstacks.
1756         (finish_vtbls): Likewise.
1757         * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
1758         * decl.c (binding_for_name): Don't manipulate obstacks.
1759         (maybe_push_to_top_level): Likewise.
1760         (pop_from_top_level): Likewise.
1761         (duplicate_decls): Likewise.
1762         (pushdecl): Likewise.
1763         (implicitly_declare): Likewise.
1764         (build_typename_type): Likewise.
1765         (start_decl): Likewise.
1766         (cp_finish_decl): Likewise.
1767         (finish_decl): Likewise.
1768         (destroy_local_static): Likewise.
1769         (expand_static_init): Likewise.
1770         (complete_array_type): Likewise.
1771         (grokvardecl): Likewise.
1772         (build_ptrmemfnc_type): Likewise.
1773         (grokdeclarator): Likewise.
1774         (xref_tag): Likewise.
1775         (xref_basetypes): Likewise.
1776         (start_enum): Likewise.
1777         (finish_enum): Likewise.
1778         (start_function): Likewise.
1779         (finish_function): Likewise.
1780         (start_method): Adjust call to cp_finish_decl.
1781         * decl2.c (finish_static_data_member_decl): Don't manipulate
1782         obstacks.
1783         (grokfield): Likewise.
1784         (grokbitfield): Likewise.
1785         (get_temp_name): Likewise.
1786         (get_sentry): Likewise.
1787         (fnish_file): Likewise.
1788         (lookup_arg_dependent): Likewise.
1789         * except.c (call_eh_info): Likewise.
1790         (push_eh_info): Likewise.
1791         (do_pop_exception): Likewise.
1792         (initialize_handler_parm): Likewise.
1793         (expand_end_eh_spec): Likewise.
1794         (alloc_eh_object): Likewise.
1795         (expand_throw): Likewise.
1796         * expr.c (extract_scalar_init): Likewise.
1797         * init.c (build_java_class_ref): Likewise.
1798         * lex.c (get_time_identifier): Likewise.
1799         (snarf_defarg): Likewise.
1800         (add_defarg_fn): Likewise.
1801         (is_global): Simplify.
1802         (do_identifier): Don't check TREE_PERMANENT.
1803         * method.c (emit_thunk): Don't manipulate obstacks.
1804         * parse.y (condition): Adjust call to cp_finish_decl.
1805         (primary): Likewise.
1806         (initdcl): Likewise.
1807         (initdcl0_innards): Likewise.
1808         (nomods_initdcl0): Likewise.
1809         * pt.c (push_inline_template_parms_recursive): Use
1810         SET_DECL_TEMPLATE_PARM_P.
1811         (process_template_parm): Likewise.
1812         (lookup_template_class): Don't manipulate obstacks.
1813         (instantiate_class_template): Adjust call to
1814         finish_static_data_member_decl.
1815         (tsubst_decl): Don't manipulate obstacks.
1816         (tsubst_expr): Likewise.
1817         (instantiate_template): Likewise.
1818         (instantiate_decl): Adjust calls to cp_finish_decl.
1819         * rtti.c (call_void_fn): Don't manipulate obstacks.
1820         (get_tinfo_var): Likewise.
1821         (get_tinfo_fn_unused): Likewise.
1822         (build_dynamic_cast_1): Likewise.
1823         (expand_si_desc): Likewise.
1824         (expand_class_desc): Likewise.
1825         (expand_ptr_desc): Likewise.
1826         (expand_attr_desc): Likewise.
1827         (expand_generic_desc): Likewise.
1828         (synthesize_tinfo_fn): Likewise.
1829         * search.c (expand_upcast_fixups): Likewise.
1830         * semantics.c (finish_asm_stmt): Likewise.
1831         (finish_named_return_value): Likewise.
1832         (begin_class_definition): Likewise.
1833         (finish_class_definition): Likewise.
1834         (finish_typeof): Likewise.
1835         * tree.c (build_cplus_method_type): Likewise.
1836         (reverse_path): Likewise.
1837         (copy_template_template_parm): Likewise.
1838         (build_expr_ptr_wrapper): Likewise.
1839         (push_expression_obstack): Remove.
1840         (push_permanent_obstack): Likewise.
1841         * typeck.c (mark_addressable): Likewise.
1842         
1843 1999-11-13  Mark Mitchell  <mark@codesourcery.com>
1844
1845         * call.c (build_conditional_expr): Use build_target_expr_with_type.
1846         (convert_like): Likewise.
1847         (build_over_call): Likewise.
1848         * cp-tree.h (build_target_expr): Remove.
1849         (build_target_expr_with_type): New function.
1850         * cvt.c (build_up_reference): Use get_target_expr.
1851         * decl.c (build_target_expr): Move to ...
1852         * tree.c (build_target_expr): Here.  Make it static.
1853         (build_target_expr_with_type): New function.  Set DECL_CONTEXT on
1854         the temporary VAR_DECLs.
1855         (get_target_expr): Use it.
1856
1857 1999-11-13  Jason Merrill  <jason@yorick.cygnus.com>
1858
1859         * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
1860         * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
1861         * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
1862         * class.c (set_rtti_entry): Use it.
1863
1864 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
1865
1866         * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
1867         here.
1868         * semantics.c (finish_expr_stmt): Call it here instead.  Move
1869         default_conversion logic to semantic-analysis time.
1870
1871 1999-11-12  Jason Merrill  <jason@yorick.cygnus.com>
1872
1873         * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
1874
1875 Fri Nov 12 12:56:32 MST 1999    Diego Novillo <dnovillo@cygnus.com>
1876
1877         * init.c (init_init_processing): Re-instated Nov 11 patch after
1878         approval.
1879
1880 Fri Nov 12 10:42:02 MST 1999    Diego Novillo <dnovillo@cygnus.com>
1881
1882         * init.c (init_init_processing): Undo patch from Nov 11, 1999.
1883         Patch had not been approved yet.
1884
1885 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
1886
1887         * decl.c (compute_array_index_type): New function, split out from
1888         grokdeclarator.
1889         (create_array_type_for_decl): Likewise.
1890         (grokdeclarator): Use them.
1891
1892         * semantics.c (expand_stmt): Don't suspend_momentary or
1893         resume_momentary.
1894
1895 Thu Nov 11 12:42:11 MST 1999    Diego Novillo <dnovillo@cygnus.com>
1896
1897         * init.c (init_init_processing): Header information for
1898         arrays allocated via `new' should have the same alignment used by
1899         malloc.
1900
1901 1999-11-10  Mark Mitchell  <mark@codesourcery.com>
1902
1903         * error.c (dump_function_name): Don't crash if given a friend
1904         pseudo-instantiation.
1905
1906         * cp-tree.h (build_enumerator): Change prototype.
1907         * decl.c (enum_next_value): Remove.
1908         (enum_overflow): Likewise.
1909         (init_decl_processing): Don't register enum_next_value as a root.
1910         (start_enum): Clear TYPE_VALUES for a redefined enum.
1911         (finish_enum): Reset the type of enumeration constants.
1912         (build_enumerator): Fix indentation.  Don't copy CONST_DECLs when
1913         we don't need to.  Maintain the TYPE_VALUES list and look there
1914         for the previously defined enumeration constant.  Let enumeration
1915         constants have the type of their values until the enumeration type
1916         is complete.
1917         * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
1918         (structsp): Adjust.
1919         * parse.c: Regenerated.
1920         * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
1921         
1922 Wed Nov 10 12:43:21 1999  Philippe De Muyter  <phdm@macqel.be>
1923                           Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1924
1925         * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
1926
1927 1999-11-09  Mark Mitchell  <mark@codesourcery.com>
1928
1929         * cp-tree.h (language_function): Remove x_last_dtor_insn and
1930         x_last_parm_cleanup_insn.
1931         * decl.c (last_dtor_insn): Remove.
1932         (last_parm_cleanup_insn): Likewise.
1933         (expand_start_early_try_stmts): Don't set them.
1934         (store_parm_decls): Likewise.
1935         (save_function_data): Or save them.
1936         (mark_lang_function): Or mark them.
1937
1938 1999-11-08  Mark Mitchell  <mark@codesourcery.com>
1939
1940         * decl.c (store_parm_decls): Generate cleanup code at
1941         semantic-analysis time.  Destroy objects in the correct order.
1942
1943 1999-11-07  Mark Mitchell  <mark@codesourcery.com>
1944
1945         * cp-tree.h (begin_new_placement): Remove.
1946         (finish_new_placement): Likewise.
1947         * class.c (finish_struct_1): Don't suspend_momentary or
1948         resume_momentary.
1949         * decl.c (grokdeclarator): Likewise.
1950         (maybe_build_cleanup_1): Likewise.
1951         * except.c (push_eh_cleanup): Likewise.
1952         (build_terminate_handler): Likewise.
1953         * init.c (build_new_1): Likewise.
1954         * parse.y (parse_decl): Change prototype.
1955         (initdecls, notype_initdecls, initdcl): Don't return int.
1956         (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
1957         (.begin_new_placement): Remove.
1958         (.finish_new_placement): Likewise.
1959         (nonmomentary_expr): Likewise.
1960         (suspend_mom): Likewise.
1961         (condition): Don't suspend_momentary, resume_momentary, or keep
1962         track of need to resume.
1963         (unary_expr): Likewise.
1964         (new_placement): Likewise.
1965         (decl): Likewise.
1966         (structsp): Likewise.
1967         (new_type_id): Likewise.
1968         (maybe_parmlist): Likewise.
1969         (direct_after_type_declaration): Likewise.
1970         (direct_new_declarator): Likewise.
1971         (direct_abstract_declaration): Likewise.
1972         * parse.c: Regenerated.
1973         * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
1974         * semantics.c (begin_new_placement): Remove.
1975         (finish_new_placement): Likewise.
1976         
1977 1999-11-05  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1978
1979         * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
1980         (DECL_TEMPLATE_INFO): Use it.
1981         * decl.c (warn_extern_redeclared_static): Do nothing for
1982         TEMPLATE_DECLs.
1983         * decl2.c (mark_used): Explicitly check for function or variable.
1984         * semantics.c (finish_unary_op_expr): Check whether result is also
1985         an INTEGER_CST.
1986
1987 1999-11-05  Mark Mitchell  <mark@codesourcery.com>
1988
1989         * Makefile.in (typeck2.o): Depend on output.h.
1990         * typeck2.c: Include output.h.
1991
1992         * decl.c (flag_ansi): Remove declaration.
1993
1994         * pt.c (tinst_level_tick): Make it static.
1995         (last_template_error_tick): Likewise.
1996         
1997         * cp-tree.h (mapcar): Remove declaration.
1998         (search_tree): Likewise.
1999         (walk_tree_fn): New typedef.
2000         (walk_tree): New function.
2001         * tree.c (bot_manip): Change prototype.  Adjust to be called via
2002         walk_tree.
2003         (bot_replace): Likewise.
2004         (no_linkage_helper): Likewise.
2005         (copy_tree_r): New function.
2006         (search_tree): Rename, and adjust, to become ...
2007         (walk_tree): New function.
2008         (mapcar): Remove.
2009         (target_remap): Remove.
2010         (target_remap_count): Likewise.
2011         (break_out_target_exprs): Use walk_tree.
2012         * decl.c (local_variable_p): Change prototype.
2013         (check_default_argument): Use walk_tree.
2014         * pt.c (for_each_template_parm_r): New function, split out from ...
2015         (for_each_template_parm): Here.  Use it, via walk_tree.
2016         
2017 1999-11-03  Mark Mitchell  <mark@codesourcery.com>
2018
2019         * class.c (check_bitfield_decl): New function, split out from
2020         finish_stuct_1.
2021         (check_field_decl): Likewise.  Recursively examine members of
2022         anonymous structs.
2023         (finish_struct_1): Use them.
2024         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
2025         
2026 1999-11-02  Mark Mitchell  <mark@codesourcery.com>
2027
2028         * decl.c (grokfndecl): Remove dead code.
2029
2030         * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
2031
2032 1999-11-02  Scott Snyder  <snyder@fnal.gov>
2033
2034         * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
2035         IMAGPART_EXPR.
2036         * pt.c (tsubst_copy): Likewise.
2037
2038 1999-11-01  Jason Merrill  <jason@yorick.cygnus.com>
2039
2040         * decl2.c (maybe_make_one_only): Always make things comdat on
2041         ELF targets, too.
2042
2043 1999-10-31  Mark Mitchell  <mark@codesourcery.com>
2044
2045         * decl.c (finish_function): Call free_after_parsing for functions
2046         we are not immediately turning into RTL.
2047
2048 1999-10-31  Brendan Kehoe  <brendan@cygnus.com>
2049
2050         * cp-tree.h (flag_dump_translation_unit): Add decl.
2051
2052 Sat Oct 30 22:42:50 1999  Stephen L Moshier <moshier@mediaone.net>
2053
2054         * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
2055
2056 1999-10-30  Mark Mitchell  <mark@codesourcery.com>
2057
2058         * decl.c (pop_cp_function_context): Don't call free on a NULL
2059         pointer.
2060         * semantics.c: Include ggc.h.
2061         (expand_body): Do garbage-collection after processing a template
2062         function.  Clear DECL_SAVED_TREE after generating RTL for a
2063         function.
2064         * Makefile.in (semantics.o): Depend on ggc.h.
2065         
2066 1999-10-29  Mark Mitchell  <mark@codesourcery.com>
2067
2068         * cp-tree.h (make_typename_type): Change prototype.
2069         * decl.c (make_typename_type): Only complain if so requested.
2070         * parse.y (nested_name_specifier): Adjust calls.
2071         (typename_sub0): Likewise.
2072         (typename_sub1): Likewise.
2073         * parse.c: Regenerated.
2074         * pt.c (convert_template_argument): Pass complain to
2075         make_typename_type.
2076         (tsubst): Likewise.
2077         
2078 1999-10-28  Mark Mitchell  <mark@codesourcery.com>
2079
2080         * semantics.c (finish_handler): End the scope of the handler
2081         before attaching it to the statement-tree.
2082
2083 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
2084
2085         * rtti.c (build_dynamic_cast_1): Give a better error message for
2086         an attempt to dynamic_cast from a non-polymorphic type.
2087
2088 1999-10-27  Mark Mitchell  <mark@codesourcery.com>
2089
2090         * cp-tree.h (make_temp_vec): Remove.
2091         (make_scratch_vec): Likewise.
2092         * call.c (add_function_candidate): Use make_tree_vec.
2093         (add_conv_candidate): Likewise.
2094         (build_builtin_candidate): Likewise.
2095         (add_template_candidate_real): Likewise.
2096         * class.c (resolve_address_of_overloaded_function): Likewise.
2097         * decl.c (start_function): Don't fool with the momentary obstack.
2098         (finish_function): Likewise.
2099         * init.c (expand_direct_vtbls_init): Likewise.
2100         (begin_init_stmts): Likewise.
2101         (finish_init_stmts): Likewise.
2102         * pt.c (add_to_template_args): Use make_tree_vec.
2103         (check_explicit_specialization): Likewise.
2104         (coerce_template_parms): Likewise.
2105         (lookup_template_class): Don't fool with the momentary obstack.
2106         (instantiate_class_template): Likewise.
2107         (tsubst_template_arg_vector): Use make_tree_vec.
2108         (tsubst_aggr_type): Don't fool with the momentary obstack.
2109         (tsubst_decl): Likewise.  Use make_tree_vec.
2110         (try_one_overload): Likewise.
2111         (try_class_unification):  Don't fool with the momentary obstack.
2112         (get_bindings_real): Use make_tree_vec.
2113         (set_mangled_name_for_template_decl): Likewise.
2114         * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
2115         * semantics.c (finish_expr_stmt): Likewise.
2116         (finish_do_stmt): Likewise.
2117         (finish_for_expr): Likewise.
2118         (finish_switch_cond): Likewise.
2119         (do_pushlevel): Likewise.
2120         (do_poplevel): Likewise.
2121         * tree.c (make_temp_vec): Remove.
2122         
2123         * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.  Dump
2124         CLEANUP_P for a TRY_BLOCK.
2125         * ir.texi: Document SAVE_EXPR.
2126
2127 Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
2128
2129         * call.c (build_over_call):  Check that the built-in function is
2130         of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
2131         * typeck.c (build_function_call_real): Similarly. 
2132
2133 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
2134
2135         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
2136         remember_end_note.
2137
2138 1999-10-24  Mark Mitchell  <mark@codesourcery.com>
2139
2140         * decl.c (push_overloaded_decl_1): Use pushdecl.
2141         
2142         * decl.c (auto_function): Replace #ifdef'd __inline with just
2143         plain inline.
2144         * lex.c (my_get_run_time): Likeise.
2145         (yyprint): Likewise.
2146         (identifier_type): Likewise.
2147         * method.c (start_squangling): Likewise.
2148         (end_squangling): Likewise.
2149         (icat): Likewise.
2150         (old_backref_index): Likewise.
2151         (flush_repeats): Likewise.
2152         (issue_ktype): Likewise.
2153         * parse.y (empty_parms): Likewise.
2154         * parse.c: Regenerated.
2155         
2156 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
2157
2158         * dump.c (dequeue_and_dump): Replace several uses of
2159         queue_and_dump_index with dump_child.
2160
2161 1999-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2162
2163         * expr.c: Include tm_p.h.
2164
2165 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
2166
2167         * cp-tree.h (SCOPE_PARTIAL_P): New macro.
2168         (pushlevel_temporary): Remove.
2169         (add_scope_stmt): New function.
2170         * decl.c (pushlevel_temporary): Remove.
2171         (poplevel): Use add_scope_stmt.
2172         (start_decl_1): Likewise.
2173         * semantics.c (add_scope_stmt): New function.
2174         (do_pushlevel): Use it.
2175         (do_poplevel): Use it.
2176         (expand_stmt): Check SCOPE_PARTIAL_P.
2177         
2178         * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
2179         * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
2180         * expr.c (cplus_expand_expr): Expand it.
2181         * ir.texi: Document EMPTY_CLASS_EXPR.
2182         
2183 1999-10-20  Mark Mitchell  <mark@codesourcery.com>
2184
2185         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
2186         parameters as having namespace scope.
2187
2188 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
2189
2190         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
2191         (mangling_flags): New type.
2192         (build_overload_int): Change prototype.
2193         (build_overload_value): Likewise.
2194         (numeric_output_need_bar): Improve comment.
2195         (mangle_expression): New function, broken out from ...
2196         (build_overload_int): Here.
2197         (build_overload_value): Adjust for use of mangling flags.  Don't
2198         warn about real-valued template parameters here.  Do handle
2199         complex expressions involving real-valued template parameters.
2200         (build_template_parm_names): Encase non-type template parameters
2201         in underscores, if necessary.
2202         (process_overload_item): Remove conditional on
2203         PARM_CAN_BE_ARRAY_TYPE.
2204
2205 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
2206
2207         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
2208
2209         * ir.texi: Clean up documentation of RETURN_INIT.
2210         
2211 1999-10-15  Greg McGary  <gkm@gnu.org>
2212
2213         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
2214         (lang_init): Set default for flag_bounds_check if still "unspecified".
2215
2216 1999-10-13  Andrew Haley  <aph@cygnus.com>
2217
2218         * class.c (finish_struct_1): Force alignment of non-bitfields to
2219         BITS_PER_UNIT.
2220
2221 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
2222
2223         * typeck2.c (process_init_constructor): Handle empty constructors.
2224
2225 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
2226
2227         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
2228
2229         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
2230         array error.
2231
2232 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
2233
2234         * decl.c (make_rtl_for_local_static): Don't create register RTL
2235         for addressable constants.
2236
2237 1999-10-13  Nathan Sidwell  <nathan@acm.org>
2238
2239         * cp-tree.h (build_x_va_arg): Prototype new function.
2240         * call.c (build_x_va_arg): Define it.
2241         * parse.y (unary_expr): Call build_x_va_arg.
2242         
2243         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
2244         * call.c (convert_type_from_ellipsis): Define it.
2245         * decl.c (init_decl_processing): Set lang_type_promotes_to.
2246
2247         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
2248
2249 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
2250
2251         * class.c (fixed_type_or_null): Always set *nonnull.
2252
2253 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2254
2255         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
2256         __GNUC__ and __GNUC_MINOR__.
2257
2258 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
2259
2260         * cp-tree.h (make_rtl_for_local_static): New function.  
2261         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
2262         local statics ...
2263         (make_rtl_for_local_static): Here.
2264         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
2265         
2266 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2267
2268         * method.c: Include tm_p.h.
2269
2270 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
2271
2272         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
2273         * lex.c (cp_make_lake_type): Likewise.
2274         * tree.c (init_tree): Init make_lang_type_fn.
2275         
2276 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
2277
2278         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
2279         paramter.
2280         
2281         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
2282         local statics if we don't really have them.
2283
2284         * ir.texi: Improve documentation for STMT_EXPR.  Describe
2285         CLEANUP_POINT_EXPR.
2286
2287 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
2288
2289         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
2290
2291 1999-10-07  Greg McGary  <gkm@gnu.org>
2292
2293         * class.c (finish_struct_1): Use simpler method of
2294         removing elements of a singly-linked list which doesn't
2295         lose for classes without data members.
2296
2297 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
2298
2299         * friend.c (make_friend_class): Robustify.
2300
2301         * semantics.c (finish_object_call_expr): Reject calls to template
2302         types.
2303
2304 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
2305
2306         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
2307
2308         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
2309         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
2310         CLASSTYPE_VFIELD.
2311         * class.c (get_vfield_offset): Likewise.
2312         (finish_base_struct): Likewise.
2313         (modify_one_vtable): Likewise.
2314         (fixup_vtable_deltas): Likewise.
2315         (finish_struct_1): Likewise.
2316         * init.c (expand_virtual_init): Likewise.
2317         * search.c (lookup_field_1): Likewise.
2318         (expand_upcast_fixups): Likewise.
2319         * typeck.c (build_component_ref): Likewise.
2320         (build_binary_op_nodefault): Likewise.
2321         
2322         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
2323         * ir.texi: Document TYPE_VFIELD.
2324
2325 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
2326
2327         * decl.c (grokdeclarator): Only warn about non-zero arrays if
2328         !in_system_header (linux socketbits.h can give this for
2329         __cmsg_data, which is using a GNU extension).
2330
2331 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
2332
2333         * decl2.c (start_static_storage_duration_function): Push the
2334         function declaration so it ends up in namespace scope.
2335
2336         * dump.c (DUMP_CHILDREN): Remove.
2337         (DUMP_BINFO): Adjust.
2338         (struct dump_node_info): Remove dump_children_p.
2339         (queue_and_dump_type): Remove dump_children_p parameter.
2340         (queue): Don't set dump_children_p.
2341         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
2342         queue_and_dump_index.
2343         (dequeue_and_dump): Unconditionally print children.  Adjust calls
2344         to functions mentioned above.
2345         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
2346         
2347         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
2348         * dump.c (dequeue_and_dump): Dump them.
2349         
2350         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
2351
2352         * decl.c (start_function): Set current_in_charge_parm for
2353         constructors, too, where appropriate.
2354         * search.c (fixup_all_virtual_upcast_offsets): New function.
2355         (expand_indirect_vtbls_init): Use it.
2356         
2357 1999-10-04  Nathan Sidwell  <nathan@acm.org>
2358
2359         * decl2.c (grok_alignof): Don't decay lvalues.
2360         
2361         * init.c (build_new): Remove unused variable.
2362
2363 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
2364
2365         * cp-tree.h (struct language_function): Remove static_labelno.
2366         (static_labelno): Remove macro.
2367         * method.c (build_overload_nested_name): Make static_labelno
2368         static here.
2369         
2370         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
2371         to decide whether or not a function is defined.
2372
2373         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
2374         situations where make_node will do it automatically.
2375         * decl.c (grok_reference_init): Likewise.
2376         (expand_static_init): Likewise.
2377         (do_static_initialization): Likewise.
2378         * init.c (perform_member_init): Likewise.
2379         (expand_aggr_init_1): Likewise.
2380         (build_new_1): Likewise.
2381         * method.c (do_build_copy_constructor): Likewise.
2382         (do_build_assign_ref): Likewise.
2383         * search.c (expand_upcast_fixups): Likewise.
2384         * semantics.c (finish_stmt_expr): Likewise.
2385         * typeck.c (build_unary_op): Likewise.
2386         (check_return_expr): Likewise.
2387
2388 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
2389
2390         * init.c (build_vec_delete_1): Fold COND_EXPRs.
2391
2392 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
2393
2394         * cp-tree.def (VEC_INIT_EXPR): Remove.
2395         * cp-tree.h (struct stmt_tree): New type.
2396         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
2397         x_stmt_tree.
2398         (class_cache_firstobj): Remove.
2399         (struct language_function): Remove stmts_are_full_exprs_p,
2400         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
2401         (current_stmt_tree): New macro.
2402         (last_tree): Adjust.
2403         (last_expr_type): Likewise.
2404         (doing_semantic_analysis_p): Simplify.
2405         (stmts_are_full_exprs_p): Adjust.
2406         (begin_tree): Remove prototype.
2407         (end_tree): Likewise.
2408         (begin_stmt_tree): Change prototype.
2409         (finish_stmt_tree): Likewise.
2410         (building_stmt_tree): Simplify.
2411         * decl.c (mark_stmt_tree): New function.
2412         (mark_saved_scope): Use it.
2413         (start_function): Rearrange slightly to call begin_stmt_tree 
2414         earlier.
2415         (save_function_data): Tweak.
2416         (finish_function): Adjust call to finish_stmt_tree.
2417         (mark_lang_function): Use mark_stmt_tree.
2418         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
2419         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
2420         (build_vec_init): Remove creation of stand-in intializer.
2421         * pt.c (begin_tree): Remove.
2422         (end_tree): Likewise.
2423         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
2424         (begin_compound_stmt): Handle a compound-statement outside of a
2425         function.
2426         (begin_stmt_expr): Handle a statement-expression outsidef of a
2427         function.
2428         (finish_stmt_expr): Likewise.
2429         (begin_class_definition): Don't call begin_tree.
2430         (finish_inline_definitions): Don't call end_tree.
2431         (begin_stmt_tree): Take a pointer to tree, not a function as input.
2432         (finish_stmt_tree): Likewise.
2433         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
2434         (mapcar): Likewise.
2435         
2436         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
2437         * parse.c: Regenerated.
2438         
2439         * dump.c (dqueue_and_dump): Dump bitfieldness.
2440         
2441         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
2442         bitfields, rather than DECL_BIT_FIELD.
2443         * ir.texi: Document how to tell whether or not a field is a
2444         bitfield.
2445         
2446         * lex.c (make_lang_type): Fix typo in comment.
2447
2448 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
2449
2450         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
2451
2452 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
2453
2454         * pt.c (tsubst_decl): If the type of a template instantiation is
2455         bogus, so is the whole instantiation.
2456
2457 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
2458
2459         * decl.c (initialize_local_var): Handle static variables here.
2460         (cp_finish_decl): Tweak handling of function-scope static
2461         variables.
2462         * semantics.c (expand_stmt): Handle DECL_STMTs for static
2463         variables.
2464
2465         * method.c (emit_thunk): Don't crash when -fsyntax-only.
2466
2467         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
2468         global_dtor_p.  Add init_priority.
2469         (DECL_ACCESS): Adjust accordingly.
2470         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
2471         (GLOBAL_INIT_PRIORITY): Likewise.
2472         * decl.c (lang_mark_tree): Adjust accordingly.
2473         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
2474         and GLOBAL_INIT_PRIORITY.
2475         * dump.c (dequeue_and_dump): Print them.
2476         * ir.texi: Document them.
2477
2478         * decl2.c (struct priority_info_s): Remove initialization_sequence
2479         and destruction_sequence.
2480         (start_static_storage_duration_function): Return the body of the
2481         function.  Convert for function-at-a-time mode.
2482         (generate_inits_for_priority): Remove.
2483         (finish_static_storage_duration_function): Change prototype.
2484         Adjust for function-at-a-time mode.
2485         (do_static_initialization): Likewise.
2486         (do_static_destruction): Likewise.
2487         (do_static_initialization_and_destruction): Remove.
2488         (start_static_initialization_or_destruction): New function.
2489         (finish_static_initialization_or_destruction): Likewise.
2490         (get_priority_info): Don't manipulation initialization_sequence or
2491         destruction_sequence.
2492         (prune_vars_needing_no_initialization): New function.
2493         (write_out_vars): Likewise.
2494         (finish_file): Use the various new functions instead of the old.
2495         
2496 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
2497
2498         * cp-tree.h (warn_float_equal): Declare.
2499         * decl2.c (warn_float_equal): Define.
2500         (lang_decode_option): Recognize -W[no-]float-equal.
2501         * typeck.c (build_binary_op_nodefault): Conditionally warn
2502         about equality tests of floating point types.
2503
2504 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
2505
2506         Support normal type_info-based EH mechanisms with -fno-rtti.
2507         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
2508         (build_eh_type_type_ref): Likewise.
2509         (build_eh_type): Remove.
2510         (expand_throw): Call build_eh_type_type, not build_eh_type.
2511         * decl2.c (import_export_decl): Don't associate the tinfo fn with
2512         the vtable if -fno-rtti.
2513         * decl.c (init_decl_processing): Always init_rtti_processing.
2514
2515         * rtti.c (get_typeid): Don't complain about -fno-rtti.
2516
2517         * class.c (class_cache_obstack, class_obstack): Remove.
2518         (init_class_processing): Don't initialize class_obstack.
2519         (push_cache_obstack): Remove.
2520         (pushclass): Don't call it.
2521         * cp-tree.h: Remove prototype for push_cache_obstack.
2522         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
2523         (pushlevel_class): Don't push_decl_level.
2524         (poplevel_class): Don't pop_stack_level.
2525         (push_class_level_binding): Don't push_cache_obstack.
2526         (init_decl_processing): Don't intialize decl_obstack.
2527         * search.c (push_class_decls): Don't push_cache_obstack.
2528         * tree.c (list_hash_add): Put hash node on permanent_obstack.
2529         (hash_tree_cons): Don't mess with obstacks.
2530         (print_lang_statistics): Don't print stats for class_obstack and
2531         decl_obstack.
2532
2533 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
2534
2535         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
2536         * ir.texi: Document DECL_EXTERNAL.
2537
2538         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
2539         * ir.texi: Document THUNK_DECLs.
2540
2541         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
2542         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
2543         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
2544         * error.c (dump_template_bindings): Remove unused parameter.
2545         Handle multiple levels of template parameters.
2546         (dump_template_decl): Use `parms', not `args', for template
2547         parameters.  Fix thinko.
2548         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
2549         flags to dump_template_bindings.
2550         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
2551         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
2552         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
2553         (tsubst_copy): Clarify variable name.
2554         (most_general_template): Robustify.
2555         
2556 1999-09-29  Nathan Sidwell  <nathan@acm.org>
2557
2558         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
2559         to change primary template rendering.
2560
2561 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
2562
2563         * cp-tree.h (UPT_TEMPLATE): Remove.
2564         (UPT_PARMS): Likewise.
2565         (DECL_NEEDED_P): New macro.
2566         * decl2.c (finish_vtable_vardecl): Use it.
2567         (finish_objects): Don't crash with -fsyntax-only.
2568         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
2569         -fsyntax-only.
2570         * pt.c (tsubst_friend_function): Remove FIXME that talks about
2571         obstacks.
2572         (tsubst_expr): Correct handling of function try-blocks.
2573         * semantics.c: Include flags.h.
2574         (expand_body): Don't do RTL generation if -fsyntax-only.
2575         * Makefile.in (semantics.o): Depends on flags.h.
2576         
2577 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
2578
2579         * pt.c (most_general_template): Adjust declaration.
2580
2581         * cp-tree.h: (most_general_template): Declare.
2582
2583         * error.c (dump_template_value): Rename to ...
2584         (dump_template_argument): This.
2585         (dump_template_argument_list): New function.
2586         (dump_type): Use it.
2587         (dump_template_parameter): New function.
2588         (dump_template_decl): Use it.
2589         (dump_template_bindings): New function.
2590         (dump_function_decl): Use it. Pretty print function template
2591         instantiations.
2592
2593 1999-09-28  Nathan Sidwell  <nathan@acm.org>
2594
2595         * decl.c (grokdeclarator): Distinguish parameter context for
2596         diagnostics. Tidy up missing type diagnostic.
2597         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
2598
2599 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
2600
2601         * ir.texi: Improve documentation for TARGET_EXPR.
2602
2603 1999-09-27  Nathan Sidwell  <nathan@acm.org>
2604
2605         Augment stringification of trees.
2606         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
2607         (fndecl_as_string, type_as_string_real, args_as_string,
2608         code_as_string, language_as_string, parm_as_string,
2609         op_as_string, assop_as_string, cv_as_string): Remove.
2610         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
2611         (context_as_string): Declare new function.
2612         * error.c (cp_printers): Move definition.
2613         (OB_UNPUT): Remove.
2614         (OB_END_TEMPLATE_ID): Adjust.
2615         (interesting_scope_p): Remove.
2616         (dump_scope): New static function.
2617         (dump_qualifiers): Adjust prototype, reimplement.
2618         (dump_template_value): Use tree_string_flags.
2619         (dump_type_real): Move back to dump_type.
2620         (dump_type): Adjust prototype. Use tree_string_flags.
2621         (dump_aggr_type): Likewise. Use dump_template_parms.
2622         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
2623         Return pad flag.
2624         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
2625         (dump_simple_decl): Likewise.
2626         (dump_decl): Likewise. Use dump_template_decl.
2627         (dump_template_decl): New static function broken out of dump_decl.
2628         (dump_function_decl): Adjust prototype. Use tree_string_flags.
2629         (dump_parameters): Likewise. Prefix space.
2630         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
2631         (dump_function_name): Likewise. Use dump_template_parms.
2632         (dump_template_parms): New static function broken out of
2633         dump_function_name.
2634         (dump_expr_list): Adjust prototype. Use tree_string_flags.
2635         (dump_expr): Likewise.
2636         (fndecl_as_string): Removed
2637         (type_as_string_real): Removed
2638         (dump_binary_op): Adjust prototype. Use tree_string_flags.
2639         (dump_unary_op): Likewise.
2640         (type_as_string): Likewise.
2641         (expr_as_string): Likewise.
2642         (decl_as_string): Likewise.
2643         (context_as_string): New function.
2644         (lang_decl_name): Adjust.
2645         (decl_to_string): New static print callback.
2646         (expr_to_string): Likewise.
2647         (fndecl_to_string): Likewise.
2648         (code_as_string): Renamed to ...
2649         (code_to_string): ... here. Adjust.
2650         (language_as_string): Renamed to ...
2651         (language_to_string): ... here. Adjust.
2652         (parm_as_string): Renamed to ...
2653         (parm_to_string): ... here.
2654         (op_as_string): Renamed to ...
2655         (op_to_string): ... here.
2656         (assop_as_string): Renamed to ...
2657         (assop_to_string): ... here.
2658         (type_to_string): New static print callback.
2659         (args_as_string): Renamed to ...
2660         (args_to_string): ... here. Adjust.
2661         (cv_as_string): Renamed to ...
2662         (cv_to_string): ... here. Adjust.
2663         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
2664         (print_template_context): Likewise.
2665
2666 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
2667
2668         * cp-tree.h (expand_throw): Remove prototype.
2669         * except.c (expand_throw): Make it static.  Use tree-generation
2670         functions, rather than RTL-generation functions.
2671         (build_throw): Use it.
2672         * expr.c: Include except.h.
2673         (cplus_expand_expr): Don't call expand_throw here.
2674         * Makefile.in (expr.o): Depend on except.h.
2675         * ir.texi: Update documentation for THROW_EXPR.
2676         
2677         * decl.c (start_function): Set x_dont_save_pending_sizes rather
2678         than calling get_pending_sizes.
2679         * init.c (build_new): Don't save and restore
2680         immediate_size_expand; instead, assert that it has the expected
2681         value already.
2682
2683 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2684
2685         * lex.c (compiler_error): Add missing call to va_end().
2686
2687 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
2688
2689         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
2690         * ir.texi: Document RESULT_DECL and DECL_RESULT.
2691
2692         * cp-tree.h (check_return_expr): New function.
2693         * decl.c (finish_constructor_body): New function.
2694         (pushdecl): Put global friend functions in namespace binding
2695         level, not the class binding level.
2696         (finish_destructor_body): Make sure the dtor_label is always
2697         defined.  Fix typo in comment.
2698         (finish_function): Move generation of constructor-termination code
2699         to semantic-analysis time.  Move generation of implicit `main'
2700         return value to semantic-analysis time.
2701         * semantics.c (finish_return_stmt): Generate goto's to
2702         ctor_label/dtor_label here.  Use check_return_expr to do semantic
2703         analysis on the returned expression.
2704         * typeck.c (maybe_warn_about_returning_address_of_local): New
2705         function split out from c_expand_return.
2706         (check_return_expr): Likewise.
2707         (c_expand_return): Just generate the RTL for the return.
2708         
2709 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
2710
2711         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
2712         (cleanup_type): Likewise.
2713         (search_tree): Change prototype.
2714         * decl.c (local_variable_p): Adjust for new interface to
2715         search_tree.
2716         (check_default_argument): Likewise.
2717         * error.c (dump_expr): Handle INIT_EXPR.
2718         * except.c (expand_throw): Don't make cleanup_type a local static.
2719         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
2720         * init.c (build_new): Call build_new_1 directly, rather than
2721         building a NEW_EXPR.
2722         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
2723         processing file-scope initializers.
2724         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
2725         * tree.c: Include splay-tree.h
2726         (no_linkage_helper): Adjust for new interface to search_tree.
2727         (search_tree): Pass around pointers to tree nodes, rather than the
2728         nodes themselves.  Handle VEC_INIT_EXPR.
2729         (no_linkage_check): Adjust for new interface to search_tree.
2730         (mapcar): Handle VEC_INIT_EXPR.
2731         (target_remap): New variable.
2732         (bot_manip): Use it.
2733         (bot_replace): New function.
2734         (break_out_target_exprs): Use it to remap all variables used in a
2735         default argument expression.
2736         * typeck.c (build_modify_expr): Don't crash when outside a
2737         function and presented with an INIT_EXPR assignment
2738         * Makefile.in (tree.o): Depend on splay-tree.h.
2739
2740 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
2741
2742         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
2743         DECL_BUILT_IN.
2744         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
2745         callers changed.
2746         Set the builtin's DECL_BUILT_IN_CLASS.
2747
2748 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
2749
2750         * decl.c (pushdecl): Don't make local declarations of extern
2751         variables give the variable a DECL_CONTEXT for the function.
2752         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
2753         Don't accidentally make RTL for local declarations.
2754         (emit_local_var): Handle declarations with asm-specifiers here.
2755         
2756 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
2757
2758         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
2759         STMT_IS_FULL_EXPR_P.
2760
2761         * cp-tree.h (language_function): Add cannot_inline.
2762         * decl.c (start_function): Restore current_function_cannot_inline
2763         from the saved value.
2764         (save_function_data): Save current_function_cannot_inline.
2765         * decl2.c (start_objects): Change prototype.  Build the function
2766         in function-at-a-time mode.
2767         (finish_objects): Likewise.
2768         (generate_ctor_or_dtor_function): Adjust accordingly.
2769         
2770         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
2771         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
2772         Don't call expand_anon_union_decl here
2773         * semantics.c (exapnd_stmt): Call it here, instead.
2774         * typeck.c (mark_addressable): Addressed variables are implicitly
2775         used.
2776         
2777 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2778
2779         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
2780         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
2781         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
2782         * cp-tree.h: Add tree checking macros to various tree access
2783         macros. 
2784         * ptree.c (print_lang_decl): Test for function or variable
2785         before accessing template info.
2786
2787 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
2788
2789         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
2790         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
2791         * decl2.c (lang_f_options): Add -fshort-wchar.
2792         * cp-tree.h: Declare flag_short_wchar.
2793         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
2794         int' for wchar_t.
2795
2796 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2797
2798         * ir.texi: Fix formatting errors and typos.
2799
2800 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
2801
2802         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
2803
2804         * decl.c (pushdecl): Do create a binding for extern "C" functions,
2805         but not for their DECL_ASSEMBLER_NAMEs.
2806         (lookup_name_current_level): Fix formatting.
2807         (xref_tag): Likewise.
2808         * decl2.c (start_objects): Mark static constructors and
2809         destructors as used.
2810
2811 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
2812
2813         * decl.c (define_case_label): Don't crash if we're not in a switch.
2814
2815         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
2816         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
2817         for unsupported flags.
2818
2819 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
2820
2821         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
2822         Accept and warn about -fthis-is-variable.
2823
2824 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
2825
2826         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
2827         CLEANUP_STMT, and SCOPE_STMT.
2828
2829         * decl2.c (lang_decode_option): Adjust, in the wake of recent
2830         changes to option processing.
2831
2832 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2833
2834         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
2835         function pointer from pmfs with no object given.
2836         (convert_for_assignment): Do not return error when converting
2837         pmfs.
2838
2839 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
2840
2841         * lex.c (internal_filename): New variable.
2842         (INTERNAL_FILENAME): New macro.
2843         (init_parse): Allocate internal_filename and mark as root.  Use it
2844         instead of a string constant.
2845
2846 1999-09-21  Nathan Sidwell  <nathan@acm.org>
2847
2848         Reimplement dynamic cast and catch matching.
2849         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
2850         * search.c (dynamic_cast_base_recurse): New function.
2851         (get_dynamic_cast_base_type): New function for dynamic cast.
2852         * rtti.c (build_dynamic_cast_1): Determine source and target
2853         class relationship. Call __dynamic_cast_2.
2854         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
2855         (__user_type_info::dyncast): New dynamic cast dispatcher.
2856         (__user_type_info::sub_kind): New nested enumeration.
2857         (__user_type_info::contained_p): sub_kind predicate.
2858         (__user_type_info::contained_public_p): Likewise.
2859         (__user_type_info::contained_nonpublic_p): Likewise.
2860         (__user_type_info::contained_nonvirtual_p: Likewise.
2861         (__user_type_info::upcast_result): New nested struct.
2862         (__user_type_info::dyncast_result): New nested struct.
2863         (*::do_upcast): New catch function.
2864         (*::do_dyncast): New dynamic cast function.
2865         (__user_type_info::find_public_subobj): New dynamic cast
2866         helper dispatcher.
2867         (*::do_find_public_subobj): New dynamic cast helper function.
2868         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
2869         (__user_type_info::dyncast): Define dynamic cast dispatcher.
2870         (*::do_upcast): Define catch function.
2871         (*::do_dyncast): Define dynamic cast function.
2872         (*::do_find_public_subobj): Define dynamic cast helper function.
2873         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
2874         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
2875         (__dynamic_cast_2): New dynamic cast runtime.
2876
2877 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
2878
2879         * cp-tree.h (finish_stmt_expr): Change prototype.
2880         * expr.c (cplus_expand_expr): Adjust call accordingly.
2881         * init.c (finish_init_stmts): Likewise.
2882         * parse.y (primary): Likewise.
2883         * pt.c (tsubst_copy): Likewise.
2884         * semantics.c (finish_stmt_expr): Don't take two parameters.
2885         Don't remove generated BLOCKs from the block-tree.
2886
2887         Remove support for assigning to `this'.
2888         * NEWS: Note that fact.
2889         * class.c (build_vbase_path): Don't check flag_this_is_variable.
2890         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
2891         (language_function): Remove assigns_this, just_assigned_this, and
2892         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
2893         (base_init_expr): Remove.
2894         (current_vcalls_possible_p): New macro.
2895         (vtbls_set_up_p): Likewise.
2896         (emit_base_init): Change prototype.
2897         * decl.c (finish_destructor_body): New function, split out from
2898         finish_function.
2899         (current_function_assigns_this): Remove.
2900         (current_function_just_assigned_this): Likewise.
2901         (start_function): Don't set them.
2902         (finish_function): Don't check them.  Don't emit
2903         base-initialization code here.  Generate code for destructors when
2904         doing semantic analysis.
2905         (finish_stmt): Don't check current_function_just_assigned_this.
2906         * decl2.c (lang_f_options): Remove this-is-variable.
2907         (lang_decode_option): Likewise.
2908         (grokclassfn): Don't check flag_this_is_variable.
2909         * init.c (emit_base_init): Return the expression generated.
2910         (construct_virtual_bases): Don't push/pop obstacks.  Fix
2911         typo.
2912         (build_new_1): Don't check flag_this_is_variable.
2913         (get_temp_regvar): Don't set DECL_REGISTER.
2914         (build_vec_init): Don't call use_variable.
2915         * lang-options.h: Remove "-fthis-is-variable" and
2916         "-fno-this-is-variable".
2917         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
2918         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
2919         expand_expr_stmt.
2920         * semantics.c (finish_expr_stmt_real): Rename to ...
2921         (finish_expr_stmt): This.  Remove assigned_this parameter.
2922         (begin_if_stmt): Call do_pushlevel before starting the statement.
2923         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
2924         blocks.
2925         (setup_vtbl_ptr): Emit initialization code for bases and members
2926         at semantic-analysis time.  Emit code to initialize vtables in
2927         destructors here.
2928         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
2929         Don't handle CTOR_INITIALIZER any more.
2930         * typeck.c (build_modify_expr): Don't check for assignments to
2931         this.
2932         (c_expand_return): Don't suggest assigning to `this'.
2933         
2934         * Makefile.in (decl.o): Depend on RTL_H.
2935         (decl2.o): Likewise.
2936         (class.o): Likewise.
2937         (call.o): Likewise.
2938         (method.o): Likewise.
2939         (search.o): Likewise.
2940         (tree.o): Likewise.
2941         (pt.o): Likewise.
2942
2943         * decl.c (duplicate_decls): When a builtin function is redeclared
2944         as static, make sure it is mangled correctly.
2945
2946         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
2947         detail about the statement-tree.
2948         
2949 1999-09-20  Nathan Sidwell  <nathan@acm.org>
2950
2951         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
2952
2953 1999-09-20  Nick Clifton  <nickc@cygnus.com>
2954
2955         * decl2.c (lang_decode_option): Extend comment.
2956
2957 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
2958
2959         * typeck.c: Include "tm_p.h".
2960
2961 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
2962
2963         * ir.texi: New file.
2964
2965 1999-09-19  Paul Burchard <burchard@pobox.com>
2966
2967         * semantics.c (expand_stmt): Initialize return value.
2968
2969 1999-09-18  Paul Burchard <burchard@pobox.com>
2970
2971         * gxxint.texi: G++ now implements namespaces.
2972         
2973 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
2974
2975         * decl.c (pop_label): Don't warn about unused labels more than
2976         once.
2977         * semantics.c (finish_goto_stmt): Always marked used labels as
2978         used.
2979
2980         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
2981         even when the declaration is external.
2982         (cp_finish_decl): Adjust call to layout_var_decl.
2983         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
2984
2985 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
2986
2987         * typeck.c (get_member_function_from_ptrfunc): Always consider
2988         virtuality inside member pointer.
2989
2990 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
2991
2992         Turn on function-at-a-time processing.  
2993         * cp-tree.h (doing_semantic_analysis_p): New macro.
2994         (SF_DEFAULT): Define to zero, not SF_EXPAND.
2995         (start_handler_parms): Change prototype.
2996         (expand_start_catch_block): Likewise.
2997         (expand_end_catch_block): Likewise.
2998         (expand_start_eh_spec): Likewise.
2999         (expand_end_eh_spec): Declare.
3000         (finish_handler_parms): Change prototype.
3001         (begin_catch_block): Declare.
3002         (finish_handler): Change prototype.
3003         (do_pushlevel): Declare.
3004         (do_poplevel): Likewise.  
3005         * decl.c (pushlevel): Don't create
3006         binding levels when not doing semantic analysis.
3007         (poplevel): Don't pop them.
3008         (pushdecl): Assert that we are never called when not doing
3009         semantic analysis.
3010         (pushdecl_top_level): Use push_to_top_level.
3011         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
3012         label when expanding.
3013         (cp_finish_decl): Only inject for-scope variables when doing
3014         semantic analysis.  Add comments.
3015         (start_handler_parms): Return the handler parm.
3016         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
3017         already set.  Reinitialize from saved function data if available.
3018         Don't pushlevel when not doing semantic analysis.
3019         (store_parm_decls): Only generate RTL when expanding.  Only
3020         pushdecl when doing semantic analysis.  Set
3021         current_eh_spec_try_block if appropriate.
3022         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
3023         Combine common code.  Don't poplevel when not doing semantic
3024         analysis.
3025         (push_cp_function_context): Don't expand functions without an
3026         explicit call to expand_body.
3027         (mark_lang_function): Make eh_spec_try_block and
3028         x_scope_stmt_stack.  
3029         * except.c (expand_end_eh_spec): Don't
3030         declare.
3031         (process_start_catch_block): Likewise.
3032         (push_eh_cleanup): Use finish_decl_cleanup.
3033         (initialize_handler_parm): New function.
3034         (expand_start_catch_block): Use it.
3035         (expand_end_catch_block): Use tree-generation functions, not
3036         RTL-generation functions.
3037         (expand_start_eh_spec): Likewise.
3038         (expand_end_eh_spec): Likewise.
3039         (expand_exception_blocks): Simplify.
3040         (start_anon_func): Use do_pushlevel.
3041         (end_anon_func): Use do_poplvel.  Call expand_body for the
3042         function.  
3043         * expr.c (do_case): Don't call define_case_label.  
3044         * init.c (create_temporary_var): Set DECL_CONTEXT for local
3045         variables.  
3046         * method.c (emit_thunk): Call expand_body for the
3047         thunk.
3048         (sythesize_method): Likewise.  
3049         * parse.y (handler_args): Give it ttype.
3050         (eat_saved_input): Call expand_body.
3051         (base_init): Use do_pushlevel.
3052         (pending_inline): Call expand_body.
3053         (handler): Adjust calls to finish_handler_parms and
3054         finish_handler.
3055         (handler_args): Don't call expand_start_catch_block.  Return the
3056         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
3057         * parse.c: Regenerated.
3058         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
3059         * semantics.c (do_pushlevel): Give it external linkage.  Build
3060         SCOPE_STMTs.
3061         (do_poplevel): Likewise.
3062         (finish_case_label): Call define_case_label when doing semantic
3063         analysis.
3064         (finish_goto_stmt): Create RTL for labels.
3065         (finish_function_try_block): Set in_function_try_handler
3066         unconditionally.
3067         (finish_function_handler_sequence): Unset it.
3068         (finish_handler_parms): Use expand_start_catch_block even when
3069         building a statement-tree.
3070         (begin_catch_block): New function.
3071         (finish_handler): Move a little RTL-generation logic here.
3072         (finish_decl_cleanup): Allow cleanups for empty declarations.
3073         (finish_named_return_value): Don't pushdecl when not doing
3074         semantic analysis.
3075         (expand_stmt): Don't do semantic analysis for variable
3076         declarations.  Handle START_CATCH_STMT.  Call expand_label
3077         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
3078         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
3079         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
3080         RETURN_INIT and function try blocks.
3081         
3082         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
3083         x_scope_stmt_stack.  Add x_in_charge_parm.
3084         (current_eh_spec_try_block): New macro.
3085         (current_scope_stmt_stack): Likewise.
3086         (current_in_charge_parm): Likewise.
3087         * decl.c (start_function): Initialize current_in_charge_parm.
3088         (finish_function): Use current_in_charge_parm rather than looking
3089         up __in_chrg.
3090         * search.c (expand_indirect_vtbls_init): Likewise.
3091
3092         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
3093         (TRY_BLOCK): Likewise.
3094         (HANDLER): Likewise.
3095         (START_CATCH_STMT): New tree node.
3096         (SCOPE_STMT): Likewise.
3097         * cp-tree.h (SCOPE_BEGIN_P): New macro.
3098         (SCOPE_NULLIFIED_P): Likewise.
3099         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
3100         (struct lang_decl): Add saved_language_function.
3101         (DECL_PENDING_INLINE_INFO): Adjust documentation.
3102         (DECL_PENDING_INLINE_P): New macro.
3103         (TYPE_TI_ARGS): Fix typo in comment.
3104         (DECL_SAVED_TREE): Add to documentation.
3105         (DECL_SAVED_FUNCTION_DATA): New macro.
3106         (START_CATCH_TYPE): Likewise.
3107         (SCOPE_END_P): New macro.
3108         (declare_parm_level): Don't declare.
3109         * decl.c (mark_lang_function): New function, split out from
3110         mark_cp_function_context.
3111         (save_function_data): New function.
3112         (declare_parm_level): Remove.
3113         (finish_function): Use save_function_data to squirrel away
3114         important stuff for later use.
3115         (mark_cp_function_context): Use mark_function_data.
3116         (lang_mark_tree): Likewise.
3117         * lex.c (begin_definition_of_inclass_inline): Set
3118         DECL_PENDING_INLINE_P.
3119         (store_pending_inline): Clear it.
3120         * pt.c (tsubst_decl): Likewise.
3121
3122 1999-09-17  Nathan Sidwell  <nathan@acm.org>
3123
3124         * call.c (perform_implicit_conversion): Deal with error_mark_node.
3125
3126 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
3127
3128         * decl.c (warn_extern_redeclared_static): Don't get confused by
3129         static member functions.
3130         (duplicate_decls): Merge DECL_THIS_STATIC.
3131
3132         * decl.c (expand_static_init): Make sure assignments to local
3133         statics actually occur.
3134
3135 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
3136
3137         * cp-tree.h (poplevel_class): Declare.
3138         * class.c (popclass): Use poplevel_class, not poplevel.
3139         * decl.c (poplevel_class): Don't make it static.  Don't return a
3140         value.
3141         (poplevel): Don't call poplevel_class; abort in a class
3142         binding level is seen.
3143         * semantics.c (finish_translation_unit): Use pop_everything.
3144         * parse.y (member_init): Allow errors.
3145         (pending_inline): Call finish_function.
3146         * parse.c: Regenerated.
3147         * Makefile.in (CONFLICTS): Adjust.
3148
3149 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
3150         
3151         * error.c: Reduce code duplication.
3152         (dump_template_value): New function.
3153         (dump_type_real): Use it.
3154         (dump_decl): Likewise.
3155         (dump_function_name): Likewise.
3156         (dump_function_decl): Don't be too talkative about function return
3157         type variety.
3158
3159 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3160
3161         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
3162
3163         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
3164
3165 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
3166
3167         * decl2.c (finish_file): Also call check_global_declarations for
3168         the pending_statics list.
3169
3170 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
3171
3172         * lex.c (cp_pragma_implementation): Allow #pragma implementation
3173         in header files.
3174
3175 1999-09-15  Richard Henderson  <rth@cygnus.com>
3176
3177         * lex.c (mark_impl_file_chain): Follow the next chain.
3178
3179 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
3180
3181         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
3182         problems with extern "C" functions redeclared as static.
3183         (duplicate_decls): When a builtin is redeclared static, make the
3184         new function have internal linkage.
3185         
3186 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
3187
3188         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
3189         * pt.c (tsubst_copy): Likewise.
3190         * tree.c (search_tree): Likewise.
3191         (mapcar): Likewise.
3192
3193 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3194
3195         * typeck2.c (ack): Don't declare progname.
3196
3197 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
3198
3199         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
3200         filenames with ggc_alloc_string.
3201
3202 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
3203
3204         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
3205         TARGET_EXPR.
3206         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
3207         the TARGET_EXPR.
3208         * cvt.c (build_up_reference): Likewise.
3209         * tree.c (build_cplus_new): Likewise.
3210         (get_target_expr): Likewise.
3211         
3212 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
3213
3214         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
3215
3216 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
3217
3218         * cp-tree.h (build_target_expr): New function.
3219         * call.c (build_conditional_expr): Use build_target_expr.
3220         (convert_like): Likewise.
3221         (build_over_call): Likewise.
3222         * cvt.c (build_up_reference): Likewise.
3223         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
3224         (destroy_local_var): Here.
3225         (build_target_expr): New function.
3226         * tree.c (build_cplus_new): Use it.
3227         (get_target_expr): Likewise.
3228
3229 1999-09-13  Nathan Sidwell  <nathan@acm.org>
3230
3231         * typeck.c (expr_sizeof): Don't decay arrays and functions.
3232         Remove misleading comment.
3233         (build_compound_expr): Don't decay arrays.
3234
3235 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
3236
3237         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
3238         class rvalues again.
3239
3240 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3241
3242         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
3243
3244         * g++spec.c: Include gcc.h.
3245         (lang_specific_driver): Constify a char*.  Call xcalloc, not
3246         xmalloc/bzero.  All calls to the function pointer parameter now
3247         explicitly call `fatal'.
3248
3249 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
3250
3251         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
3252         * cvt.c (ocp_convert): Complete the from and destination types.
3253         Adjust warning about functions always being `true' in conditionals.
3254         * decl.c (duplicate_decls): Don't play funny games with abort.
3255         * error.c (dump_expr): Handle OVERLOADs.
3256         * spew.c (probe_obstack): Remove.
3257         * typeck.c (condition_conversion): Use perform_implicit_conversion.
3258         
3259 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
3260
3261         * cp-tree.h (auto_function, define_function): Adjust prototypes.
3262         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
3263         changed.
3264         (auto_function): Likewise, for CODE arg.
3265         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
3266         (builtin_function): ... here.
3267
3268 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
3269
3270         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
3271         (init_decl_processing): Don't set TREE_PERMANENT for the
3272         error_mark_node.
3273         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
3274         (grokdeclarator): Likewise.
3275         (grokparms): Don't check TREE_PERMANENT when building up lists.
3276         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
3277         (mark_inline_for_output): Likewise.
3278         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
3279         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
3280         * lex.c (check_newline): Don't check ggc_p; it is always one.
3281         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
3282         * spew.c (yylex): Don't copy_node or probe_obstacks for
3283         non-permanent CONSTANTs and STRINGs.
3284         * tree.c (build_cplus_array_type_1): Don't fuss with
3285         TREE_PERMANENT on ARRAY_TYPEs.
3286         
3287         * cp-tree.def (CLEANUP_STMT): New node.
3288         * cp-tree.h (language_function): Add name_declared.
3289         (current_function_name_declared): New macro.
3290         (CLEANUP_DECL): New macro.
3291         (CLEANUP_EXPR): Likewise.
3292         (emit_local_var): Likewise.
3293         (finish_decl_cleanup): New function.
3294         * cvt.c (build_up_reference): Simplify.
3295         (ocp_convert): Remove dead code.
3296         * decl.c (start_decl): Remove call to add_decl_stmt.
3297         (grok_reference_init): Adjust, to handle bindings temporaries to
3298         references.  Remove dead code.
3299         (initialize_local_var): Don't generate RTL for
3300         declarations here, or build cleanups here.  Don't fuss with
3301         obstacks.  Replace expand_start_target_temps calls with explicit
3302         setting of stms_are_full_exprs_p.
3303         (destroy_local_var): New function.
3304         (emit_local_var): Likewise.
3305         (cp_finish_decl): Use them, as appropriate.
3306         (start_function): Announce template functions.
3307         (store_parm_decls): Don't call declare_function_name here.
3308         (finish_stmt): Don't start emit base-initialization code when just
3309         building the statement-tree.
3310         * init.c (create_temporary_var): Move add_decl_stmt call ...
3311         (get_temp_regvar): Here.
3312         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
3313         cp_finish_decl would expect.  Don't call add_decl_stmt.
3314         * semantics.c (begin_compound_stmt): Call declare_function_name,
3315         if appropriate.
3316         (finish_decl_cleanup): New function.
3317         (expand_stmt): Use emit_local_var to output variables.          
3318         (expand_body): Set current_funtion_name_declared.
3319         
3320 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
3321
3322         * cp-tree.h (finish_cleanup_try_block): New function.
3323         * semantics.c (finish_cleanup_try_block): Add comment.
3324
3325 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
3326
3327         * cp-tree.h: Delete declarations for all tree nodes now moved to
3328         global_trees.
3329         * decl.c: Delete their definitions.
3330         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
3331         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
3332         provide defaults.
3333         (init_decl_processing): Call build_common_tree_nodes and
3334         build_common_tree_nodes_2 instead of building their nodes here.
3335         Don't add gc roots for them.
3336
3337 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
3338
3339         * cp-tree.h (language_function): Rename expanding_p to
3340         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
3341         (expanding_p): Adjust accordingly.
3342         (TREE_VIA_PRIVATE): Fix typo in comment.
3343         (DECL_REFERENCE_SLOT): Remove.
3344         (SET_DECL_REFERENCE_SLOT): Likewise.
3345         * decl.c (named_label_uses): Adjust. Remove chicken comment.
3346         (push_overloaded_decl): Don't truncate the chain of bindings when
3347         adding an overloaded function.
3348         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
3349         (initialize_local_var): Fix typo in comment.
3350         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
3351         * decl2.c (start_objects): Make the fact that we are expanding
3352         the generated function right away explicit.
3353         (start_static_storage_duration_function): Likewise.
3354         (finish_file): Fix typo in comment.
3355         * init.c (build_vec_init): Correct bugs in handling cleanups.
3356         * semantics.c (maybe_convert_cond): New function.
3357         (FINISH_COND): Always store the condition, even if there's
3358         a declaration.
3359         (finish_if_stmt_cond): Use maybe_convert_cond.
3360         (finish_while_stmt_cond): Likewise.
3361         (finish_do_stmt): Likewise.
3362         (finish_for_cond): Likewise.
3363         (expand_cond): Adjust.
3364         
3365         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
3366         * init.c (perform_member_init): Remove obstack machinations.
3367         (expand_cleanup_for_base): Likewise.
3368         (finish_init_stmts): Mark the statement-expression as used.
3369         * method.c (emit_thunk): Use tree-generating functions, not
3370         RTL.
3371         (do_build_copy_constructor): Likewise.
3372         (do_build_assign_ref): Likewise.
3373         (synthesize_method): Likewise.  Keep track of line numbers.
3374         * pt.c (tsubst_expr): Handle various kinds of try blocks.
3375         * semantics.c (expand_stmts): Remove.
3376         (begin_function_try_block): Set FN_TRY_BLOCK_P.
3377         (finish_function_try_block): Be careful rechaining 
3378         function try blocks.
3379         (expand_stmt): Loop through all the statements at a given level.
3380         (exapnd_body): Be careful with line-numbers here too.  Prepare for
3381         being called directly from the parser.
3382
3383         * cp-tree.h (finish_function): Adjust prototype.
3384         * decl.c (finish_function): Return the function compiled.
3385         * pt.c (instantiate_decl): Don't play games with obstacks.
3386         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
3387         (search_tree): Likewise.
3388         * typeck.c: Fix typo in comment.
3389         * typeck2.c (store_init_value): Add comment.
3390
3391         * cp-tree.h (CPTI_ATEXIT): New macro.
3392         (atexit_node): Likewise.
3393         * decl.c (destroy_local_static): New function, broken out from ...
3394         (expand_static_init): Here.
3395
3396         * rtti.c (get_tinfo_var): These should always be global
3397         (expand_si_desc): Use tree, not RTL, functions to generate code.
3398         (expand_class_desc): Likewise.
3399         (expand_ptr_desc): Likewise.
3400         (expand_attr_desc): Likewise.
3401         (expand_generic_desc): Likewise.
3402         (synthesize_tinfo_fn): Likewise.
3403
3404 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
3405
3406         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
3407         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
3408         RECHAIN_STMTS. 
3409         (RECHAIN_STMST_FROM_CHAIN): Likewise.
3410
3411         * parse.y (simple_stmt): Fix typo in last change.
3412
3413         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
3414         (STMT_IS_FULL_EXPR_P): Likewise.
3415         (STMT_LINENO_FOR_FN_P): Likewise.
3416         (prep_stmt): New function.
3417         (building_stmt_tree): Tweak for safety.
3418         * pt.c (tsubst_expr): Use prep_stmt throughout.
3419         (add_tree): Move it to semantics.c
3420         * semantics.c (add_tree): Move it here.
3421         (finish_expr_stmt_real): New function.
3422         (finish_expr_stmt): Use it.
3423         (finish_if_stmt_cond): Use FINISH_COND.
3424         (finish_while_stmt_cond): Likewise.
3425         (finish_for_cond): Likewise.
3426         (finish_stmt_tree): Tweak line-number handling.
3427         (prep_stmt): New function.
3428         (expand_stmt): Use it.
3429         
3430         * cp-tree.h (begin_switch_stmt): Adjust prototype.
3431         (finish_switch_cond): Likewise.
3432         * parse.y (simple_stmt): Adjust accordingly.
3433         * parse.c: Regenerated.
3434         * pt.c (tsubst_expr): Adjust accordingly.
3435         * semantics.c (expand_cond): New function.
3436         (FINISH_COND): New macro.
3437         (begin_switch_stmt): Build the SWITCH_STMT here.
3438         (finish_switch_stmt_cond): Not here.
3439         (expand_stmt): Adjust calls to begin_switch_stmt and
3440         finish_switch_cond.  Use expand_cond throughout.
3441
3442         * dump.c (dequeue_and_dump): Dump types for constants.
3443         Describe DECL_ARG_TYPE more intuitively.
3444         Handle ARRAY_REF.
3445
3446         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
3447         (lang_cleanup_tree): Remove.
3448         * lex.c (make_lang_type): Use ggc_alloc to allocate
3449         TYPE_LANG_SPECIFIC.
3450
3451         Reorganize per-function data.
3452         * cp-tree.h (saved_scope): Add function_decl, bindings.
3453         (language_function): Rename binding_level to bindings.
3454         (cp_function_chain): Use the current_function, not the
3455         outer_function_chain.
3456         (current_class_ptr): Make it work, even when there's no 
3457         current function.
3458         (current_class_ref): Likewise.
3459         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
3460         macros.
3461         (clear_temp_name): Remove.
3462         * decl.c (check_function_type): New function, broken out from
3463         start_function.
3464         (current_binding_level): Adjust definition.
3465         (pushlevel): Simplify.
3466         (poplevel): Don't use named_label_uses when we're outside
3467         a function scope.
3468         (mark_saved_scope): Mark function_decl and bindings.
3469         (maybe_push_to_top_level): Don't unconditionally push a new
3470         function context.  Save bindings and the current_function_decl.
3471         Don't clear named_labels.
3472         (pop_from_top_level): Pop function context if appropriate.
3473         (init_decl_processing): Set init_lang_status and free_lang_status,
3474         rather than save_lang_status and restore_lang_status.
3475         (start_function): Take SF_* flags.  Don't clear per-function data.
3476         Reorder and simplify to use new per-function data code.  Add
3477         asserts.
3478         (store_parm_decls): Don't call init_function_start here.
3479         (finish_function): Adjust for new handling of per-function data.
3480         (push_cp_function_context): Simplify.
3481         (mark_cp_function_context): Change binding_level to bindings.
3482         * decl2.c (clear_temp_name): Remove.
3483         (start_objects): Use SF flags to start_function.
3484         (start_static_storage_duration_function): Likewise.
3485         * except.c (start_anon_func): Remove redundant calls to 
3486         push_function_context_to.  Use SF flags to start function.
3487         (end_anon_func): Remove redundant call to pop_function_context
3488         from.
3489         * lex.c (reinit_parse_for_function): Don't initialize per-function 
3490         data.
3491         * method.c (emit_thunk): Clear current_function after calling
3492         assemble_end_function.  Use SF flags for start_function.
3493         (synthesize_method): Use SF flags for start_function.
3494         * parse.c: Regenerated.
3495         * parse.y (fn.defpen): Likewise.
3496         (pending_inline): Clear current_function, even if something goes
3497         wrong.
3498         * pt.c (instantiate_decl): Use SF flags to start_function.
3499         Don't save and restore expanding_p.
3500         (add_tree): Handle the case where we are outside any function.
3501         (end_tree): Likewise.
3502         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
3503         * semantics.c (begin_function_definition): Likewise.
3504         (expand_body): Likewise.
3505         
3506 1999-09-09  Nathan Sidwell  <nathan@acm.org>
3507
3508         * cp-tree.h (convert_to_void): Prototype new function.
3509         (require_complete_type_in_void): Remove prototype.
3510         * cvt.c (convert_to_void): New function.
3511         (ocp_convert): Use convert_to_void.
3512         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
3513         expressions.
3514         * typeck.c (require_complete_type_in_void): Remove function.
3515         (build_compound_expr): Use convert_to_void.
3516         (build_static_cast): Likewise.
3517         (build_c_cast): Likewise.
3518         * semantics.c (finish_expr_stmt): Do not decay full expressions.
3519         
3520         * typeck.c (build_x_compound_expr): Add FIXME.
3521
3522 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
3523
3524         * cp-tree.h (scratch_tree_cons): Remove.
3525         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
3526         and perm_tree_cons with plain tree_cons.
3527         * class.c: Likewise.
3528         * decl.c: Likewise.
3529         * decl2.c: Likewise.
3530         * except.c: Likewise.
3531         * expr.c: Likewise.
3532         * init.c: Likewise.
3533         * lex.c: Likewise.
3534         * method.c: Likewise.
3535         * parse.y: Likewise.
3536         * pt.c: Likewise.
3537         * repo.c: Likewise.
3538         * rtti.c: Likewise.
3539         * search.c: Likewise.
3540         * typeck.c: Likewise.
3541         * parse.c: Regenerated.
3542         * tree.c (build_srcloc): Simplify.
3543         
3544 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
3545
3546         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
3547         Remove next.
3548         (LANG_DECL_PERMANENT): Remove.
3549         * decl.c (duplicate_decls): Don't mess about with obstacks trying
3550         to free memory.
3551         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
3552         * lex.c (free_lang_decl_chain): Remove.
3553         (build_lang_decl): Don't use obstacks.
3554         (retrofit_lang_decl): Likewise.
3555         (copy_lang_decl): Likewise.
3556
3557         * cp-tree.h (saved_scope): Remove old_binding_level and 
3558         function_decl.  Tidy up.
3559         * decl.c (mark_saved_scope): Don't set them.
3560         (maybe_push_to_top_level): Clear memory.
3561
3562         * decl.c (layout_var_decl): Change prototype.  Don't complete
3563         types for external objects.
3564         (check_initializer): Likewise.  Tidy.
3565         (initialize_local_var): Complete types here.
3566         (cp_finish_decl): Not here.  Reorganize a little.
3567         (grokvardecl): Don't complete types here.
3568
3569         * decl.c (start_function): Clear last_dtor_insn and
3570         last_parm_cleanup_insn. 
3571         (push_cp_function_context): Just copy over a little of
3572         the old context, not all of it.
3573
3574         * cp-tree.h (copy_to_permanent): Remove.
3575         (permanent_p): Likewise.
3576         * decl.c (building_typename_type): Don't use copy_to_permanent.
3577         (start_decl): Likewise.
3578         (grok_reference_init): Likewise.
3579         (cp_finish_decl): Likewise.
3580         * init.c (build_new_1): Don't use mapcar.
3581         (build_vec_delete_1): Don't use copy_to_permanent.
3582         (build_vec_init): Likewise.
3583         * parse.y (primary): Likewise.
3584         * parse.c: Regenerated.
3585         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
3586         (lookup_template_class): Likewise.
3587         (tsubst_friend_function): Likewise.
3588         (instantiate_class_template): Likewise.
3589         (tsubst_decl): Likewise.
3590         (tsubst): Likewise.
3591         (instantiate_template): Likewise.
3592         (unify): Likewise.
3593         * rtti.c (get_tinfo_fn): Likewise.
3594         (build_dynamic_cast): Likewise.
3595         * semantics.c (finish_if_stmt_cond): Likewise.
3596         (finish_while_stmt_cond): Likewise.
3597         (finish_do_stmt): Likewise.
3598         (finish_for_cond): Likewise.
3599         (finish_for_expr): Likewise.
3600         (finish_cleanup): Likewise.
3601         (add_decl_stmt): Likewise.
3602         (finish_named_return_value): Likewise.
3603         (finish_qualified_call_expr): Likewise.
3604         * tree.c (perm_manip): Remove.
3605         (build_exception_variant): Don't use copy_to_permanent.
3606         (permanent_p): Remove.
3607         (copy_to_permament): Remove.
3608         (build_min_nt): Don't use copy_to_permanent.
3609         (build_min): Likewise.
3610         (min_tree_cons): Likewise.
3611         * typeckc.c (build_static_cast): Likewise.
3612         (build_reinterpret_cast): Likewise.
3613         (build_const_cast): Likewise.
3614         
3615 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
3616
3617         * decl.c (ggc_p): Set it to 1.
3618         (mark_saved_scope): Add prototype.
3619
3620 1999-09-07  Richard Henderson  <rth@cygnus.com>
3621
3622         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
3623         * typeck.c (self_promoting_args_p): Delete.
3624
3625 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
3626
3627         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
3628         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
3629
3630 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
3631
3632         * Makefile.in (tree.o): Depend on ggc.h.
3633         * class.c (make_method_vec): Remove.
3634         (free_method_vec): Likewise.
3635         (free_method_vecs): Remove.
3636         (add_method): Don't use them.
3637         * cp-tree.def (PTRMEM_CST): Make it longer.
3638         (TEMPLATE_PARM_INDEX): Make it shorter.
3639         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
3640         (template_parm_index): Remove RTL field.
3641         (ptrmem_cst): Add RTL field.
3642         (finish_function): Removed parameter.
3643         (process_next_inline): Change prototype.
3644         (init_cplus_unsave): Rename to init_tree.
3645         (binding_init): Remove.
3646         * decl.c (free_binding_nodes): Remove.
3647         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
3648         (pop_binding): Don't use free_binding_nodes.
3649         (free_binding_vecs): Remove.
3650         (store_bindings): Don't use them.
3651         (pop_from_top_level): Likewise.
3652         (lookup_namespace_name): Simplify.
3653         (build_typename_type): Don't use obstack_free.
3654         (unqualified_namespace_lookup): Simplify.
3655         (lookup_name_real): Simplify.
3656         (start_function): Remove comment about leaks.
3657         (finish_function): Removed nested parameter.  Call
3658         expand_end_bindings even when building_stmt_tree.
3659         Call ggc_push_context and ggc_pop_context around
3660         rest_of_compilation, if necessary.
3661         (mark_cp_function_context): Handle a NULL language-context.
3662         (lang_mark_false_label_stack): Fix typo.
3663         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
3664         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
3665         pointer to method types.
3666         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
3667         * decl2.c (finish_objects): Adjust call to finish_function.
3668         (finish_static_store_duration_function): Likewise.
3669         (do_nonmember_using_decl): Remove call to binding_init.
3670         * except.c (end_anon_func): Adjust call to finish_function.
3671         * lex.c (mark_impl_file_chain): New function.
3672         (init_parse): Call init_tree, not init_cplus_unsave.
3673         Add GC roots.
3674         (cp_pramga_interface): Use xmalloc, not permalloc.
3675         (cp_pragma_implementation): Likewise.
3676         (begin_definition_of_inclass_inline): Simplify.
3677         (process_next_inline): Adjust prototype.
3678         (do_scoped_id): Don't call binding_init.
3679         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
3680         * method.c (emit_thunk): Adjust call to finish_function.
3681         (synthesize_method): Likewise.
3682         * parse.y (%union): Add a new `pi' variant.
3683         (PRE_PARSED_FUNCTION_DECL): Use it.
3684         (fn.defpen): Likewise.
3685         (fndef): Adjust call to finish_function.
3686         * pt.c (instantiate_decl): Likewise.
3687         * rtti.c (syntheisze_tinfo_fn): Likewise.
3688         * semantics.c (expand_body): Likewise.
3689         * tree.c: Include ggc.h.
3690         (mark_list_hash): New function.
3691         (binding_init): Remove.
3692         (init_cplus_unsave): Rename to ...
3693         (init_tree): This.  Add GC roots.
3694         
3695 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
3696
3697         Get ready for garbage collection.
3698         * Makefile.in (CXX_TREE_H): Add varray.h
3699         (lex.o): Depend on ggc.h.
3700         (decl.o): Likewise.
3701         (decl2.o): Likewise.
3702         (method.o): Likewise.
3703         (search.o): Likewise.
3704         (pt.o): Likewise.
3705         (repo.o): Likewise.
3706         * class.c: Include ggc.h.
3707         (current_class_name): Remove.
3708         (current_class_type): Likewise.
3709         (current_access_specifier): Likewise.
3710         (previous_class_type): Likewise.
3711         (previous_class_values): Likewise.
3712         (class_cache_firstobj): Likewise.
3713         (current_lang_base): Likewise.
3714         (current_lang_stack): Likewise.
3715         (current_lang_stacksize): Likewise.
3716         (lang_name_c): Likewise.
3717         (lang_name_cplusplus): Likewise.
3718         (lang_name_java): Likewise.
3719         (current_lang_name): Likewise.
3720         (base_layout_decl): Likewise.
3721         (access_default_node): Likewise.
3722         (access_public_node): Likewise.
3723         (access_protected_node): Likewise.
3724         (access_private_node): Likewise.
3725         (access_default_virtual_node): Likewise.
3726         (access_public_virtual_node): Likewise.
3727         (access_protected_virtual_node): Likewise.
3728         (access_private_virtual_node): Likewise.
3729         (signed_zero_node): Likewise.
3730         (init_class_processing): Don't build base_layout_decl.
3731         (push_lang_context): Adjust now that current_lang_base is a varray.
3732         (pop_lang_context): Likewise.
3733         * cp-tree.h: Include varray.h.
3734         (cp_global_trees): Add access_default, access_public,
3735         access_protected, access_private, access_default_virtual,
3736         access_public_virtual, access_protected_virtual,
3737         access_private_virtual, ctor_identifier, delta2_identifier, 
3738         delta_identifier, dtor_identifier, in_charge_identifier,
3739         index_identifier, nelts_identifier, this_identifier,
3740         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
3741         lang_name_c, lang_name_cplusplus, lang_name_java,
3742         empty_except_spec, null, jclass, minus_one, terminate.
3743         (saved_scope): Move here from decl.c.  Define globals in terms of
3744         saved_scope: current_namespace, current_class_name,
3745         current_class_type, current_access_specifier, current_lang_stack,
3746         current_lang_base, current_lang_name, current_function_parms,
3747         current_template_parms, processing_template_decl,
3748         processing_specialization, processing_explicit_instantiation,
3749         previous_class_type, previous_class_values, class_cache_firstobj.
3750         (scope_chain): New variable.
3751         (init_pt): New function.
3752         * decl.c (current_namespace): Remove.
3753         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
3754         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
3755         (delta_identifier, delta2_identifier): Likewise.
3756         (pfn_or_delta2_identifier, tag_identifier): Likewise
3757         (vt_off_identifier, empty_except_spec, null_node): Likewise.
3758         (current_function_parms, current_lang_base): Remove.
3759         (current_lang_stack, previous_class_values): Remove.
3760         (class_binding_level): Macroize.
3761         (saved_scope): Remove.
3762         (current_saved_scope): Rename to scope_chain.
3763         (mark_saved_scope): Adjust for new scope structure.
3764         (maybe_push_to_top_level): Likewise.
3765         (pop_from_top_level): Likewise.
3766         (duplicate_decls): Adjust now that current_lang_base is a varray.
3767         (build_typename_type): Call ggc_add_tree_hash_table_root.
3768         (init_decl_processing): Call init_pt.  Call push_to_top_level to
3769         set up globals.  Add GC roots.
3770         (xref_basetypes): Adjust now that current_lang_base is a varray.
3771         * decl.h (this_identifier): Remove.
3772         (in_charge_identifier): Likewise.
3773         * decl2.c: Don't include varray.h.
3774         (current_namespace): Remove.
3775         (init_decl2): Add GC roots.
3776         * except.c (Terminate): Remove. 
3777         (init_exception_processing): Use terminate_node instead.
3778         (build_terminate_handler): Likewise.
3779         * init.c (nc_nelts_field_id): Remove.
3780         (minus_one): Likewise.
3781         (init_init_processing): Use minus_one_node and nelts_identifier
3782         instead.  Add GC roots.
3783         (jclass_node): Remove.
3784         (build_new_1): Use nelts_identifier.
3785         (build_vec_init): Likewise.
3786         (build_vec_delete): Likewise.
3787         * lex.c: Include ggc.h.
3788         (defarg_fn): Move declaration early.
3789         (defarg_parms): Likewise.
3790         (init_parse): Add GC roots.
3791         (handle_cp_pragma): Remove redundant declaration of
3792         pending_vtables.
3793         * method.c: Include ggc.h.
3794         (btypelist): Make it a varray.  All uses changed.
3795         (ktypelist): Likewise.
3796         (init_method): Add GC roots.
3797         * pt.c: Don't include varray.h.  Include ggc.h.
3798         (current_template_parms): Remove.
3799         (processing_template_decl): Likewise.
3800         (processing_specialization): Likewise.
3801         (processing_explicit_instantiation): Likewise.
3802         (init_pt): New function.
3803         * repo.c: Include ggc.h.
3804         (init_repo): Add GC roots.
3805         * search.c: Don't include varray.h.
3806         (_vptr_name): Remove.
3807         (lookup_field_1): Use vtpr_identifier instead.
3808         (expand_indirect_vtbls_init): Remove redundant declaration of
3809         in_charge_identifier.
3810         (init_search_processing): Use vptr_identifier.
3811         
3812 1999-09-05  Richard Henderson  <rth@cygnus.com>
3813             Bernd Schmidt <bernds@cygnus.co.uk>
3814             Mark Mitchell  <mark@codesourcery.com>
3815
3816         * Makefile.in (parse.o): Depend on ggc.h.
3817         (decl2.o): Depend on ggc.h.
3818         (init.o): Depend on ggc.h.
3819         * cp-tree.h (init_decl2): Declare.
3820         (cp_parse_init): Likewise.
3821         * decl.c (ggc_p): Define to zero.
3822         (mark_saved_scope): New function.
3823         (init_decl_processing): Call cp_parse_init, and cp_decl2.
3824         Register GC roots.
3825         (expand_static_init): Add GC roots.
3826         * decl2.c: Include ggc.h.
3827         (init_decl2): New function.
3828         * init.c: Include ggc.h.
3829         (init_init_processing): Add GC roots.
3830         * parse.y: Include ggc.h.
3831         (cp_parse_init): New function.
3832         
3833 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
3834
3835         * decl.c (init_decl_processing): Set mark_lang_status.
3836         (lang_mark_false_label_stack): Adjust prototype.
3837         * decl2.c (grok_function_init): Remove extraneous declaration of
3838         abort_fndecl.
3839
3840         * Make-lang.in (cc1plus): Remove dependency on GGC.
3841         * Makefile.in (OBJS): Don't mention ggc-simple.o.
3842         (OBJDEPS): Don't mention ggc-simple.o.
3843
3844         * Make-lang.in (cc1plus): Depend on $(GGC).
3845         * Makefile.in (OBJS): Add ggc-simple.o.
3846         (OBJDEPS): Likewise.
3847         * cp-tree.h (language_function): Rename members to `x_' versions;
3848         we now have x_named_labels, x_ctor_label, x_dtor_label,
3849         x_base_init_list, x_member_init_list, x_base_init_expr,
3850         x_current_class_ptr, x_current_class_ref, x_last_tree,
3851         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
3852         x_result_rtx. 
3853         (dtor_label, ctor_label, current_base_init_list,
3854         current_member_init_list, base_init_expr, current_class_ptr,
3855         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
3856         * decl.c: Include ggc.h.
3857         (last_dtor_insn): Adjust to use x_ names.
3858         (last_parm_cleanup_insn): Likewise.
3859         (original_result_rtx): Likewise.
3860         (named_labels): Likewise.
3861         (mark_binding_level): New function.
3862         (mark_cp_function_context): Likewise.
3863         (mark_false_label_stack): Likewise.
3864         (lang_mark_tree): Likewise.
3865         (lang_cleanup_tree): Likewise.
3866         
3867 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
3868
3869         * Makefile.in (CXX_TREE_H): Include function.h.
3870         (decl.o): Don't depend on function.h.
3871         (decl2.o): Likewise.
3872         (typeck.o): Likewise.
3873         (init.o): Likewise.
3874         (method.o): Likewise.
3875         * cp-tree.h: Include function.h.
3876         (cp_function): Rename to language_function.  Remove next.
3877         (cp_function_chain): Make it a macro, not a variable.
3878         (push_cp_function_context): Don't declare.
3879         (pop_cp_function_context): Likewise.
3880         * decl.c: Don't include function.h.
3881         (push_cp_function_context): Make it static.  Make it suitable for
3882         a save_lang_status callback.
3883         (pop_cp_function_context): Likewise.
3884         (maybe_push_to_top_level): Call push_function_context_to, not
3885         push_cp_function_context.
3886         (pop_from_top_level): Call pop_function_context_from, not
3887         pop_cp_function_context.
3888         (init_decl_processing):  Set save_lang_status and
3889         restore_lang_status.  Call push_function_context_to, not
3890         push_cp_function_context.
3891         (cp_function_chain): Remove.
3892         * decl2.c: Don't include function.h.
3893         * except.c: Don't include function.h.
3894         (start_anon_func): Call push_function_context_to, not
3895         push_cp_function_context.
3896         (end_anon_func):  Call pop_function_context_from, not
3897         pop_cp_function_context.
3898         * init.c: Don't include function.h.
3899         * lex.c (begin_definition_of_inclass_inline): Call
3900         push_function_context_to, not push_cp_function_context. 
3901         (process_next_inline):  Call pop_function_context_from, not
3902         pop_cp_function_context.
3903         * method.c: Don't include function.h.
3904         (synthesize_method): Call push_function_context_to, not
3905         push_cp_function_context.  Call pop_function_context_from, not
3906         pop_cp_function_context.
3907         * typeck.c: Don't include function.h.
3908         
3909         * decl.c (expand_static_init): Tweak handling of static
3910         initializations for objects without constructors.
3911
3912 1999-09-03  Nathan Sidwell  <nathan@acm.org>
3913
3914         * typeck.c (build_indirect_ref): Reject dereference of pointer to
3915         void.
3916
3917 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
3918
3919         * cp-tree.h (cp_function): Move here, from decl.c.
3920         (cp_function_chain): Declare.
3921         (dtor_label): New macro, instead of variable.
3922         (ctor_label): Likewise.
3923         (current_base_init_list): Likewise.
3924         (current_member_init_list): Likewise.
3925         (base_init_expr): Likewise.
3926         (current_class_ptr): Likewise.
3927         (current_class_ref): Likewise.
3928         (last_tree): Likewise.
3929         (last_expr_type): Likewise.
3930         (current_function_returns_value): Likewise.
3931         (current_function_returns_null): Likewise.
3932         (current_function_just_assigned_this): Likewise.
3933         (current_function_parms_stored): Likewise.
3934         (temp_name_counter): Likewise.
3935         (static_labelno): Likewise.
3936         (expanding_p): Likewise.
3937         (stmts_are_full_exprs_p): Likewise.
3938         (in_function_try_handler): Likewise.
3939         (lang_type): Remove nested type_flags.  All uses changed.
3940         * call.c (ctor_label): Remove.
3941         (dtor_label): Likewise.
3942         * class.c (current_class_ptr): Remove.
3943         (current_class_ref): Likewise.
3944         * decl.c (static_labelno): Remove.
3945         (dtor_label): Likewise.
3946         (last_dtor_insn): New macro, instead of variable.
3947         (last_parm_cleanup_insn): Likewise.
3948         (original_result_rtx): Likewise.
3949         (in_function_try_handler): Remove.
3950         (named_label_uses): New macro, instead of variable.
3951         (named_labels): Likewise.
3952         (current_function_returns_value): Remove.
3953         (current_function_returns_null): Likewise.
3954         (current_function_assigns_this): New macro, instead of variable.
3955         (current_function_just_assigned_this): Likewise.
3956         (current_binding_level): Likewise.
3957         (init_decl_processing): Call push_cp_function_context.
3958         (cp_function): Move to cp-tree.h
3959         (cp_function_chain): Make it global.
3960         (temp_name_counter): Remove.
3961         (push_cp_function_context): Simplify.
3962         (pop_cp_function_context): Likewise.
3963         * decl2.c (temp_name_counter): Remove.
3964         * init_c (current_base_init_list): Likewise.
3965         (current_member_init_list): Likewise.
3966         (base_init_expr): Likewise.
3967         * method.c (static_labelno): Likewise.
3968         * pt.c (last_tree): Likewise.
3969         * semantics.c (expanding_p): Likewise.
3970         (stmts_are_full_exprs_p): Likewise.
3971         (last_expr_type): Likewise.
3972         * typeck.c (dtor_label): Likewise.
3973         (ctor_label): Likewise.
3974         
3975 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
3976
3977         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
3978         (arg_assoc_class): Use arg_assoc_template_arg for template
3979         arguments. 
3980         (arg_assoc): Likewise.
3981         * pt.c (mangle_class_name_for_template): Allow member template
3982         template arguments.
3983
3984 1999-09-02  Nathan Sidwell  <nathan@acm.org>
3985
3986         * call.c (build_conditional_expr): Warn on enum mismatches.
3987         (convert_arg_to_ellipsis): Move non-pod check to after
3988         conversion.
3989
3990 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3991
3992         * gxx.gperf (hash, is_reserved_word): Add prototypes.
3993
3994         * init.c (build_vec_init): Initialize variable `try_block'.
3995
3996         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
3997         Likewise for bzero/memset.
3998         (token_getch, token_put_back): Add static prototypes.  Remove
3999         `inline' from the definitions.
4000         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
4001
4002 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
4003
4004         * cp-tree.h (lang_type): Move align into type_flags.
4005         (CLASSTYPE_ALIGN): Adjust accordingly.
4006         * call.c (direct_reference_binding): Remove misleading comment.
4007
4008 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4009
4010         * parse.y (language_string): Constify.
4011
4012 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4013
4014         * repo.c (getpwd): Don't prototype.
4015         * xref.c (getpwd): Likewise
4016
4017 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4018
4019         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
4020         Remove hacks for stuff which now comes from libiberty.
4021
4022 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
4023
4024         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
4025
4026 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
4027
4028         * cp-tree.h (begin_init_stmts): Declare.
4029         (finish_init_stmts): Likewise.
4030         * cvt.c (build_up_reference): Wrap the declaration of a temporary
4031         in a statement-expression so that we will see it when expanding
4032         tree structure later.
4033         * init.c (begin_init_stmts): Don't make it static.
4034         (finish_init_stmts): Likewise.
4035
4036         * cp-tree.h (start_handler_parms): New function.
4037         (expand_start_catch_block): Take only one parameter.
4038         (start_handler_parms): New function.
4039         * decl.c (start_handler_parms): Define it.
4040         * except.c (process_start_catch_block): Take only one parameter.
4041         Don't call grokdeclarator here.
4042         (expand_start_catch_block): Don't call grokdeclarator here,
4043         either.
4044         * parse.y (handler_args): Adjust call to
4045         expand_start_catch_block.  Use start_handler_parms.
4046         * pt.c (push_template_decl_real): Make permanent lists have
4047         permanent elements.
4048         (tsubst_expr): Adjust calls to expand_start_catch_block
4049         appropriately.
4050         * semantics.c (expand_stmt): Likewise.
4051         
4052 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
4053
4054         * pt.c (push_template_decl_real): Use template declaration from
4055         class type if it exists.
4056
4057 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
4058
4059         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
4060         (maybe_inject_for_scope_var): Declare it.
4061         (initialize_local_var): Likewise.
4062         * decl.c (maybe_inject_for_scope_var): Make it global.
4063         (initialize_local_var): Likewise.  Move cleanup handling here,
4064         from cp_finish_decl.
4065         (make_rtl_for_nonlocal_decl): Use
4066         push_obstacks_nochange/pop_obstacks, rather than
4067         end_temporary_allocation/resume_temporary_allocation.
4068         (cp_finish_decl): Try to complete the type of a variable when it
4069         is declared.  Move cleanup-handling to initialize_local_var.
4070         (expand_static_init): Use tree-building code, rather than
4071         RTL-building code.
4072         * decl2.c (get_temp_name): Assert non-initializedness of
4073         temporaries.
4074         * init.c (create_temporary_var): Move RTL-assigning code to ...
4075         (get_temp_regvar): Here.
4076         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
4077         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
4078         call initialize_local_var to generate initialization code.
4079         
4080 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4081
4082         * cp-tree.h (fndecl_as_string, type_as_string,
4083         type_as_string_real, args_as_string, decl_as_string,
4084         expr_as_string, code_as_string, language_as_string,
4085         parm_as_string, op_as_string, assop_as_string, cv_as_string,
4086         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
4087
4088         * errfn.c (cp_printer): Likewise.
4089
4090         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
4091         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
4092         cp_file_of, code_as_string, language_as_string, parm_as_string,
4093         op_as_string, assop_as_string, args_as_string, cv_as_string):
4094         Likewise.
4095
4096         * tree.c (lang_printable_name): Likewise.
4097
4098 1999-08-28  Richard Henderson  <rth@cygnus.com>
4099
4100         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
4101
4102 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
4103
4104         * cp-tree.h (strip_array_types): New function.
4105         * decl.c (maybe_deduce_size_from_array_init): New function, split
4106         out from cp_finish_decl.
4107         (layout_var_decl): Likewise.
4108         (maybe_commonize_var): Likewise.
4109         (maybe_inject_for_scope_var): Likewise.
4110         (initialize_local_var): Likewise.
4111         (build_cleanup_on_safe_obstack): Likewise.
4112         (check_initializer): Likewise.
4113         (make_rtl_for_nonlocal_decl): Likewise.
4114         (cp_finish_decl): Use them.
4115         * typeck.c (strip_array_types): New function.
4116         
4117         * cp-tree.def (LABEL_STMT): New tree node.
4118         * cp-tree.h (LABEL_STMT_LABEL): New macro.
4119         (shadow_label): Remove.
4120         (declare_local_label): New function.
4121         (finish_label_decl): Likewise.
4122         * decl.c (make_label_decl): New function, split out from
4123         lookup_label.
4124         (shadowed_labels): Remove.
4125         (binding_level): Add shadowed_labels.
4126         (clear_binding_level): Remove.
4127         (push_binding_level): Just bzero the new binding level.
4128         (pushlevel): Fix indentation.
4129         (pop_label): New function.
4130         (pop_labels): Likewise, split out from poplevel.
4131         (poplevel): Pop local labels.  Use pop_labels.
4132         (maybe_push_to_top_level): Don't clear shadowed_labels.
4133         (lookup_label): Use make_label_decl.
4134         (shadow_label): Remove.
4135         (declare_local_label): New function.
4136         (define_label): Simplify.
4137         (start_function): Don't clear shadowed_labels.
4138         (cp_function): Remove shadowed_labels.
4139         (push_cp_function_context): Don't save shadowed_labels.
4140         (pop_cp_function_context): Don't restore it.
4141         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
4142         * parse.y (label_decl): Use finish_label_decl.
4143         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
4144         declarations.
4145         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
4146         building_stmt_tree.
4147         (finish_label_decl): New function.
4148         (expand_stmt): Handle LABEL_STMTs and local label declarations.
4149         
4150 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
4151
4152         * decl.c (lookup_label): Build labels on the permanent obstack
4153         when building statement trees.  Don't build RTL for labels when
4154         building statement trees.
4155         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
4156         building statement trees.
4157         (finish_label_stmt): Likewise.
4158         (expand_stmt): Adjust accordingly.
4159         * pt.c (tsubst_expr); Likewise.
4160         (do_decl_instantiation): Robustify.
4161         
4162         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
4163         * tree.c (build_cplus_new): Set it.
4164         * expr.c (cplus_expand_expr): Use it.
4165         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
4166         
4167         * decl.c (store_parm_decls): Reset immediate_size_expand.
4168         (finish_function): Likewise.
4169         
4170         * tree.c (cplus_unsave_expr_now): Don't return a value.
4171
4172         * semantics.c (do_poplevel): Always initialize the return value.
4173
4174 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
4175
4176         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
4177         * tree.h (cplus_unsave_expr_now) : Same.
4178
4179 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
4180
4181         * decl.c (grokdeclarator): Amend comment.
4182         * except.c (expand_start_catch_block): Call push_template_decl for
4183         catch-block parameters.
4184         * method.c (synthesize_method): Build an empty compound statement
4185         for the body of a constructor.
4186
4187 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
4188
4189         * tree.c (cp_build_qualified_type_real): If we're asking for the
4190         same quals we already have, just return.
4191
4192 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
4193
4194         * cp-tree.def (SUBOBJECT): New tree node.
4195         * cp-tree.h (CLEANUP_P): New macro.
4196         (SUBOBJECT_CLEANUP): Likewise.
4197         (keep_next_level): Add parameter.
4198         (get_temp_regvar): Don't declare.
4199         (emit_base_init): Remove parameter.
4200         (expand_aggr_init): Rename to build_aggr_init.
4201         (expand_vec_init): Rename to build_vec_init.
4202         (do_pushlevel): Remove.
4203         (do_poplevel): Likewise.
4204         (finish_cleanup): New function.
4205         (finish_subobject): Likewise.
4206         (stmts_are_full_exprs_p): New variable.
4207         * decl.c (keep_next_level): Add parameter.
4208         (cp_finish_decl): Use build_aggr_init, not
4209         expand_aggr_init.  Use finish_expr_stmt to expand the code.
4210         (expand_static_init): Use tree-generating, not RTL-generating,
4211         functions to handle the initialization.
4212         (start_function): Remove dead code.  Always have a momentary
4213         obstack inside the function, even before hitting the first curly
4214         brace.
4215         (cplus_expand_expr_stmt): Move calls to
4216         expand_{start,end}_target_temps into semantics.c.
4217         (cp_function): Add stmts_are_full_exprs_p.
4218         (push_cp_function_context): Save it.
4219         (pop_cp_function_context): Restore it.
4220         * decl2.c (get_temp_regvar): Move to init.c.
4221         (do_static_initialization): Use build_{aggr,vec}_init.
4222         (do_static_destruction): Fix typo in comment.
4223         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
4224         * except.c (expand_throw): Use create_temporary_var.
4225         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
4226         * init.c (expand_vec_init_try_block): Remove.
4227         (expand_vec_init_catch_clause): Likewise.
4228         (get_temp_regvar): New function.
4229         (begin_init_stmts): Likewise.
4230         (finish_init_stmts): Likewise.
4231         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
4232         structure here.
4233         (emit_base_init): Likewise.  Remove unused parameter.
4234         (expand_virtual_init): Likewise.
4235         (expand_cleanup_for_base): Use finish_subobject.
4236         (expand_aggr_vbase_init_1): Simplify.
4237         (construct_virtual_bases): Use tree-generating functions to build
4238         up initialization.
4239         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
4240         (expand_default_init): Likewise.
4241         (expand_aggr_init_1): Likewise.
4242         (expand_vec_init): Rename to build_vec_init.
4243         * method.c (do_build_copy_constructor): Use tree-generating
4244         functions.  Don't call clear_last_expr.
4245         (do_build_assign_ref): Likewise.
4246         (synthesize_method): Call clear_last_expr here.
4247         * parse.y (base_init): Don't call clear_last_expr here.
4248         (nodecls): Likewise.
4249         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
4250         * semantics.c (do_pushlevel): Move to here.
4251         (do_poplevel): Likewise.
4252         (stmts_are_full_exprs_p): New variable.
4253         (finish_expr_stmt): Handle logic for temoprary cleanup here.
4254         (finish_for_stmt): Use finish_expr_stmt.
4255         (finish_cleanup): New function.
4256         (finish_function_try_block): Fix indentation.
4257         (finish_subobject): New function.
4258         (setup_vtbl_ptr): Call keep_next_level here.
4259         (finish_stmt_expr): Handle a block with no scope inside the
4260         statement-expression.
4261         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
4262         SUBOBJECT.
4263         * tree.c (search_tree): Handle INIT_EXPR.
4264         (mapcar): Likewise.
4265         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
4266         * typeck2.c (store_init_value): Change expand_aggr_init to
4267         build_aggr_init in comment.
4268         
4269 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
4270
4271         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
4272
4273 1999-08-25  Nathan Sidwell  <nathan@acm.org>
4274
4275         * decl2.c (handle_class_head): Be graceful about additional
4276         scope qualifiers. Adjust comments to reflect reality.
4277
4278 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
4279
4280         * call.c (build_conditional_expr): Fix typo.
4281         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
4282         lvalue before trying to mess with the sides.
4283
4284         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
4285
4286 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
4287
4288         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
4289
4290 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
4291
4292         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
4293         Return arbitrary pointer or NULL.
4294         (check_eh_spec): Call __throw_type_match_rtti_2.
4295         * tinfo.h (*::dcast): Return int.  Add valp parm.
4296         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
4297         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
4298         (__throw_type_match_rtti): Now just a wrapper.
4299
4300         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
4301         (init_exception_processing): Don't initialize them.
4302
4303 1999-08-23  Paul Burchard <burchard@pobox.com>
4304
4305         * decl.c (check_default_argument): Fix typo.
4306
4307 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
4308
4309         * cp-tree.def (STMT_EXPR): Fix typo in node name.
4310
4311         * dump.c (dump_next_stmt): New function.
4312         (dequeue_and_dump): Use it.
4313         
4314         * pt.c (tsubst_copy): Make sure to initialize return value for a
4315         STMT_EXPR, even when processing_template_decl.
4316         * semantics.c (finish_stmt_expr): A statement-expression whose
4317         last statement is not an expression-statement has type `void'.  
4318         
4319 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
4320
4321         * semantics.c (finish_stmt_expr): Fix typo in comment.
4322         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
4323         (mapcar): Likewise.
4324         * init.c (build_vec_delete_1): Make the children of a permanent
4325         BIND_EXPR permanent.
4326         * pt.c (register_specialization): Don't register a specialization
4327         more than once.
4328         
4329 1999-08-18  Andrew Haley  <aph@cygnus.com>
4330
4331         * method.c (process_overload_item): Call build_mangled_C9x_name ()
4332         for all integer parameter types larger than long long.
4333
4334 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
4335
4336         * pt.c (redeclare_class_template): Merge default template
4337         arguments in both directions.
4338
4339         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
4340         compiler_error message.
4341
4342 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
4343
4344         * cp-tree.h: Declare flag_use_repository.
4345         * pt.c (do_decl_instantiation): Don't complain about duplicate
4346         instantiation with -frepo.
4347         (do_type_instantiation): Likewise.
4348
4349         * pt.c (push_template_decl_real): Complain about everything
4350         that isn't a valid template.
4351
4352         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
4353         affect inlines.
4354
4355 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
4356
4357         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
4358         * decl2.c (build_expr_from_tree): Handle it.
4359         * error.c (dump_expr): Likewise.
4360         * pt.c (for_each_template_parm): Likewise.
4361         (tsubst_copy): Likewise.
4362         * tree.c (search_tree): Likewise.
4363         * semantics.c (finish_pseudo_destructor_call): Create it.
4364         
4365 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
4366
4367         * search.c (setup_class_bindings): Robustify.
4368         * typeck.c (common_type): Use same_type_p, not pointer equality,
4369         to compare types.
4370
4371         * cp-tree.h (build_lang_field_decl): Remove.
4372         * class.c (build_vtable): Replace calls to build_lang_field_decl
4373         with build_lang_decl.
4374         (prepare_fresh_vtable): Likewise.
4375         (finish_struct_1): Likewise.
4376         (init_class_processing): Likewise.
4377         * decl.c (push_using_decl): Likewise.
4378         (init_decl_processsing): Likewise.
4379         (grokvardecl): Likewise.
4380         (build_ptrmemfunc_type): Likewise.
4381         (grokdeclarator): Likewise.
4382         (build_enumerator): Likewise.
4383         * decl2.c (grok_x_components): Likewise.
4384         (do_class_using_decl): Likewise.
4385         * except.c (call_eh_info): Likewise.
4386         * init.c (init_init_processing): Likewise.
4387         * rtti.c (expand_class_decl): Likewise.
4388         * tree.c (build_base_fields): Likewise.
4389         (build_vbase_pointer_fields): Likewise.
4390         * lex.c (build_lang_decl): Build declarations on the permanent
4391         obstack if we're building statmeent trees.
4392         (retrofit_lang_decl): Handle both the full lang_decl and also the
4393         smaller lang_decl_flags here.
4394         (build_lang_field_decl): Remove.
4395         * pt.c (push_template_decl_real): Issue errors for variable
4396         declarations that are not static members.
4397
4398 1999-08-18  Richard Henderson  <rth@cygnus.com>
4399
4400         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
4401         (mapcar): Likewise.
4402
4403 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
4404
4405         * cp-tree.h (back_end_hook): New variable.
4406         * decl2.c (back_end_hook): Define it.
4407         (finish_file): If it's non-NULL, call it.
4408
4409         * decl.c (add_decl_to_level): New function.
4410         (push_local_binding): Use it.
4411         (find_binding): Fix typo in comment.
4412         (pushdecl): Use add_decl_to_level.  Put templates on the
4413         corresponding namespace-scope binding levels.
4414         * dump.c (dequeue_and_dump): Print the specializations of a
4415         template.
4416         * pt.c (push_template_decl_real): Don't push a template multiple
4417         times.
4418
4419 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
4420
4421         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
4422         (CALL_DECLARATOR_QUALS): Likewise.
4423         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
4424         * decl.c (grokdeclarator): Adjust to use them.
4425         * decl2.c (grokfield): Likewise.
4426         (reparse_absdcl_as_casts): Likewise.
4427         * lex.c (make_call_declarator): Likewise.
4428         (set_quals_and_spec): Likewise.
4429         * pt.c (tsubst): Likewise.
4430         * tree.c (mapcar): Remove special hack to handle third operand of
4431         a CALL_EXPR.
4432
4433 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
4434
4435         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
4436         * class.c (build_vtable): Use build_lang_field_decl to build the
4437         VAR_DECLs for vtables.
4438         (prepare_fresh_vtable): Likewise.
4439         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
4440         CAN_HAVE_FULL_LANG_DECL_P.
4441         (push_using_decl): Use build_lang_decl to build USING_DECLs.
4442         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
4443         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
4444         (build_lang_field_decl): Likewise.
4445         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
4446         to copy.
4447         
4448         * cp-tree.def (STMT_EXPR): New tree node.
4449         * cp-tree.h (STMT_EXPR_STMT): New macro.
4450         (store_return_init): Change prototype.
4451         (finish_named_return_value): New function.
4452         (expand_stmt): Likewise.
4453         (expand_body): Likewise.
4454         (begin_stmt_tree): Likewise.
4455         (finish_stmt_tree): Likewise.
4456         (expanding_p): New variable.
4457         (last_expr_type): Likewise.
4458         (building_stmt_tree): New macro.
4459         * decl.c (start_function): Use building_stmt_tree, not
4460         processing_template_decl, where appropriate.
4461         (store_parm_decls): Likewise.
4462         (store_return_init): Move most of the body to semantics.c.
4463         (finish_function): Use building_stmt_tree.
4464         (finish_stmt): Clear last_expr_type here.
4465         (cp_function): Add expanding_p, last_tree, last_expr_type.
4466         (push_cp_function_context): Save them.
4467         (pop_cp_function_context): Restore them.
4468         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
4469         * error.c (dump_expr): Handle STMT_EXPR.
4470         * except.c (expand_start_catch_block): Use building_stmt_tree.
4471         Use add_decl_stmt.
4472         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
4473         (do_case): Move add_tree call to semantics.c.
4474         * parse.y (return_init): Use finish_named_return_value.
4475         (for.init.statement): Use finish_expr_stmt.
4476         * parse.c: Regenerated.
4477         * pt.c (do_pushlevel): Move to semantics.c.
4478         (do_poplevel): Likewise.
4479         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
4480         (tsubst_expr): Don't expand all the way to RTL here.  Handle
4481         RETURN_INIT and CTOR_INITIALIZER.
4482         (instantiate_decl): Call expand_body after tsubst'ing into
4483         DECL_SAVED_TREE.
4484         * semantics.c (expand_stmts): New function.
4485         (expanding_p): New variable.
4486         (last_expr_type): Likewise.
4487         (finish_expr_stmt): Use building_stmt_tree.
4488         (begin_if_stmt): Likewise.
4489         (finish_if_stmt_cond): Likewise.
4490         (finish_then_clause): Likewise.
4491         (begin_else_clause): Likewise.
4492         (finish_else_clause): Likewise.
4493         (begin_while_stmt): Likewise.
4494         (finish_while_stmt_cond): Likewise.
4495         (finish_while_stmt): Likewise.
4496         (finish_do_body): Likewise.
4497         (finish_do_stmt): Likewise.
4498         (finish_return_stmt): Likewise.
4499         (begin_for_stmt): Likewise.
4500         (fnish_for_init_stmt): Likewise.
4501         (finish_for_cond): Likewise.
4502         (finish_for_expr): Likewise.
4503         (finish_for_stmt): Likewise.
4504         (finish_break_stmt): Likewise.
4505         (finish_continue_stmt): Likewise.
4506         (finish_switch_cond): Likewise.
4507         (finish_switch_stmt): Likewise.
4508         (finish_case_label): Call add_tree here if necessary.
4509         (finish_goto_statement): Use building_stmt_tree.
4510         (begin_try_block): Likewise.
4511         (begin_function_try_block): Likewise.
4512         (finish_try_block): Likewise.
4513         (finish_function_try_block): Likewise.
4514         (finish_handler_sequence): Likewise.
4515         (finish_function_handler_sequence): Likewise.
4516         (begin_handler): Likewise.
4517         (finish_handler_parms): Likewise.
4518         (finish_handler): Likewise.
4519         (begin_compound_stmt): Likewise.
4520         (finish_compound_stmt): Likewise.
4521         (finish_asm_stmt): Likewise.
4522         (finish_label_stmt): Likewise.
4523         (finish_named_return_value): New function.
4524         (setup_vtbl_ptr): Moved here from decl2.c.
4525         (do_pushlevel): Moved here from pt.c.
4526         (do_poplevel): Likewise.
4527         (begin_stmt_expr): Use building_stmt_tree.
4528         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
4529         when building_stmt_tree.
4530         (begin_stmt_tree): New function.
4531         (finish_stmt_tree): Likewise.
4532         (expand_stmt): Likewise.
4533         (expand_body): Likewise.
4534         * tree.c (build_cplus_method_type): Make sure the argument types
4535         end up on the same obstack as the METHOD_TYPE.
4536         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
4537         THROW_EXPR, STMT_EXPR.
4538         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
4539         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
4540         sorry, if an unsupported node is encountered.
4541         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
4542         (c_expand_return): Don't call add_tree here.
4543         
4544 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
4545
4546         * pt.c (check_default_tmpl_args): Don't check in local scopes.
4547         (tsubst_decl): Make sure the declaration is on a saveable
4548         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
4549         variable.
4550         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
4551         
4552 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
4553
4554         Speed up Koenig lookup.
4555         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
4556         to return namespaces we've looked at.
4557         * decl2.c (lookup_using_namespace): Likewise.
4558         (add_function): Don't call ovl_member.
4559         (lookup_arg_dependent): Initialize k.namespaces to the list of 
4560         namespaces seen in unqualified lookup.
4561         * call.c (equal_functions): Move here from tree.c.
4562         (joust): Use it to handle duplicate candidates.
4563         * tree.c (ovl_member): Use ==.
4564
4565 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
4566
4567         * cp-tree.def (DECL_STMT): Make it smaller.
4568         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
4569         (lang_decl): ... here.  Add next.
4570         (DECL_SAVED_TREE): Adjust accordingly.
4571         (DECL_IMPLICIT_TYPEDEF_P): New macro.
4572         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
4573         (DECL_STMT_DECL): Likewise.
4574         (create_implicit_typedef): New function.
4575         (maybe_push_decl): Likewise.
4576         (tsubst_default_argument): New function.
4577         (at_function_scope_p): Likewise.
4578         (add_decl_stmt): Likewise.
4579         (push_permanent_obstack): Likewise.
4580         * call.c (convert_default_arg): Use tsubst_default_argument.
4581         * class.c (add_method): Use push_permanent_obstack.
4582         (build_self_reference): Create a TEMPLATE_DECL for the
4583         self-reference, if necessary.
4584         * decl.c (pseudo_global_level_p): Only look at the current binding
4585         level.
4586         (push_binding): Use push_permanent_obstack.
4587         (create_implicit_typedef): New function.
4588         (pushtag): Use it.
4589         (duplicate_decls): Use push_permanent_obstack.
4590         (maybe_push_decl): New function.
4591         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
4592         (start_decl_1): Remove dead code.
4593         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
4594         pseudo_global_level_p.
4595         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
4596         template.
4597         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
4598         pseudo_global_level_p.
4599         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
4600         a template.
4601         (get_sentry): Use push_permanent_obstack.
4602         * dump.c (dequeue_and_dump): Enable DECL_STMT.
4603         * except.c (call_eh_info): Use push_permanent_obstack.
4604         (build_eh_type_ref): Likewise.
4605         (do_pop_exception): Likewise.
4606         (expand_eh_spec): Likewise.
4607         (alloc_eh_object): Likewise.
4608         (expand_throw): Likewise.
4609         * init.c (build_java_class_ref): Likewise.
4610         * lex.c (get_time_identifier): Likewise.
4611         (free_lang_decl_chain): Correct type.
4612         (retrofit_lang_decl): Adjust accordingly.
4613         (build_lang_field_decl): Likewise.
4614         * lex.h (free_lang_decl_chain): Likewise.
4615         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
4616         * parse.c: Regenerated.
4617         * pt.c (tsubst_default_arguments): New function.
4618         (retrieve_local_specialization): Likewise.
4619         (register_local_specialization): Likewise.
4620         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
4621         pseudo_global_level_p to determine whether or not a template is
4622         primary.
4623         (lookup_template_class): Likewise.  Use create_implicit_typedef.
4624         (instantiate_class_template): Call tsubst_default_arguments for
4625         member functions, if appropriate.
4626         (tsubst_default_argument): New function.
4627         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
4628         * search.c (at_function_scope_p): New function.
4629         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
4630         (finish_label_stmt): Likewise.
4631         (add_decl_stmt): New function.
4632         (begin_class_definition): Likewise.
4633         (finish_typeof): Likewise.
4634         * tree.c (copy_template_template_parm): Likewise.
4635         (copy_to_permanent): Likewise.
4636         (push_permanent_obstack): Define.
4637         (mark_addressable): Use it.
4638         * typeck.c (mark_addressable): Likewise.
4639         
4640 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
4641
4642         * cp-tree.h (init_cplus_unsave): New.
4643         (cplus_unsave_expr_now): New.
4644         * lex.c (init_parse): Call init_cplus_unsave.
4645         * tree.c (init_cplus_unsave): New.
4646         (cplus_unsave_expr_now): New.
4647
4648 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
4649
4650         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
4651         decl_constant_value to simplify array bounds.
4652
4653 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
4654
4655         * lang-options.h: Add -fms-extensions.
4656         * cp-tree.h: Declare flag_ms_extensions.
4657         * decl2.c: Define it.
4658         * class.c (instantiate_type): Don't complain about taking the address
4659         of a bound member function if -fms-extensions.
4660         * typeck.c (build_unary_op): Likewise.
4661         * decl.c (grokdeclarator): Or about implicit int.
4662         * init.c (resolve_offset_ref): Or about implicit '&'.
4663
4664 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
4665
4666         * cp-tree.h (minimal_parse_mode): Remove.
4667         (finish_label_stmt): New function.
4668         * decl.c (saved_scope): Remove minimal parse mode.
4669         (maybe_push_to_top_level): Don't save it.
4670         (pop_from_top_level): Don't restore it.
4671         (define_label): Split out template-handling code to semantics.c.
4672         (start_decl): Don't use minimal_parse_mode.
4673         (cp_finish_decl): Likewise.
4674         (start_function): Don't increment it.
4675         (store_return_init): Don't use it.
4676         (finish_function): Don't decrement it.
4677         * parse.y (label_colon): Use finish_label_stmt throughout.
4678         * parse.c: Regenerated.
4679         * pt.c (minimal_parse_mode): Don't define it.
4680         (tsubst_expr): Use finish_label_stmt.
4681         * semantics.c (finish_label_stmt): New function.
4682
4683         * dump.c (queue): Be careful when computing bitmasks.
4684         (dequeue_and_dump): Describe binfos as binfos, not as
4685         vectors.
4686         
4687         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
4688         throughout.     
4689         * parse.c: Regenerated.
4690         
4691         * Make-lang.in (CXX_SRCS): Remove sig.c.
4692         * Makefile.in (CXX_OBJS): Remove sig.o.
4693         (sig.o): Remove.
4694         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
4695         (CPTI_SIGNATURE_TYPE): Likewise.
4696         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
4697         (opaque_type_node): Likewise.
4698         (signature_type_node): Likewise.
4699         (sigtable_entry_type): Likewise.
4700         (flag_handle_signatures): Likewise.
4701         (lang_type): Remove is_signature, is_signature_pointer,
4702         is_signature_reference, has_opaque_typedecls,
4703         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
4704         signature_pointer_to, signature_reference_to.
4705         (IS_SIGNATURE): Remove.
4706         (SET_SIGNATURE): Remove.
4707         (CLEAR_SIGNATURE): Remove.
4708         (IS_SIGNATURE_POINTER): Remove.
4709         (IS_SIGNATURE_REFERENCE): Remove.
4710         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
4711         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
4712         (CLASSTYPE_SIGNATURE): Remove.
4713         (SIGNATURE_TYPE): Remove.
4714         (SIGNATURE_METHOD_VEC): Remove.
4715         (SIGNATURE_POINTER_TO): Remove.
4716         (SIGNATURE_REFERENCE_TO): Remove.
4717         (lang_decl_flags): Remove is_default_implementation.  Rename
4718         memfunc_pointer_to to saved_tree.
4719         (IS_DEFAULT_IMPLEMENTATION): Remove.
4720         (DECL_MEMFUNC_POINTER_TO): Remove.
4721         (DECL_MEMFUNC_POINTING_TO): Remove.
4722         (DECL_SAVED_TREE): Adjust definition.
4723         (tag_types): Remove signature_type_node.
4724         (SIGNATURE_FIELD_NAME): Remove.
4725         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
4726         (SIGNATURE_OPTR_NAME): Likewise.
4727         (SIGNATURE_SPTR_NAME): Likewise.
4728         (SIGNATURE_POINTER_NAME): Likewise.
4729         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
4730         (SIGNATURE_REFERENCE_NAME): Likewise.
4731         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
4732         (SIGTABLE_PTR_TYPE): Likewise.
4733         (SIGTABLE_NAME_FORMAT): Likewise.
4734         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
4735         (SIGTABLE_TAG_NAME): Likewise.
4736         (SIGTABLE_VB_OFF_NAME): Likewise.
4737         (SIGTABLE_VT_OFF_NAME): Likewise.
4738         (finish_base_specifiers): Change prototype.
4739         (build_signature_pointer_type): Remove.
4740         (build_signature_reference_type): Remove.
4741         (build_signature_pointer_constructor): Remove.
4742         (build_signature_method_call): Remove.
4743         (build_optr_ref): Likewise.
4744         (append_signature_fields): Likewise.
4745         (signature_error): Likewise.
4746         * call.c (build_this): Remove signature support.
4747         (build_over_call): Likewise.
4748         (build_new_method_call): Likewise.
4749         * class.c (add_implicitly_declared_members): Likewise.
4750         (finish_struct_1): Likewise.
4751         (finish_struct): Likewise.
4752         * cvt.c (cp_convert_to_pointer): Likewise.
4753         (convert_to_pointer_force): Likewise.
4754         (ocp_convert): Likewise.
4755         * decl.c (sigtable_decl_p): Remove.
4756         (init_decl_processing): Remove support for signatures.
4757         (cp_finish_decl): Likewise.
4758         (grokdeclarator): Likewise.
4759         (grokparms): Likewise.
4760         (xref_tag): Likewise.
4761         (start_function): Likewise.
4762         (start_method): Likewise.
4763         * decl2.c (finish_sigtable_vardecl): Remove.
4764         (flag_handle_signatures): Remove.
4765         (lang_f_options): Remove handle-signatures.
4766         (grokfield): Remove support for signatures.
4767         (grokbitfield): Likewise.
4768         (finish_file): Likewise.
4769         (reparse_absdcl_as_casts): Likewise.
4770         * error.c (dump_type_real): Likewise.
4771         (dump_function_decl): Likewise.
4772         * friend.c (make_friend_class): Likewise.
4773         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
4774         * hash.h: Regenerated.
4775         * init.c (build_new_1): Remove support for signatures.
4776         * lang-options.h: Remove -fhandle-signatures,
4777         -fno-handle-signatures. 
4778         * lex.c (init_parse): Remove support for signatures.
4779         (yyprint): Likewise.
4780         * lex.h (rid): Remove RID_SIGNATURE.
4781         * method.c (build_decl_overload_real): Remove support for
4782         signatures. 
4783         (hack_identifier): Likewise.
4784         * parse.y (base_class): Likewise.
4785         (base_class.1): Likewise.
4786         (access_specifier): Likewise.
4787         * search.c (lookup_member): Likewise.
4788         * semantics.c (finish_qualified_object_call_expr): Likewise.
4789         (finish_template_type_parm): Likewise.
4790         (begin_class_definition): Likewise.
4791         (finish_base_specifier): Likewise.
4792         * sig.c: Remove.
4793         * tree.c (build_cplus_method_type): Remove support for signatures.
4794         * typeck.c (require_complete_type): Likewise.
4795         (c_sizeof): Likewise.
4796         (c_alignof): Likewise.
4797         (build_object_ref): Likewise.
4798         (build_component_ref): Likewise.
4799         (build_indirect_ref): Likewise.
4800         (build_c_cast): Likewise.
4801         (build_modify_expr): Likewise.
4802         (convert_for_initialization): Likewise.
4803         * typeck2.c (signature_error): Remove.
4804         (store_init_value): Remove support for signatures.
4805         (digest_init): Likewise.
4806         (build_x_arrow): Likewise.
4807         (build_functional_cast): Likewise.
4808         * xref.c (GNU_xref_decl): Likewise.
4809         
4810 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
4811
4812         * lex.c (do_identifier): Remove unnecessary lookup of class field.
4813
4814 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
4815
4816         * decl2.c (set_decl_namespace): Do not complain about non-matching
4817         decls if processing a template.
4818
4819 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
4820
4821         * decl.c (build_ptrmemfunc_type): Handle qualified
4822         pointer-to-member types here.
4823         * tree.c (cp_build_qualified_type_real): Simplify handling here.
4824
4825 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4826
4827         * lex.c (lang_identify): Likewise.
4828
4829 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
4830
4831         * Makefile.in: Update dependencies.
4832         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
4833         NULL_RTX.
4834         * decl.c: Include "function.h"
4835         (cleanup_label, return_label): Delete declarations.
4836         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
4837         (finish_function): Rename last_parm_insn variable to
4838         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
4839         * decl2.c: Include "function.h".
4840         (rtl_expr_chain): Delete declaration.
4841         * method.c: Include "function.h"
4842         * tree.c (build_vbase_pointer_fields): Don't initialize
4843         DECL_SAVED_INSNS with NULL_RTX.
4844         * typeck.c: Include "function.h"
4845
4846 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
4847
4848         * semantics.c (begin_function_try_block, finish_function_try_block,
4849         finish_function_handler_sequence): New fns.
4850         * parse.y (function_try_block): Use them.
4851         * pt.c (instantiate_decl): Likewise.
4852
4853         * cp-tree.h: Declare in_function_try_handler.
4854         * decl.c: Define it.
4855         (start_function): Clear it.
4856         (struct cp_function, push_cp_function_context): Save it.
4857         (pop_cp_function_context): Restore it.
4858         * parse.y (function_try_block): Set and clear it.
4859         * except.c (expand_end_catch_block): Rethrow if we reach the end
4860         of a function-try-block handler in a ctor or dtor.
4861         * typeck.c (c_expand_return): Complain about returning from a
4862         function-try-block handler of a ctor.
4863
4864         * parse.y (function_try_block): Call end_protect_partials
4865         before expand_start_all_catch.
4866
4867 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
4868
4869         * decl.c (struct binding_level): Add eh_region field.
4870         (push_binding_level): Set it.
4871         (define_label): Complain about jumping into an EH block.
4872
4873         * ptree.c (print_lang_type): Print the real type of a PMF.
4874         Print what exceptions a fn type throws.
4875
4876 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4877
4878         * class.c (count_fields, add_fields_to_vec): Add static prototype.
4879
4880         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
4881         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
4882         char*.
4883
4884         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
4885         Constify a char*.
4886
4887         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
4888         char*.
4889
4890         * dump.c (queue_and_dump_index, dump_int, dump_string,
4891         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
4892         a char*.
4893         (dump_stmt): Add static prototype.
4894
4895         * errfn.c (cp_thing): Constify a char*.
4896
4897         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
4898         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
4899         dump_expr): Constify a char*.
4900
4901         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
4902         read_line_number): Add static prototype.
4903         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
4904         (real_yylex): Move label `letter' into the scope where it is used.
4905
4906         * method.c (build_mangled_template_parm_index, build_overload_int,
4907         build_decl_overload_real, get_id_2): Constify a char*.
4908
4909         * search.c (check_final_overrider): Make static.
4910
4911         * typeck.c (composite_pointer_type): Constify a char*.
4912
4913 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
4914
4915         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
4916         we're looking at a class.
4917
4918         * decl.c (lookup_name_real): Set the complain flag if we're
4919         looking for a namespace member.
4920
4921         * lex.c (real_yylex): We can have a number with no digits.
4922
4923         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
4924
4925         * search.c (binfo_from_vbase): New fn.
4926         * cp-tree.h: Declare it.
4927         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
4928         from pointer to member of virtual base.  
4929         * typeck.c (get_delta_difference): Likewise.
4930
4931 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
4932
4933         * pt.c (tsubst): Use build_index_type to build in-template array
4934         index type.  Fixes g++.oliva/dwarf1.C.
4935         * decl.c (grokdeclarator): Likewise, just for consistency, as it
4936         doesn't seem to trigger the bug without it.
4937
4938 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
4939
4940         * typeck2.c (add_exception_specifier): Use complete_type.
4941
4942 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
4943
4944         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
4945         (dump_binary_op): Bulletproof.
4946         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
4947         * tree.c (search_tree): Don't enumerate all the nodes of classes
4948         `1', `2', and `<'; handle them generically.  Don't be sorry about
4949         "unrecognized tree codes"; just abort.
4950         (no_linkage_check): Don't do linkage checks for templates.
4951         
4952         * tree.c (cp_build_qualified_type_real): Handle
4953         pointer-to-member-function types correctly.
4954
4955 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
4956
4957         * decl.c (pushdecl): Only give an error for shadowing a parm 
4958         from *this* function.
4959
4960 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
4961
4962         * typeck2.c: Update URLs and mail addresses.
4963
4964 1999-08-04  Nathan Sidwell  <nathan@acm.org>
4965
4966         * cp-tree.h (empty_except_spec): New global var.
4967         (compexcepttypes): Remove prototype.
4968         (comp_except_specs): Prototype new global function.
4969         (add_exception_specifier): Prototype new global function.
4970         * decl.c (empty_except_spec): Define new global var.
4971         (duplicate_decls): Use comp_except_specs, reword error message.
4972         (init_decl_processing): Initialize empty_except_spec.
4973         Adjust build_exception_variant calls.
4974         * parse.y (exception_specification_opt): Use empty_except_spec.
4975         (ansi_raise_identifier): Call check_for_new_type.
4976         (ansi_raise_identifiers): Use add_exception_specifier.
4977         * pt.c (tsubst): Use add_exception_specifier to build exception
4978         specifier.
4979         * search.c (check_final_overrider): New static function, broken
4980         out of get_matching_virtual. Check throw specifiers, reword
4981         diagnostics.
4982         (get_matching_virtual): Use check_final_overrider.
4983         * tree.c (build_exception_variant): Use comp_except_specs.
4984         * typeck.c (compexcepttypes): Remove.
4985         (comp_except_types): New static function, helper for
4986         comp_except_specs. Compare two types as exception specifiers.
4987         (comp_except_specs): New global function, compare two exception
4988         specifiers.
4989         (comptypes): Adjust for comp_except_specs.
4990         * typeck2.c (add_exception_specifier): New global function.
4991         
4992         * class.c (check_for_override): Reword error message.
4993
4994 1999-08-03  Nathan Sidwell  <nathan@acm.org>
4995
4996         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
4997         * cp-tree.h (struct lang_type): Added non_pod_class flag.
4998         (CLASSTYPE_NON_POD_P): New macro to access it.
4999         * class.c (finish_struct_1): Determine non-PODness.
5000         Check for arrays of pointers (-Weffc++).
5001         Remove array inspection duplicated code.
5002         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
5003         Use CLASSTYPE_NON_POD_P.
5004
5005 1999-08-03  Nathan Sidwell  <nathan@acm.org>
5006
5007         * class.c (duplicate_tag_error): Preserve template information.
5008
5009 1999-08-03  Nathan Sidwell  <nathan@acm.org>
5010
5011         * decl.c (start_enum): Show location of previous definition.
5012         * parse.y (enumlist_opt): New reduction.
5013         (structsp): Simplify enum rules to use enumlist_opt.
5014
5015 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
5016
5017         * lex.c (yyprint): Handle PFUNCNAME.
5018
5019         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
5020         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
5021
5022 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
5023
5024         * decl.c (start_decl): Set attributes before duplicate_decls call.
5025
5026 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
5027
5028         * Make-lang.in (CXX_SRCS): Add dump.c.
5029         * Makefile.in (CXX_OBJS): Add dump.o.
5030         (dump.o): New target.
5031         * cp-tree.h (DECL_CONV_FN_P): Document.
5032         (DECL_OVERLOADED_OPERATOR_P): New function.
5033         (TYPE_PTRMEM_CLASS_TYPE): New macro.
5034         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5035         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
5036         (ASM_VOLATILE_P): New macro.
5037         (STMT_LINENO): Likewise.
5038         (cp_namespace_decls): New function.
5039         (dump_node_to_file): New function.
5040         * decl.c (cp_namespace_decls): New function.
5041         (walk_namespaces_r): Use it.
5042         (wrapup_globals_for_namespace): Likewise.
5043         * decl2.c (flag_dump_translation_unit): New variable.
5044         (lang_decode_option): Handle -fdump-translation-unit.
5045         (finish_file): If flag_dump_translation_unit is set, dump the
5046         translation unit.
5047         * dump.c: New file.
5048         * lang-options.h: Add -fdump-translation-unit.
5049         * pt.c (tsubst_template_parms): Robustify.
5050         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
5051         (tsubst_expr): Use STMT_LINENO.
5052         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
5053         for invalid cv-qualifiers even while building templates.
5054         
5055 1999-08-02  Richard Henderson  <rth@cygnus.com>
5056
5057         * call.c: Include defaults.h instead of expr.h.
5058         * decl.c: Likewise.
5059         * pt.c: Likewise.
5060         * typeck.c: Include defaults.h.
5061
5062 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
5063
5064         * lex.c (errorcount, sorrycount): Don't declare.
5065         * repo.c (errorcount, sorrycount): Likewise.
5066         * typeck2.c (errorcount, sorrycount): Likewise.
5067
5068 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
5069
5070         * call.c (convert_default_arg, build_over_call): Change all uses of
5071         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
5072         Ensure expr.h is included.
5073         * decl.c (grokparams): Ditto.
5074         * pt.c (tsubst_decl): Ditto.
5075         * typeck.c (convert_arguments): Ditto.
5076
5077 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
5078
5079         * class.c (mark_overriders): Fix order of args to overrides.
5080         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
5081         functions with the same name.
5082
5083 1999-08-02  Richard Henderson  <rth@cygnus.com>
5084
5085         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
5086
5087 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
5088
5089         * call.c (build_conditional_expr): Fix typo in comment.
5090
5091 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
5092
5093         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
5094         case_stack; use in_control_zone_p.
5095         * typeck.c (c_expand_return): Likewise.
5096
5097 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
5098
5099         * except.c (catch_clauses): Delete declaration.
5100
5101 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
5102
5103         * call.c (build_conditional_expr): Call convert_from_reference to
5104         avoid reference/non-reference type confusion.  Fix typo.
5105
5106 1999-07-30  Richard Henderson  <rth@cygnus.com>
5107
5108         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
5109         * cp-tree.h (initializer_constant_valid_p): Remove.
5110
5111 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
5112
5113         * call.c (conditional_conversion): Don't build BASE_CONVs for
5114         conversions between things that have the same type.
5115         (build_conditional_expr): Tweak.
5116         (convert_like): Some BASE_CONVs really do require the generation
5117         of code.
5118         
5119         * init.c (perform_member_init): Don't go through build_modify_expr
5120         for simple initializations.
5121
5122 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
5123
5124         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
5125         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
5126         virtual functions and MI.  Simplify.
5127
5128         * method.c: Remove prototype for largest_union_member.
5129         * pt.c (determine_specialization): Fix uninitialized warning.
5130         * lex.c (real_yylex): Likewise.
5131
5132 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
5133
5134         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
5135         here too.
5136
5137         * cp-tree.h (BINFO_VIRTUALS): Document new format.
5138         * class.c (modify_one_vtable): Change prototype accordingly.
5139         (modify_all_vtables): Likewise.
5140         (modify_all_direct_vtables): Likewise.
5141         (modify_all_indirect_vtables): Likewise.
5142         (build_vtable_entry_for_fn): New function.
5143         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
5144         (modify_vtable_entry): Likewise.
5145         (add_virtual_function): Likewise.
5146         (build_vtbl_initializer): New function.
5147         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
5148         (fixup_vtable_deltas1): Likewise.
5149         (fixup_vtable_deltas): Likewise.
5150         (override_one_vtable): Likewise.
5151         (finish_struct_1): Likewise.
5152
5153         * error.c (dump_expr): Likewise.
5154         * search.c (get_abstract_virtuals_1): Likewise.
5155         (get_abstract_virtuals): Likewise.
5156         (expand_upcast_fixups): Likewise.
5157         * tree.c (debug_binfo): Likewise.
5158         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
5159         __pure_virtual here.
5160         
5161 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
5162
5163         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
5164         as per 1999-07-26 change.
5165
5166         * typeck.c (c_sizeof): Don't allow non-static data members.
5167         (expr_sizeof): Likewise.
5168
5169 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
5170
5171         * input.c (feed_input): Only touch lineno and input_filename
5172         if !USE_CPPLIB.  Save the old values before setting the new ones.
5173
5174         * input.c (feed_input): Add file, line parms.
5175         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
5176         (real_yylex): Check linemode before input_redirected().
5177
5178         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
5179         from op new to warning.
5180
5181 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
5182
5183         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
5184         * call.c: All uses changed.
5185         * typeck.c: Likewise.
5186
5187 1999-07-26  Nathan Sidwell  <nathan@acm.org>
5188
5189         * exception.cc (__cplus_type_matcher): Match __eh_matcher
5190         prototype.
5191
5192 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
5193
5194         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
5195         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
5196         (strip_top_quals): Declare.
5197         (ncp_convert): Likewise.
5198         (type_after_usual_arithmetic_converions): Likewise.
5199         (composite_pointer_type): Likewise.
5200         * call.c (strip_top_quals): Don't make it static.
5201         (promoted_arithmetic_type_p): New function.
5202         (conditional_conversion): Likewise.
5203         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
5204         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
5205         for converting a type to itself.
5206         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
5207         (implicit_conversion): Make sure the from and to types are
5208         complete.
5209         (add_builtin_candidate): Correct handling of ?: operator.
5210         (add_builtin_candidates): Improve documentation.
5211         (build_conditional_expr): New function.
5212         (can_convert): Implement in terms of can_convert_arg.
5213         (ncp_convert): New function.
5214         * typeck.c (type_after_usual_arithmetic_conversions): New
5215         function, split out from common_type.
5216         (composite_pointer_type): New function, split out from
5217         build_conditional_expr.
5218         (common_type): Use type_after_usual_arithmetic_conversions.
5219         Remove redundant attribute merging.
5220         (comptypes): Tidy.  Handle COMPLEX_TYPE.
5221         (build_binary_op_nodefault): Use null_ptr_cst_p.
5222         (build_conditional_expr): Remove.
5223         (convert_for_assignment): Use new conversion functions.
5224         
5225         * cp-tree.h (abstract_virtuals_error): Change declaration.
5226         * typeck2.c (abstract_virtuals_error): Check to see if an error
5227         ocurred, and return a boolean value accordingly.
5228         (build_functional_cast): Adjust accordingly.
5229         * class.c (finish_struct_1): Likewise.
5230         * cvt.c (ocp_convert): Likewise.
5231         * decl.c (cp_finish_decl): Likewise.
5232         (grokparams): Likewise.
5233         (grok_op_properties): Likewise.
5234         (start_function): Likewise.
5235         * init.c (build_new_1): Likewise.
5236
5237         * pt.c (unify): Don't get confused by pointers-to-member functions.
5238
5239         * search.c (build_cplus_new): Robustify.
5240         
5241 1999-07-24  Richard Henderson  <rth@cygnus.com>
5242
5243         * gxx.gperf (__builtin_va_arg): New.
5244         * parse.y (VA_ARG): New token.
5245         (unary_expr): Recognize it.
5246
5247 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
5248
5249         * g++FAQ.texi: Deleted per Joe Buck's request.
5250         * Makefile.in: Corresponding changes.
5251
5252 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
5253
5254         * lex.c: Sync with C frontend.
5255         (whitespace_cr): New fn.
5256         (skip_white_space): Use it.
5257         (init_parse): Reorder.
5258         (yyprint): Support CONSTANT.
5259         (pragma_getc, pragma_ungetc): Bring back.
5260         (read_line_number): Change in_system_header directly.
5261         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
5262         (parse_float): Update to C version.
5263         (yylex): Handle '$' under the letter case.
5264         Remove looking_for_typename handling.
5265         Support hex floating point constants.
5266         Follow C's lead for choosing type of integer constants.
5267         Rearrange stuff to match C frontend.
5268         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
5269         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
5270
5271 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
5272
5273         * call.c (reference_binding): Tweak.
5274         (mayble_handle_implicit_object): Use direct_reference_binding to
5275         create the right implicit conversion sequence.
5276
5277 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
5278
5279         * pt.c (convert_nontype_argument): Don't call decl_constant_value
5280         if we're converting to a reference type.
5281
5282         * call.c (NEED_TEMPORARY_P): New macro.
5283         (standard_conversion): Set it, for derived-to-base conversions.
5284         (reference_related_p): New function.
5285         (reference_compatible_p): Likewise.
5286         (convert_class_to_reference): Likewise.
5287         (direct_reference_binding): Likewise.
5288         (reference_binding): Rework for standards-compliance.
5289         (convert_like): Adjust accordingly.
5290         (maybe_handle_ref_bind): Simplify; the right conversion sequences
5291         are now built up in reference_binding.
5292         (initialize_reference): New function.
5293         * cp-tree.h (ICS_USER_FLAG): Document.
5294         (ICS_THIS_FLAG): Likewise.
5295         (ICS_BAD_FLAG): Likewise.
5296         (NEED_TEMPORARY_P): Likewise.
5297         (cp_lvalue_kind): New type.
5298         (real_lvalue_p): Return it.
5299         * error.c (dump_expr): Provide more accurate representation for
5300         AGGR_INIT_EXPRs.
5301         * init.c (expand_default_init): Do not try to perform implicit
5302         conversions for a brace-enclosed initializer.
5303         * search.c (lookup_conversions): Document.
5304         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
5305         appropriately.
5306         (real_lvalue_p): Adjust accordingly.
5307         (lvalue_p): Likewise.
5308         (build_cplus_new): Don't allow the creation of an abstract class.
5309         * typeck.c (convert_for_initialization): Use initialize_reference.
5310         
5311 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
5312
5313         * lex.c (real_yylex) : Correct the test for overflow when lexing
5314         integer literals.
5315
5316 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
5317
5318         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
5319         not DECL_BUILT_IN, to determine if a function is internally declared.
5320         (duplicate_decls): Likewise.  Improve handling of builtins.
5321         (push_overloaded_decl): Remove special handling of builtins.
5322
5323         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
5324
5325         * decl.c (grokdeclarator): Pull out decl_constant_value in
5326         templates, too.
5327
5328         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
5329         * cp-tree.h, pt.c, semantics.c: Adjust.
5330         * method.c (largest_union_member): Remove.
5331
5332         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
5333
5334         * lex.c (token_getch, token_put_back): New fns.
5335         (real_yylex): Use them.
5336
5337         * lex.c (lang_init): Generalize.
5338         (lang_init_options): Tell cpplib this is C++.
5339         (nextchar): Remove.  Replace uses with put_back.
5340         (skip_white_space): Handle linemode here.  Optimize for cpplib.
5341         (extend_token_buffer_to): New fn.
5342         (extend_token_buffer): Use it.
5343         (read_line_number, check_newline): Just deal with tokens.
5344         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
5345         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
5346         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
5347         * parse.y (PAREN_STAR_PAREN): Remove.
5348         * input.c: Don't use the putback machinery with cpplib.
5349         (sub_getch): Fold back into getch.
5350         (getch): Don't handle linemode here.
5351         (feed_input): Unget any text in the token buffer.
5352
5353         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
5354         nextyychar, nextyylval): Remove.
5355
5356 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
5357             Jason Merrill  <jason@yorick.cygnus.com>
5358
5359         * lex.c (indent_level): New variable.
5360         (init_parse): Set cpp_token to CPP_DIRECTIVE.
5361         (consume_string): Make this smart about USE_CPPLIB.
5362         (yyungetc): Use put_back function.
5363         (pragma_getc, pragma_ungetc): Functions deleted.
5364         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
5365         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
5366         pragma_ungetc.
5367         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
5368         Also, clean up cases where we redundantly set token_buffer[0].
5369         (read_line_number): New fn.
5370         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
5371         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
5372         (sub_getch): Conditionalize out code that's not appropriate if
5373         USE_CPPLIB.
5374         (put_back): Rewrite in case USE_CPPLIB is defined.
5375         (input_redirected): Ditto.
5376
5377 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
5378
5379         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
5380         c_global_trees and accessor macros defined in c-common.h.
5381         (cp_tree_index): New enumeration.
5382         (cp_global_trees): Declare new array.  Add accessor macros for it, and
5383         delete declarations of tree nodes replaced by it.
5384         (builtin_function): Delete macro, add declaration for new function.
5385         Include c-common.h.
5386         * decl.c: Delete definitions for tree nodes that were replaced by
5387         cp_global_trees and c_global_trees.
5388         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
5389         to generate the common builtins here.
5390         (builtin_function): New function.
5391         * decl2.c (abort_fndecl): Delete declaration.
5392         * except.c (expand_builtin_return_address): Delete declaration.
5393         (builtin_return_address_fndecl): Delete variable.
5394         (const_ptr_type_node): Delete declaration.
5395         * lex.c (cons_up_default_function): Delete declaration of
5396         void_list_node.
5397         * parse.y (void_list_node): Delete declaration.
5398         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
5399         Delete variables.
5400         (const_string_type_node): Delete declaration.
5401         * search.c (abort_fndecl): Delete declaration.
5402         * Makefile.in: Update dependencies.
5403
5404 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
5405
5406         * pt.c (check_default_tmpl_args): Move test for missing default
5407         arguments here, from ...
5408         (end_template_parm_list): Here.
5409
5410 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
5411
5412         * decl.c (lookup_nested_type): Remove.
5413         (pushtag): Don't call it.
5414
5415 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
5416
5417         * Makefile.in (INTERFACE): Bump to 2.
5418
5419 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
5420         
5421         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
5422         instructions to gcc.gnu.org.  Removed e-mail address.
5423
5424 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
5425
5426         * pt.c (determine_specialization): Tighten error-checking.
5427         (end_template_parm_list): Likewise.
5428
5429 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
5430
5431         * pt.c (check_default_tmpl_args): Handle friends defined in the
5432         class just like member functions defined in the class.
5433
5434 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
5435             Jason Merrill  <jason@yorick.cygnus.com>
5436
5437         * cp-tree.h (struct lang_decl): Added field for storing sorted
5438         FIELD_DECLs (used in TYPE_DECLs).
5439         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
5440         (DECL_SORTED_FIELDS): New macro.
5441         * class.c (method_name_cmp): New function.
5442         (finish_struct_methods): Modified to support sorting and searching
5443         methods.
5444         (finish_struct_anon): Changed code in inner loop to use ELT rather 
5445         than UELT (which required an extra indirection for every reference).
5446         (field_decl_cmp): New function to support sorting FIELD_DECLs.
5447         (finish_struct_1): Sort fields.
5448         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
5449         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
5450         Also, switch to using array indexing rather than a changing pointer.
5451         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
5452         DECL_SORTED_FIELDS.
5453
5454 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
5455
5456         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
5457         casts in system headers or extern "C" blocks.
5458
5459         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
5460         errors to pedwarn.
5461
5462 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
5463
5464         * decl2.c (write_virtuals): Deleted declaration.
5465         * cp-tree.h (write_virtuals): Deleted extern declaration.
5466         * class.c (finish_struct_1): Removed #if 0'd code that mentions
5467         write_virtuals.
5468         * semantics.c (begin_class_definition): Rewrite code to not depend
5469         on write_virtuals.
5470
5471         * lex.c (cp_pragma_interface): New function.
5472         (cp_pragma_implementation): Likewise.
5473         (handle_cp_pragma): Call them.
5474
5475         * typeck.c (comptypes): Simplify C code in look_hard.
5476
5477         * xref.c (PALLOC): Use xcalloc, not calloc.
5478         (SALLOC): Use xmalloc, not malloc.
5479
5480         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
5481
5482         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
5483         is NO_DEBUG.
5484
5485         * decl.c (duplicate_decls): If a redeclaration doesn't match the
5486         initial declaration, then don't save the inline info and by all
5487         means don't mark the function as a builtin function.
5488
5489         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
5490         CURRENT_CLASS_TYPE is 0.
5491
5492         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
5493         NULL_TREE.
5494
5495         * ptree.c (print_lang_type): Added vtable-needs-writing.
5496
5497 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
5498
5499         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
5500
5501 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
5502
5503         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
5504         Merged into c-common.
5505
5506 1999-07-05  Dave Brolley  <brolley@cygnus.com>
5507
5508         * lex.c (errorcount): Declare it.
5509         (finish_parse): Update errorcount for when using CPPLIB.
5510
5511 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
5512
5513         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
5514         parameters.
5515         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
5516         * decl.c (push_class_binding): Use it.
5517         (lookup_name_real): Likewise.
5518
5519 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
5520
5521         * cp-tree.h (widest_integer_literal_type_node,
5522         widest_unsigned_literal_type) : New.
5523         * decl.c (widest_integer_literal_type_node,
5524         widest_unsigned_literal_type) : New.
5525         (init_decl_processing): Handle/use the two new types.
5526         * lex.c (real_yylex): Same.
5527         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
5528         Same. 
5529
5530 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
5531
5532         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
5533         to anonymous cv-qualified types.
5534
5535 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
5536
5537         * lex.c (real_yylex) : Change integer literal overflow handling to
5538         be like c-lex.c.
5539
5540         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
5541
5542 1999-06-28  Richard Henderson  <rth@cygnus.com>
5543
5544         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
5545
5546 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
5547
5548         * error.c (dump_type_real): Handle TREE_LIST again.
5549
5550         * typeck.c (comp_target_parms): Don't complain about 
5551         converting from () to (...) if !flag_strict_prototype.
5552
5553         * decl.c (grokdeclarator): Update the names of all variants when
5554         de-anonymizing.
5555
5556 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
5557
5558         * init.c (expand_aggr_vbase_init): Rename to
5559         construct_virtual_bases.  Conditionalize construction here, 
5560         rather than ...
5561         (emit_base_init): Here.
5562
5563 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
5564
5565         * semantics.c (finish_asm_stmt): Apply decay conversions to
5566         input operands.
5567
5568         * decl.c (expand_static_init): When building an anonymous function
5569         for use with atexit, compute its body before and after entering
5570         the function.
5571
5572         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
5573         EXIT_EXPR.
5574         
5575 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
5576
5577         * init.c (expand_aggr_vbase_init): Add flag parameter.
5578         (build_partial_cleanup_for): Remove, inlining into ..
5579         (expand_cleanup_for_base): ... here.  Take flag parameter.
5580         (emit_base_init): Pass the in_chrg parameter to
5581         emit_aggr_vbase_init. 
5582         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
5583         
5584 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
5585
5586         * decl2.c (import_export_decl): Use same_type_p, rather than
5587         relying on pointer-equality for types.
5588
5589         * method.c (do_build_copy_constructor): Simplify.
5590
5591         * call.c (build_method_call): Remove bogus code for two-argument
5592         delete.
5593         * init.c (build_new_1): Expand on comment, and remove dead code.
5594
5595         * init.c (expand_cleanup_for_base): New function, split out
5596         from ...
5597         (emit_base_init): Here.
5598         (expand_aggr_vbase_init): Use it.
5599
5600 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
5601
5602         * cp-tree.h (class_cache_firstobj): Declare.
5603         (maybe_push_cache_obstack): Rename to push_cache_obstack.
5604         * class.c (permanent_obstack): Remove declaration.
5605         (class_cache_firstobj): Make it global.
5606         (add_method): Don't use permanent_obstack directly.
5607         (pushclass): Only free the class_cache_obstack if we know how far
5608         back to free it.
5609         (maybe_push_cache_obstack): Rename to push_cache_obstack.
5610         * decl.c: Remove dead comment.
5611         (saved_scope): Add class_cache_firstobj.
5612         (push_to_top_level): Save it.
5613         (pop_from_top_level): Restore it.
5614         (push_class_level_binding): Use push_cache_obstack, not
5615         maybe_push_cache_obstack.
5616         * search.c (push_class_decls): Likewise.
5617         
5618 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5619
5620         * pt.c (tsubst_friend_function): Push into namespace of friend
5621         function before pushdecl'ing it.
5622
5623 1999-06-14  Nathan Sidwell  <nathan@acm.org>
5624
5625         * call.c (build_new_op): Remove REF_BIND from all operands.
5626
5627 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
5628
5629         * init.c (build_new_1): Look up operator delete even if there was
5630         no explicit new placement.
5631
5632 1999-06-08  Nathan Sidwell  <nathan@acm.org>
5633
5634         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
5635         of ...
5636         (build_throw): ... here. Call it.
5637         (process_start_catch_block): Call it.
5638
5639 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
5640
5641         * search.c (convert_pointer_to_single_level): Reimplement without
5642         using get_binfo.
5643
5644 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
5645
5646         * method.c (is_back_referenceable_type): Back-reference bools when
5647         not squangling.
5648
5649 1999-06-07  Dave Brolley  <brolley@cygnus.com>
5650
5651         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
5652         * input.c (putback_buffer): New structure type.
5653         (putback): Replaces putback_char member.
5654         (putback): Replaces putback_char static variable.
5655         (feed_input): Use putback.
5656         (end_input): Use putback.
5657         (sub_getch): Use putback.
5658         (put_back): Use putback.
5659
5660 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
5661
5662         * decl.c (grokdeclarator): Fix typo in last change.
5663
5664 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
5665
5666         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
5667         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
5668
5669 1999-06-04  Nathan Sidwell  <nathan@acm.org>
5670
5671         * except.c (build_throw): Check throw expression validity.
5672
5673 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
5674
5675         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
5676         just because flag_signed_bitfields is false.
5677
5678 1999-06-03  Nathan Sidwell  <nathan@acm.org>
5679
5680         * semantics.c (begin_class_definition): Update the struct's
5681         location here ...
5682         * class.c (finish_struct): ... rather than here.
5683
5684         * decl.c (make_typename_type): Don't rely on uninitialized
5685         variable.
5686
5687 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5688
5689         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
5690
5691 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
5692
5693         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
5694         and friends rather than messing with current_obstack directly.
5695         (cp_build_qualified_type_real): Rework ARRAY_TYPE
5696         allocation to match practice throughout the rest of the 
5697         compiler.
5698
5699 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
5700
5701         * lex.c (make_lang_type): Create TYPE_BINFO for
5702         TEMPLATE_TYPE_PARMs just like for non-template types.
5703
5704         * decl.c (start_decl): Move checks on initialization to ...
5705         (cp_finish_decl): Here.  Tidy formatting slightly.
5706
5707 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
5708
5709         * decl.c (add_binding): Don't complain about a redeclaration of a
5710         semantically identical typedef in a local scope.
5711
5712 1999-05-28  Nathan Sidwell  <nathan@acm.org>
5713
5714         * decl.c (complete_array_type): Allocate off same obstack. Fix
5715         DO_DEFAULT comment to match reality.
5716
5717         * friend.c (make_friend_class): Fix diagnostic typo.
5718
5719 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
5720
5721         * decl.c (lookup_namespace_name): Handle getting a
5722         TEMPLATE_ID_EXPR.
5723         (expand_static_init): Don't call pushdecl for implicitly declared
5724         `atexit' used to register destructors.
5725
5726 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
5727
5728         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
5729         intialize a vtable.
5730
5731         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
5732         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
5733         by combining TEMPLATE_INFO and LEVEL into a single union.
5734         (DECL_TEMPLATE_INFO): Reformat.
5735         (DECL_SAVED_TREE): Document.
5736         (DECL_TEMPLATE_INJECT): Remove.
5737         * class.c (finish_struct): Remove code to deal with
5738         DECL_TEMPLATE_INJECT. 
5739
5740         * decl.c (maybe_process_template_type_declaration): Handle all new
5741         types in templates uniformly.
5742         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
5743         DECL_CONTEXT.
5744         * pt.c (lookup_template_class): Inject template instantiations of
5745         forward-declarations.
5746         (instantiate_class_template): Remove code processing
5747         DECL_TEMPLATE_INJECT.
5748         
5749         * pt.c (lookup_template_class): Tweak lookup to find member
5750         templates.
5751
5752         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
5753         ASM_CV_QUAL.
5754         * semantics.c (finish_asm_stmt): Make strings permanent if they're
5755         used in a template.
5756         
5757 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
5758
5759         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
5760         parts of pointer to data member types.
5761
5762 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
5763
5764         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
5765         and then make it look like `abort'.  Just use `abort' instead.
5766         
5767         * typeck.c (build_static_cast): Don't allow static_casts that cast
5768         away constness.
5769         (casts_away_constness_r): New function.
5770         (casts_away_constness): Likewise.
5771
5772         * decl.c (lookup_tag): Remove code no longer needed after
5773         name-lookup improvements.
5774         * decl2.c (handle_class_head): Make error-recovery more robust.
5775         * friend.c (make_friend_class): Reject templated typename types.
5776         * lex.c (is_global): A template parameter isn't global.
5777         * parse.y (class_head): Robustify.
5778         * parse.c: Regenerated.
5779         
5780 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
5781
5782         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
5783         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
5784         
5785         * cp-tree.h (push_nested_namespace): Declare.
5786         (pop_nested_namespace): Likewise.
5787         * decl.c (push_nested_namespace): New function.
5788         (pop_nested_namespace): Likewise.
5789         * pt.c (instantiate_class_template): Use them.
5790
5791         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
5792
5793         * cp-tree.h (cplus_expand_constant): Declare.
5794         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
5795         converted from one pointer-to-object type to another.
5796         * expr.c (cplus_expand_constant): Don't make it static.
5797         * typeck.c (build_component_ref): Don't crash when presented with
5798         a component which is a TEMPLATE_DECL.
5799         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
5800         cast from a pointer-to-member constant to its own type does not
5801         result in a valid non-type template argument.
5802
5803 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
5804             Nathan Sidwell  <nathan@acm.org>
5805         
5806         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
5807         * cp-tree.h: Fix typo in documentation on pointers-to-members.
5808         (cp_build_qualified_type): Make it a macro.
5809         (cp_build_qualified_type_real): Declare.
5810         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
5811         problem with template parameters and restrict-qualification.
5812         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
5813         * hash.h: Regenerated.
5814         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
5815         the enumeration.
5816         (NORID): Remove definition.
5817         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
5818         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
5819         (fn_type_unification): Check that the function type resulting from
5820         the deduction is legal.
5821         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
5822         (unify): Use cp_build_qualified_type_real.
5823         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
5824         (cp_build_qualified_type): Rename to ...
5825         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
5826         and modify appropriately.
5827         
5828         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
5829         reveal optimization opportunities.
5830
5831         * pt.c (tsubst): Don't issue error messages when we're not
5832         complaining, even if we see a qualified function type.
5833         (check_cv_quals_for_unify): Don't allow a qualified function
5834         type.
5835
5836 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
5837
5838         * class.c (instantiate_type): Downgrade errors for object-dependent
5839         memfn refs to pedwarn.
5840
5841 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
5842
5843         * decl.c (grokdeclarator): Don't treat [] as indicating a
5844         zero-sized array in a typedef.
5845
5846         * call.c (build_object_call): Don't look at DECL_NAME for a type.
5847         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
5848         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
5849
5850         * pt.c (for_each_template_parm): Rework to match documentation.
5851         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
5852
5853 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
5854
5855         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
5856
5857         * class.c (finish_base_struct): Allow non-COM bases for COM classes
5858         except at the leftmost position.
5859         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
5860         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
5861         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
5862
5863         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
5864         (build_cplus_new): Make sure that what we return is of the right type.
5865
5866 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
5867
5868         * cp-tree.h (make_ptrmem_cst): New function.
5869         * expr.c (cplus_expand_constant): Split out from ...
5870         (cplus_expand_expr): Here.  Use cplus_expand_constant.
5871         (init_cplus_expand): Set lang_expand_constant.
5872         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
5873
5874         * tree.c (make_ptrmem_cst): Define.
5875         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
5876         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
5877
5878 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
5879
5880         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
5881
5882         * decl2.c (start_static_storage_duration_function): Fix comment.
5883         (finish_file): Create static storage duration functions lazily.
5884
5885 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
5886
5887         Implement anonymous structs.
5888         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
5889         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
5890         * class.c (finish_struct_1): Remove redundant check for anon struct.
5891         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
5892         (check_tag_decl): Check for anonymous struct here.
5893         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
5894         * init.c (sort_member_init, emit_base_init): Handle getting fields
5895         as well as names in current_member_init_list.
5896         (perform_member_init): Handle getting an anon aggr.
5897         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
5898         (do_build_copy_constructor): Likewise.
5899
5900 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
5901
5902         * tree.c (cp_build_qualified_type): Don't allow qualified function
5903         types.
5904
5905 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
5906
5907         * gxxint.texi: Fix typo.
5908
5909 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
5910
5911         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
5912         * class.c (finish_struct_1): Use CLASS_TYPE_P.
5913         * ptree.c (print_lang_type): Likewise.
5914         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
5915         IS_AGGR_TYPE_CODE.
5916         * typeck2.c (digest_init): Likewise.
5917
5918 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
5919
5920         * call.c (joust): Compare the types of the conv ops, not the
5921         target types of the conversions.
5922
5923 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5924
5925         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
5926         was not given.
5927
5928 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
5929
5930         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
5931         * decl.c (grokfndecl): Don't allow inline declarations of friend
5932         template specializations, or friend template specializations with
5933         default arguments.
5934         * pt.c (tsubst): Handle substitution into array types that does
5935         not yield a fixed upper bound, even when not processing a
5936         template.
5937         (tsubst_copy): Deal with the fact that the second operand to a
5938         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
5939         * search.c (marked_pushdecls_p): Don't descend into
5940         TEMPLATE_TYPE_PARMs and the like.
5941         (unmarked_pushdecls_p): Likewise.
5942         
5943         * call.c (build_over_call): Don't throw away
5944         initializations/copies of empty classes; use MODIFY_EXPR and
5945         INIT_EXPR as for non-empty classes.
5946         * class.c (finish_struct_1): Put the padding byte for an empty
5947         class on the TYPE_NONCOPIED_PARTS list for the class.
5948
5949 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
5950
5951         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
5952         indicate a reference to a field that is a qualified name.
5953
5954 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
5955
5956         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
5957         ASM_OUTPUT_CONSTRUCTOR.
5958
5959         * friend.c (do_friend): Add attrlist arg.  Remove support for
5960         getting a non-decl as 'decl'.
5961         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
5962         rtl.
5963         (grokdeclarator): Adjust.
5964         * cp-tree.h: Adjust.
5965
5966 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
5967
5968         * cp-tree.h (permanent_p): New function.
5969         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
5970         possibly complex tree node.
5971         * tree.c (mapcar): Adjust comments, and follow coding standards in
5972         conditional.
5973         (permanent_p): New function.
5974
5975 1999-05-13  Per Bothner  <bothner@cygnus.com>
5976
5977         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
5978         primitive Java types, if we actually see `extern "Java"'.
5979
5980 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5981
5982         * lang-specs.h: Pass -$ to the preprocessor.
5983
5984 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
5985
5986         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
5987         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
5988         (resolve_offset_ref): Don't handle a raw baselink.
5989         * cvt.c (build_expr_type_conversion): Likewise.
5990         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
5991         convert_for_initialization): Likewise.
5992         * class.c (instantiate_type): Handle seeing a baselink under an
5993         OFFSET_REF.
5994         * error.c (dump_expr): Likewise.        
5995         * pt.c (for_each_template_parm): Likewise.
5996         (resolve_overloaded_unification): Likewise.
5997         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
5998         * typeck.c (expr_sizeof): Also complain about other permutations
5999         of overloaded functions.
6000
6001 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
6002
6003         * init.c (resolve_offset_ref): Don't return a raw method.
6004         Use BASELINK_P.
6005         * typeck.c (decay_conversion): Don't handle a raw method.
6006         Resolve all OFFSET_REFs.
6007         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
6008         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
6009         same_type_p for pmf bits.  Don't use build_binary_op to compare
6010         raw pointers to methods.
6011         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
6012         to decide when to call resolve_offset_ref.
6013         (build_c_cast, convert_for_initialization): Likewise.
6014         * cvt.c (build_expr_type_conversion): Likewise.
6015
6016 1999-05-06  Nathan Sidwell  <nathan@acm.org>
6017
6018         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
6019
6020 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
6021
6022         * decl2.c (start_objects): Don't let static constructors and
6023         destructors get inlined.
6024
6025         * parse.y (nested_name_specifier): Make sure ordinary types are
6026         complete, just like template types.
6027         * parse.c: Regenerated.
6028
6029         * pt.c (check_explicit_specialization): Improve error messages.
6030
6031 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6032
6033         * typeck.c (string_conv_p): Use same_type_p to check whether we
6034         try to convert between char and wchar_t.
6035
6036 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
6037
6038         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
6039         lookup to error_mark_node here.
6040         (lookup_member): Revise documentation.  Add comments.  Don't set
6041         the TREE_TYPE to error_mark_node here, and don't build up an extra
6042         TREE_LIST for ambiguous lookups.
6043         (setup_class_bindings): Adjust accordingly.
6044         (push_class_decls): Revise out-of-date comments.
6045         
6046         * typeck.c (build_const_cast): Tighten checks for legality.
6047
6048 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6049
6050         * init.c (build_member_call): Lookup names coming from
6051         namespace-scoped LOOKUP_EXPR.
6052
6053 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
6054
6055         * gxxint.texi: Add documentation for 'I'.
6056
6057 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6058
6059         * tinfo.cc (operator==): Qualify type_info with std::.
6060
6061 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
6062
6063         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
6064         (DECL_COMDAT): Remove definition.
6065
6066 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
6067
6068         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
6069         change.
6070
6071 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
6072
6073         * class.c (build_vtable): Use build_lang_decl when building
6074         vtables, not just build_decl.
6075         (prepare_fresh_vtable): Likewise.
6076         * decl.c (wrapup_globals_for_namespace): Mark vtables as
6077         DECL_EXTERNAL when calling wrapup_global_declarations.
6078         * decl2.c (priority_info_s): Add initializations_p and
6079         destructions_p members.
6080         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
6081         when deciding what vtables to write out.
6082         (ssdf_decls): New variable.
6083         (ssdf_decls_used): Likewise.
6084         (start_static_storage_duration_function): Deal with being called
6085         multiple times.  Avoid inlining this function.
6086         (generate_inits_for_priority): Deal with reuse of priority map.
6087         (get_priority_info): Clear initializations_p and destructions_p.
6088         (do_static_initialization): Tweak comment.
6089         (do_static_destruction): Likewise.  Fix condition on sentries for
6090         destruction.
6091         (generate_ctor_or_dtor_function): Call all of the static storage
6092         duration functions.
6093         (generate_ctor_or_dtor_function_for_priority): Check
6094         initializations_p and destructions_p to see what priorities need
6095         initialization functions.
6096         (finish_file): Rework to generate multiple static storage duration
6097         functions, rather than just one.
6098
6099         * typeck.c (build_const_cast): Tweak last change to handle
6100         templates correctly.
6101
6102         * typeck.c (build_const_cast): Disallow use of const_cast to
6103         anything but a pointer or reference type.
6104
6105 1999-04-30  Nathan Sidwell  <nathan@acm.org>
6106
6107         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
6108         signature type.
6109
6110 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
6111
6112         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
6113         (finish_file): Indent comments properly.
6114
6115 1999-04-29  Richard Henderson  <rth@cygnus.com>
6116
6117         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
6118         (do_static_destruction): Likewise.
6119
6120 1999-04-29  Nathan Sidwell  <nathan@acm.org>
6121
6122         * cp-tree.h (TYPE_NOTHROW_P): New macro.
6123         * decl2.c (delete_sanity): Warn on deleting void *.
6124         * init.c (build_new_1): Use TYPE_NOTHROW_P.
6125         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
6126         throwing operator new.
6127
6128 1999-04-28  Nathan Sidwell  <nathan@acm.org>
6129
6130         * cp-tree.h (build_component_addr): Remove prototype.
6131         * typeck.c (build_component_addr): Make static. Remove MSG
6132         argument.
6133         (build_component_addr): Remove MSG parameter, clean up
6134         comment.
6135         (build_x_function_call): Use cp_error.
6136         (build_unary_op): Adjust call of build_component_addr.
6137
6138 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
6139
6140         * pt.c (tsubst_friend_class): Check for NULL.
6141
6142 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6143
6144         * search.c (binfo_for_vtable): Initialize bfvi.var.
6145
6146 1999-04-27  Nathan Sidwell  <nathan@acm.org>
6147
6148         * rtti.c (build_x_typeid): Check rtti is enabled.
6149
6150 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
6151
6152         * search.c (is_subobject_of_p): Make sure we're looking at the
6153         right baseclasses.
6154
6155 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
6156
6157         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
6158
6159 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
6160
6161         * decl2.c (finish_file): Tweak handling of extern inlines so that
6162         they are not unnecessarily put out.
6163
6164         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
6165         such as base classes.
6166
6167 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
6168
6169         * tree.c (build_exception_variant): Fix typo: use the chain of U,
6170         not trying V, while cycling through U.
6171
6172 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
6173
6174         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
6175         preserves_first_arg.  Enlarge dummy accordingly.
6176         (DECL_TINFO_FN_P): New macro.
6177         (SET_DECL_TINFO_FN_P): Likeiwse.
6178         (DECL_RETURNS_FIRST_ARG): Remove.
6179         (DECL_PRESERVES_THIS): Likewise.
6180         (DECL_INIT_PRIORITY): New macro.
6181         (finish_struct_1): Change prototype.
6182         (cat_namespace_levels): Remove prototype.
6183         (vtable_decl_p): New prototype.
6184         (vtype_decl_p): Likewise.
6185         (sigtable_decl_p): Likewise.
6186         (walk_globals_pred): New typedef.
6187         (walk_globals_fn): Likewise.
6188         (walk_globals): New prototype.
6189         (walk_namespaces_fn): New typedef.
6190         (walk_namespaces): New prototype.
6191         (wrapup_globals_for_namespace): Likewise.
6192         (walk_vtables): Remove prototype.
6193         (walk_sigtables): Likewise.
6194         (instantiate_pending_templates): New prototype.
6195         * class.c (finish_struct_1): Don't return a value.
6196         * decl.h (pending_statics): Remove declaration.
6197         * decl.c (walk_namespaces_r): New function.
6198         (walk_globals_r): Likewise.
6199         (vtable_decl_p): Likewise.
6200         (vtype_decl_p): Likewise.
6201         (sigtable_decl_p): Likewise.
6202         (walk_namespaces): Likewise.
6203         (walk_globals_data): New type.
6204         (walk_globals): New function.
6205         (wrapup_globals_for_namespace): Likewise.
6206         (expand_static_init): Remove assertion.  Remove redundancy in
6207         conditional.  Don't put static data members in static_aggregates
6208         Tidy.
6209         (finish_function): Remove redundancy in conditional.  Don't set
6210         DECL_RETURNS_FIRST_ARG.
6211         (cat_namespace_levels): Remove.
6212         * decl2.c: Include splay-tree.h and varray.h.
6213         (priority_info_s): New structure.
6214         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
6215         conventions.
6216         (prune_vtable_vardecl): Likewise.
6217         (finish_sigtable_vardecl): Likewise.
6218         (setup_initp): Remove.
6219         (do_dtors): Remove.
6220         (do_ctors): Remove.
6221         (start_static_storage_duration_function): New function.
6222         (generate_inits_for_priority): Likewise.
6223         (finish_static_storage_duration_function): Likewise.
6224         (get_priority_info): Likewise.
6225         (do_static_initialization): Likewise.
6226         (do_static_destruction): Likewise.
6227         (do_static_initialization_and_destruction): Likewise.
6228         (generate_ctor_or_dtor_function): Likewise.
6229         (generate_ctor_and_dtor_functions_for_priority): Likewise.
6230         (pending_statics): Make it a varray.
6231         (pending_statics_used): New variable.
6232         (saved_inlines): Make it a varray.
6233         (saved_inlines_used): New variable.
6234         (finish_static_data_member): Change method of updating
6235         pending_statics.
6236         (mark_inline_for_output): Remove #if 0'd code.  Change method of
6237         updating saved_inlines.
6238         (walk_vtables): Remove.
6239         (walk_sigtables): Likewise.
6240         (import_export_decl): Use DECL_TINFO_FN_P.
6241         (pending_templates): Remove declaration.
6242         (maybe_templates): Likewise.
6243         (static_aggregates_initp): Likewise.
6244         (setup_initp): Likewise.
6245         (finish_objects): Simplify.
6246         (INITIALIZE_P_IDENTIFIER): New macro.
6247         (PRIORITY_IDENTIFIER): New macro.
6248         (SSDF_IDENTIFIER): New macro.
6249         (initialize_p_decl): New variable.
6250         (priority_decl): Likewise.
6251         (ssdf_decl): Likewise.
6252         (priority_info_map): Likewise.
6253         (finish_file): Recode output of static intializers and other
6254         file-scope finalization tasks.
6255         * error.c (OB_END_TEMPLATE_ID): New macro.
6256         (dump_type_real): Use it.
6257         (dump_decl): Likewise.
6258         (dump_function_name): Likewise.
6259         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
6260         interface.
6261         (check_newline): Use walk_globals, not walk_vtables.
6262         * pt.c (pending_tempalte_expansions): Remove.
6263         (set_vardecl_interface_info): Likewise.
6264         (pending_templates): Make static.
6265         (maybe_templates): Likewise.
6266         (instantiate_class_template): Adjust call to finish_struct_1.
6267         (instantiate_pending_templates): New function.
6268         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
6269         * tree.c (static_aggregates_initp): Remove.
6270         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
6271         instead.
6272         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
6273
6274         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
6275         with the RTL code RETURN.
6276         * hash.h: Regenerated.
6277         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
6278         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
6279         * parse.c: Regenerated.
6280         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
6281         it.
6282         (inline_parm_levels): New variable.
6283         (inline_parm_levels_used): Likewise.
6284         (maybe_begin_member_template_processing): Update them.
6285         (maybe_end_member_template_processing): Use them, rather than
6286         guessing how many levels to pop.
6287
6288         * decl.c (make_typename_type): Tighten error-checking.
6289
6290 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
6291
6292         * cp-tree.h (build_binary_op): Remove unneeded parameter.
6293         * class.c (build_vrable_entry_ref): Adjust call to
6294         build_binary_op.
6295         * decl.c (expand_static_init): Likewise.
6296         (grokdeclarator): Likewise.
6297         (finish_function): Likewise.
6298         * decl2.c (delete_sanity): Likewise.
6299         (do_dtors): Likewise.
6300         (do_ctors): Likewise.
6301         * error.c (dump_type_suffix): Likewise.
6302         * expr.c (cplus_expand_expr): Likewise.
6303         * init.c (resolve_offset_ref): Likewise.
6304         (build_new): Likewise.
6305         (build_new_1): Likewise.
6306         (build_vec_delete_1): Likewise.
6307         (expand_vec_init_catch_clause): Likewise.
6308         (build_delete): Likewise.
6309         * pt.c (tsubst): Likewise.
6310         * rtti.c (synthesize_tinfo_fn): Likewise.
6311         * search.c (expand_upcast_fixups): Likewise.
6312         (expand_direct_vtbls_init): Likewise.
6313         * typeck.c (get_member_function_from_ptrfunc): Likewise.
6314         (build_binary_op_nodefault): Likewise.
6315         (point_int_sum): Likewise.
6316         (pointer_diff): Likewise.
6317         (build_unary_op): Likewise.
6318         (build_modify_expr): Likewise.
6319         (get_delta_difference): Likewise.
6320         (build_ptrmemfunc): Likewise.
6321         (expand_ptrmemfunc_cst): Likewise.
6322
6323 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
6324
6325         * decl.c (grokfndecl): Always call cplus_decl_attributes.
6326         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
6327
6328 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
6329
6330         * cp-tree.h (finish_static_data_member_decl): New function.
6331         * decl2.c (finish_static_data_member_decl): Split out from ...
6332         (grokfield): Here.
6333         * pt.c (instantiate_class_template): Use it here instead of
6334         trying to fake it.
6335         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
6336         finish_static_data_member_decl will do that.  Explicit set
6337         DECL_EXTERNAL to match non-template processing.
6338
6339 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
6340
6341         * cp-tree.h (finish_class_definition): Add parameter.
6342         * parse.y (structsp): Use it.  Don't call pop_scope here.
6343         * parse.c: Regenerated.
6344         * semantics.c (finish_class_definition): Pop it here.
6345
6346 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
6347
6348         * decl.c (xref_tag): Revise handling of nested template
6349         declarations.
6350         * pt.c (check_explicit_specialization): Tweak handling of friend
6351         templates in template classes.
6352         (tsubst_friend_class): Handle friend declarations for nested
6353         member template classes.
6354
6355 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
6356
6357         * class.c (finish_struct): Remove unused variable.
6358         (pushclass): Likewise.
6359         (invalidate_class_lookup_cache): Likewise.
6360         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
6361         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
6362         doesn't get obliterated.
6363         (make_typename_type): Handle template classes correctly.
6364
6365         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
6366         (storetags): Declare.
6367         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
6368         (pushclass): Likewise.  Use storetags to install tag declarations,
6369         not pushtag.
6370         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
6371         * decl.c (storetags): Make it global.
6372         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
6373         implicit typename declaration.
6374         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
6375         * method.c (hack_identifier): Likewise.
6376         * search.c (lookup_member): Likewise.
6377
6378         * decl.c (warn_about_implicit_typename_lookup): New function.
6379         (lookup_name_real): Use it.  Rework handling of implicit typename
6380         extension.
6381
6382 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
6383
6384         * cp-tree.h (lookup_nested_field): Remove.
6385         * class.c (push_nested_class): Handle UNION_TYPEs.
6386         (pop_nested_class): Likewise.
6387         * decl.c (lookup_name_real): Don't call lookup_nested_field.
6388         (start_decl): Use push_nested_class, not just pushclass.
6389         (cp_finish_decl): Use pop_nested_class, not just popclass.
6390         * search.c (lookup_nested_field): Remove.
6391
6392         * cp-tree.h (lang_type): Add documentation.
6393         * decl2.c (handle_class_head): Create template declarations here,
6394         as appropriate.
6395         * parse.y (class_head): Return whether or not we entered a new
6396         scope, as well as the type named.
6397         (named_class_head): Likewise.
6398         (named_complex_class_head_sans_basetype): Likewise.
6399         (structsp): Adjust accordingly.  Pop scope when required.
6400         * parse.c: Regenerated.
6401         * pt.c (check_default_tmpl_args): Robustify.
6402         (redeclare_class_template): Likewise.
6403         (instantiate_class_template): An instantiation of an
6404         anonymous union is itself an anonymous union.
6405         * semantics.c (begin_class_definition): Don't create template
6406         declarations here.
6407
6408 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
6409
6410         * parse.y (after_type_declarator_intern): New nonterminal.
6411         (after_type_declarator): Use it.
6412         (direct_after_type_declarator): Likewise.  Move above
6413         nonnested_type to fix reduce/reduce conflict resolution.
6414         (declmods): Reducing from just 'attributes' has EMPTY precedence.
6415         * Makefile.in (CONFLICTS): Update.
6416
6417         * decl.c (define_label): Downgrade error for jumping over a
6418         non-POD decl to pedwarn.
6419
6420 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
6421
6422         * cp-tree.h (popclass): Change declaration.
6423         (pop_nested_class): Likewise.
6424         (poplevel_class): Remove declaration.
6425         * call.c (convert_default_argument): Pass no arguments to
6426         popclass.
6427         * class.c (finish_struct_1): Likewise.
6428         (finish_struct): Likewise.
6429         (popclass): Remove argument.  Simplify code accordingly.
6430         (pop_nested_class): Likewise.
6431         * decl.c (poplevel_class): Declare it here, and make it static.
6432         (poplevel): Handle class scopes.
6433         (poplevel_class): Don't take an rgument.  Simplify.
6434         (pop_everything): Pass no arguments to pop_nested_class.
6435         (cp_finish_decl): Pass no arguments to popclass.
6436         (grokdeclarator): Pass no arguments to pop_nested_class.
6437         (finish_function): Likewise.
6438         * decl2.c (grokfield): Likewise.
6439         (pop_scope): Pass no arguments to popclass.
6440         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
6441         * pt.c (instantiate_class_template): Move call to pushclass, and
6442         document.  Pass no arguments to popclass.
6443         (regenerate_decl_from_template): Likewise.
6444
6445 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
6446
6447         * typeck.c (build_unary_op): Handle taking the address of a unique
6448         bound non-static member function.
6449
6450 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6451
6452         * lang-options.h (-Wdeprecated): New flag.
6453         * decl2.c (warn_deprecated): New flag.
6454         (lang_decode_option): Deprecated this-is-variable,
6455         external-templates, alt-external-templates.
6456         Support -Wdeprecated.
6457         * errfn.c (cp_deprecated): New function.
6458
6459 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
6460
6461         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
6462         of the decls themselves.
6463
6464         * pt.c (tsubst_function_type): Copy attributes over.
6465
6466         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
6467         and com_interface.
6468         * cp-tree.h: Add prototype.
6469         * decl.c (init_decl_processing): Set valid_lang_attribute.
6470
6471 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
6472
6473         * class.c (finish_struct_1): Look at the const-ness of the field's
6474         type, not the TREE_READONLY-ness of the declaration.
6475         * method.c (synthesize_method): Likewise.
6476         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
6477         creating new declarations.
6478
6479 1999-04-13  Mike Stump  <mrs@wrs.com>
6480
6481         * decl2.c (import_export_decl): Because vtables always reference
6482         virtual functions, even if they are inlined, don't allow
6483         -fno-implement-inlines to not emit them, instead, emit them with
6484         the vtable.
6485         * decl.c (start_function): Likewise.
6486
6487 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
6488
6489         * cp-tree.h (struct lang_type): Add com_interface.
6490         (CLASSTYPE_COM_INTERFACE): New macro.
6491         * class.c (set_rtti_entry): COM interface classes have no RTTI
6492         entries in their vtables; adjust.
6493         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
6494         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
6495         finish_struct_1): Likewise.
6496         * decl2.c (mark_vtable_entries): Likewise.
6497         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
6498         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
6499         expand_upcast_fixups): Likewise.
6500         * tree.c (debug_binfo): Likewise.
6501
6502         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
6503         * typeck.c (comptypes): If we get it, ignore attributes.
6504         * class.c (instantiate_type): Use BASELINK_P.  Change complain
6505         parameter to flags; 2 means ignore attributes.
6506         * call.c (build_op_delete_call): Pass it.
6507
6508         * decl.c (xref_tag): Only complain once about using a typedef-name
6509         with 'struct'.  Downgrade to pedwarn.
6510
6511         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
6512
6513         * parse.y (absdcl_intern): New nonterminal.
6514         (absdcl, direct_abstract_declarator): Use it.
6515
6516         * pt.c (lookup_template_class): Look through implict typename.
6517
6518 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
6519
6520         * friend.c (add_friend): Deal gracefully with error_mark_node.
6521         * method.c (build_overload_value): Handle pointers-to-members as
6522         template parameters.
6523
6524         * decl.c (push_binding): Fix typo in comment.
6525
6526 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
6527
6528         * error.c (dump_type_real): If a typename is a template-id, put
6529         out the template arguments.
6530         (dump_expr): Handle TEMPLATE_ID_EXPR.
6531         * pt.c (lookup_template_class): Now that full arguments are
6532         available everywhere, remove code that tried to guess them.
6533
6534 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
6535
6536         * decl.c (make_typename_type): Complain if we don't find a type
6537         when trying to make a typename type for a non-template type.
6538
6539 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
6540
6541         * decl.c (start_decl): Pass attributes to grokdeclarator.
6542         (grokdeclarator): Handle attributes on constructor-syntax
6543         initializers.
6544
6545 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
6546
6547         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
6548         don't have types.
6549
6550         * search.c (template_self_reference_p): Tweak.
6551
6552 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
6553
6554         * init.c (build_offset_ref): Don't build yet another weird data
6555         structure to describe overloaded functions.
6556
6557 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
6558
6559         * cp-tree.h (BASELINK_P): New macro.
6560         (SET_BASELINK_P): Likewise.
6561         * init.c (build_member_call): Remove needless assignment in if
6562         statement.
6563         * search.c (lookup_field_r): Fix handling when we are looking
6564         specifically for a type; these are not hidden by functions and
6565         variables.
6566         (lookup_member): Use SET_BASELINK_P.
6567         * tree.c (is_overloaded_fn): Use BASELINK_P.
6568         (really_overloaed_fn): Likewise.
6569         (get_first_fn): Likewise.
6570
6571 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
6572
6573         * decl.c (lookup_name_current_level): Tweak, and improve
6574         documentation.
6575
6576         * class.c (maybe_fixup_vptrs): Remove declaration.
6577         (build_class_init_list): Likewise.
6578         * decl.c (pushdecl_class_level): Call check_template_shadow here
6579         ...
6580         (push_class_level_binding): ... not here.
6581         * search.c (dfs_push_type_decls): Only avoid
6582         template-self-reference TYPE_DECLs if they are from base classes.
6583
6584 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
6585
6586         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
6587         nodes.  Tidy.
6588
6589 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
6590
6591         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
6592         (finish_struct_1): Don't call build_class_init_list.
6593
6594 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
6595
6596         * tinfo.h (__class_type_info): Fix illegal declaration.
6597
6598         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
6599         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
6600         (IDENTIFIER_CLASS_VALUE): Improve documentation.
6601         (is_properly_derived_from): Declare.
6602         (invalidate_class_lookup_cache): Likewise.
6603         (maybe_maybe_note_name_used_in_class): Likewise.
6604         (note_name_declared_in_class): Likewise.
6605         (push_using_decl): Remove duplicate declaration.
6606         (id_in_current_class): Remove declaration.
6607         (push_class_binding): Change prototype.
6608         (clear_identitifer_class_values): Declare.
6609         * call.c (is_properly_derived_from): Make it global.
6610         (build_new_function_call): Be careful about updating candidates.
6611         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
6612         asked to make illegal calls.
6613         * class.c: Include splay-tree.h.
6614         (class_stack_node): Add names_used slot.
6615         (check_member_decl_is_same_in_complete_scope): Remove.
6616         (add_method): Fix comment.  Push the declaration into class
6617         scope.
6618         (finish_struct_1): When popping the class, pop the bindings too.
6619         Remove check for data member/function member conflict.
6620         (finish_struct): Remove calls to
6621         check_member_decl_is_same_in_complete_scope.  Change calls to
6622         popclass.
6623         (pushclass): Clear names_used in the class stack entry.
6624         Use invalidate_class_lookup_cache to remove cached entries, rather
6625         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
6626         before entering a new class.  Remove dead code.  Don't mess with
6627         current_function_decl when pushing declarations.
6628         (invalidate_class_lookup_cache): New function, split out from ...
6629         (popclass): Here.  Clean up names_used on our way out.
6630         (instantiate_type): Adjust.
6631         (build_self_reference): Don't push the declaration here.
6632         (maybe_note_name_used_in_class): New function.
6633         (note_name_declared_in_class): Likewise.
6634         * decl.c (add_binding): Change prototype.
6635         (find_class_binding_level): New function.
6636         (innermost_nonclass_level): Likewise.
6637         (current_binding_level): Update documentation.
6638         (inner_binding_level): Remove.  Replace with current_binding_level
6639         throughout.
6640         (push_binding_level): Remove special handling of
6641         class_binding_level.
6642         (pop_binding_level): Likewise.  Use find_class_binding_level.
6643         (suspend_binding_level): Likewise.
6644         (global_bindings_p): Use innermost_nonclass_level.
6645         (toplevel_bindings_p): Likewise.
6646         (namespace_bindings_p): Likewise.
6647         (pseudo_global_level_p): Likewise.
6648         (push_binding): Clear INHERITED_VALUE_BINDING_P.
6649         (add_binding): Check for illegal multiple declarations.  Return a
6650         value indicating whether or not the new binding was legal.
6651         (push_local_binding): Skip over class binding levels.  Check
6652         return value from add_binding.
6653         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
6654         note_name_declared_in_class.
6655         (pushlevel_class): Remove "fake out the rest of the compiler"
6656         code.
6657         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
6658         (clear_identifier_class_values): New function.
6659         (pop_from_top_level): Use it.
6660         (pop_everything): Tweak.
6661         (maybe_process_template_type_declaration): Don't push the
6662         declaration for the template here.
6663         (pushtag): Don't push tag declarations into class scope here.
6664         (pushdecl): Apply DeMorgan's law for readability.
6665         (pushdecl_class_level): Remove special-case code for
6666         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
6667         (push_class_level_bindng): Deal with inherited bindings.
6668         (lookup_name_real): Remove special-case code for
6669         TYPE_BEING_DEFINED, and some implicit typename magic.
6670         (grokdeclarator): Handle COMPONENT_REF for a template function.
6671         (build_enumerator): Don't call pushdecl_class_level here.
6672         (id_in_current_class): Remove.
6673         * decl2.c (grokfield): Don't call pushdecl_class_level or
6674         check_template_shadow.
6675         * errfn.c (cp_file_of): Don't declare.
6676         (cp_line_of): Likewise.
6677         * error.c (dump_decl): Handle an OVERLOAD.
6678         (cp_file_of): Likewise.
6679         (cp_line_of): Likewise.
6680         * init.c (build_member_call): Handle a COMPONENT_REF.
6681         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
6682         pushdecl_class_level.
6683         * method.c (hack_identifier): Build COMPONENT_REFs for references
6684         to member templates as well as member functions.  Remove dead
6685         code.
6686         * parse.y (left_curly): Remove.
6687         (nonnested_type): Call maybe_note_name_used_in_class, not
6688         pushdecl_class_level.
6689         * parse.c: Regenerated.
6690         (nested_name_specifier_1): Likewise.
6691         * pt.c (check_explicit_specialization): Adjust, for robustness.
6692         (check_template_shadow): Handle OVERLOADs.
6693         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
6694         TEMPLATE_DECL, if appropriate.
6695         * search.c (envelope_add_decl): Remove.
6696         (dfs_pushdecls): Likewise.
6697         (dfs_compress_decls): Likewise.
6698         (dfs_push_decls): New function.
6699         (dfs_push_type_decls): Likewise.
6700         (setup_class_bindings): Likewise.
6701         (template_self_reference_p): Likewise.
6702         (lookup_field_r): Use it.
6703         (looup_member): Remove old comment.  Deal with ambiguity.
6704         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
6705         and remove envelope processing.
6706         * semantics.c (begin_class_definition): Let pushclass push
6707         declarations for base classes.
6708         (finish_member_declaration): Push declarations into class scope.
6709         * typeck.c (build_component_ref): Just put an OVERLOAD into the
6710         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
6711         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
6712         * Makefile.in (class.o): Depend on splay-tree.h.
6713
6714 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
6715
6716         * cvt.c (convert_pointer_to_real): Use same_type_p.
6717         * typeck.c (comp_target_types): Use same_type_p.
6718
6719 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
6720
6721         * semantics.c (begin_inline_definitions,
6722         finish_inline_definitions): Rename from finish_default_args and
6723         begin_inline_definitions, respectively, to something that isn't a
6724         total lie.  :)
6725         * parse.y (structsp): Adjust.
6726
6727         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
6728         (list_hash_lookup): Likewise.
6729         (hash_tree_chain): Adjust.
6730         * pt.c (tsubst): Adjust.
6731         (tsubst_arg_types): Use plain hash_tree_cons.
6732         * cp-tree.h (hash_tree_cons_simple): Lose.
6733         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
6734
6735 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6736
6737         * Makefile.in (hash.h): Generate using gperf language 'C', not
6738         'KR-C', so gperf uses the `const' keyword on strings.
6739
6740         * gxx.gperf (resword): Const-ify a char*.
6741
6742 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
6743
6744         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
6745         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
6746         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
6747         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
6748         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
6749         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
6750         tree.c: Adjust.
6751
6752 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
6753
6754         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
6755
6756 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
6757
6758         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
6759
6760 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
6761
6762         * cp-tree.h (add_friend): Declare.
6763         (add_friends): Likewise.
6764         * friend.c (add_friend): Make it global.  Don't add to
6765         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
6766         (add_friends): Make it global.
6767         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
6768         befriending class is a template.
6769         * parse.y (component_decl_1): Fix typo in comment.
6770         * parse.c: Regenerated.
6771         * pt.c (instantiate_class_template): Use add_friend and
6772         add_friends rather that duplicating some of their functionality
6773         here.
6774
6775 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
6776
6777         * call.c (build_field_call): Unify 'this' and non-'this' cases.
6778
6779         * typeck.c (build_indirect_ref): Check for 'this' sooner.
6780
6781 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6782
6783         * call.c (op_error): Const-ify a char*.
6784         (add_candidate, source_type, add_warning): Add static prototype.
6785         (print_z_candidates): Const-ify a char*.
6786
6787         * class.c (resolve_address_of_overloaded_function,
6788         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
6789         (get_vtable_name, finish_struct_1): Const-ify a char*.
6790
6791         * cvt.c (convert_to_reference): Likewise.
6792
6793         * decl.c (redeclaration_error_message, record_builtin_type,
6794         record_unknown_type, member_function_or_else, bad_specifiers):
6795         Likewise.
6796         (find_binding, select_decl, unqualified_namespace_lookup,
6797         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
6798         Add static prototype.
6799         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
6800         implicitly_declare, record_builtin_java_type, define_function,
6801         grok_op_properties, tag_name): Const-ify a char*.
6802
6803         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
6804         (define_function, finish_builtin_type): Const-ify a char*.
6805         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
6806         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
6807         (file_name_nondirectory): Const-ify a char*.
6808         (init_filename_times): Don't prototype.
6809         (compiler_error): Prototype.
6810         (yyerror, init_repo): Const-ify a char*.
6811         (build_srcloc): Don't prototype.
6812         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
6813         Const-ify a char*.
6814         (warn_for_assignment): Don't prototype.
6815         (convert_for_initialization, readonly_error, check_for_new_type,
6816         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
6817         Const-ify a char*.
6818
6819         * decl2.c (acceptable_java_type, output_vtable_inherit,
6820         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
6821         merge_functions, decl_namespace, validate_nonmember_using_decl,
6822         do_nonmember_using_decl): Add static prototype.
6823         (lang_f_options): Const-ify a char*.
6824         (finish_builtin_type): Likewise.
6825         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
6826         prototype.
6827
6828         * errfn.c: Include cp-tree.h.
6829         (cp_thing): Add static prototype.
6830         (compiler_error): Don't protoptype.
6831         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
6832         passing it to `cp_thing'.
6833
6834         * error.c (interesting_scope_p): Add static prototype.
6835
6836         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
6837         a char*.
6838
6839         * init.c (compiler_error): Don't prototype.
6840         (member_init_ok_or_else): Const-ify a char*.
6841         (build_java_class_ref): Add static prototype.
6842
6843         * lex.c (compiler_error): Don't prototype.
6844         (get_time_identifier, interface_strcmp, extend_token_buffer,
6845         handle_cp_pragma): Const-ify a char*.
6846         (is_global, init_filename_times): Add static prototype.
6847         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
6848         (compiler_error): Change from fixed args to variable args.
6849         (yyerror): Const-ify a char*.
6850
6851         * parse.y (cond_stmt_keyword): Const-ify a char*.
6852         (parse_decl): Add static prototype.
6853
6854         * pt.c (template_args_equal, print_template_context): Likewise.
6855         (print_candidates, check_default_tmpl_args): Const-ify a char*.
6856         (instantiate_class_template): Likewise.
6857
6858         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
6859
6860         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
6861         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
6862
6863         * search.c (lookup_field_info, lookup_member): Likewise.
6864         (lookup_member): Cast the first argument of `bzero' to a PTR.
6865
6866         * sig.c (compiler_error): Don't prototype.
6867         (build_signature_pointer_or_reference_nam): Const-ify a char*.
6868         (get_sigtable_name, build_member_function_pointer): Likewise.
6869
6870         * tree.c (compiler_error): Don't prototype.
6871         (no_linkage_helper, build_srcloc): Add static prototype.
6872         (build_vbase_pointer_fields): Const-ify a char*.
6873         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
6874
6875         * typeck.c (compiler_error): Don't prototype.
6876         (convert_for_assignment): Const-ify a char*.
6877         (comp_cv_target_types): Add static prototype.
6878         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
6879         build_component_addr, build_unary_op, convert_for_initialization):
6880         Const-ify a char*.
6881
6882         * typeck2.c (ack): Add static prototype and change from fixed args
6883         to variable args.
6884         (readonly_error, check_for_new_type): Const-ify a char*.
6885
6886         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
6887         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
6888         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
6889         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
6890         gen_assign, GNU_xref_member): Const-ify a char*.
6891
6892 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6893
6894         * gxxint.texi: Remove old discussion on copying virtual bases.
6895
6896 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
6897
6898         * Make-lang.in: Remove all references to g++.o/g++.c.
6899         Link g++ from gcc.o.
6900
6901 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
6902
6903         * decl2.c (comdat_linkage): Treat vtables like functions.
6904
6905 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
6906
6907         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
6908
6909 1999-03-25  Nathan Sidwell  <nathan@acm.org>
6910
6911         * decl.c (init_decl_processing): Add `signed' type as a synonym
6912         for `int'.
6913
6914 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
6915
6916         * typeck.c (common_type): Handle cv-qual unification for pointers
6917         to members.
6918
6919         * decl.c (unqualified_namespace_lookup): Return error_mark_node
6920         on error.
6921         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
6922         * lex.c (do_identifier): If we got error_mark_node, call
6923         lookup_name again.
6924
6925 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6926
6927         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
6928         classes.
6929
6930 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
6931
6932         * decl.c (lookup_name_real): Do nested field lookup regardless of
6933         TYPE_BEING_DEFINED.
6934
6935 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
6936
6937         * cp-tree.h (lang_type): Remove has_assignment and
6938         has_real_assignment.  Add befriending_classes.
6939         (TYPE_HAS_ASSIGNMENT): Remove.
6940         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
6941         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
6942         (lang_decl): Document.
6943         (DECL_BEFRIENDING_CLASSES): New macro.
6944         (FRIEND_NAME): Move declaration to more obvious location.
6945         (FRIEND_DECLS): Likewise.
6946         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
6947         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
6948         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
6949         (grok_op_properties): Likewise.
6950         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
6951         (add_friend): Likewise.  Don't do weird things with assignment
6952         operators.  Update DECL_BEFRIENDING_CLASSES.
6953         (add_friends): Don't do weird things with assignment operators.
6954         (make_friend_class): Likewise.  Update
6955         CLASSTYPE_BEFRIENDING_CLASSES.
6956         * pt.c (instantiate_class_template): Don't set
6957         TYPE_HAS_ASSIGNMENT.
6958         (tsubst_copy): Substitute the TREE_TYPE for more unary
6959         expressions.
6960         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
6961         * search.c (protected_accessible_p): New function.
6962         (friend_accessible_p): Likewise.
6963         (accessible_p): Use them.
6964
6965 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
6966
6967         * pt.c (convert_nontype_argument): Don't create things that aren't
6968         PTRMEM_CSTs when applying a qualification conversion to a
6969         PTRMEM_CST.
6970
6971 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
6972
6973         * Makefile.in (OBJS): Don't mention hash.o.
6974         (OBJDEPS): Likewise.
6975
6976 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
6977
6978         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
6979         * decl.c (expand_static_init): Make sure we don't add any after
6980         then.
6981
6982         * decl.c (cp_finish_decl): Move intelligence about handling
6983         DECL_COMDAT for variables from here...
6984         * decl2.c (comdat_linkage): ...to here.
6985         (maybe_make_one_only): Tweak.
6986         (import_export_decl): Call comdat_linkage for variables, too.
6987         (finish_file): Handle template statics properly.
6988
6989 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
6990
6991         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
6992         Document internals of pointer-to-member-functions.
6993         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
6994         (PFN_FROM_PTRMEMFUNC): Likewise.
6995         (build_type_conversion): Remove unused parameter.
6996         (build_ptrmemfunc1): Declare.
6997         (expand_ptrmemfunc_cst): New function.
6998         (delta2_from_ptrmemfunc): Likewise.
6999         (pfn_from_ptrmemfunc): Likewise.
7000         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
7001         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
7002         (convert_to_reference): Remove unused parameter to
7003         build_type_conversion.
7004         (ocp_convert): Likewise.
7005         (build_user_type_conversion): Likewise.
7006         * error.c (dump_expr): Handle NULL pointer-to-member functions.
7007         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
7008         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
7009         open when handling pointer-to-member functions.
7010         * pt.c (convert_nontype_argument): Clean up error messages.  Be
7011         more stringent with pointers-to-members.
7012         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
7013         (build_unary_op): Tidy ever-so-slightly.
7014         (build_conditional_expr): Remove extra parameter to
7015         build_type_conversion.
7016         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
7017         we're using.
7018         (expand_ptrmemfunc_cst): Define.
7019         (delta2_from_ptrmemfunc): Likewise.
7020         (pfn_from_ptrmemfunc): Likewise.
7021
7022 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
7023
7024         * init.c (build_member_call): Handle template-id expressions
7025         correctly.
7026         * typeck.c (build_x_function_call): Likewise.
7027
7028 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
7029
7030         * friend.c (make_friend_class): Avoid core dump when
7031         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
7032
7033 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
7034
7035         * decl.c (start_function): Suppress normal linkage heuristics
7036         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
7037
7038 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
7039
7040         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
7041         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
7042
7043 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7044
7045         * parse.y (named_complex_class_head_sans_basetype):
7046         Do not push a scope for error_mark_node.
7047         (maybe_base_class_list): Likewise.
7048
7049         * decl.c (start_decl): Check for error_mark_node as a type.
7050         Detected by g++.brendan/array-refs.C.
7051         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
7052         (maybe_build_cleanup_1): Likewise.  Detected by
7053         g++.jason/incomplete1.C.
7054
7055         * tree.c (build_dummy_object): Use void_zero_node instead of the
7056         error_mark_node.
7057         (is_dummy_object): Check for such a node.
7058         Detected by g++.bob/inherit1.C
7059
7060 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
7061
7062         * method.c (old_backref_index): Split out...
7063         (flush_repeats): From here.  Rename back from try_old_backref.
7064         (build_mangled_name): Put back some old-style repeat handling.
7065
7066 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7067
7068         * lex.c: Don't include setjmp.h.
7069         (parse_float): New static function.
7070         (pf_args): New struct.
7071         (real_yylex): Use them in call to `do_float_handler'.
7072
7073 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
7074
7075         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
7076         * tree.c (layout_basetypes): Not here.
7077         * search.c (dfs_search): Remove; no longer used.
7078
7079 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
7080
7081         * decl2.c (validate_nonmember_using_decl): Issue sensible
7082         error-messages on bogus qualifiers.
7083
7084 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
7085
7086         * call.c (add_function_candidate): Fix uninitialized variable.
7087
7088         * Makefile.in (search.o): Add dependency on varray.h.
7089
7090 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
7091
7092         * decl.c (duplicate_decls): Use same_type_p.
7093         * method.c (try_old_backref): Renamed from flush_repeats.  Use
7094         same_type_p.  Don't try to handle repeats.  Return success.
7095         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
7096         calls from old-style code, too.
7097         (check_ktype): Use same_type_p.
7098         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
7099         (build_qualified_name): Simplify logic.
7100         (process_overload_item): Strip typedefs and quals at the top.
7101         (build_mangled_name_for_type_with_Gcode): Remove call to
7102         type_canonical_variant.
7103         (build_mangled_name): Likewise.  Remove support for old-style
7104         repeats, which have been disabled since 2.7.2.  Don't mess with
7105         TREE_USED.
7106         (build_decl_overload_real): Don't mess with TREE_USED.
7107
7108 1999-03-13  Nathan Sidwell  <nathan@acm.org>
7109
7110         * error.c (cp_printers): Add 'F' escape character.
7111         (dump_type_real): Remove TREE_LIST (fnargs) printing.
7112         Functionality moved to dump_parameters.
7113         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
7114         (dump_function_decl): Extend meaning of V parameter.  Use
7115         dump_parameters and dump_exception_spec.
7116         (dump_parameters): New static function.
7117         (dump_exception_spec): New static function.
7118         (fndecl_as_string): Change argument semantics.  Use
7119         dump_function_decl directly.
7120
7121         * sig.c (build_signature_table_constructor): Use cp_error.
7122
7123 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7124
7125         * semantics.c (finish_switch_cond): Handle error cases gracefully.
7126         Detected by g++.law/enum5.C.
7127
7128         * typeck.c (build_modify_expr): Check for errors after resolving
7129         offsets.  Detected by g++.brendan/static1.C.
7130
7131         * decl.c (complete_array_type): Ignore initial_value if it is an
7132         error.  Detected by g++.benjamin/17930.C.
7133
7134         * typeck2.c (process_init_constructor): Return error if one argument
7135         is in error.  Detected by g++.benjamin/13478.C.
7136
7137 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7138
7139         * decl.c (select_decl): Allow class templates when we need types.
7140         * decl2.c (ambiguous_decl): Likewise.
7141
7142 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
7143
7144         * lex.c (do_identifier): Correct call to enforce_access.
7145         * search.c (accessible_p): Tweak comment.
7146
7147 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
7148
7149         * semantics.c (begin_class_definition): Call build_self_reference.
7150         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
7151
7152         * search.c (assert_canonical_unmarked): Fix typo in prototype.
7153
7154         * search.c (dfs_canonical_queue): New function.
7155         (dfs_assert_unmarked_p): Likewise.
7156         (assert_canonical_unmarked): Likewise.
7157         (access_in_type): Use it.
7158         (accessible_p): Likewise.  Walk the whole tree when umarking.
7159
7160         * sig.c (build_signature_table_constructor): Use accessible_p
7161         instead of compute_access.
7162
7163 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
7164
7165         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
7166
7167 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
7168
7169         * cp-tree.h (flag_access_control): Declare.
7170         (TREE_VIA_PPUBLIC): Document.
7171         (DECL_NONSTATIC_MEMBER_P): New macro.
7172         (enforce_access): Return an indication of whether or not access
7173         was permitted.
7174         (build_self_reference): Change prototype.
7175         (compute_access): Replace with ...
7176         (accessible_p): New function.
7177         (dfs_walk): Change prototype.
7178         (dfs_unmark): Likewise.
7179         (markedp): Likewise.
7180         * call.c (enforce_access): Use accessible_p.
7181         * class.c (build_self_reference): Insert the declaration into the
7182         list of members for this type, and make it public.
7183         * decl.c (xref_basetypes): Avoid ill-timed recursion.
7184         * init.c (build_offset_ref): Use lookup_member, not three separate
7185         name-lookups.  Call enforce_access rather than checking for
7186         illegal accesses here.
7187         (resolve_offset_ref): Likewise.
7188         * lex.c (do_identifier): Likewise.
7189         * method.c (hack_identifier): Likewise.
7190         * parse.y (self_reference): Remove.
7191         (opt_component_decl_list): Don't use it.
7192         * parse.c: Regenerated.
7193         * pt.c (print_candidates): Generalize to handle lists of
7194         overloaded functions.
7195         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
7196         not set.
7197         (get_template_base): Use new calling convention for dfs_walk.
7198         * search.c: Include varray.h.  Add prototypes.
7199         (dfs_walk): Accept a data pointer to pass to the work functions.
7200         All callers changed.  All work functions changed.
7201         (breadth_first_search): Rename to bfs_walk, and make consistent
7202         with dfs_walk.
7203         (dfs_walk_real): New function.
7204         (canonical_binfo): New function.
7205         (context_for_name_lookup): Likewise.
7206         (shared_marked_p): Likewise.
7207         (shared_unmarked_p): Likewise.
7208         (lokup_field_queue_p): Likewise.
7209         (lookup_field_r): Generalize to handle both functions and fields.
7210         (lookup_field): Just call lookup_member.
7211         (lookup_fnfields): Likewise.
7212         (lookup_member): Move body of lookup_field here and generalize.
7213         (dfs_accessible_queue_p): Likewise.
7214         (dfs_accessible_p): Likewise.
7215         (dfs_access_in_type): Likewise.
7216         (access_in_type): Likewise.
7217         (compute_access): Remove, and replace with ...
7218         (accessible_p): New function.
7219         (vbase_types): Remove.
7220         (vbase_decl_ptr_intermediate): Likewise.
7221         (vbase_decl_ptr): Likewise.
7222         (vbase_init_result): Likewise.
7223         (closed_envelopes): Likewise.
7224         (bvtable): Likewise.
7225
7226 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
7227
7228         * call.c (add_function_candidate): Check for proper number of args
7229         before checking the validity of those args.
7230
7231 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
7232
7233         * cp-tree.h (struct lang_type): Add anon_union field.
7234         (ANON_UNION_TYPE_P): Use it instead of examining type.
7235         (SET_ANON_UNION_TYPE_P): New macro.
7236         * decl.c (check_tag_decl): Use it.
7237
7238         * search.c (compute_access): Handle non-type contexts earlier, and
7239         handle NULL_TREE.
7240
7241         * tree.c (build_exception_variant): Use copy_to_permanent.
7242
7243         * decl2.c (setup_initp): Give statics with no priority the default
7244         priority here.
7245         (do_dtors, do_ctors, finish_file): Remove special handling of
7246         non-prioritized statics.
7247
7248 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
7249
7250         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
7251         * decl.c (make_typename_type): Don't issue an error if an
7252         immediate lookup fails; it migt be resolved later.
7253         * friend.c (is_friend): Add comment.
7254         * search.c (breadth_first_search): Add POSTFN and DATA
7255         parameters.  Tidy.  All callers changed.
7256         (lookup_field_queue_p): New function.
7257         (lookup_field_r): Likewise.
7258         (lookup_field_post): Likewise.
7259         (lookup_field): Use them, via breadth_first_search, instead of
7260         duplicating logic.
7261         (compute_access): Robustify.
7262         (lookup_fnfield_info): New structure.
7263
7264 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
7265
7266         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
7267
7268 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
7269
7270         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
7271         cc happy.
7272
7273         * decl2.c (import_export_class): Also return if
7274         CLASSTYPE_INTERFACE_ONLY is set.
7275
7276 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7277
7278         * decl.c (push_overloaded_decl): Only overwrite the old binding if
7279         there was one.
7280         * decl2.c (do_local_using_decl): Fix loop termination.
7281
7282 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
7283
7284         * cp-tree.h (determine_specialization): Don't declare.
7285         * pt.c (determine_specialization): Make it static.  Eliminate
7286         complain parameter.  Note that decl is always non-NULL now, and
7287         simplify accordingly.
7288
7289         * decl.c (maybe_push_to_top_level): Always call
7290         push_cp_function_context.
7291         (pop_from_top_level): Always call pop_cp_function_context.
7292
7293 1999-02-26  Nathan Sidwell  <nathan@acm.org>
7294
7295         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
7296         diagnostics.
7297         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
7298         * init.c (build_new_1): Extra arg to complete_type_or_else.
7299         (build_delete): Likewise.
7300         * typeck.c (require_complete_type): Likewise.
7301         (pointer_int_sum): Likewise.
7302         (pointer_diff): Likewise.
7303         (build_component_ref): Likewise.
7304
7305         * typeck2.c (incomplete_type_error): Always use cp_error.
7306         Show declaration of undefined type, if appropriate.
7307         Deal with UNKNOWN_TYPE nodes.
7308
7309         * typeck.c (require_complete_type): Use TYPE_SIZE as
7310         size_zero_node to mean incomplete type.
7311         (require_complete_type_in_void): New function.
7312         (build_compound_expr): Call complete_type_in_void for LHS.
7313         (build_c_cast): Call complete_type_in_void for void cast.
7314         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
7315         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
7316         require_complete_type_in_void.  Call it.
7317         * cp-tree.h (require_complete_type_in_void): Prototype new function.
7318
7319         * typeck.c (convert_arguments): Use alternative format for
7320         function decls.  Don't require_complete_type here.  Simplify
7321         diagnostic printing.
7322         (convert_for_initialization): Don't require_complete_type on RHS yet.
7323         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
7324
7325         * call.c (build_over_call): Cope with qualified void return type.
7326         * semantics.c (finish_call_expr): Likewise.
7327         * typeck.c (build_function_call_real): Likewise.
7328         (c_expand_return): Likewise.
7329         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
7330
7331         * call.c (print_z_candidates): Use alternate print format, to be
7332         consistent with (pt.c) print_candidates.
7333         * method.c (hack_identifier): List candidate members.
7334         * search.c (lookup_field): Build ambiguous list, and show it, if
7335         ambiguous.
7336
7337 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
7338
7339         * typeck.c (decay_conversion): Don't confuse constant array
7340         variables with their initializers.
7341
7342         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
7343         merging decls.
7344         * pt.c (regenerate_decl_from_template): Tweak for clarity.
7345         (instantiate_decl): Mark a decl instantiated before regenerating
7346         it to avoid recursion.
7347         * tree.c (mapcar): Don't call decl_constant_value unless we know
7348         something is TREE_READONLY_DECL_P.
7349
7350         * class.c (check_for_override): Don't stop checking when we find
7351         the first overridden function.  Delete #if 0'd code.
7352         * search.c (get_matching_virtual): Likewise.
7353
7354 1999-02-25  Richard Henderson  <rth@cygnus.com>
7355
7356         * lang-specs.h: Define __FAST_MATH__ when appropriate.
7357
7358 1999-02-24  Mike Stump  <mrs@wrs.com>
7359
7360         * typeck.c (convert_for_assignment): Allow boolean integral constant
7361         expressions to convert to null pointer.
7362
7363 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
7364
7365         * decl.c (lookup_namespace_name): Resolve namespace aliases.
7366
7367         * class.c (push_nested_class): Allow namespaces.
7368
7369         * decl2.c (set_decl_namespace): Add friendp parameter.
7370         * decl.c (grokfndecl): Pass it.
7371         (grokvardecl): Likewise.
7372         * cp-tree.h: Change declaration.
7373
7374 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
7375
7376         * pt.c (tsubst): Allow an array of explicit size zero.
7377
7378 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
7379
7380         * errfn.c: Change varargs code to look like toplev.c.
7381
7382         * method.c (process_modifiers): Don't prepend 'U' for char or
7383         wchar_t.
7384
7385 1999-02-20  Craig Burley  <craig@jcb-sc.com>
7386
7387         * Make-lang.in (cplib2.ready): Don't consider updating
7388         cplib2 stuff if the current directory isn't writable, as
7389         it won't work (such as during a `make install').
7390
7391 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
7392
7393         * decl2.c (start_objects): Make file scope constructors and
7394         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
7395         ASM_OUTPUT_DESTRUCTOR are defined.
7396
7397 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
7398
7399         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
7400         (fn_type_unification): Adjust prototype.
7401         (lookup_fnfields_1): Declare.
7402         * call.c (add_template_candidate_real): Adjust call to
7403         fn_type_unification.
7404         * class.c (add_method): Don't allow duplicate declarations of
7405         constructors or destructors.
7406         (resolve_address_of_overloaded_function): Remove unused variable.
7407         Adjust call to fn_type_unification.
7408         * decl.c (grokfndecl): Be more robust in the face of illegal
7409         specializations.
7410         * decl2.c (check_classfn): Remove hokey handling of member
7411         templates.
7412         * pt.c (determine_specialization): Improve comments.  Adjust to
7413         handle template argument deduction as per the standard.
7414         (check_explicit_specialization): Fix comment spacing.  Handle
7415         type-conversion operators correctly.  Improve error-recovery.
7416         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
7417         (get_bindings_real): Simplify handling of static members.
7418         * search.c (lookup_fnfields_1): Make it have external linkage.
7419         * typeck.c (compparms): Fix comment.
7420         (build_unary_op): Don't try to figure out which template
7421         specialization is being referred to when when the address-of
7422         operator is used with a template function.
7423
7424 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7425
7426         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
7427         keyword to match an analogous change at the top level.
7428
7429         * tree.c (lvalue_or_else): Likewise.
7430
7431 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
7432
7433         * decl.c (xref_basetypes): Comment.
7434         * pt.c (instantiate_class_template): Use xref_basetypes.
7435
7436 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
7437
7438         * cp-tree.h (tsubst): Change prototype.
7439         (tsubst_expr): Likewise.
7440         (tsubst_copy): Likewise.
7441         (type_unification): Remove prototype.
7442         * call.c (convert_default_arg): Adjust call to tsubst_expr.
7443         * class.c (resolve_address_of_overloaded_function): Just use
7444         fn_type_unification.
7445         * decl.c (grokdeclarator): Adjust call to tsubst.
7446         * method.c (build_template_parm_names): Likewise.
7447         * pt.c (GTB_VIA_VIRTUAL): New macro.
7448         (GTB_IGNORE_TYPE): Likewise.
7449         (resolve_overloaded_unification): Add `complain' parameter.
7450         (try_one_overload): Likewise.
7451         (tsubst_template_arg_vector): Likewise.
7452         (tsubst_template_parms): Likewise.
7453         (tsubst_aggr_type): Likewise.
7454         (tsubst_arg_types): Likewise.
7455         (tsubst_call_declarator_parms): Likewise.
7456         (unify): Remove explicit_mask.
7457         (type_unification_real): Likewise.
7458         (get_template_base_recursive): Likewise.
7459         (coerce_template_template_parms): Provide prototype.
7460         (tsubst_function_type): Likewise.
7461         (try_class_unification): New function.
7462         All callers changed to use new complain parameter.
7463         (get_template_base): Use try_class_unification.
7464         (unify): Adjust handling of classes derived from template types.
7465         (fn_type_unification): Substitute explicit arguments before
7466         unification.
7467
7468 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7469
7470         * decl.c (pushdecl): Remove dead code.
7471
7472 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
7473
7474         * decl2.c (finish_objects): Fix code I missed in previous change.
7475
7476 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
7477
7478         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
7479         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
7480
7481         * pt.c (maybe_process_partial_specialization): Complain about
7482         'template <>' on non-specialization.
7483
7484 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
7485
7486         * decl.c (grokdeclarator): Catch wierd declarators.
7487         * decl2.c (finish_file): Don't abort because of namespace parsing
7488         failure.
7489         (check_decl_namespace): Remove.
7490
7491 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
7492
7493         * cp-tree.h (get_template_base): Don't declare.
7494         (dfs_walk): Declare.
7495         (dfs_unmark): Likewise.
7496         (markedp): Likewise.
7497         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
7498         targs to get_template_base.
7499         (get_template_base_recursive): Move here from search.c.  Check to
7500         see that the base found can be instantiated to form the desired
7501         type.
7502         (get_template_base): Likewise.
7503         (get_class_bindings): Simplify.
7504         * search.c (get_template_base_recursive): Move to pt.c.
7505         (get_template_base): Likewise.
7506         (markedp): Make it global.
7507         (dfs_walk): Likewise.
7508         (dfs_unmark): Likewise.
7509
7510 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
7511
7512         * pt.c (maybe_process_partial_specialization): Complain about
7513         specialization in wrong namespace.
7514         * tree.c (decl_namespace_context): New fn.
7515
7516 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7517
7518         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
7519         * pt.c (coerce_template_template_parms): Handle nested
7520         template template parameters.
7521
7522 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
7523
7524         * typeck2.c: Update email addresses.
7525
7526 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7527
7528         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
7529         turned off.
7530
7531 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
7532
7533         * lex.c (retrofit_lang_decl): Split out...
7534         (build_lang_decl): From here.
7535         * decl.c (pushdecl): Call it for functions generated by the middle
7536         end that don't have DECL_LANG_SPECIFIC.
7537         * cp-tree.h: Declare it.
7538
7539         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
7540         (start_objects, finish_objects): Only use special
7541         init_priority code if the user specified a priority.
7542         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
7543         objects.
7544
7545 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
7546
7547         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
7548         mkstemp.o.  Get them from libiberty now.
7549         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
7550
7551 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
7552
7553         * decl2.c (lang_decode_option): Use read_integral_parameter.
7554
7555 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
7556
7557         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
7558         before calling complete_type_or_else.
7559
7560 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7561
7562         * input.c (inline): Don't define, its handled by system.h.
7563
7564 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
7565
7566         * decl2.c: Don't define flag_no_ident here.  Don't process
7567         -f(no-)ident here.
7568         * cp-tree.h: Don't declare flag_no_ident here.
7569         * lang-specs.h: Map -Qn to -fno-ident.
7570
7571 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
7572
7573         * cp-tree.h (struct tree_binding): Replace scope field with a union.
7574         (BINDING_SCOPE): Adjust.
7575         * decl.c (BINDING_LEVEL): Adjust.
7576
7577 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
7578
7579         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
7580         member constants.
7581
7582         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
7583         a ctor initializer.
7584
7585         * tree.c (equal_functions): Fix name in prototype.
7586
7587         * decl.c (push_local_binding): Add FLAGS argument.
7588         (pushdecl, push_overloaded_decl): Pass it.
7589         * decl2.c (do_local_using_decl): Likewise.
7590         * cp-tree.h: Adjust prototype.
7591         * decl.c (poplevel): Fix logic.
7592
7593         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
7594         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
7595         (cat_namespace_levels): Don't loop forever.
7596
7597 1999-01-25  Richard Henderson  <rth@cygnus.com>
7598
7599         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
7600
7601 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
7602
7603         * class.c (resolve_address_of_overloaded_function): Mark the
7604         chosen function used.
7605
7606         * call.c (build_call): Make sure that a function coming in has
7607         been marked used already.
7608         * decl.c (expand_static_init): Call mark_used instead of
7609         assemble_external.
7610         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
7611         alloc_eh_object, expand_throw): Likewise.
7612         * init.c (build_builtin_delete_call): Likewise.
7613         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
7614         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
7615         expand_generic_desc): Likewise.
7616
7617 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7618
7619         * tree.c (equal_functions): New function.
7620         (ovl_member): Call it.
7621
7622 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
7623
7624         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
7625
7626 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
7627
7628         * decl.c (decls_match): Return 1 if old and new are identical.
7629         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
7630
7631 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
7632
7633         * decl.c (start_function): Make member functions one_only on windows.
7634         * decl2.c (import_export_decl): Likewise.
7635
7636         * decl.c (grokdeclarator): Don't complain about implicit int in
7637         a system header.  Change same-name field check to not complain in
7638         a system header instead of within extern "C".
7639
7640 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
7641
7642         * cp-tree.h (PUSH_GLOBAL): New macro.
7643         (PUSH_LOCAL): Likewise.
7644         (PUSH_USING): Likewise.
7645         (namespace_bindings_p): Declare.
7646         (push_overloaded_decl): Likewise.
7647         * decl.c (push_overloaded_decl): Don't make it static.  Check for
7648         illegal declarations after using declarations here.
7649         (namespace_bindings_p): Likewise.
7650         (duplicate_decls): Don't consider declarations from different
7651         namespaces to be the same.
7652         (pushdecl): Use symbolic PUSH_ constants in calls to
7653         push_overloaded_decl.
7654         (push_overloaded_decl_1): Likewise.
7655         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
7656         (do_nonmember_using_decl): Check for illegal using declarations
7657         after ordinary declarations here.
7658         (do_local_using_decl): Call pushdecl to insert declarations.
7659
7660 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
7661
7662         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
7663
7664 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
7665
7666         * tree.c (build_cplus_array_type_1): Don't call build_array_type
7667         for types involving template parameters.
7668
7669         * cp-tree.h (PARM_DECL_EXPR): Delete.
7670         (convert_default_arg): Change prototype.
7671         (check_default_argument): Declare.
7672         (search_tree): Likewise.
7673         * call.c (convert_default_arg): Take the function to which the
7674         default argument belongs as a parameter, and do any necessary
7675         instantiation here, instead of ...
7676         (build_over_call): Here.
7677         * decl.c (local_variable_p): New function.
7678         (check_default_argument): Likewise, split out and tidied from ...
7679         (grokparms): Here.
7680         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
7681         * pt.c (tsubst_call_declarator_parms): New function.
7682         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
7683         with CALL_EXPRs, rather than trying to be clever.
7684         (tsubst): Use tsubst_call_declarator_parms.
7685         * tree.c (search_tree): Don't make it static.
7686         * typeck.c (convert_arguments): Use new interface to
7687         convert_default_arg.
7688
7689 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
7690
7691         * error.c (dump_function_decl): Don't print the argument types for
7692         a function when the verbosity level is negative.
7693
7694         * call.c (build_over_call): Check format attributes at call-time.
7695
7696         * pt.c (tsubst_copy): Fix comment.
7697         (unify): Don't allow unification with variable-sized arrays.
7698
7699         * semantics.c (finish_stmt_expr): When processing a template make
7700         the BIND_EXPR long-lived.
7701
7702 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
7703
7704         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
7705         (import_export_vtable): Not here.
7706
7707 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
7708
7709         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
7710         non-static member function.
7711
7712 1999-01-18  Nathan Sidwell  <nathan@acm.org>
7713
7714         * class.c (instantiate_type): Only diagnose illegal address of member
7715         function if complaining.
7716
7717         * decl.c (lookup_name_real): Remove duplicate code.
7718
7719 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
7720
7721         * tree.c (copy_template_template_parm): Use permanent_obstack.
7722
7723 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7724
7725         * pt.c (unify): Remove restrictions on deduction of argument
7726         of template template parameters.
7727
7728 1999-01-18  Nathan Sidwell  <nathan@acm.org>
7729
7730         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
7731
7732         * class.c (resolve_address_of_overloaded_function): Show list of
7733         all candidates, when none of them match.
7734
7735 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
7736
7737         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
7738         definition of 'casting away const' in reinterpret_cast<>.
7739
7740 1999-01-18  Graham  <grahams@rcp.co.uk>
7741
7742         * cvt.c: Add include for decl.h, remove extern for
7743         static_aggregates which is now provided by decl.h.
7744
7745         * Makefile.in (cvt.o): Add dependency for decl.h and missing
7746         dependencies for convert.h and flags.h.
7747
7748 1999-01-18  Nathan Sidwell  <nathan@acm.org>
7749
7750         * decl2.c (do_dtors): Set current location to that of the
7751         decl, for sensible diagnostics and debugging.
7752         (check_classfn): Issue `incomplete type' error, if
7753         class is not defined.
7754
7755 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
7756
7757         * cp-tree.h: Add prototype for bound_pmf_p.
7758
7759 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
7760             Manfred Hollstein <manfred@s-direktnet.de>
7761
7762         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
7763         -Wreturn-type.
7764
7765 1999-01-16  Nathan Sidwell  <nathan@acm.org>
7766
7767         * cp-tree.h (struct lang_type): Added has_mutable flag.
7768         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
7769         (TYPE_HAS_MUTABLE_P): New macro to read it.
7770         (cp_has_mutable_p): Prototype for new function.
7771         * class.c (finish_struct_1): Set has_mutable from members.
7772         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
7773         it contains a mutable.
7774         * typeck.c (cp_has_mutable_p): New function.
7775
7776 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
7777
7778         * pt.c (process_template_parm): Ignore top-level qualifiers on
7779         non-type parameters.
7780
7781         * decl.c (start_function): Use current_function_parms in the call
7782         to require_complete_type_for_parms, not the probably empty
7783         DECL_ARGUMENTS.
7784
7785 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
7786
7787         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
7788
7789         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
7790         that we don't suppress the other copies.
7791         * lex.c (handle_cp_pragma): Likewise.
7792
7793 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
7794
7795         * decl.c (grokdeclarator): Undo 1998-12-14 change.
7796         * tree.c (build_cplus_array_type_1): Likewise.
7797         * pt.c (instantiate_class_template): Remove misleading comment.
7798         (tsubst_aggr_type): Substitute if there are template parameters,
7799         regardless of whether or not they use template arguments.
7800         (unify): Likewise, but for unification.
7801
7802 1999-01-12  Richard Henderson  <rth@cygnus.com>
7803
7804         * cp-tree.h (flag_permissive): Declare extern.
7805
7806 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
7807
7808         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
7809         here.
7810         (lang_type): Add is_partial_instantiation.  Decrease width of
7811         dummy.
7812         (PARTIAL_INSTANTIATION_P): New macro.
7813         (OPERATOR_TYPENAME_P): Remove.
7814         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
7815         OPERATOR_TYPENAME_P.
7816         (grok_op_properties): Likewise.
7817         * friend.c (do_friend): Handle friends that are member functions
7818         correctly.
7819         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
7820         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
7821         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
7822         any more partial instantiation than is absolutely necessary for
7823         implicit typename.  Set PARTIAL_INSTANTIATION_P.
7824         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
7825         * semantics.c (begin_class_definition): Handle partial
7826         specializations of a type that was previously partially
7827         instantiated.
7828
7829 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
7830
7831         * g++spec.c (LIBSTDCXX): Provide default definition.
7832         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
7833
7834 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7835
7836         * Make-lang.in (g++.o): Depend on prefix.h.
7837
7838 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
7839
7840         * tree.c (bound_pmf_p): New fn.
7841         * typeck.c (build_c_cast): Use it.
7842
7843         * decl.c (grok_op_properties): Use same_type_p.
7844
7845 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7846
7847         * Makefile.in (cvt.o): Depend on toplev.h.
7848
7849         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
7850
7851         * cvt.c: Include toplev.h.
7852
7853         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
7854         definitions.
7855
7856         * init.c (expand_vec_init): Initialize variable `itype'.
7857
7858         * lex.c (yyerror): Cast the argument passed to a ctype function to
7859         an unsigned char.
7860
7861         * method.c (build_mangled_C9x_name): Wrap prototype and definition
7862         in "HOST_BITS_PER_WIDE_INT >= 64".
7863
7864         * typeck.c (build_binary_op): Mark parameter `convert_p' with
7865         ATTRIBUTE_UNUSED.
7866
7867 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
7868
7869         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
7870         * tree.c (build_exception_variant): Don't crash on empty throw
7871         specs.
7872
7873 1998-12-18  DJ Delorie  <dj@cygnus.com>
7874
7875         * cvt.c (convert_to_reference): Check for both error_mark_node
7876         and NULL_NODE after call to convert_for_initialization.
7877
7878 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
7879
7880         * error.c (interesting_scope_p): New fn.
7881         (dump_simple_decl): Use it.
7882         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
7883         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
7884
7885 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
7886
7887         * class.c (resolve_address_of_overloaded_function): Do conversion
7888         to correct type here, rather than ...
7889         (instantiate_type): Here.
7890
7891         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
7892         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
7893         (decl_template_parm_p): Remove.
7894         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
7895         parameter.
7896         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
7897         * pt.c (push_inline_template_parms_recursive): Set it.
7898         (decl_template_parm_p): Remove.
7899         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
7900         (process_template_parm): Set it.
7901
7902 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
7903
7904         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
7905         if configured with cpplib.
7906
7907 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
7908
7909         * decl.c (poplevel): Make sure ns_binding is initialized.
7910
7911         * decl.c (finish_function): Undo inadvertent change in previous
7912         patch.
7913
7914 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
7915
7916         * class.c (pushclass): Tweak handling of class-level bindings.
7917         (resolve_address_of_overloaded_function): Update pointer-to-member
7918         handling.
7919         (instantiate_type): Likewise.
7920         * cvt.c (cp_convert_to_pointer): Likewise.
7921         * decl.c (pop_binding): Take the DECL to pop, not just the name.
7922         Deal with `struct stat' hack.
7923         (binding_level): Add to documentation.
7924         (push_binding): Clear BINDING_TYPE.
7925         (add_binding): New function.
7926         (push_local_binding): Use it.
7927         (push_class_binding): Likewise.
7928         (poplevel): Adjust calls to pop_binding.
7929         (poplevel_class): Likewise.
7930         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
7931         declarations to current binding level.
7932         (push_class_level_binding): Likewise.
7933         (push_overloaded_decl): Adjust handling of OVERLOADs in local
7934         bindings.
7935         (lookup_namespace_name): Don't crash when confronted with a
7936         TEMPLATE_DECL.
7937         (lookup_name_real): Do `struct stat' hack in local binding
7938         contexts.
7939         (build_ptrmemfunc_type): Adjust documentation.
7940         (grokdeclarator): Don't avoid building real array types when
7941         processing templates unless really necessary.
7942         (finish_method): Adjust calls to pop_binding.
7943         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
7944         not reparse_decl_as_expr.
7945         (build_expr_from_tree): Deal with a template-id as the function to
7946         call in a METHOD_CALL_EXPR.
7947         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
7948         (maybe_adjust_types_For_deduction): Don't do peculiar things with
7949         METHOD_TYPEs here.
7950         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
7951         pointer-to-member types where necessary.
7952         * tree.c (build_cplus_array_type_1): Don't avoid building real
7953         array types when processing templates unless really necessary.
7954         (build_exception_variant): Compare the exception lists correctly.
7955
7956 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
7957
7958         * cp-tree.def (CPLUS_BINDING): Update documentation.
7959         * cp-tree.h (LOCAL_BINDING_P): New macro.
7960         (lang_identifier): Rename local_value to bindings.
7961         (tree_binding): Make `scope' of type `void*', not `tree'.
7962         (BINDING_SCOPE): Update documentation.
7963         (IDENTIFIER_LOCAL_VALUE): Remove.
7964         (IDENTIFIER_CLASS_VALUE): Document.
7965         (IDENTIFIER_BINDING): New macro.
7966         (IDENTIFIER_VALUE): Likewise.
7967         (TIME_IDENTIFIER_TIME): Likewise.
7968         (TIME_IDENTIFIER_FILEINFO): Likewise.
7969         (IMPLICIT_TYPENAME_P): Likewise.
7970         (set_identifier_local_value): Remove.
7971         (push_local_binding): New function.
7972         (push_class_binding): Likewise.
7973         * class.c (pushclass): Update comments; use push_class_binding.
7974         * decl.c (set_identifier_local_value_with_scope): Remove.
7975         (set_identifier_local_value): Likewise.
7976         (push_binding): New function.
7977         (pop_binding): Likewise.
7978         (binding_level): Update documentation.  Remove shadowed.
7979         (BINDING_LEVEL): New macro.
7980         (free_binding_nodes): New variable.
7981         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
7982         BLOCK_VARs when doing for-scope extension.  Remove effectively
7983         dead code.
7984         (pushlevel_class): Tweak formatting.
7985         (poplevel_class): Adjust for new name-lookup scheme.
7986         (print_binding_level): Likewise.
7987         (store_bindings): Likewise.
7988         (pushdecl): Likewise.
7989         (pushdecl_class_level): Likewise.
7990         (push_class_level_binding): Likewise.
7991         (push_overloaded_decl): Update comments.  Adjust for new
7992         name-lookup scheme.
7993         (lookup_name_real): Likewise.
7994         (lookup_name_current_level): Likewise.
7995         (cp_finish_decl): Likewise.
7996         (require_complete_types_for_parms): Likewise.  Remove misleading
7997         #if 0'd code.
7998         (grok_parms): Likewise.  Don't call
7999         require_complete_types_for_parms here.
8000         (grok_ctor_properties): Don't treat templates as copy
8001         constructors.
8002         (grop_op_properties): Or as assignment operators.
8003         (start_function): Document.  Adjust for new name-lookup scheme.
8004         (finish_function): Likewise.
8005         * decl2.c (do_local_using_decl): Use push_local_binding.
8006         * lex.c (begin_definition_of_inclass_inline): New function, split
8007         out from ...
8008         (do_pending_inlines): Here, and ...
8009         (process_next_inline): Here.
8010         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
8011         (init_filename_times): Likewise.
8012         (extract_interface_info): Likewise.
8013         (ste_typedecl_interface_info): Likewise.
8014         (check_newline): Likewise.
8015         (dump_time_statistics): Likewise.
8016         (handle_cp_pragma): Likewise.
8017         (do_identifier): Adjust for new name-lookup scheme.
8018         * parse.y (function_try_block): Return ctor_initializer_opt value.
8019         (fndef): Use it.
8020         (fn.defpen): Pass appropriate values to start_function.
8021         (pending_inline): Use functor_try_block value, and pass
8022         appropriate values to finish_function.
8023         * pt.c (is_member_template): Update documentation; remove handling
8024         of FUNCTION_DECLs.  As per name, this function should deal only in
8025         TEMPLATE_DECLs.
8026         (decl_template_parm_p): Change name of olddecl parameter to decl.
8027         (check_template_shadow): Adjust for new name-lookup scheme.
8028         (lookup_template_class): Likewise.
8029         (tsubst_decl): Tweak so as not to confuse member templates with
8030         copy constructors and assignment operators.
8031         (unify): Handle UNION_TYPEs.
8032         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
8033         (lang_print_xnode): Adjust for new name-lookup scheme.
8034         * typeck.c (mark_addressable): Likewise.
8035         (c_expand_return): Likewise.
8036
8037 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
8038
8039         * decl.c (grokdeclarator): Allow field with same name as class
8040         in extern "C".
8041
8042         * decl.c (lookup_name_real): Don't limit field lookup to types.
8043         * class.c (check_member_decl_is_same_in_complete_scope): No error
8044         if icv and x are the same.
8045         * lex.c (do_identifier): Tweak error message.
8046
8047 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
8048
8049         * decl.c (start_enum): Use push_obstacks, not
8050         end_temporary_allocation.
8051         (finish_enum): Call pop_obstacks.
8052
8053 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
8054
8055         * class.c (instantiate_type): Return error_mark_node rather than
8056         junk.
8057
8058 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
8059
8060         * cp-tree.h (most_specialized_instantiation): New function.
8061         (print_candidates): Likewise.
8062         * class.c (validate_lhs): Remove.
8063         (resolve_address_of_overloaded_function): New function, split out
8064         and then substantially reworked, from ...
8065         (instantiate_type): Use it.  Simplify.
8066         * cvt.c (convert_to_reference): Complain when caller has indicated
8067         that's the right thing to do.  Don't crash if instantiate_type
8068         fails.
8069         * pt.c: Substitute `parameters' for `paramters' throughout.
8070         (print_candidates): Don't make it static.
8071         (most_specialized_instantiation): Split out from ...
8072         (most_specialized): Here.
8073
8074 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
8075
8076         * lex.c (lang_init_options): Initialize cpplib.
8077         * decl2.c (parse_options,cpp_initialized): Removed.
8078         (lang_decode_option): Move initialization of cpplib to
8079         lang_init_options.
8080
8081 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
8082
8083         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
8084         well as the TYPE_DECL, when a typedef name is assigned to a
8085         previously anonymous type.
8086
8087 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
8088
8089         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
8090         __cp_eh_info for getting the eh info pointer.  Add table_index to
8091         field list.
8092         (push_eh_cleanup): Don't increment 'handlers' data field.
8093         (process_start_catch_block): Don't set the 'caught' field.
8094
8095         * cp/exception.cc (CP_EH_INFO): New macro for getting the
8096         exception info pointer within library routines.
8097         (__cp_eh_info): Use CP_EH_INFO.
8098         (__start_cp_handler): Get exception info pointer, set caught field,
8099         and increment the handlers field.  Avoids this being done by handlers.
8100         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
8101         (uncaught_exception): Use CP_EH_INFO macro.
8102
8103 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
8104
8105         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
8106
8107 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
8108
8109         * lex.c (check_newline): Add support for \ as `natural'
8110         characters in file names in #line to be consistent with #include
8111         handling.  We support escape processing in the # 1 "..." version of
8112         the command.  See also support in cp/lex.c.
8113
8114 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
8115
8116         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
8117         structure.
8118
8119 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
8120
8121         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
8122
8123         * error.c (dump_simple_decl): Also print namespace context.
8124         (dump_function_decl): Likewise.
8125
8126         * decl2.c (ambiguous_decl): Don't print old value if it's
8127         error_mark_node.
8128
8129         * decl.c (lookup_name_real): Fix handling of local types shadowed
8130         by a non-type decl.  Remove obsolete code.
8131         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
8132
8133         * lang-options.h: Add -fpermissive.
8134         * decl2.c: Likewise.
8135         * cp-tree.h: Add flag_permissive.
8136         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
8137         were specified, set flag_pedantic_errors.
8138         * call.c (build_over_call): Turn dropped qualifier messages
8139         back into pedwarns.
8140         * cvt.c (convert_to_reference): Likewise.
8141         * typeck.c (convert_for_assignment): Likewise.
8142
8143 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
8144
8145         * decl2.c (coerce_new_type): Use same_type_p.
8146         (coerce_delete_type): Likewise.
8147
8148         * call.c (check_dtor_name): Return 1, not error_mark_node.
8149
8150 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
8151
8152         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
8153         if MULTIPLE_SYMBOL_SPACES.
8154
8155         * pt.c (check_template_shadow): New fn.
8156         * decl2.c (grokfield): Use it.
8157         * decl.c (pushdecl): Likewise.
8158         (pushdecl_class_level): Likewise.
8159         (start_method): Likewise.
8160         (xref_tag): Don't try to use 't' if we're defining.
8161
8162         * call.c (check_dtor_name): Just return an error_mark_node.
8163         * pt.c (lookup_template_class): Complain about using non-template here.
8164         * parse.y (apparent_template_type): Not here.
8165
8166         * pt.c (check_explicit_specialization): Complain about specialization
8167         with C linkage.
8168
8169         * lang-options.h: Add -f{no-,}implicit-inline-templates.
8170
8171         * pt.c (convert_nontype_argument): Don't assume that any integer
8172         argument is intended to be a constant-expression.
8173
8174 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
8175
8176         * class.c (handle_using_decl): Fix comment.  Don't lookup
8177         constructors in base classes.
8178         (validate_lhs): Fix typo in comment.
8179         * search.c (lookup_field_1): Don't return a USING_DECL.
8180
8181         * cp-tree.h (DECL_ACCESS): Improve documentation.
8182
8183         * decl.c (expand_static_init): Don't set the initialization-done
8184         flag until the initialization is done.
8185
8186 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
8187
8188         * decl2.c (validate_nonmember_using_decl): Complain about using
8189         declarations for class members.
8190
8191 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
8192
8193         * typeck2.c (process_init_constructor): Use same_type_p.
8194
8195         * decl.c (check_tag_decl): Don't warn about null decl inside a
8196         class.
8197
8198         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
8199         UNIFY_ALLOW_NONE.
8200         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
8201         (resolve_overloaded_unification): Strip baselinks.
8202
8203 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8204
8205         * g++spec.c: Don't prototype xmalloc.
8206
8207 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
8208
8209         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
8210
8211         * decl.c (check_tag_decl): Do complain about null friend decl at
8212         file scope.
8213
8214 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
8215
8216         * lex.c (make_lang_type): Clear the whole struct lang_type, not
8217         only the first multiple of sizeof (int).
8218
8219 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
8220
8221         * decl.c (start_decl): An explicit specialization of a static data
8222         member is only a definition if it has an initializer.
8223
8224         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
8225         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
8226         cp_finish_decl.
8227         * init.c (expand_default_init): Check for DIRECT_BIND instead of
8228         DECL_ARTIFICIAL.
8229
8230         * call.c (build_over_call): Use build_decl.
8231
8232         * except.c (expand_throw): Just use convert, not
8233         build_reinterpret_cast.
8234
8235         * lex.c (handle_generic_pragma): Use token_buffer.
8236
8237         * decl.c (check_tag_decl): Don't complain about null friend decl.
8238
8239 1998-11-24  Dave Pitts  <dpitts@cozx.com>
8240
8241         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
8242         first position.
8243         * lex.c (check_newline): Use ISALPHA.
8244         (readescape): Use ISGRAPH.
8245         (yyerror): Use ISGRAPH.
8246
8247 1998-11-24  Nathan Sidwell  <nathan@acm.org>
8248
8249         * search.c (get_abstract_virtuals): Do not use initial
8250         CLASSTYPE_ABSTRACT_VIRTUALS.
8251         * typeck2.c (abstract_virtuals_error): Show location of abstract
8252         declaration.
8253         * call.c (build_new_method_call): Use
8254         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
8255         * class.c (finish_struct_bits): Don't bother working out whether
8256         get_abstract_virtuals will do anything, just do it.
8257
8258 1998-11-24  Graham  <grahams@rcp.co.uk>
8259
8260         * typeck.c (build_component_ref): Remove unused statement.
8261
8262 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
8263
8264         * class.c (add_method): Catch invalid overloads.
8265
8266         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
8267         * search.c (lookup_conversions): Handle getting real OVERLOADs.
8268         (add_conversions): Likewise.  Revert last change.
8269         * call.c (add_conv_candidate): Pass totype to add_candidate instead
8270         of fn.  Don't add a new candidate if the last one was for the same
8271         type.
8272         (print_z_candidates): Handle getting a type as a function.
8273         (joust): If we got two conversion candidates to the same type,
8274         just pick one.
8275         (build_object_call): Lose 'templates'.
8276         (build_user_type_conversion_1): Handle getting real OVERLOADs.
8277
8278 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
8279
8280         * typeck2.c (process_init_constructor): If there are elements
8281         that don't have initializers and they need to have constructors
8282         run, supply them with initializers.
8283
8284         * class.c (finish_struct_1): A class with a 0-width bitfield is
8285         still empty.
8286
8287 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
8288
8289         * pt.c (instantiate_class_template): Don't try to figure out what
8290         specialization to use for a partial instantiation.  Correct
8291         typos in a couple of comments.  Avoid calling uses_template_parms
8292         multiple times.
8293
8294 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
8295
8296         * method.c (process_overload_item): Add call to
8297         build_mangled_C9x_name for intTI_type_nodes.
8298         (build_mangled_C9x_name): Add prototype, define.
8299         * decl.c (init_decl_processing): Add names for
8300         TImode_type_node.
8301
8302 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
8303
8304         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
8305
8306         * class.c (finish_struct_1): Set things up for 0-width bitfields
8307         like we do for others.
8308
8309         * decl.c (check_tag_decl): New fn.
8310         (shadow_tag): Split out from here.
8311         * decl2.c (grok_x_components): Call it.
8312
8313 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
8314
8315         * decl.c: Lose warn_about_return_type.
8316         (grokdeclarator): Always complain about implicit int, except for
8317         `main () { ... }'.
8318
8319         * decl.c (tag_name): New fn.
8320         (xref_tag): Complain about using typedef-name after class-key.
8321
8322         * init.c (expand_vec_init): Also keep going if from_array.
8323
8324         * tree.c (is_overloaded_fn): Also handle the output of
8325         build_offset_ref.
8326
8327         * decl.c (grokdeclarator): Use constructor_name when comparing
8328         field name against enclosing class.
8329         * class.c (finish_struct_anon): Likewise.
8330
8331 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
8332
8333         * decl.c (poplevel): Remove code to handle KEEP == 2.
8334         (finish_function): Don't confuse BLOCK-order when
8335         processing a destructor.
8336
8337 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
8338
8339         * decl.c (require_complete_types_for_parms): Call layout_decl
8340         after we've completed the type.
8341
8342 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8343
8344         * decl2.c (validate_nonmember_using_decl): Allow using templates
8345         from the global namespace.
8346
8347 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
8348
8349         Handle specifying template args to member function templates.
8350         * tree.c (build_overload): Always create an OVERLOAD for a template.
8351         * search.c (add_conversions): Handle finding an OVERLOAD.
8352         * decl2.c (check_classfn): Likewise.
8353         * lex.c (identifier_type): See through a baselink.
8354         * parse.y (do_id): Don't call do_identifier if we got a baselink.
8355         * class.c (instantiate_type, case TREE_LIST): Recurse.
8356
8357         * decl.c (grokdeclarator): Allow a boolean constant for array
8358         bounds, odd as that sounds.
8359
8360         * pt.c (unify): Be more strict about non-type parms, except for
8361         array bounds.
8362         (UNIFY_ALLOW_INTEGER): New macro.
8363
8364 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
8365
8366         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
8367
8368 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
8369
8370         * semantics.c (begin_class_definition): Call
8371         maybe_process_partial_specialization before push_template_decl.
8372         Don't call push_template_decl for a specialization.
8373         * search.c (lookup_field): Do return a member template class.
8374         * decl2.c (handle_class_head): Handle member template classes.
8375
8376         * decl.c (grokdeclarator): A parm type need not be complete.
8377
8378         * pt.c (convert_nontype_argument): Fix thinko.
8379
8380 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
8381
8382         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
8383         (global_delete_fndecl): New variable.
8384         * decl.c (global_delete_fndecl): Define it.
8385         (init_decl_processing): Set it.
8386         * init.c (build_builtin_delete_call): Use it.
8387         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
8388         nodes.
8389
8390 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
8391
8392         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
8393         type.
8394
8395         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
8396         * call.c (build_object_call): Also support references to functions.
8397         * typeck.c (convert_for_initialization): Don't decay a function
8398         if the target is a reference to function.
8399
8400         * search.c (add_conversions): Get all the overloads from a class.
8401
8402         * decl.c (grok_ctor_properties): Complain about any constructor
8403         that will take a single arg of the class type by value.
8404
8405         * typeck2.c (build_functional_cast): Can't create objects of
8406         abstract classes this way.
8407         * cvt.c (ocp_convert): Likewise.
8408
8409         * decl.c (grokfndecl): Member functions of local classes are not
8410         public.
8411
8412 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
8413
8414         * Make-lang.in (cc1plus): Add dependency on hash.o.
8415
8416 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
8417
8418         * search.c (get_abstract_virtuals): Complain about virtuals with
8419         no final overrider.
8420         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
8421         with no final overrider.
8422         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
8423         on virtuals with no final overrider.
8424
8425         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
8426
8427         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
8428         after layout_type.
8429
8430         * friend.c (do_friend): Don't set_mangled_name_for_decl.
8431
8432         * class.c (finish_struct_anon): Complain about non-fields.
8433         * decl2.c (build_anon_union_vars): Likewise.
8434
8435         * decl.c (grokdeclarator): Normal data members can't have the same
8436         name as the class, either.
8437         * class.c (finish_struct_anon): Neither can members of an
8438         anonymous union.
8439
8440 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
8441
8442         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
8443         (TYPE_BINFO): Likewise.
8444         (IS_AGGR_TYPE): Tweak.
8445         (SET_IS_AGGR_TYPE): New macro.
8446         (CLASS_TYPE_P): Tweak.
8447         (lang_type): Group mark bitfields together.  Remove linenum.
8448         (CLASSTYPE_SOURCE_LINE): Remove macro.
8449         (CLASSTYPE_MARKED_N): New macro.
8450         (SET_CLASSTYPE_MARKED_N): Likewise.
8451         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
8452         (CLASS_TYPE_MARKED_*): Use them.
8453         (SET_CLASSTYPE_MARKED_*): Likewise.
8454         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
8455         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
8456         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
8457         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
8458         * class.c (class_cache_obstack): New variable.
8459         (class_cache_firstobj): Likewise.
8460         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
8461         (pushclass): Free the cache, when appropriate.
8462         (popclass): Tidy.
8463         (maybe_push_cache_obstack): Use class_cache_obstack.
8464         * decl.c (include hash.h).
8465         (typename_hash): New function.
8466         (typename_compare): Likewise.
8467         (build_typename_type): Check the hash table to avoid creating
8468         duplicates.
8469         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
8470         (grokdeclarator): Use CLASS_TYPE_P.
8471         (xref_basetypes): Likewise.
8472         (start_function): Likewise.  Don't put current_class_ref on the
8473         permanent obstack.
8474         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
8475         and TYPE_TI_ARGS.
8476         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
8477         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
8478         fields for types other than class types.  Do clear TYPE_ALIAS_SET
8479         for types other than class types, though.
8480         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
8481         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8482         * pt.c (process_template_parm): Don't set
8483         CLASSTYPE_GOT_SEMICOLON.
8484         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8485         Coerce arguments on the momentary obstack.
8486         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8487         (instantiate_class_template): Calculate template arguments on the
8488         momentary obstack.  Tidy.
8489         (tsubst_template_arg_vector): Use make_temp_vec.
8490         (tsubst_aggr_type): Put template arguments on the momentary
8491         obstack.
8492         (tsubst_decl): Likewise.
8493         (tsubst): Copy the array bounds index to the permanent obstack
8494         before building index types.  Use new macros.
8495         (unify): Use new macros.
8496         (do_type_instantiation): Likewise.
8497         * search.c (lookup_fnfields_1): Use new macros.
8498         (dfs_pushdecls): Build envelopes on the cache obstack.
8499         (dfs_compress_decls): Use new macros.
8500         (push_class_decls): Build on the cache obstack.
8501         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
8502         * sign.c (build_signature_pointer_or_reference_type): Use
8503         SET_IS_AGGR_TYPE.
8504         * tree.c (make_binfo): Check CLASS_TYPE_P.
8505         (copy_template_template_parm): Adjust.
8506         (make_temp_vec): Use push_expression_obstack.
8507         * typeck.c (complete_type): Use new macros.
8508         (comptypes): Likewise.
8509
8510 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
8511
8512         * pt.c (tsubst): Add diagnostics for invalid array, reference
8513         and pointer to member types.
8514
8515 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
8516
8517         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
8518
8519         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
8520         Simplify.
8521
8522         * parse.y (structsp): Fix cut-and-paste error.
8523
8524         * init.c (build_new): Complain about non-integral size.
8525
8526         * parse.y (unary_expr): Complain about defining types in sizeof.
8527
8528         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
8529
8530         * rtti.c (build_x_typeid): Complain about typeid without
8531         including <typeinfo>.
8532         (get_typeid): Likewise.  Complain about typeid of incomplete type.
8533         (get_tinfo_fn_dynamic): Likewise.
8534         (get_typeid_1): Not static anymore.
8535         * except.c (build_eh_type_type): Use get_typeid_1.
8536
8537         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
8538         ambiguous or private bases.  Fix warning for reference cast.
8539
8540 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
8541
8542         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
8543         * decl.c (duplicate_decls): Remove special-case code to deal with
8544         template friends, and just do the obvious thing.
8545         * pt.c (register_specialization): Tweak for clarity, and also to
8546         clear DECL_INITIAL for an instantiation before it is merged with a
8547         specialization.
8548         (check_explicit_specialization): Fix indentation.
8549         (tsubst_friend_function): Handle both definitions in friend
8550         declaration and outside friend declarations.
8551         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
8552         (regenerate_decl_from_template): Tweak accordingly.
8553         (instantiate_decl): Likewise.
8554
8555 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
8556
8557         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
8558         member function reference to error.
8559         * cvt.c (ocp_convert): Complain about converting an overloaded
8560         function to void.
8561
8562         * init.c (build_offset_ref): Just return a lone static member
8563         function.
8564
8565         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
8566         not internal ones.
8567
8568         * typeck.c (build_binary_op_nodefault): Improve error handling.
8569
8570         * decl.c (grokfndecl): Complain about making 'main' a template.
8571
8572         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
8573
8574         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
8575         TYPE_DECL in a template.
8576
8577 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
8578
8579         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
8580
8581         * decl.c (struct cp_function): Add named_label_uses.
8582         (push_cp_function_context): Save it.
8583         (pop_cp_function_context): Restore it.
8584         (define_label): Also complain about jumping into the scope of
8585         non-POD objects that don't have constructors.
8586         * tree.c (pod_type_p): New fn.
8587
8588         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
8589         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
8590         (get_tinfo_fn): Not here.
8591         * repo.c (repo_get_id): Abort if we get called for an incomplete
8592         type.
8593
8594 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
8595
8596         * except.c (expand_throw): Make sure first argument to
8597         __cp_push_exception is of type `void*' to avoid spurious error
8598         messages.
8599
8600 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
8601
8602         * pt.c (try_one_overload): Take orig_targs again.  Only check for
8603         mismatches against them; we don't care what a previous call found.
8604         (resolve_overloaded_unification): Adjust.
8605
8606         * search.c (lookup_field): Don't return anything for a non-type
8607         field from a dependent type.
8608         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
8609         in an array declarator.
8610         (start_decl): Push into the class before looking for the field.
8611
8612 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
8613
8614         * method.c (build_overload_value): Handle REFERENCE_TYPE.
8615
8616 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8617
8618         * decl.c (grokdeclarator): Allow namespace-scoped members if they
8619         are friends.
8620
8621 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
8622
8623         * pt.c (tsubst_decl): Don't mess with the global value of an
8624         un-mangled DECL_ASSEMBLER_NAME.
8625
8626 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
8627
8628         * decl.c (init_decl_processing): Remove CYGWIN conditional
8629         since CYGWIN is now able to deal with trapping signals.
8630
8631 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8632
8633         * cp-tree.h: Don't include gansidecl.h.
8634         * exception.cc: Include gansidecl.h (since we don't include config.h)
8635         * g++spec.c: Don't include gansidecl.h.
8636
8637 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
8638
8639         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
8640         size of dummy.
8641         (DECL_DEFINED_IN_CLASS_P): New macro.
8642         (TEMPLATE_PARMS_FOR_INLINE): Document.
8643         (check_static_variable_definition): New function.
8644         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
8645         appropriate.
8646         (check_static_variable_definition): Split out from ...
8647         (grokdeclarator): Here.
8648         * pt.c (check_default_tmpl_args): New function, split out from ...
8649         (push_template_decl_real): Here.
8650         (instantiate_template): Fix comment.
8651
8652 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
8653
8654         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
8655         (CP_TYPE_VOLATILE_P): Likewise.
8656         (CP_TYPE_RESTRICT_P): Likewise.
8657
8658 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
8659
8660         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
8661
8662 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
8663
8664         * class.c (instantiate_type): Be more helpful.
8665
8666         * decl2.c (import_export_decl): Call import_export_class.
8667
8668         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
8669         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
8670         * pt.c (tsubst_copy): Likewise.
8671
8672 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
8673
8674         * init.c (expand_vec_init): Fix off-by-one error.
8675
8676 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
8677
8678         * parse.y (apparent_template_type): New type.
8679         (named_complex_class_head_sans_basetype): Use it.
8680         * Makefile.in (CONFLICTS): One new conflict.
8681         * parse.c: Regenerated.
8682
8683 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
8684
8685         * cp-tree.h (COMPARE_STRICT): New macro.
8686         (COMPARE_BASE): Likewise.
8687         (COMPARE_RELAXED): Likewise.
8688         (COMPARE_REDECLARATION): Likewise.
8689         (same_type_p): Likewise.
8690         (same_or_base_type_p): Likewise.
8691         * call.c (standard_conversion): Use them, in place of comptypes
8692         with numeric arguments.
8693         (reference_binding): Likewise.
8694         (convert_like): Likewise.
8695         (build_over_call): Likewise.
8696         (is_subseq): Likewise.
8697         (is_properly_derived_from): Likewise.
8698         (compare_ics): Likewise.
8699         (joust): Likewise.
8700         * class.c (delete_duplicate_fields_1): Likewise.
8701         (resolves_to_fixed_type_p): Likewise.
8702         (instantiate_type): Likewise.  Remove #if 0'd code.
8703         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
8704         (pushdecl): Likewise.
8705         (lookup_name_real): Likewise.
8706         (grokdeclarator): Likewise.  Check for illegal array declarations.
8707         (grokparms): Likewise.
8708         (grok_op_properties): Likewise.
8709         * decl2.c (check_classfn): Likewise.
8710         * friend.c (is_friend): Likewise.
8711         (make_friend_class): Likewise.
8712         * init.c (expand_aggr_init): Likewise.
8713         (expand_vec_init): Likewise.
8714         * pt.c (is_member_template_class): Remove declaration.
8715         (is_specialization_of): Use COMPARE_* and new macros.
8716         (comp_template_parms): Likewise.
8717         (convert_nontype_argument): Likewise.
8718         (coerce_template_template_parms): Likewise.
8719         (template_args_equal): Likewise.
8720         (lookup_template_class): Likewise.
8721         (type_unification_real): Likewise.
8722         (unify): Likewise.
8723         (get_bindings_real): Likewise.
8724         * search.c (covariant_return_p): Likewise.
8725         (get_matching_virtual): Likewise.
8726         * sig.c (match_method_types): Likewise.
8727         * tree.c (vec_binfo_member): Likewise.
8728         (cp_tree_equal): Likewise.
8729         * typeck.c (common_type): Likewise.
8730         (comp_array_types): Likewise.  Get issues involving unknown array
8731         bounds right.
8732         (comptypes): Update comments.  Use new flags.
8733         (comp_target_types): Use new macros.
8734         (compparms): Likewise.
8735         (comp_target_parms): Likewise.
8736         (string_conv_p): Likewise.
8737         (build_component_ref): Likewise.
8738         (build_indirect_ref): Likewise.
8739         (build_conditional_expr): Likewise.
8740         (build_static_cast): Likewise.
8741         (build_reinterpret_cast): Likewise.
8742         (build_const_cast): Likewise.
8743         (build_modify_expr): Likewise.
8744         (convert_for_assignment): Likewise.
8745         (comp_ptr_ttypes_real): Likewise.
8746         (ptr_reasonably_similar): Likewise.
8747         (comp_ptr_ttypes_const): Likewise.
8748
8749 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
8750
8751         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
8752
8753 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
8754
8755         * decl2.c (delete_sanity): Pass integer_zero_node, not
8756         integer_two_node, to build_vec_delete.
8757         * init.c (build_array_eh_cleanup): Remove.
8758         (expand_vec_init_try_block): New function.
8759         (expand_vec_init_catch_clause): Likewise.
8760         (build_vec_delete_1): Don't deal with case that auto_delete_vec
8761         might be integer_two_node anymore.
8762         (expand_vec_init): Rework for initialization-correctness and
8763         exception-correctness.
8764         * typeck2.c (process_init_constructor): Make mutual exclusivity
8765         of cases more obvious.
8766
8767 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
8768
8769         * decl.c (lookup_name_real): OK, only warn if not lexing.
8770         Simplify suggested fix.
8771
8772         * cp-tree.h (IDENTIFIER_MARKED): New macro.
8773         * search.c (lookup_conversions): Use breadth_first_search.
8774         (add_conversions): Avoid adding two conversions to the same type.
8775         (breadth_first_search): Work with base binfos, rather
8776         than binfos and base indices.
8777         (get_virtual_destructor): Adjust.
8778         (tree_has_any_destructor_p): Adjust.
8779         (get_matching_virtual): Adjust.
8780
8781         * pt.c (push_template_decl_real): Generalize check for incorrect
8782         number of template parms.
8783         (is_member_template_class): #if 0.
8784
8785 1998-10-29  Richard Henderson  <rth@cygnus.com>
8786
8787         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
8788         last.
8789
8790 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
8791
8792         * lex.c: Call check_newline from lang_init always.  After
8793         calling cpp_start_read, set yy_cur and yy_lim to read from the
8794         cpplib token buffer.
8795
8796 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
8797
8798         * class.c (instantiate_type): Don't consider templates for a normal
8799         match.
8800
8801         * class.c (finish_struct_1): Don't complain about non-copy
8802         assignment ops in union members.
8803
8804         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
8805         (prepare_fresh_vtable): Likewise.
8806         (finish_struct_1): Don't call import_export_class.
8807         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
8808         (finish_prevtable_vardecl): Lose.
8809         (finish_file): Don't call it.
8810         * pt.c (instantiate_class_template): Likewise.
8811         * cp-tree.h: Remove it.
8812
8813         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
8814         * decl.c (finish_function): Not here.
8815         (start_function): Do set DECL_INITIAL.
8816
8817         * pt.c (push_template_decl_real): Complain about default template
8818         args for enclosing classes.
8819
8820         * call.c (add_function_candidate): Treat conversion functions
8821         as coming from the argument's class.
8822         * cp-tree.h (DECL_CONV_FN_P): New fn.
8823         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
8824         * class.c (add_method): Use DECL_CONV_FN_P.
8825         * decl2.c (check_classfn): Likewise.
8826         * error.c (dump_function_name): Likewise.
8827         (dump_function_decl): Likewise.
8828         * pt.c (fn_type_unification): Likewise.
8829         * search.c (add_conversions): Likewise.
8830
8831 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
8832
8833         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
8834         * method.c (hack_identifier): Also check for using RESULT_DECL
8835         from outer context.
8836
8837 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
8838
8839         * decl.c (grokdeclarator): Use type_quals, rather than constp,
8840         consistently.
8841
8842 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
8843
8844         * call.c (standard_conversion): instantiate_type here.
8845         (reference_binding): And here.
8846         (implicit_conversion): Not here.
8847         (build_op_delete_call): No need to cons up an OVERLOAD.
8848         * cvt.c (cp_convert_to_pointer): instantiate_type here.
8849         (convert_to_reference): And here.
8850         * decl.c (grok_reference_init): Not here.
8851         (grokparms): Or here.
8852         * typeck2.c (digest_init): Or here.
8853         * typeck.c (decay_conversion): Take the address of overloaded
8854         functions, too.
8855         (require_instantiated_type): Lose.
8856         (convert_arguments): Don't handle unknown types here.
8857         (build_c_cast): Likewise.
8858         (build_binary_op): Gut.
8859         (build_conditional_expr): Don't require_instantiated_type.
8860         (build_modify_expr): Likewise.
8861         (build_static_cast): Don't instantiate_type.
8862         (build_reinterpret_cast): Likewise.
8863         (build_const_cast): Likewise.
8864         (convert_for_initialization): Likewise.
8865         (build_ptrmemfunc): Use type_unknown_p.
8866         (convert_for_assignment): Also do default_conversion on overloaded
8867         functions.  Hand them off to ocp_convert.
8868
8869 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
8870
8871         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
8872         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
8873
8874         * class.c (finish_struct_1): Use build_cplus_array_type to build
8875         array types.
8876         * decl.c (init_decl_processing): Likewise.
8877         * except.c (expand_end_eh_spec): Likewise.
8878         * search.c (expand_upcast_fixups): Simplify very slightly.
8879
8880 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
8881
8882         * decl.c (grokdeclarator): Complain about a variable using
8883         constructor syntax coming back null from start_decl.
8884
8885         * friend.c (make_friend_class): Complain about trying to make
8886         a non-class type a friend.
8887
8888         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
8889         (start_function): Not here.
8890
8891 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
8892
8893         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
8894
8895 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
8896
8897         * typeck2.c (process_init_constructor): Only skip anonymous fields
8898         if they are bitfields.
8899
8900         * cp-tree.def (TYPEOF_TYPE): New code.
8901         * error.c (dump_type_real): Handle it.
8902         * pt.c (tsubst): Likewise.
8903         * tree.c (search_tree): Likewise.
8904         * semantics.c (finish_typeof): New fn.
8905         * parse.y (typespec): Use it.
8906         * cp-tree.h: Declare it.
8907
8908 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
8909
8910         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
8911
8912 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
8913
8914         * typeck.c (convert_arguments): Don't handle pmf references
8915         specially.
8916
8917         * init.c (build_member_call): Don't try to convert to the base type
8918         if it's ambiguous or pedantic.
8919
8920         * typeck2.c (check_for_new_type): Only depend on pedantic for
8921         C-style casts.
8922
8923 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
8924
8925         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
8926         non-converting constructors.
8927
8928 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8929
8930         * gxxint.texi: Correct documentation for n, N, Q, and B.
8931
8932 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8933
8934         * parse.y (condition): Convert VAR_DECL from reference to indirect
8935         reference.
8936
8937 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
8938
8939         * exception.cc (__cp_pop_exception): Free the original exception
8940         value, not the potentially coerced one.
8941
8942 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
8943
8944         * Makefile.in (hash.h): Run gperf when necessary.
8945
8946         * cp-tree.h (CP_TYPE_READONLY): Remove.
8947         (CP_TYPE_VOLATILE): Likewise.
8948         (CP_TYPE_QUALS): New macro.
8949         (CP_TYPE_CONST_P): Likewise.
8950         (CP_TYPE_VOLATILE_P): Likewise.
8951         (CP_TYPE_RESTRICT_P): Likewise.
8952         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
8953         (cp_build_type_variant): Rename to ...
8954         (cp_build_qualified_type): New function.
8955         (c_apply_type_quals_to_decl): Declare.
8956         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
8957         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
8958         (cp_type_qual_from_rid): New function.
8959         (compparms): Remove unused parameter.  All callers changed.
8960         (cp_type_quals): New function.
8961         (at_least_as_qualified_p): Likewise.
8962         (more_qualified_p): Likewise.
8963
8964         * call.c (standard_conversion): Replace calls to
8965         cp_build_type_variant with cp_build_qualified_type.  Use
8966         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
8967         compare them.  Use CP_TYPE_* macros to check qualifiers.
8968         (reference_binding): Likewise.
8969         (implicit_conversion): Likewise.
8970         (add_builtin_candidates): Likewise.
8971         (build_over_call): Likewise.
8972         * class.c (overrides): Compare all qualifiers, not just `const',
8973         on method declarations.
8974         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
8975         (convert_pointer_to_real): Likewise.
8976         (type_promotes_to): Likewise.
8977         * decl.c (check_for_uninitialized_const_var): New function.
8978         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
8979         (cp_finish_decl): Use check_for_uninitialized_const_var.
8980         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
8981         handle `restrict'.
8982         (grok_ctor_properties): Likewise.
8983         (grok_op_properties): Likewise.
8984         (start_function): Likewise.
8985         (rever_static_member_fn): Likewise.
8986         * decl2.c (grok_method_quals): Likewise.
8987         (grokfield): Likewise.
8988         * error.c (dump_readonly_or_volatile): Rename to ...
8989         (dump_qualifiers): New function.  Handle `restrict'.
8990         (dump_type_real): Use it.
8991         (dump_aggr_type): Likewise.
8992         (dump_type_prefix): Likewise.
8993         (dump_type_suffix): Likewise.
8994         (dump_function_decl): Likewise.
8995         (cv_as_string): Likewise.
8996         * gxx.gperf: Add __restrict and __restrict__.
8997         * gxxint.texi: Document `u' as used for `__restrict', and a few
8998         other previously undocumented codes.
8999         * hash.h: Regenerated.
9000         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
9001         (build_member_call): Likewise.
9002         (build_new_1): Likewise.
9003         * lex.c (init_parse): Add entry for RID_RESTRICT.
9004         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
9005         (cp_type_qual_from_rid): Define.
9006         * lex.h (enum rid): Add RID_RESTRICT.
9007         * method.c (process_modifiers): Deal with `restrict'.
9008         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
9009         * parse.c: Regenerated.
9010         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
9011         (tsubst_aggr_type): Likewise.
9012         (tsubst): Likewise.
9013         (check_cv_quals_for_unify): Likewise.
9014         (unify): Likewise.
9015         * rtti.c (init_rtti_processing): Likewise.
9016         (build_headof): Likewise.
9017         (get_tinfo_var): Likewise.
9018         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
9019         (expand_class_desc): Likewise.
9020         (expand_attr_desc): Likewise.
9021         (synthesize_tinfo_fn): Likewise.
9022         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
9023         (get_matching_virtual): Likewise.
9024         (expand_upcast_fixups): Likewise.
9025         * sig.c (build_signature_pointer_or_reference_name): Take
9026         type_quals, not constp and volatilep.
9027         (build_signature_pointer_or_reference_type): Likewise.
9028         (match_method_types): More CP_TYPE_QUALS conversion, etc.
9029         (build_signature_pointer_constructor): Likewise.
9030         (build_signature_method_call): Likewise.
9031         * tree.c (build_cplus_array_type): Likewise.
9032         (cp_build_type_variant): Rename to ...
9033         (cp_build_qualified_type): New function.  Deal with `__restrict'.
9034         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
9035         (build_exception_variant): Likewise.
9036         (mapcar): Likewise.
9037         * typeck.c (qualif_type): Likewise.
9038         (common_type): Likewise.
9039         (comptypes): Likewise.
9040         (comp_cv_target_types): Likewise.
9041         (at_least_as_qualified_p): Define.
9042         (more_qualified_p): Likewise.
9043         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
9044         (compparms): Likewise.
9045         (inline_conversion): Likewise.
9046         (string_conv_p): Likewise.
9047         (build_component_ref): Likewise.
9048         (build_indirect_ref): Likewise.
9049         (build_array_ref): Likewise.
9050         (build_unary_op): Likewise.
9051         (build_conditional_expr): Likewise.
9052         (build_static_cast): Likewise.
9053         (build_c_cast): Likewise.
9054         (build_modify_expr): Likewise.
9055         (convert_For_assignment): Likewise.
9056         (comp_ptr_ttypes_real): Likewise.
9057         (cp_type_quals): New function.
9058
9059 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
9060
9061         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
9062         (CP_TYPE_VOLATILE): Likewise.
9063         * decl.c (grokdeclarator): Use them.
9064         * tree.c (canonical_type_variant): Likewise.
9065
9066 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9067
9068         * parse.y (named_class_head): Push into class while parsing the
9069         base class list.
9070         * decl2.c (push_scope, pop_scope): New functions.
9071         * cp-tree.h: Declare them.
9072         * init.c (build_new_1): Delay cleanup until end of full expression.
9073
9074 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
9075
9076         * typeck.c (build_component_ref): Use of a type here is an error.
9077
9078 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
9079
9080         Revamp references to member functions.
9081         * method.c (hack_identifier): Call build_component_ref for a
9082         reference to a member function.
9083         * typeck.c (build_component_ref): Only return a single function
9084         if it's static.  Otherwise, return a COMPONENT_REF.
9085         (build_x_function_call): Handle a COMPONENT_REF.
9086         (build_unary_op): Handle all unknown-type things.
9087         * decl2.c (arg_assoc): Handle COMPONENT_REF.
9088         * class.c (instantiate_type): Complain if the function we get is a
9089         nonstatic member function.  Remove code for finding "compatible"
9090         functions.
9091         * pt.c (tsubst_copy): Handle NOP_EXPR.
9092         * tree.c (build_dummy_object): New fn.
9093         (maybe_dummy_object): New fn.
9094         (is_dummy_object): New fn.
9095         * cp-tree.h: Declare them.
9096         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
9097         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
9098         * init.c (build_member_call): Use maybe_dummy_object and
9099         is_dummy_object.
9100         (build_offset_ref): Use maybe_dummy_object.
9101         (resolve_offset_ref): Use is_dummy_object.
9102         * typeck.c (build_x_function_call): Call build_dummy_object.
9103         (unary_complex_lvalue): Call is_dummy_object.
9104
9105         * typeck.c (build_component_addr): Make sure field is a field.
9106
9107         * call.c (build_new_op): Delete obsolete code.
9108
9109         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
9110
9111 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9112
9113         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
9114         std if std is ignored.
9115
9116 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
9117
9118         * decl.c (grokvardecl): Fix thinko.
9119
9120         * decl.c (grokdeclarator): Embedded attrs bind to the right,
9121         not the left.
9122
9123         * parse.y (fn.def2): Fix 'attrs' format.
9124
9125 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
9126
9127         * Makefile.in (CONFLICTS): Update.
9128         * parse.y (expr_or_declarator_intern): New rule.
9129         (expr_or_declarator, direct_notype_declarator, primary,
9130         functional_cast): Use it.
9131         (notype_declarator_intern): New rule.
9132         (notype_declarator, complex_notype_declarator): Use it.
9133
9134 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
9135
9136         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
9137         (grokvardecl): Likewise.
9138
9139 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9140
9141         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
9142         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
9143
9144         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
9145
9146         * pt.c (process_partial_specialization): Cast 1st argument of
9147         `bzero' to (PTR).
9148
9149         * tree.c (build_base_fields): Cast `base_align' to (int) when
9150         comparing against one.
9151
9152 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
9153
9154         * decl.c (lookup_name_real): Handle template parameters for member
9155         templates where said parameters have the same name as the
9156         surrounding class.
9157
9158         * decl.c (expand_static_init): Build cleanups before entering the
9159         anonymous function used to do them to avoid access-checking
9160         confusion.
9161
9162         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
9163         accidentally removed by previous change, and make DECL_RTL here.
9164         * class.c (add_method): Don't make DECL_RTL here.
9165
9166         * pt.c (for_each_template_parm): Don't examine uninstantiated
9167         default arguments.
9168
9169 1998-10-16  Dave Brolley  <brolley@cygnus.com>
9170
9171         * lex.c (real_yylex): Fix unaligned access of wchar_t.
9172
9173 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
9174
9175         * class.c (add_method): Fix documentation to reflect previous
9176         changes.  Check for duplicate method declarations here.
9177         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
9178         correctly; such things never match.
9179         (grokfndecl): Don't look for duplicate methods here.
9180         * decl2.c (check_classfn): Don't assume names are mangled.
9181         Don't add bogus member function declarations to a class before the
9182         class type is complete.
9183         (grokfield): Reformat error message.
9184         * method.c (set_mangled_name_for_decl): Don't mangle names while
9185         processing_template_decl.
9186
9187 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
9188
9189         * typeck.c (build_indirect_ref): Complain about a pointer to data
9190         member, too.
9191         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
9192         data member.
9193         * init.c (resolve_offset_ref): Don't undo the above.
9194
9195         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
9196         (struct lang_decl_flags): Add `bitfield'.
9197         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
9198         DECL_BIT_FIELD.
9199         * decl2.c (grokbitfield, grok_alignof): Likewise.
9200         * init.c (build_offset_ref): Likewise.
9201         * typeck.c (build_component_addr, expr_sizeof): Likewise.
9202         * cvt.c (build_up_reference): Don't crash if taking the address
9203         returns error_mark_node.
9204
9205         * decl.c (grokfndecl): Also check ctype when checking for ::main().
9206
9207 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
9208
9209         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
9210         Do mangling here.
9211         (grokdeclarator): Instead of here.
9212         * friend.c (do_friend): Lose special handling of ::main and
9213         __builtin_*.
9214         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
9215
9216         * spew.c (yylex): Clear looking_for_typename if we got
9217         'enum { ... };'.
9218
9219 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
9220
9221         * class.c (maybe_warn_about_overly_private_class): Improve error
9222         messages for class with only private constructors.
9223
9224         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
9225         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
9226         (build_typename_type): New function.
9227         * decl.c (build_typename_type): Broken out from ...
9228         (make_typename_type): Use it.
9229         * search.c (lookup_field): Likewise.
9230
9231 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
9232
9233         * pt.c (convert_nontype_argument): Check against type_referred_to.
9234         * decl.c (grokvardecl): Check for declarator name before building
9235         DECL_ASSEMBLER_NAME.
9236
9237 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
9238
9239         * pt.c (lookup_template_class): Add comment.
9240         (instantiate_class_template): Don't mark the _TYPE node for
9241         member class templates as an instantiation.
9242
9243 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
9244
9245         * decl.c (grokfndecl): Fix my thinko.
9246
9247 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
9248
9249         * tinfo2.cc (fast_compare): Remove.
9250         (before): Just use strcmp.
9251         * tinfo.cc (operator==): Just use strcmp.
9252
9253 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
9254
9255         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
9256         declarations.
9257
9258 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
9259
9260         * cp-tree.h (specializations_of_same_template_p): Remove.
9261         * search.c (get_template_base): Don't use it.
9262         (get_template_base_recursive): Likewise.
9263         * pt.c (specializations_of_same_template_p): Remove.
9264         (unify): Don't use it.
9265         (lookup_template_class): Find the correct parent when setting
9266         CLASSTYPE_TI_TEMPLATE.
9267
9268 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
9269
9270         * tinfo.cc (operator==): Always compare names.
9271
9272 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
9273
9274         * decl.c (start_function): Fix cut-and-paste error.
9275
9276 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
9277
9278         * inc/typeinfo: Add #pragma interface.
9279         (operator!=): Just call operator==.
9280         * tinfo.cc: Add #pragma implementation.
9281         (operator==): Move from inc/typeinfo and tinfo2.cc.
9282         Check __COMMON_UNRELIABLE instead of _WIN32.
9283
9284         * typeck2.c (my_friendly_abort): Add URL.
9285
9286 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
9287
9288         * decl.c (start_method): Added extra parameter for attributes.
9289         * cp-tree.h (start_method): Update prototype.
9290         * parse.y (fn.def2): Update start_method parameter list.
9291
9292 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
9293
9294         * cp-tree.h (specializations_of_same_template_p): Declare.
9295         * pt.c (specializations_of_same_template_p): New function.
9296         (unify): Use it.
9297         * search.c (get_template_base): Use it.
9298         (get_template_base_recursive): Likewise.
9299
9300 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
9301
9302         * decl2.c (start_objects): Add new variable `joiner' and
9303         initialize it properly.
9304
9305 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
9306
9307         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
9308         change to vtable types.
9309
9310         * cvt.c (ocp_convert): Avoid infinite recursion caused by
9311         1998-10-03 change.
9312
9313 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
9314
9315         * pt.c (resolve_overloaded_unification): New fn.
9316         (try_one_overload): Likewise.
9317         (unify): Don't fail on unknown type.
9318         (type_unification_real): Likewise.  Use resolve_overloaded_unification
9319         to handle an overloaded argument.
9320         (template_args_equal): Split out...
9321         (comp_template_args): From here.
9322         (determine_specialization): Also allow a template with more
9323         parms than were explicitly specified.
9324         * cp-tree.h: Add template_args_equal.
9325         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
9326
9327 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
9328
9329         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
9330         change.
9331
9332 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
9333
9334         * typeck.c (unsigned_type): Only return TItype nodes when
9335         HOST_BITS_PER_WIDE_INT is >= 64 bits.
9336         (signed_type): Likewise.
9337         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
9338         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
9339         (init_decl_processing): Only create TItype nodes when
9340         HOST_BITS_PER_WIDE_INT is >= 64 bits.
9341         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
9342         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
9343
9344 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9345
9346         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
9347         (gxx.gperf): Update comments describing invocation flags.
9348         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
9349
9350 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
9351
9352         * class.c (finish_struct_1): Add commentary on previous change.
9353
9354         * cp-tree.h (vtbl_ptr_type_node): New variable.
9355         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
9356         already of the right type.
9357         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
9358         Simplify code to grow vtable.
9359         * decl.c (vtbl_ptr_type_node): Define.
9360         (init_decl_processing): Initialize it.
9361
9362 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
9363
9364         * cp-tree.def (PTRMEM_CST): New tree node.
9365         * cp-tree.h (ptrmem_cst): New type.
9366         (lang_type): Remove local_typedecls.
9367         (dummy): Increase to 12 bits from 11.
9368         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
9369         (PTRMEM_CST_CLASS): New macro.
9370         (PTRMEM_CST_MEMBER): Likewise.
9371         (current_access_specifier): New variable.
9372         (current_class_type): Remove duplicate declaration.
9373         (finish_struct): Change prototype.
9374         (unreverse_member_declarations): New function.
9375         (pushdecl_class_level): Change prototype.
9376         (grok_enum_decls): Remove.
9377         (fixup_anonymous_union): New function.
9378         (grok_x_components): Change prototype.
9379         (tsubst_chain): Remove.
9380         (finish_member_template_decl): Likewise.
9381         (check_explicit_specialization): Fix indentation.
9382         (finish_class_definition): Change prototype.
9383         (finish_member_class_template): Likewise.
9384         (finish_member_declaration): New function.
9385         (check_multiple_declarators): Likewise.
9386         * class.c (class_stack_node_t): New type.
9387         (current_class_base): Remove.
9388         (current_class_stack): Change type.
9389         (current_access_specifier): New variable.
9390         (grow_method): Remove.
9391         (check_member_decl_is_same_in_complete_scope): Break out from
9392         finish_struct.
9393         (make_method_vec): New function.
9394         (free_method_vec): Likewise.
9395         (add_implicitly_declared_members): Break out from finish_struct_1.
9396         (free_method_vecs): New variable.
9397         (add_method): Rework for direct use from parser.
9398         (handle_using_decl): Watch for NULL_TREE while iterating through
9399         CLASSTYPE_METHOD_VEC.
9400         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
9401         just do some error-checking.
9402         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
9403         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
9404         (finish_struct): Change prototype.  Simplify; fields and methods
9405         are already set up at this point.
9406         (init_class_processing): Set up current_class_stack.
9407         (pushclass): Save current_access_specifier.
9408         (popclass): Restore it.
9409         (currently_open_class): Simplify.
9410         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
9411         * decl.c (saved_scope): Add access_specifier.
9412         (maybe_push_to_top_level): Save it.
9413         (pop_from_top_level): Restore it.
9414         (maybe_process_template_type_declaration): Use
9415         finish_member_declaration.
9416         (pushtag): Likewise.
9417         (pushdecl_class_level): Don't return a value.
9418         (fixup_anonymous_union): Break out from grok_x_components.
9419         (shadow_tag): Use it.
9420         (xref_tag): Complain about using an elaborated type specifier to
9421         reference a template type parameter or typedef name.
9422         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
9423         (current_local_enum): Remove.
9424         (build_enumerator): Call finish_member_declaration.
9425         (grok_enum_decls): Remove.
9426         * decl2.c (grok_x_components): Simplify.
9427         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
9428         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
9429         (merge_functions): Add to comment.
9430         (arg_assoc_type): Prototype.
9431         (arg_assoc): Pass as many arguments as there are parameters.
9432         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
9433         OFFSET_REF.
9434         * expr.c (cpls_expand_expr): Remove dead code.  Handle
9435         PTRMEM_CST.
9436         * friend.c (do_friend): Lookup friends when in nested classes.
9437         Change comments.
9438         * init.c (build_offset_ref): Do lookup even for classes that are
9439         only partially defined.
9440         (decl_constant_value): Remove dead code.
9441         * method.c (build_overload_value): Remove hack where by TYPE was
9442         not a TYPE.  Handle PTRMEM_CST.
9443         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
9444         should go.
9445         * parse.y (components, notype_components, component_decl,
9446         component_decl_1, component_declarator, component_declarator0):
9447         Now all are itype rather than ttype.  Rework to add members to
9448         classes on the fly.
9449         (typesqpecqual_reserved): Use check_multiple_declarators.
9450         (structsp): Update class to finish_class_definition.
9451         (do_xref_defn): Unsplit into named_class_head.
9452         (access_specifier): Set current_access_specifier.
9453         * pt.c (set_current_access_from_decl): New function.
9454         (finish_member_template_decl): Don't take the parameters.
9455         (comp_template_args): Make more robust.
9456         (lookup_template_class): Don't use current_local_enum.
9457         (for_each_template_parm): Handle PTRMEM_CST.
9458         (instantiate_class_template): Use set_current_access_from_decl,
9459         finish_member_declaration and unreverse_member_declarations.  Set
9460         lineno/input_filename before generating implicit member functions.
9461         (type_unification_real): Don't assume back-unification happens
9462         only for the last argument.
9463         (regenerate_decl_from_template): Call pushclass a bit earlier.
9464         (tsubst_chain): Remove.
9465         (tsubst_enum): Use set_current_access_from_decl.
9466         (set_mangled_name_for_template_decl): Fix indentation.
9467         * search.c (lookup_fnfields_1): Change iteration through
9468         CLASSTYPE_METHOD_VEC.
9469         (dfs_pushdecls): Likewise.
9470         (dfs_compress_decls): Likewise.
9471         (add_conversions): Likewise.
9472         * semantics.c (finish_class_definition): Don't take components.
9473         Change call to finish_struct.
9474         (finish_member_declaration): New function.
9475         (finish_member_class_template): Don't take template parameters.
9476         Change call to grok_x_components.  Call finish_member_template_decl.
9477         (check_multiple_declarators): New function.
9478         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
9479         a passed in fieldlist.
9480         * tree.c (search_tree): Handle PTRMEM_CST.
9481         (mapcar): Likewise.
9482         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
9483         INTEGER_CSTs, for pointer-to-data members.
9484
9485         * call.c (resolve_args): Resolve template specializations, if
9486         possible.
9487
9488 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9489
9490         * Makefile.in (spew.o): Depend on toplev.h.
9491
9492         * call.c (compare_ics): Initialize variables `deref_from_type2',
9493         `deref_to_type1' and `deref_to_type2'.
9494
9495         * except.c (get_eh_type): Hide prototype and definition.
9496         (process_start_catch_block_old): Remove unused static prototype.
9497
9498         * pt.c (tsubst_decl): Initialize variable `argvec'.
9499
9500         * spew.c: Include toplev.h.
9501
9502 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
9503
9504         * pt.c (instantiate_decl): Do save and restore file position.
9505
9506 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9507
9508         * method.c (build_decl_overload_real): Clear
9509         numeric_output_need_bar after __.
9510
9511 1998-10-05  Nathan Sidwell  <nathan@acm.org>
9512
9513         * call.c (build_new_method_call): Issue 'incomplete type' error,
9514         if class is not defined.
9515
9516 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9517
9518         * call.c (build_object_call): Move declaration of variable
9519         `fn' into the scope where it is used.  Don't access variable
9520         `fn' when it is uninitialized, instead use `fns'.
9521
9522 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
9523
9524         * errfn.c (cp_thing): Print buf as a string not as a printf format
9525         to avoid problems with the operator%.  Consequently, `%%' sequences
9526         in format are copied as `%' in buf.
9527
9528 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
9529
9530         * pt.c (pop_tinst_level): Call extract_interface_info.
9531         (instantiate_decl): Don't save and restore file position.
9532
9533         * decl.c (cp_finish_decl): Make statics in extern inlines and
9534         templates common, if possible and the target doesn't support weak
9535         symbols.
9536
9537         * decl.c (grokdeclarator): Remove redundant calls to
9538         build_type_variant and some duplicated code.
9539         * sig.c (build_signature_reference_type): Only take the type parm.
9540         (build_signature_pointer_type): Likewise.
9541         * tree.c (build_cplus_method_type): Adjust.
9542         * cp-tree.h: Update.
9543
9544 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
9545
9546         * call.c (build_over_call): Make pedwarns about dropped qualifiers
9547         into full-fledged errors.
9548         * cvt.c (convert_to_reference): Likewise.
9549         * typeck.c (convert_for_assignment): Likewise.
9550
9551         * search.c (expand_upcast_vtables): In addition to unsetting
9552         TREE_READONLY, remove top-level const type qualifier.
9553
9554 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
9555
9556         * class.c (current_class_ptr, current_class_ref): Clarify
9557         documentation.
9558         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
9559         NOP type conversions.
9560         * decl.c (decls_match): Use comptypes directly; ignore
9561         qualifiers on the DECL.
9562         (duplicate_decls): Remove qualifier checks on DECL.
9563         (grokdeclarator): Make the type built up include top-level
9564         qualifiers.
9565         * decl2.c (do_dtors): Fix spelling error.
9566         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
9567         when printing type information.
9568         * init.c (build_new_1): Add documentation.  Deal with the fact
9569         that type of allocated memory now contains qualifiers.
9570         * lex.c (is_global): Improve error-recovery.
9571         * sig.c (build_member_function_pointer): Don't cast away const
9572         on fields of sigtable_entry_type.
9573         * tree.c (lvalue_type): Don't look at top-level qualifiers on
9574         expressions.
9575         * typeck.c (decay_conversion): Likewise.
9576         (build_component_ref): Make sure the type of the COMPONENT_REF
9577         contains top-level qualifiers, as appropriate.  Improve
9578         error-handling.
9579         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
9580         (build_array_ref): Likewise.
9581         (build_unary_op): Improve error-recovery.
9582         (unary_complex_lvalue): Make taking the address a bound member
9583         function an error, not a sorry.
9584         (build_conditional_expr): Look at the type qualifiers, not the
9585         qualifiers on the expression itself.
9586
9587 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
9588
9589         * decl2.c (merge_functions): Remove duplicates.
9590
9591         * decl2.c: Add -f{no-,}implicit-inline-templates.
9592         (import_export_decl): Check it.
9593
9594         * decl.c (lookup_name_real): Template parms also take precedence
9595         over implicit typename.  Only warn if yylex.
9596
9597         * typeck.c (build_conditional_expr): Only fold if ifexp is an
9598         INTEGER_CST.
9599
9600         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
9601         instead of linkage.
9602
9603 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
9604
9605         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
9606         * class.c (build_vbase_pointer): Use it.
9607         * rtti.c (expand_class_desc): Likewise.
9608         * tree.c (build_vbase_pointer_fields): Likewise.
9609
9610 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
9611
9612         * decl.c (start_decl): Add invocation of
9613         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
9614         (start_function): Add invocation of
9615         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
9616
9617         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
9618         HANDLE_GENERIC_PRAGMAS.
9619
9620 1998-09-28  Anthony Green  <green@cygnus.com>
9621
9622         * semantics.c (finish_asm_stmt): Always permit volatile asms.
9623
9624 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
9625
9626         * decl.c (grokdeclarator): Tighten checks for invalid
9627         destructors.  Improve error-messages and error-recovery.
9628         * decl2.c (check_classfn): Don't assume that mangled destructor
9629         names contain type information.
9630
9631 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
9632
9633         * search.c (get_base_distance): Remove assert.
9634
9635         * decl2.c (build_anon_union_vars): Don't process a field with no
9636         name.
9637         (finish_anon_union): Also complain about local anon unions with no
9638         members.
9639
9640 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9641
9642         * decl.c (lookup_namespace_name): If the name is a namespace,
9643         return it immediately.
9644
9645 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9646
9647         * cp-tree.h (define_case_label): Remove unused parameter.
9648         (check_java_method): Likewise.
9649         (grokclassfn): Likewise.
9650         (expand_aggr_init): Likewise.
9651         (build_x_delete): Likewise.
9652         (maybe_end_member_template_processing): Likewise.
9653         (unshare_base_binfos): Add prototype.
9654         (string_conv_p): Likewise.
9655         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
9656
9657         * cvt.c (build_up_reference): Remove unused parameter
9658         `checkconst', all callers changed.
9659         (build_type_conversion): Mark parameter `code' with
9660         ATTRIBUTE_UNUSED.
9661         (build_expr_type_conversion): Initialize variable `conv'.
9662
9663         * decl.c (push_namespace): Initialize variable `d'.
9664         (define_case_label): Remove unused parameter `decl', all callers
9665         changed.
9666
9667         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
9668         `argc' with ATTRIBUTE_UNUSED.
9669         (grokclassfn): Remove unused parameter `cname', all callers
9670         changed.
9671         (check_java_method): Likewise for parameter `ctype'.
9672         (copy_assignment_arg_p): Mark parameter `virtualp' with
9673         ATTRIBUTE_UNUSED.
9674         (finish_prevtable_vardecl): Likewise for parameter `prev'.
9675
9676         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
9677
9678         * init.c (expand_aggr_init_1): Remove unused parameter
9679         `alias_this', all callers changed.
9680         (expand_aggr_init): Likewise.
9681         (expand_default_init): Likewise.
9682         (build_new_1): Initialize variable `susp'.
9683         (build_x_delete): Remove unused parameter `type', all callers
9684         changed.
9685
9686         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
9687         ATTRIBUTE_UNUSED.
9688         (readescape): Use (unsigned) value in shift.
9689         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
9690         comparing to a signed quantity.
9691
9692         * pt.c (maybe_end_member_template_processing): Remove unused
9693         parameter `decl', all callers changed.
9694         (check_explicit_specialization): Add braces around empty body in
9695         an else-statement.
9696         (current_template_args): Initialize variable `args'.
9697         (lookup_template_class): Likewise for variable `prev_local_enum'.
9698         (tsubst_decl): Likewise for variable `r'.
9699         (set_mangled_name_for_template_decl): Initialize variable
9700         `context'.
9701
9702         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
9703         Likewise for variable `i'.
9704         (yylex): Initialize variable `trrr'.
9705
9706         * typeck.c (compparms): Mark variable `strict' with
9707         ATTRIBUTE_UNUSED.
9708
9709         * xref.c (simplify_type): Cast argument of ctype function to
9710         `unsigned char'.
9711
9712 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
9713
9714         * cp-tree.h (language_lvalue_valid): Remove.
9715         * decl.c (grokdeclarator): Don't disallow references to functions.
9716         * tree.c (lvalue_p_1): New function, combining duplicated
9717         code from ...
9718         (lvalue_p): Use it.
9719         (real_lvalue_p): Likewise.
9720         * typeck.c (language_lvalue_valid): Remove.
9721         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
9722         they don't have TREE_READONLY set.
9723         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
9724
9725 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9726
9727         * spew.c (yylex): Give diagnostic.
9728         * hash.h (is_reserved_word): Add export.
9729         * gxx.gperf: Likewise.
9730         * lex.h (rid): Add RID_EXPORT.
9731         * lex.c (init_parse): Likewise.
9732
9733 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
9734
9735         * friend.c (do_friend): Make warning a full sentence.
9736
9737 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
9738
9739         * parse.y (component_decl_list): Improve error-recovery.
9740
9741 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9742
9743         * decl.c (make_typename_type): Move error to point where name
9744         variable can be used by dump_type.
9745
9746 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
9747
9748         * decl.c (grokfndecl): Improve error-recovery.
9749         * decl2.c (grokfield): Likewise.
9750         * pt.c (finish_member_template_decl): Likewise.
9751
9752 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9753
9754         * method.c (hack_identifier): Finding multiple members is always
9755         an error.
9756
9757 1998-09-21  Per Bothner  <bothner@cygnus.com>
9758
9759         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
9760
9761 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
9762
9763         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
9764
9765 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
9766
9767         * class.c (maybe_warn_about_overly_private_class): Reformat.
9768
9769 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
9770
9771         * exception.cc (__cplus_type_matcher): Realign some code.
9772
9773 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
9774
9775         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
9776         (tinfo2.o): Likewise.
9777         (exception.o): Likewise.
9778         (new.o): Likewise.
9779         (opnew.o): Likewise.
9780         (opnewnt.o): Likewise.
9781         (opvnew.o): Likewise.
9782         (opvnewnt.o): Likewise.
9783         (opdel.o): Likewise.
9784         (opdelnt.o): Likewise.
9785         (opvdel.o): Likewise.
9786         (opvdelnt.o): Likewise.
9787
9788 1998-09-16  Richard Henderson  <rth@cygnus.com>
9789
9790         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
9791
9792 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
9793
9794         * call.c (build_field_call): Handle static data members too.
9795
9796         * typeck.c (comptypes): When comparing pointer types, check
9797         whether referred types match even in strictest modes.
9798
9799 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
9800
9801         * cp-tree.h: Revert previous change.
9802         (finish_struct_methods): Remove declaration.
9803         * class.c: Revert previous change.
9804         (maybe_warn_about_overly_private_class): New function.
9805         (finish_struct_methods): Declare here, and make static.  Remove
9806         unnecessary parameters.  Tidy slightly.  Use
9807         maybe_warn_about_overly_private_class.
9808         (finish_struct_1): Adjust.  Remove check for private constructors,
9809         now done elsewhere.
9810         (finish_struct): Adjust.
9811
9812 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
9813
9814         * except.c (expand_start_catch_block): No need to check for new
9815         exception model.
9816         (process_start_catch_block_old): Deleted.
9817         (process_start_catch_block): Add call to start_decl_1().
9818         (expand_end_catch_block): Add call to end_catch_handler().
9819         * exception.cc (__cplus_type_matcher): Only check the exception
9820         language if there is an exception table.
9821
9822 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
9823
9824         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
9825         as used to prevent conflicts with virtual function tables.
9826
9827 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
9828
9829         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
9830         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
9831         * class.c (maybe_class_too_private_p): New function.
9832         (finish_struct_methods): Use it.
9833         (finish_struct_1): Likewise.
9834         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
9835         appropriate.
9836
9837         * pt.c (check_specialization_scope): Fix spelling error.
9838         (check_explicit_specialization): Remove code to handle explicit
9839         specializations in class scope; they are now correctly diagnosed
9840         as errors.
9841
9842 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
9843
9844         * decl.c (pushdecl): Don't copy types if the
9845         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
9846         type.
9847
9848 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
9849
9850         * class.c (get_enclosing_class): New function.
9851         (is_base_of_enclosing_class): Likewise.
9852         * cp-tree.h (get_enclosing_class): Declare.
9853         (is_base_of_enclosing_class): Likewise.
9854         * pt.c (coerce_template_parms): Use them.
9855
9856 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
9857
9858         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
9859         null to decide whether to use it.
9860
9861         * error.c (dump_type_real): Handle NAMESPACE_DECL.
9862         * parse.y (base_class.1): Avoid crash on error.
9863
9864 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9865
9866         * decl.c (make_typename_type): If context is a namespace, the code
9867         is in error.
9868
9869 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
9870
9871         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
9872
9873 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
9874
9875         * cp-tree.h (anonymous_namespace_name): Declare.
9876         * decl.c: Define it.
9877         (push_namespace): Use anonymous_namespace_name, rather than local
9878         static anon_name.
9879         * error.c (dump_decl): If a namespace is named
9880         anonymous_namespace_name, call it {anonymous}.
9881
9882         * decl.c (grokparms): Distinguish between references and pointers
9883         in error message.
9884
9885 1998-09-08  Richard Henderson  <rth@cygnus.com>
9886             Mark Mitchell  <mark@markmitchell.com>
9887
9888         * pt.c (process_partial_specialization): Consistently allocate
9889         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
9890         tpd.parms, where appropriate.
9891
9892 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
9893
9894         * Makefile.in (INCLUDES): Update after recent toplevel gcc
9895         reorganizations.
9896
9897 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
9898
9899         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
9900         * class.c (finish_struct): Remove hackery to deal with explicit
9901         specializations in class scope.
9902         * decl.c (grokfndecl): Improve error-recovery.
9903         * decl2.c (grokfield): Likewise.
9904         * pt.c (check_specialization_scope): New function.
9905         (begin_specialization): Call it.
9906         (process_partial_specialization): New function, split out from
9907         push_template_decl.  Check partial specializations more
9908         stringently.
9909         (push_template_decl): Call it.
9910         (check_explicit_specialization): Don't attempt to handle explicit
9911         specializations in class scope.
9912         (template_parm_data): Document.  Add current_arg and
9913         arg_uses_template_parms.
9914         (mark_template_parm): Set it.
9915         (tsubst_arg_types): Remove unused variable.
9916         * semantics.c (begin_class_definition): Tweak.
9917
9918 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
9919
9920         * inc/typeinfo (type_info::type_info(const char*)): Make
9921         `explicit'.
9922
9923         * cp-tree.h (hash_tree_cons_simple): New macro.
9924         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
9925         (coerce_template_parms): Use make_temp_vec, instead of
9926         make_tree_vec.  Document this behavior.
9927         (lookup_template_class): Likewise.
9928         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
9929         Remove dead code (and add assertion to check its deadness).  Fix
9930         bug w.r.t. exception specifications.
9931
9932 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
9933
9934         * decl2.c (import_export_vtable): Always make artificials comdat.
9935         (import_export_decl): Likewise.
9936         * pt.c (mark_decl_instantiated): Likewise.
9937
9938 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
9939
9940         * cp-tree.h (finish_globally_qualified_member_call_expr):
9941         Rename to ...
9942         (finish_qualified_call_expr).
9943         * semantics.c: Likewise.
9944         * parse.y (primary): Use it.
9945         * method.c (hack_identifier): Remove redundant code.
9946
9947         * init.c (resolve_offset_ref): Call convert_from_reference to
9948         handle members of reference type.  Improve error recovery.
9949
9950 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
9951
9952         * cp-tree.h: Declare warn_nontemplate_friend.
9953         * decl2.c (lang_decode_option): Set.
9954         * lang-options.h: Add -Wnon-template-friend.
9955         * friend.c (do_friend): Use to toggle non-template function warning.
9956
9957 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
9958
9959         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
9960         corresponding INTEGER_CSTs when processing_template_decl.
9961         * pt.c (tsubst_enum): Tweak accordingly.
9962
9963 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
9964
9965         * decl.c (pushdecl_class_level): Add warning here.
9966         (pushdecl): Tweak.
9967
9968 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
9969
9970         * cvt.c (convert_pointer_to_real): Tidy.
9971         * search.c (get_base_distance_recursive): Simplify.
9972         (get_base_distance): Likewise.
9973
9974         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
9975         parms.
9976
9977 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
9978
9979         * lex.c (check_newline):  Call HANDLE_PRAGMA before
9980         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
9981         if unknown pragmas are encountered.
9982         (handle_sysv_pragma): Interpret return code from
9983         handle_pragma_token ().  Return success/failure indication rather
9984         than next unprocessed character.
9985         (pragma_getc): New function: retrieves characters from the
9986         input stream.  Defined when HANDLE_PRAGMA is defined.
9987         (pragma_ungetc): New function: replaces characters back into the
9988         input stream.  Defined when HANDLE_PRAGMA is defined.
9989
9990 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
9991
9992         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
9993         * class.c (build_vtable_entry_ref): Likewise.
9994
9995 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
9996
9997         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
9998         * decl2.c (import_export_decl): Likewise.
9999         * pt.c (instantiate_decl): Use it.
10000
10001 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
10002
10003         * decl.c (lookup_name_real): Also do implicit typename thing for
10004         artificial TYPE_DECLs.
10005         * search.c (lookup_field): Likewise.
10006         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
10007         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
10008         (enter_scope_of): Extract type from implicit typename.
10009         (begin_class_definition): Likewise.
10010         * lex.c (identifier_type): Handle implicit typename when checking
10011         for SELFNAME.
10012
10013         * cp-tree.h: Declare flag_strict_prototype.
10014         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
10015         -fstrict-prototype.
10016         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
10017         specified, set it to the value of pedantic.
10018
10019 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
10020
10021         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
10022
10023 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
10024
10025         * decl.c (finish_enum): Handle member enums of classes declared in
10026         template functions.
10027
10028         * decl2.c (grok_x_components): Strip attributes before calling
10029         groktypename.
10030
10031 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
10032
10033         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
10034         -fenum-int-equivalence and -fno-nonnull-objects.
10035         * class.c (check_for_override): Remove support for -fall-virtual.
10036         (finish_struct_1): Likewise.
10037         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
10038         * typeck.c (build_binary_op_nodefault): Likewise.
10039         * cvt.c (ocp_convert): Likewise.
10040         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
10041         * class.c (build_vbase_path): Likewise.
10042
10043 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
10044
10045         * Makefile.in (INTERFACE): New, set to 1.
10046
10047 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
10048
10049         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
10050         comparing with global_namespace.
10051         (dump_aggr_type): Likewise.
10052
10053         * decl.c (grokfndecl): Issue error on declaration of friend
10054         templates with explicit template arguments.
10055
10056         * pt.c (convert_template_argument): New function, split out
10057         from...
10058         (coerce_template_parms): Here.
10059         (tsubst): Attempt better error-recovery.
10060
10061 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10062
10063         * pt.c (decl_template_parm_p): Add checks for
10064         TEMPLATE_TEMPLATE_PARM.
10065
10066 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
10067
10068         * lex.c (do_identifier): Fix thinko in previous change.
10069
10070 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
10071
10072         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
10073         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
10074
10075 1998-08-28  Richard Henderson  <rth@cygnus.com>
10076
10077         Add support for discarding unused virtual functions.
10078         * lang-options.h: Add -fvtable-gc.
10079         * cp-tree.h: Add flag_vtable_gc.
10080         * decl2.c (output_vtable_inherit): New fn.
10081         (finish_vtable_vardecl): Call it.
10082         * class.c (build_vtable_entry_ref): New fn.
10083         (build_vtbl_ref): Call it.
10084
10085 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
10086
10087         * cp-tree.h (build_enumerator): Take the enumeration type as a
10088         parameter.
10089         * decl.c (finish_enum): Don't set the TREE_TYPE for the
10090         enumeration constant values if we're processing_template_decls.
10091         Don't set the type for the CONST_DECLs either; that's done in
10092         build_enumerator.
10093         (build_enumerator): Take the enumeration type as a
10094         parameter.
10095         * lex.c (do_identifier): Don't resolve enumeration constants while
10096         processing template declarations, even if they happen to be
10097         TEMPLATE_PARM_INDEXs.
10098
10099         * parse.y (current_enum_type): New variable.
10100         (primary): Don't allow statement-expression in local classes just
10101         as we don't in global classes.
10102         (structsp): Use current_enum_type.
10103         (enum_list): Likewise.
10104         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
10105         finish_enum; they no longer occur.
10106
10107         * cp-tree.h (finish_base_specifier): New function.
10108         * parse.y (base_class): Use it.
10109         * semantics.c (finish_base_specifier): Define it.
10110
10111         * parse.y (structsp): Warn on use of typename outside of template
10112         declarations.
10113
10114 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
10115
10116         * lex.c (handle_cp_pragma): Remove #pragma vtable.
10117         * lang-options.h: Remove +e options.
10118         * decl2.c (lang_decode_option): Likewise.
10119         (import_export_vtable): Don't check write_virtuals.
10120         (finish_vtable_vardecl, finish_file): Likewise.
10121         * search.c (dfs_debug_mark): Likewise.
10122         * semantics.c (begin_class_definition): Likewise.
10123         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
10124
10125         * call.c (build_over_call): Check flag_elide_constructors.
10126         * decl2.c: flag_elide_constructors defaults to 1.
10127         * typeck.c (convert_arguments): Remove return_loc parm.
10128         (build_function_call_real): Adjust.
10129
10130         * search.c: Tear out all mi_matrix and memoize code.
10131         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
10132         * lang-options.h: Remove documentation for -fhandle-exceptions,
10133         -fmemoize-lookups and -fsave-memoized.
10134         * cp-tree.h: Lose mi_matrix and memoize support.
10135         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
10136         * class.c: Lose struct class_level.
10137         (pushclass, popclass): Lose memoize support.
10138         * init.c (build_offset_ref): Likewise.
10139
10140         Never change BINFO_INHERITANCE_CHAIN.
10141         * init.c (emit_base_init): Change modification of
10142         BINFO_INHERITANCE_CHAIN to an assert.
10143         * search.c (get_base_distance_recursive): Likewise.
10144         (get_base_distance): Likewise.
10145         (lookup_member): Likewise.
10146         (convert_pointer_to_single_level): Likewise.
10147         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
10148         (lookup_fnfields): Likewise.
10149         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
10150         (unshare_base_binfos): Don't call propagate_binfo_offsets.
10151         (layout_basetypes): Call propagate_binfo_offsets instead of
10152         unshare_base_binfos.
10153         * decl.c (xref_basetypes): Call unshare_base_binfos.
10154         * pt.c (instantiate_class_template): Likewise.
10155         * tree.c (reverse_path): Remove 'copy' parm; always make a
10156         temporary copy.
10157         * class.c (build_vbase_path): Just call it.
10158         * search.c (compute_access): Likewise.  Don't re-reverse.
10159
10160 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
10161
10162         * class.c (build_vbase_path): Use reverse_path.
10163         (finish_base_struct): Move warnings for inaccessible bases to
10164         layout_basetypes.
10165         (modify_one_vtable): Remove check of TREE_USED (binfo).
10166         (fixup_vtable_deltas1): Likewise.
10167         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
10168         (xref_tag): Remove binfos parameter.
10169         (make_binfo): Remove chain parameter.
10170         (reverse_path): Add copy parameter.
10171         * decl.c (init_decl_processing): Change calls to xref_tag.
10172         (xref_tag): Remove binfos parameter.
10173         (xref_basetypes): Change calls to make_binfo.
10174         * decl2.c (grok_x_components): Change calls to xref_tag.
10175         (handle_class_head): Likewise.
10176         * friend.c (do_friend): Likewise.
10177         * lex.c (make_lang_type): Change calls to make_binfo.
10178         * parse.y (structsp): Change calls to xref_tag.
10179         (named_complex_class_head_sans_basetype): Likewise.
10180         (named_class_head): Likewise.
10181         * rtti.c (init_rtti_processing): Likewise.
10182         * search.c (compute_access): Change calls to reverse_path.
10183         (dfs_get_vbase_types): Change calls to make_binfo.
10184         (get_vbase_types): Remove dead code.
10185         * tree.c (unshare_base_binfos): Change calls to make_binfo.
10186         (layout_basetypes): Warn here about inaccessible bases.
10187         (make_binfo): Remove chain parameter.
10188         (reverse_path): Add copy parameter.
10189
10190 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
10191
10192         * class.c: #if 0 complete_type_p.
10193         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
10194         * method.c (process_overload_item): Likewise.
10195         * typeck.c (comp_target_types): Likewise.
10196
10197         Stop sharing binfos for indirect virtual bases.
10198         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
10199         (layout_basetypes): Likewise.
10200         (unshare_base_binfos): Copy vbases, too.
10201         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
10202         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
10203         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
10204         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
10205         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
10206         reference to BINFO_VIA_PUBLIC.
10207         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
10208         (push_class_decls): Use them.
10209         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
10210         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
10211
10212 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
10213
10214         * decl.c (build_enumerator): Set DECL_CONTEXT for the
10215         CONST_DECLs.
10216
10217 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
10218
10219         * cp-tree.h (finish_enum): Change prototype.
10220         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
10221         VALUES parameter.  Don't try to compute mins/maxs if
10222         processing_template_decl.
10223         * parse.y (structsp): Use new calling sequence for finish_enum.
10224         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
10225         (lookup_template_class): Remove unused variables.  Tweak.
10226         Register enums on instantiation list before substituting
10227         enumeration constants.
10228         (tsubst_decl): Remove unused variables.
10229         (regenerate_decl_from_template): Likewise.
10230
10231         * decl.c (duplicate_decls): Don't obliterate the
10232         DECL_TEMPLATE_INFO for a template if we're not replacing it with
10233         anything.
10234
10235         * lex.c (do_identifier): Fix typo in comment.
10236
10237 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10238
10239         * errfn.c: Remove stdarg.h/varargs.h.
10240         * tree.c: Likewise.
10241
10242 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
10243
10244         * pt.c (tsubst_copy): Only do typename overloading on an
10245         IDENTIFIER_NODE that happens to look like a typename if it actually
10246         has a type for us to use.
10247
10248 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
10249
10250         * typeck.c (comp_cv_target_types): Split out...
10251         (comp_target_types): From here.  Don't allow cv-qual changes under
10252         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
10253         (build_ptrmemfunc): Pass 1 to nptrs.
10254         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
10255
10256 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
10257
10258         * search.c (dependent_base_p): Don't compare a binfo to
10259         current_class_type; use the TREE_TYPE of the binfo instead.
10260
10261         * cp-tree.h (CLASS_TYPE_P): Revise definition.
10262
10263 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
10264
10265         * decl.c (duplicate_decls): Don't complain about different
10266         exceptions from an internal decl even if pedantic.
10267
10268         * typeck.c (convert_for_assignment): Converting from pm of vbase
10269         to derived is an error, not a sorry.
10270
10271         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
10272         * class.c (fixed_type_or_null): Rename from
10273         resolves_to_fixed_type_p.  Return the dynamic type of the
10274         expression, if fixed, or null.
10275         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
10276         does not match the static type.
10277         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
10278         resolves_to_fixed_type_p again.
10279
10280 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
10281
10282         * pt.c (tsubst_decl): Move special case code for dealing with
10283         tricky friend templates here from ...
10284         (regenerate_decl_from_template): Here.
10285
10286 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
10287
10288         * decl.c (start_decl): Remove redundant linkage check.
10289
10290 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
10291
10292         * typeck.c (c_expand_return): Handle the case that valtype
10293         is wider than the functions return type.
10294
10295 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
10296
10297         * cp-tree.h (CLASS_TYPE_P): New macro.
10298         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
10299         * pt.c (process_template_parm): Undo previous change.
10300
10301 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
10302
10303         * cp-tree.h: Declare.
10304         * pt.c (decl_template_parm_p): New function.
10305         * decl.c (pushdecl): Check decls for redeclaring template parms.
10306         (xref_tag): Make redeclaration an error, print decl.
10307         * decl2.c (grokfield): Check field_decls for redeclaration as well.
10308
10309 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
10310
10311         * parse.y (primary): Fix up the type of string constants.
10312
10313 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
10314
10315         * typeck.c (convert_for_initialization): Move check for odd uses
10316         of NULL to avoid duplicate warnings.
10317
10318 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
10319
10320         * tree.c (lvalue_type): Fix for arrays.
10321         * typeck.c (string_conv_p): New fn.
10322         (convert_for_assignment): Use it.
10323         (build_unary_op): Use lvalue_type.
10324         * call.c (standard_conversion, convert_like): Use string_conv_p.
10325         (add_function_candidate): Use lvalue_type.
10326         * cvt.c (convert_to_reference): Likewise.
10327         * decl2.c (lang_decode_option): Ignore -traditional.
10328         * decl.c (init_decl_processing): flag_writable_strings inhibits
10329         flag_const_strings.
10330
10331 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
10332
10333         * lang-options.h (lang_options): Add fconst-strings to the list
10334         of valid options.
10335         * decl2.c (lang_f_options, lang_decode_option): Likewise.
10336
10337 1998-08-24  Nathan Sidwell  <nathan@acm.org>
10338
10339         * lex.c (real_yylex): Don't warn about long long constants if
10340         we're allowing long long.
10341
10342 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10343
10344         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
10345         accessing bindings directly.
10346
10347         * search.c (my_tree_cons): Reimplement.
10348
10349         * lang-specs.h: Remove __HONOR_STD.
10350         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
10351
10352 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
10353
10354         * decl.c (grokdeclarator): Complain about in-class initialization
10355         of aggregates and/or references.
10356         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
10357         TEMPLATE_TYPE_PARMs.
10358
10359         * decl2.c (grok_array_decl): Add comment.
10360         (mark_used): Don't instantiate an explicit instantiation.
10361         * friend.c (make_friend_class): Remove bogus comment.  Fix check
10362         for partial specializations.
10363         * pt.c (check_explicit_specialization): Don't
10364         SET_DECL_EXPLICIT_INSTANTIATION here.
10365         (mark_decl_instantiated): Or here.
10366         (do_decl_instantiation): Do it here, instead.  Add checks for
10367         duplicate explicit instantiations, etc.  Tidy.
10368         (do_type_instantiation): Likewise.
10369         (instantiate_decl): Improve comments.  Complain about explicit
10370         instantiations where no definition is available.
10371
10372         * cp-tree.h (ansi_null_node): Remove.
10373         * call.c (build_over_call): Warn about converting NULL to an
10374         arithmetic type.
10375         * cvt.c (build_expr_type_conversion): Likewise.  Use
10376         null_ptr_cst_p instead of expanding it inline.
10377         * decl.c (ansi_null_node): Remove.
10378         (init_decl_processing): Make null_node always have integral type.
10379         * except.c (build_throw): Warn about converting NULL to an
10380         arithmetic type.
10381         * lex.c (init_parse): Remove handling of ansi_null_node.
10382         * pt.c (type_unification_real): Don't convert NULL to void* type.
10383         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
10384         (convert_for_assignment): Warn about converting NULL to an
10385         arithmetic type.
10386         (convert_for_initialization): Likewise.
10387
10388 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
10389
10390         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
10391         * pt.c (coerce_template_parms): Use no_linkage_check.
10392         * decl.c (grokvardecl): Likewise.
10393         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
10394
10395         * method.c (process_overload_item): Remove useless code.
10396
10397 1998-08-20  Per Bothner  <bothner@cygnus.com>
10398
10399         Handle new'ing of Java classes.
10400         * init.c (build_class_classref):  New function.
10401         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
10402         constructor does not return this;  don't need to exception-protect.
10403
10404         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
10405         * decl2.c (acceptable_java_type):  Handle template-derived types.
10406
10407 1998-08-20  Per Bothner  <bothner@cygnus.com>
10408
10409         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
10410
10411 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
10412
10413         * decl.c (duplicate_decls): Always merge the old and new patterns
10414         for templates, regardless of whether or not the new one has
10415         DECL_INITIAL.  Don't throw away specializations.  Merge
10416         DECL_SAVED_TREE.
10417         * pt.c (tsubst_decl): Use the right pattern when calculating the
10418         complete args for a new template instance.
10419         (do_decl_instantiation): Fix typo in comment.
10420         (regenerate_decl_from_template): Deal with tricky friend template
10421         case.
10422         (instantiate_decl): Likewise.
10423
10424 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
10425
10426         * init.c (build_builtin_delete_call): Add missing assemble_external
10427         call.
10428
10429 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
10430
10431         * parse.y (notype_unqualified_id): Also accept ~A<int>.
10432
10433 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
10434
10435         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
10436         arithmetic.
10437         * except.c (build_throw): Warn when NULL is thrown, even with
10438         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
10439         thrown expression.
10440
10441         * cp-tree.h (ansi_null_node): New variable.
10442         * decl.c (ansi_null_node): New variable.
10443         (init_decl_processing): Initialize its type.
10444         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
10445         for null_node in non-ANSI mode.
10446         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
10447         place of null_node to avoid spurious errors.
10448
10449 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
10450
10451         * cp-tree.h (enter_scope_of): New function.
10452         * parse.y (complex_direct_notype_declarator): Use it.
10453         * semantics.c (enter_scope_of): New function.
10454
10455 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
10456
10457         * decl.c (grokparms): No, here.
10458
10459         * decl.c (grokdeclarator): Catch parm with pointer to array of
10460         unknown bound here...
10461         * method.c (process_overload_item): ...not here.
10462
10463         * gxxint.texi: Remove obsolete documentation of overloading code.
10464
10465         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
10466         * class.c (finish_struct_bits): Likewise.
10467
10468         * tree.c (lvalue_type): Fix for arrays.
10469         * typeck.c (build_unary_op): Use lvalue_type.
10470         * call.c (add_function_candidate): Likewise.
10471         * cvt.c (convert_to_reference): Likewise.
10472
10473         * decl2.c (lang_decode_option): Ignore -traditional.
10474
10475         * init.c (build_offset_ref): Don't mess with error_mark_node.
10476         * lex.c (do_scoped_id): Use cp_error.
10477
10478         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
10479
10480 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10481
10482         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
10483
10484 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
10485
10486         * cp-tree.h (set_identifier_local_value): Provide prototype.
10487
10488         * decl2.c (do_namespace_alias): Remove unused variables `binding'
10489         and `old'.
10490
10491 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
10492
10493         * Makefile.in: Rename BBISON to BISON so that it can be properly
10494         inherited from the parent makefile.
10495
10496 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
10497
10498         * lang-options.h: Add -finit-priority.
10499         * decl2.c: Likewise.  Check flag_init_priority instead of
10500         USE_INIT_PRIORITY.
10501
10502         * decl2.c (setup_initp): New fn.
10503         (start_objects, finish_objects, do_ctors): Handle init_priority.
10504         (do_dtors, finish_file): Likewise.
10505
10506 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
10507
10508         * pt.c (tsubst_copy): Hush warning.
10509
10510         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
10511
10512 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
10513
10514         * pt.c (print_template_context): Don't abort when instantiating a
10515         synthesized method.
10516
10517         * decl.c (grokdeclarator): Issue errors on namespace qualified
10518         declarators in parameter lists or in class scope.
10519
10520 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
10521
10522         * pt.c (check_explicit_specialization): Don't abort on bogus
10523         explicit instantiations.
10524
10525 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
10526
10527         * typeck.c (require_complete_type): Use complete_type_or_else.
10528         (complete_type_or_else): Always return NULL_TREE on failure, as
10529         documented.
10530
10531         * pt.c (tsubst_aggr_type): Prototype.
10532         (tsubst_decl): New function, split out from tsubst.  Set
10533         input_filename and lineno as appropriate.
10534         (pop_tinst_level): Restore the file and line number saved in
10535         push_tinst_level.
10536         (instantiate_class_template): Set input_filename and lineno as
10537         appropriate.
10538         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
10539         context for a TYPENAME_TYPE is complete.
10540
10541         * decl2.c (grokbitfield): Issue errors on bitfields declared with
10542         function type.
10543         (do_dtors): As in do_ctors, pretend to be a member of the same
10544         class as a static data member while generating a call to its
10545         destructor.
10546
10547         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
10548         conversions, even in complex virtual base class hierarchies.
10549
10550 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
10551
10552         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
10553         (TYPE_TEMPLATE_INFO): Likewise.
10554         (SET_TYPE_TEMPLATE_INFO): Likewise.
10555         (ENUM_TI_TEMPLATE): Likewise.
10556         (ENUM_TI_ARGS): Likewise.
10557         (lookup_nested_type_by_name): Remove.
10558         * decl.c (maybe_process_template_type_declaration): Handle enums.
10559         (start_enum): Don't check for primary-template enum declarations
10560         here.
10561         (finish_enum): Clean up, document.  Make sure template enum
10562         constants get the correct type.
10563         (build_enumerator): Copy initializers for template enumerations,
10564         too.
10565         (grok_enum_decls): Document.
10566         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
10567         better.  Build LOOKUP_EXPRs for local variables, even if they are
10568         TREE_PERMANENT.
10569         * pt.c (tsubst_enum): Remove field_chain parameter.
10570         (template_class_depth): Include the depth of surrounding function
10571         contexts.
10572         (push_template_decl): Check for primary-template enum declarations
10573         here.  Deal with enumeration templates.
10574         (lookup_template_class): Likewise.
10575         (for_each_template_parm): Likewise.
10576         (instantiate_class_template): Don't call tsubst_enum directly,
10577         call tsubst instead, to instantiate enums.  Deal with all
10578         field_chain issues here, not in tsubst_enum.
10579         (lookup_nested_type_by_name): Remove.
10580         (tsubst_aggr_type): Revise handling of enumeration types.
10581         (tsubst): Likewise.
10582         (tsubst_copy): Likewise.
10583         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
10584
10585 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
10586
10587         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
10588         uses template parameters.
10589         * method.c (build_template_parm_names): Use the full set of
10590         template arguments for tsubst'ing.
10591         (build_overload_identifier): Pass the full set of template
10592         arguments to build_template_parm_names, not just the
10593         innermost_args.
10594         * pt.c (TMPL_ARGS_DEPTH): Define using
10595         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
10596         (NUM_TMPL_ARGS): New macro.
10597         (add_outermost_template_args): Deal with the case where the outer
10598         args will be completely discarded.
10599         (coerce_template_parms): Use the full set of template arguments
10600         for tsubst'ing.  Simplify.  Add some asserts.  Improve
10601         error messages.
10602         (lookup_template_class): Pass the full set of template arguments
10603         to coerce_template_parms.
10604         (tsubst): Add assertion.
10605         (do_type_instantiation): Don't instantiate member template
10606         classes.
10607
10608         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
10609         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
10610
10611 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
10612
10613         * method.c (set_mangled_name_for_decl): Change return type to void.
10614
10615         * decl.c (lookup_name_real): A namespace-level decl takes priority
10616         over implicit typename.  Avoid doing the same lookup twice.
10617
10618         * search.c (dependent_base_p): New fn.
10619         (dfs_pushdecls, dfs_compress_decls): Use it.
10620
10621         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
10622         virtual functions if the type doesn't have any.
10623
10624 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
10625
10626         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
10627         uses template parameters.
10628
10629 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
10630
10631         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
10632         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
10633         * lex.c (do_identifier): Don't use a second argument, or a type,
10634         when building LOOKUP_EXPRs.
10635         (do_identifier): Likewise.
10636         (do_scoped_id): Likewise.
10637         * method.c (hack_identifier): Improve error message.
10638         * pt.c (lookup_template_function): Don't needlessly call
10639         copy_to_permanent or build_min.
10640         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
10641         necessary.
10642         (do_decl_instantiation): Improve error message.
10643         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
10644         (build_min): Copy the type to the permanent obstack, too.
10645
10646 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
10647
10648         * init.c (init_init_processing): Remove BI* handling.
10649         (build_builtin_call): Remove.
10650         (build_builtin_delete_call): New fn.
10651         (build_delete): Use it.
10652
10653 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
10654
10655         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
10656         (maybe_check_template_type): New function.
10657         * decl.c (maybe_process_template_type_declaration): New function,
10658         split out from pushtag  Call maybe_check_template_type.
10659         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
10660         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
10661         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
10662         * pt.c (template_class_depth_real): Generalization of ...
10663         (template_class_depth): Use it.
10664         (register_specialization): Use duplicate_decls for duplicate
10665         declarations of specializations.
10666         (maybe_check_template_type): New function.
10667         (push_template_decl_real): Fix comment.
10668         (convert_nontype_argument): Likewise.
10669         (lookup_template_class): Likewise.  Avoid an infinite loop on
10670         erroneous code.
10671         (tsubst_friend_function): Fix comment.
10672         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
10673         an IDENTIFIER_NODE.
10674         * semantics.c (begin_function_definition): Use
10675         reset_specialization to note that template headers don't apply
10676         directly to declarations after the opening curly for a function.
10677
10678 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
10679
10680         * decl.c (push_overloaded_decl): Use current_namespace instead of
10681         DECL_CONTEXT (decl) to determine where we go.
10682
10683         * decl.c (lookup_name_real): Fix typo.
10684
10685 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
10686
10687         * friend.c (is_friend): Be lenient with member functions to deal
10688         with nested friends.
10689
10690 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
10691
10692         * class.c (finish_struct_1): Convert integer_zero_node to
10693         ssizetype before passing it to set_rtti_entry.
10694         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
10695         of any size to a pointer.
10696
10697 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
10698
10699         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
10700         (build_template_decl_overload): Remove.
10701         (set_mangled_name_for_decl): New function.
10702         (innermost_args): Remove is_spec parameter.
10703         (most_specialized, most_specialized_class): Remove declarations.
10704         (lookup_template_class): Add entering_scope parameter.
10705         (maybe_process_partial_specialization): New function.
10706         (finish_template_decl): Likewise.
10707         (finish_template_type): Likewise.
10708         * class.c (finish_struct): Clean up processing of member template
10709         specializations.
10710         * decl.c (pushtag): Fix formatting.
10711         (lookup_tag): Improve handling of pseudo-global levels.
10712         (make_typename_type): Adjust call to lookup_template_class.
10713         (shadow_tag): Use maybe_process_partial_specialization.
10714         (xref_tag): Improve handling of member friends.
10715         (start_function): Call push_nested_class before
10716         push_template_decl.  Don't call push_template_decl for
10717         specializations.
10718         * decl2.c (grok_x_components): Don't call xref_tag for
10719         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
10720         (grokclassfn): Use set_mangled_name_for_decl.
10721         (arg_assoc_class): Adjust call to innermost_args.
10722         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
10723         * error.c (dump_function_name): Improve printing of template
10724         function names.
10725         * friend.c (is_friend): Don't compare types of decls to determine
10726         friendship, unless flag_guiding_decls.
10727         (make_friend_class): Partial specializations cannot be friends.
10728         (do_friend): Use set_mangled_name_for_decl.  Call
10729         push_template_decl_real instead of push_template_decl.
10730         * method.c (build_decl_overload_real): Remove prototype.  Give it
10731         external linkage.
10732         (build_overload_identififer): Adjust call to innermost_args.
10733         (build_template_decl_overload): Remove.
10734         (set_mangled_name_for_decl): New function.
10735         * parse.y (.finish_template_type): New non-terminal.
10736         (template_def): Use finish_template_decl.  Use template_extdef
10737         instead of extdef.
10738         (template_extdef, template_datadef): New non-terminals, containing
10739         only those rules for things which can be templates.
10740         (datadef): Tidy.
10741         (template_type, self_template_type): Use .finish_template_type.
10742         (named_class_head): Use maybe_process_partial_specialization.
10743         * pt.c (mangle_class_name_for_template): Remove context parameter.
10744         (get_class_bindings): Remove outer_args parameter.
10745         (complete_template_args): Remove.
10746         (add_outermost_template_args): New function.
10747         (register_specialization): Return the specialization.
10748         (unregister_specialization): New function.
10749         (tsubst_template_parms): Likewise.
10750         (most_specialized, most_specialized_class): Prototype here as
10751         static.
10752         (original_template): Rename to most_general_template.
10753         (tsubst_template_parms): New function.
10754         (set_mangled_name_for_template_decl): Likewise.
10755         (TMPL_ARGS_DEPTH): New macro.
10756         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
10757         (TMPL_ARGS_LEVEL): New macro.
10758         (SET_TMPL_ARGS_LEVEL): Likewise.
10759         (TMPL_ARG): Likewise.
10760         (SET_TMPL_ARG): Likewise.
10761         (TMPL_ARGS_DEPTH): Likewise.
10762         (finish_member_template_decl): Use finish_template_decl.
10763         (maybe_process_partial_specialization): New function, split out
10764         from tsubst.
10765         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
10766         (maybe_begin_member_template_processing): Use new macros.
10767         (is_member_template): Likewise.
10768         (is_member_template_class): Likewise.
10769         (add_to_template_args): Likewise.  Deal with multiple levels of
10770         args.
10771         (maybe_process_partial_specialization): New function.
10772         (retrieve_specialization): Add consistency check.
10773         (determine_specialization): Return full argument list.
10774         (check_explicit_specialization): Tweak friend handling.  Use full
10775         argument lists.  Simplify.
10776         (current_template_args): Use new macros.
10777         (push_template_decl_real): Change ill-named mainargs to specargs.
10778         Check that a partial specialization actually specializes at least
10779         one parameter.   Improve friend handling.  Modify for full
10780         template arguments.
10781         (classtype_mangled_name): Don't mangle the names of
10782         specializations.
10783         (lookup_template_class): Add entering_scope parameter.  Use it to
10784         avoid finding a template type when an instantiation is required.
10785         Simplify.  Use full template arguments.
10786         (tsubst_friend_function): Use unregister_specialization.  Use new
10787         macros.  Use full template arguments.
10788         (tsubst_friend_class): Substitute, using tsubst_template_parms,
10789         into the template parameters before passing them to
10790         redeclare_class_template.
10791         (instantiate_class_template): Simplify.  Use full template
10792         arguments.  Adjust calls to get_class_bindings.  Use
10793         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
10794         (innermost_args): Use new macros.
10795         (tsubst_aggr_type): New function, split out from tsubst.
10796         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
10797         conventions for lookup_template_class.  Refine handling of partial
10798         instantiations.   Remove calls to complete_template_args.
10799         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
10800         and set_mangled_name_for_template_decl.
10801         (tsubst_copy): Use tsubst_aggr_type.
10802         (instantiate_template): Use full template arguments.
10803         (more_specialized): Improve formatting.
10804         (more_specialized_class): Adjust calls to get_class_bindings.
10805         (get_bindings_real): Don't call complete_template_args.
10806         (most_specialized): Don't overwrite input; create a new list.
10807         (most_specialized_class): Use most_general_template.
10808         (regenerate_decl_from_template): Use unregister_specialization.
10809         Use full template arguments.
10810         (instantiate_decl): Use full template arguments.
10811         (set_mangled_name_for_template_decl): New function.
10812         * semantics.c (begin_class_definition): Use
10813         maybe_process_partial_specialization.
10814         (finish_member_class_template): New function.
10815         (finish_template_decl): Likewise.
10816         (finish_template_type): Likewise.
10817         (typeck.c): Don't crash after issuing a compiler_error.
10818         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
10819
10820 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
10821
10822         * typeck2.c (build_functional_cast): Handle default-initialization.
10823
10824         * call.c (build_over_call): Pass 1 to popclass.
10825
10826         * parse.y (direct_notype_declarator): Add precedence declaration
10827         to notype_unqualified_id case.
10828         * Makefile.in (EXPECT): Adjust.
10829
10830         * tree.c (ovl_member): Fix for single function in OVL.
10831
10832 1998-07-27  Dave Brolley  <brolley@cygnus.com>
10833
10834         * c-lex.c (yylex): Fix boundary conditions in character literal and
10835         string literal loops.
10836
10837 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
10838
10839         * decl.c (lookup_name_real): OK, do return the from_obj value
10840         unless got_object depends on template parms.
10841
10842         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
10843
10844         * pt.c (coerce_template_parms): Also complain about local enums.
10845
10846         * cp-tree.h: Add prototype for set_identifier_local_value.
10847         * decl.c (set_identifier_local_value_with_scope): Make static,
10848         prototype.
10849         * search.c (covariant_return_p): Likewise.
10850         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
10851
10852         * call.c (build_method_call): Only pull out the type of a destructor
10853         if it's a template type parm.
10854         * decl.c (lookup_name_real): Never return the from_obj value.
10855
10856 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
10857
10858         * except.c (process_start_catch_block_old): Call start_decl_1 for
10859         catch parm.
10860         * decl.c (start_decl_1): Avoid duplicate error.
10861
10862         * init.c (expand_default_init): Only perform the initialization if
10863         it will do something.
10864
10865 1998-07-23  H.J. Lu  (hjl@gnu.org)
10866
10867         * parse.y (base_class): Check for invalid base class.
10868
10869 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
10870
10871         * decl2.c (import_export_template): Fold in...
10872         (import_export_class): ...to here.  Handle dllimport/export.
10873
10874         * class.c (build_vtable): Pass at_eof to import_export_vtable.
10875         (prepare_fresh_vtable): Likewise.
10876         * decl2.c (import_export_class): Split out...
10877         (finish_prevtable_vardecl): From here.
10878         * class.c (finish_struct_1): Call import_export_class if at_eof.
10879
10880         * decl.c (start_function): #if 0 mysterious code I wrote and have
10881         forgotten why.
10882         * rtti.c (get_tinfo_fn): If this is for a class type, set
10883         DECL_CONTEXT.
10884
10885 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
10886
10887         * inc/exception: Change terminate and unexpected to ().
10888
10889         * parse.y (named_class_head_sans_basetype_defn): A
10890         named_class_head_sans_basetype followed by '{' or ':' is a defn.
10891
10892 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
10893
10894         * tree.c (canonical_type_variant): New fn to handle arrays.
10895         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
10896         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
10897         * method.c (process_overload_item): Use build_overload_value for
10898         arrays.
10899
10900 1998-07-20  Dave Brolley  <brolley@cygnus.com>
10901
10902         * lex.c (mbchar.h): #include it.
10903         (GET_ENVIRONMENT): New macro.
10904         (init_parse): Set character set based on LANG environment variable.
10905         (real_yylex): Handle multibyte characters in character literals.
10906         (real_yylex): Handle multibyte characters in string literals.
10907
10908 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
10909
10910         * lex.c (do_identifier): Look for class value even if we don't
10911         have a global value.  Do implicit declaration if parsing is 2.
10912         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
10913         lookup.
10914
10915 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
10916
10917         * decl.c (pushtag): Revert previous change.
10918         * pt.c (lookup_template_class): Don't put out debugging
10919         information for types that use template parameters.
10920
10921         * decl.c (pushtag): Don't put out debugging information for
10922         compiler-generated typedefs.
10923
10924         * error.c (dump_type_real): Don't crash when presented with
10925         intQI_type_node or the like.
10926
10927         * semantics.c (finish_translation_unit): Fix spelling error in
10928         comment.
10929
10930 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
10931
10932         * decl.c (lookup_name_real): Pull out single function here.
10933         (select_decl): Not here.
10934         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
10935
10936         * decl.c (qualify_lookup): Tweak again.
10937
10938         * pt.c (lookup_template_class): Don't mess with the context of the
10939         instantiation.
10940         * decl2.c (current_decl_namespace): Remove special handling for
10941         templates.
10942
10943         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
10944         a member template specialization.
10945
10946         * tree.c (ovl_member): Use decls_match to compare functions.
10947         * decl.c (decls_match): Check the context of a function.
10948
10949         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
10950         in Koenig lookup support rules.
10951         * semantics.c (finish_call_expr): Handle the new cases.
10952
10953         * typeck.c (build_x_function_call): Handle overloaded methods.
10954
10955         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
10956
10957 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
10958
10959         * semantics.c (finish_object_call_expr): Revert previous change.
10960         * call.c (build_new_method_call): Likewise.  Instead, convert
10961         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
10962
10963 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
10964
10965         * decl.c (qualify_lookup): Handle templates.
10966
10967         * decl2.c (do_using_directive): Don't pass ancestor.
10968         * decl.c (push_using_directive): Calculate ancestor.
10969
10970         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
10971         * decl.c (pushdecl): Move type shadowing handling from here...
10972         (duplicate_decls): ...to here.
10973         * decl.c (set_identifier_local_value_with_scope): New fn.
10974         (pushdecl): Use it.
10975         (set_identifier_local_value, lookup_type_current_level): New fns.
10976         * decl2.c (do_local_using_decl): Handle types and binding level
10977         stuff properly.
10978
10979         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
10980         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
10981         (lookup_namespace_name): Likewise.
10982         * typeck.c (build_unary_op): Not here anymore.
10983
10984         * decl2.c (do_class_using_decl): Make sure we get an identifier.
10985         * class.c (handle_using_decl): Ignore TYPE_DECLs.
10986
10987         * decl.c (qualify_lookup): New fn.
10988         (lookup_name_real): Use it.
10989
10990 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
10991
10992         * decl2.c (add_using_namespace): When directly using a namespace
10993         that was indirect before, promote it.
10994
10995         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
10996         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
10997         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
10998         * decl.c (select_decl): Replace two flag parameters by one.
10999         (unqualified_namespace_lookup): Likewise, pass flag.
11000         (lookup_flags): New function.
11001         (lookup_name_real): Compute flags, pass them.
11002         (lookup_namespace_name): Call with zero-flag.
11003         * decl2.c (ambiguous_decl): Add flag parameter, complain only
11004         according to flags.
11005         (lookup_using_namespace, qualified_lookup_using_namespace):
11006         Add flag parameter, pass them through.
11007         * lex.c (do_scoped_id): Call with zero-flag.
11008
11009 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
11010
11011         * typeck.c (convert_for_assignment): Use comptypes.
11012
11013 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
11014
11015         * semantics.c (finish_object_call_expr): Move test for the
11016         function called being a TYPE_DECL to ...
11017         * call.c (build_new_method_call): Here.
11018
11019 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
11020
11021         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
11022         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
11023
11024         * lex.c (looking_for_typename): Don't initialize.
11025
11026         * decl2.c (ambiguous_decl): Clarify error message.
11027
11028         * decl.c (push_using_directive): Iterate over namespaces used
11029         indirectly.
11030
11031 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11032
11033         * decl2.c (add_using_namespace): Iterate over namespaces used
11034         indirectly.
11035
11036         * decl.c (lookup_name_real): Accept namespace aliases as locals.
11037         (cat_namespace_levels): Ignore aliases.
11038         (duplicate_decls): Ignore duplicate aliases.
11039         * decl2.c (do_namespace_alias): Process block level namespace
11040         aliases.  Store alias with pushdecl.  Remove odr errors.
11041         * parse.y (namespace_alias): New non-terminal.
11042         (extdef): Use it.
11043
11044 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
11045
11046         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
11047         Handle TEMPLATE_TYPE_PARM.
11048         (arg_assoc): Rewrite.
11049
11050         * pt.c (complete_template_args): Don't look at the context unless
11051         we have to.
11052
11053         * method.c (build_decl_overload_real): Fix namespace handling.
11054
11055         * typeck.c (build_unary_op): Extract a lone function from an
11056         OVERLOAD.
11057
11058         * call.c (build_scoped_method_call): Handle getting a namespace
11059         for basetype in a destructor call.
11060         (check_dtor_name): Handle enums.
11061
11062         * parse.y (using_directive): New nonterminal.
11063         (extdef, simple_stmt): Use it.
11064
11065 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11066
11067         * decl2.c (add_function): Move error message ...
11068         (arg_assoc_namespace): ... from here.
11069
11070 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
11071
11072         * parse.y (namespace_qualifier): Fix multiple level handling.
11073         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
11074         (arg_assoc): Don't skip the first argument of a function.
11075
11076 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
11077
11078         * search.c (my_tree_cons): Clean up.
11079
11080 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
11081
11082         * call.c (joust): Don't warn about "confusing" conversions to the
11083         same type.
11084
11085 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11086
11087         * class.c (push_nested_class): Complain about namespaces.
11088         * decl.c (start_decl): Enter the object's namespace.
11089         (cp_finish_decl): Leave it.
11090         (grokdeclarator): Likewise.
11091         * decl2.c (check_decl_namespace): New function.
11092         (finish_file): Call it.
11093         * parse.y (complex_direct_notype_declarator): Set complexity
11094         of namespace-qualified ids to -1, enter the namespace.
11095
11096         * method.c (build_template_decl_overload): Expect _DECL as first
11097         parameter.  Put context temporarily into current_namespace.
11098         * pt.c (check_explicit_specialization): Change caller.
11099         (tsubst): Likewise.
11100
11101         * init.c (build_offset_ref): Call mark_used and
11102         convert_from_reference for namespace members.
11103
11104 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11105
11106         * search.c (my_tree_cons): The bitfield is at index 2.
11107
11108 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
11109
11110         * lang-options.h: Format changed to work with new --help support
11111         in gcc/toplev.c
11112
11113 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11114
11115         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
11116         Do Koenig lookup in CALL_EXPR.
11117         (arg_assoc): Handle error_mark.
11118         * lex.c (is_global): New function.
11119         (do_identifier): Expect arguments for Koenig lookup.
11120         * parse.y (primary): Add rules for calls of unqualified function calls.
11121         (do_id): Change call of do_identifier.
11122         * pt.c (finish_stmt_expr): Likewise.
11123         * semantics.c (finish_id_expr): Likewise.
11124         (finish_call_expr): Add integer parameter to indicate
11125         argument-dependent lookup.
11126
11127         * decl.c (struct binding_level): New field using_directives.
11128         (push_using_decl): Not sorry anymore.
11129         (push_using_directive): New function.
11130         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
11131         (unqualified_namespace_lookup): New function, code from ...
11132         (lookup_name_real): ... here.
11133         * decl2.c (lookup_using_namespace): Pass using list instead of
11134         initial scope.
11135         (validate_nonmember_using_decl): New function.
11136         (do_nonmember_using_decl): New function.
11137         (do_toplevel_using_decl): Use them.
11138         (do_local_using_decl): New function.
11139         (do_using_directive): Support block-level directives.
11140         * parse.y (simple_stmt): Support using declarations and
11141         directives.
11142         (namespace_qualifier, namespace_using_decl): New non-terminals.
11143
11144         * xref.c (classname): New function.
11145         (GNU_xref_hier): Change class and base parameters to tree.
11146         * decl.c (xref_baseypes): Change caller.
11147         * friend.c (make_friend_class): Likewise.
11148
11149 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
11150
11151         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
11152         comparison.
11153
11154         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
11155         template template parameter, record its use.
11156         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
11157         its template arguments if exists.
11158
11159         * pt.c (coerce_template_template_parms): New function equivalent
11160         to coerce_template_parms when IS_TMPL_PARM is true.
11161         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
11162         all callers changed.
11163
11164         (coerce_template_parms): Access ARGLIST properly when creating a
11165         new vector.  Only accept implicit TYPE_DECL as valid argument for
11166         a template template parameter when it is a base class of
11167         current_class_type.  Don't display error message when COMPLAIN is
11168         false.
11169
11170 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
11171
11172         * repo.c (get_base_filename): Use file_name_nondirectory.
11173         (open_repo_file): Likewise.
11174         * cp-tree.h (file_name_nondirectory): Add prototype.
11175
11176 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
11177
11178         * friend.c (do_friend): Pull the identifier out of declarator.
11179         Use cp_error and friends.
11180         * decl2.c (qualified_lookup_using_namespace): Fix call to
11181         purpose_member.
11182         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
11183         (grokvardecl): Use DECL_CLASS_SCOPE_P.
11184         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
11185         * class.c (warn_hidden): Fix for OVERLOAD.
11186         From grahams@rcp.co.uk:
11187         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
11188         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
11189
11190 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
11191
11192         * g++.1 (-traditional): Remove duplicated documentation.
11193
11194 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
11195
11196         * method.c (flush_repeats): Add nrepeats parameter.
11197         (issue_nrepeats): Likewise.
11198         (is_back_referenceable_type): New function.  Don't back-reference
11199         TEMPLATE_TYPE_PARMs as well as simple types like integers.
11200         (build_mangled_name_for_type): Likewise.
11201         (build_mangled_name_for_type_with_Gcode): Likewise.
11202         (lasttype): Remove.
11203         (nrepeats): Likewise.
11204         (Nrepeats): Likewise.
11205         (start_squangling): Don't clear the variables removed above.
11206         (end_squangling): Likewise.
11207         (flush_repeats): Tidy.  Use nrepeats parameter rather than
11208         Nrepeats global.
11209         (issue_nrepeats): Likewise, but with nrepeats global.  Use
11210         is_backreferenceable_type.
11211         (build_overload_nested_name): Tidy.  Add comment.  Use
11212         build_mangled_name_for_type.
11213         (build_underscore_int): Comment.
11214         (build_overload_scope_ref): Use build_mangled_name_for_type.
11215         (build_overload_int): Likewise.
11216         (build_template_template_parm_names): Tidy.
11217         (build_template_parm_names): Use build_mangled_name_for_type.
11218         (build_overload_identifier): Add comments.
11219         (build_mangled_name_for_type_with_Gcode): Split out from
11220         build_mangled_name.
11221         (build_mangled_name_for_type): Use it.
11222         (build_mangled_name): Rework to use build_mangled_name_for_type
11223         and to not use global nrepeats/Nrepeats.  Tidy.
11224         (process_modifiers): Tidy.
11225         (check_btype): Use is_backreferenceable_type.  Add comment.
11226         Rename `node' to `type'.
11227         (process_overload_item): Set numeric_output_need_bar here.
11228         Use build_mangled_name_for_type.  Tidy.
11229         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
11230         build_mangled_name_for_type.
11231
11232         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
11233         for TYPE_DECLs.
11234
11235 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
11236
11237         * cp-tree.h (warn_long_long): Define.
11238         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
11239         warning "ANSI C++ does not support `long long'".
11240         * decl2.c (warn_long_long): Define.
11241         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
11242
11243 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
11244
11245         * decl.c (xref_tag): Handle attributes between 'class' and name.
11246         * parse.y (aggr): Likewise.
11247         * semantics.c (finish_class_definition): Likewise.
11248         * Makefile.in (EXPECTED): Adjust.
11249
11250         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
11251         * decl2.c: Define them.
11252         (lang_decode_option): Handle them.
11253         * lang-options.h: Add -foptional-diags.
11254         * class.c (finish_struct): Don't complain about multiple meanings of
11255         name if -fno-optional-diags.
11256         * decl.c (pushdecl_class_level): Likewise.
11257         * lex.c (real_yylex): Check warn_multichar.
11258
11259 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
11260
11261         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
11262
11263         * tree.c (make_binfo): Fix length.
11264
11265 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
11266
11267         * decl2.c (lang_decode_option): Remove warn_template_debugging.
11268         * lang-options.h: Likewise.
11269
11270 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11271
11272         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
11273         (process_start_catch_block): Likewise for variables
11274         `false_label_rtx', `call_rtx' and `return_value_rtx'.
11275
11276 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
11277
11278         * tree.c (build_srcloc): Make sure we allocate this node on the
11279         permanent obstack.
11280
11281 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
11282
11283         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
11284         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
11285         (lang_specific_driver): Only add -lm automatically if need_math is
11286         nonzero.
11287
11288 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
11289
11290         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
11291
11292 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11293
11294         * Makefile.in (EXPR_H): New dependency variable.
11295         (decl2.o): Depend on $(EXPR_H).
11296         (typeck.o): Likewise.
11297         (init.o): Likewise.
11298         (expr.o): Likewise.
11299
11300 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
11301
11302         * decl.c (start_enum): Put local enums on permanent_obstack.
11303
11304 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
11305
11306         * cp-tree.h (c_get_alias_set): Declare.
11307         * decl.c (init_decl_processing): Set lang_get_alias_set.
11308
11309 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
11310
11311         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
11312         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
11313         flag for all function decls which are in the exception table.
11314         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
11315         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
11316         code is emitted for any referenced rtti function.
11317
11318 1998-06-25  Dave Brolley  <brolley@cygnus.com>
11319
11320         * lang-specs.h: Use new | syntax to eliminate
11321         string concatenation.
11322
11323 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
11324
11325         * cp-tree.h (CP_DECL_CONTEXT): New macro.
11326         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
11327         * method.c (build_overload_nested_name): Likewise.
11328         * sig.c (build_signature_pointer_or_reference_type): Don't set
11329         DECL_CONTEXT.
11330
11331 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11332
11333         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
11334         * cp-tree.h (FROB_CONTEXT): New macro.
11335         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
11336         * decl.c (namespace_binding): Replace NULL_TREE with
11337         global_namespace.
11338         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
11339         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
11340         Likewise.
11341         * decl.c (pushtag): Use FROB_CONTEXT.
11342         (pushdecl, make_typename_type, define_function, grokdeclarator):
11343         Likewise.
11344         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
11345         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
11346         Likewise.
11347         * decl2.c (decl_namespace): Return global_namespace if no context.
11348         * method.c (build_overload_nested_name): Expect null as context.
11349         * pt.c (mangle_class_name_for_template): Do nothing for null
11350         contexts.
11351         (lookup_template_class): Allow for null id_context.
11352
11353 1998-06-25  Richard Henderson  <rth@cygnus.com>
11354
11355         * method.c (emit_thunk): Set current_function_is_thunk for the
11356         ASM_OUTPUT_MI_THUNK case as well.
11357
11358 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
11359
11360         * exception.cc (__cplus_type_matcher): Get a match_info pointer
11361         instead of an exception table entry as a parameter.
11362
11363 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
11364
11365         * parse.y (function_try_block): Don't call start_catch_handler.
11366         * except.c (call_eh_info): Remove coerced field from declaration.
11367         (build_eh_type_type_ref): New function to create an address of a
11368         rtti function for the new style exception tables.
11369         (expand_start_catch_block): Split function, this contains the
11370         common part.
11371         (process_start_catch_block_old): New function to perform the rest
11372         of expand_start_catch_block under old style exceptions.
11373         (process_start_catch_block_old): New function to perform the rest
11374         of expand_start_catch_block under new style exceptions.
11375         (expand_end_catch_block): Only pop the false label off the stack under
11376         the old style of exceptions.
11377         * semantics.c (finish_try_block): Don't call start_catch_handler.
11378         * exception.cc (struct cp_eh_info): Add original_value field.
11379         (__cplus_type_matcher): Perform type matching on the original exception
11380         value, and if we have a match, set the current value.
11381         (__cp_push_exception): Set the original exception value.
11382
11383 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
11384
11385         * call.c (joust): Fix confusing conversion warning.
11386
11387         * call.c (build_op_delete_call): Add placement parm.  Check
11388         LOOKUP_SPECULATIVELY.
11389         * cp-tree.h, decl2.c, init.c: Adjust.
11390         * decl.c (finish_function): Use it.
11391
11392         * pt.c (tsubst): Diagnose creating void fields or variables.
11393
11394 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11395
11396         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
11397
11398         * cp-tree.h (check_dtor_name): Add prototype.
11399
11400         * init.c (expand_member_init): Remove unused variables
11401         `ptr_type_node', `parm' and `rval'.
11402
11403         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
11404         in call to fprintf.
11405         (lang_print_xnode): Likewise.
11406
11407         * typeck2.c (enum_name_string): Cast argument to sprintf to long
11408         and use %ld specifier.
11409
11410         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
11411         specifier in call to fprintf.
11412         (GNU_xref_member): Cast argument to sprintf to int.
11413
11414 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
11415
11416         * typeck2.c (pop_init_level): Warn about implicit zero initialization
11417         of struct members.
11418
11419 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11420
11421         * cp-tree.h: Prototype function `check_java_method'.
11422
11423 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
11424
11425         * class.c (finish_struct): Make conflicting use of id a pedwarn.
11426         * decl.c (pushdecl_class_level): Likewise.
11427
11428 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
11429
11430         * pt.c (convert_nontype_argument): Issue an error when presented
11431         with an integer (real) constant that cannot be simplified to an
11432         INT_CST (REAL_CST).
11433
11434         * cp-tree.h (c_get_alias_set): Remove declaration added in
11435         1998-06-13 change that should never have been checked in.
11436
11437 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
11438
11439         * typeck.c (build_binary_op_nodefault): Change % in format strings
11440         to %%.
11441
11442         * decl.c (grokvardecl): Don't build_static_name for decls that
11443         aren't at namespace scope.
11444
11445         * init.c (perform_member_init): Catch default-initialization of
11446         references.
11447
11448 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
11449
11450         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
11451
11452 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
11453
11454         * method.c (hack_identifier): Complain about getting a namespace
11455         or class template.
11456         * typeck.c (decay_conversion): Remove check for namespaces.
11457         * typeck2.c (incomplete_type_error): Likewise.
11458         * parse.y (template_arg): Add PTYPENAME expansion.
11459
11460 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
11461
11462         * decl.c (grokvardecl): Don't build external assembler names for
11463         TYPENAMEs in other namespaces as there is no declarator.
11464         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
11465         info from DECL_CONTEXT if it is NULL.
11466
11467 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
11468
11469         * call.c (check_dtor_name): Split out.
11470         (build_scoped_method_call): Use it.
11471         (build_method_call): Use it.
11472         * init.c (build_offset_ref): Use it.
11473
11474         * typeck.c (build_static_cast): Fix handling of pointers to members.
11475
11476         * decl.c (finish_function): Just return nothing from a constructor.
11477         * typeck.c (c_expand_return): Complain about returning a void
11478         expression from a destructor.
11479
11480 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
11481
11482         * class.c (alter_access): Accept a BINFO explaining how to get
11483         from the entity whose accessed is being altered to the type doing
11484         the altering.
11485         (handle_using_decl): New function containing code split out from ...
11486         (finish_struct_1): Here.
11487
11488         * cp-tree.h (complete_type_or_else): Declare.
11489         * init.c (build_new_1, build_delete): Use it.
11490         * typeck.c (require_complete_type): Use complete_type, rather than
11491         expanding it inline.
11492         (complete_type_or_else): New function.
11493         (build_component_ref): Use it.
11494         (pointer_int_sum): Make sure the type pointed to is complete.
11495         (pointer_diff): Likewise.
11496
11497         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
11498         types.
11499
11500         * search.c (get_matching_virtual): Note that member templates
11501         cannot override virtual functions.
11502
11503 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
11504
11505         * pt.c (check_explicit_specialization): If DECLARATOR turned into
11506         an error_mark_node from lookup_template_function, return the same.
11507         (determine_specialization): Also make sure TEMPLATE_ID isn't an
11508         error_mark_node, before we try to read its operands.
11509         * decl.c (grokdeclarator): If we got an error_mark_node from
11510         check_explicit_specialization, just return it right back.
11511
11512 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
11513
11514         * class.c (instantiate_type): Don't treat template-ids that don't
11515         specify any template arguments as equivalent to ordinary
11516         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
11517         pointer-to-members for member templates.  Tidy slightly.
11518         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
11519         * init.c (build_offset_ref): Handle template-ids like ordinary
11520         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
11521         offset part of the OFFSET_REF.
11522         * typeck.c (build_unary_op): Change check for unknown types to
11523         look for OFFSET_REFs, not SCOPE_REFs.
11524
11525 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
11526
11527         * pt.c (is_member_template_class): New function.
11528         (push_template_decl_real): Use it.
11529
11530 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
11531
11532         * friend.c (do_friend): Add support for nested classes using
11533         member functions of the enclosing class as friends.
11534
11535 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
11536
11537         * call.c (convert_default_arg): Make global, not static.
11538         (convert_arg_for_ellipsis): Split out from ...
11539         (build_over_call): Here.
11540         * cp-tree.h (convert_default_arg); Declare.
11541         (convert_arg_to_ellipsis): Likewise.
11542         (do_member_init): Remove.
11543         * init.c (do_member_init): Remove; this code is dead.
11544         (expand_member_init): Remove much of this code; it is dead.
11545         * typeck.c (convert_arguments): Use convert_default_arg and
11546         convert_arg_for_ellipsis, rather than duplicating here.
11547
11548         * call.c (convert_like): Don't fail silently if
11549         build_user_type_conversion fails.  Always return error_mark_node
11550         for failure.
11551
11552 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
11553
11554         * search.c (covariant_return_p): Complain about ambiguous base.
11555
11556         * typeck.c (build_component_ref): Diagnose ref to nested type.
11557
11558 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
11559
11560         * decl.c (grokparms): Check that INIT isn't an error_mark_node
11561         before giving error about invalid type for default arg.
11562
11563 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
11564
11565         * call.c (build_method_call): Fix thinko.
11566
11567 1998-06-10  Dave Brolley  <brolley@cygnus.com>
11568
11569         * decl2.c (lang_decode_option): New argc/argv interface.
11570         * cp-tree.h (lang_decode_option): New argc/argv interface.
11571         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
11572         specified for cpplib-enabled compilers.
11573         * lex.c (lang_init): Don't check_newline for cpplib.
11574         (init_parse): Don't initialize cpplib here.
11575
11576 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
11577
11578         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
11579         piece before checking DECL_MUTABLE_P.
11580
11581 1998-06-10  John Carr  <jfc@mit.edu>
11582
11583         * tree.c (debug_binfo): Make printf format match arguments.
11584
11585         * error.c (OB_PUTI): Make printf format match arguments.
11586
11587 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
11588
11589         * init.c (perform_member_init): Handle default-initialization.
11590
11591         * except.c (build_throw): Handle throwing NULL.
11592
11593         * typeck.c (build_x_function_call): Use resolve_offset_ref.
11594
11595         * search.c (compute_access): Only strip an anonymous union
11596         for a FIELD_DECL.
11597
11598         * call.c (add_builtin_candidates): Tweak.
11599
11600         * cvt.c (build_expr_type_conversion): Restore code for conversion
11601         from class types.
11602         * decl2.c (delete_sanity): Use it.  Clean up.
11603
11604         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
11605
11606 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
11607
11608         * typeck.c (c_expand_return): Don't warn about void expressions on
11609         return statements in functions returning void.
11610
11611 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
11612
11613         * pt.c (fn_type_unification): Revise documentation.  Tidy.
11614         (type_unification): Likewise.
11615
11616 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
11617
11618         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
11619         expand_end_catch.
11620         * parse.y (function_try_block): Rename expand_start_catch, and delete
11621         expand_end_catch.
11622         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
11623         expand_end_catch.
11624
11625 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
11626
11627         * search.c (lookup_member): New fn.
11628         * class.c (finish_struct_1): Use it.
11629         * decl.c (lookup_name_real): Use it.
11630
11631 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11632
11633         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
11634
11635         * cp-tree.h: Add prototype for `maybe_print_template_context' and
11636         `maybe_make_one_only'.
11637
11638         * decl.c (auto_function): Remove unused variable `decl'.
11639
11640         * decl2.c: Include dwarf2out.h and dwarfout.h.
11641
11642         * lex.c: Remove redundant declarations of `set_float_handler' and
11643         `asm_out_file'.
11644
11645 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
11646
11647         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
11648         time flag.  Call __cp_eh_info instead of __cp_exception_info.
11649         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
11650         (__cp_exception_info): Return offset into cp_eh_info structure to
11651         match what use to be the start of this structure.
11652         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
11653         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
11654         compile time flag.
11655         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
11656         __cp_eh_info instead of __cp_exception_info.
11657
11658 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
11659
11660         * decl.c (cp_finish_decl): Disable inlining of extern inlines
11661         with static variables.
11662
11663 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
11664
11665         * init.c (build_offset_ref): Correct previous change to use build,
11666         not build_min.
11667
11668 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
11669
11670         * class.c (instantiate_type): Handle pointer-to-members where the
11671         member is a template.
11672         * init.c (build_offset_ref): Likewise.
11673         * typeck.c (build_unary_op): Likewise.
11674
11675 1998-06-07  Richard Henderson  <rth@cygnus.com>
11676
11677         * lex.c (lang_init_options): New function.
11678         (lang_init): Remove flag_exceptions == 2 hack.
11679
11680 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
11681
11682         * search.c (envelope_add_decl): Tweak for implicit typename.
11683
11684         * call.c (joust): Also warn about confusing conversion op/constructor
11685         overload resolution.
11686
11687         * spew.c (yylex): Also return the TYPE_DECL if got_object.
11688         Don't clear got_object after '~'.
11689         * call.c (build_scoped_method_call): Tweak destructor handling.
11690         (build_method_call): Likewise.
11691         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
11692         TYPE_MAIN_VARIANT for destructors.
11693         * semantics.c (finish_object_call_expr): Complain about calling a
11694         TYPE_DECL.
11695
11696 1998-06-05  Per Bothner  <bothner@cygnus.com>
11697
11698         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
11699         Define - update needed by gcc.c change.
11700
11701 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
11702
11703         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
11704
11705 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
11706
11707         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
11708         * decl.c (lookup_name_real): Add namespaces_only parameter.
11709         If set, return only NAMESPACE_DECLs.
11710         (select_decl): Likewise.
11711         (identifier_type_value): Give additional parameter.
11712         (lookup_name_nonclass): Likewise.
11713         (lookup_name): Likewise.
11714         (find_binding): Skip namespace aliases.
11715         (binding_for_name): Likewise.
11716         (push_namespace): Check for namespace aliases.
11717         (lookup_name_namespace_only): New function.
11718         (begin_only_namespace_names, end_only_namespace_names): New functions.
11719         * decl2.c (set_decl_namespace): Skip namespace aliases.
11720         (do_using_directive): Likewise.
11721         (do_namespace_alias): Produce namespace aliases, fix alias
11722         redeclaration.
11723         * error.c (dump_decl): Support SCOPE_REF.
11724         * parse.y (extdef): Wrap lookup with namespace_only for namespace
11725         aliases and using declarations.
11726
11727 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
11728
11729         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
11730
11731         * error.c (dump_expr): Clean up NEW_EXPR case.
11732
11733 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11734
11735         Suggested by Brendan Kehoe
11736         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
11737         treat it as using ::decl.
11738
11739         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
11740
11741         * tree.c (mapcar): Support NEW_EXPR.
11742
11743         * error.c (dump_expr): Support NEW_EXPR.
11744
11745 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
11746
11747         * method.c (make_thunk): Use overload machinery to make name.
11748         * search.c (covariant_return_p): New fn.
11749         (get_matching_virtual): Use it.
11750
11751         * init.c (build_new_1): Fix check for void.
11752
11753 1998-06-01  Per Bothner  <bothner@cygnus.com>
11754
11755         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
11756         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
11757         java_int_type_node, java_long_type_node, java_float_type_node,
11758         java_double_type_node, java_char_type_node, java_boolean_type_node):
11759         New "primitive" types, with predefined names __java_byte etc.
11760         (record_builtin_java_type):  New function.
11761         (init_decl_processing):  Make Java types with record_builtin_java_type.
11762         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
11763         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
11764         (grokfndecl):  Call check_java_method for Java classes.
11765         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
11766         (process_overload_item):  Match types against specific
11767         java_XX_type_node types, rather than using is_java_type.
11768         * class.c (finish_struct_1):  Don't add default copy constructor
11769         or operator= if TYPE_FOR_JAVA.
11770         (pop_lang_conext):  Restore strict_prototyp proper if Java.
11771         * decl2.c (acceptable_java_type, check_java_method):  New functions.
11772         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
11773         (tsubst):  Move common statement after if statement.
11774         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
11775
11776 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
11777
11778         * pt.c (for_each_template_parm): Use first_rtl_op.
11779
11780         * tree.c (build_cplus_array_type_1): Also check index_type for
11781         template parms.
11782
11783 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
11784
11785         * pt.c (tsubst): Always copy BINFO_BASETYPES.
11786
11787 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
11788
11789         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
11790         TYPE_SIZE_UNIT too.
11791
11792 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
11793
11794         * decl.c (grokdeclarator): Don't complain about in-class
11795         initialization of static consts if we don't really know the type
11796         of the variable.
11797
11798 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
11799
11800         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
11801         * method.c (build_destructor_name): New fn.
11802         * decl2.c (maybe_retrofit_in_chrg): Split out...
11803         (grokclassfn): From here.  Reorganize.
11804         * decl.c (grok_ctor_properties): Make sure ctors for types with
11805         vbases have the in_chrg parm.
11806         * pt.c (instantiate_class_template): Update
11807         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
11808         grok_*_properties.
11809         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
11810
11811 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
11812
11813         * pt.c (instantiate_decl): Make test for whether or not static
11814         variables should be instantiated early match its comment.
11815
11816 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
11817
11818         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
11819         a member.
11820         (start_function): Call check_default_args.
11821         * decl2.c (grokfield): Don't call check_default_args.
11822         (check_default_args): Use cp_error_at.
11823         * lex.c (do_pending_defargs): Call check_default_args.
11824
11825 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
11826
11827         * call.c (build_method_call): Make sure get_type_value returns
11828         something before we try to use its TYPE_MAIN_VARIANT.
11829         (build_scoped_method_call): Likewise.
11830
11831 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
11832
11833         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
11834         initialize an array.
11835
11836         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
11837         DECL_VIRTUAL_P.
11838
11839         * friend.c (do_friend): Clarify template warning.
11840
11841 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
11842
11843         * decl.c (shadow_label): Don't treat decls as identifiers.
11844         (maybe_push_to_top_level): Clear shadowed_labels.
11845
11846         * pt.c (instantiate_decl): Reset lineno and filename after calling
11847         regenerate_decl_from_template.
11848
11849         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
11850         error_mark_node.
11851
11852 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
11853
11854         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
11855
11856 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11857
11858         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
11859         (convert_nontype_argument): Handle cases when nontype template
11860         parameters become classes after substitution.
11861
11862 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
11863
11864         * friend.c (is_friend): Use comptypes, rather than == to compare
11865         types.  Modify for new representation of template friends.
11866         (make_friend_class): Likewise.
11867         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
11868         (instantiate_class_template): Deal with template friends.
11869
11870         * decl.c (store_parm_decls): Remove redundant call to
11871         expand_main_function.
11872
11873 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11874
11875         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
11876         DECL_USE_TEMPLATE.
11877
11878 1998-05-26  Per Bothner  <bothner@cygnus.com>
11879
11880         * language_as_string:  Handle lang_java.
11881
11882 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
11883
11884         * decl.c (pushdecl): Don't copy the type_decl.
11885
11886 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11887
11888         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
11889         current_class_type.
11890         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
11891
11892         * parse.y (complex_direct_notype_declarator): Use $1 to access
11893         scope of notype_qualified_id.
11894
11895 1998-05-26  Dave Brolley  <brolley@cygnus.com>
11896
11897         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
11898         (init_parse): Initialize cpplib interface.
11899
11900         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
11901         empty continuation.
11902
11903 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
11904
11905         * decl.c (pushtag): Avoid crashing on erroneous input.
11906
11907 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11908
11909         * decl.c (push_namespace): Only produce one unique name for
11910         anonymous namespaces.
11911         (get_unique_name): Remove.
11912
11913 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
11914
11915         * call.c (tourney): Don't do any extra comparisons.
11916
11917         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
11918
11919         * cp-tree.h (processing_template_parmlist): Declare.
11920         * decl.c (pushtag): Don't call push_template_decl when we
11921         shouldn't.
11922         * pt.c (processing_template_parmlist): New variable.
11923         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
11924         (complete_template_args): Use it.
11925         (add_to_template_args): Likewise.
11926         (innermost_args): Likewise.
11927         (tsubst): Likewise.
11928         (begin_template_parm_list): Use processing_template_parmlist.
11929         (end_template_parm_list): Likewise.
11930
11931         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
11932         * decl.c (grokdeclarator): Use it.
11933         * decl2.c (grok_x_components): Likewise.
11934         * init.c (initializing_context): Likewise.
11935         * method.c (do_build_copy_constructor): Likewise.
11936         (do_build_assign_ref): Likewise.
11937         * search.c (compute_access): Likewise.
11938         * typeck.c (build_component_ref): Likewise.
11939
11940         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
11941         unnamed type a typedef name "for linkage purposes".
11942
11943         * pt.c (lookup_template_class): Don't look at
11944         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
11945
11946         * method.c (build_overload_int): Handle error cases gracefully.
11947
11948         * pt.c (instantiate_decl): Handle static member variables
11949         correctly.
11950
11951         * pt.c (tsubst): Use the tsubst'd type when producing new
11952         TEMPLATE_PARM_INDEX nodes.
11953
11954 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
11955
11956         * tree.c (cp_tree_equal): Handle pointers to member functions.
11957
11958         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
11959         sure the type of the REF_BIND is a reference type.
11960         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
11961         target_type for clarity.
11962
11963         * parse.y (xcond): Move call to condition_conversion ...
11964         * semantics.c (finish_for_cond): Here.
11965         * parse.c: Regenerated.
11966
11967 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
11968
11969         * decl.c (push_namespace): Namespaces have type void.
11970         * typeck2.c (incomplete_type_error): Complain about namespace
11971         used as expression.
11972         * typeck.c (decay_conversion): Likewise.
11973
11974 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11975
11976         * error.c (dump_expr): Support namespaces.
11977
11978 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
11979
11980         * cp-tree.def: Add SRCLOC.
11981         * cp-tree.h: Add struct tree_srcloc and accessor macros.
11982         * tree.c (build_srcloc, build_srcloc_here): New fns.
11983         * pt.c (add_pending_template): Use build_srcloc_here.
11984         (push_tinst_level): Update last_template_error_tick before erroring.
11985         (instantiate_decl): Restore lineno and input_filename before
11986         calling add_pending_template.
11987         * decl2.c (finish_file): Set up lineno and input_filename for
11988         pending templates.
11989
11990 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
11991
11992         * decl.c (lang_print_error_function): New fn.
11993         (init_decl_processing): Set print_error_function to use it.
11994         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
11995
11996         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
11997         ICS_BAD_FLAG.
11998
11999         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
12000         copy-initialization.
12001
12002         * class.c (build_vtable_entry): Use int_fits_type_p.
12003         (build_vtable): Pass a signed offset to build_vtable_entry.
12004         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
12005         set_rtti_entry): Likewise.
12006
12007 1998-05-22  Per Bothner  <bothner@cygnus.com>
12008
12009         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
12010         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
12011
12012 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
12013
12014         * pt.c (print_template_context): Use fprintf instead of cp_error.
12015
12016         * pt.c (determine_specialization): Just return an error_mark_node.
12017         Also print the decl we want in error messages.  If we complain,
12018         return error_mark_node.
12019         (tsubst_friend_function): Set lineno and input_filename so
12020         error messages will be useful.
12021         (instantiate_template): Just return an error_mark_node.
12022         (check_explicit_specialization): Don't mess with a returned
12023         error_mark_node.
12024
12025         * pt.c (print_template_context): Add new argument.
12026         (maybe_print_template_context): New fn.
12027         (push_tinst_level): Increment tinst_level_tick.
12028         (pop_tinst_level): Likewise.
12029         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
12030         xrealloc instead of xmalloc.
12031
12032         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
12033
12034 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
12035
12036         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
12037         if the template we looked up is the same as the one we already
12038         have.
12039
12040 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
12041
12042         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
12043         (cpp_reader,parse_in): Add for cpplib.
12044         (check_newline): Call handle_sysv_pragma with new interface.
12045         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
12046
12047         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
12048         (sub_getch): Call GETC for cpplib.
12049
12050         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
12051         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
12052
12053         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
12054
12055 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
12056
12057         * decl2.c (maybe_make_one_only): New fn.
12058         (import_export_vtable): Use it.
12059         (import_export_decl): Likewise.
12060         * pt.c (mark_decl_instantiated): Likewise.
12061
12062 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
12063
12064         * decl2.c (find_representative_member): Rename to ...
12065         (build_anon_union_vars): New function.
12066         (finish_anon_union): Fix stupidity of previous change.
12067
12068 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
12069
12070         * decl.c (grokfndecl): Handle definition of specialization in
12071         friend declaration.
12072
12073         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
12074
12075 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
12076
12077         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
12078         to look for type declarations.
12079         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
12080         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
12081         (finish_member_class_template): Declare.
12082         * decl.c (pushtag): Put member class templates on the
12083         CLASSTYPE_TAGS list, just as for ordinary member classes.
12084         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
12085         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
12086         IDENTIFIER_NAMESPACE_VALUEs.
12087         * parse.y (component_decl): Move code to ...
12088         * semantics.c (finish_member_class_template): New function.
12089         Don't put member class templates on the list of components for a
12090         class.
12091         * parse.c: Regenerated.
12092         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
12093         In fact, don't use DECL_CONTEXT at all here.
12094
12095 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12096
12097         * decl.c (record_unknown_type): New function.
12098         (init_decl_processing): Call it for the unknown and global type
12099         nodes.
12100
12101 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
12102
12103         * decl2.c (find_representative_member): New function.
12104         (finish_anon_union): Use it.
12105
12106         * cp-tree.h (MAIN_NAME_P): New macro.
12107         (DECL_MAIN_P): Likwise.
12108         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
12109         (grokfndecl): Use the new macros.
12110         (grokdeclarator): Likewise.
12111         (start_function): Likewise.
12112         (store_parm_decls): Likewise.
12113         (finsh_function): Likewise.
12114         * friend.c (do_friend): Likewise.
12115         * typeck.c (build_function_call_real): Likewise.
12116         (build_unary_op): Likewise.
12117
12118 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
12119
12120         * decl2.c (start_objects, finish_objects, do_dtors,
12121         do_ctors): Split out from...
12122         (finish_file): ...here.
12123
12124 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
12125
12126         * tree.c (is_overloaded_fn): Don't abort on placeholders from
12127         push_class_decls.
12128
12129 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
12130
12131         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
12132
12133         * error.c (dump_expr): Handle an ARROW_EXPR.
12134
12135 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
12136
12137         * decl.c (saveable_obstack): Declare.
12138         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
12139         declare, if necessary.
12140
12141 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
12142
12143         * call.c (compare_qual): Remove.
12144         (is_subseq): Tweak.
12145         (is_properly_derived_from): New function.
12146         (maybe_handle_ref_bind): Likewise.
12147         (maybe_handle_implicit_object): Likewise.
12148         (compare_ics): Modify substantially to bring into conformance with
12149         the standard.
12150         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
12151         (comp_cv_qualification): Declare.
12152         (comp_cv_qual_signature): Likewise.
12153         * typeck.c (comp_cv_qualification): Likewise.
12154         (comp_cv_qual_signature): Likewise.
12155
12156 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12157
12158         * Makefile.in (parse.o): Depend on toplev.h.
12159
12160         * class.c (typecode_p): Remove prototype and definition.
12161
12162         * cp-tree.h (currently_open_class, is_empty_class, member_p):
12163         Add prototype.
12164
12165         * decl.c (push_overloaded_decl_top_level): Remove prototype and
12166         definition.
12167
12168         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
12169         in call to `cp_thing'.
12170         (cp_warning): Likewise for function pointer `warning'.
12171
12172         * except.c (do_function_call): Remove prototype and definition.
12173         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
12174
12175         * method.c (is_java_type): Add prototype and make it static.
12176
12177         * parse.y: Include toplev.h.
12178
12179         * pt.c (type_unification): Remove unused variable `arg'.
12180         (instantiate_decl): Likewise for `save_ti'.
12181
12182         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
12183
12184 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
12185
12186         * init.c (build_member_call): Handle template_ids.
12187         * parse.y (primary): Add global_scope template_id.
12188
12189 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
12190
12191         * decl2.c (get_sentry): Use end_temporary_allocation.
12192         Don't declare permanent_obstack.
12193
12194 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
12195
12196         * parse.y (.finish_new_placement): New non-terminal.
12197         (unary_expr, new_type_id): Use it.
12198         * parse.c: Regenerated.
12199
12200 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
12201
12202         * pt.c (redeclare_class_template): Say where the original definition
12203         of the template-parameter's default argument appeared.
12204
12205 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
12206
12207         * call.c (build_over_call): Tweak empty class handling.
12208
12209         * decl.c (make_typename_type): Use currently_open_class.
12210
12211         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
12212
12213 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12214
12215         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
12216         for a type unless it is one.
12217
12218         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
12219
12220 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
12221
12222         * Makefile.in (program_transform_name, objdir): Define.
12223
12224         * Makefile.in (BISON): Use bison from the build tree if it exists.
12225         (FLEX): Likewise.
12226
12227 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12228
12229         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
12230
12231         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
12232
12233 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
12234
12235         * call.c (build_scoped_method_call): Likewise.
12236
12237 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
12238
12239         * init.c (build_new_1): Call suspend_momentary around the creation
12240         of values that must be saved for exception handling.
12241         * parse.y (.build_new_placement): New non-terminal.
12242         (unary_expr, new_placement): Use it.
12243         * parse.c: Regenerated.
12244
12245 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
12246
12247         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
12248         old and new types.
12249
12250         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
12251         canonical type.
12252
12253         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
12254
12255 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
12256
12257         * decl.c (start_decl): Revert problem change.
12258
12259         * Makefile.in (CONFLICTS): Fix.
12260
12261 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12262
12263         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
12264
12265 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
12266
12267         * class.c (finish_struct_1): Use BINFO_SIZE.
12268
12269         * decl.c (start_decl): Use 'tem'.
12270
12271 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
12272
12273         * exception.cc: Include eh-common.h.
12274         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
12275         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
12276         (__cp_push_exception): Initialize eh_info struct as well.
12277         * except.c: Remove local structs and include eh-common.h.
12278         (init_exception_processing): Set language and version codes.
12279         (call_eh_info): Add presence of eh_info to runtime description of
12280         struct cp_eh_info.
12281         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
12282         * semantics.c (finish_try_block): Call start_catch_block() and
12283         end_catch_block().
12284         * parse.y (function_try_block): Call start_catch_block() and
12285         end_catch_block().
12286
12287 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
12288
12289         * typeck.c (original_type): New function.
12290         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
12291         to see if they're actually the same.
12292         * cp-tree.h (original_type): Declare.
12293
12294 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12295
12296         * Makefile.in (lex.o): Depend on output.h.
12297
12298         * call.c (add_function_candidate): Remove unused variable `cand'.
12299         (add_conv_candidate): Likewise.
12300         (build_builtin_candidate): Likewise.
12301
12302         * cp-tree.h: Add prototype for `types_overlap_p'.
12303
12304         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
12305
12306         * decl2.c (merge_functions): Remove unused variables `tmp' and
12307         `tempn'.
12308
12309         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
12310         (code_as_string): Likewise.
12311         (language_as_string): Likewise.
12312         (parm_as_string): Likewise.
12313         (op_as_string): Likewise.
12314         (assop_as_string): Likewise.
12315         (cv_as_string): Likewise.
12316
12317         * lex.c: Include output.h.
12318
12319         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
12320
12321         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
12322         ATTRIBUTE_UNUSED.
12323
12324         * tinfo.cc (__class_type_info::dcast): Change the type of variable
12325         `i' from int to size_t.
12326
12327         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
12328         ATTRIBUTE_UNUSED.
12329
12330 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
12331
12332         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
12333         DECL_NAMESPACE_SCOPE_P.
12334         (lang_decl_name): Likewise.
12335         * pt.c (tsubst_friend_function, tsubst): Likewise.
12336         * decl.c (pushdecl, redeclaration_error_message, start_decl,
12337         cp_finish_decl, start_function): Likewise.
12338         * class.c (finish_struct_1): Likewise.
12339         * call.c (build_over_call): Likewise.
12340         (compare_ics): Use DERIVED_FROM_P.
12341
12342 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
12343
12344         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
12345         * method.c (build_mangled_name): Use it.
12346         (build_decl_overload_real): Likewise.
12347
12348         * error.c (dump_simple_decl): New function, broken out from ...
12349         (dump_decl): Use it.
12350
12351 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
12352
12353         * ptree.c (lang_print_xnode): Add missing `break'.
12354
12355         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
12356
12357         * call.c (add_template_candidate): Adjust for changes to
12358         fn_type_unification.
12359         (add_template_candidate_real): Likewise.
12360         (add_template_conv_candidate): Likewise.
12361         (build_user_type_conversion_1): Likewise.
12362         (build_new_function_call): Likewise.
12363         (build_object_call): Likewise.
12364         (build_new_op): Likewise.
12365         (build_new_method_call): Likewise.
12366         * class.c (instantiate_type): Likewise.
12367         * cp-tree.h (unification_kind_t): New type.
12368         (fn_type_unification): Adjust prototype.
12369         (type_unificaiton): Likewise.
12370         * pt.c (UNIFY_ALLOW_NONE): New macro.
12371         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
12372         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
12373         (UNIFY_ALLOW_DERIVED): Likewise.
12374         (unify): Change prototype.
12375         (maybe_adjust_types_for_deduction): New function.
12376         (check_cv_quals_for_unify): Likewise.
12377         (determine_specialization): Adjust.
12378         (fn_type_unification): Likewise.
12379         (type_unification): Likewise.
12380         (type_unification_real): Likewise.  Use
12381         maybe_adjust_types_for_deduction.  Fix mishandling of
12382         back-unification of template functions passed as arguments.  Pass
12383         appropriate combination of UNIFY_ALLOW_* to unify.
12384         (unify): Remove unused NTPARMS parameter.  Use
12385         check_cv_quals_for_unify.  Remove bogus code that allowed
12386         too-generous unification in order to adhere more closely to standard.
12387         (get_bindings_real): Adjust.
12388         (get_class_bindings): Likewise.
12389
12390         * method.c (build_overload_identifier): Only use the innermost
12391         template arguments when mangling.
12392         * pt.c (tsubst_template_argument_vector): New function.
12393         (complete_template_args): Deal with the situation where the
12394         extra_args contain more than one level of arguments.
12395         (lookup_template_class): Deal with member template classes, which
12396         may have more than one level of arguments.
12397         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
12398         Improve handling of member template classes.  Use
12399         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
12400         tsubst_template_argument_vector where appropriate.
12401         (regenerate_decl_from_template): Break out from ...
12402         (instantiate_decl): Here.
12403
12404         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
12405         * parse.h: Regenerated.
12406         * parse.c: Really regenerated.
12407
12408         * cp-tree.h (finish_unary_op_expr): New function.
12409         (finish_id_expr): Likewise.
12410         (begin_new_placement): Likewise.
12411         (finish_new_placement): Likewise.
12412         (finish_declarator): Likewise.
12413         (finish_translation_unit): Likewise.
12414         (finish_parmlist): Likewise.
12415         (begin_class_definition): Likewise.
12416         (finish_class_definition): Likewise.
12417         (finish_default_args): Likewise.
12418         (finish_inline_definitions): Likewise.
12419         * parse.y (GCC_ASM_KEYWORD): Remove.
12420         (TYPENAME_ELLIPSIS): Likewise.
12421         * parse.c: Regenerated.
12422         Use new functions in semantics.c in the actions for many rules.
12423         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
12424         * hash.h: Regenerated.
12425         * semantics.c (finish_expr_stmt): Allow NULL expr.
12426         (finish_unary_op_expr): New function, containing
12427         code previously in parse.y.
12428         (finish_id_expr): Likewise.
12429         (begin_new_placement): Likewise.
12430         (finish_new_placement): Likewise.
12431         (finish_declarator): Likewise.
12432         (finish_translation_unit): Likewise.
12433         (finish_parmlist): Likewise.
12434         (begin_class_definition): Likewise.
12435         (finish_class_definition): Likewise.
12436         (finish_default_args): Likewise.
12437         (finish_inline_definitions): Likewise.
12438
12439 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
12440
12441         * typeck.c (build_c_cast): Don't decay arrays and functions to
12442         pointer type when converting to a class type.
12443
12444 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
12445
12446         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
12447         (DECL_CLASS_SCOPE_P): Likewise.
12448
12449 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
12450
12451         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
12452         * decl2.c (constructor_name_full): Likewise.
12453
12454 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
12455
12456         * tree.c (mapcar): Add OVERLOAD support.
12457
12458         * init.c (resolve_offset_ref): We must use basetype_path before we
12459         destroy it with a call to convert_pointer_to.
12460
12461 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
12462
12463         * class.c (currently_open_class): New fn.
12464         * decl.c (lookup_name_real): Use it.
12465         * search.c (lookup_field): Likewise.
12466
12467 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12468
12469         * cp-tree.def (OVERLOAD): New node.
12470         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
12471         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
12472         (NAMESPACE_BINDING): Remove.
12473         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
12474         namespace_binding.
12475         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
12476         Define.
12477         (tree_overload): New struct.
12478         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
12479         (REAL_IDENTIFIER_TYPE_VALUE): Define.
12480         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
12481         (lang_decl_flags): Remove in_namespace.
12482         (lang_decl): Remove chain.
12483         (DECL_CHAIN, DECL_NAMESPACE): Remove.
12484         (flag_honor_std): Declare extern.
12485         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
12486         namespace_binding, set_namespace_binding,
12487         lookup_function_nonclass, cat_namespace_levels,
12488         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
12489         scratch_ovl_cons, ovl_member, build_overload): Declare.
12490         (decl_list_length, get_namespace_id, current_namespace_id,
12491         overloaded_globals_p): Remove.
12492         (lookup_using_namespace, qualified_lookup_using_namespace): Change
12493         return type.
12494         (push_scratch_obstack): New macro.
12495         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
12496         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
12497         convs, fns.
12498         (build_new_function_call): Iterate using OVL_CHAIN.
12499         Print DECL_NAME in when reporting ambiguities.
12500         (build_object_call): Iterate using OVL_NEXT for fns, convs.
12501         (build_new_op): Call lookup_function_nonclass.
12502         Iterate using OVL_NEXT.
12503         (build_op_delete_call): Change detection of members.
12504         Do not wrap TREE_LIST around fields and single global functions.
12505         (build_over_call): Don't push a class level if the context is a
12506         namespace.
12507         (build_new_method_call): Iterate using OVL_NEXT.
12508         * class.c (add_method): Chain overloaded members using
12509         build_overload.  Remove copying of method.
12510         (grow_method): When iterating through the obstack, expect OVERLOAD
12511         nodes.  Chain overload members.
12512         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
12513         nodes in call to get_baselinks.
12514         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
12515         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
12516         fdecls that are OVERLOAD nodes.
12517         (validate_lhs): New function.
12518         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
12519         code.  Use DECL_NAME in error messages.  Split code between global
12520         and member function processing.
12521         * decl.c (global_type_node): New static variable.
12522         (in_std): New global.
12523         (struct binding_level): New field usings.
12524         (resume_binding_level): Assert that we are not in a class.
12525         (toplevel_bindings_p): Just check for namespace_p or
12526         pseudo_global.
12527         (resume_level): Remove.
12528         (find_binding): New function.
12529         (binding_for_name): Call it.
12530         (namespace_binding, set_namespace_binding): New functions.
12531         (push_namespace): Associate binding level with new namespace,
12532         resume_binding_level for existing namespace.  Remove old code.
12533         Fake std by counting.
12534         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
12535         (maybe_push_to_top_level): Save current namespace.
12536         (pop_from_top_level): Restore saved namespace.
12537         (pop_namespace): Call suspend_binding_level.  Remove old code.
12538         (cat_namespace_levels): New function.
12539         (set_identifier_type_value_with_scope): For namespace bindings,
12540         set BINDING_TYPE, and use global_type_node.
12541         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
12542         (identifier_type_value): New function.
12543         (pushtag): If no context, use current_namespace.
12544         (duplicate_decls): Don't process DECL_CHAIN.
12545         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
12546         already set.  Never reset it to NULL_TREE.  Lookup global variables
12547         in their namespace.  Push overloaded templates if they are on
12548         namespace level.
12549         (pushdecl_namespace_level): New function.
12550         (pushdecl_top_level): Implement using pushdecl_namespace_level.
12551         (pushdecl_using_decl): New function.
12552         (overloaded_globals_p): Remove.
12553         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
12554         them.  Use namespace_binding and set_namespace_value.
12555         (redeclaration_error_message): Complain if the declarations come
12556         from different namespaces.
12557         (lookup_tag): On namespace level, look in the BINDING_TYPE.
12558         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
12559         old code.
12560         (select_decl): New function.
12561         (lookup_name_real): Call it for qualified and unqualified lookup.
12562         Pass tree_bindings from the stack.
12563         If prefer_type is 1, also accept namespaces.
12564         (lookup_function_nonclass): New function.
12565         (init_decl_processing): Set the binding level of the global
12566         namespace to global_binding_level.
12567         Build a proper type list for __builtin_apply.
12568         Initialize std_node to "fake std" if flag_honor_std is set.
12569         Initialize global_type_node.
12570         Allocated bad_alloc in namespace std if flag_honor_std.
12571         (define_function): Set the DECL_CONTEXT to the current_namespace.
12572         (start_decl): A namespace is not considered as a context here.  If
12573         the DECL_CONTEXT is a namespace, push the decl.
12574         (cp_finish_decl): Check for namespaces used as initializers.
12575         (grokfndecl): Add namespace parameter.  Remove processing of
12576         DECL_CHAIN.
12577         (grokvardecl): Add namespace parameter.
12578         (grokdeclarator): Process SCOPEs that are namespaces.  For
12579         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
12580         (start_function): Check for contexts that are namespaces.
12581         Set context for declarations that have not been pushed.
12582         (store_parm_decls): Check for ::main only.
12583         (finish_function): Likewise.
12584         (start_method): Check for contexts that are namespaces.
12585         (start_method): Remove DECL_CHAIN processing.
12586         * decl2.c (flag_honor_std): Declare.
12587         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
12588         (decl_namespace_list): New static global.
12589         (grok_x_components): Ignore namespaces as type contexts.
12590         (check_classfn): Expect OVERLOAD nodes.
12591         (grokfield): Remove DECL_CHAIN processing.
12592         (finish_file): Call cat_namespace_levels.
12593         (merge_functions): New function.
12594         (ambiguous_decl): Rewrite.
12595         (lookup_using_namespace): Produce tree_bindings.
12596         (qualified_lookup_using_namespace): Likewise.
12597         (set_decl_namespace, decl_namespace, current_decl_namespace,
12598         push_decl_namespace, pop_decl_namespace): New functions.
12599         (arg_lookup): New struct.
12600         (add_function, arg_assoc_namespace, arg_assoc_class,
12601         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
12602         New functions.
12603         (get_namespace_id, current_namespace_id): Remove.
12604         (do_toplevel_using_decl): Rewrite.
12605         (do_class_using_decl): Complain about namespace qualifiers.
12606         (do_using_directive): Sorry if not on namespace level.  Complain
12607         about unknown namespaces.
12608         * error.c (dump_aggr_type): Check for namespace contexts.
12609         * except.c (init_exception_processing): Push terminate into std.
12610         * friend.c (is_friend): A namespace is not a context, here.
12611         * init.c (expand_member_init): Remove DECL_CHAIN processing.
12612         (build_offset_ref): Process OVERLOAD nodes.
12613         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
12614         * lex.c (identifier_type): Loop using OVL_CHAIN.
12615         (see_typename): Set looking_for_typename to 2.
12616         (real_yylex): Likewise.
12617         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
12618         (do_scoped_id): Expect OVERLOAD nodes.
12619         Change calling convention for qualified_lookup_using_namespace.
12620         (build_lang_decl): Don't set in_namespace anymore.
12621         * method.c (typevec_size): New global.
12622         (build_overload_nested_name): Return if global_namespace.
12623         Otherwise, always expect a declaration context.
12624         (build_qualified_name): Likewise.
12625         Make sure we don't write beyond typevec_size.
12626         (build_decl_overload_real): Likewise.
12627         Allocate one extra slot for the namespace.
12628         (hack_identifier): Mark code dead.
12629         Process OVERLOAD and NAMESPACE_DECL nodes.
12630         * parse.y (program): Pop namespaces until in global namespace.
12631         (extdef): In a using-declaration, don't discard the identifier if
12632         there is no declaration.
12633         (left_curly): Ignore type contexts which are namespaces.
12634         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
12635         used as scope.
12636         * pt.c (template_class_depth): Expect types to be namespaces.
12637         (determine_specialization): Simplify by expecting OVERLOAD nodes.
12638         (push_template_decl): Push into namespace level.
12639         Reset ctx if it is a namespace.
12640         Set DECL_CONTEXT to current_namespace if not set already.
12641         Ignore real contexts that are namespaces.
12642         (mangle_class_name_for_template): Skip global_namespace.
12643         Mangle other namespaces as declarations.
12644         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
12645         (lookup_template_class): Push into namespace of context.
12646         If the context is a namespace, set it to global_namespace.
12647         Use id_context for mangling.
12648         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
12649         (tsubst_friend_function): Ignore namespace contexts.
12650         Push into namespace level.
12651         (tsubst): Handle NAMESPACE_DECL nodes.
12652         Remove DECL_CHAIN processing.
12653         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
12654         * ptree.c (print_lang_identifier): Print bindings.
12655         (lang_print_xnode): Print OVERLOAD nodes.
12656         * rtti.c (init_rtti_processing): Push type_info into std.
12657         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
12658         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
12659         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
12660         lookup_fnfields_here): Likewise.
12661         Process all nodes, instead of going through TREE_CHAIN.
12662         * sig.c (build_signature_pointer_or_reference_type): Set context
12663         to global_namespace.
12664         (build_signature_table_constructor): Expect OVERLOAD nodes.
12665         * spew.c (yylex): Save old setting of looking_for_typename.
12666         * tree.c (decl_list_length): Remove.
12667         (binding_init): New function.
12668         (count_functions): Rewrite.
12669         (is_overloaded_fn): Expect OVERLOAD nodes.
12670         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
12671         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
12672         ovl_member): New functions.
12673         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
12674         (type_unknown_p): Likewise.
12675         (require_instantiated_type): Likewise.
12676         (build_component_ref): Declare code dead.
12677         (build_x_function_call): Create and expect OVERLOAD nodes.
12678         (build_function_call_real): Check for ::main only.
12679         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
12680         (convert_for_assignment): Check for TREE_LIST before accessing
12681         TREE_VALUE.
12682         * decl.c (duplicate_decls): Check for namespace bindings instead
12683         of global bindings.
12684         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
12685         lookup_name_current_level, start_decl, xref_tag,
12686         finish_enum): Likewise.
12687         * init.c (build_offset_ref): Likewise.
12688         * search.c (lookup_field): Likewise.
12689         (lookup_fnfields): Likewise.
12690         (dfs_debug_mark): Likewise.
12691         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
12692         (poplevel_class, pop_from_top_level): Likewise.
12693         * decl2.c (finish_method): Likewise.
12694         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
12695         * decl.c (record_builtin_type): Likewise.
12696         (init_decl_processing, grokfndecl): Likewise.
12697         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
12698         (make_lang_type): Likewise.
12699         * parse.y (make_thunk): Likewise.
12700         * pt.c (tsubst): Likewise.
12701         * tree.c (debug_binfo): Likewise.
12702         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
12703         tinfo2.cc, inc/new.h: Add std qualifications.
12704         * inc/new: Wrap with namespace std if __HONOR_STD.
12705         * inc/typeinfo: Likewise.
12706
12707 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
12708
12709         * call.c (build_user_type_conversion_1): Handle second_conv
12710         properly for templates.
12711
12712 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
12713
12714         * method.c (build_decl_overload_real): Set TREE_USED flag to
12715         zero for build_type_variants nodes as well.
12716
12717 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
12718
12719         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
12720
12721 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
12722
12723         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
12724         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
12725         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
12726         xref.o): Add toplev.h dependencies.
12727
12728 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
12729
12730         * errfn.c (cp_error, cp_warning): Remove declarations for
12731         error and warning respectively.
12732
12733 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12734
12735         * error.c: Convert to using ctype macros defined in system.h.
12736         * method.c: Likewise.
12737         * xref.c: Likewise.
12738         * lex.c: Likewise.  Also remove redundant system header stuff.
12739
12740 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
12741
12742         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
12743         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
12744         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
12745         xref.c: Add include of toplev.h.
12746
12747 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
12748
12749         * tree.c (perm_manip): Also regenerate the RTL of an extern.
12750         (copy_to_permanent): Use end_temporary_allocation.
12751
12752 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
12753
12754         * init.c (expand_vec_init): The initialization of each array
12755         element is a full-expression.
12756
12757 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
12758
12759         * method.c (build_mangled_name): Add a call to build_type_variant
12760         to get the right type.
12761
12762 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
12763
12764         * Makefile.in: Add .SUFFIXES.
12765
12766         * cp-tree.def: Remove NAMESPACE_DECL.
12767
12768 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
12769
12770         * call.c (build_over_call): Do evaluate arg even if it has empty
12771         class type.
12772         * decl.c (start_function): Don't push a member function.
12773
12774 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
12775
12776         * Makefile.in (g++FAQ.info): Put -o option before input file.
12777
12778 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
12779
12780         * gxxint.texi: Add info for squangling codes K and B.
12781
12782 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
12783
12784         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
12785         the expression in templates.
12786         (finish_stmt_expr): Likewise.
12787
12788 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
12789
12790         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
12791
12792 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
12793
12794         * decl.c (maybe_push_to_top_level): Always clear
12795         current_template_parms and processing_template_decl.
12796         (pushtag): Remove check of current_class_type and some comments,
12797         since maybe_push_to_top_level no longer creates confusion.
12798
12799 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
12800
12801         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
12802         (DECL_CLASS_TEMPLATE_P): Likewise.
12803         (DECL_PRIMARY_TEMPLATE): Likewise.
12804         (PRIMARY_TEMPLATE_P): Use it.
12805         (push_template_decl_real): New function.
12806         (redeclare_class_template): Take new template parameters as
12807         input.
12808         (is_specialization_of): New function.
12809         (comp_template_args): Declare.
12810         * decl.c (pushtag): Handle friend template classes.
12811         (xref_tag): Likewise.  Use new calling convention for
12812         redeclare_class_template.
12813         * decl2.c (grok_x_components): Handle friend templates.
12814         * friend.c (is_friend): Use is_specialization_of where
12815         appropriate.  Deal with friend class templates.
12816         (make_friend_class): Let a class template be friends with itself.
12817         * pt.c (comp_template_args): Remove declaration.
12818         (tsubst_friend_class): New function.
12819         (push_template_decl_real): New function.
12820         (push_template_decl): Use it.
12821         (redeclare_class_template): Adjust for new calling convention.
12822         (comp_template_args): Give it external linkage.
12823         (instantiate_class_type): Use tsubst_friend_class to deal
12824         with friend templates.
12825         * typeck.c (comptypes): Use comp_template_args, rather than
12826         expanding it inline.
12827         * parse.y (component_decl): Handle a nested template type
12828         like other component type declarations.
12829
12830         * pt.c (check_explicit_specialization): Handle overloaded
12831         constructors correctly.
12832
12833         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
12834         (lookup_template_class): Use it.
12835
12836 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
12837
12838         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
12839         * cp-tree.h: Add WRAPPER support.
12840         * call.c (add_candidate): Split out from add_*_candidate fns.
12841         (build_over_call): Take the candidate instead of function and args.
12842         Enforce access control here.  Emit overload warnings here.
12843         (add_warning): New fn.
12844         (joust): Add WARN parm.  If not set, call add_warning instead of
12845         printing a warning.  Re-enable some warnings.
12846         (tourney): Pass it.
12847         (convert_like): Adjust.
12848         (build_new_op): Adjust.
12849         (build_new_function_call): Adjust.
12850         (build_user_type_conversion_1): Adjust.
12851         (USER_CONV_FN): Adjust.
12852         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
12853         build_int_wrapper): New fns.
12854
12855 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
12856
12857         * pt.c (unify): Fix typo in previous change.
12858
12859 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
12860
12861         * error.c (dump_type_real): Declare canonical_name.
12862
12863         * typeck.c (comp_target_types): Fix PMFs.
12864
12865 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
12866
12867         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
12868         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
12869         TEMPLATE_DECL.
12870
12871         * pt.c (tsubst): Decrease the template-level of
12872         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
12873         TEMPLATE_PARM_INDEX.
12874         (template_decl_level): New function.
12875         (unify): Make sure to record unifications for template
12876         parameters, even when the parameters exactly match the arguments.
12877         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
12878         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
12879         aren't from the level we're currently working on.
12880
12881 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
12882
12883         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
12884
12885         * decl2.c (check_member_template): Set DECL_IGNORED for member
12886         class templates, too.
12887
12888         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
12889
12890 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12891
12892         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
12893
12894 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
12895
12896         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
12897         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
12898         (init_decl_processing): Handle TI types.
12899         * typeck.c (unsigned_type, signed_type): Handle TI types.
12900
12901 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
12902
12903         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
12904         New local added_libraries.  Increment count when add library to
12905         arglist.
12906
12907 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
12908
12909         * cp-tree.h (type_as_string_real): New function.
12910         * pt.c (mangle_class_name_for_template): Use it.
12911         * error.c (dump_aggr_type): Change prototype.
12912         (dump_type_prefix): Likewise.
12913         (dump_type_suffix): Likewise.
12914         (dump_type_real): Convert from dump_type.  If desired, the
12915         "canonica" name of a typedef, i.e., the name of the underlying
12916         type, can be printed.
12917         (dump_type): Call dump_type_real.
12918
12919 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
12920
12921         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
12922
12923         * typeck.c (comp_target_types): Tweak pedantic case.
12924         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
12925         Return -1 or 1 instead of 1 or 2.
12926         (compparms): Remove STRICT handling.
12927         (convert_for_assignment): Fix handling of pmfs.
12928
12929 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
12930
12931         * typeck.c (comp_target_types): Handle references like pointers.
12932         (comp_target_parms): Note that return code from comp_target_types
12933         can be negative to indicate failure.
12934
12935 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
12936
12937         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
12938         which requires a working target compiler to build.
12939
12940 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
12941
12942         * tree.c (avoid_overlap): Add prototype.
12943
12944         * spew.c (num_tokens): Add prototype.
12945         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
12946
12947         * search.c (dfs_check_overlap): Add prototype.
12948         (dfs_no_overlap_yet): Likewise.
12949
12950         * pt.c (original_template): Add prototype.
12951         (inline_needs_template_parms): Likewise.
12952         (push_inline_template_parms_recursive): Likewise.
12953         (retrieve_specialization, register_specialization): Likewise.
12954         (print_candidates, reduce_template_parm_level): Likewise.
12955         (build_template_decl, mark_template_parm): Likewise.
12956         (tsubst_friend_function, get_bindings_real): Likewise.
12957
12958         * method.c (start_squangling): Add prototype.
12959         (end_squangling, check_ktype, issue_ktype): Likewise.
12960         (build_overloaded_scope_ref, check_btype): Likewise.
12961         (build_mangled_template_parm_index): Likewise.
12962
12963         * lex.c (init_cpp_parse): Add prototype.
12964         (handle_cp_pragma, handle_sysv_pragma): Likewise.
12965         (reduce_cmp, token_cmp): Likewise.
12966
12967         * except.c (call_eh_info): Add prototype.
12968         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
12969         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
12970
12971         * decl2.c (is_namespace_ancestor): Add prototype.
12972         (namespace_ancestor, add_using_namespace): Likewise.
12973         (ambiguous_decl): Likewise.
12974
12975         * decl.c (indent): Add prototype.
12976
12977         * call.c (add_template_candidate_real): Add prototype.
12978
12979 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
12980
12981         * decl2.c (build_expr_from_tree): Just return a PMF.
12982
12983 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
12984
12985         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
12986         when doing initializations.
12987
12988         * pt.c (unify): Use comptypes to compare type args.
12989
12990 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
12991
12992         * decl.c (duplicate_decls): Fix check for when it's safe to free
12993         the new decl.
12994
12995         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
12996         to type_as_string.
12997
12998 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
12999
13000         * pt.c (build_template_parm_index): Add prototype.
13001
13002         * search.c (my_tree_cons): Don't clear words outside the
13003         newly allocated node.
13004
13005 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
13006
13007         * lex.c (init_parse): Now returns char* containing the filename.
13008
13009 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
13010                           Jeff Law   <law@cygnus.com>
13011
13012         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
13013         than a pointer.
13014
13015 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13016
13017         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
13018
13019 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13020
13021         * decl.c (duplicate_decls): Don't warn for redundant decls if
13022         friend: let add_friend take care of it.
13023
13024 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
13025
13026         * sig.c (build_signature_pointer_constructor): Don't set
13027         TREE_HAS_CONSTRUCTOR for a signature pointer.
13028         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
13029         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
13030         here, too.
13031         * typeck.c (build_unary_op): Only allow taking the address of a
13032         real constructor.
13033         * typeck2.c (digest_init): Simplify.
13034         (store_init_value): Don't pedwarn about using { } for pmfs.
13035
13036 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
13037
13038         * cp-tree.h (start_decl):  Update prototype.
13039         * decl.c (start_decl):  Like the C version, new parameters
13040         for the attributes.  Call cplus_decl_attributes here,
13041         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
13042         (grokdeclarator):  Pass NULL for new start_decl arguments.
13043         * pt.c (tsubst_expr):  Likewise.
13044         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
13045         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
13046         * lex.c (build_lang_decl): Add lang_name_java.
13047         * class.c (push_lang_context): Add lang_name_java.
13048         * method.c (build_mangled_name): Check for is_java_type.
13049
13050 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13051
13052         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
13053         * call.c (build_scoped_method_call): Check for TREE_CODE for
13054         VOID_TYPE instead of type ==  void_type_node.
13055         (build_method_call): Likewise.
13056         * decl.c (lookup_name_real): Likewise.
13057         (grokdeclarator): Likewise.
13058         (start_decl): Likewise.
13059         (grokparms): Likewise.
13060         (start_function): Likewise.
13061         (finish_function): Likewise.
13062         (start_method): Likewise.
13063
13064 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
13065
13066         * lex.c (finput): New variable.
13067         (init_cpp_parse):  Renamed from init_parse.
13068         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
13069         (finish_parse): New function.
13070         * cp-tree.h (init_lex, init_parse): Remove declarations.
13071
13072 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
13073
13074         * call.c (build_call): Still evaluate the actual argument.
13075         * class.c (is_empty_class): Update for -fnew-abi.
13076
13077         * decl2.c: -fnew-abi implies -fsquangle.
13078
13079         * method.c (do_build_assign_ref): Don't do anything to copy
13080         an empty class.
13081         (do_build_copy_constructor): Likewise.
13082         * call.c (build_over_call): Likewise.
13083
13084 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
13085
13086         * tree.c (avoid_overlap): Return a value.
13087
13088 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
13089
13090         * method.c (check_btype): Add missing argument to xrealloc.
13091         (check_ktype): Likewise.
13092
13093 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
13094
13095         Implement empty base optimization.
13096         * class.c (finish_struct_1): Add vbase fields earlier.  Set
13097         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
13098         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
13099         (types_overlap_p): New fn.
13100         * tree.c (avoid_overlap): New fn.
13101         (build_base_fields): Use it to avoid overlapping empty bases.
13102         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
13103
13104         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
13105
13106         Re-implement allocation of base class subobjects.
13107         * tree.c (unshare_base_binfos): New fn.
13108         (layout_basetypes): Use it.  Now handles offsets of both virtual and
13109         non-virtual bases, after layout_type.
13110         (layout_vbasetypes): Remove.
13111         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
13112         (build_vbase_pointer_fields): Split out from old layout_basetypes.
13113         * class.c (finish_base_struct): Lose offset handling code.
13114         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
13115         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
13116         * cp-tree.h: Adjust.
13117
13118 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
13119
13120         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
13121         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
13122         * class.c (duplicate_tag_error): Likewise.
13123         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
13124         * tree.c (layout_vbasetypes): Update from layout_record, remove
13125         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
13126         (layout_basetypes): Likewise.
13127
13128 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
13129
13130         * class.c, Make sure system.h is included just after config.h.
13131         Delete lingering stdio and errno references too.
13132         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
13133
13134 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
13135
13136         * friend.c (is_friend): Fix access control for local classes.
13137
13138         * class.c (is_empty_class): New fn.
13139         * call.c (build_call): Don't pass empty class objects to a function.
13140
13141 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
13142
13143         * call.c (build_over_call): Do name resolution for default
13144         arguments of function templates in the scope of the templates.
13145
13146 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
13147
13148         * call.c: Include system.h.  Remove includes, declarations and
13149         defines provided by system.h.
13150         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
13151         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
13152         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
13153         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
13154         * typeck2.c, xref.c: Likewise.
13155         * Makefile.in: Dependencies updated as appropriate.
13156         * Make-lang.in: Likewise.
13157
13158 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
13159
13160         * pt.c (fn_type_unification): Allow incomplete unification without
13161         an immediate error message.
13162
13163 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
13164
13165         * tree.c (member_p): New fn.
13166         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
13167         initializing class members.
13168
13169         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
13170         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
13171
13172         * call.c (build_method_call): Handle non-scoped destructors, too.
13173         * pt.c (tsubst_copy): Likewise.
13174
13175         * pt.c (print_template_context): Split out...
13176         (push_tinst_level): ...from here.
13177
13178         * friend.c (is_friend): Don't pass a type to decl_function_context.
13179
13180         * typeck.c (convert_for_initialization): Always hand off
13181         conversions to class type.
13182
13183 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
13184
13185         * friend.c (is_friend): Local classes have the same access as the
13186         enclosing function.
13187
13188 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
13189
13190         * typeck.c (expand_target_expr): Delete dead function.
13191
13192         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
13193
13194         * repo.c (save_string): Delete dead function.
13195
13196         * method.c (thunk_printable_name): Delete dead function.
13197
13198         * lex.c (yynextch): Delete dead function.
13199
13200         * expr.c (tree_extract_aggr_init): #if 0 out.
13201
13202         * except.c (do_unwind): Delete dead function.
13203         (easy_expand_asm): Likewise.
13204
13205         * cvt.c (build_conversion_type_1): Delete dead function.
13206
13207         * cp-tree.h (push_expression_obstack): Declare.
13208
13209         * call.c (source_type): #if 0 out.
13210
13211         * class.c (alter_access): Remove unused label.  Add braces
13212         around empty else clause.
13213
13214         * lex.c (yyprint): Fix argument to printf.
13215
13216 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
13217
13218         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
13219
13220         * pt.c (instantiate_class_template): Make sure template
13221         arguments are permanent.
13222         * init.c (resolve_offset_ref): Don't go looking around in
13223         template types.
13224
13225         * semantics.c: Add routines to handle expressions, and some
13226         declaration processing.
13227         * parse.y: Use them.
13228         (current_class_depth): Move declaration to cp-tree.h.
13229         * parse.c: Regenerated.
13230         * cp-tree.h: Use them.
13231         (current_class_depth): Declare.
13232         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
13233
13234 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
13235
13236         * error.c (dump_decl): Be a bit more explicit with template
13237         type arguments, when verbose.
13238
13239 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
13240
13241         * inc/exception: Reorder closing braces.
13242
13243 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
13244
13245         * pt.c (redeclare_class_template): New function.
13246         * cp_tree.h (redeclare_class_template): Declare it.
13247         * decl.c (xref_tag): Use it.
13248
13249 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
13250
13251         * call.c (build_over_call): Check IS_AGGR_TYPE, not
13252         TYPE_LANG_SPECIFIC.
13253         * typeck.c (convert_arguments): Likewise.
13254
13255         * decl.c (grokdeclarator): Remove const and volatile from type after
13256         setting constp and volatilep.
13257
13258         * class.c (finish_struct_1): Don't warn about bool bitfield larger
13259         than one bit.
13260
13261 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
13262
13263         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
13264
13265 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
13266
13267         * call.c (build_object_call): Complain about ambiguous operator(),
13268         rather that crashing.
13269         (build_new_op): Likewise.
13270         (build_op_delete_call): Likewise.
13271
13272 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
13273
13274         * cvt.c (perform_qualification_conversions): Use comp_target_types
13275         instead of comp_ptr_ttypes.
13276
13277 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
13278
13279         * cp-tree.h (enforce_access): Declare.
13280         * call.c (enforce_access): Make it extern, not static.
13281         * class.c (alter_access): Use enforce_access; modify code for ISO
13282         compliance, rather than ARM rules.
13283
13284 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13285
13286         * cp-tree.h: Fix typo.
13287
13288 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
13289
13290         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
13291         if (aggregate_value_p (type)).
13292
13293         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
13294
13295 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
13296
13297         * tree.c (mapcar): When dealing with a DECL, use it's constant
13298         value, if any.
13299         * pt.c (lookup_template_class): Don't mangle the names of template
13300         classes whose arguments are unknown.
13301
13302         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
13303
13304 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
13305
13306         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
13307
13308 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
13309
13310         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
13311         boolean_type_node to 1.
13312
13313 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
13314
13315         * error.c (dump_expr): Remove unused variable `l'.
13316
13317         * pt.c (for_each_template_parm): New function, created by
13318         converting uses_template_parms.
13319         (tree_fn_t): New typedef.
13320         (uses_template_parms): Use it.
13321         (mark_template_parm): New function.
13322         (push_template_decl): Check that the argument list of a partial
13323         specialization uses all the template parameters.
13324
13325         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
13326         with it; we might want it for debugging.
13327         * cp-tree.h (type_unification): Change interface.
13328         * class.c (finish_struct_1): Skip nested template types, just like
13329         ordinary nested types.
13330         (instantiate_type): Use new interface to type_unification.
13331         * lex.c (init_lex): Add __sz as opname for sizeof.
13332         * method.c (build_overload_scope_ref): New function.
13333         (build_overload_int): Handle complex expressions.  Set
13334         numeric_output_need_bar if necessary.
13335         (build_overload_value): Handle non-PARM_DECL nodes; this
13336         routine is now used by build_overload_int.  Remove some
13337         assignments to numeric_output_need_bar.  Use
13338         build_overload_scope_ref.
13339         (build_qualified_name): Note that some template mangled names end
13340         with digits, and set numeric_output_need_bar appropriately.  Use
13341         build_underscore_int.
13342         * pt.c (unify): Change interface.
13343         (type_unification_real): Likewise.
13344         (determine_specialization): Use new interfaces.
13345         (tsubst): Deal gracefully with situations in which the argument
13346         vector is not fully filled.
13347         (fn_type_unification): Use new interfaces.
13348         (type_unification): Likewise.  Remove NOP_EXPR hack.
13349         (type_unification_real): Likewise.
13350         (unify): Likewise.  Deal with unification of complex expressions.
13351
13352 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
13353
13354         * pt.c (complete_template_args): Initialize skip properly.
13355
13356         * decl.c (make_typename_type): Revert.
13357         (make_implicit_typename): Remove.
13358         (lookup_name_real): Don't call it.  Call lookup_field if we see a
13359         TYPE_DECL from a template base.
13360         * search.c (lookup_field): Do implicit typename stuff.
13361
13362 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
13363                           Geoff Noer    <noer@cygnus.com>
13364
13365         * Makefile.in: Various fixes for building cygwin32 native toolchains.
13366         * Make-lang.in: Likewise.
13367
13368 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13369
13370         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
13371
13372 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
13373
13374         * decl.c (make_implicit_typename): Rewrite removed code.
13375         (make_typename_type): Call it if the type we look up comes from
13376         a base that uses template parms.
13377
13378         * pt.c (complete_template_args): Rewrite.
13379         (tsubst, FUNCTION_DECL): Use it.
13380
13381 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
13382
13383         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
13384         c_expand_asm_operands () if output_operands, input_operands or
13385         clobbers is not NULL_TREE.
13386
13387 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13388
13389         * pt.c (complete_template_args): New function.
13390         (get_bindings): Deal with specializations of function templates
13391         with return type containing parameters from outer class
13392         templates.
13393         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
13394         substitute arguments and compose a new type.
13395
13396 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
13397
13398         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
13399         FUNCTION_DECLs.
13400
13401 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
13402
13403         * decl.c (make_implicit_typename): Lose useless code.
13404
13405         * call.c (standard_conversion): Handle A* -> const A* properly.
13406
13407         * pt.c (get_bindings_real): Rename from get_bindings.  Add
13408         check_rettype parm.
13409         (get_bindings): Pass 1.
13410         (get_bindings_overload): Pass 0.
13411
13412 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
13413
13414         * pt.c (check_explicit_specialization): When reverting a static
13415         member function, also remove the `this' parameter from
13416         last_function_parms.
13417
13418 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
13419
13420         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
13421         a function context.
13422
13423         * decl.c (store_bindings): Use free_binding_vecs.
13424         (pop_from_top_level): Likewise.
13425
13426 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
13427
13428         * decl.c (make_implicit_typename): Only change the type of a
13429         TYPENAME_TYPE.
13430
13431 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
13432
13433         * semantics.c: New file, containing routines to perform the
13434         semantic phase of parsing.
13435         * parse.y: Use it.
13436         * pt.c (tsubst_expr): Likewise.
13437         * cp-tree.h: Declare the various functions in semantics.c.
13438         Provide macros to access _STMT tree nodes.
13439         * cp-tree.def: Add ASM_STMT tree node.
13440         * Makefile.in, Make-lang.in: Add dependencies on and for
13441         semantics.c.
13442
13443 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
13444
13445         * pt.c (push_template_decl): Only check primary templates.
13446
13447         * pt.c (check_explicit_specialization): Complain about default args
13448         in explicit specialization.
13449
13450         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
13451         constructor_declarator.
13452
13453 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
13454
13455         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
13456         has no overloaded operator ->.
13457
13458         * call.c (build_field_call): Don't crash when presented with a
13459         field that is actually a nested type.
13460
13461         * decl.c (pushtag): Deal with friend class injection in local
13462         classes.
13463
13464         * call.c (build_object_call): Don't crash if OBJ is a
13465         pointer-to-member-function.
13466
13467 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
13468
13469         * pt.c (push_template_decl): Complain about template with C linkage,
13470         anonymous template class.
13471
13472 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
13473
13474         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
13475         * search.c: Likewise.
13476
13477         * lex.c (do_pending_defargs): Only call
13478         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
13479
13480         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
13481
13482 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
13483
13484         * parse.y: Deal with CONSTRUCTORS in new_initializers.
13485
13486 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
13487
13488         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
13489         closely mimics the behavior in parse.y.
13490         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
13491         into a compound statement.
13492
13493 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
13494
13495         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
13496         * pt.c (inline_needs_template_parms): New fn.
13497         (original_template): New fn.
13498         (push_inline_template_parms_recursive): New fn.
13499         (maybe_begin_member_template_processing): Use them.
13500         (maybe_end_member_template_processing): Likewise.
13501         (is_member_or_friend_template): Rename to is_member_template.
13502         Member functions of local classes are never member templates.
13503
13504 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13505
13506         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
13507         added in the class scope to catch redefinition error.
13508
13509         * pt.c (reduce_template_parm_level): Also copy
13510         the DECL_TEMPLATE_PARMS field.
13511
13512 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
13513
13514         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
13515         reduced-level template type parameter.
13516
13517 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
13518
13519         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
13520         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
13521         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
13522         * decl.c (duplicate_decls): Propagate it.
13523         * typeck2.c (abstract_virtuals_error): Use two loops to emit
13524         abstract virtual functions and virtual functions which need a
13525         final overrider separately.
13526
13527 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
13528
13529         * lang-specs.h: Properly put brackets around array elements in
13530         initializer.
13531
13532         * typeck.c (build_binary_op_nodefault): Correctly place parens around
13533         && and || in expression.
13534
13535 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
13536
13537         * call.c (default_parm_conversions): Remove prototype definition.
13538         (build_method_call): Remove unused variable result.
13539
13540         * cvt.c (ocp_convert): Remove unused variable conversion.
13541
13542         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
13543
13544         * except.c (do_unwind): #if 0 definition of unused variables fcall
13545         and next_pc.
13546
13547         * expr.c (extract_scalar_init): #if 0 prototype and function
13548         definition.
13549
13550         * init.c (expand_aggr_init_1): Remove unused variable init_type.
13551         (build_new_1): Remove unused variable t.
13552
13553         * pt.c (instantiate_class_template): Remove unused variable newtag;
13554         cast called function return value to void.
13555         (do_decl_instantiation): Remove unused variables name and fn.
13556
13557         * tree.c (get_type_decl): Add default return to shut up compiler from
13558         complaining control reaches end of non-void function.
13559
13560         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
13561
13562 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
13563
13564         * call.c (default_parm_conversions): Remove prototype definition.
13565         (build_method_call): Remove unused variable result.
13566         (build_over_call): Add default case in enumeration switch.
13567
13568 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
13569
13570         * decl2.c (lang_decode_option): Change j's type to size_t.
13571
13572         * tree.c (layout_vbasetypes): record_align and desired_align are of
13573         type unsigned int; const_size and nonvirtual_const_size likewise.
13574
13575 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
13576
13577         * parse.y (new_initializer): Make sure all initializers are
13578         lists.
13579
13580 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
13581
13582         * decl2.c (import_export_decl): Mark tinfo functions for
13583         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
13584
13585 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
13586
13587         * method.c: Fix typo.
13588
13589 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13590
13591         * method.c: Include "system.h" to get stdlib.h, stdio.h,
13592         ctype.h, string.h, etc.
13593         (issue_nrepeats): Add default case in enumeration switch.
13594         (check_btype): Likewise.
13595         (process_overload_item): Likewise.
13596
13597         * Makefile.in (method.o): Depend on system.h.
13598
13599 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13600
13601         * lex.c (do_scoped_id): Fix parenthesizing.
13602
13603 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
13604
13605         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
13606         FLAG_RTTI is unset, initialize type info machinery and continue
13607         with FLAG_RTTI enabled.
13608         (get_typeid): Likewise.
13609
13610 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
13611
13612         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
13613         from B.
13614
13615 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
13616
13617         * pt.c (finish_member_template_decl): Deal more gracefully with
13618         invalid declarations.
13619
13620 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
13621
13622         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
13623         cp-tree.h: Clean up more old overloading code, old RTTI code, and
13624         some formatting quirks.
13625
13626         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
13627         method.c, pt.c, ptree.c, typeck.c: Remove support for
13628         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
13629         * class.h: Remove.
13630         * Makefile.in: Adjust.
13631
13632         * pt.c (unify): Don't allow reduced cv-quals when strict.
13633
13634         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
13635         *type_unification* and unify.
13636
13637 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
13638
13639         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
13640         (nested_name_specifier): And add it before this use.
13641         (typename_sub0): And this use.  Also add use without the keyword.
13642         (typename_sub1): Likewise.
13643         * pt.c (instantiate_class_template): Don't actually instantiate
13644         anything if our type uses template parms.
13645
13646 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
13647
13648         * decl.c (start_function): Don't call temporary_allocation for a
13649         nested function.
13650
13651 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
13652
13653         * pt.c (instantiate_class_template): Don't mess with friends if
13654         our type uses template parms.
13655
13656 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
13657
13658         * parse.y (nested_name_specifier): Use explicit_template_type.
13659         (typename_sub): Allow a template_type, an explicit_template_type,
13660         or an implicit template type at the end.
13661         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
13662         * decl.c (make_typename_type): Handle template-id where the name
13663         is a TEMPLATE_DECL.
13664         * call.c (build_scoped_method_call): Handle member template
13665         destructor call.
13666         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
13667         destructor is represented by the type.
13668
13669         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
13670         * parse.y (nested_name_specifier): Add 'template' case.
13671         (explicit_template_type): New rule.
13672         (typename_sub): Use it.
13673         * decl.c (make_typename_type): Handle getting a template-id for NAME.
13674         * pt.c (tsubst): Likewise.
13675
13676 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
13677
13678         * pt.c (add_to_template_args): Fix thinko.
13679         (instantiate_class_template): Call it later.
13680
13681         * pt.c (get_class_bindings): Add outer_args parm.
13682         (most_specialized_class): Likewise.
13683         (instantiate_class_template): Pass it.
13684         (more_specialized_class): Likewise.
13685         (lookup_template_class): Get context from template if none
13686         was specified.
13687         (finish_member_template_decl): Don't do anything with a
13688         partial specialization.
13689         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
13690         AGGREGATE_TYPE_P.
13691         * class.c (finish_struct): Member class templates have already been
13692         checked for name clashes.
13693         * decl.c (pushdecl_with_scope): Handle pushing at class level.
13694
13695 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
13696
13697         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
13698         (tsubst, *_PARM): Support multiple levels of template classes.
13699         (instantiate_class_template): Look up the pattern from the
13700         original template.
13701         (lookup_template_class): Handle getting a template for d1.
13702         (push_template_decl): Correct setting of 'primary'.
13703         (reduce_template_parm_level): Add 'levels' parm.
13704         (finish_member_template_decl): Support member class templates.
13705         (template_class_depth): Handle multiple levels.
13706         * parse.y (component_decl_1, fn.def2): Remove member template case.
13707         (component_decl): Add member template cases.
13708         * decl2.c (check_member_template): We now handle member template
13709         classes.
13710         * decl.c (pushtag): Handle member templates.
13711         * method.c (do_inline_function_hair): Don't touch
13712         IDENTIFIER_GLOBAL_VALUE.
13713         * init.c (build_offset_ref): If name isn't an identifier, just
13714         return it.
13715         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
13716
13717         * typeck.c (get_delta_difference): Do adjust for conversions to
13718         and from virtual base.
13719
13720 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
13721
13722         * typeck.c (get_delta_difference): Give hard error for conversion
13723         from virtual base.
13724
13725         * cp-tree.h: Tweak formatting.
13726
13727 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
13728
13729         * decl.c (push_namespace): Handle redeclaration error.
13730
13731         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
13732         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
13733         (NAMESPACE_BINDING): New macro.
13734         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
13735         * *.c: Use them.
13736
13737         * pt.c (push_template_decl): Use innermost_args.
13738
13739         * decl.c (get_unique_name): Tweak from earlier in the name.
13740
13741 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
13742
13743         * cp-tree.def: Add CPLUS_BINDING node.
13744         * cp-tree.h (tree_binding): New struct.
13745         (BINDING_SCOPE, BINDING_VALUE): New macros.
13746         (current_namespace, global_namespace): Declare extern.
13747         (struct lang_decl_flags): New field in_namespace.
13748         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
13749         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
13750         (TREE_INDIRECT_USING): New macro.
13751         * decl2.c (current_namespace, global_namespace): Declare.  The
13752         value is a NAMESPACE_DECL now, not a TREE_LIST.
13753         (is_namespace_ancestor, namespace_ancestor): New static functions.
13754         (add_using_namespace, ambiguous_decl): Likewise.
13755         (lookup_using_namespace): New support function for lookup_name.
13756         (qualified_lookup_using_namespace): New support function for
13757         do_scoped_id and lookup_namespace_name.
13758         (get_namespace_id): Mark as obsolete.
13759         (current_namespace_id): Likewise.
13760         (do_namespace_alias): Implement.
13761         (do_using_directive): Implement as call to add_using_namespace.
13762         * decl.c (binding_for_name): New function.
13763         (push_namespace, pop_namespace): Implement.
13764         (push_decl): Don't install a FUNCTION_DECL in the global branch.
13765         (lookup_namespace_name): Implement using qualified lookup.
13766         (lookup_name_real): For global scoping, lookup in
13767         global_namespace.  For namespace scoping, lookup in given
13768         namespace.  For unscoped lookup, iterate over namespace,
13769         considering using directives.
13770         (init_decl_processing): Initialize global_namespace.
13771         (grokvardecl): Build assembler name as static name for globals.
13772         (grokdeclarator): Remove old namespace mangling.
13773         (xref_tag): When installing a global binding for the
13774         tag, make sure we have an identifier.
13775         * method.c (build_overload_nested_name): Mangle namespaces.
13776         (build_qualified_name): Likewise.
13777         (build_decl_overload_real): Likewise.
13778         * lex.c (build_lang_decl): Set namespace for new declaration to
13779         current_namespace.
13780         (do_scoped_id): Find global names in global or current
13781         namespace, or using qualified namespace lookup, depending on
13782         context.
13783         * init.c (build_member_call): When scope is namespace, use
13784         build_x_function_call instead.
13785         (build_offset_ref): When scope is namespace, collapse processing
13786         to lookup_namespace_name instead.
13787         * error.c (dump_decl): Support NAMESPACE_DECL.
13788         * decl.c (pushdecl): Bind globals to current namespace.
13789         (push_overloaded_decl): Likewise.
13790         (lookup_tag): Likewise.
13791         (lookup_name_current_level): Likewise.
13792         (xref_tag): Likewise.
13793         (start_function): Likewise.
13794         * lex.c (do_identifier): Likewise.
13795         (identifier_typedecl_value): Likewise.
13796         (real_yylex): Likewise.
13797         * method.c (do_inline_function_hair): Likewise.
13798         * parse.y (unscoped): Likewise.
13799         * pt.c (check_explicit_specialization): Likewise.
13800         (lookup_template_class): Likewise.
13801         * rtti.c (call_void_fn): Likewise.
13802         * sig.c (build_sigtable): Likewise.
13803         * ptree.c (lang_print_xnode): New function.
13804
13805 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
13806
13807         * pt.c (instantiate_class_template): Don't instantiate if pedantic
13808         and the args use template parms.
13809
13810         * pt.c (push_tinst_level): If the instantiation uses template parms,
13811         fail silently.
13812         * decl.c (xref_basetypes): Do call complete_type for basetypes
13813         that involve template parameters.
13814
13815 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
13816
13817         * typeck2.c (process_init_constructor): Fix labeled init check.
13818
13819 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
13820
13821         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
13822         argument to tsubst and friends.
13823
13824         * pt.c (tsubst, FUNCTION_DECL): Tidy.
13825
13826         * typeck.c (build_x_function_call): Handle static member function
13827         templates like non-templates.  Handle friend templates like normal
13828         function templates.
13829         * pt.c (tsubst, *_PARM): Don't use orig_level.
13830         (get_bindings): Don't call add_to_template_args.
13831         (instantiate_template): Likewise.
13832         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
13833         * ptree.c (print_lang_type): Print index/level for template parms.
13834
13835 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
13836
13837         * Make-lang.in (cc1plus): Note that cc1plus depends on
13838         cp/cp-tree.h and cp/cp-tree.def.
13839
13840         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
13841         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
13842         position in a template parameter list.
13843         * cp-tree.h (template_parm_index): New structure, used as the tree
13844         structure for a TEMPLATE_PARM_INDEX.
13845         (TEMPLATE_PARM_IDX): New macro.
13846         (TEMPLATE_PARM_LEVEL): Likewise.
13847         (TEMPLATE_PARM_DESCENDANTS): Likewise.
13848         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
13849         (TEMPLATE_PARM_DECL): Likewise.
13850         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
13851         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
13852         (TEMPLATE_TYPE_DECL): Likewise.
13853         (TEMPLATE_CONST_IDX): Remove.
13854         (TEMPLATE_CONST_LEVEL): Likewise.
13855         (TEMPLATE_CONST_SET_INFO): Likewise.
13856         (TEMPLATE_TYPE_SET_INFO): Likewise.
13857         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
13858         node.
13859         (TEMPLATE_TYPE_LEVEL): Likewise.
13860         * decl.c (decls_match): Call comp_template_parms, rather than
13861         expanding it inline.
13862         (duplicate_decls): If two template declarations are being merged,
13863         then their TEMPLATE_INFOs should be merged as well.
13864         (grokfndecl): Save template-id information when declaring a friend
13865         with explicit template arguments.  Pass arguments to
13866         check_explicit_specialization via correct convention; at some
13867         point check_explicit_specialization changed, but these call-sites
13868         did not.
13869         (grokdeclarator): Tidy up slightly.
13870         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
13871         two template functions with the same DECL_ASSEMBLER_NAME the same,
13872         since the names are not yet mangled.
13873         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
13874         TEMPLATE_CONST_PARM.
13875         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
13876         decl for a non-type parameter, rather than printing `<tparm ...>'.
13877         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
13878         (do_friend): Deal with template friends.
13879         * lex.c (do_pending_inlines): Call
13880         maybe_begin_member_template_processing, rather than
13881         conditionally calling begin_member_template_processing.
13882         (process_next_inline): Likewise.  Call
13883         maybe_end_member_template_processing, rather than
13884         conditionally calling end_member_template_processing.
13885         (do_pending_defargs): Likewise.
13886         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
13887         TEMPLATE_CONST_PARM.
13888         * method.c (build_mangled_template_parm_index): New function.
13889         (build_overload_value): Use it.
13890         (build_overload_name): Likewise.
13891         * pt.c (finish_member_template_decl): Allow friend declarations.
13892         (template_class_depth): New function.
13893         (is_member_template): Rename, and modify, to become...
13894         (is_member_or_friend_template): New function.
13895         (end_member_template_processing): Rename, and modify, to become...
13896         (maybe_end_member_template_processing).
13897         (build_template_parm_index): New function.
13898         (reduce_template_parm_level): New function.
13899         (process_template_parm): Modify to use build_template_parm_index.
13900         (push_template_decl): Deal with friend templates.
13901         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
13902         TEMPLATE_CONST_PARM.
13903         (tsubst_friend_function): New function.
13904         (instantiate_class_template): Generate the DECL_FRIENDLIST
13905         for a new instantiation by using tsubst_friend_function rather
13906         than just tsubst.
13907         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
13908         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
13909         appropriate new macros.  Use reduce_template_parm_level to
13910         generate lower-level template parameters.  Handle tsubst'ing into
13911         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
13912         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
13913         templates.  Similarly for the template parameters for a new
13914         template.
13915         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
13916         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
13917         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
13918         (get_bindings): Call add_to_template_args if necessary.
13919         (instantiate_decl): Handle instantiations of friend templates.
13920         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
13921         TEMPLATE_TYPE_PARM as a list of fields; it's not!
13922         * spew.c (yylex): Do a little manual constant propagation to
13923         clarify the code.
13924
13925 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
13926
13927         * error.c: Include sys/types.h.
13928
13929 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
13930
13931         * method.c (build_mangled_name): Start CPP directives in column zero.
13932
13933 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
13934
13935         * typeck2.c (process_init_constructor): Sorry about non-trivial
13936         labeled initializers.
13937         * parse.y (initlist): Re-enable labeled initializers.
13938
13939 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13940
13941         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
13942         all callers changed.  Rely on the new parameter instead of arg
13943         being a TREE_LIST when determine whether we are working inside
13944         template template parameter.  Clean up is_type test.
13945
13946 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
13947
13948         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
13949         * typeck2.c (initializer_constant_valid_p): Allow conversions
13950         between pointers and references.
13951
13952 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
13953
13954         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
13955         if pedantic || warn_pointer_arith.
13956
13957 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13958
13959         * pt.c (unify): Handle TEMPLATE_DECL.
13960
13961 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
13962
13963         * cp-tree.h (strip_attrs): Remove decl.
13964
13965 1998-02-18  Doug Evans  <devans@cygnus.com>
13966
13967         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
13968         Update olddecl's attributes too.
13969         (strip_attrs): Remove function.
13970         * typeck.c (common_type): Call merge_machine_type_attributes.
13971
13972 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
13973
13974         * parse.y (initdcl0_innards): New grammar symbol.
13975         (nomods_initdecls, nomods_initdcl0): Change type from itype to
13976         none, since the resulting value is never used.
13977         (parse_decl): New function.
13978         (datadef): Remove redundant actions.
13979         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
13980         * parse.c: Regenerated.
13981
13982 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
13983
13984         * parse.y (simple_stmt): Use getdecls() to check for decl.
13985
13986 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
13987
13988         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
13989         macros.
13990         (c++.install-common): Install c++filt properly as native or as cross
13991         variant.
13992         (c++.uninstall): Add c++filt.
13993
13994 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
13995
13996         * call.c (standard_conversion): Fix multi-level ptr conversions.
13997
13998 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
13999
14000         * init.c (build_new): Propagate error_mark_node up.
14001
14002 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
14003
14004         * parse.y (simple_stmt): If the condition isn't a declaration,
14005         start the controlled block after the test.
14006
14007 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14008
14009         * call.c (build_over_call): Convert builtin abs, labs and fabs to
14010         tree-codes.
14011         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
14012         builtins.
14013
14014 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
14015
14016         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
14017
14018 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
14019
14020         * cp-tree.h: Add access_protected_virtual_node.
14021         * class.c (init_class_processing): Initialize it.
14022         * decl.c (xref_basetypes): Use it.
14023         * parse.y (base_class_access_list): Likewise.
14024
14025         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
14026         (c++.install-common): Install c++filt.
14027
14028 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14029
14030         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
14031
14032 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
14033
14034         * call.c (reference_binding): Use comptypes when comparing
14035         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
14036
14037 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
14038
14039         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
14040         (really_overloaded_fn): Move check here from is_overloaded_fn.
14041         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
14042
14043 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
14044
14045         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
14046         conversions.
14047
14048 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
14049
14050         * cp-tree.h (push_template_decl): Return the decl passed in, or an
14051         equivalent duplicate.
14052         * decl.c (pushtag): Use the return value from push_template_decl.
14053         (duplicate_decls): When duplicating a template declaration, merge
14054         the DECL_TEMPLATE_RESULTs as well.
14055         (make_implicit_typename): Don't try to dive into typename types to
14056         find a context for making a new implicit typename.
14057         (start_decl): Use the return value from push_template_decl.
14058         (grokdeclarator): Complain about declarations list `const operator
14059         int'.  Since we don't correctly handle in-class initializations of
14060         non-static data members, complain about this (now illegal)
14061         practice.  Issue an error for initializations of non-const statics
14062         since that is illegal as well, and since we don't handle that case
14063         correctly either.
14064         (start_function): Use the return value from push_template_decl.
14065         (start_method): Likewise.
14066         * decl2.c (grokfield): Likewise.  Since the change to
14067         grokdeclarator ensures that all initialized fields are in fact
14068         static, remove a redundant test for TREE_PUBLIC.
14069         * parse.y (initlist): Disable labeled initializers since they do
14070         not work as per the documentation, and since they do not use the
14071         same syntax as the C front end.
14072         * pt.c (push_template_decl): Return the decl passed in, or an
14073         equivalent duplicate.
14074         (lookup_template_class): When searching in a nested context,
14075         use the right arguments.
14076         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
14077         * typeck.c (build_component_ref): Assign the correct type to the
14078         result of build_vfn_ref.
14079
14080 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
14081
14082         * pt.c (convert_nontype_argument): Fix typo.
14083         (check_explicit_specialization): Allow old-style specialization
14084         of class template members.
14085
14086 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
14087                           Manfred Hollstein  <manfred@s-direktnet.de>
14088
14089         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
14090         when deciding to override DECL_ASSEMBLER_NAME.
14091
14092 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
14093
14094         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
14095         * cp-tree.h (flag_do_squangling): Add declaration.
14096         * lang-options.h: Add -fsquangle and -fno-squangle.
14097         * method.c: Add macros and static variables for squangling.
14098         (build_overload_name): Rename to build_mangled_name, add logic for B
14099         compression, and split into process_modifiers and
14100         process_overload_item.
14101         (process_modifiers): New function, to handle constant, reference,
14102         and pointer types.
14103         (process_overload_item): New function, handles issue of type codes.
14104         (build_overload_name): New function, start squangling and call
14105         build_mangled_name.
14106         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
14107         (start_squangling): New function to initialize squangling structs.
14108         (end_squangling): New function to destroy squangling structs.
14109         (nrepeats): Rename variable to Nrepeats.
14110         (issue_nrepeats): New function for issuing 'n' type repeats.
14111         (check_ktype): New function to check for type K name compression.
14112         (build_overload_nested_name): Add a check for K name compression.
14113         (build_qualified_name): Add a check for K name compression and don't
14114         use DECL_ASSEMBLER_NAME when squangling is on.
14115         (check_btype): New function, checks for B type compression.
14116         (build_static_name, build_decl_overload_real): Initiate squangling.
14117         (build_typename_overload, build_overload_with_type): Initiate
14118         squangling
14119
14120 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
14121
14122         * method.c (make_thunk): Avoid name buffer overflow.
14123
14124 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
14125
14126         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
14127         don't define them yet.
14128
14129         * parse.y (nomods_initdcl0): Add constructor_declarator case.
14130
14131 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14132
14133         * config-lang.in (diff_excludes): Use basename only.
14134
14135 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
14136
14137         * tinfo2.cc: Add tinfo for signed char.
14138
14139 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
14140
14141         * search.c (compute_access): Handle protected constructors in derived
14142         classes as accessible.
14143
14144 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
14145
14146         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
14147         Call convert_from_reference sooner.
14148
14149 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
14150
14151         * cvt.c (ocp_convert): Obtain the constant values from constant
14152         decls even if the destination type is the same as the type of the
14153         decl.
14154
14155         * decl2.c (finish_file): Make sure that static inlines with
14156         definitions are not marked DECL_EXTERNAL before returning.
14157
14158 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
14159
14160         * decl.c: Lose arg_looking_for_template.
14161         (lookup_name_real): Likewise.
14162         * parse.y: Lose processing_template_arg, template_arg1.
14163         (primary): Likewise.
14164         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
14165
14166 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14167
14168         * error.c (dump_decl): Fix type of default arguments for template
14169         template parameters and nontype template parameters.
14170         * parse.y (template_parm): Handle invalid default template
14171         template arguments here.
14172
14173         * parse.y (template_parm): Use template_arg instead of PTYPENAME
14174         for default template template argument.
14175         * pt.c (coerce_template_parms): Merge default template argument
14176         codes.  Can treat RECORD_TYPE as template name if it is implicitly
14177         created.  Fix argument index in error message.
14178         * typeck.c (comptypes): Merge template argument comparison codes in
14179         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
14180
14181 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
14182
14183         * lex.c (file_name_nondirectory): Also check for '/'.
14184
14185 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
14186
14187         * parse.y (primary): Deal with statement-expressions in
14188         templates.
14189         * pt.c (tsubst_copy): Handle BIND_EXPR.
14190         * tree.c (mapcar): Likewise.
14191
14192         * call.c (add_template_candidate_real): Pass extra parameter to
14193         fn_type_unification.
14194         * cp-tree.h (fn_type_unification): Add parameter.
14195         * pt.c (fn_type_unification): Add additional parameter to deal with
14196         static member functions.
14197         (get_bindings): Deal with static member functions.
14198
14199         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
14200         (revert_static_member_fn): Declare.
14201         * decl.c (revert_static_member_fn): Remove declaration.  Change
14202         linkage from internal to external.
14203         (cp_finish_decl): Deal with virtual functions in classes local to
14204         template functions.
14205         * decl2.c (finish_file): Don't forget to emit increment/decrement
14206         expressions in initializers for file-scope variables.
14207         * parse.y (typename_sub2): If the typename doesn't names a
14208         template, rather than a type, issue an error message.
14209         * pt.c (check_explicit_specialization): Handle specializations of
14210         static member functions.
14211         (coerce_template_parms): Handle offset references to lists of
14212         member functions.
14213         * search.c (note_debug_info_needed): Don't crash when handed a
14214         type which is being defined.
14215         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
14216         that can happen with some illegal code.
14217
14218 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14219
14220         * call.c (user_harshness): Initialize `code' to 0.
14221         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
14222         (null_ptr_cst_p): Add parentheses around && within ||.
14223         (standard_conversion): Likewise.
14224         (z_candidate): Likewise.
14225         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
14226         (build_object_call): Likewise for `mem_args'.
14227         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
14228         default case in enumeration switch.
14229
14230         * class.c (build_vtable_entry): Add explicit braces to avoid
14231         ambiguous `else'.
14232         (build_class_init_list): Likewise.
14233         (finish_struct_1): Initialize `width' to 0.
14234         (instantiate_type): Initialize `name' to NULL_TREE.  Add
14235         explicit braces to avoid ambiguous `else'.
14236
14237         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
14238         `else'.
14239
14240         * decl.c (grok_reference_init): Eliminate unused parameter, all
14241         callers changed.
14242         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
14243         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
14244         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
14245         (grokdeclarator): Add parentheses around && within ||.  Add
14246         explicit braces to avoid ambiguous `else'.
14247         (grokparms): Initialize `type' to NULL_TREE.
14248         (xref_tag): Remove unused label `just_return'.
14249         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
14250         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
14251         (hack_incomplete_structures): Add parentheses around assignment
14252         used as truth value.
14253
14254         * decl2.c (coerce_delete_type): Hide definition of `e3'.
14255
14256         * error.c: Include <stdlib.h>.
14257         (dump_expr): Change the type of `i' to size_t.  Remove unused
14258         label `error'.
14259
14260         * except.c (init_exception_processing): Remove unused variable `d'.
14261         (expand_throw): Likewise for `label'.
14262
14263         * friend.c (add_friends): Add explicit braces to avoid ambiguous
14264         `else'.
14265
14266         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
14267         (sort_base_init): Likewise for `binfo'.
14268         (expand_member_init): Likewise for `rval'.
14269         (build_member_call): Add parentheses around assignment used as
14270         truth value.
14271         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
14272         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
14273         `old_immediate_size_expand' to 0.
14274         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
14275         (build_vec_delete_1): Remove unused variable `block'.
14276         (expand_vec_init): Initialize `itype' to NULL_TREE.
14277
14278         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
14279         declaration of `index' and `rindex' with autoconf macros.
14280         (reinit_parse_for_expr): Remove unused variables
14281         `look_for_semicolon' and `look_for_lbrac'.
14282         (cons_up_default_function): Initialize `args' to NULL_TREE.
14283         (readescape): Initialize `firstdig' to 0.
14284         (real_yylex): Add parentheses around assignment used as truth value.
14285
14286         * method.c: Include <strings.h> if we don't have <string.h>.
14287         Protect declaration of `index' with autoconf macro.
14288
14289         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
14290         Initialize `type' to NULL_TREE.
14291         (structsp): Remove unused variable `id'.
14292
14293         * pt.c (coerce_template_parms): Add explicit braces to avoid
14294         ambiguous `else'.
14295         (lookup_template_class): Initialize `template' to NULL_TREE.
14296         (instantiate_class_template): Remove unused variable `name' and `e'.
14297         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
14298         (do_poplevel): Initialize `saved_warn_unused' to 0.
14299         (type_unification): Remove unused varable `parm'.
14300         (unify): Likewise for `j'.
14301
14302         * repo.c (init_repo): Add parentheses around assignment used as
14303         truth value.
14304         (finish_repo): Remove unused varable `p'.
14305
14306         * search.c (get_binfo): Initialize `type' to NULL_TREE.
14307         (get_base_distance): Likewise.
14308         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
14309         and `new_v' to NULL_TREE.
14310         (lookup_fnfields): Likewise for `rval_binfo_h'.
14311         (breadth_first_search): Add parentheses around assignment used as
14312         truth value.
14313         (get_template_base): Initialize `type' to NULL_TREE.
14314
14315         * sig.c (append_signature_fields): Initialize `last_mfptr' to
14316         NULL_TREE.
14317         (build_signature_table_constructor): Likewise for
14318         `last_rhs_field', `pfn' and `vt_off'.
14319         (build_sigtable): Likewise for `init'.
14320
14321         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
14322         (propagate_binfo_offsets): Likewise for `delta'.
14323         (hash_tree_cons): Initialize hashcode to 0.
14324         (can_free): Likewise for `size'.
14325         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
14326
14327         * typeck.c (convert_sequence): Hide prototype.
14328         (common_type): Add explicit braces to avoid ambiguous `else'.
14329         (comp_target_types): Likewise.
14330         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
14331         (build_function_call_real): Add explicit braces to avoid ambiguous
14332         `else'.
14333         (convert_arguments): Initialize `called_thing' to 0.
14334         (convert_for_initialization): Initialize `savew' and `savee' to 0.
14335
14336         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
14337         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
14338         (build_x_arrow): Likewise for `last_rval'.
14339
14340         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
14341
14342 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
14343
14344         * decl.c (init_decl_processing): Use set_sizetype.
14345         * decl2.c (sizetype): Don't declare.
14346         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
14347         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
14348         (build_component_addr, unary_complex_lvalue): Likewise.
14349         * rtti.c (expand_class_desc): Likewise.
14350         * class.c (get_vfield_offset): Likewise.
14351
14352 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
14353
14354         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
14355         early to avoid bogus error.  Handle overloaded function
14356         names provided as template arguments correctly.
14357         (coerce_template_parms): Don't mishandle overloaded functions when
14358         dealing with template template parameters.
14359         (lookup_template_class): Issue an error message, rather than
14360         crashing, when the TYPE_DECL provided is not a template type.
14361
14362 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
14363
14364         * class.c (instantiate_type): Don't just return a known type if
14365         it's wrong.
14366
14367 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
14368
14369         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
14370         since that code could never be reached.
14371
14372         * error.c (dump_decl): Avoid aborting in the midst of printing an
14373         error message about an illegal template declaration.
14374
14375         * parse.y (structsp): Print an error message, rather than crashing,
14376         when a class-head does not name a class.
14377
14378         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
14379         template arguments as a g++ extension.
14380
14381         * cp-tree.def (ALIGNOF_EXPR): New tree code.
14382         * decl2.c (grok_alignof): If processing_template_decl, just store
14383         the expression.
14384         * typeck.c (c_alignof): Likewise.
14385         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
14386         * error.c (dump_expr): Likewise.
14387         * pt.c (tsubst_copy): Likewise.
14388         * tree.c (cp_tree_equal): Likewise.
14389         * pt.c (uses_template_parms): Correctly determine whether or not a
14390         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
14391         folding can be done.
14392
14393         * cp-tree.h (grok_enum_decls): Remove type parameter.
14394         * decl.c (grok_enum_decls): Likewise.
14395         * decl2.c (grok_x_components): Call grok_enum_decls
14396         unconditionally, since it will do nothing if there is no
14397         current_local_enum.  Use the new calling sequence.
14398         * pt.c (tsubst_enum): Use the new calling sequence for
14399         grok_enum_decls.
14400
14401         * decl.c (start_function): Make member functions of local classes
14402         in extern inline functions have comdat linkage here...
14403         (grokdeclarator): Rather than here.
14404
14405 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
14406
14407         * pt.c (convert_nontype_argument): Use decl_constant_value.
14408
14409 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
14410
14411         * call.c (add_template_candidate_real): New function.
14412         (add_template_candidate): Use it.
14413         (add_template_conv_candidate): Likewise.
14414         (joust): Pass extra argument to more_specialized.
14415         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
14416         (is_local_class): Remove.
14417         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
14418         * cp-tree.h (is_local_class): Remove.
14419         (perform_array_to_pointer_conversion): Likewise.
14420         (finish_member_template_decl): Add.
14421         (check_explicit_specialization): Return a tree, not an int.
14422         (more_specialized): Take additional argument.
14423         (get_bindings): Likewise.
14424         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
14425         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
14426         (perform_array_to_pointer_conversion): Remove.
14427         * decl.c (saved_scope): Add processing_specialization,
14428         processing_explicit_instantiation fields.
14429         (maybe_push_to_top_level): Save them.
14430         (pop_from_top_level): Restore them.
14431         (grokfndecl): Use new return value from
14432         check_explicit_specialization.
14433         (start_decl): Don't check flag_guiding_decls before pushing
14434         decls.
14435         (cp_finish_decl): Remove previous (bogus) change.
14436         (grok_declarator): Use decl_function_context rather than
14437         is_local_class.
14438         * decl2.c (finish_file): Pass extra argument to get_bindings.
14439         (build_expr_from_tree): Let build_x_component_ref check
14440         validity of arguments rather than doing it here.
14441         * lex.c (cons_up_default_function): Remove code fooling with
14442         processing_specialization, processing_explicit_instantiation
14443         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
14444         * method.c (build_overload_identifier): Mangle local classes in
14445         template functions correctly.
14446         * parse.y (finish_member_template_decl): Move to pt.c.
14447         * pt.c (finish_member_template_decl): Moved here from parse.y.
14448         (print_candidates): New function.
14449         (determine_specialization): Change interface.  Properly look for
14450         most specialized versions of template candidates.
14451         (check_explicit_specialization): Fully process explicit
14452         instantiations.
14453         (push_template_decl): Avoid looking at CLASSTYPE fields in
14454         FUNCTION_DECLS.
14455         (determine_overloaded_function): Remove.
14456         (convert_nontype_argument): Change name from
14457         convert_nontype_parameter.  Use determine_overloaded_function
14458         instead of instantiate_type.
14459         (mangle_class_name_for_template): Handle type contexts as well as
14460         function contexts.
14461         (classtype_mangled_name): Likewise.
14462         (lookup_template_class): Likewise.
14463         (tsubst): Likewise.
14464         (more_specialized): Take explict template arguments as a
14465         parameter.
14466         (most_specialized): Likewise.
14467         (get_bindings): Likewise.  Check that return types match before
14468         proclaiming a function a match.
14469         (do_decl_instantiation): Remove code searching for function to
14470         instantiate; that is now done in check_explicit_specialization.
14471         (add_maybe_template): Pass extra argument to get_bindings.
14472         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
14473         implementation.
14474         * typeck.c (build_component_ref): Check for invalid arguments.
14475
14476 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
14477
14478         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
14479         return_target and call_target are equivalent.
14480
14481         * pt.c (type_unification_real): Just accept function parms that
14482         don't use any template parms.
14483
14484 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
14485
14486         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
14487         unset DECL_NOT_REALLY_EXTERN.
14488
14489         * parse.y (typename_sub*): Fix std::.
14490
14491 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
14492
14493         * error.c (dump_decl): Fix type default template args.
14494         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
14495
14496 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
14497
14498         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
14499         (file_name_nondirectory): Use.
14500
14501 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14502
14503         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
14504         that are not really present.  Substitute default arguments in
14505         template template arguments.  Correctly convert TEMPLATE_DECL to
14506         TEMPLATE_TEMPLATE_PARM.
14507         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
14508         are no longer treated specially here.
14509         * parse.y (template_template_parm): Fix copy error.
14510         * decl.c (grokdeclarator): Warn about missing `typename' for nested
14511         type created from template template parameters.
14512         * parse.y (bad_parm): Likewise
14513
14514         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
14515         (push_nested_class): Likewise.
14516         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
14517         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
14518         (copy_template_template_parm): Declare.
14519         * decl.c (arg_looking_for_template): New variable.
14520         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
14521         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
14522         node if arg_looking_for_template is nonzero.
14523         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
14524         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
14525         (grokdeclarator): Handle TEMPLATE_DECL.
14526         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
14527         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
14528         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
14529         (dump_decl): Handle unnamed template type parameters.
14530         Handle template template parameters.
14531         (dump_function_name): Handle template template parameters.
14532         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
14533         Handle TEMPLATE_TEMPLATE_PARM.
14534         * method.c (build_template_template_parm_names): New function.
14535         (build_template_parm_names): Handle TEMPLATE_DECL.
14536         (build_overload_nested_name, build_overload_name):
14537         Handle TEMPLATE_TEMPLATE_PARM.
14538         * parse.y (maybe_identifier): New nonterminal.
14539         (template_type_parm): Use it.
14540         (template_template_parm, template_arg1): New nonterminal.
14541         (template_parm): Add template_template_parm rules.
14542         (template_arg): Set processing_template_arg.
14543         (template_arg1): Rules moved from template_arg.
14544         (primary, nonnested_type): Set arg_looking_for_template if we are
14545         processing template arguments.
14546         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
14547         (process_template_parm): Handle template template parameters.
14548         (coerce_template_parms, comp_template_args): Likewise.
14549         (mangle_class_name_for_template, lookup_template_class): Likewise.
14550         (uses_template_parms): Handle TEMPLATE_DECL and
14551         TEMPLATE_TEMPLATE_PARM.
14552         (current_template_args): Handle TEMPLATE_DECL.
14553         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
14554         * search.c (dfs_walk, dfs_record_inheritance):
14555         Handle TEMPLATE_TEMPLATE_PARM.
14556         * tree.c (copy_template_template_parm): New function.
14557         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
14558         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
14559
14560 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
14561
14562         * decl.c (start_decl): Don't allow duplicate definitions of static
14563         data members.
14564
14565         * call.c (build_user_type_conversion_1): Handle user-defined
14566         template conversion operators correctly.
14567
14568         * decl2.c (build_expr_from_tree): Issue an error message if the
14569         object in a COMPONENT_REF is a TEMPLATE_DECL.
14570
14571         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
14572
14573         * class.c (is_local_class): New function.
14574         * cp-tree.h (is_local_class): Declare it.
14575         (last_tree): Likewise.
14576         (begin_tree): Likewise.
14577         (end_tree): Likewise.
14578         (lookup_template_class): Change prototype.
14579         * decl.c (cp_finish_decl): Check for NULL where necessary.
14580         Consider FUNCTION_DECLS to declare objects with top-level binding,
14581         when calling make_decl_rtl.
14582         (grokdeclarator): Give members of local classes internal linkage.
14583         (start_function): Remove declaration of last_tree.
14584         (finish_function): Set flag_keep_inline_functions around call to
14585         rest_of_compilation if we are processing a member function in a
14586         local class.
14587         (start_method): Call push_template_decl for member functions of
14588         local classes in template functions.
14589         * decl2.c (import_export_decl): Don't give external linkage to
14590         instantiations of templates with internal linkage.
14591         * parse.y (last_tree): Remove declaration.
14592         (template_type): Pass extra parameter to lookup_template_class.
14593         (self_template_type): Likewise.
14594         (structsp): Move call to reset_specialization into left_curly.
14595         (left_curly): Call reset_specialization, and begin_tree.
14596         * pt.c (saved_trees): New variable.
14597         (mangle_class_name_for_template): Change prototype.  Use
14598         additional function context to name local classes in templates
14599         correctly.
14600         (classtype_mangled_name): Pass the context.
14601         (push_template_decl): Handle local classes and templates, and
14602         member functions for such classes.
14603         (convert_nontype_parameter): Fix handling of pointer-to-member
14604         constants.
14605         (lookup_template_class): Handle local classes in templates.
14606         (tsubst): Likewise.  Don't assume that template instantiations
14607         have external linkage; pay attention to the template declaration.
14608         (mark_decl_instantiated): Likewise.
14609         (begin_tree): New function.
14610         (end_tree): Likewise.
14611
14612         * decl.c (xref_basetypes): Don't call complete_type for basetypes
14613         that involve template parameters; that can lead to infinite
14614         recursion unnecessarily.
14615
14616         * pt.c (register_specialization): Do not register specializations
14617         that aren't ready to be registered yet.
14618         (check_explicit_specialization): Handle explicit specialization of
14619         constructors and destructors.
14620         (build_template_decl): New function.
14621         (push_template_delc): Handle out-of-class specializations of
14622         member templates.
14623
14624         * pt.c (check_explicit_specialization): Set up the template
14625         information before registering the specialization.
14626         (coerce_template_parms): Fix thinko.
14627         (tsubst): Handle specializations of member templates correctly.
14628
14629         * class.c (finish_struct_methods): Remove calls to
14630         check_explicit_specialization from here.
14631         (finish_struct): And insert them here.
14632         * cp-tree.h (perform_qualification_conversions): New function.
14633         (perform_array_to_pointer_conversion): Likewise.
14634         (begin_explicit_instantiation): Likewise.
14635         (end_explicit_instantiation): Likewise.
14636         (determine_specialization): Renamed from
14637         determine_explicit_specialization.
14638         (comp_template_parms): New function.
14639         (processing_explicit_instantiation): New variable.
14640         * cvt.c (perform_qualification_conversions): New function.
14641         (perform_array_to_pointer_conversion): Likewise.
14642         * decl.c (duplicate_decls): Don't consider template functions
14643         alike unless they have the same parameters.  Refine handling of
14644         instantiation/specialization mismatches.
14645         (start_decl): Don't call pushdecl for template specializations,
14646         since they don't affect overloading.
14647         (start_function): Likewise.
14648         (grokfndecl): Call check_explicit_specialization a little later.
14649         Don't call duplicate_decls for memberm template specializations.
14650         (grokdeclarator): Don't update template_count for classes that are
14651         themselves specializations.  Remove use of `2' as parameter to
14652         grokfndecl since that value isn't used.
14653         * lex.c (cons_up_default_function): Save and restore
14654         processing_explicit_instantiation around calls to grokfield.
14655         * parse.y (finish_member_template_decl): New function.
14656         (component_decl_1): Use it.
14657         (fn.def2): Likewise.
14658         (template_arg_list_opt): New nonterminal.
14659         (template_type): Use it.
14660         (self_template_type): Likewise.
14661         (template_id): Likewise.
14662         (object_template_id): Likewise.
14663         (notype_template_declarator): Likwise.
14664         (begin_explicit_instantiation): Likewise.
14665         (end_explicit_instantiation): Likewise.
14666         (explicit_instantiation): Use them.
14667         * pt.c (coerce_template_parms): Add parameters.
14668         (processing_explicit_instantiation): New variable.
14669         (convert_nontype_parameter): New function.
14670         (determine_overloaded_function): Likewise.
14671         (begin_explicit_instantiation): Likewise.
14672         (end_explicit_instantiation): Likewise.
14673         (retrieve_specialization): Likewise.
14674         (register_specialization): Likewise.
14675         (processing_explicit_specialization): Removed.
14676         (determine_specialization): Handle specializations of member
14677         functions of template class instantiations.
14678         (check_explicit_specialization): Refine to conform to standard.
14679         (comp_template_parms): New function.
14680         (coerce_template_parms): Call convert_nontype_parameter.
14681         (tsubst): Refine handling of member templates.  Use
14682         register_specialization.
14683         (instantiate_template): Use retrieve_specialization.
14684         (do_decl_instantiation): Likewise.
14685         (instantiate_decl): Likewise.
14686         (type_unification): Improve handling of explict template
14687         arguments.
14688         * tree.c (mapcar): Return error_mark_node, rather than aborting,
14689         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
14690         * typeck.c (build_unary_op): Call determine_specialization, rather
14691         than determine_explicit_specialization.
14692
14693 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
14694
14695         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
14696
14697 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14698
14699         * error.c (dump_decl): For enum tags, output the tag, not its value.
14700
14701 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
14702
14703         * decl.c (init_decl_processing): Only call init_rtti_processing
14704         FLAG_RTTI is set.
14705
14706 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
14707
14708         * init.c (build_new_1): Split out from build_new.
14709         (build_new): Just return a NEW_EXPR.
14710         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
14711
14712         * decl2.c (get_temp_regvar): Tweak.
14713
14714         * cp-tree.h (TREE_CALLS_NEW): Comment out.
14715         * class.c (resolves_to_fixed_type_p): Remove use.
14716         * method.c (build_opfncall): Likewise.
14717         * call.c (build_new_op): Likewise.
14718
14719 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
14720
14721         * exception.cc (__eh_alloc, __eh_free): New fns.
14722         (__cp_push_exception, __cp_pop_exception): Use them.
14723         (__uncatch_exception): Call terminate here if no exception.
14724         * except.c (build_terminate_handler): New fn.
14725         (expand_start_catch_block): Use it.
14726         (expand_exception_blocks): Likewise.
14727         (alloc_eh_object): New fn.
14728         (expand_throw): Use it.  Protect exception init with terminate.
14729         * typeck.c (build_modify_expr): Remove code that ignores trivial
14730         methods.
14731
14732 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14733
14734         * call.c (add_builtin_candidate): Add default case in enumeration
14735         switch.
14736         (build_new_op): Likewise.
14737         (convert_like): Likewise.
14738         * cvt.c (build_expr_type_conversion): Likewise.
14739         * tree.c (real_lvalue_p): Likewise.
14740         (lvalue_p): Likewise.
14741         (cp_tree_equal): Likewise.
14742         * typeck.c (comptypes): Likewise.
14743         (build_component_ref): Likewise.
14744         (build_function_call_real): Likewise.
14745         (build_binary_op_nodefault): Likewise.
14746         (build_unary_op): Likewise.
14747         (build_modify_expr): Likewise.
14748         * typeck2.c (initializer_constant_valid_p): Likewise.
14749
14750 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
14751
14752         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
14753
14754 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
14755
14756         * pt.c (coerce_template_parms): Make sure to digest_init if
14757         possible.
14758
14759         * decl.c (duplicate_decls): Make the newdecl virtual if the
14760         olddecl was, just as is done with other attributes of olddecl.
14761
14762 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
14763
14764         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
14765         address of an OFFSET_REF.
14766
14767         * cp-tree.def: Add AGGR_INIT_EXPR.
14768         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
14769         AGGR_INIT_EXPR where appropriate.
14770         * expr.c (cplus_expand_expr): Likewise.  Simplify.
14771
14772         * decl2.c (finish_file): Remove call to register_exception_table.
14773
14774 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14775
14776         * pt.c (instantiate_class_template): Don't do injection when
14777         processing_template_decl is true, as pollutes current_binding_level
14778         for base classes.
14779
14780 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
14781
14782         * pt.c (maybe_fold_nontype_arg): Add prototype.
14783
14784 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
14785
14786         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
14787         * error.c (dump_expr): Likewise.
14788
14789 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
14790
14791         * typeck.c (build_function_call_real): Remove "inline called before
14792         definition" pedwarn.
14793
14794         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
14795
14796 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
14797
14798         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
14799
14800         * pt.c (type_unification_real): Change __null to type void* with
14801         a warning.
14802
14803 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
14804
14805         * call.c (implicit_conversion): Don't call
14806         build_user_type_conversion_1 with a NULL expr, since it will
14807         crash.
14808
14809         * pt.c (unify): Don't try to unify array bounds if either array is
14810         unbounded.
14811
14812 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14813
14814         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
14815         Replace extern decls with casts.
14816
14817         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
14818         Update last_parm_cleanup_insn.
14819         (store_after_parms): Remove.
14820         * cp-tree.h: Adjust.
14821
14822 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
14823
14824         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
14825         (finish_file): Check DECL_COMDAT instead of weak|one_only.
14826         (import_export_vtable): Use make_decl_one_only instead of
14827         comdat_linkage for win32 tweak.
14828         (import_export_decl): Likewise.
14829         * pt.c (mark_decl_instantiated): Likewise.
14830
14831         * decl2.c (finish_file): Lose handling of templates in pending_statics.
14832
14833 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
14834
14835         * decl2.c (finish_file): Lose call to expand_builtin_throw.
14836         * except.c (expand_builtin_throw): Remove.
14837         * cp-tree.h: Remove ptr_ptr_type_node.
14838         * decl.c: Likewise.
14839
14840 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
14841
14842         * decl.c (ptr_ptr_type_node): Define.
14843         (init_decl_processing): Initialize it.
14844         * cp-tree.h: Declare it.
14845         * exception.cc (__cp_exception_info): Use __get_eh_info.
14846         (__cp_push_exception): Likewise.
14847         (__cp_pop_exception): Likewise.
14848
14849         From Scott Snyder <snyder@d0sgif.fnal.gov>:
14850         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
14851         saved_pc.
14852         (init_exception_processing): Removed saved_pc initialization.
14853
14854 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
14855
14856         * pt.c (instantiate_decl): Defer all templates but inline functions.
14857
14858 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
14859
14860         * init.c (expand_vec_init): Don't fold a list of parameters.
14861
14862         * decl.c (copy_args_p): Handle copy elision for types with virtual
14863         bases.
14864         * call.c (build_over_call): Likewise.
14865
14866 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
14867
14868         * pt.c (lookup_template_function): Copy the template arguments,
14869         not just the list containing them, to the permanent obstack.
14870
14871 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14872
14873         * except.c (expand_start_catch_block): suspend_momentary for the
14874         terminate handler.
14875
14876         * error.c (dump_decl): Handle LOOKUP_EXPR.
14877
14878 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
14879
14880         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
14881         permanent obstack if we are processing a template decl.
14882         * typeck.c (build_static_cast): Likewise.
14883         (build_const_cast): Likewise.
14884         (build_reinterpret_cast): Likewise.
14885
14886         * pt.c (coerce_template_parms): Coerce some expressions, even
14887         when processing_template_decl.
14888
14889 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14890
14891         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
14892         handling of pointer difference expressions.
14893
14894         * typeck.c (comp_target_types): Comparison of function/method types
14895         is independent of nptrs.
14896
14897 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
14898
14899         * pt.c (tsubst): Avoid creating pointer to reference and
14900         reference to reference types.
14901
14902 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
14903
14904         * parse.y (do_id): New nonterminal.
14905         (template_id): Use it.
14906
14907 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
14908
14909         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
14910         * spew.c (yylex): Don't do_identifier here.
14911         * decl2.c (build_expr_from_tree): Revert last change.
14912
14913         * decl2.c (build_expr_from_tree): Expand the name for a method call.
14914         * parse.y (object_template_id): Don't try to take the DECL_NAME.
14915
14916 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
14917
14918         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
14919         alloc_expr.
14920         * call.c (build_op_delete_call): Adjust.
14921
14922         * except.c (expand_end_catch_block): Lose rethrow region.
14923         (expand_start_catch_block): Likewise.
14924         (expand_end_catch_block): Don't expand_leftover_cleanups.
14925
14926 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14927
14928         * pt.c (tsubst): Remove tree_cons call (places redundant info into
14929         DECL_TEMPLATE_INSTANTIATION).
14930
14931 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
14932
14933         * tree.c (is_overloaded_fn): Handle getting a fn template.
14934         (really_overloaded_fn): Likewise.
14935         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
14936         * pt.c (check_explicit_specialization): Tweak.
14937         (determine_explicit_specialization): Tweak.
14938
14939         * tree.c, cp-tree.h (get_target_expr): New fn.
14940
14941 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
14942
14943         * pt.c (check_explicit_specialization): Fix misspelling in
14944         diagnostic: `preceeded'.
14945         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
14946         `conversiona'.
14947
14948 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
14949
14950         * pt.c (determine_explicit_specialization): Avoid an internal
14951         error for bad specializations.
14952
14953         * method.c (build_overload_value): Handle SCOPE_REF.
14954
14955 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
14956
14957         * class.c (prepare_fresh_vtable): Enable even more complex MI
14958         vtable names.
14959
14960 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
14961
14962         * exception.cc (__check_eh_spec): Optimize a bit.
14963
14964         * exception.cc (__cp_pop_exception): Lose handler arg.
14965         * except.c (do_pop_exception): Likewise.
14966         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
14967         (expand_end_catch_block): Likewise.
14968
14969 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14970
14971         * pt.c (check_explicit_specialization): Complain about using a
14972         template-id for a non-specialization.
14973
14974 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
14975
14976         * repo.c: Prototype rindex only if needed.
14977         * xref.c: Likewise.
14978
14979 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14980
14981         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
14982
14983 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
14984
14985         * typeck.c (build_const_cast): Handle references here instead of
14986         handing off to convert_to_reference.
14987
14988         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
14989         TerminateFunctionCall.
14990         (init_exception_processing): Likewise.  Terminate et al are now
14991         the fns, not ADDR_EXPRs.
14992         (various): Lose redundant assemble_external calls.
14993         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
14994
14995         * cp-tree.h (struct lang_decl_flags): Add comdat.
14996         (DECL_COMDAT): New macro.
14997         * decl.c (duplicate_decls): Propagate it.
14998         (cp_finish_decl): Handle it.
14999         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
15000
15001         * class.c: Remove static pending_hard_virtuals.
15002         (add_virtual_function): Take pointers to pending_virtuals
15003         and pending_hard_virtuals.
15004         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
15005
15006 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
15007
15008         * decl2.c (import_export_vtable): If we support one_only but not
15009         weak symbols, mark instantiated template vtables one_only.
15010         (import_export_decl): Likewise for tinfo functions.
15011         (finish_vtable_vardecl): Also write out vtables from explicitly
15012         instantiated template classes.
15013         * pt.c (mark_class_instantiated): Revert last change.
15014
15015         * except.c (expand_throw): Call mark_used on the destructor.
15016
15017 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
15018
15019         * lex.c (lang_init): Enable flag_exceptions by default if no
15020         command line switch was specified.
15021
15022 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
15023
15024         * pt.c (unify): Handle `void' template parameters in
15025         specializations.
15026
15027 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
15028
15029         * rtti.c (build_dynamic_cast): Handle template case here.
15030         (build_dynamic_cast_1): Not here.
15031
15032         * typeck2.c (digest_init): Make copies where appropriate.
15033
15034         * decl2.c (delete_sanity): resolve_offset_ref.
15035
15036         * except.c: Call terminate without caching so many bits.
15037
15038         * except.c (expand_start_catch_block): Fix catching a reference
15039         to pointer.
15040
15041 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
15042
15043         * init.c (build_new): Copy size to the saveable obstack.
15044
15045         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
15046         TRY_CATCH_EXPR for now.
15047
15048 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
15049
15050         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
15051         has DECL_LANG_SPECIFIC.
15052
15053         * exception.cc (struct cp_eh_info): Add handlers field.
15054         (__cp_push_exception): Initialize it.
15055         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
15056         (__throw_bad_exception): Remove.
15057         * except.c (call_eh_info): Add handlers field.
15058         (get_eh_handlers): New fn.
15059         (push_eh_cleanup): Increment handlers.
15060
15061 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
15062
15063         * except.c (expand_start_eh_spec): Use the try/catch code.
15064         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
15065         doing everything inline.
15066         (init_exception_processing): throw_type_match now takes
15067         const void pointers.
15068         * exception.cc (__check_eh_spec): New fn.
15069         * inc/exception: Neither terminate nor unexpected return.
15070         * decl.c: Make const_ptr_type_node public.
15071         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
15072
15073         * except.c (expand_start_catch_block): We only need the rethrow
15074         region for non-sjlj exceptions.
15075         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
15076
15077 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
15078
15079         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
15080         (various.o): Likewise.
15081         * inc/new: Add placement deletes.  Add throw specs for default new.
15082         * new.cc (set_new_handler): Move here from libgcc2.
15083         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
15084         (new): Move from libgcc2.  Throw bad_alloc.
15085         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
15086         * decl.c (init_decl_processing): Update exception specs on new and
15087         delete.
15088
15089         * method.c (build_decl_overload_real): Don't mess with global
15090         placement delete.
15091
15092         * init.c (build_new): Check for null throw spec, not nothrow_t.
15093
15094         * decl.c (duplicate_decls): Don't complain about different exceptions
15095         from an internal declaration.
15096
15097         * call.c (build_op_delete_call): Fix check for member fns again.
15098
15099         * decl2.c (import_export_decl): Interface hackery affects
15100         virtual synthesized methods.
15101
15102 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15103
15104         * decl.c (start_decl): Don't just complain about a mismatched
15105         scope, fix it.
15106
15107         * decl.c (make_implicit_typename): Handle case where t is not
15108         actually from context.
15109         * tree.c (get_type_decl): Lose identifier case.
15110         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
15111         * parse.y (nonnested_type): Just use lookup_name.
15112         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
15113
15114 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
15115
15116         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
15117         T was built in C language context (for example, by
15118         output_func_start_profiler).
15119
15120 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
15121
15122         * decl.c (make_implicit_typename): New fn.
15123         (lookup_name_real): Use it.  Use current_class_type as the context.
15124
15125 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
15126
15127         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
15128
15129 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15130
15131         * friend.c (do_friend): Warn about non-template friends in templates.
15132
15133         * call.c (build_op_delete_call): Fix handling of inherited delete.
15134
15135         * search.c (dfs_record_inheritance): Ignore template type parms.
15136
15137 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
15138
15139         * call.c (build_new_op): Fix copy error.
15140         (build_op_new_call): New fn.
15141         (build_op_delete_call): New fn.
15142         * cp-tree.h: Declare them.
15143         * init.c (build_new): Use them.  Support placement delete.
15144         (build_x_delete): Use build_op_delete_call.
15145         (build_delete): Likewise.
15146         * decl2.c (delete_sanity): Likewise.
15147         (coerce_delete_type): Don't complain about placement delete.
15148
15149 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
15150
15151         * call.c (build_new_function_call): Remove unused 'obj' parm.
15152         * cp-tree.h, typeck.c: Adjust.
15153
15154         * init.c (build_new): Make the cleanup last longer.
15155         (expand_vec_init): Call do_pending_stack_adjust.
15156
15157 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
15158
15159         * pt.c (do_type_instantiation): Fix typo.
15160         (mark_class_instantiated): If we support one_only but not weak
15161         symbols, don't mark this as known.
15162
15163         * init.c (build_new): Handle vec delete in EH cleanup.
15164
15165 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15166
15167         * call.c (build_method_call): Call complete_type before checking
15168         for destructor.
15169
15170 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
15171
15172         * decl.c (add_block_current_level): Delete.
15173         * init.c (build_vec_delete_1): Delete build_block and
15174         add_block_current_level calls.
15175
15176 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
15177
15178         * init.c (build_new): Handle freeing allocated memory when the
15179         constructor throws.
15180
15181         * call.c (build_new_method_call): Fix flags arg.
15182
15183         * pt.c (do_type_instantiation): Don't try to instantiate
15184         member templates.
15185         (mark_decl_instantiated): If we support one_only but not
15186         weak symbols, mark this one_only.
15187         * decl2.c (import_export_vtable): Don't defer handling of vtables
15188         if MULTIPLE_SYMBOL_SPACES.
15189
15190 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
15191
15192         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
15193
15194 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
15195
15196         * except.c (do_pop_exception): Return a value.
15197
15198 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
15199
15200         * call.c (build_new_method_call): Handle getting a
15201         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
15202         if we got template parms.
15203         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
15204         not just the args.
15205         * decl2.c (build_expr_from_tree): Tweak last change.
15206         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
15207         (maybe_fold_nontype_arg): Split out from tsubst_copy.
15208         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
15209
15210 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
15211
15212         * pt.c (tsubst_copy): Handle explicit template arguments in
15213         function calls.
15214         * typeck.c (build_x_function_call): Likewise.
15215         * decl2.c (build_expr_from_tree): Lookup function name if it
15216         hasn't been done.
15217
15218         * pt.c (tsubst): Instantiate template functions properly when
15219         template parameter does not appear in function arguments and return
15220         type.
15221         (comp_template_args): Handle member templates required by tsubst.
15222
15223 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
15224
15225         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
15226         previous change.
15227
15228 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15229
15230         * pt.c (coerce_template_parms): Tweak error message.
15231
15232         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
15233         return type defaults to `int', even if there are storage-class
15234         specifiers.
15235
15236 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
15237
15238         Complete nested exception support.
15239         * except.c (do_pop_exception): Split out...
15240         (push_eh_cleanup): From here.  Handle the EH region by hand.
15241         (expand_start_catch_block): Add a new level for the catch parm.
15242         Move the rethrow region outside the two cleanup regions.
15243         Protect the initializer for the catch parm with terminate.
15244         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
15245         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
15246         popping off the middle of the stack.
15247         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
15248         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
15249         (build_cplus_new): Only wrap CALL_EXPRs.
15250         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
15251         the constructor call.
15252
15253 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15254
15255         * Make-lang.in (c++.distdir): Make inc subdirectory.
15256
15257 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15258
15259         * decl2.c (finish_file): Put back some code.
15260
15261 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15262
15263         * decl2.c (finish_file): Remove redundant code.
15264         * method.c (emit_thunk): Don't let the backend defer generic thunks.
15265
15266 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
15267
15268         * except.c (call_eh_info): Split out...
15269         (push_eh_info): From here.
15270         (expand_builtin_throw): Use it.
15271         (expand_start_catch_block): Move region start back.
15272
15273 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
15274
15275         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
15276         (real_yylex): Record wide strings using target endianness, not host.
15277
15278 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
15279
15280         * repo.c (rindex): Add decl unconditionally.
15281         (get_base_filename, open_repo_file): Don't cast rindex.
15282         * xref.c (rindex): Add decl unconditionally.
15283         (index): Remove unused decl.
15284         (open_xref_file): Don't cast rindex.
15285
15286 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
15287
15288         * class.c (build_vbase_path): Propagate the result type properly.
15289
15290 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
15291
15292         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
15293         remaining use of saved_throw_type with a call to get_eh_type.
15294
15295 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
15296
15297         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
15298         (file_name_nondirectory): New function, doing the same as the macro.
15299         (set_typedecl_interface_info): Use it instead of the macro.
15300         (check_newline): Likewise.
15301         (handle_cp_pragma): Likewise.
15302
15303         * repo.c (get_base_filename): Cast result of rindex to char*.
15304         (open_repo_file): Likewise.
15305         * xref.c (open_xref_file): Likewise.
15306         * error.c (dump_char): Make its arg int, not char.
15307
15308         * except.c (push_eh_info): Pass the number of fields - 1 down, not
15309         the exact number of fields.
15310
15311 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
15312
15313         Support for nested exceptions.
15314         * tinfo2.cc (__is_pointer): New fn.
15315         * exception.cc (struct cp_eh_info): Define.
15316         (__cp_exception_info, __uncatch_exception): New fns.
15317         (__cp_push_exception, __cp_pop_exception): New fns.
15318         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
15319         Lose empty_fndecl.
15320         (init_exception_processing): Likewise.  __eh_pc is now external.
15321         (push_eh_info): New fn.
15322         (get_eh_{info,value,type,caught}): New fns.
15323         (push_eh_cleanup): Just call __cp_pop_exception.
15324         (expand_start_catch_block): Use push_eh_info.  Start the eh region
15325         sooner.
15326         (expand_end_eh_spec): Use push_eh_info.
15327         (expand_throw): Call __cp_push_exception to set up the exception info.
15328         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
15329         when we rethrow.
15330         (expand_builtin_throw): Don't refer to empty_fndecl.
15331
15332 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
15333
15334         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
15335
15336 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
15337
15338         * method.c (build_template_parm_names, build_decl_overload_real):
15339         Add static to definitions.
15340         * pt.c (add_to_template_args, note_template_header,
15341         processing_explicit_specialization, type_unification_real): Likewise.
15342         ({determine,check}_explicit_specialization): Use a single string for
15343         error messages.
15344
15345 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
15346
15347         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
15348         (expand_end_catch_block): Likewise.
15349         (expand_end_eh_spec): Likewise.
15350
15351 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
15352
15353         * decl.c (duplicate_decls): Handle template specializations
15354         correctly.
15355         * error.c (dump_function_name): Fix printing of specializations of
15356         member functions that are not member templates.
15357         * cp-tree.h (processing_specialization): Make global.
15358         * pt.c (processing_specialization): Likewise.
15359         * lex.c (cons_up_default_function): Save and restore
15360         processing_specialization to avoid confusion.
15361
15362 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
15363
15364         * decl.c (init_decl_processing): Give null_node unknown* type.
15365         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
15366         (common_type): Likewise.
15367         * error.c (args_as_string): Recognize null_node.
15368
15369 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15370
15371         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
15372         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
15373
15374         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
15375
15376         * Make-lang.in (g++): Include prefix.o.
15377
15378 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
15379
15380         * pt.c (determine_explicit_specialization): Initialize "dummy"
15381         to keep Purify quiet.
15382
15383 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
15384
15385         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
15386         (build_overload_int): Not here.
15387
15388 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
15389
15390         * class.c (build_type_pathname): Remove.
15391         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
15392
15393 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
15394
15395         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
15396         &&label GNU extension.
15397
15398 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
15399
15400         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
15401         so as to avoid incorrect manglings.
15402         * method.c (build_decl_overload_real): Don't mangle return types
15403         for constructors.
15404
15405 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15406
15407         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
15408         scratch_tree_cons): Define as macros for now.
15409         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
15410         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
15411         typeck2.c: Use them and the expression_obstack variants.
15412
15413 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15414
15415         * decl.c (store_return_init): Allow classes with explicit ctors to
15416         be used with the named return values extension.
15417
15418 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
15419
15420         * pt.c (instantiate_decl): Fix previous change.
15421
15422 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
15423
15424         * pt.c (tsubst): Fix thinko.
15425         (instantiate_decl): Really use the original template.
15426
15427         * call.c (build_new_method_call): Use simple constructor_name for
15428         error messages.
15429
15430 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
15431
15432         * method.c (build_underscore_int): Don't use ANSI specific
15433         features.
15434
15435 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
15436
15437         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
15438         for our key method; it might have been inlined by -O3.
15439
15440 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
15441
15442         * decl.c (make_typename_type): Do not try to call lookup_field for
15443         non-aggregate types.
15444
15445 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
15446
15447         * typeck.c (build_reinterpret_cast): Tweak.
15448
15449 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
15450
15451         * typeck.c (build_reinterpret_cast): Converting a void pointer
15452         to function pointer with a reinterpret_cast produces a warning
15453         if -pedantic is issued.
15454
15455 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15456
15457         * typeck.c (c_expand_return): Don't warn about returning a
15458         reference-type variable as a reference.
15459
15460 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
15461
15462         * method.c (build_static_name): Fix typo.
15463
15464 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
15465
15466         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
15467         OLDDECL before we try to do DECL_USE_TEMPLATE.
15468
15469 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
15470
15471         * decl.c (duplicate_decls): Don't warn about template instances.
15472
15473         * typeck.c (mark_addressable): Lose ancient code that unsets
15474         DECL_EXTERNAL.
15475
15476         * pt.c (do_decl_instantiation): Lose support for instantiating
15477         non-templates.
15478
15479         * call.c (build_new_function_call): Fix handling of null explicit
15480         template args.
15481         (build_new_method_call): Likewise.
15482
15483 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
15484
15485         * method.c (build_underscore_int): Fix typo.
15486
15487 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
15488
15489         * tree.c (print_lang_statistics): #if 0 call to
15490         print_inline_obstack_statistics until its definition is checked in.
15491
15492 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
15493
15494         * decl2.c (finish_file): Move dump_tree_statistics to end.
15495
15496         * pt.c (instantiate_decl): Look for the original template.
15497         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
15498         of member templates.
15499
15500 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
15501
15502         * Makefile.in (g++FAQ.*): New rules.
15503         (CONFLICTS): Update.
15504         * g++FAQ.texi: Moved from libg++.
15505
15506         * parse.y (PFUNCNAME): Only specify the type once.
15507
15508 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
15509
15510         * lex.c (real_yylex): Clean up the code to fully behave the way
15511         the c-lex.c parser does for complex and real numbers.
15512
15513 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
15514
15515         * method.c (build_decl_overload_real): Reformat.
15516
15517 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
15518
15519         * method.c (synthesize_method): If at_eof, determine our linkage.
15520
15521 1997-09-29  Paul Eggert  <eggert@twinsun.com>
15522
15523         * lex.c (real_yylex): Treat `$' just like `_', except issue a
15524         diagnostic if !dollars_in_ident or if pedantic.
15525
15526         * lang-specs.h (@c++): -ansi no longer implies -$.
15527
15528         * decl2.c (lang_decode_option):
15529         -traditional and -ansi now do not mess with
15530         dollars_in_ident.
15531
15532 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
15533
15534         * Makefile.in (parse.o, decl.o): Also depend on
15535         $(srcdir)/../except.h $(srcdir)/../output.h.
15536         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
15537         $(srcdir)/../except.h $(srcdir)/../output.h.
15538         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
15539         ../insn-codes.h.
15540
15541         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
15542
15543         * expr.c (cplus_expand_expr): Make it static.
15544
15545         * decl2.c, init.c, typeck.c: Include "expr.h".
15546         (expand_expr): Use proper values when calling the function.
15547
15548 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
15549
15550         * lang-options.h: New -Wold-style-cast flag.
15551         * cp-tree.h (warn_old_style_cast): New variable.
15552         * decl2.c (warn_old_style_cast): Likewise.
15553         (lang_decode_option): Support -Wold-style-cast.
15554         (reparse_absdcl_as_casts): Produce old-style-cast warning.
15555
15556 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15557
15558         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
15559         TREE_USED, reset value based on already_used.
15560
15561         * init.c (expand_member_init): Revert change.
15562
15563 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
15564
15565         * cp-tree.h, decl.c, decl2.c, pt.c:
15566         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
15567
15568         * decl2.c (lang_decode_option): Add missing ;.
15569
15570 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
15571
15572         * friend.c (do_friend): Disable injection for all template-derived
15573         decls.
15574         * decl2.c (lang_decode_option): Handle -fguiding-decls.
15575         * parse.y (notype_template_declarator): New nonterminal.
15576         (direct_notype_declarator): Use it.
15577         (complex_direct_notype_declarator): Likewise.
15578         (object_template_id): Accept any kind of identifier after TEMPLATE.
15579         (notype_qualified_id): Don't add template declarators here.
15580
15581 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
15582
15583         * call.c (add_template_candidate): Add explicit_targs parameter.
15584         (build_scoped_method_call): Use it.
15585         (build_overload_call_real): Likewise.
15586         (build_user_type_conversion_1): Likewise.
15587         (build_new_function_call): Likewise.
15588         (build_object_call): Likewise.
15589         (build_new_op): Likewise.
15590         (build_new_method_call): Likewise.
15591         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
15592         (build_new_method_call): Likewise.
15593
15594         * class.c (finish_struct_methods): Add specialization pass to
15595         determine which methods were specializing which other methods.
15596         (instantiate_type): Handle TEMPLATE_ID_EXPR.
15597
15598         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
15599
15600         * cp-tree.h (name_mangling_version): New variable.
15601         (flag_guiding_decls): Likewise.
15602         (build_template_decl_overload): New function.
15603         (begin_specialization): Likewise.
15604         (reset_specialization): Likewise.
15605         (end_specialization): Likewise.
15606         (determine_explicit_specialization): Likewise.
15607         (check_explicit_specialization): Likewise.
15608         (lookup_template_function): Likewise.
15609         (fn_type_unification): Add explicit_targs parameter.
15610         (type_unification): Likewise.
15611
15612         * decl.c (duplicate_decls): Add smarts for explicit
15613         specializations.
15614         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
15615         specializations.
15616         (grokfndecl): Call check_explicit_specialization.
15617
15618         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
15619         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
15620         (check_classfn): Handle specializations.
15621
15622         * error.c (dump_function_name): Print specialization arguments.
15623
15624         * friend.c (do_friend): Don't call pushdecl for template
15625         instantiations.
15626
15627         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
15628
15629         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
15630         and -fno-guiding-decls.
15631
15632         * lex.c (identifier_type): Return PFUNCNAME for template function
15633         names.
15634
15635         * method.c (build_decl_overload_real): New function.
15636         (build_template_parm_names): New function.
15637         (build_overload_identifier): Use it.
15638         (build_underscore_int): New function.
15639         (build_overload_int): Use it.  Add levels for template
15640         parameters.
15641         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
15642         (build_overload_nested_names): Handle template type parameters.
15643         (build_template_decl_overload): New function.
15644
15645         * parse.y (YYSTYPE): New ntype member.
15646         (nested_name_specifier): Use it.
15647         (nested_name_specifier_1): Likewise.
15648         (PFUNCNAME): New token.
15649         (template_id, object_template_id): New non-terminals.
15650         (template_parm_list): Note specializations.
15651         (template_def): Likewise.
15652         (structsp): Likewise.
15653         (fn.def2): Handle member template specializations.
15654         (component_decl_1): Likewise.
15655         (direct_notype_declarator): Handle template-ids.
15656         (component_decl_1): Likewise.
15657         (direct_notype_declarator): Handle template-ids.
15658         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
15659
15660         * pt.c (processing_specializations): New variable.
15661         (template_header_count): Likewise.
15662         (type_unification_real): New function.
15663         (processing_explicit_specialization): Likewise.
15664         (note_template_header): Likewise.
15665         (is_member_template): Handle specializations.
15666         (end_template_decl): Call reset_specialization.
15667         (push_template_decl): Handle member template specializations.
15668         (tsubst): Likewise.
15669         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
15670         (instantiate_template): Handle specializations.
15671         (instantiate_decl): Likewise.
15672         (fn_type_unification): Handle explicit_targs.
15673         (type_unification): Likewise.  Allow incomplete unification
15674         without an error message, if allow_incomplete.
15675         (get_bindings): Use new calling sequence for fn_type_unification.
15676
15677         * spew.c (yylex): Handle PFUNCNAME.
15678
15679         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
15680         (really_overloaded_fn): Likewise.
15681         (get_first_fn): Handle function templates.
15682
15683         * typeck.c (build_x_function_call): Use really_overloaded_fn.
15684         Handle TEMPLATE_ID_EXPR.
15685         (build_x_unary_op): Likewise.
15686         (build_unary_op): Likewise.
15687         (mark_addressable): Templates whose address is taken are marked
15688         as used.
15689
15690 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
15691
15692         * decl.c (init_decl_processing): Declare __builtin_constant_p as
15693         accepting any kind of type, not only int.
15694
15695 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
15696
15697         * search.c (get_matching_virtual): Notice virtual bases when sorrying
15698         about covariant returns.
15699
15700         * parse.y (member_init): Also imply typename here.  Remove ancient
15701         extension for initializing base members.
15702
15703 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
15704
15705         Handle multi-level typenames and implicit typename in base list.
15706         * parse.y (typename_sub{,[0-2]}): New rules.
15707         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
15708         (nonnested_type): New rule.
15709         (complete_type_name): Use it.
15710         (base_class.1): Use typename_sub and nonnested_type.
15711         (nested_name_specifier): Don't elide std:: here.
15712         * decl.c (make_typename_type): Handle getting a type for NAME.
15713         (lookup_name_real): Turn std:: into :: here.
15714
15715         Rvalue conversions were removed in London.
15716         * call.c (is_subseq): Don't consider lvalue transformations.
15717         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
15718         (joust): Re-enable ?: kludge.
15719
15720 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
15721
15722         * decl.c (start_function): Up warning of no return type to be a
15723         pedwarn.
15724
15725 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15726
15727         * init.c (expand_member_init): Don't set TREE_USED.
15728         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
15729         set,don't clear TREE_USED wholesale.
15730
15731 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
15732
15733         * call.c (build_over_call): Do require_complete_type before
15734         build_cplus_new.
15735
15736 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
15737
15738         * search.c (lookup_field): Call complete_type in all cases.
15739
15740         * decl.c (finish_function): Just warn about flowing off the end.
15741
15742 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
15743
15744         * decl.c (grokparms): Don't bash a permanent list node if we're
15745         in a function.
15746
15747 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
15748
15749         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
15750
15751 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
15752
15753         * call.c (build_new_op): Give better error for syntactically
15754         correct, but semantically invalid, use of undeclared template.
15755
15756         * call.c (compare_qual): Handle pmfs.
15757
15758         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
15759         after the exception spec.
15760
15761 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
15762
15763         * call.c (null_ptr_cst_p): Integer type, not integral type.
15764
15765         * call.c (joust): Disable warnings until they can be moved to the
15766         right place.
15767
15768 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
15769
15770         * Makefile.in, config-lang.in:  Convert to autoconf.
15771
15772 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
15773
15774         * decl.c (lookup_name_real): Add implicit 'typename' to types from
15775         base classes.
15776
15777         * pt.c (most_specialized_class): Fix typo.
15778         (tsubst): Move constant folding to TREE_VEC case.
15779
15780 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
15781
15782         * pt.c (do_poplevel): Don't warn about unused local variables
15783         while processing_template_decl since we don't always know whether
15784         or not they will need constructing/destructing.
15785
15786         * pt.c (uses_template_parms): Check the values of an enumeration
15787         type to make sure they don't depend on template parms.
15788
15789         * decl.c (make_typename_type): Don't lookup the field if the
15790         context uses template parms, even if we're not
15791         processing_template_decl at the moment.
15792
15793         * pt.c (coerce_template_parms): Avoid looking at the
15794         TYPE_LANG_DECL portion of a typename type, since there won't be
15795         one.
15796         (tsubst): Do constant folding as necessary to make sure that
15797         arguments passed to lookup_template_class really are constants.
15798
15799 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
15800
15801         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
15802         * decl2.c (finish_file): Only register exception tables if we
15803         need to.
15804
15805         * decl.c (init_decl_processing): Add __builtin_[fs]p.
15806
15807 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
15808
15809         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
15810
15811 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
15812
15813         * error.c (dump_decl): Avoid crashing when presented with a
15814         uninitialized constant, as can occur with a template parameter.
15815         (dump_expr): Make sure that there are enough levels of
15816         current_template_parms before we start diving through them.
15817
15818 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
15819
15820         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
15821         c-typeck.c.
15822
15823 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15824
15825         * except.c (expand_throw): Call build_delete for all
15826         exception types, not just objects with destructors.
15827
15828 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
15829
15830         * decl.c (current_local_enum): Remove static.
15831         * pt.c (tsubst_enum): Save and restore value of current_local_enum
15832         in case template is expanded in enum decl.
15833         (instantiate_class_template): Use new tsubst_enum signature.
15834         (tsubst_expr): Likewise.
15835
15836 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
15837
15838         * pt.c (begin_member_template_processing): Take a function as
15839         argument, not a set of template arguments.  Use the template
15840         parameters, rather than the arguments.  Handle non-type parameters
15841         correctly.  Push a binding level for the parameters so that multiple
15842         member templates using the same parameter names can be declared.
15843         (end_member_template_processing): Pop the binding level.
15844         (push_template_decl): Mark member templates as static when
15845         appropriate.
15846
15847         * lex.c (do_pending_inlines): Pass the function, not its template
15848         arguments, to begin_member_template_processing.
15849         (process_next_inline): Likewise.
15850         (do_pending_defargs): Likewise.
15851
15852         * error.c (dump_expr): Obtain the correct declaration for a
15853         TEMPLATE_CONST_PARM.
15854
15855         * call.c (add_template_conv_candidate): New function.
15856         (build_object_call): Handle member templates, as done in the other
15857         build_ functions.
15858
15859 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
15860
15861         * decl.c (replace_defag): Undo previous change.
15862         * lex.c (do_pending_defargs): Deal with member templates.
15863
15864         * pt.c (is_member_template): Avoid crashing when passed a
15865         non-function argument.
15866
15867 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
15868
15869         * class.c (grow_method): Remove check for redeclaration.
15870
15871 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
15872
15873         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
15874         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
15875         (PRIMARY_TEMPLATE_P): Use it.
15876         * call.c (build_overload_call_real): Use it.
15877         * class.c (instantiate_type): Likewise.
15878         * decl.c (decls_match): Likewise.
15879         * method.c (build_overload_identifier): Likewise.
15880         * pt.c (push_template_decl): Likewise.
15881         (classtype_mangled_name): Likewise.
15882         (lookup_template_class): Likewise.
15883
15884         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
15885         DECL_NTPARMS to conform to usage elsewhere.
15886         * call.c (add_template_candidate): Likewise.
15887         * class.c (instantiate_type): Likewise.
15888         * pt.c (instantiate_template): Likewise.
15889         (get_bindings): Likewise.
15890
15891         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
15892         is_member_template.
15893
15894         * pt.c (unify): Undo changes to allow multiple levels of template
15895         parameters.
15896         (type_unification): Likewise.
15897         (fn_type_unification): Likewise.
15898         (get_class_bindings): Likewise.
15899         * cp-tree.h (Likewise).
15900
15901         * decl.c (replace_defarg): Check that the type of the default
15902         parameter does not invlove a template type before complaining
15903         about the initialization.
15904
15905         * error.c (dump_expr): Deal with template constant parameters in
15906         member templates correctly.
15907
15908         * pt.c (is_member_template): Deal with class specializations
15909         correctly.
15910         (tsubst): Handle "partial instantiation" of member templates
15911         correctly.
15912
15913 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
15914
15915         * pt.c (type_unification): Change calling sequence to allow for
15916         multiple levels of template parameters.
15917         (tsubst_expr): Likewise.
15918         (tsubst): Likewise.
15919         (tsubst_copy): Likewise.
15920         (instantiate_template): Likewise.
15921         (unify): Likewise.
15922         * call.c (build_overload_call_real): Use it.
15923         (add_builtin_candidate): Use it.
15924         (build_new_method_call): Use it.
15925         * class.c (instantiate_type): Use it.
15926         * decl.c (grokdeclarator): Use it.
15927         * decl2.c (finish_file): Use it.
15928         * method.c (build_overload_identifier): Use it.
15929
15930         * call.c (add_template_candidate):  Add additional parameter for
15931         the function return type.  Call fn_type_unification istead of
15932         type_unification.
15933         (build_user_type_conversion_1): Handle member templates.
15934         (build_new_function_call): Likewise.
15935         (build_new_op): Likewise.
15936         (build_new_method_call): Likewise.
15937
15938         * class.c (grow_method): Don't give an error message indicating
15939         that two member templates with the same name are ambiguous.
15940         (finish_struct): Treat member template functions just like member
15941         functions.
15942
15943         * cp-tree.h (check_member_template): Add declaration.
15944         (begin_member_template_processing): Likewise.
15945         (end_member_template_processing): Likewise.
15946         (fn_type_unification): Likewise.
15947         (is_member_template): Likewise.
15948         (tsubst): Change prototype.
15949         (tsubst_expr): Likewise.
15950         (tsubst_copy): Likewise.
15951         (instantiate_template): Likewise.
15952         (get_bindings): Likewise.
15953
15954         * decl.c (decls_match): Handle multiple levels of template
15955         parameters.
15956         (pushdecl): Handle template type params just like other type
15957         declarations.
15958         (push_class_level_binding): Return immediately if the
15959         class_binding_level is NULL.
15960         (grokfndecl): If check_classfn() returns a member_template, use
15961         the result of the template, not the template itself.
15962
15963         * decl2.c (check_member_template): New function.  Check to see
15964         that the entity declared to be a member template can be one.
15965         (check_classfn): Allow redeclaration of member template functions
15966         with different types; the new functions can be specializations or
15967         explicit instantiations.
15968
15969         * error.c (dump_decl): Handle multiple levels of template
15970         parameters.
15971         (dump_function_decl): Update to handle function templates.
15972
15973         * lex.c (do_pending_inlines): Set up template parameter context
15974         for member templates.
15975         (process_next_inline): Likewise.
15976
15977         * method.c (build_overload_identifier): Adjust for multiple levels
15978         of template parameters.
15979
15980         * parse.y (fn.def2): Add member templates.
15981         (component_decl_1): Likewise.
15982
15983         * pt.c (begin_member_template_processing): New function.
15984         (end_member_template_processing): Likewise.
15985         (is_member_template): Likewise.
15986         (fn_type_unification): Likewise.
15987         (current_template_parms): Return a vector of all the template
15988         parms, not just the innermost level of parms.
15989         (push_template_decl): Deal with the possibility of member
15990         templates.
15991         (lookup_template_class): Likewise.
15992         (uses_template_parms): Likewise.
15993         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
15994         TEMPLATE_CONST_PARM to deal with multiple levels of template
15995         arguments.   Add processing of TEMPLATE_DECL to produce new
15996         TEMPLATE_DECLs from old ones.
15997         (do_decl_instantiation): Handle member templates.
15998
15999         * search.c (lookup_fnfields_1): Handle member template conversion
16000         operators.
16001
16002         * tree.c (cp_tree_equal): Check the levels, as well as the
16003         indices, of TEMPLATE_CONST_PARMs.
16004
16005         * typeck.c (comptypes): Check the levels, as well as the indices,
16006         fo TEMPLATE_TYPE_PARMs.
16007         (build_x_function_call): Treat member templates like member
16008         functions.
16009
16010 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
16011
16012         * typeck.c (c_expand_return): Always convert_for_initialization
16013         before checking for returning a pointer to local.
16014
16015         * pt.c (type_unification): If strict and the function parm doesn't
16016         use template parms, just compare types.
16017
16018 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
16019
16020         * method.c (build_overloaded_value): Replace direct call
16021         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
16022
16023 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
16024
16025         * typeck.c (convert_arguments): Don't arbitrarily choose the first
16026         of a set of overloaded functions.
16027
16028 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
16029
16030         * lex.c (real_yylex): Don't elide __FUNCTION__.
16031
16032         * method.c (build_overload_value): Add in_template parm.
16033         (build_overload_int): Likewise.
16034         (build_overload_identifier): Pass it.
16035
16036         * decl.c (duplicate_decls): Don't bash a previous template
16037         definition with a redeclaration.
16038
16039         * pt.c (unify): float doesn't match double.
16040
16041         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
16042         TYPE_DECL.  Handle getting non-template types.
16043         * parse.y (explicit_instantiation): Use typespec instead of
16044         aggr template_type.
16045
16046 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
16047
16048         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
16049
16050 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
16051
16052         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
16053         (compare_ics): Likewise.
16054
16055 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
16056
16057         * call.c (joust): Warn about choosing one conversion op over
16058         another because of 'this' argument when the other return type is
16059         better.
16060         (source_type): New fn.
16061
16062         * call.c (build_new_op): Strip leading REF_BIND from first operand
16063         to builtin operator.
16064
16065         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
16066         use its RTL.
16067
16068 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
16069
16070         * call.c (null_ptr_cst_p): Remove support for (void*)0.
16071
16072 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
16073
16074         * typeck.c (expand_target_expr): Make definition match declaration.
16075
16076         * class.c (get_basefndecls): Make definition match declaration.
16077
16078 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
16079
16080         * input.c (sub_getch): Eventually give up and release the input file.
16081
16082         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
16083         right place.
16084
16085         * call.c (joust): Tweak message.
16086
16087 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
16088
16089         * error.c (type_as_string): Put const/volatile on template type
16090         parameters where appropriate.
16091
16092 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
16093
16094         * call.c (strictly_better): Make arguments unsigned ints.
16095
16096 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
16097
16098         * lex.c (real_yylex): Refer to __complex instead of complex.
16099
16100 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
16101
16102         * lex.c (real_yylex): Don't use getc directly.
16103
16104 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
16105
16106         * call.c (is_subseq): Don't try to be clever.
16107
16108 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
16109
16110         * parse.y, pt.c: Include "except.h".
16111         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
16112         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
16113         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
16114         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
16115         prototyping.
16116
16117 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
16118
16119         * decl2.c (mark_vtable_entries): Instead of replacing pure
16120         virtuals with a reference to __pure_virtual, copy the decl and
16121         change the RTL.
16122
16123 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
16124
16125         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
16126
16127         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
16128
16129         * pt.c (instantiate_class_template): Call repo_template_used
16130         before finish_prevtable_vardecl.
16131
16132         * call.c (is_subseq): New fn.
16133         (compare_ics): Use it.
16134
16135         * repo.c (finish_repo): Don't crash on no args.
16136
16137         * parse.y (named_complex_class_head_sans_basetype): Handle
16138         explicit global scope.
16139         * decl2.c (handle_class_head): New fn.
16140
16141         * pt.c (unify): Add CONST_DECL case.
16142
16143 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16144
16145         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
16146
16147         * cp-tree.h (report_type_mismatch): Add prototype.
16148         * call.c (build_overload_call_real): Remove erroneous fourth
16149         argument to report_type_mismatch.
16150         (build_user_type_conversion_1): Remove erroneous second arg to
16151         tourney.
16152         (build_new_function_call): Likewise.
16153         (build_object_call): Likewise.
16154         (build_new_op): Likewise.
16155         (build_new_method_call): Likewise.
16156
16157 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
16158
16159         * error.c (dump_decl): Don't bother processing a function with no
16160         DECL_LANG_SPECIFIC.
16161
16162         * method.c (emit_thunk): Call init_function_start in the macro case.
16163
16164 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
16165
16166         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
16167         defined and used to set flag_vtable_thunks.
16168
16169 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
16170
16171         * parse.y: Don't clear the inlines from their obstack until they've
16172         all been processed.
16173
16174         * decl.c (duplicate_decls): Don't complain about exception
16175         specification mismatch if flag_exceptions is off.
16176
16177 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
16178
16179         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
16180
16181 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
16182
16183         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
16184         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
16185         Include <stdio.h> before include files that formerly used STDIO_PROTO.
16186
16187         * decl.c, g++spec.c, lex.c, method.c, repo.c:
16188         Include "config.h" first, as per autoconf manual.
16189
16190 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
16191
16192         * decl.c (duplicate_decls): Tweak wording.
16193         * lex.c (do_pending_defargs): Don't die if we see a default arg
16194         that isn't a DEFAULT_ARG.
16195         * error.c (dump_expr): Handle DEFAULT_ARG.
16196
16197         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
16198         * lang-options.h: Add -fhandle-exceptions.
16199
16200         * class.c (build_vtable): Vtables are artificial.
16201         (prepare_fresh_vtable): Likewise.
16202
16203 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16204
16205         * cvt.c (ocp_convert): After converting to the target type, set
16206         LOOKUP_NO_CONVERSION.
16207
16208         * call.c (joust): Warn about potentially confusing promotion rules
16209         with -Wsign-promo.
16210         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
16211
16212 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
16213
16214         * exception.cc: Declare __terminate_func with noreturn attribute.
16215
16216 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
16217
16218         * parse.y: Break out eat_saved_input, handle errors.
16219         (function_try_block): Use compstmt instead of compstmt_or_error.
16220
16221 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
16222
16223         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
16224
16225 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
16226
16227         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
16228         existence of cc1plus check whether $(LANGUAGES) contains C++.
16229
16230 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
16231
16232         * method.c (do_build_copy_constructor): When copying an anonymous
16233         union member loop around to handle nested anonymous unions.  Use
16234         the offset of the member relative to the outer structure, not the
16235         union.
16236
16237 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
16238
16239         * call.c (resolve_args): New fn.
16240         (build_new_function_call): Use it.
16241         (build_object_call): Likewise.
16242         (build_new_method_call): Likewise.
16243
16244 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16245
16246         * call.c (build_over_call): tsubst all default parms from templates.
16247
16248 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
16249
16250         * decl.c (struct cp_function): Add static_labelno.
16251         (push_cp_function_context): Save it.
16252         (pop_cp_function_context): Restore it.
16253
16254 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
16255
16256         * typeck.c (build_component_ref_1): Convert from reference.
16257
16258 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16259
16260         * parse.y (current_declspecs, prefix_attributes): Initialize to
16261         NULL_TREE.
16262
16263         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
16264         before we try to force it to be a TREE_LIST.
16265         (decl): Make sure $1.t is non-nil.
16266
16267 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
16268
16269         * pt.c (uses_template_parms): Handle template first-parse codes.
16270
16271         * decl.c (cp_finish_decl): Only warn about user-defined statics.
16272
16273 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
16274
16275         * pt.c (unify): Handle BOOLEAN_TYPE.
16276
16277         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
16278         * pt.c (tsubst): Don't set it.
16279         * call.c (build_over_call): Use uses_template_parms.
16280
16281 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
16282
16283         * method.c (build_overload_nested_name): Use static_labelno
16284         instead of var_labelno.
16285         (build_qualified_name): New fn.
16286         (build_overload_name): Split out from here.
16287         (build_static_name): Use build_qualified_name.
16288         * decl.c (cp_finish_decl): Statics in extern inline functions
16289         have comdat linkage.
16290         (start_function): Initialize static_labelno.
16291
16292 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16293
16294         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
16295         before "all member functions in class [] are private".
16296
16297 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
16298
16299         * lex.c (do_scoped_id): convert_from_reference.
16300         * init.c (build_offset_ref): Likewise.
16301
16302 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
16303
16304         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
16305
16306 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
16307
16308         * typeck.c (get_member_function_from_ptrfunc): Promote index
16309         before saving it.
16310
16311 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
16312
16313         * tree.c (layout_basetypes): Move non-virtual destructor warning.
16314         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
16315
16316 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
16317
16318         * decl.c (grokdeclarator): Call add_defarg_fn for the function
16319         type, too.
16320         * lex.c (add_defarg_fn): Adjust.
16321         (do_pending_defargs): Adjust.  Don't skip the first parm.
16322
16323 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
16324
16325         * decl.c (build_enumerator): Global enumerators are also readonly.
16326
16327         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
16328         (build_dynamic_cast): Call it and convert_from_reference.
16329
16330         * lex.c (add_defarg_fn): New fn.
16331         (snarf_defarg): Don't add to defarg_types.
16332         (do_pending_defargs): Lose defarg_types.  All fns we process now
16333         have defargs.
16334         * decl.c (grokfndecl): Call add_defarg_fn.
16335
16336         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
16337         * cp-tree.def: Add DEFAULT_ARG.
16338         * spew.c (yylex): Call snarf_defarg as appropriate.
16339         * parse.y: New tokens DEFARG and DEFARG_MARKER.
16340         (defarg_again, pending_defargs, defarg, defarg1): New rules.
16341         (structsp): Use pending_defargs.
16342         (parms, full_parm): Use defarg.
16343         * lex.c (init_lex): Initialize inline_text_firstobj.
16344         (do_pending_inlines): Never pass the obstack to feed_input.
16345         (process_next_inline): Call end_input instead of restore_pending_input.
16346         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
16347         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
16348         * input.c (end_input): New fn.
16349         (sub_getch): At the end of some fed input, just keep returning EOF
16350         until someone calls end_input.
16351         Remove 'obstack' field from struct input_source.
16352         * decl.c (grokparms): Handle DEFAULT_ARG.
16353         (replace_defarg): New fn.
16354         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
16355
16356 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
16357
16358         * call.c (implicit_conversion): If nothing else works, try binding
16359         an rvalue to a reference.
16360
16361 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
16362
16363         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
16364         ifndef for Cygwin32 to include SIGSEGV.
16365
16366 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
16367
16368         * class.c (finish_struct_1): Only complain about pointers without
16369         copy stuff if there are any constructors.
16370
16371         * rtti.c (build_dynamic_cast): Call complete_type on the types.
16372
16373         * decl.c (grokfndecl): If the function we chose doesn't actually
16374         match, die.
16375
16376         * decl2.c (grokclassfn): Don't specify 'const int' for the
16377         artificial destructor parm.
16378
16379         * pt.c (type_unification): If we are called recursively, nothing
16380         decays.
16381
16382 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
16383
16384         * decl.c (init_decl_processing): Stop trying to catch signals
16385         other than SIGABRT since the Cygwin32 library doesn't support
16386         them correctly yet.  This fixes a situation in which g++ causes
16387         a hang on SIGSEGVs and other such signals in our Win32-hosted
16388         tools.
16389
16390 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
16391
16392         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
16393
16394 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
16395
16396         * typeck2.c (store_init_value): Always return the value if our
16397         type needs constructing.
16398
16399         * method.c (hack_identifier): Convert class statics from
16400         reference, too.
16401
16402 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
16403
16404         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
16405
16406 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
16407
16408         * typeck.c (c_expand_return): Make sure we clean up temporaries at
16409         the end of return x;
16410
16411 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16412
16413         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
16414
16415 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
16416
16417         * except.c (expand_builtin_throw): Add support
16418         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
16419
16420 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
16421
16422         * repo.c (extract_string): Null-terminate.
16423
16424         * cp-tree.h (TI_SPEC_INFO): New macro.
16425         (CLASSTYPE_TI_SPEC_INFO): New macro.
16426         * pt.c (push_template_decl): Correctly determine # of template parms
16427         for partial specs.
16428
16429         * call.c (compare_ics): Really fix 'this' conversions.
16430
16431         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
16432         non-template fn.
16433
16434         * pt.c (push_template_decl): Complain about mismatch in # of
16435         template parms between a class template and a member template.
16436
16437 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
16438
16439         * method.c (synthesize_method): You can't call
16440         function_cannot_inline_p after finish_function.
16441         * decl.c (finish_function): Turn on flag_inline_functions and turn
16442         off DECL_INLINE before handing a synthesized method to the
16443         backend.
16444
16445 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
16446
16447         * method.c (synthesize_method): Remove July 30 change to never set
16448         DECL_INLINE if at_eof.
16449
16450 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
16451
16452         * xref.c (GNU_xref_member): Ensure that the node has a
16453         decl_lang_specific part before checking DECL_FRIEND_P.
16454
16455 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
16456
16457         * pt.c (instantiate_class_template): Diagnose non-class types used
16458         as bases.
16459
16460 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
16461
16462         * typeck.c (build_conditional_expr): Use convert_for_initialization
16463         instead of convert_and_check.
16464
16465 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16466
16467         * parse.y (typespec): Don't pedwarn for typeof.
16468
16469 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
16470
16471         * repo.c (finish_repo): Only check changes if we would write a
16472         repo file.
16473
16474         * call.c (compare_ics): Fix handling of 'this' conversions.
16475
16476         * pt.c (do_decl_instantiation): Support static data too.  Rename
16477         from do_function_instantiation.
16478         * cp-tree.h: Adjust.
16479         * parse.y: Adjust.
16480
16481         * repo.c (extract_string): New fn.
16482         (get_base_filename): Use it.
16483         (init_repo): Compare old args with current args.
16484
16485 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
16486
16487         * Makefile.in, Make-lang.in: Protect C-ls with a comment
16488         character, idea from Paul Eggert <eggert@twinsun.com>.
16489
16490 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
16491
16492         * typeck.c (c_expand_return): Be more persistent in looking for
16493         returned temps.
16494
16495         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
16496         pointer to reference.
16497
16498         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
16499
16500 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
16501
16502         * init.c (build_member_call, build_offset_ref):
16503         Use do_scoped_id instead of do_identifier.
16504
16505         * cvt.c (convert): Remove bogosity.
16506
16507 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16508
16509         * cvt.c (build_up_reference): Do checks of ARGTYPE and
16510         TARGET_TYPE before trying to use get_binfo.
16511
16512 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
16513
16514         * cvt.c (build_up_reference): Call get_binfo to get access control.
16515
16516         * decl2.c (import_export_decl): If we don't support weaks, leave
16517         statics undefined.
16518
16519 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
16520
16521         * except.c (expand_builtin_throw): Add support for machines that
16522         cannot access globals after throw's epilogue when
16523         -fno-sjlj-exceptions is used.
16524
16525 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
16526
16527         * parse.y: 'std::' becomes '::'.
16528         * lex.c (real_yylex): Remove 'namespace' warning.
16529         * init.c (build_member_call): Ignore 'std::'.
16530         (build_offset_ref): Likewise.
16531         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
16532         (do_toplevel_using_decl): Ignore 'using std::whatever'.
16533         * decl.c (push_namespace): Just sorry.
16534         (pop_namespace): Nop.
16535         (init_decl_processing): Declare std namespace.
16536
16537 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
16538
16539         * search.c (push_class_decls): A name which ambiguously refers to
16540         several instantiations of the same template just refers to the
16541         template.
16542
16543 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
16544
16545         * decl.c (build_enumerator): Fix problem with unsigned long
16546         enumerated values being smashed to ints, causing overflow
16547         when computing next enumerated value (for enum values around
16548         MAX_VAL).
16549
16550 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
16551
16552         * typeck.c (build_component_ref): Only call mark_used on a decl.
16553
16554 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16555
16556         * typeck.c (build_c_cast): Make the check for a ptr to function
16557         more specific before possible default_conversion call.
16558
16559 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
16560
16561         * except.c (expand_exception_blocks): Simplify and fix and make
16562         sure we don't end a region in a sequence, as expand_end_bindings
16563         doesn't like it.
16564
16565 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
16566
16567         * except.c (init_exception_processing): Mark terminate as not
16568         returning so that the optimizer can optimize better.
16569
16570 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
16571
16572         * cvt.c (convert): Don't do any extra work, if we can avoid it
16573         easily.
16574
16575 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
16576
16577         * *.[chy]: Change cp_convert to ocp_convert, change convert to
16578         cp_convert.  convert is now reserved for the backend, and doesn't
16579         have the semantics a frontend person should ever want.
16580
16581 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
16582
16583         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
16584         Lose -traditional support.
16585
16586 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
16587
16588         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
16589
16590         * parse.y (self_reference): Do it for templates, too.
16591         * class.c (pushclass): Don't overload_template_name; the alias
16592         generated by build_self_reference serves the same purpose.
16593
16594         * tree.c (list_hash): Make static, take more args.
16595         (list_hash_lookup): Likewise.
16596         (list_hash_add): Make static.
16597         (list_hash_canon): Lose.
16598         (hash_tree_cons): Only build a new node if one isn't already in the
16599         hashtable.
16600         (hash_tree_chain): Use hash_tree_cons.
16601         * cp-tree.h: Adjust.
16602         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
16603         of calling lookup_name.
16604
16605 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
16606
16607         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
16608         doesn't refer to the CONST_DECLs.
16609
16610 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
16611
16612         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
16613         is bigger.
16614         (expand_class_desc): Convert the last argument to a sizetype.
16615
16616 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16617
16618         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
16619         __real__): Add reswords.
16620         * hash.h: Regenerate.
16621         * lex.h (rid): Add RID_COMPLEX.
16622         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
16623         * lex.c (init_lex): Add building of RID_COMPLEX.
16624         (real_yylex): General cleanup in line with what c-lex.c also has,
16625         sans the cruft for traditional; add handling of SPEC_IMAG, complex
16626         types, and imaginary numeric constants.
16627         * parse.y (REALPART, IMAGPART): Add tokens.
16628         (unary_expr): Add REALPART and IMAGPART rules.
16629         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
16630         * decl.c (complex_{integer,float,double,long}_type_node): Define
16631         types.
16632         (init_decl_processing): Set up the types.
16633         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
16634         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
16635         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
16636         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
16637         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
16638         COMPLEX_TYPE case.
16639         * method.c (build_overload_name): Add handling of the different
16640         COMPLEX_TYPEs, prefixing them with `J'.
16641         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
16642         as a template parm.
16643         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
16644         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
16645         (mapcar): Handle COMPLEX_CST.
16646         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
16647         (common_type): Add code for complex types.
16648         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
16649         (convert_for_assignment): Likewise.
16650         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
16651
16652 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
16653
16654         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
16655         tsubst_expr, as it might try to do overload resolution.
16656
16657 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
16658
16659         * pt.c (instantiate_class_template): Oops.
16660
16661 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
16662
16663         * cp-tree.def: Add TAG_DEFN.
16664         * pt.c (tsubst_enum): New fn.
16665         (instantiate_class_template): Use it.
16666         (tsubst_expr): Support TAG_DEFN.
16667         (tsubst): Support local enums.
16668         (tsubst_copy): Likewise.
16669         * decl.c (finish_enum): Likewise.
16670         (start_enum): If this is a local enum, switch to permanent_obstack.
16671
16672 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
16673
16674         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
16675         (finish_function): Put the base init code for constructors just
16676         after the parm cleanup insns.
16677         (struct cp_function): Add last_parm_cleanup_insn.
16678         (pu