OSDN Git Service

* emit-rtl.c (push_to_full_sequence, end_full_sequence): New functions.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2
3         * except.c (expand_exception_blocks): Clear catch_clauses_last.
4
5 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
6
7         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
8         * class.c (check_bitfield_decl): Turn illegal bitfields into
9         non-bitfields.
10         (dfs_propagate_binfo_offsets): Adjust for new size_binop
11         semantics.
12         (dfs_offset_for_unshared_vbases): Likewise.
13         * cvt.c (cp_convert_to_pointer): Convert NULL to a
14         pointer-to-member correctly under the new ABI.
15         * expr.c (cplus_expand_constant): Don't use cp_convert when
16         turning an offset into a pointer-to-member.
17         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
18         when dereferencing them under the new ABI.
19         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
20         of pointers-to-members under the new ABI.
21         
22         * class.c (check_bitfield_decl): Remove restriction on really long
23         bitfields.
24         (layout_class_type): Implement new ABI handling of bitfields
25         longer than their types.
26
27 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
28
29         * parse.y (extdefs): Call ggc_collect.
30         * parse.c: Regenerated.
31
32 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
33
34         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
35         (note_name_declared_in_class): Use OVL_CURRENT to get at a
36         potential overload.
37
38 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
39
40         * class.c (build_vbase_path): Use integer_zerop.
41         (build_vtable_entry): Use tree_low_cst.
42         (get_vfield_offset): Use bit_position.
43         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
44         Use tree_low_cst.
45         (check_bitfield_decl): Set DECL_SIZE using convert.
46         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
47         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
48         Use tree_low_cst.
49         (finish_struct_1): Use bit_position.
50         (dump_class_hierarchy): Use tree_low_cst.
51         * cp-tree.h (min_precision): Add declaration.
52         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
53         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
54         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
55         * expr.c (cplus_expand_constant): Use bit_position.
56         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
57         * rtti.c (get_base_offset): Use bit_position.
58         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
59         host_integerp, and tree_low_cst.
60         (pointer_int_sum): Use integer_zerop.
61         (build_component_addr): Use bit_position.
62         
63 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
64
65         * typeck.c (require_complete_type): Don't assume size_zero_node.
66         (complete_type_or_else): Likewise.
67
68 2000-03-16  Steven Grady <grady@digitaldeck.com>
69             Jason Merrill  <jason@casey.cygnus.com>
70
71         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
72
73 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
74
75         * decl2.c (grokfield): Bail out if type is error_mark_node.
76
77 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
78
79         * tinfo2.cc (__ptr_to_member_data): Rename to ...
80         (__pointer_to_member_data): ... here. Adjust.
81         * rtti.c (create_tinfo_types): Adjust.
82
83 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
84
85         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
86         * decl.c (ref_desc_type_node): Undocument.
87         * rtti.c (ptr_ref_initializer): Rename to ...
88         (ptr_initializer): ... here. Adjust comments.
89         (ptmd_initializer): Fix comment thinko.
90         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
91         (create_tinfo_types): Remove ref_desc_type_node init.
92         * tinfo2.cc (__reference_type_info): Remove.
93
94 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
95
96         * decl.c (cp_finish_decl): Remove obsolete comment.
97         
98         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
99
100 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
101
102         * cp-tree.h: Tweak documentation.
103         * class.c (build_vbase_pointer_fields): Layout the fields, too.
104         (avoid_overlap): Remove.
105         (get_binfo_offset_as_int): New function.
106         (dfs_serach_base_offsets): Likewise.
107         (layout_nonempty_base_or_field): Likewise.
108         (build_base_field): Layout fields here.  Avoid placing two objects
109         of the same type at the same address, under the new ABI.
110         (build_base_fields): Adjust accordingly.
111         (create_vtable_ptr): Return the new field, but don't attach it to
112         TYPE_FIELDS.
113         (remove_base_field): Remove.
114         (remove_base_fields): Remove.
115         (layout_basetypes): Adjust accordingly.
116         (layout_class_type): Call layout_field for each field, rather than
117         just making a wholesale call to layout_type.
118
119 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
120
121         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
122
123 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
124
125         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
126
127         * except.c (dtor_nothrow): New fn.
128         (do_pop_exception): Use it.  Take type parm.
129         (push_eh_cleanup): Take type parm.
130         (expand_start_catch_block): Pass it.
131         (build_eh_type_type_ref): Accept null type.
132
133 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
134
135         * cp-tree.h (revert_static_member_fn): Change prototype.
136         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
137         (grok_op_properties): Likewise.
138         (start_function): Likewise.
139         (revert_static_member_fn): Simplify.
140         * pt.c (check_explicit_specialization): Adjust call to
141         revert_static_member_fn.
142
143 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
144
145         * cp-tree.h (scope_kind): New type.
146         (tmpl_spec_kind): Likewise.
147         (declare_pseudo_global_level): Remove.
148         (pseudo_global_level_p): Rename to template_parm_scope_p.
149         (pushlevel): Remove declaration.
150         (begin_scope): New function.
151         (finish_scope): Likewise.
152         (current_tmpl_spec_kind): Likewise.
153         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
154         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
155         Add template_spec_p.
156         (toplevel_bindings_p): Adjust.
157         (declare_pseudo_global_level): Remove.
158         (pseudo_global_level_p): Rename to template_parm_scope_p.
159         (current_tmpl_spec_kind): New function.
160         (begin_scope): Likewise.
161         (finish_scope): Likewise.
162         (maybe_push_to_top_level): Adjust.
163         (maybe_process_template_type_declaration): Likewise.
164         (pushtag): Likewise.
165         (pushdecl_nonclass_level): Likewise.
166         (lookup_tag): Likewise.
167         (grokfndecl): Handle member template specializations.  Share
168         constructor and non-constructor code.
169         * decl2.c (check_classfn): Handle member template specializations.
170         * pt.c (begin_template_parm_list): Use begin_scope.
171         (begin_specialization): Likewise.
172         (end_specialization): Likewise.
173         (check_explicit_specialization): Use current_tmpl_spec_kind.
174         Handle member template specializations.
175         (end_template_decl): Use finish_scope.  Remove call to
176         get_pending_sizes.
177         (push_template_decl_real): Remove bogus error message.
178         (tsubst_decl): Fix typo in code contained in comment.
179         (instantiate_template): Handle member template specializations.
180         (most_general_template): Likewise.
181         
182 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
183
184         * lex.c (whitespace_cr): Compress consecutive calls to warning().
185         (do_identifier): Ditto for error().
186
187         * pt.c (convert_nontype_argument): Ditto for cp_error().
188         (convert_template_argument): Ditto for cp_pedwarn().
189
190 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
191
192         * exception.cc (__check_null_eh_spec): New fn.
193         * except.c (expand_end_eh_spec): Call it if the spec is throw().
194
195 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
196
197         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
198         * except.c (expand_end_eh_spec): Add the return type.
199         * rtti.c (throw_bad_cast): Add the parmtypes.
200         (throw_bad_typeid): Likewise.
201
202         * semantics.c (expand_stmt): Only leave out rtl for unused
203         artificials, and set DECL_IGNORED_P on them as well.
204         * decl.c (wrapup_globals_for_namespace): Likewise.
205
206 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
207
208         * decl.c (maybe_commonize_var): Skip all artificial decls.
209         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
210
211 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
212
213         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
214         * cp-tree.h: Declare flag_enforce_eh_specs.
215         * decl.c (store_parm_decls, finish_function): Check it.
216
217         C library functions don't throw.
218         * Makefile.in (cfns.h): New target.
219         (except.o): Depend on it.
220         * Make-lang.in (cc1plus): Depend on cfns.gperf.
221         * cfns.gperf: New file.
222         * cfns.h: Generated.
223         * except.c: Include it.
224         (nothrow_libfn_p): New fn.
225         * decl.c (grokfndecl): Use it.
226         * cp-tree.h: Declare it.
227         
228         * decl.c (push_overloaded_decl_1, auto_function, 
229         define_function): Lose.
230         (build_library_fn_1): New static fn.
231         (builtin_function): Use it.
232         (get_atexit_node): Use build_library_fn_ptr.
233         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
234         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
235         push_void_library_fn, push_throw_library_fn): New fns.
236         * cp-tree.h: Declare them.
237         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
238         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
239         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
240         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
241         * rtti.c (build_runtime_decl): Lose.
242         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl, 
243         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
244         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
245
246         * call.c (build_call): Remove result_type parm.
247         Call mark_used on unused artificial fns.
248         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
249
250 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
251
252         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
253         appropriate.
254         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
255         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
256         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
257         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
258         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
259         expand_generic_desc): Likewise.
260
261 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
262
263         * exception.cc (__cp_pop_exception): Cleanup the original object.
264
265 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
266
267         * decl.c (grok_op_properties): Merge conversion to void warning
268         with other silly op warnings.
269
270 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
271
272         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
273         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
274
275 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
276
277         * decl.c (cp_make_fname_decl): New function.
278         (wrapup_globals_for_namespace): Don't emit unused static vars.
279         (init_decl_processing): Remove comment about use of
280         array_domain_type. Set make_fname_decl.
281         (cp_finish_decl): Remove __FUNCTION__ nadgering.
282         * semantics.c (begin_compound_stmt): Remove
283         current_function_name_declared flagging.
284         (expand_stmt): Don't emit unused local statics.
285         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
286         specially.
287
288 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
289
290         * typeck.c (convert_for_assignment): Don't look at array
291         initializer.
292         * call.c (convert_like_real): Likewise. 
293
294 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
295
296         Add initial support for '\uNNNN' specifier.
297         * lex.c (read_ucs): New fn.
298         (readescape, skip_white_space): Call it.
299         (is_extended_char, is_extended_char_1): New fns.
300         (utf8_extend_token): New fn, #if 0'd out.
301         (real_yylex): Treat extended chars like letters.
302
303         * search.c (note_debug_info_needed): Walk the bases even if we 
304         weren't deferring the type itself.
305
306 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
307
308         * decl2.c (finish_objects): Constify a char*.
309
310         * method.c (emit_thunk): Likewise.
311
312 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
313
314         * typeck.c (dubious_conversion_warnings): Look through
315         REFERENCE_TYPE.
316
317 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
318
319         * class.c (dfs_modify_vtables): I is now unsigned.
320         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
321         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
322         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
323         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
324         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
325         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
326         Call integer_all_onesp.
327         * typeck2.c (process_init_constructor): Use compare_tree_int.
328
329         * lang-specs.h (as): Don't call if -syntax-only.
330
331 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
332
333         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
334         RTL_EXPR_HAS_NO_SCOPE after all.
335
336 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
337
338         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
339         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
340         RTL_EXPR_HAS_NO_SCOPE.
341
342         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
343         later.
344         
345         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
346
347 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
348
349         * call.c (convert_like): Macrofy.
350         (convert_like_with_context): New macro.
351         (convert_like_real): Renamed from convert_like.  Add calling
352         context parameters, for diagnostics. Add recursive flag.  Call 
353         dubious_conversion_warnings for outer conversion.
354         (build_user_type_conversion): Use convert_like_with_context.
355         (build_over_call): Likewise. Don't warn about dubious
356         conversions here. Adjust convert_default_arg calls.
357         (convert_default_arg): Add context parameters for diagnostics.
358         Pass throught to convert_like_with_context.
359         * cp-tree.h (convert_default_arg): Add context parameters.
360         (dubious_conversion_warnings): Prototype new function.
361         * typeck.c (convert_arguments): Adjust convert_default_arg call.
362         (dubious_conversion_warnings): New function, broken
363         out of convert_for_assignment. 
364         (convert_for_assignment): Adjust.
365
366 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
367
368         * decl2.c (key_method): Break out from...
369         (import_export_vtable, import_export_class): ...here.
370
371         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
372         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
373
374         * search.c (note_debug_info_needed, dfs_debug_mark, 
375         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
376         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
377
378 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
379
380         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
381         typos.
382
383 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
384
385         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
386         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
387         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
388         (lang_type): Split gets_new into has_new and has_array_new.
389         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
390         (TYPE_GETS_NEW): Split into ...
391         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
392         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
393         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
394         (build_op_new_call): Don't declare.
395         (build_new_1): Likewise.
396         * call.c (build_op_new_call): Remove.
397         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
398         instead of TYPE_NEEDS_DESTRUCTOR.
399         (finish_struct_bits): Likewise.
400         (add_implicitly_declared_members): Likewise.
401         (check_field_decl): Likewise.
402         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
403         correctly under the new ABI.
404         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
405         instead of TYPE_NEEDS_DESTRUCTOR.
406         (initialize_local_var): Likewise.
407         (destroy_local_var): Likewise.
408         (cp_finish_decl): Likewise.
409         (register_dtor_fn): Likewise.
410         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
411         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
412         TYPE_VEC_DELETE_TAKES_SIZE here.
413         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
414         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
415         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
416         (finish_destructor_body): Likewise.
417         (maybe_build_cleanup_1): Likewise.
418         * decl2.c (do_static_destruction): Likewise.
419         * init.c (build_new_1): Make it static.
420         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
421         (expand_cleanup_for_base): Likewise.
422         (get_cookie_size): New function.
423         (build_new_1): Handle array-new cookies correctly under the new
424         ABI.
425         (build_vec_delete_1): Likewise.
426         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
427         (build_delete): Likewise.
428         (build_vec_delete): Handle array-new cookies correctly under the new
429         ABI.
430         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
431         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
432         TYPE_HAS_ARRAY_NEW_OPERATOR.
433         * ptree.c (print_lang_type): Check them.
434         * search.c (context_for_name_lookup): Fix typo in comment.
435         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
436         * tree.c (break_out_cleanups): Likewise.
437         (build_cplus_array_test_1): Likewise.
438         (cp_build_qualified_type_real): Likewise.
439         * typeck.c (complete_type): Likewise.
440         
441         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
442         the command-line, not the end.
443         
444 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
445
446         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
447
448 2000-03-02  Tom Tromey  <tromey@cygnus.com>
449
450         * cp-tree.h (build_java_class_ref): Declare.
451         * init.c (build_java_class_ref): No longer static.
452         * except.c (expand_throw): Generate a Java-style `throw' if the
453         thrown object is a "Java" object.
454         (initialize_handler_parm): Generate a Java-style lookup of
455         exception info if the caught object is a "Java" object.
456         (catch_language, catch_language_init): New globals.
457         (decl_is_java_type): New function.
458         (expand_start_catch_block): Don't call push_eh_info() or
459         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
460         class reference to build_catch_block.
461
462 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
463
464         * typeck.c (comptypes): Treat sizetype like its language equivalent.
465
466 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
467
468         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
469         to merge reference/pointer code and fix incorrect warnings.
470
471 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
472
473         * search.c (protected_accessible_p): Use context_for_name_lookup.
474
475         * init.c (construct_virtual_bases): Fix thinko.
476         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
477
478 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
479
480         * decl.c (current_function_decl): Move to toplev.c.
481
482 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
483
484         * pt.c (fn_type_unification): Unify return type, whenever
485         provided.
486         (get_bindings_real): Only pass return type when necessary.
487         Remove explicit return type check.
488         * class.c (resolve_address_of_overloaded_function): Pass desired
489         return type to fn_type_unification.
490
491 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
492
493         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
494         DECL_FIELD_SIZE.
495         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
496         DECL_FIELD_SIZE.
497         * rtti.c (expand_class_desc): Likewise.
498         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
499         (THUNK_VCALL_OFFSET): Likewise.
500         (THUNK_DELTA): Reflect changes in ../tree.h.
501
502 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
503
504         * search.c (protected_accessible_p): Also allow the access if
505         the member is public in DERIVED.  Lose TYPE parm.
506         (friend_accessible_p): Lose TYPE parm.
507         (accessible_p): Adjust.
508
509 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
510
511         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
512         on things that are not sizes; ssize_binop deleted.
513         Call size_diffop when appropriate.
514         (dfs_build_vcall_offset_vtbl_entries): Likewise.
515         (build_primary_vtable, build_secondary_vtable): Likewise.
516         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
517         Variable I is HOST_WIDE_INT.
518         (get_vfield_offset): Pass proper types to size_binop.
519         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
520         (finish_struct_1): Likewise.
521         (skip_rtti_stuff): Arg N is now pointer to signed.
522         (layout_class_type): Use size_zero_node.
523         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
524         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
525         * decl.c (complete_arry_type): Pass proper types to size_binop.
526         (xref_basetypes): BINFO_OFFSET is sizetype.
527         * error.c (dump_expr): Don't use size_binop non-sizes.
528         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
529         * init.c (construct_virtual_bases): Fix type error.
530         (build_vec_delete_1): Pass proper type to size_binop and don't
531         fold result.
532         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
533         * rtti.c (get_base_offset): Pass proper type to size_binop.
534         * search.c (dfs_find_vbases): Fix type error.
535         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
536         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
537         * tree.c (debug_binfo): Variable N is signed.
538         Use HOST_WIDE_INT_PRINT_DEC.
539         * typeck.c (comptypes): sizetype is same as equivalent integer type.
540         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
541         size_one_node and size_zero_node.
542         (c_alignof): Use size_one_node.
543         (build_component_addr): Pass proper types to size_binop.
544         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
545
546 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
547
548         Implement class scope using-declarations for functions.
549         * class.c (handle_using_decl): Call add_method for used functions.
550         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
551         (add_method): Used functions are hidden by local functions.
552         (check_bases_and_members): Handle using-decls before finalizing
553         CLASSTYPE_METHOD_VEC.
554         * call.c (add_function_candidate): Add ctype parm; if non-zero,
555         override the type of 'this' accordingly.
556         (add_template_candidate, add_template_candidate_real): Add ctype parm.
557         (convert_class_to_reference, build_user_type_conversion_1, 
558         build_new_function_call, build_object_call, build_new_op,
559         build_new_method_call): Pass ctype parm.
560
561         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
562         the baselink.
563         * call.c (convert_class_to_reference, build_user_type_conversion_1, 
564         build_new_function_call, build_object_call, build_new_op,
565         build_new_method_call, build_op_delete_call): Don't get basetype_path
566         from a baselink.
567         * typeck.c (build_component_ref): Likewise.
568         * init.c (build_offset_ref): Likewise.
569         (resolve_offset_ref): Don't call enforce_access.  
570         Call build_scoped_ref.
571         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
572         would cause an error or if -pedantic.
573         * class.c (alter_access): Lose binfo parm.
574
575 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
576
577         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
578         types.
579
580 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
581
582         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
583         pseudo_type_info creation into the std namespace
584
585 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
586
587         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
588         (import_export_class): Remove declaration.
589         * decl2.c (import_export_class): Make it static.
590         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
591         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
592         EXPR_WITH_FILE_LOCATION.
593         * lex.c (check_newline): Tweak filename/lineno setting.
594         * semantics.c (begin_while_stmt): Fix typo in comment.
595         
596 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
597
598         * lang-options.h (-fmessage-length=): Add missing option.
599
600         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
601
602 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
603
604         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
605
606 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
607
608         * optimize.c (expand_call_inline): Emit the return label before
609         evaluating the return value.
610
611 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
612
613         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
614         than duplicating functionality here.
615         * optimize.c: Include input.h.
616         (expand_call_inline): Use push_srcloc and pop_srcloc.
617         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
618         * parse.c: Regenerated.
619         * Makefile.in (lex.o): Depend on input.h.
620         (optimize.o): Likewise.
621         
622 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
623
624         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
625         function type, rather than ICE.
626
627 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
628
629         * decl.c (grokdeclarator): Call decl_type_access_control.
630         * parse.y (parse_end_decl): Don't call decl_type_access_control if
631         decl is null.
632
633 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
634
635         * decl.c (decls_match): Remove obsolete static member nadgering.
636
637 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
638
639         * decl.c (grokdeclarator): Change ANSI to ISO.
640         * lex.c (consume_string, readescape, do_identifier): Likewise.
641         (parse_float, real_yylex): Likewise.
642         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
643         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
644         new_type_id, maybe_label_decls, simple_stmt, 
645         for.init.statement): Likewise.
646         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
647         * semantics.c (finish_named_return_value): Likewise.
648         * parse.c: Regenerate.
649
650 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
651
652         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
653         (CPTI_CLASS_STAR_TYPE): Remove.
654         (vtable_index_type): Likewise.
655         (class_star_type_node): Remove.
656         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
657         (build_binary_op_nodefault): Remove.
658         * call.c (build_new_op): Use build_binary_op instead of
659         build_binary_op_nodefault.
660         * decl.c (init_decl_processing): Remove class_star_type_node
661         initialization.  Make delta_type_node ptrdiff_type_node under the
662         new ABI.  Initialize vtable_index_type.
663         (build_ptrmemfunc_type): Build different structures for the new
664         ABI.
665         (build_enumerator): Use build_binary_op instead of
666         build_binary_op_nodefault.
667         * method.c (build_overload_value): Mangle pointers-to-members
668         appropriately under the new ABI.
669         * typeck.c (build_array_ref): Use build_binary_op instead of
670         build_binary_op_nodefault.
671         (get_member_function_from_ptrfunc): Adjust for the new ABI.
672         (build_binary_op_nodefault): Rename to ...
673         (build_binary_op): ... this.  Remove old version.  Adjust for
674         pointer-to-member comparisons under the new ABI.
675         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
676         (build_ptrmemfunc): Adjust for the new ABI.
677         (expand_ptrmemfunc_cst): Likewise.
678         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
679         (pfn_from_ptrmemfunc): Adjust for the new ABI.
680         
681 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
682
683         * call.c (build_object_call): Compress consecutive calls to
684         cp_error.
685         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
686         (build_op_delete_call): Adjust message formatting.
687
688         * class.c (check_bases): Compress consecutive calls to
689         cp_pedwarn. 
690         (finish_struct_anon): Say 'ISO C++'.
691
692         * decl.c (start_decl): Same here.
693         (grok_reference_init): Likewise.
694         (grokfndecl): Correct message formatting.
695         (grokfndecl): Improve diagnostic.
696         (check_static_variable_definition): Likewise. Say 'ISO C++'
697         (compute_array_index_type): Say 'ISO C++'
698         (create_array_type_for_decl): Compress consecutive calls to
699         cp_error. 
700         (grokdeclarator): Say 'ISO C++'
701         (grok_op_properties): Likewise.
702
703         * decl2.c (delete_sanity): Clairify diagnostic.
704         (check_member_template): Same here.
705         (grok_function_init): Use consistent terminology.
706
707         * expr.c (do_case): Say 'ISO C++'
708
709         * friend.c (do_friend): Compress consecutive calls to warning.
710         
711 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
712
713         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
714         * class.c (build_secondary_vtable): Reorganize.  Don't create a
715         new vtable under the new ABI.
716         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
717         computing the size.
718         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
719         the initializing elements.
720         (initialize_vtable): New function.
721         (dfs_finish_vtbls): Use it.
722         (dfs_accumulate_vtbl_inits): New function.
723         (finish_vtbls): Merge primary and secondary vtables under the new
724         ABI.
725         (finish_struct_1): Remove redundant call to layout_vtable_decl.
726         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
727         aren't VAR_DECLs.
728
729         * class.c (build_vtable): New function, split out from ...
730         (get_vtable_decl): ... here, and ...
731         (build_secondary_vtable): ... here.
732
733         * pt.c (tsubst_decl): Fix formatting.
734         
735 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
736
737         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
738         (avoid_overlap, build_base_field): Likewise.
739         (build_base_field, build_base_fields, is_empty_class): 
740         Test DECL_SIZE with integer_zero.
741         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
742         * cp-tree.h (struct lang_type): New field size_unit.
743         (CLASSTYPE_SIZE_UNIT): New macro.
744         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
745         (cp_finish_decl): Delete -Wlarger-than processing.
746         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
747         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
748         * tree.c (make_binfo): binfo vector is one entry longer.
749         (walk_tree): Walk DECL_SIZE_UNIT.
750
751 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
752
753         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
754         comment.
755         (build_vtable_entry): Don't assume all vtable entries are
756         functions.
757         (build_vtbl_initializer): Adjust accordingly.
758         (get_vtable_decl): Fix formatting.
759         
760 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
761
762         * semantics.c (deferred_type_access_control): Walk the entire
763         type_lookups list.
764         (save_type_access_control): Rename from 
765         initial_deferred_type_access_control.  Just remember the value.
766         (decl_type_access_control): New fn.
767         (begin_function_definition): Use deferred_type_access_control, after
768         we've started the function.  Set type_lookups to error_mark_node.
769         * parse.y (frob_specs, fn.def1): Adjust.
770         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
771         (parse_end_decl, parse_bitfield0, parse_method): New fns.
772         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
773         (after_type_component_declarator0): Likewise.
774         (after_type_component_declarator): Likewise.
775         (notype_component_declarator): Likewise.
776         * cp-tree.h: Adjust.
777
778         * decl.c (redeclaration_error_message): Allow redeclaration of 
779         namespace-scope decls.
780
781 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
782
783         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
784
785 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
786
787         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
788         * decl2.c (grokclassfn): Likewise.
789
790         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
791
792         * decl2.c (lang_decode_option): Don't set default message length
793         here.
794         * lex.c (lang_init_options): Set it here.
795
796 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
797
798         Make DECL_CONTEXT mean the class in which a member function was
799         declared, even for a virtual function.
800         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
801         (DECL_FRIEND_CONTEXT): New macro.
802         (DECL_REAL_CONTEXT): Remove.
803         (SET_DECL_FRIEND_CONTEXT): Likewise.
804         (DECL_VIRTUAL_CONTEXT): Adjust.
805         (DECL_CLASS_SCOPE_P): Use TYPE_P.
806         (add_friends): Remove.
807         (hack_decl_function_context): Likewise.
808         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
809         CP_DECL_CONTEXT.
810         (build_over_call): Fix indentation.  Use DECL_CONTEXT
811         instead of DECL_CLASS_CONTEXT.
812         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
813         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
814         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
815         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
816         (build_base_field): Likewise.
817         (finish_struct_1): Likewise.
818         (build_self_reference): Likewise.
819         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
820         DECL_REAL_CONTEXT.
821         (pushtag): Use decl_function_context, not
822         hack_decl_function_context.
823         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
824         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
825         (pushdecl): Remove bogus code.
826         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
827         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
828         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
829         Use decl_function_context, nothack_decl_function_context.
830         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
831         (grokdeclarator): Likewise.  Use decl_function_context, not
832         hack_decl_function_context.
833         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
834         (start_function): Use DECL_FRIEND_CONTEXT, not
835         DECL_CLASS_CONTEXT.  Use decl_function_context, not
836         hack_decl_function_context.
837         (finish_function): Use decl_function_context, not
838         hack_decl_function_context.
839         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
840         DECL_CLASS_CONTEXT.
841         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
842         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
843         (grokfield): Likewise.
844         (finish_builtin_type): Likewise.
845         (finish_vtable_vardec): Use decl_function_context, not
846         hack_decl_function_context.
847         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
848         (start_static_initialization_or_destruction): Likewise.
849         (finish_static_initialization_or_destruction): Likewise.
850         (mark_used): Adjust logic for deciding when to synthesize methods.
851         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
852         DECL_REAL_CONTEXT.
853         * error.c (dump_function_decl): Use DECL_CONTEXT, not
854         DECL_CLASS_CONTEXT.
855         * friend.c (is_friend): Likewise.
856         (add_friends): Remove.
857         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
858         * lex.c (begin_definition_of_inclass_inline): Use
859         decl_function_context, not hack_decl_function_context.
860         (process_next_inline): Likewise.
861         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
862         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
863         DECL_CLASSS_CONTEXT.
864         (hack_identifier): Likewise.
865         (synthesize_method):  Use decl_function_context, not
866         hack_decl_function_context.
867         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
868         DECL_REAL_CONTEXT.
869         (is_member_template): Use decl_function_context, not
870         hack_decl_function_context.  Use DECL_CONTEXT, not
871         DECL_CLASS_CONTEXT.
872         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not 
873         DECL_CLASS_CONTEXT.
874         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
875         DECL_REAL_CONTEXT.
876         (push_template_decl_real): Likewise.
877         (instantiate_class_template): Don't call add_friends.
878         (tsubst_default_argument): Use DECL_CONTEXT, not
879         DECL_REAL_CONTEXT.
880         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
881         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
882         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
883         DECL_CLASS_CONTEXT.
884         * repo.c (repo_inline_used): Likewise.
885         * search.c (current_scope): Adjust for new _CONTEXT macros.
886         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
887         DECL_REAL_CONTEXT.
888         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
889         (lookup_fnfields_here):Likewise.
890         (check_final_overrider): Likewise.
891         (init_vbase_pointers): Likewise.
892         (virtual_context): Likewise.
893         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
894         (expand_body): Use decl_function_context, not
895         hack_decl_function_context.
896         * tree.c (hack_decl_function_context): Remove.
897         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
898         DECL_CLASS_CONTEXT.
899         * typeck2.c (error_not_base_type): Likewise.
900         
901 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
902
903         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
904
905 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
906
907         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
908
909 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
910
911         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
912
913 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
914
915         * decl2.c (lang_decode_option): Enable automatic line wrapping.
916
917 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
918
919         * parse.y (frob_specs): Split out...
920         (parse_decl): From here.
921         (fn.def2): Call initial_deferred_type_access_control.
922         (after_type_component_declarator0): Call frob_specs.
923         (notype_component_declarator0): Likewise.
924         * search.c (friend_accessible_p): Nested classes are friends of their
925         enclosing classes.
926
927 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
928
929         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
930         used to create an implicit temporary.
931
932         * class.c (dfs_modify_vtables): Tweak calculation of functions to
933         override.
934
935 2000-02-08  Nathan Sidwell  <nathan@acm.org>
936
937         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
938         strip array element qualifiers too.
939
940 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
941
942         * decl.c (store_parm_decls): Don't build cleanups for parameters
943         while processing_template_decl.
944
945 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
946
947         * cp-tree.h (struct saved_scope): Add incomplete field.
948         (namespace_scope_incomplete): New macro.
949         * decl.c (pushdecl): Use it.
950         (hack_incomplete_structures): Use it.  See through artificial
951         binding levels.
952         (mark_saved_scope): Mark it.
953
954         Implement access control for nested types.
955         * search.c (type_access_control): New fn.
956         (accessible_p): Now we do perform access control for types.
957         * semantics.c (deferred_type_access_control): New fn.
958         (initial_deferred_type_access_control): New fn.
959         (begin_function_definition): Call it.  Add lookups parm.
960         * decl.c (struct binding_level): Add this_class field.
961         (pushlevel_class): Set it.
962         (mark_binding_level): Mark it.
963         (lookup_name_real): Use it.  Call type_access_control.
964         (mark_saved_scope): Mark lookups field.
965         * cp-tree.h (flagged_type_tree): Add lookups field.
966         (struct saved_scope): Add lookups field.
967         (type_lookups): New macro.
968         * parse.y (declmods): Now <ftype>.
969         (parse_decl): Add lookups parm.  Call 
970         initial_deferred_type_access_control.
971         (lang_extdef): Clear type_lookups.
972         (typed_declspecs, declmods, typespec): Set lookups field.
973         (initdcl): Call deferred_type_access_control.
974         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
975         component_decl_1, named_parm): Adjust.
976         * friend.c (is_friend): Nested classes are friends of their
977         enclosing classes.
978
979         * class.c (currently_open_derived_class): New fn.
980         * method.c (hack_identifier): Use it.
981
982         * lex.c (do_identifier): Remove obsolete code.
983
984         * parse.y (typed_typespecs): Propagate new_type_flag properly.
985
986 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
987
988         * tinfo.h: Remove apostrophes from C++ comment (xgettext
989         thinks this file is plain C).
990
991 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
992
993         * Makefile.in (call.o): Depend on $(EXPR_H).
994
995         * call.c: Include "expr.h".
996
997         * class.c (dump_class_hierarchy): Add prototype.
998
999         * search.c (dfs_get_pure_virtuals): Likewise.
1000
1001 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
1002
1003         * parse.y (simple_stmt): Allow :: token in asm parameter list.
1004         * parse.c: Rebuilt.
1005
1006 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
1007
1008         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
1009         Store it in DECL_FCONTEXT.
1010         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
1011
1012 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
1013
1014         * tinfo.h (old abi): #include "tconfig.h".
1015         * tinfo.cc (convert_to_base): Move into old abi section.
1016
1017 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
1018
1019         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
1020         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
1021         (BINFO_PRIMARY_BINFO): New macro.
1022         (BF_DELTA): Rename to ...
1023         (BV_DELTA): ... this.
1024         (BF_VCALL_INDEX): Rename to ...
1025         (BV_VCALL_INDEX): ... this.
1026         (BF_FN): Rename to ...
1027         (BV_FN): ... this.
1028         * class.c (build_vbase_path): Adjust for changes to reverse_path.
1029         (set_rtti_entry): Rename BF_ macros to BV_ variants.
1030         (modify_vtable_entry): Simplify.
1031         (add_virtual_function): Rename BF_ macros to BV_ variants.
1032         (build_vtable_initializer): Likewise.
1033         (get_class_offset_1): Remove.
1034         (dfs_get_class_offset): Likewise.
1035         (get_class_offset): Likewise.
1036         (dfs_find_final_overrider): New function.
1037         (find_final_overrider): Likewise.
1038         (modify_one_vtable): Remove.
1039         (dfs_find_base): New function.
1040         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
1041         find_final_overrider.
1042         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
1043         virtuals.
1044         (dfs_fixup_vtable_deltas): Remove.
1045         (override_one_vtable): Remove.
1046         (merge_overrides): Likewise.
1047         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
1048         unreal chilren of virtual bases.
1049         (finish_struct_1): Don't use merge_overrides.  Don't use
1050         dfs_fixup_vtable_deltas.
1051         * tree.c (reverse_path): Return a TREE_LIST, not a chain of 
1052         BINFOs.
1053         
1054 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
1055             Jason Merrill  <jason@yorick.cygnus.com>
1056
1057         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
1058
1059 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
1060
1061         * exception.cc (__throw_bad_typeid): Add missing std::.
1062
1063 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1064
1065         * cp-tree.h (make_thunk): PROTO -> PARAMS.
1066
1067 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
1068
1069         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
1070
1071         Runtime support for new-abi rtti.
1072         * inc/typeinfo (type_info::operator!=): Define in class.
1073         (type_info::before, type_info::name, type_info::operator==,
1074         type_info::operator!=): Define new ABI implementations.
1075         (type_info::is_pointer_p, type_info::is_function_p): Declare
1076         new virtual functions.
1077         (type_info::do_catch, type_info::do_upcast): Likewise.
1078         
1079         * tinfo.h (__base_class_info): Define new class.
1080         (__class_type_info): Likewise.
1081         (__si_class_type_info): Likewise.
1082         (__vmi_class_type_info): Likewise.
1083         (__dynamic_cast): Prototype.
1084         
1085         * tinfo.cc: Conditionalize old and new rtti mechanisms.
1086         (type_info::is_pointer_p): Define new function.
1087         (type_info::is_function_p): Likewise.
1088         (type_info::do_catch): Likewise.
1089         (type_info::do_upcast): Likewise.
1090         (vtable_prefix): New structure for vtable access.
1091         (adjust_pointer): Define new template function.
1092         (contained_p, public_p, virtual_p, contained_public_p,
1093         contained_nonpublic_p, contained_nonvirtual_p): Define new
1094         functions.
1095         (nonvirtual_base_type): New local variable.
1096         (__class_type_info::~__class_type_info): Define.
1097         (__si_class_type_info::~__si_class_type_info): Likewise.
1098         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
1099         (__class_type_info::do_catch): Define new function.
1100         (__class_type_info::do_upcast): Likewise.
1101         (__class_type_info::find_public_src): Likewise.
1102         (__class_type_info::do_find_public_src): Likewise.
1103         (__si_class_type_info::do_find_public_src): Likewise.
1104         (__vmi_class_type_info::do_find_public_src): Likewise.
1105         (__class_type_info::do_dyncast): Likewise.
1106         (__si_class_type_info::do_dyncast): Likewise.
1107         (__vmi_class_type_info::do_dyncast): Likewise.
1108         (__class_type_info::do_upcast): Likewise.
1109         (__si_class_type_info::do_upcast): Likewise.
1110         (__vmi_class_type_info::do_upcast): Likewise.
1111         (__dynamic_cast): Likewise.
1112         
1113         * tinfo2.cc (__fundamental_type_info): Define new class.
1114         (__pointer_type_info): Likewise.
1115         (__reference_type_info): Likewise.
1116         (__array_type_info): Likewise.
1117         (__function_type_info): Likewise.
1118         (__enum_type_info): Likewise.
1119         (__ptr_to_member_type_info): Likewise.
1120         (__fundamental_type_info::~__fundamental_type_info): Define.
1121         (__pointer_type_info::~__pointer_type_info): Likewise.
1122         (__reference_type_info::~__reference_type_info): Likewise.
1123         (__array_type_info::~__array_type_info): Likewise.
1124         (__function_type_info::~__function_type_info): Likewise.
1125         (__enum_type_info::~__enum_type_info): Likewise.
1126         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
1127         (__pointer_type_info::do_catch): Define new function.
1128         (__ptr_to_member_type_info::do_catch): Define new function.
1129         
1130         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
1131         (__is_pointer): Likewise.
1132
1133         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
1134
1135 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
1136
1137         * cp/class.c (build_vtable): Rename to build_primary_vtable.
1138         (prepare_fresh_vtable): Rename to build_secondary_vtable.
1139         (make_new_vtable): New function.
1140         (modify_vtable_entry): Handle generation of new vtables correctly.
1141         (modify_one_vtable): Remove unused parameter.
1142         (dfs_fixup_vtable_deltas): Likewise.
1143         (override_one_vtable): Use build_secondary_vtable.
1144         (finish_struct_1): Use build_primary_vtable and
1145         build_secondary_vtable.
1146         
1147 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
1148
1149         * cp/decl.c: Adjust variable names, comments, help strings.
1150
1151 2000-01-29  Nathan Sidwell  <nathan@acm.org>
1152
1153         * new2.cc (operator delete[]): Use operator delete, don't assume
1154         implementation.
1155
1156 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
1157
1158         * class.c (build_vtbl_initializer): Add argument to
1159         build_vtable_entry call.
1160
1161 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
1162
1163         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
1164         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
1165         (BF_DELTA): New macro.
1166         (BF_VCALL_INDEX): Likewise.
1167         (BF_FN): Likewise.
1168         (THUNK_VCALL_OFFSET): Likewise.
1169         (make_thunk): Change prototype.
1170         * class.c (build_vtable_entry): Integrate
1171         build_vtable_entry_for_fn.  Handle vcall indices.
1172         (build_vtable_entry_for_fn): Remove.
1173         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
1174         BF_VCALL_INDEX, BF_FN.
1175         (modify_vtable_entry): Integrate common code from
1176         modify_one_vtable and dfs_fixup_vtable_deltas.
1177         (add_virtual_function): Set BF_VCALL_INDEX.
1178         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
1179         and BF_FN.
1180         (modify_one_vtable): Simplify.
1181         (dfs_fixup_vtable_deltas): Likewise.
1182         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. 
1183         * method.c (make_thunk): Handle vcall indices.
1184         
1185 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
1186
1187         Compiler side new abi rtti (not enabled).
1188         * cp-tree.h (new_abi_rtti_p): New macro.
1189         (emit_support_tinfos): Prototype new function.
1190         (tinfo_decl_p): Likewise.
1191         (emit_tinfo_decl): Likwise.
1192         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
1193         macros.
1194         (doing_runtime): New local static.
1195         (init_rtti_processing): Add new-abi initializer.
1196         (get_tinfo_decl): Add new-abi logic.
1197         (tinfo_from_decl): Likewise.
1198         (build_dynamic_cast_1): Likewise.
1199         (qualifier_flags): New static function.
1200         (tinfo_base_init): Likewise.
1201         (generic_initializer): Likewise.
1202         (ptr_ref_initializer): Likewise.
1203         (ptmd_initializer): Likewise.
1204         (class_hint_flags): Likewise.
1205         (class_initializer): Likewise.
1206         (synthesize_tinfo_var): Likewise.
1207         (create_real_tinfo_var): Likewise.
1208         (create_pseudo_type_info): Likewise.
1209         (get_vmi_pseudo_type_info): Likewise.
1210         (create_tinfo_types): Likewise.
1211         (emit_support_tinfos): New global function.
1212         (tinfo_decl_p): New global predicate.
1213         (emit_tinfo_decl): New global function.
1214         * class.c (set_rtti_entry): Generalize for old and new rtti.
1215         (build_vtbl_initializer): Likewise.
1216         * decl2.c (finish_file): Likewise.
1217
1218 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
1219
1220         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
1221         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
1222
1223 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
1224
1225         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
1226         for scopes.
1227
1228 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
1229
1230         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
1231
1232 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
1233
1234         * optimize.c (calls_setjmp_r): Supply new argument
1235         to special_function_p.
1236
1237 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1238
1239         * call.c: PROTO -> PARAMS.
1240         * class.c: Likewise.
1241         * cp-tree.h: Likewise.
1242         * cvt.c: Likewise.
1243         * decl.c: Likewise.
1244         * decl.h: Likewise.
1245         * decl2.c: Likewise.
1246         * dump.c: Likewise.
1247         * errfn.c: Likewise.
1248         * error.c: Likewise.
1249         * except.c: Likewise.
1250         * expr.c: Likewise.
1251         * init.c: Likewise.
1252         * input.c: Likewise.
1253         * lex.c: Likewise.
1254         * lex.h: Likewise.
1255         * method.c: Likewise.
1256         * optimize.c: Likewise.
1257         * parse.y: Likewise.
1258         * pt.c: Likewise.
1259         * repo.c: Likewise.
1260         * rtti.c: Likewise.
1261         * search.c: Likewise.
1262         * semantics.c: Likewise.
1263         * spew.c: Likewise.
1264         * tree.c: Likewise.
1265         * typeck.c: Likewise.
1266         * typeck2.c: Likewise.
1267         * xref.c: Likewise.
1268
1269 2000-01-25  Richard Henderson  <rth@cygnus.com>
1270
1271         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
1272
1273 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
1274
1275         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
1276         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
1277         (struct vcall_offset_data_s): New type.
1278         (dfs_vcall_offset_queue_p): New function.
1279         (dfs_build_vcall_offset_vtbl_entries): Likewise.
1280         (build_vcall_offset_vtbl_entries): Likewise.
1281         (layout_vtable_decl): Likewise.
1282         (num_vfun_entries): Likewise.
1283         (num_extra_vtbl_entries): Add the entries for vcall offsets.
1284         (build_vtbl_initializer): Likewise.
1285         (dfs_finish_vtabls): Use layout_vtable_decl.
1286         (modify_one_vtables): Always duplicate vtables under the new ABI.
1287         (finish_struct_1): Use layout_vtable_decl.
1288         
1289 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1290
1291         * decl.c (member_function_or_else): Change third arg from a format
1292         specifier to an `enum overload_flags'.  Callers changed.
1293
1294 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
1295
1296         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
1297         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
1298         build_const_cast, get_delta_difference, check_return_expr): Avoid
1299         ANSI string concatenation usage.  
1300
1301 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
1302
1303         * class.c (layout_class_type): Put the fields required to make a
1304         class non-empty at the end, not the beginning, of the TYPE_FIELDs
1305         list.
1306
1307 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
1308
1309         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
1310         template.
1311
1312         * decl2.c (mark_used): Do instantiate inlines that have been
1313         explicitly instantiated.
1314
1315 2000-01-24  Richard Henderson  <rth@cygnus.com>
1316
1317         * call.c (build_over_call): Use expand_tree_builtin.
1318         * typeck.c (build_function_call_real): Likewise.
1319         (build_binary_op_nodefault): Handle unordered compares.
1320
1321 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
1322
1323         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
1324         cp_tree_index values.
1325         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
1326         New global node #defines for them.
1327         * rtti.c (call_void_fn): Replace with ...
1328         (build_runtime_decl): ... new static function.
1329         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
1330         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
1331         (build_dynamic_cast_1): Always produce correctly typed result.
1332         Explicitly produce type_info addresses. Use dynamic_cast_node.
1333         * exception.cc (__throw_bad_cast): Return `void *'.
1334         (__throw_bad_typeid): Return `const type_info &'.
1335
1336 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
1337
1338         * cp-tree.h (get_vtable_decl): Prototype new function.
1339         * class.c (get_vtable_decl): New function. Broken out from ...
1340         (build_vtable): ... here. Use it.
1341         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
1342         by get_vtable_decl.
1343
1344 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
1345
1346         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
1347         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
1348         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
1349         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
1350         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
1351         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
1352         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
1353         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
1354         (CPTI_TINFO_VAR_ID): New enumeration.
1355         (__tp_desc_type_node, __access_mode_type_node,
1356         __bltn_desc_type_node, __user_desc_type_node,
1357         __class_desc_type_node, __ptr_desc_type_node,
1358         __attr_desc_type_node, __func_desc_type_node,
1359         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
1360         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
1361         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
1362         enum_desc_type_node, class_desc_type_node,
1363         si_class_desc_type_node, vmi_class_desc_type_node,
1364         ptmd_desc_type_node, base_desc_type_node): New #defines.
1365         (tinfo_fn_id, tinfo_fn_type): Rename to ...
1366         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
1367         (tinfo_var_id): New enumeration.
1368         (DECL_TINFO_FN_P): Augment comment.
1369         * decl.c (cp_global_trees): Adjust documentation.
1370         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
1371         tinfo_decl_type and tinfo_var_id.
1372         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
1373         (build_typeid): Remove unused variable.
1374         (get_tinfo_var): Use tinfo_var_id.
1375         (tinfo_name): New static function.
1376         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
1377         (tinfo_from_decl): Likewise.
1378         (get_base_offset): New static function, broken out of
1379         expand_class_desc.
1380         (expand_si_desc): Use tinfo_name.
1381         (expand_class_desc): Likewise. Lose local static variable.
1382         Use base_desc_type_node. Use get_base_offset.
1383         (expand_ptr_desc): Use tinfo_name.
1384         (expand_attr_desc): Likewise.
1385         (expand_generic_desc): Likewise.
1386
1387         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
1388         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
1389
1390 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
1391
1392         * cp-tree.h (__eprintf): Remove declaration.
1393         * tree.c (__eprintf): Remove definition.
1394
1395 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
1396             Mark Mitchell  <mark@codesourcery.com>
1397
1398         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
1399         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
1400
1401 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
1402
1403         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
1404
1405 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
1406
1407         * cp-tree.h (register_dtor_fn): New function.
1408         * decl.c (destroy_local_static): Rename to ...
1409         (register_dtor_fn): ... this.  Give it external linkage.
1410         (expand_static_init): Use it.
1411         * decl2.c (do_static_initialization): Likewise, if using
1412         __cxa_atexit.
1413         (do_static_destruction): Check that __cxa_atexit is not in use.
1414         (finish_file): Don't call do_static_destruction if using
1415         __cxa_atexit.
1416
1417         * typeck.c (convert_arguments): Restore two-message error
1418         reporting.
1419         
1420 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
1421
1422         Remap dynamic cast hint values to be consistent across ABIs.
1423         * search.c (dynamic_cast_base_recurse): Remap generated value.
1424         (get_dynamic_cast_base_type): Adjust documentation.
1425         * tinfo.h (__user_type_info::dyncast): Likewise.
1426         (__user_type_info::find_public_subobj): Remap BOFF meaning.
1427         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
1428         (__class_type_info::do_dyncast): Likewise.
1429         (__class_type_info::do_find_public_subobj): Likewise.
1430         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.     
1431
1432 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
1433
1434         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
1435
1436         * typeck2.c (incomplete_type_error): Restore previous
1437         cp_error and cp_error_at call sequence.
1438         
1439 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
1440
1441         * class.c (dump_class_hierarchy): Make format agree with argument;
1442         cast pointer to unsigned long and print with %lx.
1443         
1444 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
1445
1446         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
1447         
1448         * typeck.c (composite_pointer_type, common_type,
1449         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
1450         build_function_call_real, convert_arguments,
1451         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
1452         build_unary_op, mark_addressable, build_compound_expr,
1453         build_static_cast, build_reinterpret_cast, build_const_cast,
1454         build_c_cast, build_modify_expr, get_delta_difference,
1455         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with 
1456         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
1457         into a single one.
1458         * typeck2.c (readonly_error, abstract_virtuals_error,
1459         process_init_constructor, check_for_new_type): Likewise.
1460
1461 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
1462
1463         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
1464         VAR_DECLs.
1465
1466 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
1467
1468         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
1469         (build_x_typeid): Likewise.
1470         (get_tinfo_fn): Likewise.
1471         (get_tinfo_fn_unused): Rename to ...
1472         (get_tinfo_decl): ... here.
1473         * rtti.c (build_headof): Replace logic error with assertion.
1474         (get_tinfo_fn_dynamic): Rename to ...
1475         (get_tinfo_decl_dynamic): ... here. Make static. Use
1476         complete_type_or_else.
1477         (build_x_typeid): Move into ...
1478         (build_typeid): ... here. Adjust call to
1479         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
1480         throw_bad_typeid expression.
1481         (get_tinfo_fn_unused): Rename to ...
1482         (get_tinfo_decl): ... here. Adjust comment.
1483         (get_tinfo_fn): Delete.
1484         (tinfo_from_decl): New static function.
1485         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
1486         (get_typeid): Use complete_type_or_else.
1487         (build_dynamic_cast_1): Adjust calls to
1488         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
1489         * parse.y (primary): Adjust call to build_typeid.
1490         * except.c (build_eh_type_type_ref): Adjust call to
1491         get_tinfo_decl. Mark as used.
1492         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
1493         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
1494         * parse.c: Regenerated.
1495
1496 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
1497
1498         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
1499         calling convention.
1500         (resolves_to_fixed_type_p): Document calling convention.
1501         * rtti.c (build_x_typeid): Initialize NONNULL.
1502
1503         * cp-tree.h (build_shared_int_cst): New function.
1504         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
1505         * class.c (modify_vtable_entry): Likewise.
1506         (add_virtual_function): Split out code to generated shared
1507         INTEGER_CSTs to build_share_int_cst.
1508         (modify_all_vtables): Handle all the overridden functions here.
1509         Add overridden functions from non-primary virtual bases to the
1510         primary vtable.
1511         (finish_struct_1): Adjust call to modify_all_vtables.  Add
1512         overridden functions from non-primary bases to the vtable.
1513         * tree.c (build_shared_int_cst): New function.
1514         
1515         * cp-tree.h (scratchalloc): Remove.
1516         (build_scratch_list): Likewise.
1517         * call.c (convert_class_to_reference): Replace build_scratch_list
1518         and build_expr_list with build_tree_list.
1519         (add_candidate): Replace scratchalloc with expralloc.  Note memory
1520         leak.
1521         (build_user_type_conversion_1):  Replace build_scratch_list
1522         and build_expr_list with build_tree_list.
1523         (build_new_op): Likewise.
1524         (build_op_delete_call): Likewise.
1525         (convert_like): Likewise.
1526         * cvt.c (ocp_convert): Likewise.
1527         * decl.c (start_decl): Likewise.
1528         (start_function): Likewise.
1529         (finish_destructor_body): Likewise.
1530         (maybe_build_cleanup_1): Likewise.
1531         * decl2.c (reparse_decl_as_expr): Likewise.
1532         * init.c (perform_member_init): Likewise.
1533         (expand_cleanup_for_base): Likewise.
1534         (build_builtin_delete_call): Likewise.
1535         (build_new_1): Likewise.
1536         (build_delete): Likewise.
1537         * method.c (do_build_assign_ref): Likewise.
1538         * parse.y (already_scoped_stmt): Likewise.
1539         (nontrivial_exprlist): Likewise.
1540         (net_initializer): Likewise.
1541         (initlist): Likewise.
1542         * parse.c: Regenerated.
1543         * rtti.c (build_x_typeid): Likewise.
1544         (build_dynamic_cast_1): Likewise.
1545         * typeck.c (build_x_compound_expr): Likewise.
1546         (build_static_cast): Likewise.
1547         (build_modify_expr): Likewise.
1548         
1549         * cp-tree.h (DECL_VINDEX): Add documentation.
1550         * class.c (build_vtable_entry): Likewise.
1551         (start_vtable): Add comment.
1552         (add_virtual_function): Replace pending_hard_virtuals with
1553         overridden_virtuals and pending_virtuals with new_virtuals.
1554         Replace redundant assignments with assertions.
1555         (check_for_override): Add comment.
1556         (check_bases_and_members): Replace pending_hard_virtuals with
1557         overridden_virtuals and pending_virtuals with new_virtuals.
1558         (create_vtbl_ptr): Likewise.
1559         (layout_class_type): Likewise.
1560         (finish_struct_1): Likewise.  Add comments.
1561         
1562 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
1563
1564         * class.c (finish_struct_1): Replace redundant code with
1565         assertions.
1566
1567         * cp-tree.h (flag_new_abi): Move.
1568         (flag_use_cxa_atexit): Likewise.
1569         (flag_honor_std): Likewise.
1570         (flag_rtti): Likewise.
1571         (vbase_offsets_in_vtable_p): Define.
1572         (vptrs_present_everywhere_p): Likewise.
1573         (TYPE_CONTAINS_VPTR_P): Likewise.
1574         (dfs_walk_real): Declare.
1575         * class.c (build_vbase_pointer_fields): Check
1576         vbase_offsets_in_vtable_p.
1577         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
1578         BINFO_VPTR_FIELD.
1579         (build_vbase_offset_vtbl_entries): Simplify.
1580         (build_vbase_offset_vtbl_entries): Adjust.
1581         (build_vbase_pointer): Add ability to look up vbase offsets in
1582         vtable. 
1583         (start_vtable): New function.
1584         (add_virtual_function): Use it.
1585         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
1586         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
1587         (build_vtbl_initializer): Take the type of the complete object as
1588         input.  Use it to correctly calculate vbase offsets.
1589         (dfs_finish_vtbls): Pass the complete type to
1590         build_vtbl_initializer.
1591         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
1592         (create_vtable_ptr): Create a vtable even if there are no
1593         new virtual functions, under the new ABI.
1594         (finish_struct_1): Likewise.
1595         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
1596         * decl.c (exapnd_static_init): Remove call to
1597         preserve_initializer.
1598         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
1599         vtables.
1600         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
1601         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
1602         (construct_virtual_bases): Don't initialize virtual base pointers
1603         under the new ABI.
1604         (build_aggr_init): Clean up comment.
1605         (expand_aggr_init_1): Likewise.
1606         * rtti.c (expand_class_desc): Store the virtual function table
1607         index where the vbase offset lives in the offset field.
1608         * search.c (dfs_walk_real): Make it global.
1609         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
1610         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
1611         
1612         * tinfo.h (USItype): Make it signed under the new ABI.
1613         * tinfo.cc (convert_to_base): New function.  Encapsulate base
1614         conversion logic here.
1615         (__class_type_info::do_upcast): Use it.
1616         (__class_type_info::do_dyncast): Likewise.
1617         (__class_type_info::do_find_public_subobj): Likewise.
1618         
1619         * init.c (construct_virtual_bases): Don't look up the addresses of
1620         virtual bases at run-time.
1621
1622         * class.c (build_vbase_pointer): Relocate.
1623         (build_vbase_pointer_fields): Likewise.
1624         (dfs_build_vbase_offset_vtbl_entries): Likewise.
1625         (build_vbase_offset_vtbl_entries): Likewise.
1626
1627         * decl.c (init_decl_processing): Complain if -fnew-abi
1628         -fno-vtable-thunks is used.
1629
1630         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
1631         flag_new_abi.
1632
1633 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
1634
1635         * cp-tree.h (num_extra_vtbl_entries): New function.
1636         (size_extra_vtbl_entries): Likewise.
1637         (dfs_vtable_path_unmark): Likewise.
1638         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
1639         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
1640         * class.c (num_extra_vtbl_entries): New function.
1641         (size_extra_vtbl_entries): Likewise.
1642         (dfs_build_vbase_offset_vtbl_entries): New function.
1643         (build_vbase_offset_vtbl_entries): Likewise.
1644         (build_vtbl_initializer): Use it.
1645         (finish_struct_1): Adjust vtable sizes (using
1646         num_extra_vtbl_entries).
1647         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
1648         THUNK_DECL is non-NULL before expanding it.
1649         * init.c (expand_virtual_init): Adjust the vtable pointer by
1650         size_extra_vtbl_entries before storing it.
1651         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
1652         Handle TREE_LIST parameters here, not in the dfs_* functions.
1653         (dfs_unmarked_real_bases_queue_p): Adjust.
1654         (dfs_marked_real_bases_queue_p): Likewise.
1655         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
1656         (dfs_vtable_path_marked_real_bases_queue_p): New function.
1657         (dfs_vtable_path_unmark): Likewise.
1658         
1659 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
1660
1661         * optimize.c (copy_body_r): Clear the operand three of a
1662         TARGET_EXPR when copying it.
1663
1664 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1665
1666         * method.c (build_decl_overload_real): Check whether we are in ::
1667         before returning __builtin_new/delete.
1668
1669 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
1670
1671         * pt.c (tsubst_friend_function): Improve comment.
1672         (instantiate_decl): Avoid crashing when a "nested" function is
1673         instantiated from the top level.
1674         
1675         * dump.c (dqeueue_and_dump): Dump
1676         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
1677
1678 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1679
1680         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
1681
1682 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
1683
1684         * g++spec.c (lang_specific_driver): Add -fnew-abi if
1685         ENABLE_NEW_GXX_ABI defined.
1686         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
1687         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
1688         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
1689
1690 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
1691
1692         * decl.c (start_cleanup_fn): Call pushdecl.
1693
1694         * call.c (convert_class_to_reference): Fix typos.
1695         (build_conditional_expr): Handle errors gracefully.
1696         * class.c (push_nested_class): Likewise.
1697         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
1698         (DECL_THIS_EXTERN): Use it.
1699         (DECL_THIS_STATIC): Likewise.
1700         * cvt.c (convert_to_void): Handle errors gracefully.
1701         (build_expr_type_conversion): Likewise.
1702         * decl.c (maybe_push_decl): Likewise.
1703         (start_decl_1): Likewise.
1704         (require_complete_types_for_parms): Likewise.
1705         * parse.y (structsp): Likewise.
1706         (base_class): Likewise.
1707         * parse.c: Regenerated.
1708         * pt.c (finish_member_template_decl): Likewise.
1709         * typeck.c (decay_conversion): Likewise.
1710         
1711         * cp-tree.h (dfs_skip_vbases): New function.
1712         (find_vbase_instance): Likewise.
1713         * class.c (determine_primary_base): Allow a nearly empty base to
1714         serve as a primary base class under the new ABI.
1715         (get_class_offset_1): Rename to ...
1716         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
1717         messages here.
1718         (get_class_offset): Use it.  Issue error messages here.
1719         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
1720         find the right copies of virtual bases.
1721         (fixup_vtable_deltas1): Rename to ...
1722         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
1723         bases as primary bases.
1724         (fixup_vtable_deltas): Remove.
1725         (override_one_vtable): Handle virtual bases as primary bases.
1726         (merge_overrides): Likewise.
1727         (finish_struct_1): Likewise.
1728         (dump_class_hierarchy): Dump primary-ness of bases as well.
1729         * search.c (mark_primary_bases): Use a pre-order traversal to
1730         handle primary virtual bases.
1731         (dfs_skip_vbases): New fiunction.
1732         (expand_upcast_fixups): Adjust to handle primary virtual bases.
1733         (fixup_virtual_upcast_offsets): Likewise.
1734         (fixup_all_virtual_upcast_offsets): Likewise.
1735         (dfs_find_vbase_instances): New function.
1736         (find_vbase_instance): Likewise.
1737         
1738 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
1739
1740         * lex.c (DIR_SEPARATOR): Delete macro.
1741
1742 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
1743  
1744        * decl2.c (lang_decode_option): Handle automatic line wrapping
1745        option.
1746         
1747 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
1748
1749         * friend.c (do_friend): Don't resolve scopes when processing
1750         template declarations, even if the qualifying scope doesn't
1751         involve template parameters.
1752
1753 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
1754
1755         * class.c (dfs_modify_vtables_queue_p): Remove.
1756         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
1757         and dfs_marked_real_bases_queue_p instead of
1758         dfs_modify_vtables_queue_p.
1759
1760         * class.c (build_vbase_path): Simplify.
1761         (dfs_propagate_binfo_offsets): New function.
1762         (propagate_binfo_offsets): Use it.
1763         (remove_base_field): Simplify.
1764         (dfs_set_offset_for_vbases): Remove.
1765         (dfs_set_offset_for_shared_vbases): New function.
1766         (dfs_set_offset_for_unshared_vbases): Likewise.
1767         (layout_virtual_bases): Use them.
1768         (layout_basetypes): Don't call propagate_binfo_offsets.
1769         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
1770         for the vbases.
1771         
1772         * class.c (build_base_field): New function, split out from ...
1773         (build_base_fields): ... here.  Use it.  Allocate primary bases
1774         first, under the new ABI.
1775         (get_vtable_entry): Remove.
1776         (remove_base_field): New function, split out from ...
1777         (remove_base_fields): ... here.  Adjust since primary bases come
1778         first under the new ABI.
1779         
1780         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
1781         (initialize_vtbl_ptrs): New function.
1782         (expand_indirect_vtbls_init): Change prototype.
1783         (convert_pointer_to_vbase): Declare.
1784         * init.c (expand_direct_vtbls_init): Remove.
1785         (dfs_initialize_vtbl_ptrs): New function.
1786         (initialize_vtbl_ptrs): Likewise.
1787         (emit_base_init): Use initialize_vtbl_ptrs.
1788         * search.c (convert_pointer_to_vbase): Make it global.
1789         (expand_indirect_vtbls_init): Remove vtable initialization code.
1790         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
1791         
1792         * class.c (dfs_finish_vtbls): New function.
1793         (finish_vtbls): Use it.
1794         (dump_class_hierarchy): New function.
1795         
1796         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
1797         (BINFO_VBASE_PRIMARY_P): New macro.
1798         (BINFO_VIRTUALS): Add to documentation.
1799         (SET_BINFO_PRIMARY_MARKED_P): Remove.
1800         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1801         (dfs_mark_primary_bases_queue_p): Likewise.
1802         (dfs_unmarked_real_bases_queue_p): New function.
1803         (dfs_marked_real_bases_queue_p): Likewise.
1804         * search.c (dfs_mark_primary_bases): Adjust.
1805         (mark_primary_bases): Likewise.
1806         (get_shared_vbase_if_not_primary): New function.
1807         (dfs_unmarked_real_bases_queue_p): Likewise.
1808         (dfs_marked_real_bases_queue_p): Likewise.
1809         (dfs_get_pure_virtuals): Simplify.
1810         (get_pure_virtuals): Likewise.
1811         
1812 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1813
1814         * lex.c: Include tm_p.h.
1815
1816 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
1817
1818         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
1819
1820 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
1821
1822         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
1823         * pt.c (instantiate_decl): Defer comdat templates that might not be
1824         needed.
1825         
1826         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
1827         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
1828         (finish_file): Likewise.
1829
1830         * decl2.c (import_export_class): Undo 12/14 change.
1831
1832         * error.c (dump_decl): operator new, not operatornew.
1833
1834         * class.c (field_decl_cmp): A nontype is "greater" than a type.
1835         * search.c (lookup_field_1): Look for the last field with the
1836         desired name.
1837
1838 2000-01-05  Nathan Sidwell  <nathan@acm.org>
1839
1840         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
1841         FUNCTION_DECL.
1842
1843 2000-01-05  Nathan Sidwell  <nathan@acm.org>
1844
1845         * typeck.c (build_static_cast): Don't strip target qualifiers
1846         when casting from a class.
1847
1848 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1849
1850         * class.c (warn_hidden): Initialize variable `fndecl'.
1851
1852 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
1853
1854         * decl.c (flag_isoc9x): New variable to be able to use code in
1855         c-common.c.  For now always zero.
1856
1857 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
1858
1859         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
1860         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
1861         or unshare_base_binfos for virtual bases here.
1862         * search.c (dfs_get_vbase_types): Do it here.
1863         (get_vbase_types): Adjust.
1864         
1865 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
1866
1867         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
1868         (BINFO_PRIMARY_MARKED_P): Use flag 5.
1869         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
1870         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1871         (unmark_primary_bases): Remove declaration.
1872         (unmarkedp): Declare.
1873         (dfs_vbase_unmark): Likewise.
1874         * class.c (determine_primary_base): Return immediately if there
1875         are no base classes.  Call mark_primary_bases here.
1876         (modify_all_direct_vtables): Remove.
1877         (modify_all_indirect_vtables): Remove.
1878         (dfs_modify_vtables_queue_p): New function.     
1879         (dfs_modify_vtables): New function.
1880         (modify_all_vtables): Use them.
1881         (build_base_fields): Build FIELD_DECLs for primary virtual base
1882         classes.
1883         (create_vtable_ptr): Don't call determine_primary_base here.
1884         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
1885         (dfs_set_offset_for_vbases): ... this.
1886         (layout_virtual_bases): Use it.
1887         (layout_class_type): Call determine_primary_base here.
1888         * search.c (unmarkedp): Make it global.
1889         (shared_marked_p): Simplify.
1890         (shared_unmarked_p): Likewise.
1891         (dfs_primary_bases_queue_p): Remove.
1892         (dfs_unmark_primary_bases): Likewise.
1893         (unmark_primary_bases): Likewise.
1894         (mark_primary_bases): Simplify.
1895         (get_pure_virtuals): Don't call mark_primary_bases here.
1896         (dfs_vbase_unmark): New function.
1897         (get_vbase_types): Simplify.
1898
1899         * class.c (struct base_info): Remove.
1900         (determine_primary_base): Take has_virtual_p rather than a
1901         base_info as input.  Don't calculate max_has_virtual.
1902         (finish_struct_bits): Remove max_has_virtual argument.
1903         (create_vtable_ptr): Remove max_has_virtual_p argument.
1904         (layout_virtual_bases): Remove max argument.
1905         (layout_basetypes): Likewise.
1906         (layout_class_type): Remove max_has_virtual_p argument.
1907         (finish_struct_1): Remove max_has_virtual.
1908
1909         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
1910         (layout_basetypes): Remove.
1911         * class.c (propagate_binfo_offsets): Moved here from tree.c.
1912         Update to handle primary virtual bases.
1913         (remove_base_fields): New function, split out from
1914         layout_basetypes.
1915         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
1916         (layout_virtual_bases): New function, split out from
1917         layout_basetypes.  Update to handle primary virtual bases.
1918         (layout_basetypes): Moved here from tree.c.  Use
1919         remove_base_fields and layout_virtual_bases.
1920         * search.c (dfs_mark_primary_bases_queue_p): New function.
1921         (mark_primary_bases): Use it.
1922         * tree.c (CEIL): Remove.
1923         (propagate_binfo_offsets): Remove.
1924         (layout_basetypes): Remove.
1925         
1926 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
1927
1928         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
1929         (BINFO_PRIMARY_MARKED_P): New macro.
1930         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
1931         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1932         (mark_primary_bases): New function.
1933         (unmark_primary_bases): Likewise.
1934         * search.c (get_abstract_virtuals_1): Remove.
1935         (dfs_mark_primary_bases): New function.
1936         (mark_primary_bases): Likewise.
1937         (dfs_unmark_primary_bases): Likewise.
1938         (unmark_primary_bases): Likewise.
1939         (dfs_get_pure_virtuals): Likewise.
1940         
1941 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
1942
1943         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
1944         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
1945         (modify_one_vtable): Adjust.
1946         (fixup_vtable_deltas1): Likewise.
1947         (override_one_vtable): Likewise.
1948         * search.c (get_abstract_virtuals_1): Likewise.
1949         (get_pure_virtuals): Likewise.
1950         (expand_upcast_fixups): Likewise.
1951         * tree.c (debug_binfo): Likewise.
1952         
1953         * class.c (build_vtable): Don't return a value.  Don't rebuild
1954         vtables for bases that have already been handled.
1955         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
1956         already been handled.
1957         (modify_one_vtable): Adjust accordingly.
1958         (fixup_vtable_deltas1): Likewise.
1959         (finish_struct_1): Likewise.
1960
1961 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1962
1963         * call.c (build_new_method_call): Also check destructors.
1964
1965 1999-12-31  Mark Mitchell  <mark@codesourcery.com>
1966
1967         * cp-tree.h (VF_NORMAL_VALUE): Remove.
1968         * class.c (struct base_info): Remove vfield, vfields, and rtti.
1969         (set_primary_base): New function, split out from ...
1970         (finish_base_struct): ... here.  Rename to ...
1971         (determine_primary_base): ... this.  Simplify.
1972         (create_vtable_ptr): Tweak accordingly.
1973         (finish_struct_1): Simplify.
1974         
1975         * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
1976         (CLASSTYPE_N_BASECLASSES): Likewise.
1977         (BINFO_FOR_VBASE): New macro.
1978         (get_vbase_types): Change prototype.
1979         * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
1980         (prepare_fresh_vtable): Likewise.
1981         (finish_vtbls): Likewise.
1982         (get_class_offset_1): Likewise.
1983         (modify_all_indirect_vtables): Likewise.
1984         (build_vbase_pointer_fields): Likewise.
1985         * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
1986         * init.c (sort_base_init): Use BINFO_FOR_VBASE.
1987         (expand_member_init): Likewise.
1988         * search.c (get_base_distance): Likewise.
1989         (lookup_field_queue_p): Likewise.
1990         (virtual_context): Likewise.
1991         (get_vbase_types): Don't return a value.  Set
1992         CLASSTYPE_VBASECLASSES here.
1993         * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
1994         
1995 1999-12-30  Mark Mitchell  <mark@codesourcery.com>
1996
1997         * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
1998
1999 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
2000
2001         * class.c (create_vtable_ptr): Put the vtable at the beginning of
2002         the class, not the end, in the new ABI.
2003         * tree.c (propagate_binfo_offsets): Do the right thing for the new
2004         ABI.
2005
2006 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
2007
2008         * cp-tree.h (lang_type): Add nearly_empty_p.  Adjust dummy.
2009         (CLASSTYPE_NEARLY_EMPTY_P): New macro.
2010         * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
2011         (check_field_decls): Likewise.
2012         (check_bases_and_members): Likewise.
2013
2014 1999-12-28  Mark Mitchell  <mark@codesourcery.com>
2015
2016         * cp-tree.h (do_inline_function_hair): Remove.
2017         * class.c (layout_class_type): New function, split out from
2018         finish_struct_1.
2019         (fixup_pending_inline): Likewise.
2020         (fixup_inline_methods): New function.
2021         * method.c (fixup_pending_inline): Remove.
2022         (do_inline_function_hair): Likewise.
2023         
2024         * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
2025         new ABI.
2026         
2027         * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
2028         (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
2029         (CLASSTYPE_PURE_VIRTUALS): ... this.
2030         (lang_decl_flags): Replace abstract_virtual with pure_virtual.
2031         (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
2032         (DECL_PURE_VIRTUAL_P): ... this.
2033         (get_abstract_virtuals): Rename to ...
2034         (get_pure_virtuals): ... this.
2035         * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
2036         DECL_ABSTRACT_VIRTUAL_P.  Replace CLASSTYPE_ABSTRACT_VIRTUALS with
2037         CLASSTYPE_PURE_VIRTUALS.
2038         * class.c (build_vtable_entry): Likewise.
2039         (finish_struct_bits): Likewise.  Call get_pure_virtuals, not
2040         get_abstract_virtuals.
2041         (build_vtbl_initializer): Likewise.
2042         (override_one_vtable): Likewise.
2043         (check_methods): Likewise.
2044         * decl.c (duplicate_decls): Likewise.
2045         (redeclaration_error_message): Likewise.
2046         (lang_mark_tree): Likewise.
2047         * decl2.c (grok_function_init): Likewise.
2048         (import_export_vtable): Likewise.
2049         (import_expor_class): Likewise.
2050         * typeck2.c (abstract_virtuals_error): Likewise.
2051         * xref.c (GNU_xref_member): Likewise.
2052         * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
2053         
2054 1999-12-26  Zack Weinberg  <zack@wolery.cumb.org>
2055
2056         * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
2057         throughout.
2058
2059 1999-12-26  Mark Mitchell  <mark@codesourcery.com>
2060
2061         * decl.c (store_return_init): Use mode of old RTL generated for
2062         DECL_RESULT, not the mode of DECL_RESULT itself.
2063         * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
2064         for functions that used named return values.
2065         
2066 1999-12-24  Mark Mitchell  <mark@codesourcery.com>
2067
2068         * semantics.c (expand_body): Use
2069         note_deferral_of_defined_inline_function.
2070
2071 1999-12-22  Mark Mitchell  <mark@codesourcery.com>
2072
2073         * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
2074
2075 1999-12-22  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
2076
2077         * error.c (dump_decl): Support named return values.
2078
2079 1999-12-20  Mark Mitchell  <mark@codesourcery.com>
2080
2081         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
2082         (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
2083         (CLASSTYPE_PRIMARY_BINFO): Likewise.
2084         * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
2085         TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
2086         (check_bases_and_members): Set them here instead.
2087         (create_vtable_ptr): New function, split out from ...
2088         (finish_struct_1): ... here.  Use it.  Tidy.  Use
2089         CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
2090         * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
2091         the first field in the class.
2092         * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES.  Handle
2093         seeing TYPE_VFIELD as the first field in the class.
2094         
2095         * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
2096         (TYPE_POLYMORPHIC_P): ... this.
2097         (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
2098         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
2099         (TREE_CALLS_NEW): Remove.
2100         (TREE_MANGLED): Likewise.
2101         * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
2102         and TYPE_POLYMORPHIC_P.
2103         * class.c (check_bases): Likewise.
2104         (finish_base_struct): Likewise.
2105         (finish_struct_bits): Likewise.
2106         (check_for_override): Likewise.
2107         (finish_struct_1): Likewise.
2108         (get_vfield_name): Likewise.
2109         * decl.c (xref_basetypes): Likewise.
2110         * decl2.c (import_export_class): Likewise.
2111         (import_export_decl): Likewise.
2112         * error.c (dump_function_decl): Likewise.
2113         * pt.c (instantiate_class_template): Likewise.
2114         * repo.c (repo_inline_used): Likewise.
2115         * rtti.c (build_headof): Likewise.
2116         (get_tinfo_fn_dynamic): Likewise.
2117         (build_x_typeid): Likewise.
2118         (get_tinfo_var): Likewise.
2119         (build_dynamic_cast_1): Likewise.
2120         (synthesize_tinfo_fn): Likewise.
2121         * search.c (lookup_field_1): Likewise.
2122         (dfs_debug_mark): Likewise.
2123         (maybe_suppress_debug_info): Likewise.
2124         * typeck.c (build_component_ref): Likewise.
2125         (build_component_addr): Likewise.
2126         * typeck2.c (process_init_constructor): Likewise.
2127         
2128 1999-12-20  Nathan Sidwell  <nathan@acm.org>
2129
2130         * typeck.c (strip_all_pointer_quals): New static function.
2131         (build_static_cast): Use it. Don't use at_least_as_qualified_p.
2132
2133 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
2134
2135         * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
2136         (dso_handle_node): New macro.
2137         (flag_use_cxa_atexit): New variable.
2138         (declare_global_var): New function.
2139         (start_anon_func): Remove declaration.
2140         (end_anon_func): Likewise.
2141         * decl.c (get_atexit_node): New function, split out from
2142         destroy_local_static.  Handle flag_use_cxa_atexit.
2143         (get_dso_handle_node): Likewise.
2144         (start_cleanup_fn): Renamed from start_anon_func.  Moved here from
2145         except.c.  Handle flag_use_cxa_atexit.
2146         (end_cleanup_fn): Renamed from end_anon_func.  Moved here from
2147         except.c.
2148         (declare_global_var): New variable.
2149         (destroy_local_static): Handle flag_use_cxa_atexit.
2150         * decl2.c (flag_use_cxa_atexit): New variable.
2151         (lang_f_options): Likewise.
2152         * except.c (start_anon_func): Remove.
2153         (end_anon_func): Liekwise.
2154         * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
2155         * rtti.c (get_tinfo_var): Use declare_global_var.
2156
2157 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
2158
2159         * class.c (check_field_decls): Don't return a value.
2160         (avoid_overlap): Moved here from tree.c.
2161         (build_base_fields): Likewise.
2162         (check_bases): New function, split out from finish_base_struct.
2163         (check_bases_and_members): New function, split out from 
2164         finish_struct_1.
2165         (struct base_info): Remove cant_have_default_ctor,
2166         cant_have_const_ctor, cant_have_asn_ref.
2167         (finish_base_struct): Split semantic analysis into check_bases.
2168         (finish_struct_methods): Fix bogus assertion.
2169         (check_field_decls): Call finish_struct_anon here.
2170         (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
2171         (finish_struct_1): Use check_bases_and_members.  Reorganize.
2172         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
2173         (build_base_fields): Don't declare.
2174         * tree.c (avoid_overlap): Remove.
2175         (build_base_fields): Likewise.
2176         
2177         * optimize.c (struct inline_data): Remove scope_stmt.
2178         (remap_block): Don't use insert_block_after_note.  Don't update
2179         scope_stmt.
2180         (expand_call_inline): Don't update scope_stmt.
2181         (optimize_function): Don't initialize scope_stmt.
2182         * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
2183         NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
2184
2185 1999-12-15  Mark Mitchell  <mark@codesourcery.com>
2186
2187         * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
2188         out of the class, rather than taking them as parameters.
2189         (build_vbase_pointer_fields): Move here from tree.c.
2190         (build_vtbl_or_vbase_field): New function.
2191         (check_methods): Likewise.
2192         (remove_zero_width_bitfields): Likewise.
2193         (add_virtual_function): Use tree_cons instead of temp_tree_cons.
2194         (delete_duplicate_fields_1): Tidy.  Don't delete duplicate
2195         USING_DECLs here.
2196         (finish_struct_methods): Handle the case where there are no
2197         methods here.
2198         (get_basefndecls): Use tree_cons instead of temp_tree_cons.
2199         (check_field_decls): Call delete_duplicate_fields here.
2200         (finish_struct_1): Tidy.  Use check_methods and
2201         remove_zero_width_bitfields.
2202         * cp-tree.h (build_vbase_pointer_fields): Remove.
2203         * decl.c (grokdeclarator): Use tree_cons instead of
2204         temp_tree_cons.
2205         * decl2.c (qualified_lookup_using_namespace): Use tree_cons
2206         instead of temp_tree_cons.
2207         * lex.c (cons_up_default_function): Remove dead code.
2208         * method.c (fixup_pending_inline): New function, split out from ...
2209         (do_inline_function_hair): ... here.
2210         * tree.c (build_vbase_pointer_fields): Remove.
2211         
2212 1999-12-15  Jason Merrill  <jason@casey.cygnus.com>
2213
2214         * tree.c (walk_tree): Walk operand subtrees in forward order.
2215         * optimize.c (expand_call_inline): Likewise.
2216         (optimize_function): Initialize id->scope_stmt to something useful.
2217         (remap_block): Assume id->scope_stmt has a useful value.
2218
2219 1999-12-15  Nathan Sidwell  <nathan@acm.org>
2220
2221         * typeck.c (build_c_cast): Expand warning message. Move pointer
2222         alignment warning to after the cast. Don't warn about pointer
2223         alignment when given a pointer to incomplete.
2224
2225 1999-12-15  Richard Henderson  <rth@cygnus.com>
2226
2227         * cp-tree.h (make_aggr_type): Declare.
2228         * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
2229         (make_aggr_type): New.
2230
2231         * decl.c (build_typename_type, init_decl_processing): Use it.
2232         (build_ptrmemfunc_type, xref_tag): Likewise.
2233         * except.c (call_eh_info): Likewise.
2234         * init.c (init_init_processing): Likewise.
2235         * pt.c (process_template_parm, lookup_template_class): Likewise.
2236         * rtti.c (expand_class_desc): Likewise.
2237         * semantics.c (begin_class_definition, finish_typeof): Likewise.
2238         * tree.c (copy_template_template_parm): Likewise.
2239
2240 1999-12-15  Jason Merrill  <jason@yorick.cygnus.com>
2241
2242         * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
2243         sizeof (struct tree_common).
2244
2245 1999-12-14  Jason Merrill  <jason@casey.cygnus.com>
2246
2247         * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
2248         outermost block to point to the inlined function decl.
2249
2250         * error.c (dump_decl): operator==, not operator ==.
2251         (op_to_string): Likewise.
2252
2253         * decl.c (compute_array_index_type): Handle null name.
2254
2255         * decl2.c (ambiguous_decl): Fix to match comment.
2256         (lookup_using_namespace): Adjust.
2257
2258         * decl2.c (import_export_class): Don't ignore dllimport.
2259
2260 1999-12-14  Mark Mitchell  <mark@codesourcery.com>
2261
2262         * class.c (check_field_decls): Split out from ...
2263         (finish_struct_1): ... here.  Use it.  Tidy.
2264
2265         * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
2266         * optimize.c (copy_body_r): Pass it.
2267         * tree.c (remap_save_expr): Clear walk_subtrees for an
2268         already-handled SAVE_EXPR.
2269         (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
2270
2271         * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
2272         * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
2273
2274         * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
2275
2276 1999-12-14  Mumit Khan  <khan@xraylith.wisc.edu>
2277
2278         * class.c (finish_base_struct): Allow multiple COM base classes
2279         as well as non-COM bases as long as it's not the leftmost.
2280
2281 1999-12-13  Mumit Khan  <khan@xraylith.wisc.edu>
2282
2283         * lex.c (saving_parse_to_obstack): New global.
2284         (reinit_parse_for_block): Use.
2285         (reinit_parse_for_expr): Use.
2286         (check_newline): Use.
2287
2288 1999-12-13  Mark Mitchell  <mark@codesourcery.com>
2289
2290         * optimize.c (initialize_inlined_parameters): Take FN to which the
2291         parameters belong as an argument.
2292         (expand_call_inline): Expand calls into the parameter
2293         initializations before pushing the function onto the list of
2294         functions we are presently expanding.
2295
2296 1999-12-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2297
2298         * class.c (get_vtable_name): Use a literal format string and
2299         VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
2300         (prepare_fresh_vtable): Likewise.
2301
2302         * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
2303         VTABLE_NAME_FORMAT.
2304
2305         * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
2306
2307         * init.c (build_vec_init): Initialize variable `try_body'.
2308
2309         * lex.c (yyerror): Don't call a variadic function with a
2310         non-literal format string.
2311
2312         * optimize.c (optimize_function): Call memset, not bzero.
2313
2314         * pt.c (for_each_template_parm_r): Add static prototype.
2315
2316 1999-12-09  Andreas Jaeger  <aj@suse.de>
2317
2318         * except.c (expand_throw): Add static attribute to match
2319         prototype.
2320
2321         * Makefile.in (semantics.o): Add dependency on output.h.
2322         * semantics.c: Include output.h for declaration of
2323         make_function_rtl.
2324
2325 1999-12-09  Mark Mitchell  <mark@codesourcery.com>
2326
2327         * decl.c (init_decl_processing): Reenable inlining on trees.
2328         (finish_function): Likewise.
2329         * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
2330         * semantics.c (simplify_aggr_init_exprs): New function.
2331         (expand_body): Use it.
2332         * tree.c (walk_tree): Special-case TARGET_EXPRs since they
2333         sometimes present the same sub-tree twice.
2334         
2335         * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
2336         `csl'.
2337
2338         * semantics.c (finish_switch_cond): Do conversions here, not ...
2339         * typeck.c (c_expand_start_case): Here.
2340
2341         * semantics.c (do_poplevel): Remove unused variable.
2342         
2343 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
2344
2345         * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
2346         unless we're declaring the variable in question.
2347
2348 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
2349
2350         * decl.c (init_decl_processing): #if 0 last patch.
2351         (finish_function): Likewise.
2352
2353 1999-12-05  Mark Mitchell  <mark@codesourcery.com>
2354
2355         * decl.c (init_decl_processing): Set flag_inline_trees if
2356         !flag_no_inline.
2357
2358         * cp-tree.h (calls_setjmp_p): Declare.
2359         * decl.c (finish_function): Mark functions that call setjmp as
2360         uninlinable.
2361         * optimize.c (calls_setjmp_r): New function.
2362         (calls_setjmp_p): Likewise.
2363
2364 1999-12-04  Mark Mitchell  <mark@codesourcery.com>
2365
2366         * optimize.c (expand_call_inline): Wrap the expanded call in an
2367         EXPR_WITH_FILE_LOCATION node to get correct line numbers for
2368         inlined functions.
2369
2370         * optimize.c (inline_data): Remove fns_top.  Add scope_stmt.  Add
2371         in_target_cleanup_p.
2372         (remap_decl): New function.
2373         (remap_block): Likewise.
2374         (copy_scope_stmt): Likewise.
2375         (copy_body_r): Use remap_decl and copy_scope_stmt.
2376         (copy_body): Use VARRAY_TOP_TREE.
2377         (initialize_inlined_parameters): Likewise.
2378         (declare_return_variable): Likewise.
2379         (inlinable_function_p): Check flag_inline_trees.
2380         (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
2381         specially.  Use VARRAY_PUSH_TREE.  Create a BLOCK for the
2382         parameters of the inlined function.
2383         (optimize_function): Prevent recursion into partially complete
2384         functions.
2385         
2386         * cp-tree.def (SCOPE_STMT): Take one operand.
2387         * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
2388         (SCOPE_NULLIFIED_P): Redefine.
2389         (SCOPE_NO_CLEANUPS_P): New macro.
2390         (add_scope_stmt): Change prototype.
2391         * decl.c (poplevel): Tidy.  Warn about unused variables here.
2392         Record SCOPE_STMT_BLOCKs.
2393         (finish_function): Keep DECL_INITIAL for functions that might be
2394         inlined.
2395         * ir.texi: Document SCOPE_NO_CLEANUPS_P.
2396         * semantics.c: Include rtl.h.
2397         (add_scope_stmt): Return the new scope statement and, for an
2398         end-of-scope statement, its matching begin statement.  Don't set
2399         SCOPE_NULLIFIED_P.
2400         (do_pushlevel): Simplify, now that we are always
2401         function-at-a-time.
2402         (do_poplevel): Likewise.  Record SCOPE_STMT_BLOCKs.
2403         (expand_stmt): Don't call expand_start_bindings or
2404         expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
2405         * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
2406         SCOPE_NULLIFIED_P.
2407         * Makefile.in (semantics.o): Depend on RTL_H.
2408         
2409         * decl2.c (pending_statics_used): Make it a macro.
2410         (saved_inlines_used): Likewise.
2411         (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
2412         (mark_inline_for_output): Likewise.
2413         (ssdf_decls_used): Remove.
2414         (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
2415         (generate_ctor_or_dtor_function): Adjust accordingly.
2416         
2417 1999-11-24  Geoffrey Keating  <geoffk@cygnus.com>
2418             Greg McGary  <gkm@gnu.org>
2419
2420         * decl.c (duplicate_decls): Merge
2421         DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
2422         DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
2423
2424 1999-12-02  Mike Stump  <mrs@wrs.com>
2425
2426         * init.c (perform_member_init): Handle parse errors better.
2427
2428 1999-12-01  Mark Mitchell  <mark@codesourcery.com>
2429
2430         * cp-tree.h (min_tree_cons): Remove.
2431         (scratch_ovl_cons): Likewise.
2432         * decl.c (saveable_obstack): Don't declare.
2433         (duplicate_decls): Tweak error-message.
2434         (initialize_local_var): Explicitly mark the definition as static.
2435         (finish_function): Call permanent_allocation, just so
2436         that the middle-end sees the obstacks it expects.
2437         (mark_cp_function_context): Likewise.
2438         * init.c (build_new): Don't use min_tree_cons.
2439         * lex.c (permanent_obstack): Don't declare.
2440         (current_obstack, saveable_obstack): Likewise.
2441         * spew.c (current_obstack, saveable_obstack): Likewise.
2442         * tree.c (current_obstack, saveable_obstack): Likewise.
2443         (scratch_ovl_cons): Remove.
2444         (build_min_nt): Don't mess with obstacks.
2445         (build_min): Likewise.
2446         (min_tree_cons): Remove
2447         * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
2448         (build_x_function_call): Likewise.
2449         (build_c_cast): Don't use min_tree_cons.
2450         
2451 1999-11-29  Mark Mitchell  <mark@codesourcery.com>
2452
2453         * pt.c (tsubst_decl): Robustify.
2454
2455 1999-11-27  Mark Mitchell  <mark@codesourcery.com>
2456
2457         * decl2.c (finish_file): Call expand_body for inline functions
2458         that will be written out but that do not yet have RTL.
2459         * semantics.c (expand_body): Do not generate RTL For inline
2460         functions that do not yet need to be written out.
2461
2462 1999-11-25  Mark Mitchell  <mark@codesourcery.com>
2463
2464         * Make-lang.in (CXX_SRCS): Add optimize.c.  
2465         * Makefile.in (CXX_OBJS): Add optimize.o.
2466         (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
2467         (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
2468         (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
2469         (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
2470         (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
2471         (dump.o): Likewise.
2472         (optimize.o): New target.  
2473         * class.c: Don't include splay-tree.h.
2474         * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.  
2475         * cp-tree.h: Include splay-tree.h.
2476         (DECL_UNINLINABLE): New macro.
2477         (CTOR_BEGIN_P, CTOR_END_P): New macros.
2478         (flag_inline_trees): New variable.
2479         (local_variable_p): New function.
2480         (nonstatic_local_decl_p): Likewise.
2481         (optimize_function): Likewise.
2482         (cplus_unsave_expr_now): Remove.
2483         (copy_tree_r): Declare.
2484         (remap_save_expr): Likewise.  
2485         * decl.c (local_variable_p): Don't
2486         make it static.
2487         (local_variable_p_walkfn): New function.
2488         (make_rtl_for_local_static): Remove code to try to avoid writing
2489         out static constants.
2490         (emit_local_var): Fix indentation.
2491         (nonstatic_local_decl_p): New function.
2492         (check_default_argument): Use local_variable_p_walkfn, not
2493         local_variable_p, when walking the tree.
2494         (start_function): Set the DECL_CONTEXT for automatically generated
2495         labels.
2496         (finish_constructor_body): Use CTOR_STMT to mark the end of a
2497         constructor.  
2498         * decl2.c: Don't include splay-tree.h.
2499         (flag_inline_trees): Define.  
2500         * dump.c: Don't include
2501         splay-tree.h.  
2502         * except.c (expand_end_catch_block): Fix comment formatting.
2503         (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
2504         (expand_throw): Tidy comment.  
2505         * init.c (build_vec_delete_1): Use create_temporary_var.  
2506         * lex.c (cplus_tree_code_type): Make it static.
2507         (cplus_tree_code_length): Likewise.
2508         (cplus_tree_code_name): Likewise.  
2509         * optimize.c: New file.  
2510         * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
2511         with computed gotos.
2512         (setup_vtbl_ptr): Mark the beginnings of constructors with
2513         CTOR_STMT.
2514         (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
2515         (expand_body): Call optimize_function.  Save bodies if we're doing
2516         inlining on trees.
2517         * tree.c: Don't include splay-tree.h.  Include insn-config.h and
2518         integrate.h.
2519         (copy_tree_r): Make it public.
2520         (statement_code_p): New function.
2521         (mark_local_for_remap_r): Likewise.
2522         (cp_usave_r): Likewise.
2523         (cp_unsave): Likewise.
2524         (build_cplus_new): Set DECL_CONTEXT for temporary variables.
2525         (walk_tree): Walk into `s' class nodes.  Walk statement chains.
2526         (copy_tree_r): Handle 's' class nodes.  Restore chains for
2527         statements.  Nullify scopes.  Don't copy types.
2528         (init_tree): Set lang_unsave to cp_unsave.
2529         (remap_save_expr): Define.
2530         * ir.texi: Document CTOR_STMT.
2531         
2532 1999-11-24  Jason Merrill  <jason@casey.cygnus.com>
2533
2534         * search.c (note_debug_info_needed): Do perform this optimization
2535         for dwarf2.  
2536         (maybe_suppress_debug_info): Likewise.  Start by clearing
2537         TYPE_DECL_SUPPRESS_DEBUG.
2538
2539 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
2540
2541         * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
2542
2543         * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
2544
2545 1999-11-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2546
2547         * decl.c (pushdecl, grokdeclarator): Don't call a variadic
2548         function with a non-literal format string.
2549
2550         * lex.c (do_identifier): Likewise.
2551
2552         * typeck.c (build_unary_op): Likewise.
2553
2554 1999-11-23  Mark Mitchell  <mark@codesourcery.com>
2555
2556         * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
2557
2558 1999-11-22  Mark Mitchell  <mark@codesourcery.com>
2559
2560         * cp-tree.def (CTOR_COMPLETE): New tree node.
2561         * decl.c (finish_constructor_body): Add it, to mark the end of the
2562         constructor.
2563         (finish_function): Don't call end_protect_partials here.
2564         * ir.texi (CTOR_COMPLETE): Document it.
2565         * semantics.c (expand_stmt): Handle it.
2566         
2567         * cp-tree.def (FUNCTION_NAME): New tree node.
2568         * cp-tree.h (current_function_name_declared): Tweak documentation.
2569         (lang_decl_flags): Add pretty_function_p, adjust dummy.
2570         (DECL_PRETTY_FUNCTION_P): New macro.
2571         * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
2572         etc., in a template function.  Use at_function_scope_p instead of
2573         expanding it inline.
2574         * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
2575         specially.
2576         (tsubst): Handle FUNCTION_NAME.
2577         (tsubst_copy): Likewise.
2578         (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
2579         etc. in instantiation.
2580         * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
2581         even in template functions.
2582         (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
2583         conditional scope at the top of a destructor.
2584         
2585         * error.c (dump_function_decl): Use `[ with ... ]' syntax for
2586         specializations too.
2587
2588 1999-11-22  Nathan Sidwell  <nathan@acm.org>
2589
2590         * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
2591         when actually negative.
2592
2593         * typeck.c (convert_for_assignment): Expand comment about
2594         strange NULL check, moved from ...
2595         (convert_for_initialization): ... here. Remove unneeded
2596         code.
2597
2598 1999-11-21  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
2599
2600         * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
2601         * init.c (build_vec_delete, build_vec_delete_1): Likewise.
2602         Always destruct virtual bases of array components, but never
2603         delete them.
2604         (build_vec_init): Adjust invocations.
2605         (build_delete): Likewise.
2606         * decl2.c (delete_sanity): Likewise.
2607
2608 1999-11-19  Nathan Sidwell  <nathan@acm.org>
2609
2610         * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
2611         * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
2612         * decl2.c (grok_method_quals): Accept `restrict' as applying to
2613         the object pointer. Return such qualifiers.
2614         (grokclassfn): Apply this pointer qualifiers. Cleanup unused
2615         variables.
2616
2617 1999-11-18  Mark Mitchell  <mark@codesourcery.com>
2618
2619         * except.c (expand_end_catch_block): Fix typo.
2620         (expand_exception_blocks): Simplify.  Don't call
2621         expand_leftover_cleanups.
2622
2623 1999-11-15  Jason Merrill  <jason@casey.cygnus.com>
2624
2625         * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
2626         * pt.c (tsubst, case INTEGER_TYPE): Call it.  
2627         Check uses_template_parms.
2628
2629         * class.c (finish_struct): If we're a local class in a template
2630         function, add a TAG_DEFN.
2631         * pt.c (lookup_template_class): If this is a local class in a
2632         template function, call pushtag.
2633         (tsubst_expr, case TAG_DEFN): Handle classes, too.
2634
2635         Emit debug info with the vtable.
2636         * search.c (maybe_suppress_debug_info): New function...
2637         * class.c (finish_struct_1): ...split out from here.
2638         * cp-tree.h: Declare it.
2639         * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
2640         if we're writing out the vtable.
2641         * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, 
2642         note_debug_info_needed): #if 0 out.
2643
2644 1999-11-14  Mark Mitchell  <mark@codesourcery.com>
2645
2646         * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
2647         * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
2648         TREE_PERMANENT.
2649         * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
2650         * decl2.c (lookup_arg_dependent): Use it.
2651         
2652         * cp-tree.h (cp_finish_decl): Change prototype.
2653         (finish_static_data_member_decl): Likewise.
2654         (push_permanent_obstack): Remove declaration.
2655         (push_expression_obstack): Likewise.
2656         (push_scratch_obstack): Likewise.
2657         (DECL_TEMPLATE_PARM_P): Robustify.
2658         (SET_DECL_TEMPLATE_PARM_P): New macro.
2659         * class.c (add_method): Don't manipulate obstacks.
2660         (finish_vtbls): Likewise.
2661         * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
2662         * decl.c (binding_for_name): Don't manipulate obstacks.
2663         (maybe_push_to_top_level): Likewise.
2664         (pop_from_top_level): Likewise.
2665         (duplicate_decls): Likewise.
2666         (pushdecl): Likewise.
2667         (implicitly_declare): Likewise.
2668         (build_typename_type): Likewise.
2669         (start_decl): Likewise.
2670         (cp_finish_decl): Likewise.
2671         (finish_decl): Likewise.
2672         (destroy_local_static): Likewise.
2673         (expand_static_init): Likewise.
2674         (complete_array_type): Likewise.
2675         (grokvardecl): Likewise.
2676         (build_ptrmemfnc_type): Likewise.
2677         (grokdeclarator): Likewise.
2678         (xref_tag): Likewise.
2679         (xref_basetypes): Likewise.
2680         (start_enum): Likewise.
2681         (finish_enum): Likewise.
2682         (start_function): Likewise.
2683         (finish_function): Likewise.
2684         (start_method): Adjust call to cp_finish_decl.
2685         * decl2.c (finish_static_data_member_decl): Don't manipulate
2686         obstacks.
2687         (grokfield): Likewise.
2688         (grokbitfield): Likewise.
2689         (get_temp_name): Likewise.
2690         (get_sentry): Likewise.
2691         (fnish_file): Likewise.
2692         (lookup_arg_dependent): Likewise.
2693         * except.c (call_eh_info): Likewise.
2694         (push_eh_info): Likewise.
2695         (do_pop_exception): Likewise.
2696         (initialize_handler_parm): Likewise.
2697         (expand_end_eh_spec): Likewise.
2698         (alloc_eh_object): Likewise.
2699         (expand_throw): Likewise.
2700         * expr.c (extract_scalar_init): Likewise.
2701         * init.c (build_java_class_ref): Likewise.
2702         * lex.c (get_time_identifier): Likewise.
2703         (snarf_defarg): Likewise.
2704         (add_defarg_fn): Likewise.
2705         (is_global): Simplify.
2706         (do_identifier): Don't check TREE_PERMANENT.
2707         * method.c (emit_thunk): Don't manipulate obstacks.
2708         * parse.y (condition): Adjust call to cp_finish_decl.
2709         (primary): Likewise.
2710         (initdcl): Likewise.
2711         (initdcl0_innards): Likewise.
2712         (nomods_initdcl0): Likewise.
2713         * pt.c (push_inline_template_parms_recursive): Use
2714         SET_DECL_TEMPLATE_PARM_P.
2715         (process_template_parm): Likewise.
2716         (lookup_template_class): Don't manipulate obstacks.
2717         (instantiate_class_template): Adjust call to
2718         finish_static_data_member_decl.
2719         (tsubst_decl): Don't manipulate obstacks.
2720         (tsubst_expr): Likewise.
2721         (instantiate_template): Likewise.
2722         (instantiate_decl): Adjust calls to cp_finish_decl.
2723         * rtti.c (call_void_fn): Don't manipulate obstacks.
2724         (get_tinfo_var): Likewise.
2725         (get_tinfo_fn_unused): Likewise.
2726         (build_dynamic_cast_1): Likewise.
2727         (expand_si_desc): Likewise.
2728         (expand_class_desc): Likewise.
2729         (expand_ptr_desc): Likewise.
2730         (expand_attr_desc): Likewise.
2731         (expand_generic_desc): Likewise.
2732         (synthesize_tinfo_fn): Likewise.
2733         * search.c (expand_upcast_fixups): Likewise.
2734         * semantics.c (finish_asm_stmt): Likewise.
2735         (finish_named_return_value): Likewise.
2736         (begin_class_definition): Likewise.
2737         (finish_class_definition): Likewise.
2738         (finish_typeof): Likewise.
2739         * tree.c (build_cplus_method_type): Likewise.
2740         (reverse_path): Likewise.
2741         (copy_template_template_parm): Likewise.
2742         (build_expr_ptr_wrapper): Likewise.
2743         (push_expression_obstack): Remove.
2744         (push_permanent_obstack): Likewise.
2745         * typeck.c (mark_addressable): Likewise.
2746         
2747 1999-11-13  Mark Mitchell  <mark@codesourcery.com>
2748
2749         * call.c (build_conditional_expr): Use build_target_expr_with_type.
2750         (convert_like): Likewise.
2751         (build_over_call): Likewise.
2752         * cp-tree.h (build_target_expr): Remove.
2753         (build_target_expr_with_type): New function.
2754         * cvt.c (build_up_reference): Use get_target_expr.
2755         * decl.c (build_target_expr): Move to ...
2756         * tree.c (build_target_expr): Here.  Make it static.
2757         (build_target_expr_with_type): New function.  Set DECL_CONTEXT on
2758         the temporary VAR_DECLs.
2759         (get_target_expr): Use it.
2760
2761 1999-11-13  Jason Merrill  <jason@yorick.cygnus.com>
2762
2763         * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
2764         * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
2765         * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
2766         * class.c (set_rtti_entry): Use it.
2767
2768 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
2769
2770         * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
2771         here.
2772         * semantics.c (finish_expr_stmt): Call it here instead.  Move
2773         default_conversion logic to semantic-analysis time.
2774
2775 1999-11-12  Jason Merrill  <jason@yorick.cygnus.com>
2776
2777         * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
2778
2779 Fri Nov 12 12:56:32 MST 1999    Diego Novillo <dnovillo@cygnus.com>
2780
2781         * init.c (init_init_processing): Re-instated Nov 11 patch after
2782         approval.
2783
2784 Fri Nov 12 10:42:02 MST 1999    Diego Novillo <dnovillo@cygnus.com>
2785
2786         * init.c (init_init_processing): Undo patch from Nov 11, 1999.
2787         Patch had not been approved yet.
2788
2789 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
2790
2791         * decl.c (compute_array_index_type): New function, split out from
2792         grokdeclarator.
2793         (create_array_type_for_decl): Likewise.
2794         (grokdeclarator): Use them.
2795
2796         * semantics.c (expand_stmt): Don't suspend_momentary or
2797         resume_momentary.
2798
2799 Thu Nov 11 12:42:11 MST 1999    Diego Novillo <dnovillo@cygnus.com>
2800
2801         * init.c (init_init_processing): Header information for
2802         arrays allocated via `new' should have the same alignment used by
2803         malloc.
2804
2805 1999-11-10  Mark Mitchell  <mark@codesourcery.com>
2806
2807         * error.c (dump_function_name): Don't crash if given a friend
2808         pseudo-instantiation.
2809
2810         * cp-tree.h (build_enumerator): Change prototype.
2811         * decl.c (enum_next_value): Remove.
2812         (enum_overflow): Likewise.
2813         (init_decl_processing): Don't register enum_next_value as a root.
2814         (start_enum): Clear TYPE_VALUES for a redefined enum.
2815         (finish_enum): Reset the type of enumeration constants.
2816         (build_enumerator): Fix indentation.  Don't copy CONST_DECLs when
2817         we don't need to.  Maintain the TYPE_VALUES list and look there
2818         for the previously defined enumeration constant.  Let enumeration
2819         constants have the type of their values until the enumeration type
2820         is complete.
2821         * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
2822         (structsp): Adjust.
2823         * parse.c: Regenerated.
2824         * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
2825         
2826 Wed Nov 10 12:43:21 1999  Philippe De Muyter  <phdm@macqel.be>
2827                           Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2828
2829         * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
2830
2831 1999-11-09  Mark Mitchell  <mark@codesourcery.com>
2832
2833         * cp-tree.h (language_function): Remove x_last_dtor_insn and
2834         x_last_parm_cleanup_insn.
2835         * decl.c (last_dtor_insn): Remove.
2836         (last_parm_cleanup_insn): Likewise.
2837         (expand_start_early_try_stmts): Don't set them.
2838         (store_parm_decls): Likewise.
2839         (save_function_data): Or save them.
2840         (mark_lang_function): Or mark them.
2841
2842 1999-11-08  Mark Mitchell  <mark@codesourcery.com>
2843
2844         * decl.c (store_parm_decls): Generate cleanup code at
2845         semantic-analysis time.  Destroy objects in the correct order.
2846
2847 1999-11-07  Mark Mitchell  <mark@codesourcery.com>
2848
2849         * cp-tree.h (begin_new_placement): Remove.
2850         (finish_new_placement): Likewise.
2851         * class.c (finish_struct_1): Don't suspend_momentary or
2852         resume_momentary.
2853         * decl.c (grokdeclarator): Likewise.
2854         (maybe_build_cleanup_1): Likewise.
2855         * except.c (push_eh_cleanup): Likewise.
2856         (build_terminate_handler): Likewise.
2857         * init.c (build_new_1): Likewise.
2858         * parse.y (parse_decl): Change prototype.
2859         (initdecls, notype_initdecls, initdcl): Don't return int.
2860         (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
2861         (.begin_new_placement): Remove.
2862         (.finish_new_placement): Likewise.
2863         (nonmomentary_expr): Likewise.
2864         (suspend_mom): Likewise.
2865         (condition): Don't suspend_momentary, resume_momentary, or keep
2866         track of need to resume.
2867         (unary_expr): Likewise.
2868         (new_placement): Likewise.
2869         (decl): Likewise.
2870         (structsp): Likewise.
2871         (new_type_id): Likewise.
2872         (maybe_parmlist): Likewise.
2873         (direct_after_type_declaration): Likewise.
2874         (direct_new_declarator): Likewise.
2875         (direct_abstract_declaration): Likewise.
2876         * parse.c: Regenerated.
2877         * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
2878         * semantics.c (begin_new_placement): Remove.
2879         (finish_new_placement): Likewise.
2880         
2881 1999-11-05  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2882
2883         * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
2884         (DECL_TEMPLATE_INFO): Use it.
2885         * decl.c (warn_extern_redeclared_static): Do nothing for
2886         TEMPLATE_DECLs.
2887         * decl2.c (mark_used): Explicitly check for function or variable.
2888         * semantics.c (finish_unary_op_expr): Check whether result is also
2889         an INTEGER_CST.
2890
2891 1999-11-05  Mark Mitchell  <mark@codesourcery.com>
2892
2893         * Makefile.in (typeck2.o): Depend on output.h.
2894         * typeck2.c: Include output.h.
2895
2896         * decl.c (flag_ansi): Remove declaration.
2897
2898         * pt.c (tinst_level_tick): Make it static.
2899         (last_template_error_tick): Likewise.
2900         
2901         * cp-tree.h (mapcar): Remove declaration.
2902         (search_tree): Likewise.
2903         (walk_tree_fn): New typedef.
2904         (walk_tree): New function.
2905         * tree.c (bot_manip): Change prototype.  Adjust to be called via
2906         walk_tree.
2907         (bot_replace): Likewise.
2908         (no_linkage_helper): Likewise.
2909         (copy_tree_r): New function.
2910         (search_tree): Rename, and adjust, to become ...
2911         (walk_tree): New function.
2912         (mapcar): Remove.
2913         (target_remap): Remove.
2914         (target_remap_count): Likewise.
2915         (break_out_target_exprs): Use walk_tree.
2916         * decl.c (local_variable_p): Change prototype.
2917         (check_default_argument): Use walk_tree.
2918         * pt.c (for_each_template_parm_r): New function, split out from ...
2919         (for_each_template_parm): Here.  Use it, via walk_tree.
2920         
2921 1999-11-03  Mark Mitchell  <mark@codesourcery.com>
2922
2923         * class.c (check_bitfield_decl): New function, split out from
2924         finish_stuct_1.
2925         (check_field_decl): Likewise.  Recursively examine members of
2926         anonymous structs.
2927         (finish_struct_1): Use them.
2928         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
2929         
2930 1999-11-02  Mark Mitchell  <mark@codesourcery.com>
2931
2932         * decl.c (grokfndecl): Remove dead code.
2933
2934         * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
2935
2936 1999-11-02  Scott Snyder  <snyder@fnal.gov>
2937
2938         * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
2939         IMAGPART_EXPR.
2940         * pt.c (tsubst_copy): Likewise.
2941
2942 1999-11-01  Jason Merrill  <jason@yorick.cygnus.com>
2943
2944         * decl2.c (maybe_make_one_only): Always make things comdat on
2945         ELF targets, too.
2946
2947 1999-10-31  Mark Mitchell  <mark@codesourcery.com>
2948
2949         * decl.c (finish_function): Call free_after_parsing for functions
2950         we are not immediately turning into RTL.
2951
2952 1999-10-31  Brendan Kehoe  <brendan@cygnus.com>
2953
2954         * cp-tree.h (flag_dump_translation_unit): Add decl.
2955
2956 Sat Oct 30 22:42:50 1999  Stephen L Moshier <moshier@mediaone.net>
2957
2958         * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
2959
2960 1999-10-30  Mark Mitchell  <mark@codesourcery.com>
2961
2962         * decl.c (pop_cp_function_context): Don't call free on a NULL
2963         pointer.
2964         * semantics.c: Include ggc.h.
2965         (expand_body): Do garbage-collection after processing a template
2966         function.  Clear DECL_SAVED_TREE after generating RTL for a
2967         function.
2968         * Makefile.in (semantics.o): Depend on ggc.h.
2969         
2970 1999-10-29  Mark Mitchell  <mark@codesourcery.com>
2971
2972         * cp-tree.h (make_typename_type): Change prototype.
2973         * decl.c (make_typename_type): Only complain if so requested.
2974         * parse.y (nested_name_specifier): Adjust calls.
2975         (typename_sub0): Likewise.
2976         (typename_sub1): Likewise.
2977         * parse.c: Regenerated.
2978         * pt.c (convert_template_argument): Pass complain to
2979         make_typename_type.
2980         (tsubst): Likewise.
2981         
2982 1999-10-28  Mark Mitchell  <mark@codesourcery.com>
2983
2984         * semantics.c (finish_handler): End the scope of the handler
2985         before attaching it to the statement-tree.
2986
2987 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
2988
2989         * rtti.c (build_dynamic_cast_1): Give a better error message for
2990         an attempt to dynamic_cast from a non-polymorphic type.
2991
2992 1999-10-27  Mark Mitchell  <mark@codesourcery.com>
2993
2994         * cp-tree.h (make_temp_vec): Remove.
2995         (make_scratch_vec): Likewise.
2996         * call.c (add_function_candidate): Use make_tree_vec.
2997         (add_conv_candidate): Likewise.
2998         (build_builtin_candidate): Likewise.
2999         (add_template_candidate_real): Likewise.
3000         * class.c (resolve_address_of_overloaded_function): Likewise.
3001         * decl.c (start_function): Don't fool with the momentary obstack.
3002         (finish_function): Likewise.
3003         * init.c (expand_direct_vtbls_init): Likewise.
3004         (begin_init_stmts): Likewise.
3005         (finish_init_stmts): Likewise.
3006         * pt.c (add_to_template_args): Use make_tree_vec.
3007         (check_explicit_specialization): Likewise.
3008         (coerce_template_parms): Likewise.
3009         (lookup_template_class): Don't fool with the momentary obstack.
3010         (instantiate_class_template): Likewise.
3011         (tsubst_template_arg_vector): Use make_tree_vec.
3012         (tsubst_aggr_type): Don't fool with the momentary obstack.
3013         (tsubst_decl): Likewise.  Use make_tree_vec.
3014         (try_one_overload): Likewise.
3015         (try_class_unification):  Don't fool with the momentary obstack.
3016         (get_bindings_real): Use make_tree_vec.
3017         (set_mangled_name_for_template_decl): Likewise.
3018         * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
3019         * semantics.c (finish_expr_stmt): Likewise.
3020         (finish_do_stmt): Likewise.
3021         (finish_for_expr): Likewise.
3022         (finish_switch_cond): Likewise.
3023         (do_pushlevel): Likewise.
3024         (do_poplevel): Likewise.
3025         * tree.c (make_temp_vec): Remove.
3026         
3027         * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.  Dump
3028         CLEANUP_P for a TRY_BLOCK.
3029         * ir.texi: Document SAVE_EXPR.
3030
3031 Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
3032
3033         * call.c (build_over_call):  Check that the built-in function is
3034         of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
3035         * typeck.c (build_function_call_real): Similarly. 
3036
3037 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
3038
3039         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
3040         remember_end_note.
3041
3042 1999-10-24  Mark Mitchell  <mark@codesourcery.com>
3043
3044         * decl.c (push_overloaded_decl_1): Use pushdecl.
3045         
3046         * decl.c (auto_function): Replace #ifdef'd __inline with just
3047         plain inline.
3048         * lex.c (my_get_run_time): Likeise.
3049         (yyprint): Likewise.
3050         (identifier_type): Likewise.
3051         * method.c (start_squangling): Likewise.
3052         (end_squangling): Likewise.
3053         (icat): Likewise.
3054         (old_backref_index): Likewise.
3055         (flush_repeats): Likewise.
3056         (issue_ktype): Likewise.
3057         * parse.y (empty_parms): Likewise.
3058         * parse.c: Regenerated.
3059         
3060 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
3061
3062         * dump.c (dequeue_and_dump): Replace several uses of
3063         queue_and_dump_index with dump_child.
3064
3065 1999-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3066
3067         * expr.c: Include tm_p.h.
3068
3069 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
3070
3071         * cp-tree.h (SCOPE_PARTIAL_P): New macro.
3072         (pushlevel_temporary): Remove.
3073         (add_scope_stmt): New function.
3074         * decl.c (pushlevel_temporary): Remove.
3075         (poplevel): Use add_scope_stmt.
3076         (start_decl_1): Likewise.
3077         * semantics.c (add_scope_stmt): New function.
3078         (do_pushlevel): Use it.
3079         (do_poplevel): Use it.
3080         (expand_stmt): Check SCOPE_PARTIAL_P.
3081         
3082         * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
3083         * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
3084         * expr.c (cplus_expand_expr): Expand it.
3085         * ir.texi: Document EMPTY_CLASS_EXPR.
3086         
3087 1999-10-20  Mark Mitchell  <mark@codesourcery.com>
3088
3089         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
3090         parameters as having namespace scope.
3091
3092 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
3093
3094         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
3095         (mangling_flags): New type.
3096         (build_overload_int): Change prototype.
3097         (build_overload_value): Likewise.
3098         (numeric_output_need_bar): Improve comment.
3099         (mangle_expression): New function, broken out from ...
3100         (build_overload_int): Here.
3101         (build_overload_value): Adjust for use of mangling flags.  Don't
3102         warn about real-valued template parameters here.  Do handle
3103         complex expressions involving real-valued template parameters.
3104         (build_template_parm_names): Encase non-type template parameters
3105         in underscores, if necessary.
3106         (process_overload_item): Remove conditional on
3107         PARM_CAN_BE_ARRAY_TYPE.
3108
3109 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
3110
3111         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
3112
3113         * ir.texi: Clean up documentation of RETURN_INIT.
3114         
3115 1999-10-15  Greg McGary  <gkm@gnu.org>
3116
3117         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
3118         (lang_init): Set default for flag_bounds_check if still "unspecified".
3119
3120 1999-10-13  Andrew Haley  <aph@cygnus.com>
3121
3122         * class.c (finish_struct_1): Force alignment of non-bitfields to
3123         BITS_PER_UNIT.
3124
3125 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
3126
3127         * typeck2.c (process_init_constructor): Handle empty constructors.
3128
3129 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
3130
3131         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
3132
3133         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
3134         array error.
3135
3136 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
3137
3138         * decl.c (make_rtl_for_local_static): Don't create register RTL
3139         for addressable constants.
3140
3141 1999-10-13  Nathan Sidwell  <nathan@acm.org>
3142
3143         * cp-tree.h (build_x_va_arg): Prototype new function.
3144         * call.c (build_x_va_arg): Define it.
3145         * parse.y (unary_expr): Call build_x_va_arg.
3146         
3147         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
3148         * call.c (convert_type_from_ellipsis): Define it.
3149         * decl.c (init_decl_processing): Set lang_type_promotes_to.
3150
3151         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
3152
3153 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
3154
3155         * class.c (fixed_type_or_null): Always set *nonnull.
3156
3157 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3158
3159         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
3160         __GNUC__ and __GNUC_MINOR__.
3161
3162 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
3163
3164         * cp-tree.h (make_rtl_for_local_static): New function.  
3165         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
3166         local statics ...
3167         (make_rtl_for_local_static): Here.
3168         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
3169         
3170 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3171
3172         * method.c: Include tm_p.h.
3173
3174 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3175
3176         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
3177         * lex.c (cp_make_lake_type): Likewise.
3178         * tree.c (init_tree): Init make_lang_type_fn.
3179         
3180 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
3181
3182         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
3183         paramter.
3184         
3185         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
3186         local statics if we don't really have them.
3187
3188         * ir.texi: Improve documentation for STMT_EXPR.  Describe
3189         CLEANUP_POINT_EXPR.
3190
3191 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
3192
3193         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
3194
3195 1999-10-07  Greg McGary  <gkm@gnu.org>
3196
3197         * class.c (finish_struct_1): Use simpler method of
3198         removing elements of a singly-linked list which doesn't
3199         lose for classes without data members.
3200
3201 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
3202
3203         * friend.c (make_friend_class): Robustify.
3204
3205         * semantics.c (finish_object_call_expr): Reject calls to template
3206         types.
3207
3208 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
3209
3210         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
3211
3212         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
3213         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
3214         CLASSTYPE_VFIELD.
3215         * class.c (get_vfield_offset): Likewise.
3216         (finish_base_struct): Likewise.
3217         (modify_one_vtable): Likewise.
3218         (fixup_vtable_deltas): Likewise.
3219         (finish_struct_1): Likewise.
3220         * init.c (expand_virtual_init): Likewise.
3221         * search.c (lookup_field_1): Likewise.
3222         (expand_upcast_fixups): Likewise.
3223         * typeck.c (build_component_ref): Likewise.
3224         (build_binary_op_nodefault): Likewise.
3225         
3226         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
3227         * ir.texi: Document TYPE_VFIELD.
3228
3229 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
3230
3231         * decl.c (grokdeclarator): Only warn about non-zero arrays if
3232         !in_system_header (linux socketbits.h can give this for
3233         __cmsg_data, which is using a GNU extension).
3234
3235 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
3236
3237         * decl2.c (start_static_storage_duration_function): Push the
3238         function declaration so it ends up in namespace scope.
3239
3240         * dump.c (DUMP_CHILDREN): Remove.
3241         (DUMP_BINFO): Adjust.
3242         (struct dump_node_info): Remove dump_children_p.
3243         (queue_and_dump_type): Remove dump_children_p parameter.
3244         (queue): Don't set dump_children_p.
3245         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
3246         queue_and_dump_index.
3247         (dequeue_and_dump): Unconditionally print children.  Adjust calls
3248         to functions mentioned above.
3249         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
3250         
3251         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
3252         * dump.c (dequeue_and_dump): Dump them.
3253         
3254         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
3255
3256         * decl.c (start_function): Set current_in_charge_parm for
3257         constructors, too, where appropriate.
3258         * search.c (fixup_all_virtual_upcast_offsets): New function.
3259         (expand_indirect_vtbls_init): Use it.
3260         
3261 1999-10-04  Nathan Sidwell  <nathan@acm.org>
3262
3263         * decl2.c (grok_alignof): Don't decay lvalues.
3264         
3265         * init.c (build_new): Remove unused variable.
3266
3267 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
3268
3269         * cp-tree.h (struct language_function): Remove static_labelno.
3270         (static_labelno): Remove macro.
3271         * method.c (build_overload_nested_name): Make static_labelno
3272         static here.
3273         
3274         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
3275         to decide whether or not a function is defined.
3276
3277         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
3278         situations where make_node will do it automatically.
3279         * decl.c (grok_reference_init): Likewise.
3280         (expand_static_init): Likewise.
3281         (do_static_initialization): Likewise.
3282         * init.c (perform_member_init): Likewise.
3283         (expand_aggr_init_1): Likewise.
3284         (build_new_1): Likewise.
3285         * method.c (do_build_copy_constructor): Likewise.
3286         (do_build_assign_ref): Likewise.
3287         * search.c (expand_upcast_fixups): Likewise.
3288         * semantics.c (finish_stmt_expr): Likewise.
3289         * typeck.c (build_unary_op): Likewise.
3290         (check_return_expr): Likewise.
3291
3292 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
3293
3294         * init.c (build_vec_delete_1): Fold COND_EXPRs.
3295
3296 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
3297
3298         * cp-tree.def (VEC_INIT_EXPR): Remove.
3299         * cp-tree.h (struct stmt_tree): New type.
3300         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
3301         x_stmt_tree.
3302         (class_cache_firstobj): Remove.
3303         (struct language_function): Remove stmts_are_full_exprs_p,
3304         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
3305         (current_stmt_tree): New macro.
3306         (last_tree): Adjust.
3307         (last_expr_type): Likewise.
3308         (doing_semantic_analysis_p): Simplify.
3309         (stmts_are_full_exprs_p): Adjust.
3310         (begin_tree): Remove prototype.
3311         (end_tree): Likewise.
3312         (begin_stmt_tree): Change prototype.
3313         (finish_stmt_tree): Likewise.
3314         (building_stmt_tree): Simplify.
3315         * decl.c (mark_stmt_tree): New function.
3316         (mark_saved_scope): Use it.
3317         (start_function): Rearrange slightly to call begin_stmt_tree 
3318         earlier.
3319         (save_function_data): Tweak.
3320         (finish_function): Adjust call to finish_stmt_tree.
3321         (mark_lang_function): Use mark_stmt_tree.
3322         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
3323         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
3324         (build_vec_init): Remove creation of stand-in intializer.
3325         * pt.c (begin_tree): Remove.
3326         (end_tree): Likewise.
3327         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
3328         (begin_compound_stmt): Handle a compound-statement outside of a
3329         function.
3330         (begin_stmt_expr): Handle a statement-expression outsidef of a
3331         function.
3332         (finish_stmt_expr): Likewise.
3333         (begin_class_definition): Don't call begin_tree.
3334         (finish_inline_definitions): Don't call end_tree.
3335         (begin_stmt_tree): Take a pointer to tree, not a function as input.
3336         (finish_stmt_tree): Likewise.
3337         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
3338         (mapcar): Likewise.
3339         
3340         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
3341         * parse.c: Regenerated.
3342         
3343         * dump.c (dqueue_and_dump): Dump bitfieldness.
3344         
3345         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
3346         bitfields, rather than DECL_BIT_FIELD.
3347         * ir.texi: Document how to tell whether or not a field is a
3348         bitfield.
3349         
3350         * lex.c (make_lang_type): Fix typo in comment.
3351
3352 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
3353
3354         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
3355
3356 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
3357
3358         * pt.c (tsubst_decl): If the type of a template instantiation is
3359         bogus, so is the whole instantiation.
3360
3361 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
3362
3363         * decl.c (initialize_local_var): Handle static variables here.
3364         (cp_finish_decl): Tweak handling of function-scope static
3365         variables.
3366         * semantics.c (expand_stmt): Handle DECL_STMTs for static
3367         variables.
3368
3369         * method.c (emit_thunk): Don't crash when -fsyntax-only.
3370
3371         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
3372         global_dtor_p.  Add init_priority.
3373         (DECL_ACCESS): Adjust accordingly.
3374         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
3375         (GLOBAL_INIT_PRIORITY): Likewise.
3376         * decl.c (lang_mark_tree): Adjust accordingly.
3377         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
3378         and GLOBAL_INIT_PRIORITY.
3379         * dump.c (dequeue_and_dump): Print them.
3380         * ir.texi: Document them.
3381
3382         * decl2.c (struct priority_info_s): Remove initialization_sequence
3383         and destruction_sequence.
3384         (start_static_storage_duration_function): Return the body of the
3385         function.  Convert for function-at-a-time mode.
3386         (generate_inits_for_priority): Remove.
3387         (finish_static_storage_duration_function): Change prototype.
3388         Adjust for function-at-a-time mode.
3389         (do_static_initialization): Likewise.
3390         (do_static_destruction): Likewise.
3391         (do_static_initialization_and_destruction): Remove.
3392         (start_static_initialization_or_destruction): New function.
3393         (finish_static_initialization_or_destruction): Likewise.
3394         (get_priority_info): Don't manipulation initialization_sequence or
3395         destruction_sequence.
3396         (prune_vars_needing_no_initialization): New function.
3397         (write_out_vars): Likewise.
3398         (finish_file): Use the various new functions instead of the old.
3399         
3400 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
3401
3402         * cp-tree.h (warn_float_equal): Declare.
3403         * decl2.c (warn_float_equal): Define.
3404         (lang_decode_option): Recognize -W[no-]float-equal.
3405         * typeck.c (build_binary_op_nodefault): Conditionally warn
3406         about equality tests of floating point types.
3407
3408 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
3409
3410         Support normal type_info-based EH mechanisms with -fno-rtti.
3411         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
3412         (build_eh_type_type_ref): Likewise.
3413         (build_eh_type): Remove.
3414         (expand_throw): Call build_eh_type_type, not build_eh_type.
3415         * decl2.c (import_export_decl): Don't associate the tinfo fn with
3416         the vtable if -fno-rtti.
3417         * decl.c (init_decl_processing): Always init_rtti_processing.
3418
3419         * rtti.c (get_typeid): Don't complain about -fno-rtti.
3420
3421         * class.c (class_cache_obstack, class_obstack): Remove.
3422         (init_class_processing): Don't initialize class_obstack.
3423         (push_cache_obstack): Remove.
3424         (pushclass): Don't call it.
3425         * cp-tree.h: Remove prototype for push_cache_obstack.
3426         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
3427         (pushlevel_class): Don't push_decl_level.
3428         (poplevel_class): Don't pop_stack_level.
3429         (push_class_level_binding): Don't push_cache_obstack.
3430         (init_decl_processing): Don't intialize decl_obstack.
3431         * search.c (push_class_decls): Don't push_cache_obstack.
3432         * tree.c (list_hash_add): Put hash node on permanent_obstack.
3433         (hash_tree_cons): Don't mess with obstacks.
3434         (print_lang_statistics): Don't print stats for class_obstack and
3435         decl_obstack.
3436
3437 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
3438
3439         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
3440         * ir.texi: Document DECL_EXTERNAL.
3441
3442         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
3443         * ir.texi: Document THUNK_DECLs.
3444
3445         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
3446         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
3447         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
3448         * error.c (dump_template_bindings): Remove unused parameter.
3449         Handle multiple levels of template parameters.
3450         (dump_template_decl): Use `parms', not `args', for template
3451         parameters.  Fix thinko.
3452         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
3453         flags to dump_template_bindings.
3454         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
3455         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
3456         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
3457         (tsubst_copy): Clarify variable name.
3458         (most_general_template): Robustify.
3459         
3460 1999-09-29  Nathan Sidwell  <nathan@acm.org>
3461
3462         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
3463         to change primary template rendering.
3464
3465 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
3466
3467         * cp-tree.h (UPT_TEMPLATE): Remove.
3468         (UPT_PARMS): Likewise.
3469         (DECL_NEEDED_P): New macro.
3470         * decl2.c (finish_vtable_vardecl): Use it.
3471         (finish_objects): Don't crash with -fsyntax-only.
3472         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
3473         -fsyntax-only.
3474         * pt.c (tsubst_friend_function): Remove FIXME that talks about
3475         obstacks.
3476         (tsubst_expr): Correct handling of function try-blocks.
3477         * semantics.c: Include flags.h.
3478         (expand_body): Don't do RTL generation if -fsyntax-only.
3479         * Makefile.in (semantics.o): Depends on flags.h.
3480         
3481 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
3482
3483         * pt.c (most_general_template): Adjust declaration.
3484
3485         * cp-tree.h: (most_general_template): Declare.
3486
3487         * error.c (dump_template_value): Rename to ...
3488         (dump_template_argument): This.
3489         (dump_template_argument_list): New function.
3490         (dump_type): Use it.
3491         (dump_template_parameter): New function.
3492         (dump_template_decl): Use it.
3493         (dump_template_bindings): New function.
3494         (dump_function_decl): Use it. Pretty print function template
3495         instantiations.
3496
3497 1999-09-28  Nathan Sidwell  <nathan@acm.org>
3498
3499         * decl.c (grokdeclarator): Distinguish parameter context for
3500         diagnostics. Tidy up missing type diagnostic.
3501         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
3502
3503 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
3504
3505         * ir.texi: Improve documentation for TARGET_EXPR.
3506
3507 1999-09-27  Nathan Sidwell  <nathan@acm.org>
3508
3509         Augment stringification of trees.
3510         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
3511         (fndecl_as_string, type_as_string_real, args_as_string,
3512         code_as_string, language_as_string, parm_as_string,
3513         op_as_string, assop_as_string, cv_as_string): Remove.
3514         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
3515         (context_as_string): Declare new function.
3516         * error.c (cp_printers): Move definition.
3517         (OB_UNPUT): Remove.
3518         (OB_END_TEMPLATE_ID): Adjust.
3519         (interesting_scope_p): Remove.
3520         (dump_scope): New static function.
3521         (dump_qualifiers): Adjust prototype, reimplement.
3522         (dump_template_value): Use tree_string_flags.
3523         (dump_type_real): Move back to dump_type.
3524         (dump_type): Adjust prototype. Use tree_string_flags.
3525         (dump_aggr_type): Likewise. Use dump_template_parms.
3526         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
3527         Return pad flag.
3528         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
3529         (dump_simple_decl): Likewise.
3530         (dump_decl): Likewise. Use dump_template_decl.
3531         (dump_template_decl): New static function broken out of dump_decl.
3532         (dump_function_decl): Adjust prototype. Use tree_string_flags.
3533         (dump_parameters): Likewise. Prefix space.
3534         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
3535         (dump_function_name): Likewise. Use dump_template_parms.
3536         (dump_template_parms): New static function broken out of
3537         dump_function_name.
3538         (dump_expr_list): Adjust prototype. Use tree_string_flags.
3539         (dump_expr): Likewise.
3540         (fndecl_as_string): Removed
3541         (type_as_string_real): Removed
3542         (dump_binary_op): Adjust prototype. Use tree_string_flags.
3543         (dump_unary_op): Likewise.
3544         (type_as_string): Likewise.
3545         (expr_as_string): Likewise.
3546         (decl_as_string): Likewise.
3547         (context_as_string): New function.
3548         (lang_decl_name): Adjust.
3549         (decl_to_string): New static print callback.
3550         (expr_to_string): Likewise.
3551         (fndecl_to_string): Likewise.
3552         (code_as_string): Renamed to ...
3553         (code_to_string): ... here. Adjust.
3554         (language_as_string): Renamed to ...
3555         (language_to_string): ... here. Adjust.
3556         (parm_as_string): Renamed to ...
3557         (parm_to_string): ... here.
3558         (op_as_string): Renamed to ...
3559         (op_to_string): ... here.
3560         (assop_as_string): Renamed to ...
3561         (assop_to_string): ... here.
3562         (type_to_string): New static print callback.
3563         (args_as_string): Renamed to ...
3564         (args_to_string): ... here. Adjust.
3565         (cv_as_string): Renamed to ...
3566         (cv_to_string): ... here. Adjust.
3567         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
3568         (print_template_context): Likewise.
3569
3570 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
3571
3572         * cp-tree.h (expand_throw): Remove prototype.
3573         * except.c (expand_throw): Make it static.  Use tree-generation
3574         functions, rather than RTL-generation functions.
3575         (build_throw): Use it.
3576         * expr.c: Include except.h.
3577         (cplus_expand_expr): Don't call expand_throw here.
3578         * Makefile.in (expr.o): Depend on except.h.
3579         * ir.texi: Update documentation for THROW_EXPR.
3580         
3581         * decl.c (start_function): Set x_dont_save_pending_sizes rather
3582         than calling get_pending_sizes.
3583         * init.c (build_new): Don't save and restore
3584         immediate_size_expand; instead, assert that it has the expected
3585         value already.
3586
3587 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3588
3589         * lex.c (compiler_error): Add missing call to va_end().
3590
3591 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
3592
3593         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
3594         * ir.texi: Document RESULT_DECL and DECL_RESULT.
3595
3596         * cp-tree.h (check_return_expr): New function.
3597         * decl.c (finish_constructor_body): New function.
3598         (pushdecl): Put global friend functions in namespace binding
3599         level, not the class binding level.
3600         (finish_destructor_body): Make sure the dtor_label is always
3601         defined.  Fix typo in comment.
3602         (finish_function): Move generation of constructor-termination code
3603         to semantic-analysis time.  Move generation of implicit `main'
3604         return value to semantic-analysis time.
3605         * semantics.c (finish_return_stmt): Generate goto's to
3606         ctor_label/dtor_label here.  Use check_return_expr to do semantic
3607         analysis on the returned expression.
3608         * typeck.c (maybe_warn_about_returning_address_of_local): New
3609         function split out from c_expand_return.
3610         (check_return_expr): Likewise.
3611         (c_expand_return): Just generate the RTL for the return.
3612         
3613 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
3614
3615         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
3616         (cleanup_type): Likewise.
3617         (search_tree): Change prototype.
3618         * decl.c (local_variable_p): Adjust for new interface to
3619         search_tree.
3620         (check_default_argument): Likewise.
3621         * error.c (dump_expr): Handle INIT_EXPR.
3622         * except.c (expand_throw): Don't make cleanup_type a local static.
3623         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
3624         * init.c (build_new): Call build_new_1 directly, rather than
3625         building a NEW_EXPR.
3626         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
3627         processing file-scope initializers.
3628         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
3629         * tree.c: Include splay-tree.h
3630         (no_linkage_helper): Adjust for new interface to search_tree.
3631         (search_tree): Pass around pointers to tree nodes, rather than the
3632         nodes themselves.  Handle VEC_INIT_EXPR.
3633         (no_linkage_check): Adjust for new interface to search_tree.
3634         (mapcar): Handle VEC_INIT_EXPR.
3635         (target_remap): New variable.
3636         (bot_manip): Use it.
3637         (bot_replace): New function.
3638         (break_out_target_exprs): Use it to remap all variables used in a
3639         default argument expression.
3640         * typeck.c (build_modify_expr): Don't crash when outside a
3641         function and presented with an INIT_EXPR assignment
3642         * Makefile.in (tree.o): Depend on splay-tree.h.
3643
3644 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
3645
3646         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
3647         DECL_BUILT_IN.
3648         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
3649         callers changed.
3650         Set the builtin's DECL_BUILT_IN_CLASS.
3651
3652 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
3653
3654         * decl.c (pushdecl): Don't make local declarations of extern
3655         variables give the variable a DECL_CONTEXT for the function.
3656         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
3657         Don't accidentally make RTL for local declarations.
3658         (emit_local_var): Handle declarations with asm-specifiers here.
3659         
3660 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
3661
3662         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
3663         STMT_IS_FULL_EXPR_P.
3664
3665         * cp-tree.h (language_function): Add cannot_inline.
3666         * decl.c (start_function): Restore current_function_cannot_inline
3667         from the saved value.
3668         (save_function_data): Save current_function_cannot_inline.
3669         * decl2.c (start_objects): Change prototype.  Build the function
3670         in function-at-a-time mode.
3671         (finish_objects): Likewise.
3672         (generate_ctor_or_dtor_function): Adjust accordingly.
3673         
3674         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
3675         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
3676         Don't call expand_anon_union_decl here
3677         * semantics.c (exapnd_stmt): Call it here, instead.
3678         * typeck.c (mark_addressable): Addressed variables are implicitly
3679         used.
3680         
3681 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3682
3683         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
3684         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
3685         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
3686         * cp-tree.h: Add tree checking macros to various tree access
3687         macros. 
3688         * ptree.c (print_lang_decl): Test for function or variable
3689         before accessing template info.
3690
3691 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
3692
3693         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
3694         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
3695         * decl2.c (lang_f_options): Add -fshort-wchar.
3696         * cp-tree.h: Declare flag_short_wchar.
3697         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
3698         int' for wchar_t.
3699
3700 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3701
3702         * ir.texi: Fix formatting errors and typos.
3703
3704 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
3705
3706         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
3707
3708         * decl.c (pushdecl): Do create a binding for extern "C" functions,
3709         but not for their DECL_ASSEMBLER_NAMEs.
3710         (lookup_name_current_level): Fix formatting.
3711         (xref_tag): Likewise.
3712         * decl2.c (start_objects): Mark static constructors and
3713         destructors as used.
3714
3715 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
3716
3717         * decl.c (define_case_label): Don't crash if we're not in a switch.
3718
3719         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
3720         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
3721         for unsupported flags.
3722
3723 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
3724
3725         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
3726         Accept and warn about -fthis-is-variable.
3727
3728 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
3729
3730         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
3731         CLEANUP_STMT, and SCOPE_STMT.
3732
3733         * decl2.c (lang_decode_option): Adjust, in the wake of recent
3734         changes to option processing.
3735
3736 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3737
3738         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
3739         function pointer from pmfs with no object given.
3740         (convert_for_assignment): Do not return error when converting
3741         pmfs.
3742
3743 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
3744
3745         * lex.c (internal_filename): New variable.
3746         (INTERNAL_FILENAME): New macro.
3747         (init_parse): Allocate internal_filename and mark as root.  Use it
3748         instead of a string constant.
3749
3750 1999-09-21  Nathan Sidwell  <nathan@acm.org>
3751
3752         Reimplement dynamic cast and catch matching.
3753         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
3754         * search.c (dynamic_cast_base_recurse): New function.
3755         (get_dynamic_cast_base_type): New function for dynamic cast.
3756         * rtti.c (build_dynamic_cast_1): Determine source and target
3757         class relationship. Call __dynamic_cast_2.
3758         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
3759         (__user_type_info::dyncast): New dynamic cast dispatcher.
3760         (__user_type_info::sub_kind): New nested enumeration.
3761         (__user_type_info::contained_p): sub_kind predicate.
3762         (__user_type_info::contained_public_p): Likewise.
3763         (__user_type_info::contained_nonpublic_p): Likewise.
3764         (__user_type_info::contained_nonvirtual_p: Likewise.
3765         (__user_type_info::upcast_result): New nested struct.
3766         (__user_type_info::dyncast_result): New nested struct.
3767         (*::do_upcast): New catch function.
3768         (*::do_dyncast): New dynamic cast function.
3769         (__user_type_info::find_public_subobj): New dynamic cast
3770         helper dispatcher.
3771         (*::do_find_public_subobj): New dynamic cast helper function.
3772         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
3773         (__user_type_info::dyncast): Define dynamic cast dispatcher.
3774         (*::do_upcast): Define catch function.
3775         (*::do_dyncast): Define dynamic cast function.
3776         (*::do_find_public_subobj): Define dynamic cast helper function.
3777         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
3778         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
3779         (__dynamic_cast_2): New dynamic cast runtime.
3780
3781 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
3782
3783         * cp-tree.h (finish_stmt_expr): Change prototype.
3784         * expr.c (cplus_expand_expr): Adjust call accordingly.
3785         * init.c (finish_init_stmts): Likewise.
3786         * parse.y (primary): Likewise.
3787         * pt.c (tsubst_copy): Likewise.
3788         * semantics.c (finish_stmt_expr): Don't take two parameters.
3789         Don't remove generated BLOCKs from the block-tree.
3790
3791         Remove support for assigning to `this'.
3792         * NEWS: Note that fact.
3793         * class.c (build_vbase_path): Don't check flag_this_is_variable.
3794         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
3795         (language_function): Remove assigns_this, just_assigned_this, and
3796         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
3797         (base_init_expr): Remove.
3798         (current_vcalls_possible_p): New macro.
3799         (vtbls_set_up_p): Likewise.
3800         (emit_base_init): Change prototype.
3801         * decl.c (finish_destructor_body): New function, split out from
3802         finish_function.
3803         (current_function_assigns_this): Remove.
3804         (current_function_just_assigned_this): Likewise.
3805         (start_function): Don't set them.
3806         (finish_function): Don't check them.  Don't emit
3807         base-initialization code here.  Generate code for destructors when
3808         doing semantic analysis.
3809         (finish_stmt): Don't check current_function_just_assigned_this.
3810         * decl2.c (lang_f_options): Remove this-is-variable.
3811         (lang_decode_option): Likewise.
3812         (grokclassfn): Don't check flag_this_is_variable.
3813         * init.c (emit_base_init): Return the expression generated.
3814         (construct_virtual_bases): Don't push/pop obstacks.  Fix
3815         typo.
3816         (build_new_1): Don't check flag_this_is_variable.
3817         (get_temp_regvar): Don't set DECL_REGISTER.
3818         (build_vec_init): Don't call use_variable.
3819         * lang-options.h: Remove "-fthis-is-variable" and
3820         "-fno-this-is-variable".
3821         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
3822         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
3823         expand_expr_stmt.
3824         * semantics.c (finish_expr_stmt_real): Rename to ...
3825         (finish_expr_stmt): This.  Remove assigned_this parameter.
3826         (begin_if_stmt): Call do_pushlevel before starting the statement.
3827         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
3828         blocks.
3829         (setup_vtbl_ptr): Emit initialization code for bases and members
3830         at semantic-analysis time.  Emit code to initialize vtables in
3831         destructors here.
3832         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
3833         Don't handle CTOR_INITIALIZER any more.
3834         * typeck.c (build_modify_expr): Don't check for assignments to
3835         this.
3836         (c_expand_return): Don't suggest assigning to `this'.
3837         
3838         * Makefile.in (decl.o): Depend on RTL_H.
3839         (decl2.o): Likewise.
3840         (class.o): Likewise.
3841         (call.o): Likewise.
3842         (method.o): Likewise.
3843         (search.o): Likewise.
3844         (tree.o): Likewise.
3845         (pt.o): Likewise.
3846
3847         * decl.c (duplicate_decls): When a builtin function is redeclared
3848         as static, make sure it is mangled correctly.
3849
3850         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
3851         detail about the statement-tree.
3852         
3853 1999-09-20  Nathan Sidwell  <nathan@acm.org>
3854
3855         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
3856
3857 1999-09-20  Nick Clifton  <nickc@cygnus.com>
3858
3859         * decl2.c (lang_decode_option): Extend comment.
3860
3861 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
3862
3863         * typeck.c: Include "tm_p.h".
3864
3865 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
3866
3867         * ir.texi: New file.
3868
3869 1999-09-19  Paul Burchard <burchard@pobox.com>
3870
3871         * semantics.c (expand_stmt): Initialize return value.
3872
3873 1999-09-18  Paul Burchard <burchard@pobox.com>
3874
3875         * gxxint.texi: G++ now implements namespaces.
3876         
3877 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
3878
3879         * decl.c (pop_label): Don't warn about unused labels more than
3880         once.
3881         * semantics.c (finish_goto_stmt): Always marked used labels as
3882         used.
3883
3884         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
3885         even when the declaration is external.
3886         (cp_finish_decl): Adjust call to layout_var_decl.
3887         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
3888
3889 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
3890
3891         * typeck.c (get_member_function_from_ptrfunc): Always consider
3892         virtuality inside member pointer.
3893
3894 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
3895
3896         Turn on function-at-a-time processing.  
3897         * cp-tree.h (doing_semantic_analysis_p): New macro.
3898         (SF_DEFAULT): Define to zero, not SF_EXPAND.
3899         (start_handler_parms): Change prototype.
3900         (expand_start_catch_block): Likewise.
3901         (expand_end_catch_block): Likewise.
3902         (expand_start_eh_spec): Likewise.
3903         (expand_end_eh_spec): Declare.
3904         (finish_handler_parms): Change prototype.
3905         (begin_catch_block): Declare.
3906         (finish_handler): Change prototype.
3907         (do_pushlevel): Declare.
3908         (do_poplevel): Likewise.  
3909         * decl.c (pushlevel): Don't create
3910         binding levels when not doing semantic analysis.
3911         (poplevel): Don't pop them.
3912         (pushdecl): Assert that we are never called when not doing
3913         semantic analysis.
3914         (pushdecl_top_level): Use push_to_top_level.
3915         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
3916         label when expanding.
3917         (cp_finish_decl): Only inject for-scope variables when doing
3918         semantic analysis.  Add comments.
3919         (start_handler_parms): Return the handler parm.
3920         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
3921         already set.  Reinitialize from saved function data if available.
3922         Don't pushlevel when not doing semantic analysis.
3923         (store_parm_decls): Only generate RTL when expanding.  Only
3924         pushdecl when doing semantic analysis.  Set
3925         current_eh_spec_try_block if appropriate.
3926         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
3927         Combine common code.  Don't poplevel when not doing semantic
3928         analysis.
3929         (push_cp_function_context): Don't expand functions without an
3930         explicit call to expand_body.
3931         (mark_lang_function): Make eh_spec_try_block and
3932         x_scope_stmt_stack.  
3933         * except.c (expand_end_eh_spec): Don't
3934         declare.
3935         (process_start_catch_block): Likewise.
3936         (push_eh_cleanup): Use finish_decl_cleanup.
3937         (initialize_handler_parm): New function.
3938         (expand_start_catch_block): Use it.
3939         (expand_end_catch_block): Use tree-generation functions, not
3940         RTL-generation functions.
3941         (expand_start_eh_spec): Likewise.
3942         (expand_end_eh_spec): Likewise.
3943         (expand_exception_blocks): Simplify.
3944         (start_anon_func): Use do_pushlevel.
3945         (end_anon_func): Use do_poplvel.  Call expand_body for the
3946         function.  
3947         * expr.c (do_case): Don't call define_case_label.  
3948         * init.c (create_temporary_var): Set DECL_CONTEXT for local
3949         variables.  
3950         * method.c (emit_thunk): Call expand_body for the
3951         thunk.
3952         (sythesize_method): Likewise.  
3953         * parse.y (handler_args): Give it ttype.
3954         (eat_saved_input): Call expand_body.
3955         (base_init): Use do_pushlevel.
3956         (pending_inline): Call expand_body.
3957         (handler): Adjust calls to finish_handler_parms and
3958         finish_handler.
3959         (handler_args): Don't call expand_start_catch_block.  Return the
3960         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
3961         * parse.c: Regenerated.
3962         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
3963         * semantics.c (do_pushlevel): Give it external linkage.  Build
3964         SCOPE_STMTs.
3965         (do_poplevel): Likewise.
3966         (finish_case_label): Call define_case_label when doing semantic
3967         analysis.
3968         (finish_goto_stmt): Create RTL for labels.
3969         (finish_function_try_block): Set in_function_try_handler
3970         unconditionally.
3971         (finish_function_handler_sequence): Unset it.
3972         (finish_handler_parms): Use expand_start_catch_block even when
3973         building a statement-tree.
3974         (begin_catch_block): New function.
3975         (finish_handler): Move a little RTL-generation logic here.
3976         (finish_decl_cleanup): Allow cleanups for empty declarations.
3977         (finish_named_return_value): Don't pushdecl when not doing
3978         semantic analysis.
3979         (expand_stmt): Don't do semantic analysis for variable
3980         declarations.  Handle START_CATCH_STMT.  Call expand_label
3981         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
3982         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
3983         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
3984         RETURN_INIT and function try blocks.
3985         
3986         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
3987         x_scope_stmt_stack.  Add x_in_charge_parm.
3988         (current_eh_spec_try_block): New macro.
3989         (current_scope_stmt_stack): Likewise.
3990         (current_in_charge_parm): Likewise.
3991         * decl.c (start_function): Initialize current_in_charge_parm.
3992         (finish_function): Use current_in_charge_parm rather than looking
3993         up __in_chrg.
3994         * search.c (expand_indirect_vtbls_init): Likewise.
3995
3996         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
3997         (TRY_BLOCK): Likewise.
3998         (HANDLER): Likewise.
3999         (START_CATCH_STMT): New tree node.
4000         (SCOPE_STMT): Likewise.
4001         * cp-tree.h (SCOPE_BEGIN_P): New macro.
4002         (SCOPE_NULLIFIED_P): Likewise.
4003         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
4004         (struct lang_decl): Add saved_language_function.
4005         (DECL_PENDING_INLINE_INFO): Adjust documentation.
4006         (DECL_PENDING_INLINE_P): New macro.
4007         (TYPE_TI_ARGS): Fix typo in comment.
4008         (DECL_SAVED_TREE): Add to documentation.
4009         (DECL_SAVED_FUNCTION_DATA): New macro.
4010         (START_CATCH_TYPE): Likewise.
4011         (SCOPE_END_P): New macro.
4012         (declare_parm_level): Don't declare.
4013         * decl.c (mark_lang_function): New function, split out from
4014         mark_cp_function_context.
4015         (save_function_data): New function.
4016         (declare_parm_level): Remove.
4017         (finish_function): Use save_function_data to squirrel away
4018         important stuff for later use.
4019         (mark_cp_function_context): Use mark_function_data.
4020         (lang_mark_tree): Likewise.
4021         * lex.c (begin_definition_of_inclass_inline): Set
4022         DECL_PENDING_INLINE_P.
4023         (store_pending_inline): Clear it.
4024         * pt.c (tsubst_decl): Likewise.
4025
4026 1999-09-17  Nathan Sidwell  <nathan@acm.org>
4027
4028         * call.c (perform_implicit_conversion): Deal with error_mark_node.
4029
4030 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
4031
4032         * decl.c (warn_extern_redeclared_static): Don't get confused by
4033         static member functions.
4034         (duplicate_decls): Merge DECL_THIS_STATIC.
4035
4036         * decl.c (expand_static_init): Make sure assignments to local
4037         statics actually occur.
4038
4039 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
4040
4041         * cp-tree.h (poplevel_class): Declare.
4042         * class.c (popclass): Use poplevel_class, not poplevel.
4043         * decl.c (poplevel_class): Don't make it static.  Don't return a
4044         value.
4045         (poplevel): Don't call poplevel_class; abort in a class
4046         binding level is seen.
4047         * semantics.c (finish_translation_unit): Use pop_everything.
4048         * parse.y (member_init): Allow errors.
4049         (pending_inline): Call finish_function.
4050         * parse.c: Regenerated.
4051         * Makefile.in (CONFLICTS): Adjust.
4052
4053 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
4054         
4055         * error.c: Reduce code duplication.
4056         (dump_template_value): New function.
4057         (dump_type_real): Use it.
4058         (dump_decl): Likewise.
4059         (dump_function_name): Likewise.
4060         (dump_function_decl): Don't be too talkative about function return
4061         type variety.
4062
4063 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4064
4065         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
4066
4067         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
4068
4069 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
4070
4071         * decl2.c (finish_file): Also call check_global_declarations for
4072         the pending_statics list.
4073
4074 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
4075
4076         * lex.c (cp_pragma_implementation): Allow #pragma implementation
4077         in header files.
4078
4079 1999-09-15  Richard Henderson  <rth@cygnus.com>
4080
4081         * lex.c (mark_impl_file_chain): Follow the next chain.
4082
4083 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
4084
4085         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
4086         problems with extern "C" functions redeclared as static.
4087         (duplicate_decls): When a builtin is redeclared static, make the
4088         new function have internal linkage.
4089         
4090 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
4091
4092         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
4093         * pt.c (tsubst_copy): Likewise.
4094         * tree.c (search_tree): Likewise.
4095         (mapcar): Likewise.
4096
4097 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4098
4099         * typeck2.c (ack): Don't declare progname.
4100
4101 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
4102
4103         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
4104         filenames with ggc_alloc_string.
4105
4106 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
4107
4108         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
4109         TARGET_EXPR.
4110         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
4111         the TARGET_EXPR.
4112         * cvt.c (build_up_reference): Likewise.
4113         * tree.c (build_cplus_new): Likewise.
4114         (get_target_expr): Likewise.
4115         
4116 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
4117
4118         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
4119
4120 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
4121
4122         * cp-tree.h (build_target_expr): New function.
4123         * call.c (build_conditional_expr): Use build_target_expr.
4124         (convert_like): Likewise.
4125         (build_over_call): Likewise.
4126         * cvt.c (build_up_reference): Likewise.
4127         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
4128         (destroy_local_var): Here.
4129         (build_target_expr): New function.
4130         * tree.c (build_cplus_new): Use it.
4131         (get_target_expr): Likewise.
4132
4133 1999-09-13  Nathan Sidwell  <nathan@acm.org>
4134
4135         * typeck.c (expr_sizeof): Don't decay arrays and functions.
4136         Remove misleading comment.
4137         (build_compound_expr): Don't decay arrays.
4138
4139 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
4140
4141         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
4142         class rvalues again.
4143
4144 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4145
4146         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
4147
4148         * g++spec.c: Include gcc.h.
4149         (lang_specific_driver): Constify a char*.  Call xcalloc, not
4150         xmalloc/bzero.  All calls to the function pointer parameter now
4151         explicitly call `fatal'.
4152
4153 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
4154
4155         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
4156         * cvt.c (ocp_convert): Complete the from and destination types.
4157         Adjust warning about functions always being `true' in conditionals.
4158         * decl.c (duplicate_decls): Don't play funny games with abort.
4159         * error.c (dump_expr): Handle OVERLOADs.
4160         * spew.c (probe_obstack): Remove.
4161         * typeck.c (condition_conversion): Use perform_implicit_conversion.
4162         
4163 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
4164
4165         * cp-tree.h (auto_function, define_function): Adjust prototypes.
4166         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
4167         changed.
4168         (auto_function): Likewise, for CODE arg.
4169         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
4170         (builtin_function): ... here.
4171
4172 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
4173
4174         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
4175         (init_decl_processing): Don't set TREE_PERMANENT for the
4176         error_mark_node.
4177         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
4178         (grokdeclarator): Likewise.
4179         (grokparms): Don't check TREE_PERMANENT when building up lists.
4180         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
4181         (mark_inline_for_output): Likewise.
4182         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
4183         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
4184         * lex.c (check_newline): Don't check ggc_p; it is always one.
4185         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
4186         * spew.c (yylex): Don't copy_node or probe_obstacks for
4187         non-permanent CONSTANTs and STRINGs.
4188         * tree.c (build_cplus_array_type_1): Don't fuss with
4189         TREE_PERMANENT on ARRAY_TYPEs.
4190         
4191         * cp-tree.def (CLEANUP_STMT): New node.
4192         * cp-tree.h (language_function): Add name_declared.
4193         (current_function_name_declared): New macro.
4194         (CLEANUP_DECL): New macro.
4195         (CLEANUP_EXPR): Likewise.
4196         (emit_local_var): Likewise.
4197         (finish_decl_cleanup): New function.
4198         * cvt.c (build_up_reference): Simplify.
4199         (ocp_convert): Remove dead code.
4200         * decl.c (start_decl): Remove call to add_decl_stmt.
4201         (grok_reference_init): Adjust, to handle bindings temporaries to
4202         references.  Remove dead code.
4203         (initialize_local_var): Don't generate RTL for
4204         declarations here, or build cleanups here.  Don't fuss with
4205         obstacks.  Replace expand_start_target_temps calls with explicit
4206         setting of stms_are_full_exprs_p.
4207         (destroy_local_var): New function.
4208         (emit_local_var): Likewise.
4209         (cp_finish_decl): Use them, as appropriate.
4210         (start_function): Announce template functions.
4211         (store_parm_decls): Don't call declare_function_name here.
4212         (finish_stmt): Don't start emit base-initialization code when just
4213         building the statement-tree.
4214         * init.c (create_temporary_var): Move add_decl_stmt call ...
4215         (get_temp_regvar): Here.
4216         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
4217         cp_finish_decl would expect.  Don't call add_decl_stmt.
4218         * semantics.c (begin_compound_stmt): Call declare_function_name,
4219         if appropriate.
4220         (finish_decl_cleanup): New function.
4221         (expand_stmt): Use emit_local_var to output variables.          
4222         (expand_body): Set current_funtion_name_declared.
4223         
4224 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
4225
4226         * cp-tree.h (finish_cleanup_try_block): New function.
4227         * semantics.c (finish_cleanup_try_block): Add comment.
4228
4229 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
4230
4231         * cp-tree.h: Delete declarations for all tree nodes now moved to
4232         global_trees.
4233         * decl.c: Delete their definitions.
4234         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
4235         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
4236         provide defaults.
4237         (init_decl_processing): Call build_common_tree_nodes and
4238         build_common_tree_nodes_2 instead of building their nodes here.
4239         Don't add gc roots for them.
4240
4241 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
4242
4243         * cp-tree.h (language_function): Rename expanding_p to
4244         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
4245         (expanding_p): Adjust accordingly.
4246         (TREE_VIA_PRIVATE): Fix typo in comment.
4247         (DECL_REFERENCE_SLOT): Remove.
4248         (SET_DECL_REFERENCE_SLOT): Likewise.
4249         * decl.c (named_label_uses): Adjust. Remove chicken comment.
4250         (push_overloaded_decl): Don't truncate the chain of bindings when
4251         adding an overloaded function.
4252         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
4253         (initialize_local_var): Fix typo in comment.
4254         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
4255         * decl2.c (start_objects): Make the fact that we are expanding
4256         the generated function right away explicit.
4257         (start_static_storage_duration_function): Likewise.
4258         (finish_file): Fix typo in comment.
4259         * init.c (build_vec_init): Correct bugs in handling cleanups.
4260         * semantics.c (maybe_convert_cond): New function.
4261         (FINISH_COND): Always store the condition, even if there's
4262         a declaration.
4263         (finish_if_stmt_cond): Use maybe_convert_cond.
4264         (finish_while_stmt_cond): Likewise.
4265         (finish_do_stmt): Likewise.
4266         (finish_for_cond): Likewise.
4267         (expand_cond): Adjust.
4268         
4269         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
4270         * init.c (perform_member_init): Remove obstack machinations.
4271         (expand_cleanup_for_base): Likewise.
4272         (finish_init_stmts): Mark the statement-expression as used.
4273         * method.c (emit_thunk): Use tree-generating functions, not
4274         RTL.
4275         (do_build_copy_constructor): Likewise.
4276         (do_build_assign_ref): Likewise.
4277         (synthesize_method): Likewise.  Keep track of line numbers.
4278         * pt.c (tsubst_expr): Handle various kinds of try blocks.
4279         * semantics.c (expand_stmts): Remove.
4280         (begin_function_try_block): Set FN_TRY_BLOCK_P.
4281         (finish_function_try_block): Be careful rechaining 
4282         function try blocks.
4283         (expand_stmt): Loop through all the statements at a given level.
4284         (exapnd_body): Be careful with line-numbers here too.  Prepare for
4285         being called directly from the parser.
4286
4287         * cp-tree.h (finish_function): Adjust prototype.
4288         * decl.c (finish_function): Return the function compiled.
4289         * pt.c (instantiate_decl): Don't play games with obstacks.
4290         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
4291         (search_tree): Likewise.
4292         * typeck.c: Fix typo in comment.
4293         * typeck2.c (store_init_value): Add comment.
4294
4295         * cp-tree.h (CPTI_ATEXIT): New macro.
4296         (atexit_node): Likewise.
4297         * decl.c (destroy_local_static): New function, broken out from ...
4298         (expand_static_init): Here.
4299
4300         * rtti.c (get_tinfo_var): These should always be global
4301         (expand_si_desc): Use tree, not RTL, functions to generate code.
4302         (expand_class_desc): Likewise.
4303         (expand_ptr_desc): Likewise.
4304         (expand_attr_desc): Likewise.
4305         (expand_generic_desc): Likewise.
4306         (synthesize_tinfo_fn): Likewise.
4307
4308 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
4309
4310         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
4311         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
4312         RECHAIN_STMTS. 
4313         (RECHAIN_STMST_FROM_CHAIN): Likewise.
4314
4315         * parse.y (simple_stmt): Fix typo in last change.
4316
4317         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
4318         (STMT_IS_FULL_EXPR_P): Likewise.
4319         (STMT_LINENO_FOR_FN_P): Likewise.
4320         (prep_stmt): New function.
4321         (building_stmt_tree): Tweak for safety.
4322         * pt.c (tsubst_expr): Use prep_stmt throughout.
4323         (add_tree): Move it to semantics.c
4324         * semantics.c (add_tree): Move it here.
4325         (finish_expr_stmt_real): New function.
4326         (finish_expr_stmt): Use it.
4327         (finish_if_stmt_cond): Use FINISH_COND.
4328         (finish_while_stmt_cond): Likewise.
4329         (finish_for_cond): Likewise.
4330         (finish_stmt_tree): Tweak line-number handling.
4331         (prep_stmt): New function.
4332         (expand_stmt): Use it.
4333         
4334         * cp-tree.h (begin_switch_stmt): Adjust prototype.
4335         (finish_switch_cond): Likewise.
4336         * parse.y (simple_stmt): Adjust accordingly.
4337         * parse.c: Regenerated.
4338         * pt.c (tsubst_expr): Adjust accordingly.
4339         * semantics.c (expand_cond): New function.
4340         (FINISH_COND): New macro.
4341         (begin_switch_stmt): Build the SWITCH_STMT here.
4342         (finish_switch_stmt_cond): Not here.
4343         (expand_stmt): Adjust calls to begin_switch_stmt and
4344         finish_switch_cond.  Use expand_cond throughout.
4345
4346         * dump.c (dequeue_and_dump): Dump types for constants.
4347         Describe DECL_ARG_TYPE more intuitively.
4348         Handle ARRAY_REF.
4349
4350         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
4351         (lang_cleanup_tree): Remove.
4352         * lex.c (make_lang_type): Use ggc_alloc to allocate
4353         TYPE_LANG_SPECIFIC.
4354
4355         Reorganize per-function data.
4356         * cp-tree.h (saved_scope): Add function_decl, bindings.
4357         (language_function): Rename binding_level to bindings.
4358         (cp_function_chain): Use the current_function, not the
4359         outer_function_chain.
4360         (current_class_ptr): Make it work, even when there's no 
4361         current function.
4362         (current_class_ref): Likewise.
4363         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
4364         macros.
4365         (clear_temp_name): Remove.
4366         * decl.c (check_function_type): New function, broken out from
4367         start_function.
4368         (current_binding_level): Adjust definition.
4369         (pushlevel): Simplify.
4370         (poplevel): Don't use named_label_uses when we're outside
4371         a function scope.
4372         (mark_saved_scope): Mark function_decl and bindings.
4373         (maybe_push_to_top_level): Don't unconditionally push a new
4374         function context.  Save bindings and the current_function_decl.
4375         Don't clear named_labels.
4376         (pop_from_top_level): Pop function context if appropriate.
4377         (init_decl_processing): Set init_lang_status and free_lang_status,
4378         rather than save_lang_status and restore_lang_status.
4379         (start_function): Take SF_* flags.  Don't clear per-function data.
4380         Reorder and simplify to use new per-function data code.  Add
4381         asserts.
4382         (store_parm_decls): Don't call init_function_start here.
4383         (finish_function): Adjust for new handling of per-function data.
4384         (push_cp_function_context): Simplify.
4385         (mark_cp_function_context): Change binding_level to bindings.
4386         * decl2.c (clear_temp_name): Remove.
4387         (start_objects): Use SF flags to start_function.
4388         (start_static_storage_duration_function): Likewise.
4389         * except.c (start_anon_func): Remove redundant calls to 
4390         push_function_context_to.  Use SF flags to start function.
4391         (end_anon_func): Remove redundant call to pop_function_context
4392         from.
4393         * lex.c (reinit_parse_for_function): Don't initialize per-function 
4394         data.
4395         * method.c (emit_thunk): Clear current_function after calling
4396         assemble_end_function.  Use SF flags for start_function.
4397         (synthesize_method): Use SF flags for start_function.
4398         * parse.c: Regenerated.
4399         * parse.y (fn.defpen): Likewise.
4400         (pending_inline): Clear current_function, even if something goes
4401         wrong.
4402         * pt.c (instantiate_decl): Use SF flags to start_function.
4403         Don't save and restore expanding_p.
4404         (add_tree): Handle the case where we are outside any function.
4405         (end_tree): Likewise.
4406         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
4407         * semantics.c (begin_function_definition): Likewise.
4408         (expand_body): Likewise.
4409         
4410 1999-09-09  Nathan Sidwell  <nathan@acm.org>
4411
4412         * cp-tree.h (convert_to_void): Prototype new function.
4413         (require_complete_type_in_void): Remove prototype.
4414         * cvt.c (convert_to_void): New function.
4415         (ocp_convert): Use convert_to_void.
4416         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
4417         expressions.
4418         * typeck.c (require_complete_type_in_void): Remove function.
4419         (build_compound_expr): Use convert_to_void.
4420         (build_static_cast): Likewise.
4421         (build_c_cast): Likewise.
4422         * semantics.c (finish_expr_stmt): Do not decay full expressions.
4423         
4424         * typeck.c (build_x_compound_expr): Add FIXME.
4425
4426 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
4427
4428         * cp-tree.h (scratch_tree_cons): Remove.
4429         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
4430         and perm_tree_cons with plain tree_cons.
4431         * class.c: Likewise.
4432         * decl.c: Likewise.
4433         * decl2.c: Likewise.
4434         * except.c: Likewise.
4435         * expr.c: Likewise.
4436         * init.c: Likewise.
4437         * lex.c: Likewise.
4438         * method.c: Likewise.
4439         * parse.y: Likewise.
4440         * pt.c: Likewise.
4441         * repo.c: Likewise.
4442         * rtti.c: Likewise.
4443         * search.c: Likewise.
4444         * typeck.c: Likewise.
4445         * parse.c: Regenerated.
4446         * tree.c (build_srcloc): Simplify.
4447         
4448 1999-09-08  Bruce Korb  autogen@linuxbox.com
4449
4450         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
4451
4452 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
4453
4454         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
4455         Remove next.
4456         (LANG_DECL_PERMANENT): Remove.
4457         * decl.c (duplicate_decls): Don't mess about with obstacks trying
4458         to free memory.
4459         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
4460         * lex.c (free_lang_decl_chain): Remove.
4461         (build_lang_decl): Don't use obstacks.
4462         (retrofit_lang_decl): Likewise.
4463         (copy_lang_decl): Likewise.
4464
4465         * cp-tree.h (saved_scope): Remove old_binding_level and 
4466         function_decl.  Tidy up.
4467         * decl.c (mark_saved_scope): Don't set them.
4468         (maybe_push_to_top_level): Clear memory.
4469
4470         * decl.c (layout_var_decl): Change prototype.  Don't complete
4471         types for external objects.
4472         (check_initializer): Likewise.  Tidy.
4473         (initialize_local_var): Complete types here.
4474         (cp_finish_decl): Not here.  Reorganize a little.
4475         (grokvardecl): Don't complete types here.
4476
4477         * decl.c (start_function): Clear last_dtor_insn and
4478         last_parm_cleanup_insn. 
4479         (push_cp_function_context): Just copy over a little of
4480         the old context, not all of it.
4481
4482         * cp-tree.h (copy_to_permanent): Remove.
4483         (permanent_p): Likewise.
4484         * decl.c (building_typename_type): Don't use copy_to_permanent.
4485         (start_decl): Likewise.
4486         (grok_reference_init): Likewise.
4487         (cp_finish_decl): Likewise.
4488         * init.c (build_new_1): Don't use mapcar.
4489         (build_vec_delete_1): Don't use copy_to_permanent.
4490         (build_vec_init): Likewise.
4491         * parse.y (primary): Likewise.
4492         * parse.c: Regenerated.
4493         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
4494         (lookup_template_class): Likewise.
4495         (tsubst_friend_function): Likewise.
4496         (instantiate_class_template): Likewise.
4497         (tsubst_decl): Likewise.
4498         (tsubst): Likewise.
4499         (instantiate_template): Likewise.
4500         (unify): Likewise.
4501         * rtti.c (get_tinfo_fn): Likewise.
4502         (build_dynamic_cast): Likewise.
4503         * semantics.c (finish_if_stmt_cond): Likewise.
4504         (finish_while_stmt_cond): Likewise.
4505         (finish_do_stmt): Likewise.
4506         (finish_for_cond): Likewise.
4507         (finish_for_expr): Likewise.
4508         (finish_cleanup): Likewise.
4509         (add_decl_stmt): Likewise.
4510         (finish_named_return_value): Likewise.
4511         (finish_qualified_call_expr): Likewise.
4512         * tree.c (perm_manip): Remove.
4513         (build_exception_variant): Don't use copy_to_permanent.
4514         (permanent_p): Remove.
4515         (copy_to_permament): Remove.
4516         (build_min_nt): Don't use copy_to_permanent.
4517         (build_min): Likewise.
4518         (min_tree_cons): Likewise.
4519         * typeckc.c (build_static_cast): Likewise.
4520         (build_reinterpret_cast): Likewise.
4521         (build_const_cast): Likewise.
4522         
4523 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
4524
4525         * decl.c (ggc_p): Set it to 1.
4526         (mark_saved_scope): Add prototype.
4527
4528 1999-09-07  Richard Henderson  <rth@cygnus.com>
4529
4530         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
4531         * typeck.c (self_promoting_args_p): Delete.
4532
4533 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
4534
4535         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
4536         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
4537
4538 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
4539
4540         * Makefile.in (tree.o): Depend on ggc.h.
4541         * class.c (make_method_vec): Remove.
4542         (free_method_vec): Likewise.
4543         (free_method_vecs): Remove.
4544         (add_method): Don't use them.
4545         * cp-tree.def (PTRMEM_CST): Make it longer.
4546         (TEMPLATE_PARM_INDEX): Make it shorter.
4547         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
4548         (template_parm_index): Remove RTL field.
4549         (ptrmem_cst): Add RTL field.
4550         (finish_function): Removed parameter.
4551         (process_next_inline): Change prototype.
4552         (init_cplus_unsave): Rename to init_tree.
4553         (binding_init): Remove.
4554         * decl.c (free_binding_nodes): Remove.
4555         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
4556         (pop_binding): Don't use free_binding_nodes.
4557         (free_binding_vecs): Remove.
4558         (store_bindings): Don't use them.
4559         (pop_from_top_level): Likewise.
4560         (lookup_namespace_name): Simplify.
4561         (build_typename_type): Don't use obstack_free.
4562         (unqualified_namespace_lookup): Simplify.
4563         (lookup_name_real): Simplify.
4564         (start_function): Remove comment about leaks.
4565         (finish_function): Removed nested parameter.  Call
4566         expand_end_bindings even when building_stmt_tree.
4567         Call ggc_push_context and ggc_pop_context around
4568         rest_of_compilation, if necessary.
4569         (mark_cp_function_context): Handle a NULL language-context.
4570         (lang_mark_false_label_stack): Fix typo.
4571         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
4572         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
4573         pointer to method types.
4574         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
4575         * decl2.c (finish_objects): Adjust call to finish_function.
4576         (finish_static_store_duration_function): Likewise.
4577         (do_nonmember_using_decl): Remove call to binding_init.
4578         * except.c (end_anon_func): Adjust call to finish_function.
4579         * lex.c (mark_impl_file_chain): New function.
4580         (init_parse): Call init_tree, not init_cplus_unsave.
4581         Add GC roots.
4582         (cp_pramga_interface): Use xmalloc, not permalloc.
4583         (cp_pragma_implementation): Likewise.
4584         (begin_definition_of_inclass_inline): Simplify.
4585         (process_next_inline): Adjust prototype.
4586         (do_scoped_id): Don't call binding_init.
4587         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
4588         * method.c (emit_thunk): Adjust call to finish_function.
4589         (synthesize_method): Likewise.
4590         * parse.y (%union): Add a new `pi' variant.
4591         (PRE_PARSED_FUNCTION_DECL): Use it.
4592         (fn.defpen): Likewise.
4593         (fndef): Adjust call to finish_function.
4594         * pt.c (instantiate_decl): Likewise.
4595         * rtti.c (syntheisze_tinfo_fn): Likewise.
4596         * semantics.c (expand_body): Likewise.
4597         * tree.c: Include ggc.h.
4598         (mark_list_hash): New function.
4599         (binding_init): Remove.
4600         (init_cplus_unsave): Rename to ...
4601         (init_tree): This.  Add GC roots.
4602         
4603 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
4604
4605         Get ready for garbage collection.
4606         * Makefile.in (CXX_TREE_H): Add varray.h
4607         (lex.o): Depend on ggc.h.
4608         (decl.o): Likewise.
4609         (decl2.o): Likewise.
4610         (method.o): Likewise.
4611         (search.o): Likewise.
4612         (pt.o): Likewise.
4613         (repo.o): Likewise.
4614         * class.c: Include ggc.h.
4615         (current_class_name): Remove.
4616         (current_class_type): Likewise.
4617         (current_access_specifier): Likewise.
4618         (previous_class_type): Likewise.
4619         (previous_class_values): Likewise.
4620         (class_cache_firstobj): Likewise.
4621         (current_lang_base): Likewise.
4622         (current_lang_stack): Likewise.
4623         (current_lang_stacksize): Likewise.
4624         (lang_name_c): Likewise.
4625         (lang_name_cplusplus): Likewise.
4626         (lang_name_java): Likewise.
4627         (current_lang_name): Likewise.
4628         (base_layout_decl): Likewise.
4629         (access_default_node): Likewise.
4630         (access_public_node): Likewise.
4631         (access_protected_node): Likewise.
4632         (access_private_node): Likewise.
4633         (access_default_virtual_node): Likewise.
4634         (access_public_virtual_node): Likewise.
4635         (access_protected_virtual_node): Likewise.
4636         (access_private_virtual_node): Likewise.
4637         (signed_zero_node): Likewise.
4638         (init_class_processing): Don't build base_layout_decl.
4639         (push_lang_context): Adjust now that current_lang_base is a varray.
4640         (pop_lang_context): Likewise.
4641         * cp-tree.h: Include varray.h.
4642         (cp_global_trees): Add access_default, access_public,
4643         access_protected, access_private, access_default_virtual,
4644         access_public_virtual, access_protected_virtual,
4645         access_private_virtual, ctor_identifier, delta2_identifier, 
4646         delta_identifier, dtor_identifier, in_charge_identifier,
4647         index_identifier, nelts_identifier, this_identifier,
4648         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
4649         lang_name_c, lang_name_cplusplus, lang_name_java,
4650         empty_except_spec, null, jclass, minus_one, terminate.
4651         (saved_scope): Move here from decl.c.  Define globals in terms of
4652         saved_scope: current_namespace, current_class_name,
4653         current_class_type, current_access_specifier, current_lang_stack,
4654         current_lang_base, current_lang_name, current_function_parms,
4655         current_template_parms, processing_template_decl,
4656         processing_specialization, processing_explicit_instantiation,
4657         previous_class_type, previous_class_values, class_cache_firstobj.
4658         (scope_chain): New variable.
4659         (init_pt): New function.
4660         * decl.c (current_namespace): Remove.
4661         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
4662         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
4663         (delta_identifier, delta2_identifier): Likewise.
4664         (pfn_or_delta2_identifier, tag_identifier): Likewise
4665         (vt_off_identifier, empty_except_spec, null_node): Likewise.
4666         (current_function_parms, current_lang_base): Remove.
4667         (current_lang_stack, previous_class_values): Remove.
4668         (class_binding_level): Macroize.
4669         (saved_scope): Remove.
4670         (current_saved_scope): Rename to scope_chain.
4671         (mark_saved_scope): Adjust for new scope structure.
4672         (maybe_push_to_top_level): Likewise.
4673         (pop_from_top_level): Likewise.
4674         (duplicate_decls): Adjust now that current_lang_base is a varray.
4675         (build_typename_type): Call ggc_add_tree_hash_table_root.
4676         (init_decl_processing): Call init_pt.  Call push_to_top_level to
4677         set up globals.  Add GC roots.
4678         (xref_basetypes): Adjust now that current_lang_base is a varray.
4679         * decl.h (this_identifier): Remove.
4680         (in_charge_identifier): Likewise.
4681         * decl2.c: Don't include varray.h.
4682         (current_namespace): Remove.
4683         (init_decl2): Add GC roots.
4684         * except.c (Terminate): Remove. 
4685         (init_exception_processing): Use terminate_node instead.
4686         (build_terminate_handler): Likewise.
4687         * init.c (nc_nelts_field_id): Remove.
4688         (minus_one): Likewise.
4689         (init_init_processing): Use minus_one_node and nelts_identifier
4690         instead.  Add GC roots.
4691         (jclass_node): Remove.
4692         (build_new_1): Use nelts_identifier.
4693         (build_vec_init): Likewise.
4694         (build_vec_delete): Likewise.
4695         * lex.c: Include ggc.h.
4696         (defarg_fn): Move declaration early.
4697         (defarg_parms): Likewise.
4698         (init_parse): Add GC roots.
4699         (handle_cp_pragma): Remove redundant declaration of
4700         pending_vtables.
4701         * method.c: Include ggc.h.
4702         (btypelist): Make it a varray.  All uses changed.
4703         (ktypelist): Likewise.
4704         (init_method): Add GC roots.
4705         * pt.c: Don't include varray.h.  Include ggc.h.
4706         (current_template_parms): Remove.
4707         (processing_template_decl): Likewise.
4708         (processing_specialization): Likewise.
4709         (processing_explicit_instantiation): Likewise.
4710         (init_pt): New function.
4711         * repo.c: Include ggc.h.
4712         (init_repo): Add GC roots.
4713         * search.c: Don't include varray.h.
4714         (_vptr_name): Remove.
4715         (lookup_field_1): Use vtpr_identifier instead.
4716         (expand_indirect_vtbls_init): Remove redundant declaration of
4717         in_charge_identifier.
4718         (init_search_processing): Use vptr_identifier.
4719         
4720 1999-09-05  Richard Henderson  <rth@cygnus.com>
4721             Bernd Schmidt <bernds@cygnus.co.uk>
4722             Mark Mitchell  <mark@codesourcery.com>
4723
4724         * Makefile.in (parse.o): Depend on ggc.h.
4725         (decl2.o): Depend on ggc.h.
4726         (init.o): Depend on ggc.h.
4727         * cp-tree.h (init_decl2): Declare.
4728         (cp_parse_init): Likewise.
4729         * decl.c (ggc_p): Define to zero.
4730         (mark_saved_scope): New function.
4731         (init_decl_processing): Call cp_parse_init, and cp_decl2.
4732         Register GC roots.
4733         (expand_static_init): Add GC roots.
4734         * decl2.c: Include ggc.h.
4735         (init_decl2): New function.
4736         * init.c: Include ggc.h.
4737         (init_init_processing): Add GC roots.
4738         * parse.y: Include ggc.h.
4739         (cp_parse_init): New function.
4740         
4741 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
4742
4743         * decl.c (init_decl_processing): Set mark_lang_status.
4744         (lang_mark_false_label_stack): Adjust prototype.
4745         * decl2.c (grok_function_init): Remove extraneous declaration of
4746         abort_fndecl.
4747
4748         * Make-lang.in (cc1plus): Remove dependency on GGC.
4749         * Makefile.in (OBJS): Don't mention ggc-simple.o.
4750         (OBJDEPS): Don't mention ggc-simple.o.
4751
4752         * Make-lang.in (cc1plus): Depend on $(GGC).
4753         * Makefile.in (OBJS): Add ggc-simple.o.
4754         (OBJDEPS): Likewise.
4755         * cp-tree.h (language_function): Rename members to `x_' versions;
4756         we now have x_named_labels, x_ctor_label, x_dtor_label,
4757         x_base_init_list, x_member_init_list, x_base_init_expr,
4758         x_current_class_ptr, x_current_class_ref, x_last_tree,
4759         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
4760         x_result_rtx. 
4761         (dtor_label, ctor_label, current_base_init_list,
4762         current_member_init_list, base_init_expr, current_class_ptr,
4763         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
4764         * decl.c: Include ggc.h.
4765         (last_dtor_insn): Adjust to use x_ names.
4766         (last_parm_cleanup_insn): Likewise.
4767         (original_result_rtx): Likewise.
4768         (named_labels): Likewise.
4769         (mark_binding_level): New function.
4770         (mark_cp_function_context): Likewise.
4771         (mark_false_label_stack): Likewise.
4772         (lang_mark_tree): Likewise.
4773         (lang_cleanup_tree): Likewise.
4774         
4775 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
4776
4777         * Makefile.in (CXX_TREE_H): Include function.h.
4778         (decl.o): Don't depend on function.h.
4779         (decl2.o): Likewise.
4780         (typeck.o): Likewise.
4781         (init.o): Likewise.
4782         (method.o): Likewise.
4783         * cp-tree.h: Include function.h.
4784         (cp_function): Rename to language_function.  Remove next.
4785         (cp_function_chain): Make it a macro, not a variable.
4786         (push_cp_function_context): Don't declare.
4787         (pop_cp_function_context): Likewise.
4788         * decl.c: Don't include function.h.
4789         (push_cp_function_context): Make it static.  Make it suitable for
4790         a save_lang_status callback.
4791         (pop_cp_function_context): Likewise.
4792         (maybe_push_to_top_level): Call push_function_context_to, not
4793         push_cp_function_context.
4794         (pop_from_top_level): Call pop_function_context_from, not
4795         pop_cp_function_context.
4796         (init_decl_processing):  Set save_lang_status and
4797         restore_lang_status.  Call push_function_context_to, not
4798         push_cp_function_context.
4799         (cp_function_chain): Remove.
4800         * decl2.c: Don't include function.h.
4801         * except.c: Don't include function.h.
4802         (start_anon_func): Call push_function_context_to, not
4803         push_cp_function_context.
4804         (end_anon_func):  Call pop_function_context_from, not
4805         pop_cp_function_context.
4806         * init.c: Don't include function.h.
4807         * lex.c (begin_definition_of_inclass_inline): Call
4808         push_function_context_to, not push_cp_function_context. 
4809         (process_next_inline):  Call pop_function_context_from, not
4810         pop_cp_function_context.
4811         * method.c: Don't include function.h.
4812         (synthesize_method): Call push_function_context_to, not
4813         push_cp_function_context.  Call pop_function_context_from, not
4814         pop_cp_function_context.
4815         * typeck.c: Don't include function.h.
4816         
4817         * decl.c (expand_static_init): Tweak handling of static
4818         initializations for objects without constructors.
4819
4820 1999-09-03  Nathan Sidwell  <nathan@acm.org>
4821
4822         * typeck.c (build_indirect_ref): Reject dereference of pointer to
4823         void.
4824
4825 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
4826
4827         * cp-tree.h (cp_function): Move here, from decl.c.
4828         (cp_function_chain): Declare.
4829         (dtor_label): New macro, instead of variable.
4830         (ctor_label): Likewise.
4831         (current_base_init_list): Likewise.
4832         (current_member_init_list): Likewise.
4833         (base_init_expr): Likewise.
4834         (current_class_ptr): Likewise.
4835         (current_class_ref): Likewise.
4836         (last_tree): Likewise.
4837         (last_expr_type): Likewise.
4838         (current_function_returns_value): Likewise.
4839         (current_function_returns_null): Likewise.
4840         (current_function_just_assigned_this): Likewise.
4841         (current_function_parms_stored): Likewise.
4842         (temp_name_counter): Likewise.
4843         (static_labelno): Likewise.
4844         (expanding_p): Likewise.
4845         (stmts_are_full_exprs_p): Likewise.
4846         (in_function_try_handler): Likewise.
4847         (lang_type): Remove nested type_flags.  All uses changed.
4848         * call.c (ctor_label): Remove.
4849         (dtor_label): Likewise.
4850         * class.c (current_class_ptr): Remove.
4851         (current_class_ref): Likewise.
4852         * decl.c (static_labelno): Remove.
4853         (dtor_label): Likewise.
4854         (last_dtor_insn): New macro, instead of variable.
4855         (last_parm_cleanup_insn): Likewise.
4856         (original_result_rtx): Likewise.
4857         (in_function_try_handler): Remove.
4858         (named_label_uses): New macro, instead of variable.
4859         (named_labels): Likewise.
4860         (current_function_returns_value): Remove.
4861         (current_function_returns_null): Likewise.
4862         (current_function_assigns_this): New macro, instead of variable.
4863         (current_function_just_assigned_this): Likewise.
4864         (current_binding_level): Likewise.
4865         (init_decl_processing): Call push_cp_function_context.
4866         (cp_function): Move to cp-tree.h
4867         (cp_function_chain): Make it global.
4868         (temp_name_counter): Remove.
4869         (push_cp_function_context): Simplify.
4870         (pop_cp_function_context): Likewise.
4871         * decl2.c (temp_name_counter): Remove.
4872         * init_c (current_base_init_list): Likewise.
4873         (current_member_init_list): Likewise.
4874         (base_init_expr): Likewise.
4875         * method.c (static_labelno): Likewise.
4876         * pt.c (last_tree): Likewise.
4877         * semantics.c (expanding_p): Likewise.
4878         (stmts_are_full_exprs_p): Likewise.
4879         (last_expr_type): Likewise.
4880         * typeck.c (dtor_label): Likewise.
4881         (ctor_label): Likewise.
4882         
4883 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
4884
4885         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
4886         (arg_assoc_class): Use arg_assoc_template_arg for template
4887         arguments. 
4888         (arg_assoc): Likewise.
4889         * pt.c (mangle_class_name_for_template): Allow member template
4890         template arguments.
4891
4892 1999-09-02  Nathan Sidwell  <nathan@acm.org>
4893
4894         * call.c (build_conditional_expr): Warn on enum mismatches.
4895         (convert_arg_to_ellipsis): Move non-pod check to after
4896         conversion.
4897
4898 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4899
4900         * gxx.gperf (hash, is_reserved_word): Add prototypes.
4901
4902         * init.c (build_vec_init): Initialize variable `try_block'.
4903
4904         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
4905         Likewise for bzero/memset.
4906         (token_getch, token_put_back): Add static prototypes.  Remove
4907         `inline' from the definitions.
4908         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
4909
4910 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
4911
4912         * cp-tree.h (lang_type): Move align into type_flags.
4913         (CLASSTYPE_ALIGN): Adjust accordingly.
4914         * call.c (direct_reference_binding): Remove misleading comment.
4915
4916 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4917
4918         * parse.y (language_string): Constify.
4919
4920 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4921
4922         * repo.c (getpwd): Don't prototype.
4923         * xref.c (getpwd): Likewise
4924
4925 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4926
4927         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
4928         Remove hacks for stuff which now comes from libiberty.
4929
4930 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
4931
4932         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
4933
4934 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
4935
4936         * cp-tree.h (begin_init_stmts): Declare.
4937         (finish_init_stmts): Likewise.
4938         * cvt.c (build_up_reference): Wrap the declaration of a temporary
4939         in a statement-expression so that we will see it when expanding
4940         tree structure later.
4941         * init.c (begin_init_stmts): Don't make it static.
4942         (finish_init_stmts): Likewise.
4943
4944         * cp-tree.h (start_handler_parms): New function.
4945         (expand_start_catch_block): Take only one parameter.
4946         (start_handler_parms): New function.
4947         * decl.c (start_handler_parms): Define it.
4948         * except.c (process_start_catch_block): Take only one parameter.
4949         Don't call grokdeclarator here.
4950         (expand_start_catch_block): Don't call grokdeclarator here,
4951         either.
4952         * parse.y (handler_args): Adjust call to
4953         expand_start_catch_block.  Use start_handler_parms.
4954         * pt.c (push_template_decl_real): Make permanent lists have
4955         permanent elements.
4956         (tsubst_expr): Adjust calls to expand_start_catch_block
4957         appropriately.
4958         * semantics.c (expand_stmt): Likewise.
4959         
4960 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
4961
4962         * pt.c (push_template_decl_real): Use template declaration from
4963         class type if it exists.
4964
4965 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
4966
4967         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
4968         (maybe_inject_for_scope_var): Declare it.
4969         (initialize_local_var): Likewise.
4970         * decl.c (maybe_inject_for_scope_var): Make it global.
4971         (initialize_local_var): Likewise.  Move cleanup handling here,
4972         from cp_finish_decl.
4973         (make_rtl_for_nonlocal_decl): Use
4974         push_obstacks_nochange/pop_obstacks, rather than
4975         end_temporary_allocation/resume_temporary_allocation.
4976         (cp_finish_decl): Try to complete the type of a variable when it
4977         is declared.  Move cleanup-handling to initialize_local_var.
4978         (expand_static_init): Use tree-building code, rather than
4979         RTL-building code.
4980         * decl2.c (get_temp_name): Assert non-initializedness of
4981         temporaries.
4982         * init.c (create_temporary_var): Move RTL-assigning code to ...
4983         (get_temp_regvar): Here.
4984         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
4985         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
4986         call initialize_local_var to generate initialization code.
4987         
4988 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4989
4990         * cp-tree.h (fndecl_as_string, type_as_string,
4991         type_as_string_real, args_as_string, decl_as_string,
4992         expr_as_string, code_as_string, language_as_string,
4993         parm_as_string, op_as_string, assop_as_string, cv_as_string,
4994         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
4995
4996         * errfn.c (cp_printer): Likewise.
4997
4998         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
4999         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
5000         cp_file_of, code_as_string, language_as_string, parm_as_string,
5001         op_as_string, assop_as_string, args_as_string, cv_as_string):
5002         Likewise.
5003
5004         * tree.c (lang_printable_name): Likewise.
5005
5006 1999-08-28  Richard Henderson  <rth@cygnus.com>
5007
5008         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
5009
5010 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
5011
5012         * cp-tree.h (strip_array_types): New function.
5013         * decl.c (maybe_deduce_size_from_array_init): New function, split
5014         out from cp_finish_decl.
5015         (layout_var_decl): Likewise.
5016         (maybe_commonize_var): Likewise.
5017         (maybe_inject_for_scope_var): Likewise.
5018         (initialize_local_var): Likewise.
5019         (build_cleanup_on_safe_obstack): Likewise.
5020         (check_initializer): Likewise.
5021         (make_rtl_for_nonlocal_decl): Likewise.
5022         (cp_finish_decl): Use them.
5023         * typeck.c (strip_array_types): New function.
5024         
5025         * cp-tree.def (LABEL_STMT): New tree node.
5026         * cp-tree.h (LABEL_STMT_LABEL): New macro.
5027         (shadow_label): Remove.
5028         (declare_local_label): New function.
5029         (finish_label_decl): Likewise.
5030         * decl.c (make_label_decl): New function, split out from
5031         lookup_label.
5032         (shadowed_labels): Remove.
5033         (binding_level): Add shadowed_labels.
5034         (clear_binding_level): Remove.
5035         (push_binding_level): Just bzero the new binding level.
5036         (pushlevel): Fix indentation.
5037         (pop_label): New function.
5038         (pop_labels): Likewise, split out from poplevel.
5039         (poplevel): Pop local labels.  Use pop_labels.
5040         (maybe_push_to_top_level): Don't clear shadowed_labels.
5041         (lookup_label): Use make_label_decl.
5042         (shadow_label): Remove.
5043         (declare_local_label): New function.
5044         (define_label): Simplify.
5045         (start_function): Don't clear shadowed_labels.
5046         (cp_function): Remove shadowed_labels.
5047         (push_cp_function_context): Don't save shadowed_labels.
5048         (pop_cp_function_context): Don't restore it.
5049         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
5050         * parse.y (label_decl): Use finish_label_decl.
5051         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
5052         declarations.
5053         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
5054         building_stmt_tree.
5055         (finish_label_decl): New function.
5056         (expand_stmt): Handle LABEL_STMTs and local label declarations.
5057         
5058 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
5059
5060         * decl.c (lookup_label): Build labels on the permanent obstack
5061         when building statement trees.  Don't build RTL for labels when
5062         building statement trees.
5063         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
5064         building statement trees.
5065         (finish_label_stmt): Likewise.
5066         (expand_stmt): Adjust accordingly.
5067         * pt.c (tsubst_expr); Likewise.
5068         (do_decl_instantiation): Robustify.
5069         
5070         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
5071         * tree.c (build_cplus_new): Set it.
5072         * expr.c (cplus_expand_expr): Use it.
5073         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
5074         
5075         * decl.c (store_parm_decls): Reset immediate_size_expand.
5076         (finish_function): Likewise.
5077         
5078         * tree.c (cplus_unsave_expr_now): Don't return a value.
5079
5080         * semantics.c (do_poplevel): Always initialize the return value.
5081
5082 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
5083
5084         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
5085         * tree.h (cplus_unsave_expr_now) : Same.
5086
5087 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
5088
5089         * decl.c (grokdeclarator): Amend comment.
5090         * except.c (expand_start_catch_block): Call push_template_decl for
5091         catch-block parameters.
5092         * method.c (synthesize_method): Build an empty compound statement
5093         for the body of a constructor.
5094
5095 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
5096
5097         * tree.c (cp_build_qualified_type_real): If we're asking for the
5098         same quals we already have, just return.
5099
5100 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
5101
5102         * cp-tree.def (SUBOBJECT): New tree node.
5103         * cp-tree.h (CLEANUP_P): New macro.
5104         (SUBOBJECT_CLEANUP): Likewise.
5105         (keep_next_level): Add parameter.
5106         (get_temp_regvar): Don't declare.
5107         (emit_base_init): Remove parameter.
5108         (expand_aggr_init): Rename to build_aggr_init.
5109         (expand_vec_init): Rename to build_vec_init.
5110         (do_pushlevel): Remove.
5111         (do_poplevel): Likewise.
5112         (finish_cleanup): New function.
5113         (finish_subobject): Likewise.
5114         (stmts_are_full_exprs_p): New variable.
5115         * decl.c (keep_next_level): Add parameter.
5116         (cp_finish_decl): Use build_aggr_init, not
5117         expand_aggr_init.  Use finish_expr_stmt to expand the code.
5118         (expand_static_init): Use tree-generating, not RTL-generating,
5119         functions to handle the initialization.
5120         (start_function): Remove dead code.  Always have a momentary
5121         obstack inside the function, even before hitting the first curly
5122         brace.
5123         (cplus_expand_expr_stmt): Move calls to
5124         expand_{start,end}_target_temps into semantics.c.
5125         (cp_function): Add stmts_are_full_exprs_p.
5126         (push_cp_function_context): Save it.
5127         (pop_cp_function_context): Restore it.
5128         * decl2.c (get_temp_regvar): Move to init.c.
5129         (do_static_initialization): Use build_{aggr,vec}_init.
5130         (do_static_destruction): Fix typo in comment.
5131         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
5132         * except.c (expand_throw): Use create_temporary_var.
5133         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
5134         * init.c (expand_vec_init_try_block): Remove.
5135         (expand_vec_init_catch_clause): Likewise.
5136         (get_temp_regvar): New function.
5137         (begin_init_stmts): Likewise.
5138         (finish_init_stmts): Likewise.
5139         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
5140         structure here.
5141         (emit_base_init): Likewise.  Remove unused parameter.
5142         (expand_virtual_init): Likewise.
5143         (expand_cleanup_for_base): Use finish_subobject.
5144         (expand_aggr_vbase_init_1): Simplify.
5145         (construct_virtual_bases): Use tree-generating functions to build
5146         up initialization.
5147         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
5148         (expand_default_init): Likewise.
5149         (expand_aggr_init_1): Likewise.
5150         (expand_vec_init): Rename to build_vec_init.
5151         * method.c (do_build_copy_constructor): Use tree-generating
5152         functions.  Don't call clear_last_expr.
5153         (do_build_assign_ref): Likewise.
5154         (synthesize_method): Call clear_last_expr here.
5155         * parse.y (base_init): Don't call clear_last_expr here.
5156         (nodecls): Likewise.
5157         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
5158         * semantics.c (do_pushlevel): Move to here.
5159         (do_poplevel): Likewise.
5160         (stmts_are_full_exprs_p): New variable.
5161         (finish_expr_stmt): Handle logic for temoprary cleanup here.
5162         (finish_for_stmt): Use finish_expr_stmt.
5163         (finish_cleanup): New function.
5164         (finish_function_try_block): Fix indentation.
5165         (finish_subobject): New function.
5166         (setup_vtbl_ptr): Call keep_next_level here.
5167         (finish_stmt_expr): Handle a block with no scope inside the
5168         statement-expression.
5169         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
5170         SUBOBJECT.
5171         * tree.c (search_tree): Handle INIT_EXPR.
5172         (mapcar): Likewise.
5173         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
5174         * typeck2.c (store_init_value): Change expand_aggr_init to
5175         build_aggr_init in comment.
5176         
5177 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
5178
5179         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
5180
5181 1999-08-25  Nathan Sidwell  <nathan@acm.org>
5182
5183         * decl2.c (handle_class_head): Be graceful about additional
5184         scope qualifiers. Adjust comments to reflect reality.
5185
5186 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
5187
5188         * call.c (build_conditional_expr): Fix typo.
5189         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
5190         lvalue before trying to mess with the sides.
5191
5192         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
5193
5194 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
5195
5196         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
5197
5198 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
5199
5200         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
5201         Return arbitrary pointer or NULL.
5202         (check_eh_spec): Call __throw_type_match_rtti_2.
5203         * tinfo.h (*::dcast): Return int.  Add valp parm.
5204         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
5205         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
5206         (__throw_type_match_rtti): Now just a wrapper.
5207
5208         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
5209         (init_exception_processing): Don't initialize them.
5210
5211 1999-08-23  Paul Burchard <burchard@pobox.com>
5212
5213         * decl.c (check_default_argument): Fix typo.
5214
5215 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
5216
5217         * cp-tree.def (STMT_EXPR): Fix typo in node name.
5218
5219         * dump.c (dump_next_stmt): New function.
5220         (dequeue_and_dump): Use it.
5221         
5222         * pt.c (tsubst_copy): Make sure to initialize return value for a
5223         STMT_EXPR, even when processing_template_decl.
5224         * semantics.c (finish_stmt_expr): A statement-expression whose
5225         last statement is not an expression-statement has type `void'.  
5226         
5227 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
5228
5229         * semantics.c (finish_stmt_expr): Fix typo in comment.
5230         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
5231         (mapcar): Likewise.
5232         * init.c (build_vec_delete_1): Make the children of a permanent
5233         BIND_EXPR permanent.
5234         * pt.c (register_specialization): Don't register a specialization
5235         more than once.
5236         
5237 1999-08-18  Andrew Haley  <aph@cygnus.com>
5238
5239         * method.c (process_overload_item): Call build_mangled_C9x_name ()
5240         for all integer parameter types larger than long long.
5241
5242 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
5243
5244         * pt.c (redeclare_class_template): Merge default template
5245         arguments in both directions.
5246
5247         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
5248         compiler_error message.
5249
5250 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
5251
5252         * cp-tree.h: Declare flag_use_repository.
5253         * pt.c (do_decl_instantiation): Don't complain about duplicate
5254         instantiation with -frepo.
5255         (do_type_instantiation): Likewise.
5256
5257         * pt.c (push_template_decl_real): Complain about everything
5258         that isn't a valid template.
5259
5260         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
5261         affect inlines.
5262
5263 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
5264
5265         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
5266         * decl2.c (build_expr_from_tree): Handle it.
5267         * error.c (dump_expr): Likewise.
5268         * pt.c (for_each_template_parm): Likewise.
5269         (tsubst_copy): Likewise.
5270         * tree.c (search_tree): Likewise.
5271         * semantics.c (finish_pseudo_destructor_call): Create it.
5272         
5273 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
5274
5275         * search.c (setup_class_bindings): Robustify.
5276         * typeck.c (common_type): Use same_type_p, not pointer equality,
5277         to compare types.
5278
5279         * cp-tree.h (build_lang_field_decl): Remove.
5280         * class.c (build_vtable): Replace calls to build_lang_field_decl
5281         with build_lang_decl.
5282         (prepare_fresh_vtable): Likewise.
5283         (finish_struct_1): Likewise.
5284         (init_class_processing): Likewise.
5285         * decl.c (push_using_decl): Likewise.
5286         (init_decl_processsing): Likewise.
5287         (grokvardecl): Likewise.
5288         (build_ptrmemfunc_type): Likewise.
5289         (grokdeclarator): Likewise.
5290         (build_enumerator): Likewise.
5291         * decl2.c (grok_x_components): Likewise.
5292         (do_class_using_decl): Likewise.
5293         * except.c (call_eh_info): Likewise.
5294         * init.c (init_init_processing): Likewise.
5295         * rtti.c (expand_class_decl): Likewise.
5296         * tree.c (build_base_fields): Likewise.
5297         (build_vbase_pointer_fields): Likewise.
5298         * lex.c (build_lang_decl): Build declarations on the permanent
5299         obstack if we're building statmeent trees.
5300         (retrofit_lang_decl): Handle both the full lang_decl and also the
5301         smaller lang_decl_flags here.
5302         (build_lang_field_decl): Remove.
5303         * pt.c (push_template_decl_real): Issue errors for variable
5304         declarations that are not static members.
5305
5306 1999-08-18  Richard Henderson  <rth@cygnus.com>
5307
5308         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
5309         (mapcar): Likewise.
5310
5311 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
5312
5313         * cp-tree.h (back_end_hook): New variable.
5314         * decl2.c (back_end_hook): Define it.
5315         (finish_file): If it's non-NULL, call it.
5316
5317         * decl.c (add_decl_to_level): New function.
5318         (push_local_binding): Use it.
5319         (find_binding): Fix typo in comment.
5320         (pushdecl): Use add_decl_to_level.  Put templates on the
5321         corresponding namespace-scope binding levels.
5322         * dump.c (dequeue_and_dump): Print the specializations of a
5323         template.
5324         * pt.c (push_template_decl_real): Don't push a template multiple
5325         times.
5326
5327 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
5328
5329         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
5330         (CALL_DECLARATOR_QUALS): Likewise.
5331         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
5332         * decl.c (grokdeclarator): Adjust to use them.
5333         * decl2.c (grokfield): Likewise.
5334         (reparse_absdcl_as_casts): Likewise.
5335         * lex.c (make_call_declarator): Likewise.
5336         (set_quals_and_spec): Likewise.
5337         * pt.c (tsubst): Likewise.
5338         * tree.c (mapcar): Remove special hack to handle third operand of
5339         a CALL_EXPR.
5340
5341 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
5342
5343         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
5344         * class.c (build_vtable): Use build_lang_field_decl to build the
5345         VAR_DECLs for vtables.
5346         (prepare_fresh_vtable): Likewise.
5347         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
5348         CAN_HAVE_FULL_LANG_DECL_P.
5349         (push_using_decl): Use build_lang_decl to build USING_DECLs.
5350         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
5351         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
5352         (build_lang_field_decl): Likewise.
5353         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
5354         to copy.
5355         
5356         * cp-tree.def (STMT_EXPR): New tree node.
5357         * cp-tree.h (STMT_EXPR_STMT): New macro.
5358         (store_return_init): Change prototype.
5359         (finish_named_return_value): New function.
5360         (expand_stmt): Likewise.
5361         (expand_body): Likewise.
5362         (begin_stmt_tree): Likewise.
5363         (finish_stmt_tree): Likewise.
5364         (expanding_p): New variable.
5365         (last_expr_type): Likewise.
5366         (building_stmt_tree): New macro.
5367         * decl.c (start_function): Use building_stmt_tree, not
5368         processing_template_decl, where appropriate.
5369         (store_parm_decls): Likewise.
5370         (store_return_init): Move most of the body to semantics.c.
5371         (finish_function): Use building_stmt_tree.
5372         (finish_stmt): Clear last_expr_type here.
5373         (cp_function): Add expanding_p, last_tree, last_expr_type.
5374         (push_cp_function_context): Save them.
5375         (pop_cp_function_context): Restore them.
5376         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
5377         * error.c (dump_expr): Handle STMT_EXPR.
5378         * except.c (expand_start_catch_block): Use building_stmt_tree.
5379         Use add_decl_stmt.
5380         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
5381         (do_case): Move add_tree call to semantics.c.
5382         * parse.y (return_init): Use finish_named_return_value.
5383         (for.init.statement): Use finish_expr_stmt.
5384         * parse.c: Regenerated.
5385         * pt.c (do_pushlevel): Move to semantics.c.
5386         (do_poplevel): Likewise.
5387         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
5388         (tsubst_expr): Don't expand all the way to RTL here.  Handle
5389         RETURN_INIT and CTOR_INITIALIZER.
5390         (instantiate_decl): Call expand_body after tsubst'ing into
5391         DECL_SAVED_TREE.
5392         * semantics.c (expand_stmts): New function.
5393         (expanding_p): New variable.
5394         (last_expr_type): Likewise.
5395         (finish_expr_stmt): Use building_stmt_tree.
5396         (begin_if_stmt): Likewise.
5397         (finish_if_stmt_cond): Likewise.
5398         (finish_then_clause): Likewise.
5399         (begin_else_clause): Likewise.
5400         (finish_else_clause): Likewise.
5401         (begin_while_stmt): Likewise.
5402         (finish_while_stmt_cond): Likewise.
5403         (finish_while_stmt): Likewise.
5404         (finish_do_body): Likewise.
5405         (finish_do_stmt): Likewise.
5406         (finish_return_stmt): Likewise.
5407         (begin_for_stmt): Likewise.
5408         (fnish_for_init_stmt): Likewise.
5409         (finish_for_cond): Likewise.
5410         (finish_for_expr): Likewise.
5411         (finish_for_stmt): Likewise.
5412         (finish_break_stmt): Likewise.
5413         (finish_continue_stmt): Likewise.
5414         (finish_switch_cond): Likewise.
5415         (finish_switch_stmt): Likewise.
5416         (finish_case_label): Call add_tree here if necessary.
5417         (finish_goto_statement): Use building_stmt_tree.
5418         (begin_try_block): Likewise.
5419         (begin_function_try_block): Likewise.
5420         (finish_try_block): Likewise.
5421         (finish_function_try_block): Likewise.
5422         (finish_handler_sequence): Likewise.
5423         (finish_function_handler_sequence): Likewise.
5424         (begin_handler): Likewise.
5425         (finish_handler_parms): Likewise.
5426         (finish_handler): Likewise.
5427         (begin_compound_stmt): Likewise.
5428         (finish_compound_stmt): Likewise.
5429         (finish_asm_stmt): Likewise.
5430         (finish_label_stmt): Likewise.
5431         (finish_named_return_value): New function.
5432         (setup_vtbl_ptr): Moved here from decl2.c.
5433         (do_pushlevel): Moved here from pt.c.
5434         (do_poplevel): Likewise.
5435         (begin_stmt_expr): Use building_stmt_tree.
5436         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
5437         when building_stmt_tree.
5438         (begin_stmt_tree): New function.
5439         (finish_stmt_tree): Likewise.
5440         (expand_stmt): Likewise.
5441         (expand_body): Likewise.
5442         * tree.c (build_cplus_method_type): Make sure the argument types
5443         end up on the same obstack as the METHOD_TYPE.
5444         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
5445         THROW_EXPR, STMT_EXPR.
5446         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
5447         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
5448         sorry, if an unsupported node is encountered.
5449         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
5450         (c_expand_return): Don't call add_tree here.
5451         
5452 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
5453
5454         * pt.c (check_default_tmpl_args): Don't check in local scopes.
5455         (tsubst_decl): Make sure the declaration is on a saveable
5456         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
5457         variable.
5458         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
5459         
5460 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
5461
5462         Speed up Koenig lookup.
5463         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
5464         to return namespaces we've looked at.
5465         * decl2.c (lookup_using_namespace): Likewise.
5466         (add_function): Don't call ovl_member.
5467         (lookup_arg_dependent): Initialize k.namespaces to the list of 
5468         namespaces seen in unqualified lookup.
5469         * call.c (equal_functions): Move here from tree.c.
5470         (joust): Use it to handle duplicate candidates.
5471         * tree.c (ovl_member): Use ==.
5472
5473 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
5474
5475         * cp-tree.def (DECL_STMT): Make it smaller.
5476         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
5477         (lang_decl): ... here.  Add next.
5478         (DECL_SAVED_TREE): Adjust accordingly.
5479         (DECL_IMPLICIT_TYPEDEF_P): New macro.
5480         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
5481         (DECL_STMT_DECL): Likewise.
5482         (create_implicit_typedef): New function.
5483         (maybe_push_decl): Likewise.
5484         (tsubst_default_argument): New function.
5485         (at_function_scope_p): Likewise.
5486         (add_decl_stmt): Likewise.
5487         (push_permanent_obstack): Likewise.
5488         * call.c (convert_default_arg): Use tsubst_default_argument.
5489         * class.c (add_method): Use push_permanent_obstack.
5490         (build_self_reference): Create a TEMPLATE_DECL for the
5491         self-reference, if necessary.
5492         * decl.c (pseudo_global_level_p): Only look at the current binding
5493         level.
5494         (push_binding): Use push_permanent_obstack.
5495         (create_implicit_typedef): New function.
5496         (pushtag): Use it.
5497         (duplicate_decls): Use push_permanent_obstack.
5498         (maybe_push_decl): New function.
5499         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
5500         (start_decl_1): Remove dead code.
5501         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
5502         pseudo_global_level_p.
5503         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
5504         template.
5505         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
5506         pseudo_global_level_p.
5507         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
5508         a template.
5509         (get_sentry): Use push_permanent_obstack.
5510         * dump.c (dequeue_and_dump): Enable DECL_STMT.
5511         * except.c (call_eh_info): Use push_permanent_obstack.
5512         (build_eh_type_ref): Likewise.
5513         (do_pop_exception): Likewise.
5514         (expand_eh_spec): Likewise.
5515         (alloc_eh_object): Likewise.
5516         (expand_throw): Likewise.
5517         * init.c (build_java_class_ref): Likewise.
5518         * lex.c (get_time_identifier): Likewise.
5519         (free_lang_decl_chain): Correct type.
5520         (retrofit_lang_decl): Adjust accordingly.
5521         (build_lang_field_decl): Likewise.
5522         * lex.h (free_lang_decl_chain): Likewise.
5523         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
5524         * parse.c: Regenerated.
5525         * pt.c (tsubst_default_arguments): New function.
5526         (retrieve_local_specialization): Likewise.
5527         (register_local_specialization): Likewise.
5528         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
5529         pseudo_global_level_p to determine whether or not a template is
5530         primary.
5531         (lookup_template_class): Likewise.  Use create_implicit_typedef.
5532         (instantiate_class_template): Call tsubst_default_arguments for
5533         member functions, if appropriate.
5534         (tsubst_default_argument): New function.
5535         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
5536         * search.c (at_function_scope_p): New function.
5537         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
5538         (finish_label_stmt): Likewise.
5539         (add_decl_stmt): New function.
5540         (begin_class_definition): Likewise.
5541         (finish_typeof): Likewise.
5542         * tree.c (copy_template_template_parm): Likewise.
5543         (copy_to_permanent): Likewise.
5544         (push_permanent_obstack): Define.
5545         (mark_addressable): Use it.
5546         * typeck.c (mark_addressable): Likewise.
5547         
5548 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
5549
5550         * cp-tree.h (init_cplus_unsave): New.
5551         (cplus_unsave_expr_now): New.
5552         * lex.c (init_parse): Call init_cplus_unsave.
5553         * tree.c (init_cplus_unsave): New.
5554         (cplus_unsave_expr_now): New.
5555
5556 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
5557
5558         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
5559         decl_constant_value to simplify array bounds.
5560
5561 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
5562
5563         * lang-options.h: Add -fms-extensions.
5564         * cp-tree.h: Declare flag_ms_extensions.
5565         * decl2.c: Define it.
5566         * class.c (instantiate_type): Don't complain about taking the address
5567         of a bound member function if -fms-extensions.
5568         * typeck.c (build_unary_op): Likewise.
5569         * decl.c (grokdeclarator): Or about implicit int.
5570         * init.c (resolve_offset_ref): Or about implicit '&'.
5571
5572 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
5573
5574         * cp-tree.h (minimal_parse_mode): Remove.
5575         (finish_label_stmt): New function.
5576         * decl.c (saved_scope): Remove minimal parse mode.
5577         (maybe_push_to_top_level): Don't save it.
5578         (pop_from_top_level): Don't restore it.
5579         (define_label): Split out template-handling code to semantics.c.
5580         (start_decl): Don't use minimal_parse_mode.
5581         (cp_finish_decl): Likewise.
5582         (start_function): Don't increment it.
5583         (store_return_init): Don't use it.
5584         (finish_function): Don't decrement it.
5585         * parse.y (label_colon): Use finish_label_stmt throughout.
5586         * parse.c: Regenerated.
5587         * pt.c (minimal_parse_mode): Don't define it.
5588         (tsubst_expr): Use finish_label_stmt.
5589         * semantics.c (finish_label_stmt): New function.
5590
5591         * dump.c (queue): Be careful when computing bitmasks.
5592         (dequeue_and_dump): Describe binfos as binfos, not as
5593         vectors.
5594         
5595         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
5596         throughout.     
5597         * parse.c: Regenerated.
5598         
5599         * Make-lang.in (CXX_SRCS): Remove sig.c.
5600         * Makefile.in (CXX_OBJS): Remove sig.o.
5601         (sig.o): Remove.
5602         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
5603         (CPTI_SIGNATURE_TYPE): Likewise.
5604         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
5605         (opaque_type_node): Likewise.
5606         (signature_type_node): Likewise.
5607         (sigtable_entry_type): Likewise.
5608         (flag_handle_signatures): Likewise.
5609         (lang_type): Remove is_signature, is_signature_pointer,
5610         is_signature_reference, has_opaque_typedecls,
5611         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
5612         signature_pointer_to, signature_reference_to.
5613         (IS_SIGNATURE): Remove.
5614         (SET_SIGNATURE): Remove.
5615         (CLEAR_SIGNATURE): Remove.
5616         (IS_SIGNATURE_POINTER): Remove.
5617         (IS_SIGNATURE_REFERENCE): Remove.
5618         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
5619         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
5620         (CLASSTYPE_SIGNATURE): Remove.
5621         (SIGNATURE_TYPE): Remove.
5622         (SIGNATURE_METHOD_VEC): Remove.
5623         (SIGNATURE_POINTER_TO): Remove.
5624         (SIGNATURE_REFERENCE_TO): Remove.
5625         (lang_decl_flags): Remove is_default_implementation.  Rename
5626         memfunc_pointer_to to saved_tree.
5627         (IS_DEFAULT_IMPLEMENTATION): Remove.
5628         (DECL_MEMFUNC_POINTER_TO): Remove.
5629         (DECL_MEMFUNC_POINTING_TO): Remove.
5630         (DECL_SAVED_TREE): Adjust definition.
5631         (tag_types): Remove signature_type_node.
5632         (SIGNATURE_FIELD_NAME): Remove.
5633         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
5634         (SIGNATURE_OPTR_NAME): Likewise.
5635         (SIGNATURE_SPTR_NAME): Likewise.
5636         (SIGNATURE_POINTER_NAME): Likewise.
5637         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
5638         (SIGNATURE_REFERENCE_NAME): Likewise.
5639         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
5640         (SIGTABLE_PTR_TYPE): Likewise.
5641         (SIGTABLE_NAME_FORMAT): Likewise.
5642         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
5643         (SIGTABLE_TAG_NAME): Likewise.
5644         (SIGTABLE_VB_OFF_NAME): Likewise.
5645         (SIGTABLE_VT_OFF_NAME): Likewise.
5646         (finish_base_specifiers): Change prototype.
5647         (build_signature_pointer_type): Remove.
5648         (build_signature_reference_type): Remove.
5649         (build_signature_pointer_constructor): Remove.
5650         (build_signature_method_call): Remove.
5651         (build_optr_ref): Likewise.
5652         (append_signature_fields): Likewise.
5653         (signature_error): Likewise.
5654         * call.c (build_this): Remove signature support.
5655         (build_over_call): Likewise.
5656         (build_new_method_call): Likewise.
5657         * class.c (add_implicitly_declared_members): Likewise.
5658         (finish_struct_1): Likewise.
5659         (finish_struct): Likewise.
5660         * cvt.c (cp_convert_to_pointer): Likewise.
5661         (convert_to_pointer_force): Likewise.
5662         (ocp_convert): Likewise.
5663         * decl.c (sigtable_decl_p): Remove.
5664         (init_decl_processing): Remove support for signatures.
5665         (cp_finish_decl): Likewise.
5666         (grokdeclarator): Likewise.
5667         (grokparms): Likewise.
5668         (xref_tag): Likewise.
5669         (start_function): Likewise.
5670         (start_method): Likewise.
5671         * decl2.c (finish_sigtable_vardecl): Remove.
5672         (flag_handle_signatures): Remove.
5673         (lang_f_options): Remove handle-signatures.
5674         (grokfield): Remove support for signatures.
5675         (grokbitfield): Likewise.
5676         (finish_file): Likewise.
5677         (reparse_absdcl_as_casts): Likewise.
5678         * error.c (dump_type_real): Likewise.
5679         (dump_function_decl): Likewise.
5680         * friend.c (make_friend_class): Likewise.
5681         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
5682         * hash.h: Regenerated.
5683         * init.c (build_new_1): Remove support for signatures.
5684         * lang-options.h: Remove -fhandle-signatures,
5685         -fno-handle-signatures. 
5686         * lex.c (init_parse): Remove support for signatures.
5687         (yyprint): Likewise.
5688         * lex.h (rid): Remove RID_SIGNATURE.
5689         * method.c (build_decl_overload_real): Remove support for
5690         signatures. 
5691         (hack_identifier): Likewise.
5692         * parse.y (base_class): Likewise.
5693         (base_class.1): Likewise.
5694         (access_specifier): Likewise.
5695         * search.c (lookup_member): Likewise.
5696         * semantics.c (finish_qualified_object_call_expr): Likewise.
5697         (finish_template_type_parm): Likewise.
5698         (begin_class_definition): Likewise.
5699         (finish_base_specifier): Likewise.
5700         * sig.c: Remove.
5701         * tree.c (build_cplus_method_type): Remove support for signatures.
5702         * typeck.c (require_complete_type): Likewise.
5703         (c_sizeof): Likewise.
5704         (c_alignof): Likewise.
5705         (build_object_ref): Likewise.
5706         (build_component_ref): Likewise.
5707         (build_indirect_ref): Likewise.
5708         (build_c_cast): Likewise.
5709         (build_modify_expr): Likewise.
5710         (convert_for_initialization): Likewise.
5711         * typeck2.c (signature_error): Remove.
5712         (store_init_value): Remove support for signatures.
5713         (digest_init): Likewise.
5714         (build_x_arrow): Likewise.
5715         (build_functional_cast): Likewise.
5716         * xref.c (GNU_xref_decl): Likewise.
5717         
5718 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
5719
5720         * lex.c (do_identifier): Remove unnecessary lookup of class field.
5721
5722 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
5723
5724         * decl2.c (set_decl_namespace): Do not complain about non-matching
5725         decls if processing a template.
5726
5727 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
5728
5729         * decl.c (build_ptrmemfunc_type): Handle qualified
5730         pointer-to-member types here.
5731         * tree.c (cp_build_qualified_type_real): Simplify handling here.
5732
5733 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5734
5735         * lex.c (lang_identify): Likewise.
5736
5737 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
5738
5739         * Makefile.in: Update dependencies.
5740         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
5741         NULL_RTX.
5742         * decl.c: Include "function.h"
5743         (cleanup_label, return_label): Delete declarations.
5744         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
5745         (finish_function): Rename last_parm_insn variable to
5746         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
5747         * decl2.c: Include "function.h".
5748         (rtl_expr_chain): Delete declaration.
5749         * method.c: Include "function.h"
5750         * tree.c (build_vbase_pointer_fields): Don't initialize
5751         DECL_SAVED_INSNS with NULL_RTX.
5752         * typeck.c: Include "function.h"
5753
5754 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
5755
5756         * semantics.c (begin_function_try_block, finish_function_try_block,
5757         finish_function_handler_sequence): New fns.
5758         * parse.y (function_try_block): Use them.
5759         * pt.c (instantiate_decl): Likewise.
5760
5761         * cp-tree.h: Declare in_function_try_handler.
5762         * decl.c: Define it.
5763         (start_function): Clear it.
5764         (struct cp_function, push_cp_function_context): Save it.
5765         (pop_cp_function_context): Restore it.
5766         * parse.y (function_try_block): Set and clear it.
5767         * except.c (expand_end_catch_block): Rethrow if we reach the end
5768         of a function-try-block handler in a ctor or dtor.
5769         * typeck.c (c_expand_return): Complain about returning from a
5770         function-try-block handler of a ctor.
5771
5772         * parse.y (function_try_block): Call end_protect_partials
5773         before expand_start_all_catch.
5774
5775 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
5776
5777         * decl.c (struct binding_level): Add eh_region field.
5778         (push_binding_level): Set it.
5779         (define_label): Complain about jumping into an EH block.
5780
5781         * ptree.c (print_lang_type): Print the real type of a PMF.
5782         Print what exceptions a fn type throws.
5783
5784 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5785
5786         * class.c (count_fields, add_fields_to_vec): Add static prototype.
5787
5788         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
5789         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
5790         char*.
5791
5792         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
5793         Constify a char*.
5794
5795         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
5796         char*.
5797
5798         * dump.c (queue_and_dump_index, dump_int, dump_string,
5799         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
5800         a char*.
5801         (dump_stmt): Add static prototype.
5802
5803         * errfn.c (cp_thing): Constify a char*.
5804
5805         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
5806         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
5807         dump_expr): Constify a char*.
5808
5809         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
5810         read_line_number): Add static prototype.
5811         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
5812         (real_yylex): Move label `letter' into the scope where it is used.
5813
5814         * method.c (build_mangled_template_parm_index, build_overload_int,
5815         build_decl_overload_real, get_id_2): Constify a char*.
5816
5817         * search.c (check_final_overrider): Make static.
5818
5819         * typeck.c (composite_pointer_type): Constify a char*.
5820
5821 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
5822
5823         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
5824         we're looking at a class.
5825
5826         * decl.c (lookup_name_real): Set the complain flag if we're
5827         looking for a namespace member.
5828
5829         * lex.c (real_yylex): We can have a number with no digits.
5830
5831         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
5832
5833         * search.c (binfo_from_vbase): New fn.
5834         * cp-tree.h: Declare it.
5835         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
5836         from pointer to member of virtual base.  
5837         * typeck.c (get_delta_difference): Likewise.
5838
5839 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
5840
5841         * pt.c (tsubst): Use build_index_type to build in-template array
5842         index type.  Fixes g++.oliva/dwarf1.C.
5843         * decl.c (grokdeclarator): Likewise, just for consistency, as it
5844         doesn't seem to trigger the bug without it.
5845
5846 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
5847
5848         * typeck2.c (add_exception_specifier): Use complete_type.
5849
5850 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
5851
5852         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
5853         (dump_binary_op): Bulletproof.
5854         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
5855         * tree.c (search_tree): Don't enumerate all the nodes of classes
5856         `1', `2', and `<'; handle them generically.  Don't be sorry about
5857         "unrecognized tree codes"; just abort.
5858         (no_linkage_check): Don't do linkage checks for templates.
5859         
5860         * tree.c (cp_build_qualified_type_real): Handle
5861         pointer-to-member-function types correctly.
5862
5863 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
5864
5865         * decl.c (pushdecl): Only give an error for shadowing a parm 
5866         from *this* function.
5867
5868 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
5869
5870         * typeck2.c: Update URLs and mail addresses.
5871
5872 1999-08-04  Nathan Sidwell  <nathan@acm.org>
5873
5874         * cp-tree.h (empty_except_spec): New global var.
5875         (compexcepttypes): Remove prototype.
5876         (comp_except_specs): Prototype new global function.
5877         (add_exception_specifier): Prototype new global function.
5878         * decl.c (empty_except_spec): Define new global var.
5879         (duplicate_decls): Use comp_except_specs, reword error message.
5880         (init_decl_processing): Initialize empty_except_spec.
5881         Adjust build_exception_variant calls.
5882         * parse.y (exception_specification_opt): Use empty_except_spec.
5883         (ansi_raise_identifier): Call check_for_new_type.
5884         (ansi_raise_identifiers): Use add_exception_specifier.
5885         * pt.c (tsubst): Use add_exception_specifier to build exception
5886         specifier.
5887         * search.c (check_final_overrider): New static function, broken
5888         out of get_matching_virtual. Check throw specifiers, reword
5889         diagnostics.
5890         (get_matching_virtual): Use check_final_overrider.
5891         * tree.c (build_exception_variant): Use comp_except_specs.
5892         * typeck.c (compexcepttypes): Remove.
5893         (comp_except_types): New static function, helper for
5894         comp_except_specs. Compare two types as exception specifiers.
5895         (comp_except_specs): New global function, compare two exception
5896         specifiers.
5897         (comptypes): Adjust for comp_except_specs.
5898         * typeck2.c (add_exception_specifier): New global function.
5899         
5900         * class.c (check_for_override): Reword error message.
5901
5902 1999-08-03  Nathan Sidwell  <nathan@acm.org>
5903
5904         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
5905         * cp-tree.h (struct lang_type): Added non_pod_class flag.
5906         (CLASSTYPE_NON_POD_P): New macro to access it.
5907         * class.c (finish_struct_1): Determine non-PODness.
5908         Check for arrays of pointers (-Weffc++).
5909         Remove array inspection duplicated code.
5910         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
5911         Use CLASSTYPE_NON_POD_P.
5912
5913 1999-08-03  Nathan Sidwell  <nathan@acm.org>
5914
5915         * class.c (duplicate_tag_error): Preserve template information.
5916
5917 1999-08-03  Nathan Sidwell  <nathan@acm.org>
5918
5919         * decl.c (start_enum): Show location of previous definition.
5920         * parse.y (enumlist_opt): New reduction.
5921         (structsp): Simplify enum rules to use enumlist_opt.
5922
5923 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
5924
5925         * lex.c (yyprint): Handle PFUNCNAME.
5926
5927         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
5928         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
5929
5930 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
5931
5932         * decl.c (start_decl): Set attributes before duplicate_decls call.
5933
5934 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
5935
5936         * Make-lang.in (CXX_SRCS): Add dump.c.
5937         * Makefile.in (CXX_OBJS): Add dump.o.
5938         (dump.o): New target.
5939         * cp-tree.h (DECL_CONV_FN_P): Document.
5940         (DECL_OVERLOADED_OPERATOR_P): New function.
5941         (TYPE_PTRMEM_CLASS_TYPE): New macro.
5942         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5943         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
5944         (ASM_VOLATILE_P): New macro.
5945         (STMT_LINENO): Likewise.
5946         (cp_namespace_decls): New function.
5947         (dump_node_to_file): New function.
5948         * decl.c (cp_namespace_decls): New function.
5949         (walk_namespaces_r): Use it.
5950         (wrapup_globals_for_namespace): Likewise.
5951         * decl2.c (flag_dump_translation_unit): New variable.
5952         (lang_decode_option): Handle -fdump-translation-unit.
5953         (finish_file): If flag_dump_translation_unit is set, dump the
5954         translation unit.
5955         * dump.c: New file.
5956         * lang-options.h: Add -fdump-translation-unit.
5957         * pt.c (tsubst_template_parms): Robustify.
5958         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
5959         (tsubst_expr): Use STMT_LINENO.
5960         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
5961         for invalid cv-qualifiers even while building templates.
5962         
5963 1999-08-02  Richard Henderson  <rth@cygnus.com>
5964
5965         * call.c: Include defaults.h instead of expr.h.
5966         * decl.c: Likewise.
5967         * pt.c: Likewise.
5968         * typeck.c: Include defaults.h.
5969
5970 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
5971
5972         * lex.c (errorcount, sorrycount): Don't declare.
5973         * repo.c (errorcount, sorrycount): Likewise.
5974         * typeck2.c (errorcount, sorrycount): Likewise.
5975
5976 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
5977
5978         * call.c (convert_default_arg, build_over_call): Change all uses of
5979         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
5980         Ensure expr.h is included.
5981         * decl.c (grokparams): Ditto.
5982         * pt.c (tsubst_decl): Ditto.
5983         * typeck.c (convert_arguments): Ditto.
5984
5985 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
5986
5987         * class.c (mark_overriders): Fix order of args to overrides.
5988         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
5989         functions with the same name.
5990
5991 1999-08-02  Richard Henderson  <rth@cygnus.com>
5992
5993         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
5994
5995 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
5996
5997         * call.c (build_conditional_expr): Fix typo in comment.
5998
5999 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
6000
6001         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
6002         case_stack; use in_control_zone_p.
6003         * typeck.c (c_expand_return): Likewise.
6004
6005 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
6006
6007         * except.c (catch_clauses): Delete declaration.
6008
6009 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
6010
6011         * call.c (build_conditional_expr): Call convert_from_reference to
6012         avoid reference/non-reference type confusion.  Fix typo.
6013
6014 1999-07-30  Richard Henderson  <rth@cygnus.com>
6015
6016         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
6017         * cp-tree.h (initializer_constant_valid_p): Remove.
6018
6019 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
6020
6021         * call.c (conditional_conversion): Don't build BASE_CONVs for
6022         conversions between things that have the same type.
6023         (build_conditional_expr): Tweak.
6024         (convert_like): Some BASE_CONVs really do require the generation
6025         of code.
6026         
6027         * init.c (perform_member_init): Don't go through build_modify_expr
6028         for simple initializations.
6029
6030 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
6031
6032         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
6033         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
6034         virtual functions and MI.  Simplify.
6035
6036         * method.c: Remove prototype for largest_union_member.
6037         * pt.c (determine_specialization): Fix uninitialized warning.
6038         * lex.c (real_yylex): Likewise.
6039
6040 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
6041
6042         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
6043         here too.
6044
6045         * cp-tree.h (BINFO_VIRTUALS): Document new format.
6046         * class.c (modify_one_vtable): Change prototype accordingly.
6047         (modify_all_vtables): Likewise.
6048         (modify_all_direct_vtables): Likewise.
6049         (modify_all_indirect_vtables): Likewise.
6050         (build_vtable_entry_for_fn): New function.
6051         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
6052         (modify_vtable_entry): Likewise.
6053         (add_virtual_function): Likewise.
6054         (build_vtbl_initializer): New function.
6055         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
6056         (fixup_vtable_deltas1): Likewise.
6057         (fixup_vtable_deltas): Likewise.
6058         (override_one_vtable): Likewise.
6059         (finish_struct_1): Likewise.
6060
6061         * error.c (dump_expr): Likewise.
6062         * search.c (get_abstract_virtuals_1): Likewise.
6063         (get_abstract_virtuals): Likewise.
6064         (expand_upcast_fixups): Likewise.
6065         * tree.c (debug_binfo): Likewise.
6066         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
6067         __pure_virtual here.
6068         
6069 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
6070
6071         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
6072         as per 1999-07-26 change.
6073
6074         * typeck.c (c_sizeof): Don't allow non-static data members.
6075         (expr_sizeof): Likewise.
6076
6077 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
6078
6079         * input.c (feed_input): Only touch lineno and input_filename
6080         if !USE_CPPLIB.  Save the old values before setting the new ones.
6081
6082         * input.c (feed_input): Add file, line parms.
6083         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
6084         (real_yylex): Check linemode before input_redirected().
6085
6086         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
6087         from op new to warning.
6088
6089 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
6090
6091         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
6092         * call.c: All uses changed.
6093         * typeck.c: Likewise.
6094
6095 1999-07-26  Nathan Sidwell  <nathan@acm.org>
6096
6097         * exception.cc (__cplus_type_matcher): Match __eh_matcher
6098         prototype.
6099
6100 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
6101
6102         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
6103         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
6104         (strip_top_quals): Declare.
6105         (ncp_convert): Likewise.
6106         (type_after_usual_arithmetic_converions): Likewise.
6107         (composite_pointer_type): Likewise.
6108         * call.c (strip_top_quals): Don't make it static.
6109         (promoted_arithmetic_type_p): New function.
6110         (conditional_conversion): Likewise.
6111         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
6112         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
6113         for converting a type to itself.
6114         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
6115         (implicit_conversion): Make sure the from and to types are
6116         complete.
6117         (add_builtin_candidate): Correct handling of ?: operator.
6118         (add_builtin_candidates): Improve documentation.
6119         (build_conditional_expr): New function.
6120         (can_convert): Implement in terms of can_convert_arg.
6121         (ncp_convert): New function.
6122         * typeck.c (type_after_usual_arithmetic_conversions): New
6123         function, split out from common_type.
6124         (composite_pointer_type): New function, split out from
6125         build_conditional_expr.
6126         (common_type): Use type_after_usual_arithmetic_conversions.
6127         Remove redundant attribute merging.
6128         (comptypes): Tidy.  Handle COMPLEX_TYPE.
6129         (build_binary_op_nodefault): Use null_ptr_cst_p.
6130         (build_conditional_expr): Remove.
6131         (convert_for_assignment): Use new conversion functions.
6132         
6133         * cp-tree.h (abstract_virtuals_error): Change declaration.
6134         * typeck2.c (abstract_virtuals_error): Check to see if an error
6135         ocurred, and return a boolean value accordingly.
6136         (build_functional_cast): Adjust accordingly.
6137         * class.c (finish_struct_1): Likewise.
6138         * cvt.c (ocp_convert): Likewise.
6139         * decl.c (cp_finish_decl): Likewise.
6140         (grokparams): Likewise.
6141         (grok_op_properties): Likewise.
6142         (start_function): Likewise.
6143         * init.c (build_new_1): Likewise.
6144
6145         * pt.c (unify): Don't get confused by pointers-to-member functions.
6146
6147         * search.c (build_cplus_new): Robustify.
6148         
6149 1999-07-24  Richard Henderson  <rth@cygnus.com>
6150
6151         * gxx.gperf (__builtin_va_arg): New.
6152         * parse.y (VA_ARG): New token.
6153         (unary_expr): Recognize it.
6154
6155 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
6156
6157         * g++FAQ.texi: Deleted per Joe Buck's request.
6158         * Makefile.in: Corresponding changes.
6159
6160 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
6161
6162         * lex.c: Sync with C frontend.
6163         (whitespace_cr): New fn.
6164         (skip_white_space): Use it.
6165         (init_parse): Reorder.
6166         (yyprint): Support CONSTANT.
6167         (pragma_getc, pragma_ungetc): Bring back.
6168         (read_line_number): Change in_system_header directly.
6169         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
6170         (parse_float): Update to C version.
6171         (yylex): Handle '$' under the letter case.
6172         Remove looking_for_typename handling.
6173         Support hex floating point constants.
6174         Follow C's lead for choosing type of integer constants.
6175         Rearrange stuff to match C frontend.
6176         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
6177         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
6178
6179 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
6180
6181         * call.c (reference_binding): Tweak.
6182         (mayble_handle_implicit_object): Use direct_reference_binding to
6183         create the right implicit conversion sequence.
6184
6185 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
6186
6187         * pt.c (convert_nontype_argument): Don't call decl_constant_value
6188         if we're converting to a reference type.
6189
6190         * call.c (NEED_TEMPORARY_P): New macro.
6191         (standard_conversion): Set it, for derived-to-base conversions.
6192         (reference_related_p): New function.
6193         (reference_compatible_p): Likewise.
6194         (convert_class_to_reference): Likewise.
6195         (direct_reference_binding): Likewise.
6196         (reference_binding): Rework for standards-compliance.
6197         (convert_like): Adjust accordingly.
6198         (maybe_handle_ref_bind): Simplify; the right conversion sequences
6199         are now built up in reference_binding.
6200         (initialize_reference): New function.
6201         * cp-tree.h (ICS_USER_FLAG): Document.
6202         (ICS_THIS_FLAG): Likewise.
6203         (ICS_BAD_FLAG): Likewise.
6204         (NEED_TEMPORARY_P): Likewise.
6205         (cp_lvalue_kind): New type.
6206         (real_lvalue_p): Return it.
6207         * error.c (dump_expr): Provide more accurate representation for
6208         AGGR_INIT_EXPRs.
6209         * init.c (expand_default_init): Do not try to perform implicit
6210         conversions for a brace-enclosed initializer.
6211         * search.c (lookup_conversions): Document.
6212         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
6213         appropriately.
6214         (real_lvalue_p): Adjust accordingly.
6215         (lvalue_p): Likewise.
6216         (build_cplus_new): Don't allow the creation of an abstract class.
6217         * typeck.c (convert_for_initialization): Use initialize_reference.
6218         
6219 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
6220
6221         * lex.c (real_yylex) : Correct the test for overflow when lexing
6222         integer literals.
6223
6224 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
6225
6226         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
6227         not DECL_BUILT_IN, to determine if a function is internally declared.
6228         (duplicate_decls): Likewise.  Improve handling of builtins.
6229         (push_overloaded_decl): Remove special handling of builtins.
6230
6231         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
6232
6233         * decl.c (grokdeclarator): Pull out decl_constant_value in
6234         templates, too.
6235
6236         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
6237         * cp-tree.h, pt.c, semantics.c: Adjust.
6238         * method.c (largest_union_member): Remove.
6239
6240         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
6241
6242         * lex.c (token_getch, token_put_back): New fns.
6243         (real_yylex): Use them.
6244
6245         * lex.c (lang_init): Generalize.
6246         (lang_init_options): Tell cpplib this is C++.
6247         (nextchar): Remove.  Replace uses with put_back.
6248         (skip_white_space): Handle linemode here.  Optimize for cpplib.
6249         (extend_token_buffer_to): New fn.
6250         (extend_token_buffer): Use it.
6251         (read_line_number, check_newline): Just deal with tokens.
6252         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
6253         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
6254         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
6255         * parse.y (PAREN_STAR_PAREN): Remove.
6256         * input.c: Don't use the putback machinery with cpplib.
6257         (sub_getch): Fold back into getch.
6258         (getch): Don't handle linemode here.
6259         (feed_input): Unget any text in the token buffer.
6260
6261         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
6262         nextyychar, nextyylval): Remove.
6263
6264 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
6265             Jason Merrill  <jason@yorick.cygnus.com>
6266
6267         * lex.c (indent_level): New variable.
6268         (init_parse): Set cpp_token to CPP_DIRECTIVE.
6269         (consume_string): Make this smart about USE_CPPLIB.
6270         (yyungetc): Use put_back function.
6271         (pragma_getc, pragma_ungetc): Functions deleted.
6272         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
6273         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
6274         pragma_ungetc.
6275         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
6276         Also, clean up cases where we redundantly set token_buffer[0].
6277         (read_line_number): New fn.
6278         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
6279         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
6280         (sub_getch): Conditionalize out code that's not appropriate if
6281         USE_CPPLIB.
6282         (put_back): Rewrite in case USE_CPPLIB is defined.
6283         (input_redirected): Ditto.
6284
6285 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
6286
6287         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
6288         c_global_trees and accessor macros defined in c-common.h.
6289         (cp_tree_index): New enumeration.
6290         (cp_global_trees): Declare new array.  Add accessor macros for it, and
6291         delete declarations of tree nodes replaced by it.
6292         (builtin_function): Delete macro, add declaration for new function.
6293         Include c-common.h.
6294         * decl.c: Delete definitions for tree nodes that were replaced by
6295         cp_global_trees and c_global_trees.
6296         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
6297         to generate the common builtins here.
6298         (builtin_function): New function.
6299         * decl2.c (abort_fndecl): Delete declaration.
6300         * except.c (expand_builtin_return_address): Delete declaration.
6301         (builtin_return_address_fndecl): Delete variable.
6302         (const_ptr_type_node): Delete declaration.
6303         * lex.c (cons_up_default_function): Delete declaration of
6304         void_list_node.
6305         * parse.y (void_list_node): Delete declaration.
6306         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
6307         Delete variables.
6308         (const_string_type_node): Delete declaration.
6309         * search.c (abort_fndecl): Delete declaration.
6310         * Makefile.in: Update dependencies.
6311
6312 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
6313
6314         * pt.c (check_default_tmpl_args): Move test for missing default
6315         arguments here, from ...
6316         (end_template_parm_list): Here.
6317
6318 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
6319
6320         * decl.c (lookup_nested_type): Remove.
6321         (pushtag): Don't call it.
6322
6323 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
6324
6325         * Makefile.in (INTERFACE): Bump to 2.
6326
6327 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
6328         
6329         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
6330         instructions to gcc.gnu.org.  Removed e-mail address.
6331
6332 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
6333
6334         * pt.c (determine_specialization): Tighten error-checking.
6335         (end_template_parm_list): Likewise.
6336
6337 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
6338
6339         * pt.c (check_default_tmpl_args): Handle friends defined in the
6340         class just like member functions defined in the class.
6341
6342 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
6343             Jason Merrill  <jason@yorick.cygnus.com>
6344
6345         * cp-tree.h (struct lang_decl): Added field for storing sorted
6346         FIELD_DECLs (used in TYPE_DECLs).
6347         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
6348         (DECL_SORTED_FIELDS): New macro.
6349         * class.c (method_name_cmp): New function.
6350         (finish_struct_methods): Modified to support sorting and searching
6351         methods.
6352         (finish_struct_anon): Changed code in inner loop to use ELT rather 
6353         than UELT (which required an extra indirection for every reference).
6354         (field_decl_cmp): New function to support sorting FIELD_DECLs.
6355         (finish_struct_1): Sort fields.
6356         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
6357         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
6358         Also, switch to using array indexing rather than a changing pointer.
6359         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
6360         DECL_SORTED_FIELDS.
6361
6362 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
6363
6364         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
6365         casts in system headers or extern "C" blocks.
6366
6367         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
6368         errors to pedwarn.
6369
6370 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
6371
6372         * decl2.c (write_virtuals): Deleted declaration.
6373         * cp-tree.h (write_virtuals): Deleted extern declaration.
6374         * class.c (finish_struct_1): Removed #if 0'd code that mentions
6375         write_virtuals.
6376         * semantics.c (begin_class_definition): Rewrite code to not depend
6377         on write_virtuals.
6378
6379         * lex.c (cp_pragma_interface): New function.
6380         (cp_pragma_implementation): Likewise.
6381         (handle_cp_pragma): Call them.
6382
6383         * typeck.c (comptypes): Simplify C code in look_hard.
6384
6385         * xref.c (PALLOC): Use xcalloc, not calloc.
6386         (SALLOC): Use xmalloc, not malloc.
6387
6388         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
6389
6390         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
6391         is NO_DEBUG.
6392
6393         * decl.c (duplicate_decls): If a redeclaration doesn't match the
6394         initial declaration, then don't save the inline info and by all
6395         means don't mark the function as a builtin function.
6396
6397         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
6398         CURRENT_CLASS_TYPE is 0.
6399
6400         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
6401         NULL_TREE.
6402
6403         * ptree.c (print_lang_type): Added vtable-needs-writing.
6404
6405 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
6406
6407         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
6408
6409 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
6410
6411         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
6412         Merged into c-common.
6413
6414 1999-07-05  Dave Brolley  <brolley@cygnus.com>
6415
6416         * lex.c (errorcount): Declare it.
6417         (finish_parse): Update errorcount for when using CPPLIB.
6418
6419 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
6420
6421         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
6422         parameters.
6423         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
6424         * decl.c (push_class_binding): Use it.
6425         (lookup_name_real): Likewise.
6426
6427 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
6428
6429         * cp-tree.h (widest_integer_literal_type_node,
6430         widest_unsigned_literal_type) : New.
6431         * decl.c (widest_integer_literal_type_node,
6432         widest_unsigned_literal_type) : New.
6433         (init_decl_processing): Handle/use the two new types.
6434         * lex.c (real_yylex): Same.
6435         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
6436         Same. 
6437
6438 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
6439
6440         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
6441         to anonymous cv-qualified types.
6442
6443 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
6444
6445         * lex.c (real_yylex) : Change integer literal overflow handling to
6446         be like c-lex.c.
6447
6448         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
6449
6450 1999-06-28  Richard Henderson  <rth@cygnus.com>
6451
6452         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
6453
6454 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
6455
6456         * error.c (dump_type_real): Handle TREE_LIST again.
6457
6458         * typeck.c (comp_target_parms): Don't complain about 
6459         converting from () to (...) if !flag_strict_prototype.
6460
6461         * decl.c (grokdeclarator): Update the names of all variants when
6462         de-anonymizing.
6463
6464 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
6465
6466         * init.c (expand_aggr_vbase_init): Rename to
6467         construct_virtual_bases.  Conditionalize construction here, 
6468         rather than ...
6469         (emit_base_init): Here.
6470
6471 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
6472
6473         * semantics.c (finish_asm_stmt): Apply decay conversions to
6474         input operands.
6475
6476         * decl.c (expand_static_init): When building an anonymous function
6477         for use with atexit, compute its body before and after entering
6478         the function.
6479
6480         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
6481         EXIT_EXPR.
6482         
6483 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
6484
6485         * init.c (expand_aggr_vbase_init): Add flag parameter.
6486         (build_partial_cleanup_for): Remove, inlining into ..
6487         (expand_cleanup_for_base): ... here.  Take flag parameter.
6488         (emit_base_init): Pass the in_chrg parameter to
6489         emit_aggr_vbase_init. 
6490         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
6491         
6492 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
6493
6494         * decl2.c (import_export_decl): Use same_type_p, rather than
6495         relying on pointer-equality for types.
6496
6497         * method.c (do_build_copy_constructor): Simplify.
6498
6499         * call.c (build_method_call): Remove bogus code for two-argument
6500         delete.
6501         * init.c (build_new_1): Expand on comment, and remove dead code.
6502
6503         * init.c (expand_cleanup_for_base): New function, split out
6504         from ...
6505         (emit_base_init): Here.
6506         (expand_aggr_vbase_init): Use it.
6507
6508 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
6509
6510         * cp-tree.h (class_cache_firstobj): Declare.
6511         (maybe_push_cache_obstack): Rename to push_cache_obstack.
6512         * class.c (permanent_obstack): Remove declaration.
6513         (class_cache_firstobj): Make it global.
6514         (add_method): Don't use permanent_obstack directly.
6515         (pushclass): Only free the class_cache_obstack if we know how far
6516         back to free it.
6517         (maybe_push_cache_obstack): Rename to push_cache_obstack.
6518         * decl.c: Remove dead comment.
6519         (saved_scope): Add class_cache_firstobj.
6520         (push_to_top_level): Save it.
6521         (pop_from_top_level): Restore it.
6522         (push_class_level_binding): Use push_cache_obstack, not
6523         maybe_push_cache_obstack.
6524         * search.c (push_class_decls): Likewise.
6525         
6526 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6527
6528         * pt.c (tsubst_friend_function): Push into namespace of friend
6529         function before pushdecl'ing it.
6530
6531 1999-06-14  Nathan Sidwell  <nathan@acm.org>
6532
6533         * call.c (build_new_op): Remove REF_BIND from all operands.
6534
6535 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
6536
6537         * init.c (build_new_1): Look up operator delete even if there was
6538         no explicit new placement.
6539
6540 1999-06-08  Nathan Sidwell  <nathan@acm.org>
6541
6542         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
6543         of ...
6544         (build_throw): ... here. Call it.
6545         (process_start_catch_block): Call it.
6546
6547 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
6548
6549         * search.c (convert_pointer_to_single_level): Reimplement without
6550         using get_binfo.
6551
6552 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
6553
6554         * method.c (is_back_referenceable_type): Back-reference bools when
6555         not squangling.
6556
6557 1999-06-07  Dave Brolley  <brolley@cygnus.com>
6558
6559         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
6560         * input.c (putback_buffer): New structure type.
6561         (putback): Replaces putback_char member.
6562         (putback): Replaces putback_char static variable.
6563         (feed_input): Use putback.
6564         (end_input): Use putback.
6565         (sub_getch): Use putback.
6566         (put_back): Use putback.
6567
6568 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
6569
6570         * decl.c (grokdeclarator): Fix typo in last change.
6571
6572 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
6573
6574         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
6575         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
6576
6577 1999-06-04  Nathan Sidwell  <nathan@acm.org>
6578
6579         * except.c (build_throw): Check throw expression validity.
6580
6581 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
6582
6583         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
6584         just because flag_signed_bitfields is false.
6585
6586 1999-06-03  Nathan Sidwell  <nathan@acm.org>
6587
6588         * semantics.c (begin_class_definition): Update the struct's
6589         location here ...
6590         * class.c (finish_struct): ... rather than here.
6591
6592         * decl.c (make_typename_type): Don't rely on uninitialized
6593         variable.
6594
6595 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6596
6597         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
6598
6599 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
6600
6601         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
6602         and friends rather than messing with current_obstack directly.
6603         (cp_build_qualified_type_real): Rework ARRAY_TYPE
6604         allocation to match practice throughout the rest of the 
6605         compiler.
6606
6607 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
6608
6609         * lex.c (make_lang_type): Create TYPE_BINFO for
6610         TEMPLATE_TYPE_PARMs just like for non-template types.
6611
6612         * decl.c (start_decl): Move checks on initialization to ...
6613         (cp_finish_decl): Here.  Tidy formatting slightly.
6614
6615 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
6616
6617         * decl.c (add_binding): Don't complain about a redeclaration of a
6618         semantically identical typedef in a local scope.
6619
6620 1999-05-28  Nathan Sidwell  <nathan@acm.org>
6621
6622         * decl.c (complete_array_type): Allocate off same obstack. Fix
6623         DO_DEFAULT comment to match reality.
6624
6625         * friend.c (make_friend_class): Fix diagnostic typo.
6626
6627 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
6628
6629         * decl.c (lookup_namespace_name): Handle getting a
6630         TEMPLATE_ID_EXPR.
6631         (expand_static_init): Don't call pushdecl for implicitly declared
6632         `atexit' used to register destructors.
6633
6634 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
6635
6636         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
6637         intialize a vtable.
6638
6639         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
6640         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
6641         by combining TEMPLATE_INFO and LEVEL into a single union.
6642         (DECL_TEMPLATE_INFO): Reformat.
6643         (DECL_SAVED_TREE): Document.
6644         (DECL_TEMPLATE_INJECT): Remove.
6645         * class.c (finish_struct): Remove code to deal with
6646         DECL_TEMPLATE_INJECT. 
6647
6648         * decl.c (maybe_process_template_type_declaration): Handle all new
6649         types in templates uniformly.
6650         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
6651         DECL_CONTEXT.
6652         * pt.c (lookup_template_class): Inject template instantiations of
6653         forward-declarations.
6654         (instantiate_class_template): Remove code processing
6655         DECL_TEMPLATE_INJECT.
6656         
6657         * pt.c (lookup_template_class): Tweak lookup to find member
6658         templates.
6659
6660         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
6661         ASM_CV_QUAL.
6662         * semantics.c (finish_asm_stmt): Make strings permanent if they're
6663         used in a template.
6664         
6665 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
6666
6667         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
6668         parts of pointer to data member types.
6669
6670 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
6671
6672         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
6673         and then make it look like `abort'.  Just use `abort' instead.
6674         
6675         * typeck.c (build_static_cast): Don't allow static_casts that cast
6676         away constness.
6677         (casts_away_constness_r): New function.
6678         (casts_away_constness): Likewise.
6679
6680         * decl.c (lookup_tag): Remove code no longer needed after
6681         name-lookup improvements.
6682         * decl2.c (handle_class_head): Make error-recovery more robust.
6683         * friend.c (make_friend_class): Reject templated typename types.
6684         * lex.c (is_global): A template parameter isn't global.
6685         * parse.y (class_head): Robustify.
6686         * parse.c: Regenerated.
6687         
6688 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
6689
6690         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
6691         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
6692         
6693         * cp-tree.h (push_nested_namespace): Declare.
6694         (pop_nested_namespace): Likewise.
6695         * decl.c (push_nested_namespace): New function.
6696         (pop_nested_namespace): Likewise.
6697         * pt.c (instantiate_class_template): Use them.
6698
6699         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
6700
6701         * cp-tree.h (cplus_expand_constant): Declare.
6702         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
6703         converted from one pointer-to-object type to another.
6704         * expr.c (cplus_expand_constant): Don't make it static.
6705         * typeck.c (build_component_ref): Don't crash when presented with
6706         a component which is a TEMPLATE_DECL.
6707         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
6708         cast from a pointer-to-member constant to its own type does not
6709         result in a valid non-type template argument.
6710
6711 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
6712             Nathan Sidwell  <nathan@acm.org>
6713         
6714         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
6715         * cp-tree.h: Fix typo in documentation on pointers-to-members.
6716         (cp_build_qualified_type): Make it a macro.
6717         (cp_build_qualified_type_real): Declare.
6718         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
6719         problem with template parameters and restrict-qualification.
6720         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
6721         * hash.h: Regenerated.
6722         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
6723         the enumeration.
6724         (NORID): Remove definition.
6725         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
6726         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
6727         (fn_type_unification): Check that the function type resulting from
6728         the deduction is legal.
6729         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
6730         (unify): Use cp_build_qualified_type_real.
6731         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
6732         (cp_build_qualified_type): Rename to ...
6733         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
6734         and modify appropriately.
6735         
6736         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
6737         reveal optimization opportunities.
6738
6739         * pt.c (tsubst): Don't issue error messages when we're not
6740         complaining, even if we see a qualified function type.
6741         (check_cv_quals_for_unify): Don't allow a qualified function
6742         type.
6743
6744 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
6745
6746         * class.c (instantiate_type): Downgrade errors for object-dependent
6747         memfn refs to pedwarn.
6748
6749 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
6750
6751         * decl.c (grokdeclarator): Don't treat [] as indicating a
6752         zero-sized array in a typedef.
6753
6754         * call.c (build_object_call): Don't look at DECL_NAME for a type.
6755         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
6756         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
6757
6758         * pt.c (for_each_template_parm): Rework to match documentation.
6759         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
6760
6761 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
6762
6763         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
6764
6765         * class.c (finish_base_struct): Allow non-COM bases for COM classes
6766         except at the leftmost position.
6767         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
6768         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
6769         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
6770
6771         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
6772         (build_cplus_new): Make sure that what we return is of the right type.
6773
6774 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
6775
6776         * cp-tree.h (make_ptrmem_cst): New function.
6777         * expr.c (cplus_expand_constant): Split out from ...
6778         (cplus_expand_expr): Here.  Use cplus_expand_constant.
6779         (init_cplus_expand): Set lang_expand_constant.
6780         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
6781
6782         * tree.c (make_ptrmem_cst): Define.
6783         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
6784         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
6785
6786 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
6787
6788         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
6789
6790         * decl2.c (start_static_storage_duration_function): Fix comment.
6791         (finish_file): Create static storage duration functions lazily.
6792
6793 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
6794
6795         Implement anonymous structs.
6796         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
6797         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
6798         * class.c (finish_struct_1): Remove redundant check for anon struct.
6799         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
6800         (check_tag_decl): Check for anonymous struct here.
6801         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
6802         * init.c (sort_member_init, emit_base_init): Handle getting fields
6803         as well as names in current_member_init_list.
6804         (perform_member_init): Handle getting an anon aggr.
6805         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
6806         (do_build_copy_constructor): Likewise.
6807
6808 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
6809
6810         * tree.c (cp_build_qualified_type): Don't allow qualified function
6811         types.
6812
6813 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
6814
6815         * gxxint.texi: Fix typo.
6816
6817 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
6818
6819         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
6820         * class.c (finish_struct_1): Use CLASS_TYPE_P.
6821         * ptree.c (print_lang_type): Likewise.
6822         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
6823         IS_AGGR_TYPE_CODE.
6824         * typeck2.c (digest_init): Likewise.
6825
6826 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
6827
6828         * call.c (joust): Compare the types of the conv ops, not the
6829         target types of the conversions.
6830
6831 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6832
6833         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
6834         was not given.
6835
6836 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
6837
6838         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
6839         * decl.c (grokfndecl): Don't allow inline declarations of friend
6840         template specializations, or friend template specializations with
6841         default arguments.
6842         * pt.c (tsubst): Handle substitution into array types that does
6843         not yield a fixed upper bound, even when not processing a
6844         template.
6845         (tsubst_copy): Deal with the fact that the second operand to a
6846         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
6847         * search.c (marked_pushdecls_p): Don't descend into
6848         TEMPLATE_TYPE_PARMs and the like.
6849         (unmarked_pushdecls_p): Likewise.
6850         
6851         * call.c (build_over_call): Don't throw away
6852         initializations/copies of empty classes; use MODIFY_EXPR and
6853         INIT_EXPR as for non-empty classes.
6854         * class.c (finish_struct_1): Put the padding byte for an empty
6855         class on the TYPE_NONCOPIED_PARTS list for the class.
6856
6857 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
6858
6859         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
6860         indicate a reference to a field that is a qualified name.
6861
6862 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
6863
6864         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
6865         ASM_OUTPUT_CONSTRUCTOR.
6866
6867         * friend.c (do_friend): Add attrlist arg.  Remove support for
6868         getting a non-decl as 'decl'.
6869         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
6870         rtl.
6871         (grokdeclarator): Adjust.
6872         * cp-tree.h: Adjust.
6873
6874 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
6875
6876         * cp-tree.h (permanent_p): New function.
6877         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
6878         possibly complex tree node.
6879         * tree.c (mapcar): Adjust comments, and follow coding standards in
6880         conditional.
6881         (permanent_p): New function.
6882
6883 1999-05-13  Per Bothner  <bothner@cygnus.com>
6884
6885         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
6886         primitive Java types, if we actually see `extern "Java"'.
6887
6888 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6889
6890         * lang-specs.h: Pass -$ to the preprocessor.
6891
6892 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
6893
6894         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
6895         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
6896         (resolve_offset_ref): Don't handle a raw baselink.
6897         * cvt.c (build_expr_type_conversion): Likewise.
6898         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
6899         convert_for_initialization): Likewise.
6900         * class.c (instantiate_type): Handle seeing a baselink under an
6901         OFFSET_REF.
6902         * error.c (dump_expr): Likewise.        
6903         * pt.c (for_each_template_parm): Likewise.
6904         (resolve_overloaded_unification): Likewise.
6905         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
6906         * typeck.c (expr_sizeof): Also complain about other permutations
6907         of overloaded functions.
6908
6909 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
6910
6911         * init.c (resolve_offset_ref): Don't return a raw method.
6912         Use BASELINK_P.
6913         * typeck.c (decay_conversion): Don't handle a raw method.
6914         Resolve all OFFSET_REFs.
6915         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
6916         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
6917         same_type_p for pmf bits.  Don't use build_binary_op to compare
6918         raw pointers to methods.
6919         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
6920         to decide when to call resolve_offset_ref.
6921         (build_c_cast, convert_for_initialization): Likewise.
6922         * cvt.c (build_expr_type_conversion): Likewise.
6923
6924 1999-05-06  Nathan Sidwell  <nathan@acm.org>
6925
6926         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
6927
6928 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
6929
6930         * decl2.c (start_objects): Don't let static constructors and
6931         destructors get inlined.
6932
6933         * parse.y (nested_name_specifier): Make sure ordinary types are
6934         complete, just like template types.
6935         * parse.c: Regenerated.
6936
6937         * pt.c (check_explicit_specialization): Improve error messages.
6938
6939 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6940
6941         * typeck.c (string_conv_p): Use same_type_p to check whether we
6942         try to convert between char and wchar_t.
6943
6944 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
6945
6946         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
6947         lookup to error_mark_node here.
6948         (lookup_member): Revise documentation.  Add comments.  Don't set
6949         the TREE_TYPE to error_mark_node here, and don't build up an extra
6950         TREE_LIST for ambiguous lookups.
6951         (setup_class_bindings): Adjust accordingly.
6952         (push_class_decls): Revise out-of-date comments.
6953         
6954         * typeck.c (build_const_cast): Tighten checks for legality.
6955
6956 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6957
6958         * init.c (build_member_call): Lookup names coming from
6959         namespace-scoped LOOKUP_EXPR.
6960
6961 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
6962
6963         * gxxint.texi: Add documentation for 'I'.
6964
6965 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6966
6967         * tinfo.cc (operator==): Qualify type_info with std::.
6968
6969 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
6970
6971         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
6972         (DECL_COMDAT): Remove definition.
6973
6974 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
6975
6976         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
6977         change.
6978
6979 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
6980
6981         * class.c (build_vtable): Use build_lang_decl when building
6982         vtables, not just build_decl.
6983         (prepare_fresh_vtable): Likewise.
6984         * decl.c (wrapup_globals_for_namespace): Mark vtables as
6985         DECL_EXTERNAL when calling wrapup_global_declarations.
6986         * decl2.c (priority_info_s): Add initializations_p and
6987         destructions_p members.
6988         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
6989         when deciding what vtables to write out.
6990         (ssdf_decls): New variable.
6991         (ssdf_decls_used): Likewise.
6992         (start_static_storage_duration_function): Deal with being called
6993         multiple times.  Avoid inlining this function.
6994         (generate_inits_for_priority): Deal with reuse of priority map.
6995         (get_priority_info): Clear initializations_p and destructions_p.
6996         (do_static_initialization): Tweak comment.
6997         (do_static_destruction): Likewise.  Fix condition on sentries for
6998         destruction.
6999         (generate_ctor_or_dtor_function): Call all of the static storage
7000         duration functions.
7001         (generate_ctor_or_dtor_function_for_priority): Check
7002         initializations_p and destructions_p to see what priorities need
7003         initialization functions.
7004         (finish_file): Rework to generate multiple static storage duration
7005         functions, rather than just one.
7006
7007         * typeck.c (build_const_cast): Tweak last change to handle
7008         templates correctly.
7009
7010         * typeck.c (build_const_cast): Disallow use of const_cast to
7011         anything but a pointer or reference type.
7012
7013 1999-04-30  Nathan Sidwell  <nathan@acm.org>
7014
7015         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
7016         signature type.
7017
7018 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
7019
7020         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
7021         (finish_file): Indent comments properly.
7022
7023 1999-04-29  Richard Henderson  <rth@cygnus.com>
7024
7025         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
7026         (do_static_destruction): Likewise.
7027
7028 1999-04-29  Nathan Sidwell  <nathan@acm.org>
7029
7030         * cp-tree.h (TYPE_NOTHROW_P): New macro.
7031         * decl2.c (delete_sanity): Warn on deleting void *.
7032         * init.c (build_new_1): Use TYPE_NOTHROW_P.
7033         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
7034         throwing operator new.
7035
7036 1999-04-28  Nathan Sidwell  <nathan@acm.org>
7037
7038         * cp-tree.h (build_component_addr): Remove prototype.
7039         * typeck.c (build_component_addr): Make static. Remove MSG
7040         argument.
7041         (build_component_addr): Remove MSG parameter, clean up
7042         comment.
7043         (build_x_function_call): Use cp_error.
7044         (build_unary_op): Adjust call of build_component_addr.
7045
7046 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
7047
7048         * pt.c (tsubst_friend_class): Check for NULL.
7049
7050 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
7051
7052         * search.c (binfo_for_vtable): Initialize bfvi.var.
7053
7054 1999-04-27  Nathan Sidwell  <nathan@acm.org>
7055
7056         * rtti.c (build_x_typeid): Check rtti is enabled.
7057
7058 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
7059
7060         * search.c (is_subobject_of_p): Make sure we're looking at the
7061         right baseclasses.
7062
7063 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
7064
7065         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
7066
7067 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
7068
7069         * decl2.c (finish_file): Tweak handling of extern inlines so that
7070         they are not unnecessarily put out.
7071
7072         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
7073         such as base classes.
7074
7075 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
7076
7077         * tree.c (build_exception_variant): Fix typo: use the chain of U,
7078         not trying V, while cycling through U.
7079
7080 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
7081
7082         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
7083         preserves_first_arg.  Enlarge dummy accordingly.
7084         (DECL_TINFO_FN_P): New macro.
7085         (SET_DECL_TINFO_FN_P): Likeiwse.
7086         (DECL_RETURNS_FIRST_ARG): Remove.
7087         (DECL_PRESERVES_THIS): Likewise.
7088         (DECL_INIT_PRIORITY): New macro.
7089         (finish_struct_1): Change prototype.
7090         (cat_namespace_levels): Remove prototype.
7091         (vtable_decl_p): New prototype.
7092         (vtype_decl_p): Likewise.
7093         (sigtable_decl_p): Likewise.
7094         (walk_globals_pred): New typedef.
7095         (walk_globals_fn): Likewise.
7096         (walk_globals): New prototype.
7097         (walk_namespaces_fn): New typedef.
7098         (walk_namespaces): New prototype.
7099         (wrapup_globals_for_namespace): Likewise.
7100         (walk_vtables): Remove prototype.
7101         (walk_sigtables): Likewise.
7102         (instantiate_pending_templates): New prototype.
7103         * class.c (finish_struct_1): Don't return a value.
7104         * decl.h (pending_statics): Remove declaration.
7105         * decl.c (walk_namespaces_r): New function.
7106         (walk_globals_r): Likewise.
7107         (vtable_decl_p): Likewise.
7108         (vtype_decl_p): Likewise.
7109         (sigtable_decl_p): Likewise.
7110         (walk_namespaces): Likewise.
7111         (walk_globals_data): New type.
7112         (walk_globals): New function.
7113         (wrapup_globals_for_namespace): Likewise.
7114         (expand_static_init): Remove assertion.  Remove redundancy in
7115         conditional.  Don't put static data members in static_aggregates
7116         Tidy.
7117         (finish_function): Remove redundancy in conditional.  Don't set
7118         DECL_RETURNS_FIRST_ARG.
7119         (cat_namespace_levels): Remove.
7120         * decl2.c: Include splay-tree.h and varray.h.
7121         (priority_info_s): New structure.
7122         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
7123         conventions.
7124         (prune_vtable_vardecl): Likewise.
7125         (finish_sigtable_vardecl): Likewise.
7126         (setup_initp): Remove.
7127         (do_dtors): Remove.
7128         (do_ctors): Remove.
7129         (start_static_storage_duration_function): New function.
7130         (generate_inits_for_priority): Likewise.
7131         (finish_static_storage_duration_function): Likewise.
7132         (get_priority_info): Likewise.
7133         (do_static_initialization): Likewise.
7134         (do_static_destruction): Likewise.
7135         (do_static_initialization_and_destruction): Likewise.
7136         (generate_ctor_or_dtor_function): Likewise.
7137         (generate_ctor_and_dtor_functions_for_priority): Likewise.
7138         (pending_statics): Make it a varray.
7139         (pending_statics_used): New variable.
7140         (saved_inlines): Make it a varray.
7141         (saved_inlines_used): New variable.
7142         (finish_static_data_member): Change method of updating
7143         pending_statics.
7144         (mark_inline_for_output): Remove #if 0'd code.  Change method of
7145         updating saved_inlines.
7146         (walk_vtables): Remove.
7147         (walk_sigtables): Likewise.
7148         (import_export_decl): Use DECL_TINFO_FN_P.
7149         (pending_templates): Remove declaration.
7150         (maybe_templates): Likewise.
7151         (static_aggregates_initp): Likewise.
7152         (setup_initp): Likewise.
7153         (finish_objects): Simplify.
7154         (INITIALIZE_P_IDENTIFIER): New macro.
7155         (PRIORITY_IDENTIFIER): New macro.
7156         (SSDF_IDENTIFIER): New macro.
7157         (initialize_p_decl): New variable.
7158         (priority_decl): Likewise.
7159         (ssdf_decl): Likewise.
7160         (priority_info_map): Likewise.
7161         (finish_file): Recode output of static intializers and other
7162         file-scope finalization tasks.
7163         * error.c (OB_END_TEMPLATE_ID): New macro.
7164         (dump_type_real): Use it.
7165         (dump_decl): Likewise.
7166         (dump_function_name): Likewise.
7167         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
7168         interface.
7169         (check_newline): Use walk_globals, not walk_vtables.
7170         * pt.c (pending_tempalte_expansions): Remove.
7171         (set_vardecl_interface_info): Likewise.
7172         (pending_templates): Make static.
7173         (maybe_templates): Likewise.
7174         (instantiate_class_template): Adjust call to finish_struct_1.
7175         (instantiate_pending_templates): New function.
7176         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
7177         * tree.c (static_aggregates_initp): Remove.
7178         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
7179         instead.
7180         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
7181
7182         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
7183         with the RTL code RETURN.
7184         * hash.h: Regenerated.
7185         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
7186         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
7187         * parse.c: Regenerated.
7188         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
7189         it.
7190         (inline_parm_levels): New variable.
7191         (inline_parm_levels_used): Likewise.
7192         (maybe_begin_member_template_processing): Update them.
7193         (maybe_end_member_template_processing): Use them, rather than
7194         guessing how many levels to pop.
7195
7196         * decl.c (make_typename_type): Tighten error-checking.
7197
7198 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
7199
7200         * cp-tree.h (build_binary_op): Remove unneeded parameter.
7201         * class.c (build_vrable_entry_ref): Adjust call to
7202         build_binary_op.
7203         * decl.c (expand_static_init): Likewise.
7204         (grokdeclarator): Likewise.
7205         (finish_function): Likewise.
7206         * decl2.c (delete_sanity): Likewise.
7207         (do_dtors): Likewise.
7208         (do_ctors): Likewise.
7209         * error.c (dump_type_suffix): Likewise.
7210         * expr.c (cplus_expand_expr): Likewise.
7211         * init.c (resolve_offset_ref): Likewise.
7212         (build_new): Likewise.
7213         (build_new_1): Likewise.
7214         (build_vec_delete_1): Likewise.
7215         (expand_vec_init_catch_clause): Likewise.
7216         (build_delete): Likewise.
7217         * pt.c (tsubst): Likewise.
7218         * rtti.c (synthesize_tinfo_fn): Likewise.
7219         * search.c (expand_upcast_fixups): Likewise.
7220         (expand_direct_vtbls_init): Likewise.
7221         * typeck.c (get_member_function_from_ptrfunc): Likewise.
7222         (build_binary_op_nodefault): Likewise.
7223         (point_int_sum): Likewise.
7224         (pointer_diff): Likewise.
7225         (build_unary_op): Likewise.
7226         (build_modify_expr): Likewise.
7227         (get_delta_difference): Likewise.
7228         (build_ptrmemfunc): Likewise.
7229         (expand_ptrmemfunc_cst): Likewise.
7230
7231 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
7232
7233         * decl.c (grokfndecl): Always call cplus_decl_attributes.
7234         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
7235
7236 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
7237
7238         * cp-tree.h (finish_static_data_member_decl): New function.
7239         * decl2.c (finish_static_data_member_decl): Split out from ...
7240         (grokfield): Here.
7241         * pt.c (instantiate_class_template): Use it here instead of
7242         trying to fake it.
7243         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
7244         finish_static_data_member_decl will do that.  Explicit set
7245         DECL_EXTERNAL to match non-template processing.
7246
7247 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
7248
7249         * cp-tree.h (finish_class_definition): Add parameter.
7250         * parse.y (structsp): Use it.  Don't call pop_scope here.
7251         * parse.c: Regenerated.
7252         * semantics.c (finish_class_definition): Pop it here.
7253
7254 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
7255
7256         * decl.c (xref_tag): Revise handling of nested template
7257         declarations.
7258         * pt.c (check_explicit_specialization): Tweak handling of friend
7259         templates in template classes.
7260         (tsubst_friend_class): Handle friend declarations for nested
7261         member template classes.
7262
7263 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
7264
7265         * class.c (finish_struct): Remove unused variable.
7266         (pushclass): Likewise.
7267         (invalidate_class_lookup_cache): Likewise.
7268         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
7269         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
7270         doesn't get obliterated.
7271         (make_typename_type): Handle template classes correctly.
7272
7273         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
7274         (storetags): Declare.
7275         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
7276         (pushclass): Likewise.  Use storetags to install tag declarations,
7277         not pushtag.
7278         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
7279         * decl.c (storetags): Make it global.
7280         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
7281         implicit typename declaration.
7282         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
7283         * method.c (hack_identifier): Likewise.
7284         * search.c (lookup_member): Likewise.
7285
7286         * decl.c (warn_about_implicit_typename_lookup): New function.
7287         (lookup_name_real): Use it.  Rework handling of implicit typename
7288         extension.
7289
7290 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
7291
7292         * cp-tree.h (lookup_nested_field): Remove.
7293         * class.c (push_nested_class): Handle UNION_TYPEs.
7294         (pop_nested_class): Likewise.
7295         * decl.c (lookup_name_real): Don't call lookup_nested_field.
7296         (start_decl): Use push_nested_class, not just pushclass.
7297         (cp_finish_decl): Use pop_nested_class, not just popclass.
7298         * search.c (lookup_nested_field): Remove.
7299
7300         * cp-tree.h (lang_type): Add documentation.
7301         * decl2.c (handle_class_head): Create template declarations here,
7302         as appropriate.
7303         * parse.y (class_head): Return whether or not we entered a new
7304         scope, as well as the type named.
7305         (named_class_head): Likewise.
7306         (named_complex_class_head_sans_basetype): Likewise.
7307         (structsp): Adjust accordingly.  Pop scope when required.
7308         * parse.c: Regenerated.
7309         * pt.c (check_default_tmpl_args): Robustify.
7310         (redeclare_class_template): Likewise.
7311         (instantiate_class_template): An instantiation of an
7312         anonymous union is itself an anonymous union.
7313         * semantics.c (begin_class_definition): Don't create template
7314         declarations here.
7315
7316 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
7317
7318         * parse.y (after_type_declarator_intern): New nonterminal.
7319         (after_type_declarator): Use it.
7320         (direct_after_type_declarator): Likewise.  Move above
7321         nonnested_type to fix reduce/reduce conflict resolution.
7322         (declmods): Reducing from just 'attributes' has EMPTY precedence.
7323         * Makefile.in (CONFLICTS): Update.
7324
7325         * decl.c (define_label): Downgrade error for jumping over a
7326         non-POD decl to pedwarn.
7327
7328 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
7329
7330         * cp-tree.h (popclass): Change declaration.
7331         (pop_nested_class): Likewise.
7332         (poplevel_class): Remove declaration.
7333         * call.c (convert_default_argument): Pass no arguments to
7334         popclass.
7335         * class.c (finish_struct_1): Likewise.
7336         (finish_struct): Likewise.
7337         (popclass): Remove argument.  Simplify code accordingly.
7338         (pop_nested_class): Likewise.
7339         * decl.c (poplevel_class): Declare it here, and make it static.
7340         (poplevel): Handle class scopes.
7341         (poplevel_class): Don't take an rgument.  Simplify.
7342         (pop_everything): Pass no arguments to pop_nested_class.
7343         (cp_finish_decl): Pass no arguments to popclass.
7344         (grokdeclarator): Pass no arguments to pop_nested_class.
7345         (finish_function): Likewise.
7346         * decl2.c (grokfield): Likewise.
7347         (pop_scope): Pass no arguments to popclass.
7348         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
7349         * pt.c (instantiate_class_template): Move call to pushclass, and
7350         document.  Pass no arguments to popclass.
7351         (regenerate_decl_from_template): Likewise.
7352
7353 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
7354
7355         * typeck.c (build_unary_op): Handle taking the address of a unique
7356         bound non-static member function.
7357
7358 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
7359
7360         * lang-options.h (-Wdeprecated): New flag.
7361         * decl2.c (warn_deprecated): New flag.
7362         (lang_decode_option): Deprecated this-is-variable,
7363         external-templates, alt-external-templates.
7364         Support -Wdeprecated.
7365         * errfn.c (cp_deprecated): New function.
7366
7367 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
7368
7369         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
7370         of the decls themselves.
7371
7372         * pt.c (tsubst_function_type): Copy attributes over.
7373
7374         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
7375         and com_interface.
7376         * cp-tree.h: Add prototype.
7377         * decl.c (init_decl_processing): Set valid_lang_attribute.
7378
7379 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
7380
7381         * class.c (finish_struct_1): Look at the const-ness of the field's
7382         type, not the TREE_READONLY-ness of the declaration.
7383         * method.c (synthesize_method): Likewise.
7384         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
7385         creating new declarations.
7386
7387 1999-04-13  Mike Stump  <mrs@wrs.com>
7388
7389         * decl2.c (import_export_decl): Because vtables always reference
7390         virtual functions, even if they are inlined, don't allow
7391         -fno-implement-inlines to not emit them, instead, emit them with
7392         the vtable.
7393         * decl.c (start_function): Likewise.
7394
7395 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
7396
7397         * cp-tree.h (struct lang_type): Add com_interface.
7398         (CLASSTYPE_COM_INTERFACE): New macro.
7399         * class.c (set_rtti_entry): COM interface classes have no RTTI
7400         entries in their vtables; adjust.
7401         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
7402         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
7403         finish_struct_1): Likewise.
7404         * decl2.c (mark_vtable_entries): Likewise.
7405         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
7406         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
7407         expand_upcast_fixups): Likewise.
7408         * tree.c (debug_binfo): Likewise.
7409
7410         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
7411         * typeck.c (comptypes): If we get it, ignore attributes.
7412         * class.c (instantiate_type): Use BASELINK_P.  Change complain
7413         parameter to flags; 2 means ignore attributes.
7414         * call.c (build_op_delete_call): Pass it.
7415
7416         * decl.c (xref_tag): Only complain once about using a typedef-name
7417         with 'struct'.  Downgrade to pedwarn.
7418
7419         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
7420
7421         * parse.y (absdcl_intern): New nonterminal.
7422         (absdcl, direct_abstract_declarator): Use it.
7423
7424         * pt.c (lookup_template_class): Look through implict typename.
7425
7426 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
7427
7428         * friend.c (add_friend): Deal gracefully with error_mark_node.
7429         * method.c (build_overload_value): Handle pointers-to-members as
7430         template parameters.
7431
7432         * decl.c (push_binding): Fix typo in comment.
7433
7434 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
7435
7436         * error.c (dump_type_real): If a typename is a template-id, put
7437         out the template arguments.
7438         (dump_expr): Handle TEMPLATE_ID_EXPR.
7439         * pt.c (lookup_template_class): Now that full arguments are
7440         available everywhere, remove code that tried to guess them.
7441
7442 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
7443
7444         * decl.c (make_typename_type): Complain if we don't find a type
7445         when trying to make a typename type for a non-template type.
7446
7447 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
7448
7449         * decl.c (start_decl): Pass attributes to grokdeclarator.
7450         (grokdeclarator): Handle attributes on constructor-syntax
7451         initializers.
7452
7453 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
7454
7455         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
7456         don't have types.
7457
7458         * search.c (template_self_reference_p): Tweak.
7459
7460 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
7461
7462         * init.c (build_offset_ref): Don't build yet another weird data
7463         structure to describe overloaded functions.
7464
7465 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
7466
7467         * cp-tree.h (BASELINK_P): New macro.
7468         (SET_BASELINK_P): Likewise.
7469         * init.c (build_member_call): Remove needless assignment in if
7470         statement.
7471         * search.c (lookup_field_r): Fix handling when we are looking
7472         specifically for a type; these are not hidden by functions and
7473         variables.
7474         (lookup_member): Use SET_BASELINK_P.
7475         * tree.c (is_overloaded_fn): Use BASELINK_P.
7476         (really_overloaed_fn): Likewise.
7477         (get_first_fn): Likewise.
7478
7479 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
7480
7481         * decl.c (lookup_name_current_level): Tweak, and improve
7482         documentation.
7483
7484         * class.c (maybe_fixup_vptrs): Remove declaration.
7485         (build_class_init_list): Likewise.
7486         * decl.c (pushdecl_class_level): Call check_template_shadow here
7487         ...
7488         (push_class_level_binding): ... not here.
7489         * search.c (dfs_push_type_decls): Only avoid
7490         template-self-reference TYPE_DECLs if they are from base classes.
7491
7492 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
7493
7494         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
7495         nodes.  Tidy.
7496
7497 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
7498
7499         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
7500         (finish_struct_1): Don't call build_class_init_list.
7501
7502 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
7503
7504         * tinfo.h (__class_type_info): Fix illegal declaration.
7505
7506         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
7507         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
7508         (IDENTIFIER_CLASS_VALUE): Improve documentation.
7509         (is_properly_derived_from): Declare.
7510         (invalidate_class_lookup_cache): Likewise.
7511         (maybe_maybe_note_name_used_in_class): Likewise.
7512         (note_name_declared_in_class): Likewise.
7513         (push_using_decl): Remove duplicate declaration.
7514         (id_in_current_class): Remove declaration.
7515         (push_class_binding): Change prototype.
7516         (clear_identitifer_class_values): Declare.
7517         * call.c (is_properly_derived_from): Make it global.
7518         (build_new_function_call): Be careful about updating candidates.
7519         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
7520         asked to make illegal calls.
7521         * class.c: Include splay-tree.h.
7522         (class_stack_node): Add names_used slot.
7523         (check_member_decl_is_same_in_complete_scope): Remove.
7524         (add_method): Fix comment.  Push the declaration into class
7525         scope.
7526         (finish_struct_1): When popping the class, pop the bindings too.
7527         Remove check for data member/function member conflict.
7528         (finish_struct): Remove calls to
7529         check_member_decl_is_same_in_complete_scope.  Change calls to
7530         popclass.
7531         (pushclass): Clear names_used in the class stack entry.
7532         Use invalidate_class_lookup_cache to remove cached entries, rather
7533         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
7534         before entering a new class.  Remove dead code.  Don't mess with
7535         current_function_decl when pushing declarations.
7536         (invalidate_class_lookup_cache): New function, split out from ...
7537         (popclass): Here.  Clean up names_used on our way out.
7538         (instantiate_type): Adjust.
7539         (build_self_reference): Don't push the declaration here.
7540         (maybe_note_name_used_in_class): New function.
7541         (note_name_declared_in_class): Likewise.
7542         * decl.c (add_binding): Change prototype.
7543         (find_class_binding_level): New function.
7544         (innermost_nonclass_level): Likewise.
7545         (current_binding_level): Update documentation.
7546         (inner_binding_level): Remove.  Replace with current_binding_level
7547         throughout.
7548         (push_binding_level): Remove special handling of
7549         class_binding_level.
7550         (pop_binding_level): Likewise.  Use find_class_binding_level.
7551         (suspend_binding_level): Likewise.
7552         (global_bindings_p): Use innermost_nonclass_level.
7553         (toplevel_bindings_p): Likewise.
7554         (namespace_bindings_p): Likewise.
7555         (pseudo_global_level_p): Likewise.
7556         (push_binding): Clear INHERITED_VALUE_BINDING_P.
7557         (add_binding): Check for illegal multiple declarations.  Return a
7558         value indicating whether or not the new binding was legal.
7559         (push_local_binding): Skip over class binding levels.  Check
7560         return value from add_binding.
7561         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
7562         note_name_declared_in_class.
7563         (pushlevel_class): Remove "fake out the rest of the compiler"
7564         code.
7565         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
7566         (clear_identifier_class_values): New function.
7567         (pop_from_top_level): Use it.
7568         (pop_everything): Tweak.
7569         (maybe_process_template_type_declaration): Don't push the
7570         declaration for the template here.
7571         (pushtag): Don't push tag declarations into class scope here.
7572         (pushdecl): Apply DeMorgan's law for readability.
7573         (pushdecl_class_level): Remove special-case code for
7574         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
7575         (push_class_level_bindng): Deal with inherited bindings.
7576         (lookup_name_real): Remove special-case code for
7577         TYPE_BEING_DEFINED, and some implicit typename magic.
7578         (grokdeclarator): Handle COMPONENT_REF for a template function.
7579         (build_enumerator): Don't call pushdecl_class_level here.
7580         (id_in_current_class): Remove.
7581         * decl2.c (grokfield): Don't call pushdecl_class_level or
7582         check_template_shadow.
7583         * errfn.c (cp_file_of): Don't declare.
7584         (cp_line_of): Likewise.
7585         * error.c (dump_decl): Handle an OVERLOAD.
7586         (cp_file_of): Likewise.
7587         (cp_line_of): Likewise.
7588         * init.c (build_member_call): Handle a COMPONENT_REF.
7589         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
7590         pushdecl_class_level.
7591         * method.c (hack_identifier): Build COMPONENT_REFs for references
7592         to member templates as well as member functions.  Remove dead
7593         code.
7594         * parse.y (left_curly): Remove.
7595         (nonnested_type): Call maybe_note_name_used_in_class, not
7596         pushdecl_class_level.
7597         * parse.c: Regenerated.
7598         (nested_name_specifier_1): Likewise.
7599         * pt.c (check_explicit_specialization): Adjust, for robustness.
7600         (check_template_shadow): Handle OVERLOADs.
7601         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
7602         TEMPLATE_DECL, if appropriate.
7603         * search.c (envelope_add_decl): Remove.
7604         (dfs_pushdecls): Likewise.
7605         (dfs_compress_decls): Likewise.
7606         (dfs_push_decls): New function.
7607         (dfs_push_type_decls): Likewise.
7608         (setup_class_bindings): Likewise.
7609         (template_self_reference_p): Likewise.
7610         (lookup_field_r): Use it.
7611         (looup_member): Remove old comment.  Deal with ambiguity.
7612         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
7613         and remove envelope processing.
7614         * semantics.c (begin_class_definition): Let pushclass push
7615         declarations for base classes.
7616         (finish_member_declaration): Push declarations into class scope.
7617         * typeck.c (build_component_ref): Just put an OVERLOAD into the
7618         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
7619         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
7620         * Makefile.in (class.o): Depend on splay-tree.h.
7621
7622 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
7623
7624         * cvt.c (convert_pointer_to_real): Use same_type_p.
7625         * typeck.c (comp_target_types): Use same_type_p.
7626
7627 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
7628
7629         * semantics.c (begin_inline_definitions,
7630         finish_inline_definitions): Rename from finish_default_args and
7631         begin_inline_definitions, respectively, to something that isn't a
7632         total lie.  :)
7633         * parse.y (structsp): Adjust.
7634
7635         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
7636         (list_hash_lookup): Likewise.
7637         (hash_tree_chain): Adjust.
7638         * pt.c (tsubst): Adjust.
7639         (tsubst_arg_types): Use plain hash_tree_cons.
7640         * cp-tree.h (hash_tree_cons_simple): Lose.
7641         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
7642
7643 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7644
7645         * Makefile.in (hash.h): Generate using gperf language 'C', not
7646         'KR-C', so gperf uses the `const' keyword on strings.
7647
7648         * gxx.gperf (resword): Const-ify a char*.
7649
7650 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
7651
7652         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
7653         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
7654         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
7655         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
7656         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
7657         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
7658         tree.c: Adjust.
7659
7660 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
7661
7662         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
7663
7664 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
7665
7666         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
7667
7668 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
7669
7670         * cp-tree.h (add_friend): Declare.
7671         (add_friends): Likewise.
7672         * friend.c (add_friend): Make it global.  Don't add to
7673         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
7674         (add_friends): Make it global.
7675         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
7676         befriending class is a template.
7677         * parse.y (component_decl_1): Fix typo in comment.
7678         * parse.c: Regenerated.
7679         * pt.c (instantiate_class_template): Use add_friend and
7680         add_friends rather that duplicating some of their functionality
7681         here.
7682
7683 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
7684
7685         * call.c (build_field_call): Unify 'this' and non-'this' cases.
7686
7687         * typeck.c (build_indirect_ref): Check for 'this' sooner.
7688
7689 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7690
7691         * call.c (op_error): Const-ify a char*.
7692         (add_candidate, source_type, add_warning): Add static prototype.
7693         (print_z_candidates): Const-ify a char*.
7694
7695         * class.c (resolve_address_of_overloaded_function,
7696         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
7697         (get_vtable_name, finish_struct_1): Const-ify a char*.
7698
7699         * cvt.c (convert_to_reference): Likewise.
7700
7701         * decl.c (redeclaration_error_message, record_builtin_type,
7702         record_unknown_type, member_function_or_else, bad_specifiers):
7703         Likewise.
7704         (find_binding, select_decl, unqualified_namespace_lookup,
7705         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
7706         Add static prototype.
7707         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
7708         implicitly_declare, record_builtin_java_type, define_function,
7709         grok_op_properties, tag_name): Const-ify a char*.
7710
7711         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
7712         (define_function, finish_builtin_type): Const-ify a char*.
7713         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
7714         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
7715         (file_name_nondirectory): Const-ify a char*.
7716         (init_filename_times): Don't prototype.
7717         (compiler_error): Prototype.
7718         (yyerror, init_repo): Const-ify a char*.
7719         (build_srcloc): Don't prototype.
7720         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
7721         Const-ify a char*.
7722         (warn_for_assignment): Don't prototype.
7723         (convert_for_initialization, readonly_error, check_for_new_type,
7724         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
7725         Const-ify a char*.
7726
7727         * decl2.c (acceptable_java_type, output_vtable_inherit,
7728         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
7729         merge_functions, decl_namespace, validate_nonmember_using_decl,
7730         do_nonmember_using_decl): Add static prototype.
7731         (lang_f_options): Const-ify a char*.
7732         (finish_builtin_type): Likewise.
7733         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
7734         prototype.
7735
7736         * errfn.c: Include cp-tree.h.
7737         (cp_thing): Add static prototype.
7738         (compiler_error): Don't protoptype.
7739         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
7740         passing it to `cp_thing'.
7741
7742         * error.c (interesting_scope_p): Add static prototype.
7743
7744         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
7745         a char*.
7746
7747         * init.c (compiler_error): Don't prototype.
7748         (member_init_ok_or_else): Const-ify a char*.
7749         (build_java_class_ref): Add static prototype.
7750
7751         * lex.c (compiler_error): Don't prototype.
7752         (get_time_identifier, interface_strcmp, extend_token_buffer,
7753         handle_cp_pragma): Const-ify a char*.
7754         (is_global, init_filename_times): Add static prototype.
7755         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
7756         (compiler_error): Change from fixed args to variable args.
7757         (yyerror): Const-ify a char*.
7758
7759         * parse.y (cond_stmt_keyword): Const-ify a char*.
7760         (parse_decl): Add static prototype.
7761
7762         * pt.c (template_args_equal, print_template_context): Likewise.
7763         (print_candidates, check_default_tmpl_args): Const-ify a char*.
7764         (instantiate_class_template): Likewise.
7765
7766         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
7767
7768         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
7769         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
7770
7771         * search.c (lookup_field_info, lookup_member): Likewise.
7772         (lookup_member): Cast the first argument of `bzero' to a PTR.
7773
7774         * sig.c (compiler_error): Don't prototype.
7775         (build_signature_pointer_or_reference_nam): Const-ify a char*.
7776         (get_sigtable_name, build_member_function_pointer): Likewise.
7777
7778         * tree.c (compiler_error): Don't prototype.
7779         (no_linkage_helper, build_srcloc): Add static prototype.
7780         (build_vbase_pointer_fields): Const-ify a char*.
7781         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
7782
7783         * typeck.c (compiler_error): Don't prototype.
7784         (convert_for_assignment): Const-ify a char*.
7785         (comp_cv_target_types): Add static prototype.
7786         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
7787         build_component_addr, build_unary_op, convert_for_initialization):
7788         Const-ify a char*.
7789
7790         * typeck2.c (ack): Add static prototype and change from fixed args
7791         to variable args.
7792         (readonly_error, check_for_new_type): Const-ify a char*.
7793
7794         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
7795         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
7796         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
7797         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
7798         gen_assign, GNU_xref_member): Const-ify a char*.
7799
7800 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7801
7802         * gxxint.texi: Remove old discussion on copying virtual bases.
7803
7804 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
7805
7806         * Make-lang.in: Remove all references to g++.o/g++.c.
7807         Link g++ from gcc.o.
7808
7809 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
7810
7811         * decl2.c (comdat_linkage): Treat vtables like functions.
7812
7813 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
7814
7815         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
7816
7817 1999-03-25  Nathan Sidwell  <nathan@acm.org>
7818
7819         * decl.c (init_decl_processing): Add `signed' type as a synonym
7820         for `int'.
7821
7822 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
7823
7824         * typeck.c (common_type): Handle cv-qual unification for pointers
7825         to members.
7826
7827         * decl.c (unqualified_namespace_lookup): Return error_mark_node
7828         on error.
7829         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
7830         * lex.c (do_identifier): If we got error_mark_node, call
7831         lookup_name again.
7832
7833 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7834
7835         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
7836         classes.
7837
7838 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
7839
7840         * decl.c (lookup_name_real): Do nested field lookup regardless of
7841         TYPE_BEING_DEFINED.
7842
7843 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
7844
7845         * cp-tree.h (lang_type): Remove has_assignment and
7846         has_real_assignment.  Add befriending_classes.
7847         (TYPE_HAS_ASSIGNMENT): Remove.
7848         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
7849         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
7850         (lang_decl): Document.
7851         (DECL_BEFRIENDING_CLASSES): New macro.
7852         (FRIEND_NAME): Move declaration to more obvious location.
7853         (FRIEND_DECLS): Likewise.
7854         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
7855         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
7856         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
7857         (grok_op_properties): Likewise.
7858         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
7859         (add_friend): Likewise.  Don't do weird things with assignment
7860         operators.  Update DECL_BEFRIENDING_CLASSES.
7861         (add_friends): Don't do weird things with assignment operators.
7862         (make_friend_class): Likewise.  Update
7863         CLASSTYPE_BEFRIENDING_CLASSES.
7864         * pt.c (instantiate_class_template): Don't set
7865         TYPE_HAS_ASSIGNMENT.
7866         (tsubst_copy): Substitute the TREE_TYPE for more unary
7867         expressions.
7868         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
7869         * search.c (protected_accessible_p): New function.
7870         (friend_accessible_p): Likewise.
7871         (accessible_p): Use them.
7872
7873 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
7874
7875         * pt.c (convert_nontype_argument): Don't create things that aren't
7876         PTRMEM_CSTs when applying a qualification conversion to a
7877         PTRMEM_CST.
7878
7879 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
7880
7881         * Makefile.in (OBJS): Don't mention hash.o.
7882         (OBJDEPS): Likewise.
7883
7884 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
7885
7886         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
7887         * decl.c (expand_static_init): Make sure we don't add any after
7888         then.
7889
7890         * decl.c (cp_finish_decl): Move intelligence about handling
7891         DECL_COMDAT for variables from here...
7892         * decl2.c (comdat_linkage): ...to here.
7893         (maybe_make_one_only): Tweak.
7894         (import_export_decl): Call comdat_linkage for variables, too.
7895         (finish_file): Handle template statics properly.
7896
7897 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
7898
7899         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
7900         Document internals of pointer-to-member-functions.
7901         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
7902         (PFN_FROM_PTRMEMFUNC): Likewise.
7903         (build_type_conversion): Remove unused parameter.
7904         (build_ptrmemfunc1): Declare.
7905         (expand_ptrmemfunc_cst): New function.
7906         (delta2_from_ptrmemfunc): Likewise.
7907         (pfn_from_ptrmemfunc): Likewise.
7908         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
7909         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
7910         (convert_to_reference): Remove unused parameter to
7911         build_type_conversion.
7912         (ocp_convert): Likewise.
7913         (build_user_type_conversion): Likewise.
7914         * error.c (dump_expr): Handle NULL pointer-to-member functions.
7915         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
7916         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
7917         open when handling pointer-to-member functions.
7918         * pt.c (convert_nontype_argument): Clean up error messages.  Be
7919         more stringent with pointers-to-members.
7920         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
7921         (build_unary_op): Tidy ever-so-slightly.
7922         (build_conditional_expr): Remove extra parameter to
7923         build_type_conversion.
7924         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
7925         we're using.
7926         (expand_ptrmemfunc_cst): Define.
7927         (delta2_from_ptrmemfunc): Likewise.
7928         (pfn_from_ptrmemfunc): Likewise.
7929
7930 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
7931
7932         * init.c (build_member_call): Handle template-id expressions
7933         correctly.
7934         * typeck.c (build_x_function_call): Likewise.
7935
7936 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
7937
7938         * friend.c (make_friend_class): Avoid core dump when
7939         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
7940
7941 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
7942
7943         * decl.c (start_function): Suppress normal linkage heuristics
7944         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
7945
7946 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
7947
7948         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
7949         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
7950
7951 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7952
7953         * parse.y (named_complex_class_head_sans_basetype):
7954         Do not push a scope for error_mark_node.
7955         (maybe_base_class_list): Likewise.
7956
7957         * decl.c (start_decl): Check for error_mark_node as a type.
7958         Detected by g++.brendan/array-refs.C.
7959         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
7960         (maybe_build_cleanup_1): Likewise.  Detected by
7961         g++.jason/incomplete1.C.
7962
7963         * tree.c (build_dummy_object): Use void_zero_node instead of the
7964         error_mark_node.
7965         (is_dummy_object): Check for such a node.
7966         Detected by g++.bob/inherit1.C
7967
7968 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
7969
7970         * method.c (old_backref_index): Split out...
7971         (flush_repeats): From here.  Rename back from try_old_backref.
7972         (build_mangled_name): Put back some old-style repeat handling.
7973
7974 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7975
7976         * lex.c: Don't include setjmp.h.
7977         (parse_float): New static function.
7978         (pf_args): New struct.
7979         (real_yylex): Use them in call to `do_float_handler'.
7980
7981 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
7982
7983         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
7984         * tree.c (layout_basetypes): Not here.
7985         * search.c (dfs_search): Remove; no longer used.
7986
7987 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
7988
7989         * decl2.c (validate_nonmember_using_decl): Issue sensible
7990         error-messages on bogus qualifiers.
7991
7992 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
7993
7994         * call.c (add_function_candidate): Fix uninitialized variable.
7995
7996         * Makefile.in (search.o): Add dependency on varray.h.
7997
7998 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
7999
8000         * decl.c (duplicate_decls): Use same_type_p.
8001         * method.c (try_old_backref): Renamed from flush_repeats.  Use
8002         same_type_p.  Don't try to handle repeats.  Return success.
8003         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
8004         calls from old-style code, too.
8005         (check_ktype): Use same_type_p.
8006         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
8007         (build_qualified_name): Simplify logic.
8008         (process_overload_item): Strip typedefs and quals at the top.
8009         (build_mangled_name_for_type_with_Gcode): Remove call to
8010         type_canonical_variant.
8011         (build_mangled_name): Likewise.  Remove support for old-style
8012         repeats, which have been disabled since 2.7.2.  Don't mess with
8013         TREE_USED.
8014         (build_decl_overload_real): Don't mess with TREE_USED.
8015
8016 1999-03-13  Nathan Sidwell  <nathan@acm.org>
8017
8018         * error.c (cp_printers): Add 'F' escape character.
8019         (dump_type_real): Remove TREE_LIST (fnargs) printing.
8020         Functionality moved to dump_parameters.
8021         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
8022         (dump_function_decl): Extend meaning of V parameter.  Use
8023         dump_parameters and dump_exception_spec.
8024         (dump_parameters): New static function.
8025         (dump_exception_spec): New static function.
8026         (fndecl_as_string): Change argument semantics.  Use
8027         dump_function_decl directly.
8028
8029         * sig.c (build_signature_table_constructor): Use cp_error.
8030
8031 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8032
8033         * semantics.c (finish_switch_cond): Handle error cases gracefully.
8034         Detected by g++.law/enum5.C.
8035
8036         * typeck.c (build_modify_expr): Check for errors after resolving
8037         offsets.  Detected by g++.brendan/static1.C.
8038
8039         * decl.c (complete_array_type): Ignore initial_value if it is an
8040         error.  Detected by g++.benjamin/17930.C.
8041
8042         * typeck2.c (process_init_constructor): Return error if one argument
8043         is in error.  Detected by g++.benjamin/13478.C.
8044
8045 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8046
8047         * decl.c (select_decl): Allow class templates when we need types.
8048         * decl2.c (ambiguous_decl): Likewise.
8049
8050 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
8051
8052         * lex.c (do_identifier): Correct call to enforce_access.
8053         * search.c (accessible_p): Tweak comment.
8054
8055 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
8056
8057         * semantics.c (begin_class_definition): Call build_self_reference.
8058         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
8059
8060         * search.c (assert_canonical_unmarked): Fix typo in prototype.
8061
8062         * search.c (dfs_canonical_queue): New function.
8063         (dfs_assert_unmarked_p): Likewise.
8064         (assert_canonical_unmarked): Likewise.
8065         (access_in_type): Use it.
8066         (accessible_p): Likewise.  Walk the whole tree when umarking.
8067
8068         * sig.c (build_signature_table_constructor): Use accessible_p
8069         instead of compute_access.
8070
8071 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
8072
8073         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
8074
8075 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
8076
8077         * cp-tree.h (flag_access_control): Declare.
8078         (TREE_VIA_PPUBLIC): Document.
8079         (DECL_NONSTATIC_MEMBER_P): New macro.
8080         (enforce_access): Return an indication of whether or not access
8081         was permitted.
8082         (build_self_reference): Change prototype.
8083         (compute_access): Replace with ...
8084         (accessible_p): New function.
8085         (dfs_walk): Change prototype.
8086         (dfs_unmark): Likewise.
8087         (markedp): Likewise.
8088         * call.c (enforce_access): Use accessible_p.
8089         * class.c (build_self_reference): Insert the declaration into the
8090         list of members for this type, and make it public.
8091         * decl.c (xref_basetypes): Avoid ill-timed recursion.
8092         * init.c (build_offset_ref): Use lookup_member, not three separate
8093         name-lookups.  Call enforce_access rather than checking for
8094         illegal accesses here.
8095         (resolve_offset_ref): Likewise.
8096         * lex.c (do_identifier): Likewise.
8097         * method.c (hack_identifier): Likewise.
8098         * parse.y (self_reference): Remove.
8099         (opt_component_decl_list): Don't use it.
8100         * parse.c: Regenerated.
8101         * pt.c (print_candidates): Generalize to handle lists of
8102         overloaded functions.
8103         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
8104         not set.
8105         (get_template_base): Use new calling convention for dfs_walk.
8106         * search.c: Include varray.h.  Add prototypes.
8107         (dfs_walk): Accept a data pointer to pass to the work functions.
8108         All callers changed.  All work functions changed.
8109         (breadth_first_search): Rename to bfs_walk, and make consistent
8110         with dfs_walk.
8111         (dfs_walk_real): New function.
8112         (canonical_binfo): New function.
8113         (context_for_name_lookup): Likewise.
8114         (shared_marked_p): Likewise.
8115         (shared_unmarked_p): Likewise.
8116         (lokup_field_queue_p): Likewise.
8117         (lookup_field_r): Generalize to handle both functions and fields.
8118         (lookup_field): Just call lookup_member.
8119         (lookup_fnfields): Likewise.
8120         (lookup_member): Move body of lookup_field here and generalize.
8121         (dfs_accessible_queue_p): Likewise.
8122         (dfs_accessible_p): Likewise.
8123         (dfs_access_in_type): Likewise.
8124         (access_in_type): Likewise.
8125         (compute_access): Remove, and replace with ...
8126         (accessible_p): New function.
8127         (vbase_types): Remove.
8128         (vbase_decl_ptr_intermediate): Likewise.
8129         (vbase_decl_ptr): Likewise.
8130         (vbase_init_result): Likewise.
8131         (closed_envelopes): Likewise.
8132         (bvtable): Likewise.
8133
8134 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
8135
8136         * call.c (add_function_candidate): Check for proper number of args
8137         before checking the validity of those args.
8138
8139 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
8140
8141         * cp-tree.h (struct lang_type): Add anon_union field.
8142         (ANON_UNION_TYPE_P): Use it instead of examining type.
8143         (SET_ANON_UNION_TYPE_P): New macro.
8144         * decl.c (check_tag_decl): Use it.
8145
8146         * search.c (compute_access): Handle non-type contexts earlier, and
8147         handle NULL_TREE.
8148
8149         * tree.c (build_exception_variant): Use copy_to_permanent.
8150
8151         * decl2.c (setup_initp): Give statics with no priority the default
8152         priority here.
8153         (do_dtors, do_ctors, finish_file): Remove special handling of
8154         non-prioritized statics.
8155
8156 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
8157
8158         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
8159         * decl.c (make_typename_type): Don't issue an error if an
8160         immediate lookup fails; it migt be resolved later.
8161         * friend.c (is_friend): Add comment.
8162         * search.c (breadth_first_search): Add POSTFN and DATA
8163         parameters.  Tidy.  All callers changed.
8164         (lookup_field_queue_p): New function.
8165         (lookup_field_r): Likewise.
8166         (lookup_field_post): Likewise.
8167         (lookup_field): Use them, via breadth_first_search, instead of
8168         duplicating logic.
8169         (compute_access): Robustify.
8170         (lookup_fnfield_info): New structure.
8171
8172 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
8173
8174         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
8175
8176 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
8177
8178         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
8179         cc happy.
8180
8181         * decl2.c (import_export_class): Also return if
8182         CLASSTYPE_INTERFACE_ONLY is set.
8183
8184 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8185
8186         * decl.c (push_overloaded_decl): Only overwrite the old binding if
8187         there was one.
8188         * decl2.c (do_local_using_decl): Fix loop termination.
8189
8190 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
8191
8192         * cp-tree.h (determine_specialization): Don't declare.
8193         * pt.c (determine_specialization): Make it static.  Eliminate
8194         complain parameter.  Note that decl is always non-NULL now, and
8195         simplify accordingly.
8196
8197         * decl.c (maybe_push_to_top_level): Always call
8198         push_cp_function_context.
8199         (pop_from_top_level): Always call pop_cp_function_context.
8200
8201 1999-02-26  Nathan Sidwell  <nathan@acm.org>
8202
8203         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
8204         diagnostics.
8205         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
8206         * init.c (build_new_1): Extra arg to complete_type_or_else.
8207         (build_delete): Likewise.
8208         * typeck.c (require_complete_type): Likewise.
8209         (pointer_int_sum): Likewise.
8210         (pointer_diff): Likewise.
8211         (build_component_ref): Likewise.
8212
8213         * typeck2.c (incomplete_type_error): Always use cp_error.
8214         Show declaration of undefined type, if appropriate.
8215         Deal with UNKNOWN_TYPE nodes.
8216
8217         * typeck.c (require_complete_type): Use TYPE_SIZE as
8218         size_zero_node to mean incomplete type.
8219         (require_complete_type_in_void): New function.
8220         (build_compound_expr): Call complete_type_in_void for LHS.
8221         (build_c_cast): Call complete_type_in_void for void cast.
8222         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
8223         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
8224         require_complete_type_in_void.  Call it.
8225         * cp-tree.h (require_complete_type_in_void): Prototype new function.
8226
8227         * typeck.c (convert_arguments): Use alternative format for
8228         function decls.  Don't require_complete_type here.  Simplify
8229         diagnostic printing.
8230         (convert_for_initialization): Don't require_complete_type on RHS yet.
8231         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
8232
8233         * call.c (build_over_call): Cope with qualified void return type.
8234         * semantics.c (finish_call_expr): Likewise.
8235         * typeck.c (build_function_call_real): Likewise.
8236         (c_expand_return): Likewise.
8237         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
8238
8239         * call.c (print_z_candidates): Use alternate print format, to be
8240         consistent with (pt.c) print_candidates.
8241         * method.c (hack_identifier): List candidate members.
8242         * search.c (lookup_field): Build ambiguous list, and show it, if
8243         ambiguous.
8244
8245 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
8246
8247         * typeck.c (decay_conversion): Don't confuse constant array
8248         variables with their initializers.
8249
8250         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
8251         merging decls.
8252         * pt.c (regenerate_decl_from_template): Tweak for clarity.
8253         (instantiate_decl): Mark a decl instantiated before regenerating
8254         it to avoid recursion.
8255         * tree.c (mapcar): Don't call decl_constant_value unless we know
8256         something is TREE_READONLY_DECL_P.
8257
8258         * class.c (check_for_override): Don't stop checking when we find
8259         the first overridden function.  Delete #if 0'd code.
8260         * search.c (get_matching_virtual): Likewise.
8261
8262 1999-02-25  Richard Henderson  <rth@cygnus.com>
8263
8264         * lang-specs.h: Define __FAST_MATH__ when appropriate.
8265
8266 1999-02-24  Mike Stump  <mrs@wrs.com>
8267
8268         * typeck.c (convert_for_assignment): Allow boolean integral constant
8269         expressions to convert to null pointer.
8270
8271 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8272
8273         * decl.c (lookup_namespace_name): Resolve namespace aliases.
8274
8275         * class.c (push_nested_class): Allow namespaces.
8276
8277         * decl2.c (set_decl_namespace): Add friendp parameter.
8278         * decl.c (grokfndecl): Pass it.
8279         (grokvardecl): Likewise.
8280         * cp-tree.h: Change declaration.
8281
8282 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
8283
8284         * pt.c (tsubst): Allow an array of explicit size zero.
8285
8286 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
8287
8288         * errfn.c: Change varargs code to look like toplev.c.
8289
8290         * method.c (process_modifiers): Don't prepend 'U' for char or
8291         wchar_t.
8292
8293 1999-02-20  Craig Burley  <craig@jcb-sc.com>
8294
8295         * Make-lang.in (cplib2.ready): Don't consider updating
8296         cplib2 stuff if the current directory isn't writable, as
8297         it won't work (such as during a `make install').
8298
8299 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
8300
8301         * decl2.c (start_objects): Make file scope constructors and
8302         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
8303         ASM_OUTPUT_DESTRUCTOR are defined.
8304
8305 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
8306
8307         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
8308         (fn_type_unification): Adjust prototype.
8309         (lookup_fnfields_1): Declare.
8310         * call.c (add_template_candidate_real): Adjust call to
8311         fn_type_unification.
8312         * class.c (add_method): Don't allow duplicate declarations of
8313         constructors or destructors.
8314         (resolve_address_of_overloaded_function): Remove unused variable.
8315         Adjust call to fn_type_unification.
8316         * decl.c (grokfndecl): Be more robust in the face of illegal
8317         specializations.
8318         * decl2.c (check_classfn): Remove hokey handling of member
8319         templates.
8320         * pt.c (determine_specialization): Improve comments.  Adjust to
8321         handle template argument deduction as per the standard.
8322         (check_explicit_specialization): Fix comment spacing.  Handle
8323         type-conversion operators correctly.  Improve error-recovery.
8324         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
8325         (get_bindings_real): Simplify handling of static members.
8326         * search.c (lookup_fnfields_1): Make it have external linkage.
8327         * typeck.c (compparms): Fix comment.
8328         (build_unary_op): Don't try to figure out which template
8329         specialization is being referred to when when the address-of
8330         operator is used with a template function.
8331
8332 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8333
8334         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
8335         keyword to match an analogous change at the top level.
8336
8337         * tree.c (lvalue_or_else): Likewise.
8338
8339 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
8340
8341         * decl.c (xref_basetypes): Comment.
8342         * pt.c (instantiate_class_template): Use xref_basetypes.
8343
8344 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
8345
8346         * cp-tree.h (tsubst): Change prototype.
8347         (tsubst_expr): Likewise.
8348         (tsubst_copy): Likewise.
8349         (type_unification): Remove prototype.
8350         * call.c (convert_default_arg): Adjust call to tsubst_expr.
8351         * class.c (resolve_address_of_overloaded_function): Just use
8352         fn_type_unification.
8353         * decl.c (grokdeclarator): Adjust call to tsubst.
8354         * method.c (build_template_parm_names): Likewise.
8355         * pt.c (GTB_VIA_VIRTUAL): New macro.
8356         (GTB_IGNORE_TYPE): Likewise.
8357         (resolve_overloaded_unification): Add `complain' parameter.
8358         (try_one_overload): Likewise.
8359         (tsubst_template_arg_vector): Likewise.
8360         (tsubst_template_parms): Likewise.
8361         (tsubst_aggr_type): Likewise.
8362         (tsubst_arg_types): Likewise.
8363         (tsubst_call_declarator_parms): Likewise.
8364         (unify): Remove explicit_mask.
8365         (type_unification_real): Likewise.
8366         (get_template_base_recursive): Likewise.
8367         (coerce_template_template_parms): Provide prototype.
8368         (tsubst_function_type): Likewise.
8369         (try_class_unification): New function.
8370         All callers changed to use new complain parameter.
8371         (get_template_base): Use try_class_unification.
8372         (unify): Adjust handling of classes derived from template types.
8373         (fn_type_unification): Substitute explicit arguments before
8374         unification.
8375
8376 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8377
8378         * decl.c (pushdecl): Remove dead code.
8379
8380 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
8381
8382         * decl2.c (finish_objects): Fix code I missed in previous change.
8383
8384 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
8385
8386         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
8387         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
8388
8389         * pt.c (maybe_process_partial_specialization): Complain about
8390         'template <>' on non-specialization.
8391
8392 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
8393
8394         * decl.c (grokdeclarator): Catch wierd declarators.
8395         * decl2.c (finish_file): Don't abort because of namespace parsing
8396         failure.
8397         (check_decl_namespace): Remove.
8398
8399 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
8400
8401         * cp-tree.h (get_template_base): Don't declare.
8402         (dfs_walk): Declare.
8403         (dfs_unmark): Likewise.
8404         (markedp): Likewise.
8405         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
8406         targs to get_template_base.
8407         (get_template_base_recursive): Move here from search.c.  Check to
8408         see that the base found can be instantiated to form the desired
8409         type.
8410         (get_template_base): Likewise.
8411         (get_class_bindings): Simplify.
8412         * search.c (get_template_base_recursive): Move to pt.c.
8413         (get_template_base): Likewise.
8414         (markedp): Make it global.
8415         (dfs_walk): Likewise.
8416         (dfs_unmark): Likewise.
8417
8418 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
8419
8420         * pt.c (maybe_process_partial_specialization): Complain about
8421         specialization in wrong namespace.
8422         * tree.c (decl_namespace_context): New fn.
8423
8424 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8425
8426         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
8427         * pt.c (coerce_template_template_parms): Handle nested
8428         template template parameters.
8429
8430 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
8431
8432         * typeck2.c: Update email addresses.
8433
8434 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8435
8436         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
8437         turned off.
8438
8439 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
8440
8441         * lex.c (retrofit_lang_decl): Split out...
8442         (build_lang_decl): From here.
8443         * decl.c (pushdecl): Call it for functions generated by the middle
8444         end that don't have DECL_LANG_SPECIFIC.
8445         * cp-tree.h: Declare it.
8446
8447         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
8448         (start_objects, finish_objects): Only use special
8449         init_priority code if the user specified a priority.
8450         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
8451         objects.
8452
8453 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
8454
8455         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
8456         mkstemp.o.  Get them from libiberty now.
8457         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
8458
8459 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
8460
8461         * decl2.c (lang_decode_option): Use read_integral_parameter.
8462
8463 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
8464
8465         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
8466         before calling complete_type_or_else.
8467
8468 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8469
8470         * input.c (inline): Don't define, its handled by system.h.
8471
8472 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
8473
8474         * decl2.c: Don't define flag_no_ident here.  Don't process
8475         -f(no-)ident here.
8476         * cp-tree.h: Don't declare flag_no_ident here.
8477         * lang-specs.h: Map -Qn to -fno-ident.
8478
8479 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
8480
8481         * cp-tree.h (struct tree_binding): Replace scope field with a union.
8482         (BINDING_SCOPE): Adjust.
8483         * decl.c (BINDING_LEVEL): Adjust.
8484
8485 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
8486
8487         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
8488         member constants.
8489
8490         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
8491         a ctor initializer.
8492
8493         * tree.c (equal_functions): Fix name in prototype.
8494
8495         * decl.c (push_local_binding): Add FLAGS argument.
8496         (pushdecl, push_overloaded_decl): Pass it.
8497         * decl2.c (do_local_using_decl): Likewise.
8498         * cp-tree.h: Adjust prototype.
8499         * decl.c (poplevel): Fix logic.
8500
8501         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
8502         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
8503         (cat_namespace_levels): Don't loop forever.
8504
8505 1999-01-25  Richard Henderson  <rth@cygnus.com>
8506
8507         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
8508
8509 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
8510
8511         * class.c (resolve_address_of_overloaded_function): Mark the
8512         chosen function used.
8513
8514         * call.c (build_call): Make sure that a function coming in has
8515         been marked used already.
8516         * decl.c (expand_static_init): Call mark_used instead of
8517         assemble_external.
8518         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
8519         alloc_eh_object, expand_throw): Likewise.
8520         * init.c (build_builtin_delete_call): Likewise.
8521         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
8522         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
8523         expand_generic_desc): Likewise.
8524
8525 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8526
8527         * tree.c (equal_functions): New function.
8528         (ovl_member): Call it.
8529
8530 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
8531
8532         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
8533
8534 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8535
8536         * decl.c (decls_match): Return 1 if old and new are identical.
8537         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
8538
8539 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
8540
8541         * decl.c (start_function): Make member functions one_only on windows.
8542         * decl2.c (import_export_decl): Likewise.
8543
8544         * decl.c (grokdeclarator): Don't complain about implicit int in
8545         a system header.  Change same-name field check to not complain in
8546         a system header instead of within extern "C".
8547
8548 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
8549
8550         * cp-tree.h (PUSH_GLOBAL): New macro.
8551         (PUSH_LOCAL): Likewise.
8552         (PUSH_USING): Likewise.
8553         (namespace_bindings_p): Declare.
8554         (push_overloaded_decl): Likewise.
8555         * decl.c (push_overloaded_decl): Don't make it static.  Check for
8556         illegal declarations after using declarations here.
8557         (namespace_bindings_p): Likewise.
8558         (duplicate_decls): Don't consider declarations from different
8559         namespaces to be the same.
8560         (pushdecl): Use symbolic PUSH_ constants in calls to
8561         push_overloaded_decl.
8562         (push_overloaded_decl_1): Likewise.
8563         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
8564         (do_nonmember_using_decl): Check for illegal using declarations
8565         after ordinary declarations here.
8566         (do_local_using_decl): Call pushdecl to insert declarations.
8567
8568 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
8569
8570         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
8571
8572 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
8573
8574         * tree.c (build_cplus_array_type_1): Don't call build_array_type
8575         for types involving template parameters.
8576
8577         * cp-tree.h (PARM_DECL_EXPR): Delete.
8578         (convert_default_arg): Change prototype.
8579         (check_default_argument): Declare.
8580         (search_tree): Likewise.
8581         * call.c (convert_default_arg): Take the function to which the
8582         default argument belongs as a parameter, and do any necessary
8583         instantiation here, instead of ...
8584         (build_over_call): Here.
8585         * decl.c (local_variable_p): New function.
8586         (check_default_argument): Likewise, split out and tidied from ...
8587         (grokparms): Here.
8588         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
8589         * pt.c (tsubst_call_declarator_parms): New function.
8590         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
8591         with CALL_EXPRs, rather than trying to be clever.
8592         (tsubst): Use tsubst_call_declarator_parms.
8593         * tree.c (search_tree): Don't make it static.
8594         * typeck.c (convert_arguments): Use new interface to
8595         convert_default_arg.
8596
8597 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
8598
8599         * error.c (dump_function_decl): Don't print the argument types for
8600         a function when the verbosity level is negative.
8601
8602         * call.c (build_over_call): Check format attributes at call-time.
8603
8604         * pt.c (tsubst_copy): Fix comment.
8605         (unify): Don't allow unification with variable-sized arrays.
8606
8607         * semantics.c (finish_stmt_expr): When processing a template make
8608         the BIND_EXPR long-lived.
8609
8610 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
8611
8612         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
8613         (import_export_vtable): Not here.
8614
8615 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
8616
8617         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
8618         non-static member function.
8619
8620 1999-01-18  Nathan Sidwell  <nathan@acm.org>
8621
8622         * class.c (instantiate_type): Only diagnose illegal address of member
8623         function if complaining.
8624
8625         * decl.c (lookup_name_real): Remove duplicate code.
8626
8627 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
8628
8629         * tree.c (copy_template_template_parm): Use permanent_obstack.
8630
8631 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8632
8633         * pt.c (unify): Remove restrictions on deduction of argument
8634         of template template parameters.
8635
8636 1999-01-18  Nathan Sidwell  <nathan@acm.org>
8637
8638         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
8639
8640         * class.c (resolve_address_of_overloaded_function): Show list of
8641         all candidates, when none of them match.
8642
8643 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
8644
8645         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
8646         definition of 'casting away const' in reinterpret_cast<>.
8647
8648 1999-01-18  Graham  <grahams@rcp.co.uk>
8649
8650         * cvt.c: Add include for decl.h, remove extern for
8651         static_aggregates which is now provided by decl.h.
8652
8653         * Makefile.in (cvt.o): Add dependency for decl.h and missing
8654         dependencies for convert.h and flags.h.
8655
8656 1999-01-18  Nathan Sidwell  <nathan@acm.org>
8657
8658         * decl2.c (do_dtors): Set current location to that of the
8659         decl, for sensible diagnostics and debugging.
8660         (check_classfn): Issue `incomplete type' error, if
8661         class is not defined.
8662
8663 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
8664
8665         * cp-tree.h: Add prototype for bound_pmf_p.
8666
8667 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
8668             Manfred Hollstein <manfred@s-direktnet.de>
8669
8670         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
8671         -Wreturn-type.
8672
8673 1999-01-16  Nathan Sidwell  <nathan@acm.org>
8674
8675         * cp-tree.h (struct lang_type): Added has_mutable flag.
8676         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
8677         (TYPE_HAS_MUTABLE_P): New macro to read it.
8678         (cp_has_mutable_p): Prototype for new function.
8679         * class.c (finish_struct_1): Set has_mutable from members.
8680         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
8681         it contains a mutable.
8682         * typeck.c (cp_has_mutable_p): New function.
8683
8684 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
8685
8686         * pt.c (process_template_parm): Ignore top-level qualifiers on
8687         non-type parameters.
8688
8689         * decl.c (start_function): Use current_function_parms in the call
8690         to require_complete_type_for_parms, not the probably empty
8691         DECL_ARGUMENTS.
8692
8693 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
8694
8695         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
8696
8697         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
8698         that we don't suppress the other copies.
8699         * lex.c (handle_cp_pragma): Likewise.
8700
8701 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
8702
8703         * decl.c (grokdeclarator): Undo 1998-12-14 change.
8704         * tree.c (build_cplus_array_type_1): Likewise.
8705         * pt.c (instantiate_class_template): Remove misleading comment.
8706         (tsubst_aggr_type): Substitute if there are template parameters,
8707         regardless of whether or not they use template arguments.
8708         (unify): Likewise, but for unification.
8709
8710 1999-01-12  Richard Henderson  <rth@cygnus.com>
8711
8712         * cp-tree.h (flag_permissive): Declare extern.
8713
8714 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
8715
8716         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
8717         here.
8718         (lang_type): Add is_partial_instantiation.  Decrease width of
8719         dummy.
8720         (PARTIAL_INSTANTIATION_P): New macro.
8721         (OPERATOR_TYPENAME_P): Remove.
8722         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
8723         OPERATOR_TYPENAME_P.
8724         (grok_op_properties): Likewise.
8725         * friend.c (do_friend): Handle friends that are member functions
8726         correctly.
8727         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
8728         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
8729         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
8730         any more partial instantiation than is absolutely necessary for
8731         implicit typename.  Set PARTIAL_INSTANTIATION_P.
8732         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
8733         * semantics.c (begin_class_definition): Handle partial
8734         specializations of a type that was previously partially
8735         instantiated.
8736
8737 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
8738
8739         * g++spec.c (LIBSTDCXX): Provide default definition.
8740         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
8741
8742 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8743
8744         * Make-lang.in (g++.o): Depend on prefix.h.
8745
8746 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
8747
8748         * tree.c (bound_pmf_p): New fn.
8749         * typeck.c (build_c_cast): Use it.
8750
8751         * decl.c (grok_op_properties): Use same_type_p.
8752
8753 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8754
8755         * Makefile.in (cvt.o): Depend on toplev.h.
8756
8757         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
8758
8759         * cvt.c: Include toplev.h.
8760
8761         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
8762         definitions.
8763
8764         * init.c (expand_vec_init): Initialize variable `itype'.
8765
8766         * lex.c (yyerror): Cast the argument passed to a ctype function to
8767         an unsigned char.
8768
8769         * method.c (build_mangled_C9x_name): Wrap prototype and definition
8770         in "HOST_BITS_PER_WIDE_INT >= 64".
8771
8772         * typeck.c (build_binary_op): Mark parameter `convert_p' with
8773         ATTRIBUTE_UNUSED.
8774
8775 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
8776
8777         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
8778         * tree.c (build_exception_variant): Don't crash on empty throw
8779         specs.
8780
8781 1998-12-18  DJ Delorie  <dj@cygnus.com>
8782
8783         * cvt.c (convert_to_reference): Check for both error_mark_node
8784         and NULL_NODE after call to convert_for_initialization.
8785
8786 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
8787
8788         * error.c (interesting_scope_p): New fn.
8789         (dump_simple_decl): Use it.
8790         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
8791         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
8792
8793 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
8794
8795         * class.c (resolve_address_of_overloaded_function): Do conversion
8796         to correct type here, rather than ...
8797         (instantiate_type): Here.
8798
8799         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
8800         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
8801         (decl_template_parm_p): Remove.
8802         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
8803         parameter.
8804         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
8805         * pt.c (push_inline_template_parms_recursive): Set it.
8806         (decl_template_parm_p): Remove.
8807         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
8808         (process_template_parm): Set it.
8809
8810 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
8811
8812         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
8813         if configured with cpplib.
8814
8815 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
8816
8817         * decl.c (poplevel): Make sure ns_binding is initialized.
8818
8819         * decl.c (finish_function): Undo inadvertent change in previous
8820         patch.
8821
8822 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
8823
8824         * class.c (pushclass): Tweak handling of class-level bindings.
8825         (resolve_address_of_overloaded_function): Update pointer-to-member
8826         handling.
8827         (instantiate_type): Likewise.
8828         * cvt.c (cp_convert_to_pointer): Likewise.
8829         * decl.c (pop_binding): Take the DECL to pop, not just the name.
8830         Deal with `struct stat' hack.
8831         (binding_level): Add to documentation.
8832         (push_binding): Clear BINDING_TYPE.
8833         (add_binding): New function.
8834         (push_local_binding): Use it.
8835         (push_class_binding): Likewise.
8836         (poplevel): Adjust calls to pop_binding.
8837         (poplevel_class): Likewise.
8838         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
8839         declarations to current binding level.
8840         (push_class_level_binding): Likewise.
8841         (push_overloaded_decl): Adjust handling of OVERLOADs in local
8842         bindings.
8843         (lookup_namespace_name): Don't crash when confronted with a
8844         TEMPLATE_DECL.
8845         (lookup_name_real): Do `struct stat' hack in local binding
8846         contexts.
8847         (build_ptrmemfunc_type): Adjust documentation.
8848         (grokdeclarator): Don't avoid building real array types when
8849         processing templates unless really necessary.
8850         (finish_method): Adjust calls to pop_binding.
8851         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
8852         not reparse_decl_as_expr.
8853         (build_expr_from_tree): Deal with a template-id as the function to
8854         call in a METHOD_CALL_EXPR.
8855         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
8856         (maybe_adjust_types_For_deduction): Don't do peculiar things with
8857         METHOD_TYPEs here.
8858         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
8859         pointer-to-member types where necessary.
8860         * tree.c (build_cplus_array_type_1): Don't avoid building real
8861         array types when processing templates unless really necessary.
8862         (build_exception_variant): Compare the exception lists correctly.
8863
8864 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
8865
8866         * cp-tree.def (CPLUS_BINDING): Update documentation.
8867         * cp-tree.h (LOCAL_BINDING_P): New macro.
8868         (lang_identifier): Rename local_value to bindings.
8869         (tree_binding): Make `scope' of type `void*', not `tree'.
8870         (BINDING_SCOPE): Update documentation.
8871         (IDENTIFIER_LOCAL_VALUE): Remove.
8872         (IDENTIFIER_CLASS_VALUE): Document.
8873         (IDENTIFIER_BINDING): New macro.
8874         (IDENTIFIER_VALUE): Likewise.
8875         (TIME_IDENTIFIER_TIME): Likewise.
8876         (TIME_IDENTIFIER_FILEINFO): Likewise.
8877         (IMPLICIT_TYPENAME_P): Likewise.
8878         (set_identifier_local_value): Remove.
8879         (push_local_binding): New function.
8880         (push_class_binding): Likewise.
8881         * class.c (pushclass): Update comments; use push_class_binding.
8882         * decl.c (set_identifier_local_value_with_scope): Remove.
8883         (set_identifier_local_value): Likewise.
8884         (push_binding): New function.
8885         (pop_binding): Likewise.
8886         (binding_level): Update documentation.  Remove shadowed.
8887         (BINDING_LEVEL): New macro.
8888         (free_binding_nodes): New variable.
8889         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
8890         BLOCK_VARs when doing for-scope extension.  Remove effectively
8891         dead code.
8892         (pushlevel_class): Tweak formatting.
8893         (poplevel_class): Adjust for new name-lookup scheme.
8894         (print_binding_level): Likewise.
8895         (store_bindings): Likewise.
8896         (pushdecl): Likewise.
8897         (pushdecl_class_level): Likewise.
8898         (push_class_level_binding): Likewise.
8899         (push_overloaded_decl): Update comments.  Adjust for new
8900         name-lookup scheme.
8901         (lookup_name_real): Likewise.
8902         (lookup_name_current_level): Likewise.
8903         (cp_finish_decl): Likewise.
8904         (require_complete_types_for_parms): Likewise.  Remove misleading
8905         #if 0'd code.
8906         (grok_parms): Likewise.  Don't call
8907         require_complete_types_for_parms here.
8908         (grok_ctor_properties): Don't treat templates as copy
8909         constructors.
8910         (grop_op_properties): Or as assignment operators.
8911         (start_function): Document.  Adjust for new name-lookup scheme.
8912         (finish_function): Likewise.
8913         * decl2.c (do_local_using_decl): Use push_local_binding.
8914         * lex.c (begin_definition_of_inclass_inline): New function, split
8915         out from ...
8916         (do_pending_inlines): Here, and ...
8917         (process_next_inline): Here.
8918         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
8919         (init_filename_times): Likewise.
8920         (extract_interface_info): Likewise.
8921         (ste_typedecl_interface_info): Likewise.
8922         (check_newline): Likewise.
8923         (dump_time_statistics): Likewise.
8924         (handle_cp_pragma): Likewise.
8925         (do_identifier): Adjust for new name-lookup scheme.
8926         * parse.y (function_try_block): Return ctor_initializer_opt value.
8927         (fndef): Use it.
8928         (fn.defpen): Pass appropriate values to start_function.
8929         (pending_inline): Use functor_try_block value, and pass
8930         appropriate values to finish_function.
8931         * pt.c (is_member_template): Update documentation; remove handling
8932         of FUNCTION_DECLs.  As per name, this function should deal only in
8933         TEMPLATE_DECLs.
8934         (decl_template_parm_p): Change name of olddecl parameter to decl.
8935         (check_template_shadow): Adjust for new name-lookup scheme.
8936         (lookup_template_class): Likewise.
8937         (tsubst_decl): Tweak so as not to confuse member templates with
8938         copy constructors and assignment operators.
8939         (unify): Handle UNION_TYPEs.
8940         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
8941         (lang_print_xnode): Adjust for new name-lookup scheme.
8942         * typeck.c (mark_addressable): Likewise.
8943         (c_expand_return): Likewise.
8944
8945 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
8946
8947         * decl.c (grokdeclarator): Allow field with same name as class
8948         in extern "C".
8949
8950         * decl.c (lookup_name_real): Don't limit field lookup to types.
8951         * class.c (check_member_decl_is_same_in_complete_scope): No error
8952         if icv and x are the same.
8953         * lex.c (do_identifier): Tweak error message.
8954
8955 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
8956
8957         * decl.c (start_enum): Use push_obstacks, not
8958         end_temporary_allocation.
8959         (finish_enum): Call pop_obstacks.
8960
8961 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
8962
8963         * class.c (instantiate_type): Return error_mark_node rather than
8964         junk.
8965
8966 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
8967
8968         * cp-tree.h (most_specialized_instantiation): New function.
8969         (print_candidates): Likewise.
8970         * class.c (validate_lhs): Remove.
8971         (resolve_address_of_overloaded_function): New function, split out
8972         and then substantially reworked, from ...
8973         (instantiate_type): Use it.  Simplify.
8974         * cvt.c (convert_to_reference): Complain when caller has indicated
8975         that's the right thing to do.  Don't crash if instantiate_type
8976         fails.
8977         * pt.c: Substitute `parameters' for `paramters' throughout.
8978         (print_candidates): Don't make it static.
8979         (most_specialized_instantiation): Split out from ...
8980         (most_specialized): Here.
8981
8982 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
8983
8984         * lex.c (lang_init_options): Initialize cpplib.
8985         * decl2.c (parse_options,cpp_initialized): Removed.
8986         (lang_decode_option): Move initialization of cpplib to
8987         lang_init_options.
8988
8989 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
8990
8991         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
8992         well as the TYPE_DECL, when a typedef name is assigned to a
8993         previously anonymous type.
8994
8995 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
8996
8997         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
8998         __cp_eh_info for getting the eh info pointer.  Add table_index to
8999         field list.
9000         (push_eh_cleanup): Don't increment 'handlers' data field.
9001         (process_start_catch_block): Don't set the 'caught' field.
9002
9003         * cp/exception.cc (CP_EH_INFO): New macro for getting the
9004         exception info pointer within library routines.
9005         (__cp_eh_info): Use CP_EH_INFO.
9006         (__start_cp_handler): Get exception info pointer, set caught field,
9007         and increment the handlers field.  Avoids this being done by handlers.
9008         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
9009         (uncaught_exception): Use CP_EH_INFO macro.
9010
9011 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
9012
9013         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
9014
9015 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
9016
9017         * lex.c (check_newline): Add support for \ as `natural'
9018         characters in file names in #line to be consistent with #include
9019         handling.  We support escape processing in the # 1 "..." version of
9020         the command.  See also support in cp/lex.c.
9021
9022 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
9023
9024         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
9025         structure.
9026
9027 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
9028
9029         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
9030
9031         * error.c (dump_simple_decl): Also print namespace context.
9032         (dump_function_decl): Likewise.
9033
9034         * decl2.c (ambiguous_decl): Don't print old value if it's
9035         error_mark_node.
9036
9037         * decl.c (lookup_name_real): Fix handling of local types shadowed
9038         by a non-type decl.  Remove obsolete code.
9039         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
9040
9041         * lang-options.h: Add -fpermissive.
9042         * decl2.c: Likewise.
9043         * cp-tree.h: Add flag_permissive.
9044         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
9045         were specified, set flag_pedantic_errors.
9046         * call.c (build_over_call): Turn dropped qualifier messages
9047         back into pedwarns.
9048         * cvt.c (convert_to_reference): Likewise.
9049         * typeck.c (convert_for_assignment): Likewise.
9050
9051 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
9052
9053         * decl2.c (coerce_new_type): Use same_type_p.
9054         (coerce_delete_type): Likewise.
9055
9056         * call.c (check_dtor_name): Return 1, not error_mark_node.
9057
9058 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
9059
9060         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
9061         if MULTIPLE_SYMBOL_SPACES.
9062
9063         * pt.c (check_template_shadow): New fn.
9064         * decl2.c (grokfield): Use it.
9065         * decl.c (pushdecl): Likewise.
9066         (pushdecl_class_level): Likewise.
9067         (start_method): Likewise.
9068         (xref_tag): Don't try to use 't' if we're defining.
9069
9070         * call.c (check_dtor_name): Just return an error_mark_node.
9071         * pt.c (lookup_template_class): Complain about using non-template here.
9072         * parse.y (apparent_template_type): Not here.
9073
9074         * pt.c (check_explicit_specialization): Complain about specialization
9075         with C linkage.
9076
9077         * lang-options.h: Add -f{no-,}implicit-inline-templates.
9078
9079         * pt.c (convert_nontype_argument): Don't assume that any integer
9080         argument is intended to be a constant-expression.
9081
9082 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
9083
9084         * class.c (handle_using_decl): Fix comment.  Don't lookup
9085         constructors in base classes.
9086         (validate_lhs): Fix typo in comment.
9087         * search.c (lookup_field_1): Don't return a USING_DECL.
9088
9089         * cp-tree.h (DECL_ACCESS): Improve documentation.
9090
9091         * decl.c (expand_static_init): Don't set the initialization-done
9092         flag until the initialization is done.
9093
9094 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
9095
9096         * decl2.c (validate_nonmember_using_decl): Complain about using
9097         declarations for class members.
9098
9099 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
9100
9101         * typeck2.c (process_init_constructor): Use same_type_p.
9102
9103         * decl.c (check_tag_decl): Don't warn about null decl inside a
9104         class.
9105
9106         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
9107         UNIFY_ALLOW_NONE.
9108         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
9109         (resolve_overloaded_unification): Strip baselinks.
9110
9111 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9112
9113         * g++spec.c: Don't prototype xmalloc.
9114
9115 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
9116
9117         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
9118
9119         * decl.c (check_tag_decl): Do complain about null friend decl at
9120         file scope.
9121
9122 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
9123
9124         * lex.c (make_lang_type): Clear the whole struct lang_type, not
9125         only the first multiple of sizeof (int).
9126
9127 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
9128
9129         * decl.c (start_decl): An explicit specialization of a static data
9130         member is only a definition if it has an initializer.
9131
9132         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
9133         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
9134         cp_finish_decl.
9135         * init.c (expand_default_init): Check for DIRECT_BIND instead of
9136         DECL_ARTIFICIAL.
9137
9138         * call.c (build_over_call): Use build_decl.
9139
9140         * except.c (expand_throw): Just use convert, not
9141         build_reinterpret_cast.
9142
9143         * lex.c (handle_generic_pragma): Use token_buffer.
9144
9145         * decl.c (check_tag_decl): Don't complain about null friend decl.
9146
9147 1998-11-24  Dave Pitts  <dpitts@cozx.com>
9148
9149         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
9150         first position.
9151         * lex.c (check_newline): Use ISALPHA.
9152         (readescape): Use ISGRAPH.
9153         (yyerror): Use ISGRAPH.
9154
9155 1998-11-24  Nathan Sidwell  <nathan@acm.org>
9156
9157         * search.c (get_abstract_virtuals): Do not use initial
9158         CLASSTYPE_ABSTRACT_VIRTUALS.
9159         * typeck2.c (abstract_virtuals_error): Show location of abstract
9160         declaration.
9161         * call.c (build_new_method_call): Use
9162         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
9163         * class.c (finish_struct_bits): Don't bother working out whether
9164         get_abstract_virtuals will do anything, just do it.
9165
9166 1998-11-24  Graham  <grahams@rcp.co.uk>
9167
9168         * typeck.c (build_component_ref): Remove unused statement.
9169
9170 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
9171
9172         * class.c (add_method): Catch invalid overloads.
9173
9174         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
9175         * search.c (lookup_conversions): Handle getting real OVERLOADs.
9176         (add_conversions): Likewise.  Revert last change.
9177         * call.c (add_conv_candidate): Pass totype to add_candidate instead
9178         of fn.  Don't add a new candidate if the last one was for the same
9179         type.
9180         (print_z_candidates): Handle getting a type as a function.
9181         (joust): If we got two conversion candidates to the same type,
9182         just pick one.
9183         (build_object_call): Lose 'templates'.
9184         (build_user_type_conversion_1): Handle getting real OVERLOADs.
9185
9186 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
9187
9188         * typeck2.c (process_init_constructor): If there are elements
9189         that don't have initializers and they need to have constructors
9190         run, supply them with initializers.
9191
9192         * class.c (finish_struct_1): A class with a 0-width bitfield is
9193         still empty.
9194
9195 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
9196
9197         * pt.c (instantiate_class_template): Don't try to figure out what
9198         specialization to use for a partial instantiation.  Correct
9199         typos in a couple of comments.  Avoid calling uses_template_parms
9200         multiple times.
9201
9202 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
9203
9204         * method.c (process_overload_item): Add call to
9205         build_mangled_C9x_name for intTI_type_nodes.
9206         (build_mangled_C9x_name): Add prototype, define.
9207         * decl.c (init_decl_processing): Add names for
9208         TImode_type_node.
9209
9210 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
9211
9212         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
9213
9214         * class.c (finish_struct_1): Set things up for 0-width bitfields
9215         like we do for others.
9216
9217         * decl.c (check_tag_decl): New fn.
9218         (shadow_tag): Split out from here.
9219         * decl2.c (grok_x_components): Call it.
9220
9221 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
9222
9223         * decl.c: Lose warn_about_return_type.
9224         (grokdeclarator): Always complain about implicit int, except for
9225         `main () { ... }'.
9226
9227         * decl.c (tag_name): New fn.
9228         (xref_tag): Complain about using typedef-name after class-key.
9229
9230         * init.c (expand_vec_init): Also keep going if from_array.
9231
9232         * tree.c (is_overloaded_fn): Also handle the output of
9233         build_offset_ref.
9234
9235         * decl.c (grokdeclarator): Use constructor_name when comparing
9236         field name against enclosing class.
9237         * class.c (finish_struct_anon): Likewise.
9238
9239 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
9240
9241         * decl.c (poplevel): Remove code to handle KEEP == 2.
9242         (finish_function): Don't confuse BLOCK-order when
9243         processing a destructor.
9244
9245 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
9246
9247         * decl.c (require_complete_types_for_parms): Call layout_decl
9248         after we've completed the type.
9249
9250 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9251
9252         * decl2.c (validate_nonmember_using_decl): Allow using templates
9253         from the global namespace.
9254
9255 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
9256
9257         Handle specifying template args to member function templates.
9258         * tree.c (build_overload): Always create an OVERLOAD for a template.
9259         * search.c (add_conversions): Handle finding an OVERLOAD.
9260         * decl2.c (check_classfn): Likewise.
9261         * lex.c (identifier_type): See through a baselink.
9262         * parse.y (do_id): Don't call do_identifier if we got a baselink.
9263         * class.c (instantiate_type, case TREE_LIST): Recurse.
9264
9265         * decl.c (grokdeclarator): Allow a boolean constant for array
9266         bounds, odd as that sounds.
9267
9268         * pt.c (unify): Be more strict about non-type parms, except for
9269         array bounds.
9270         (UNIFY_ALLOW_INTEGER): New macro.
9271
9272 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
9273
9274         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
9275
9276 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
9277
9278         * semantics.c (begin_class_definition): Call
9279         maybe_process_partial_specialization before push_template_decl.
9280         Don't call push_template_decl for a specialization.
9281         * search.c (lookup_field): Do return a member template class.
9282         * decl2.c (handle_class_head): Handle member template classes.
9283
9284         * decl.c (grokdeclarator): A parm type need not be complete.
9285
9286         * pt.c (convert_nontype_argument): Fix thinko.
9287
9288 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
9289
9290         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
9291         (global_delete_fndecl): New variable.
9292         * decl.c (global_delete_fndecl): Define it.
9293         (init_decl_processing): Set it.
9294         * init.c (build_builtin_delete_call): Use it.
9295         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
9296         nodes.
9297
9298 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
9299
9300         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
9301         type.
9302
9303         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
9304         * call.c (build_object_call): Also support references to functions.
9305         * typeck.c (convert_for_initialization): Don't decay a function
9306         if the target is a reference to function.
9307
9308         * search.c (add_conversions): Get all the overloads from a class.
9309
9310         * decl.c (grok_ctor_properties): Complain about any constructor
9311         that will take a single arg of the class type by value.
9312
9313         * typeck2.c (build_functional_cast): Can't create objects of
9314         abstract classes this way.
9315         * cvt.c (ocp_convert): Likewise.
9316
9317         * decl.c (grokfndecl): Member functions of local classes are not
9318         public.
9319
9320 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
9321
9322         * Make-lang.in (cc1plus): Add dependency on hash.o.
9323
9324 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
9325
9326         * search.c (get_abstract_virtuals): Complain about virtuals with
9327         no final overrider.
9328         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
9329         with no final overrider.
9330         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
9331         on virtuals with no final overrider.
9332
9333         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
9334
9335         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
9336         after layout_type.
9337
9338         * friend.c (do_friend): Don't set_mangled_name_for_decl.
9339
9340         * class.c (finish_struct_anon): Complain about non-fields.
9341         * decl2.c (build_anon_union_vars): Likewise.
9342
9343         * decl.c (grokdeclarator): Normal data members can't have the same
9344         name as the class, either.
9345         * class.c (finish_struct_anon): Neither can members of an
9346         anonymous union.
9347
9348 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
9349
9350         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
9351         (TYPE_BINFO): Likewise.
9352         (IS_AGGR_TYPE): Tweak.
9353         (SET_IS_AGGR_TYPE): New macro.
9354         (CLASS_TYPE_P): Tweak.
9355         (lang_type): Group mark bitfields together.  Remove linenum.
9356         (CLASSTYPE_SOURCE_LINE): Remove macro.
9357         (CLASSTYPE_MARKED_N): New macro.
9358         (SET_CLASSTYPE_MARKED_N): Likewise.
9359         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
9360         (CLASS_TYPE_MARKED_*): Use them.
9361         (SET_CLASSTYPE_MARKED_*): Likewise.
9362         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
9363         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
9364         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
9365         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
9366         * class.c (class_cache_obstack): New variable.
9367         (class_cache_firstobj): Likewise.
9368         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
9369         (pushclass): Free the cache, when appropriate.
9370         (popclass): Tidy.
9371         (maybe_push_cache_obstack): Use class_cache_obstack.
9372         * decl.c (include hash.h).
9373         (typename_hash): New function.
9374         (typename_compare): Likewise.
9375         (build_typename_type): Check the hash table to avoid creating
9376         duplicates.
9377         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
9378         (grokdeclarator): Use CLASS_TYPE_P.
9379         (xref_basetypes): Likewise.
9380         (start_function): Likewise.  Don't put current_class_ref on the
9381         permanent obstack.
9382         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
9383         and TYPE_TI_ARGS.
9384         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
9385         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
9386         fields for types other than class types.  Do clear TYPE_ALIAS_SET
9387         for types other than class types, though.
9388         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
9389         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9390         * pt.c (process_template_parm): Don't set
9391         CLASSTYPE_GOT_SEMICOLON.
9392         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9393         Coerce arguments on the momentary obstack.
9394         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9395         (instantiate_class_template): Calculate template arguments on the
9396         momentary obstack.  Tidy.
9397         (tsubst_template_arg_vector): Use make_temp_vec.
9398         (tsubst_aggr_type): Put template arguments on the momentary
9399         obstack.
9400         (tsubst_decl): Likewise.
9401         (tsubst): Copy the array bounds index to the permanent obstack
9402         before building index types.  Use new macros.
9403         (unify): Use new macros.
9404         (do_type_instantiation): Likewise.
9405         * search.c (lookup_fnfields_1): Use new macros.
9406         (dfs_pushdecls): Build envelopes on the cache obstack.
9407         (dfs_compress_decls): Use new macros.
9408         (push_class_decls): Build on the cache obstack.
9409         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
9410         * sign.c (build_signature_pointer_or_reference_type): Use
9411         SET_IS_AGGR_TYPE.
9412         * tree.c (make_binfo): Check CLASS_TYPE_P.
9413         (copy_template_template_parm): Adjust.
9414         (make_temp_vec): Use push_expression_obstack.
9415         * typeck.c (complete_type): Use new macros.
9416         (comptypes): Likewise.
9417
9418 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
9419
9420         * pt.c (tsubst): Add diagnostics for invalid array, reference
9421         and pointer to member types.
9422
9423 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
9424
9425         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
9426
9427         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
9428         Simplify.
9429
9430         * parse.y (structsp): Fix cut-and-paste error.
9431
9432         * init.c (build_new): Complain about non-integral size.
9433
9434         * parse.y (unary_expr): Complain about defining types in sizeof.
9435
9436         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
9437
9438         * rtti.c (build_x_typeid): Complain about typeid without
9439         including <typeinfo>.
9440         (get_typeid): Likewise.  Complain about typeid of incomplete type.
9441         (get_tinfo_fn_dynamic): Likewise.
9442         (get_typeid_1): Not static anymore.
9443         * except.c (build_eh_type_type): Use get_typeid_1.
9444
9445         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
9446         ambiguous or private bases.  Fix warning for reference cast.
9447
9448 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
9449
9450         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
9451         * decl.c (duplicate_decls): Remove special-case code to deal with
9452         template friends, and just do the obvious thing.
9453         * pt.c (register_specialization): Tweak for clarity, and also to
9454         clear DECL_INITIAL for an instantiation before it is merged with a
9455         specialization.
9456         (check_explicit_specialization): Fix indentation.
9457         (tsubst_friend_function): Handle both definitions in friend
9458         declaration and outside friend declarations.
9459         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
9460         (regenerate_decl_from_template): Tweak accordingly.
9461         (instantiate_decl): Likewise.
9462
9463 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
9464
9465         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
9466         member function reference to error.
9467         * cvt.c (ocp_convert): Complain about converting an overloaded
9468         function to void.
9469
9470         * init.c (build_offset_ref): Just return a lone static member
9471         function.
9472
9473         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
9474         not internal ones.
9475
9476         * typeck.c (build_binary_op_nodefault): Improve error handling.
9477
9478         * decl.c (grokfndecl): Complain about making 'main' a template.
9479
9480         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
9481
9482         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
9483         TYPE_DECL in a template.
9484
9485 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
9486
9487         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
9488
9489         * decl.c (struct cp_function): Add named_label_uses.
9490         (push_cp_function_context): Save it.
9491         (pop_cp_function_context): Restore it.
9492         (define_label): Also complain about jumping into the scope of
9493         non-POD objects that don't have constructors.
9494         * tree.c (pod_type_p): New fn.
9495
9496         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
9497         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
9498         (get_tinfo_fn): Not here.
9499         * repo.c (repo_get_id): Abort if we get called for an incomplete
9500         type.
9501
9502 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
9503
9504         * except.c (expand_throw): Make sure first argument to
9505         __cp_push_exception is of type `void*' to avoid spurious error
9506         messages.
9507
9508 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
9509
9510         * pt.c (try_one_overload): Take orig_targs again.  Only check for
9511         mismatches against them; we don't care what a previous call found.
9512         (resolve_overloaded_unification): Adjust.
9513
9514         * search.c (lookup_field): Don't return anything for a non-type
9515         field from a dependent type.
9516         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
9517         in an array declarator.
9518         (start_decl): Push into the class before looking for the field.
9519
9520 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
9521
9522         * method.c (build_overload_value): Handle REFERENCE_TYPE.
9523
9524 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9525
9526         * decl.c (grokdeclarator): Allow namespace-scoped members if they
9527         are friends.
9528
9529 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
9530
9531         * pt.c (tsubst_decl): Don't mess with the global value of an
9532         un-mangled DECL_ASSEMBLER_NAME.
9533
9534 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
9535
9536         * decl.c (init_decl_processing): Remove CYGWIN conditional
9537         since CYGWIN is now able to deal with trapping signals.
9538
9539 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9540
9541         * cp-tree.h: Don't include gansidecl.h.
9542         * exception.cc: Include gansidecl.h (since we don't include config.h)
9543         * g++spec.c: Don't include gansidecl.h.
9544
9545 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
9546
9547         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
9548         size of dummy.
9549         (DECL_DEFINED_IN_CLASS_P): New macro.
9550         (TEMPLATE_PARMS_FOR_INLINE): Document.
9551         (check_static_variable_definition): New function.
9552         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
9553         appropriate.
9554         (check_static_variable_definition): Split out from ...
9555         (grokdeclarator): Here.
9556         * pt.c (check_default_tmpl_args): New function, split out from ...
9557         (push_template_decl_real): Here.
9558         (instantiate_template): Fix comment.
9559
9560 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
9561
9562         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
9563         (CP_TYPE_VOLATILE_P): Likewise.
9564         (CP_TYPE_RESTRICT_P): Likewise.
9565
9566 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
9567
9568         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
9569
9570 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
9571
9572         * class.c (instantiate_type): Be more helpful.
9573
9574         * decl2.c (import_export_decl): Call import_export_class.
9575
9576         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
9577         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
9578         * pt.c (tsubst_copy): Likewise.
9579
9580 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
9581
9582         * init.c (expand_vec_init): Fix off-by-one error.
9583
9584 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
9585
9586         * parse.y (apparent_template_type): New type.
9587         (named_complex_class_head_sans_basetype): Use it.
9588         * Makefile.in (CONFLICTS): One new conflict.
9589         * parse.c: Regenerated.
9590
9591 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
9592
9593         * cp-tree.h (COMPARE_STRICT): New macro.
9594         (COMPARE_BASE): Likewise.
9595         (COMPARE_RELAXED): Likewise.
9596         (COMPARE_REDECLARATION): Likewise.
9597         (same_type_p): Likewise.
9598         (same_or_base_type_p): Likewise.
9599         * call.c (standard_conversion): Use them, in place of comptypes
9600         with numeric arguments.
9601         (reference_binding): Likewise.
9602         (convert_like): Likewise.
9603         (build_over_call): Likewise.
9604         (is_subseq): Likewise.
9605         (is_properly_derived_from): Likewise.
9606         (compare_ics): Likewise.
9607         (joust): Likewise.
9608         * class.c (delete_duplicate_fields_1): Likewise.
9609         (resolves_to_fixed_type_p): Likewise.
9610         (instantiate_type): Likewise.  Remove #if 0'd code.
9611         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
9612         (pushdecl): Likewise.
9613         (lookup_name_real): Likewise.
9614         (grokdeclarator): Likewise.  Check for illegal array declarations.
9615         (grokparms): Likewise.
9616         (grok_op_properties): Likewise.
9617         * decl2.c (check_classfn): Likewise.
9618         * friend.c (is_friend): Likewise.
9619         (make_friend_class): Likewise.
9620         * init.c (expand_aggr_init): Likewise.
9621         (expand_vec_init): Likewise.
9622         * pt.c (is_member_template_class): Remove declaration.
9623         (is_specialization_of): Use COMPARE_* and new macros.
9624         (comp_template_parms): Likewise.
9625         (convert_nontype_argument): Likewise.
9626         (coerce_template_template_parms): Likewise.
9627         (template_args_equal): Likewise.
9628         (lookup_template_class): Likewise.
9629         (type_unification_real): Likewise.
9630         (unify): Likewise.
9631         (get_bindings_real): Likewise.
9632         * search.c (covariant_return_p): Likewise.
9633         (get_matching_virtual): Likewise.
9634         * sig.c (match_method_types): Likewise.
9635         * tree.c (vec_binfo_member): Likewise.
9636         (cp_tree_equal): Likewise.
9637         * typeck.c (common_type): Likewise.
9638         (comp_array_types): Likewise.  Get issues involving unknown array
9639         bounds right.
9640         (comptypes): Update comments.  Use new flags.
9641         (comp_target_types): Use new macros.
9642         (compparms): Likewise.
9643         (comp_target_parms): Likewise.
9644         (string_conv_p): Likewise.
9645         (build_component_ref): Likewise.
9646         (build_indirect_ref): Likewise.
9647         (build_conditional_expr): Likewise.
9648         (build_static_cast): Likewise.
9649         (build_reinterpret_cast): Likewise.
9650         (build_const_cast): Likewise.
9651         (build_modify_expr): Likewise.
9652         (convert_for_assignment): Likewise.
9653         (comp_ptr_ttypes_real): Likewise.
9654         (ptr_reasonably_similar): Likewise.
9655         (comp_ptr_ttypes_const): Likewise.
9656
9657 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
9658
9659         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
9660
9661 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
9662
9663         * decl2.c (delete_sanity): Pass integer_zero_node, not
9664         integer_two_node, to build_vec_delete.
9665         * init.c (build_array_eh_cleanup): Remove.
9666         (expand_vec_init_try_block): New function.
9667         (expand_vec_init_catch_clause): Likewise.
9668         (build_vec_delete_1): Don't deal with case that auto_delete_vec
9669         might be integer_two_node anymore.
9670         (expand_vec_init): Rework for initialization-correctness and
9671         exception-correctness.
9672         * typeck2.c (process_init_constructor): Make mutual exclusivity
9673         of cases more obvious.
9674
9675 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
9676
9677         * decl.c (lookup_name_real): OK, only warn if not lexing.
9678         Simplify suggested fix.
9679
9680         * cp-tree.h (IDENTIFIER_MARKED): New macro.
9681         * search.c (lookup_conversions): Use breadth_first_search.
9682         (add_conversions): Avoid adding two conversions to the same type.
9683         (breadth_first_search): Work with base binfos, rather
9684         than binfos and base indices.
9685         (get_virtual_destructor): Adjust.
9686         (tree_has_any_destructor_p): Adjust.
9687         (get_matching_virtual): Adjust.
9688
9689         * pt.c (push_template_decl_real): Generalize check for incorrect
9690         number of template parms.
9691         (is_member_template_class): #if 0.
9692
9693 1998-10-29  Richard Henderson  <rth@cygnus.com>
9694
9695         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
9696         last.
9697
9698 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
9699
9700         * lex.c: Call check_newline from lang_init always.  After
9701         calling cpp_start_read, set yy_cur and yy_lim to read from the
9702         cpplib token buffer.
9703
9704 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
9705
9706         * class.c (instantiate_type): Don't consider templates for a normal
9707         match.
9708
9709         * class.c (finish_struct_1): Don't complain about non-copy
9710         assignment ops in union members.
9711
9712         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
9713         (prepare_fresh_vtable): Likewise.
9714         (finish_struct_1): Don't call import_export_class.
9715         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
9716         (finish_prevtable_vardecl): Lose.
9717         (finish_file): Don't call it.
9718         * pt.c (instantiate_class_template): Likewise.
9719         * cp-tree.h: Remove it.
9720
9721         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
9722         * decl.c (finish_function): Not here.
9723         (start_function): Do set DECL_INITIAL.
9724
9725         * pt.c (push_template_decl_real): Complain about default template
9726         args for enclosing classes.
9727
9728         * call.c (add_function_candidate): Treat conversion functions
9729         as coming from the argument's class.
9730         * cp-tree.h (DECL_CONV_FN_P): New fn.
9731         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
9732         * class.c (add_method): Use DECL_CONV_FN_P.
9733         * decl2.c (check_classfn): Likewise.
9734         * error.c (dump_function_name): Likewise.
9735         (dump_function_decl): Likewise.
9736         * pt.c (fn_type_unification): Likewise.
9737         * search.c (add_conversions): Likewise.
9738
9739 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
9740
9741         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
9742         * method.c (hack_identifier): Also check for using RESULT_DECL
9743         from outer context.
9744
9745 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
9746
9747         * decl.c (grokdeclarator): Use type_quals, rather than constp,
9748         consistently.
9749
9750 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
9751
9752         * call.c (standard_conversion): instantiate_type here.
9753         (reference_binding): And here.
9754         (implicit_conversion): Not here.
9755         (build_op_delete_call): No need to cons up an OVERLOAD.
9756         * cvt.c (cp_convert_to_pointer): instantiate_type here.
9757         (convert_to_reference): And here.
9758         * decl.c (grok_reference_init): Not here.
9759         (grokparms): Or here.
9760         * typeck2.c (digest_init): Or here.
9761         * typeck.c (decay_conversion): Take the address of overloaded
9762         functions, too.
9763         (require_instantiated_type): Lose.
9764         (convert_arguments): Don't handle unknown types here.
9765         (build_c_cast): Likewise.
9766         (build_binary_op): Gut.
9767         (build_conditional_expr): Don't require_instantiated_type.
9768         (build_modify_expr): Likewise.
9769         (build_static_cast): Don't instantiate_type.
9770         (build_reinterpret_cast): Likewise.
9771         (build_const_cast): Likewise.
9772         (convert_for_initialization): Likewise.
9773         (build_ptrmemfunc): Use type_unknown_p.
9774         (convert_for_assignment): Also do default_conversion on overloaded
9775         functions.  Hand them off to ocp_convert.
9776
9777 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
9778
9779         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
9780         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
9781
9782         * class.c (finish_struct_1): Use build_cplus_array_type to build
9783         array types.
9784         * decl.c (init_decl_processing): Likewise.
9785         * except.c (expand_end_eh_spec): Likewise.
9786         * search.c (expand_upcast_fixups): Simplify very slightly.
9787
9788 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
9789
9790         * decl.c (grokdeclarator): Complain about a variable using
9791         constructor syntax coming back null from start_decl.
9792
9793         * friend.c (make_friend_class): Complain about trying to make
9794         a non-class type a friend.
9795
9796         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
9797         (start_function): Not here.
9798
9799 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
9800
9801         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
9802
9803 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
9804
9805         * typeck2.c (process_init_constructor): Only skip anonymous fields
9806         if they are bitfields.
9807
9808         * cp-tree.def (TYPEOF_TYPE): New code.
9809         * error.c (dump_type_real): Handle it.
9810         * pt.c (tsubst): Likewise.
9811         * tree.c (search_tree): Likewise.
9812         * semantics.c (finish_typeof): New fn.
9813         * parse.y (typespec): Use it.
9814         * cp-tree.h: Declare it.
9815
9816 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
9817
9818         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
9819
9820 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
9821
9822         * typeck.c (convert_arguments): Don't handle pmf references
9823         specially.
9824
9825         * init.c (build_member_call): Don't try to convert to the base type
9826         if it's ambiguous or pedantic.
9827
9828         * typeck2.c (check_for_new_type): Only depend on pedantic for
9829         C-style casts.
9830
9831 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
9832
9833         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
9834         non-converting constructors.
9835
9836 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9837
9838         * gxxint.texi: Correct documentation for n, N, Q, and B.
9839
9840 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9841
9842         * parse.y (condition): Convert VAR_DECL from reference to indirect
9843         reference.
9844
9845 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
9846
9847         * exception.cc (__cp_pop_exception): Free the original exception
9848         value, not the potentially coerced one.
9849
9850 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
9851
9852         * Makefile.in (hash.h): Run gperf when necessary.
9853
9854         * cp-tree.h (CP_TYPE_READONLY): Remove.
9855         (CP_TYPE_VOLATILE): Likewise.
9856         (CP_TYPE_QUALS): New macro.
9857         (CP_TYPE_CONST_P): Likewise.
9858         (CP_TYPE_VOLATILE_P): Likewise.
9859         (CP_TYPE_RESTRICT_P): Likewise.
9860         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
9861         (cp_build_type_variant): Rename to ...
9862         (cp_build_qualified_type): New function.
9863         (c_apply_type_quals_to_decl): Declare.
9864         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
9865         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
9866         (cp_type_qual_from_rid): New function.
9867         (compparms): Remove unused parameter.  All callers changed.
9868         (cp_type_quals): New function.
9869         (at_least_as_qualified_p): Likewise.
9870         (more_qualified_p): Likewise.
9871
9872         * call.c (standard_conversion): Replace calls to
9873         cp_build_type_variant with cp_build_qualified_type.  Use
9874         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
9875         compare them.  Use CP_TYPE_* macros to check qualifiers.
9876         (reference_binding): Likewise.
9877         (implicit_conversion): Likewise.
9878         (add_builtin_candidates): Likewise.
9879         (build_over_call): Likewise.
9880         * class.c (overrides): Compare all qualifiers, not just `const',
9881         on method declarations.
9882         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
9883         (convert_pointer_to_real): Likewise.
9884         (type_promotes_to): Likewise.
9885         * decl.c (check_for_uninitialized_const_var): New function.
9886         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
9887         (cp_finish_decl): Use check_for_uninitialized_const_var.
9888         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
9889         handle `restrict'.
9890         (grok_ctor_properties): Likewise.
9891         (grok_op_properties): Likewise.
9892         (start_function): Likewise.
9893         (rever_static_member_fn): Likewise.
9894         * decl2.c (grok_method_quals): Likewise.
9895         (grokfield): Likewise.
9896         * error.c (dump_readonly_or_volatile): Rename to ...
9897         (dump_qualifiers): New function.  Handle `restrict'.
9898         (dump_type_real): Use it.
9899         (dump_aggr_type): Likewise.
9900         (dump_type_prefix): Likewise.
9901         (dump_type_suffix): Likewise.
9902         (dump_function_decl): Likewise.
9903         (cv_as_string): Likewise.
9904         * gxx.gperf: Add __restrict and __restrict__.
9905         * gxxint.texi: Document `u' as used for `__restrict', and a few
9906         other previously undocumented codes.
9907         * hash.h: Regenerated.
9908         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
9909         (build_member_call): Likewise.
9910         (build_new_1): Likewise.
9911         * lex.c (init_parse): Add entry for RID_RESTRICT.
9912         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
9913         (cp_type_qual_from_rid): Define.
9914         * lex.h (enum rid): Add RID_RESTRICT.
9915         * method.c (process_modifiers): Deal with `restrict'.
9916         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
9917         * parse.c: Regenerated.
9918         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
9919         (tsubst_aggr_type): Likewise.
9920         (tsubst): Likewise.
9921         (check_cv_quals_for_unify): Likewise.
9922         (unify): Likewise.
9923         * rtti.c (init_rtti_processing): Likewise.
9924         (build_headof): Likewise.
9925         (get_tinfo_var): Likewise.
9926         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
9927         (expand_class_desc): Likewise.
9928         (expand_attr_desc): Likewise.
9929         (synthesize_tinfo_fn): Likewise.
9930         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
9931         (get_matching_virtual): Likewise.
9932         (expand_upcast_fixups): Likewise.
9933         * sig.c (build_signature_pointer_or_reference_name): Take
9934         type_quals, not constp and volatilep.
9935         (build_signature_pointer_or_reference_type): Likewise.
9936         (match_method_types): More CP_TYPE_QUALS conversion, etc.
9937         (build_signature_pointer_constructor): Likewise.
9938         (build_signature_method_call): Likewise.
9939         * tree.c (build_cplus_array_type): Likewise.
9940         (cp_build_type_variant): Rename to ...
9941         (cp_build_qualified_type): New function.  Deal with `__restrict'.
9942         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
9943         (build_exception_variant): Likewise.
9944         (mapcar): Likewise.
9945         * typeck.c (qualif_type): Likewise.
9946         (common_type): Likewise.
9947         (comptypes): Likewise.
9948         (comp_cv_target_types): Likewise.
9949         (at_least_as_qualified_p): Define.
9950         (more_qualified_p): Likewise.
9951         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
9952         (compparms): Likewise.
9953         (inline_conversion): Likewise.
9954         (string_conv_p): Likewise.
9955         (build_component_ref): Likewise.
9956         (build_indirect_ref): Likewise.
9957         (build_array_ref): Likewise.
9958         (build_unary_op): Likewise.
9959         (build_conditional_expr): Likewise.
9960         (build_static_cast): Likewise.
9961         (build_c_cast): Likewise.
9962         (build_modify_expr): Likewise.
9963         (convert_For_assignment): Likewise.
9964         (comp_ptr_ttypes_real): Likewise.
9965         (cp_type_quals): New function.
9966
9967 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
9968
9969         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
9970         (CP_TYPE_VOLATILE): Likewise.
9971         * decl.c (grokdeclarator): Use them.
9972         * tree.c (canonical_type_variant): Likewise.
9973
9974 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9975
9976         * parse.y (named_class_head): Push into class while parsing the
9977         base class list.
9978         * decl2.c (push_scope, pop_scope): New functions.
9979         * cp-tree.h: Declare them.
9980         * init.c (build_new_1): Delay cleanup until end of full expression.
9981
9982 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
9983
9984         * typeck.c (build_component_ref): Use of a type here is an error.
9985
9986 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
9987
9988         Revamp references to member functions.
9989         * method.c (hack_identifier): Call build_component_ref for a
9990         reference to a member function.
9991         * typeck.c (build_component_ref): Only return a single function
9992         if it's static.  Otherwise, return a COMPONENT_REF.
9993         (build_x_function_call): Handle a COMPONENT_REF.
9994         (build_unary_op): Handle all unknown-type things.
9995         * decl2.c (arg_assoc): Handle COMPONENT_REF.
9996         * class.c (instantiate_type): Complain if the function we get is a
9997         nonstatic member function.  Remove code for finding "compatible"
9998         functions.
9999         * pt.c (tsubst_copy): Handle NOP_EXPR.
10000         * tree.c (build_dummy_object): New fn.
10001         (maybe_dummy_object): New fn.
10002         (is_dummy_object): New fn.
10003         * cp-tree.h: Declare them.
10004         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
10005         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
10006         * init.c (build_member_call): Use maybe_dummy_object and
10007         is_dummy_object.
10008         (build_offset_ref): Use maybe_dummy_object.
10009         (resolve_offset_ref): Use is_dummy_object.
10010         * typeck.c (build_x_function_call): Call build_dummy_object.
10011         (unary_complex_lvalue): Call is_dummy_object.
10012
10013         * typeck.c (build_component_addr): Make sure field is a field.
10014
10015         * call.c (build_new_op): Delete obsolete code.
10016
10017         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
10018
10019 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10020
10021         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
10022         std if std is ignored.
10023
10024 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
10025
10026         * decl.c (grokvardecl): Fix thinko.
10027
10028         * decl.c (grokdeclarator): Embedded attrs bind to the right,
10029         not the left.
10030
10031         * parse.y (fn.def2): Fix 'attrs' format.
10032
10033 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
10034
10035         * Makefile.in (CONFLICTS): Update.
10036         * parse.y (expr_or_declarator_intern): New rule.
10037         (expr_or_declarator, direct_notype_declarator, primary,
10038         functional_cast): Use it.
10039         (notype_declarator_intern): New rule.
10040         (notype_declarator, complex_notype_declarator): Use it.
10041
10042 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
10043
10044         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
10045         (grokvardecl): Likewise.
10046
10047 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10048
10049         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
10050         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
10051
10052         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
10053
10054         * pt.c (process_partial_specialization): Cast 1st argument of
10055         `bzero' to (PTR).
10056
10057         * tree.c (build_base_fields): Cast `base_align' to (int) when
10058         comparing against one.
10059
10060 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
10061
10062         * decl.c (lookup_name_real): Handle template parameters for member
10063         templates where said parameters have the same name as the
10064         surrounding class.
10065
10066         * decl.c (expand_static_init): Build cleanups before entering the
10067         anonymous function used to do them to avoid access-checking
10068         confusion.
10069
10070         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
10071         accidentally removed by previous change, and make DECL_RTL here.
10072         * class.c (add_method): Don't make DECL_RTL here.
10073
10074         * pt.c (for_each_template_parm): Don't examine uninstantiated
10075         default arguments.
10076
10077 1998-10-16  Dave Brolley  <brolley@cygnus.com>
10078
10079         * lex.c (real_yylex): Fix unaligned access of wchar_t.
10080
10081 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
10082
10083         * class.c (add_method): Fix documentation to reflect previous
10084         changes.  Check for duplicate method declarations here.
10085         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
10086         correctly; such things never match.
10087         (grokfndecl): Don't look for duplicate methods here.
10088         * decl2.c (check_classfn): Don't assume names are mangled.
10089         Don't add bogus member function declarations to a class before the
10090         class type is complete.
10091         (grokfield): Reformat error message.
10092         * method.c (set_mangled_name_for_decl): Don't mangle names while
10093         processing_template_decl.
10094
10095 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
10096
10097         * typeck.c (build_indirect_ref): Complain about a pointer to data
10098         member, too.
10099         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
10100         data member.
10101         * init.c (resolve_offset_ref): Don't undo the above.
10102
10103         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
10104         (struct lang_decl_flags): Add `bitfield'.
10105         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
10106         DECL_BIT_FIELD.
10107         * decl2.c (grokbitfield, grok_alignof): Likewise.
10108         * init.c (build_offset_ref): Likewise.
10109         * typeck.c (build_component_addr, expr_sizeof): Likewise.
10110         * cvt.c (build_up_reference): Don't crash if taking the address
10111         returns error_mark_node.
10112
10113         * decl.c (grokfndecl): Also check ctype when checking for ::main().
10114
10115 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
10116
10117         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
10118         Do mangling here.
10119         (grokdeclarator): Instead of here.
10120         * friend.c (do_friend): Lose special handling of ::main and
10121         __builtin_*.
10122         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
10123
10124         * spew.c (yylex): Clear looking_for_typename if we got
10125         'enum { ... };'.
10126
10127 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
10128
10129         * class.c (maybe_warn_about_overly_private_class): Improve error
10130         messages for class with only private constructors.
10131
10132         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
10133         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
10134         (build_typename_type): New function.
10135         * decl.c (build_typename_type): Broken out from ...
10136         (make_typename_type): Use it.
10137         * search.c (lookup_field): Likewise.
10138
10139 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10140
10141         * pt.c (convert_nontype_argument): Check against type_referred_to.
10142         * decl.c (grokvardecl): Check for declarator name before building
10143         DECL_ASSEMBLER_NAME.
10144
10145 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
10146
10147         * pt.c (lookup_template_class): Add comment.
10148         (instantiate_class_template): Don't mark the _TYPE node for
10149         member class templates as an instantiation.
10150
10151 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
10152
10153         * decl.c (grokfndecl): Fix my thinko.
10154
10155 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
10156
10157         * tinfo2.cc (fast_compare): Remove.
10158         (before): Just use strcmp.
10159         * tinfo.cc (operator==): Just use strcmp.
10160
10161 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
10162
10163         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
10164         declarations.
10165
10166 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
10167
10168         * cp-tree.h (specializations_of_same_template_p): Remove.
10169         * search.c (get_template_base): Don't use it.
10170         (get_template_base_recursive): Likewise.
10171         * pt.c (specializations_of_same_template_p): Remove.
10172         (unify): Don't use it.
10173         (lookup_template_class): Find the correct parent when setting
10174         CLASSTYPE_TI_TEMPLATE.
10175
10176 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
10177
10178         * tinfo.cc (operator==): Always compare names.
10179
10180 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
10181
10182         * decl.c (start_function): Fix cut-and-paste error.
10183
10184 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
10185
10186         * inc/typeinfo: Add #pragma interface.
10187         (operator!=): Just call operator==.
10188         * tinfo.cc: Add #pragma implementation.
10189         (operator==): Move from inc/typeinfo and tinfo2.cc.
10190         Check __COMMON_UNRELIABLE instead of _WIN32.
10191
10192         * typeck2.c (my_friendly_abort): Add URL.
10193
10194 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
10195
10196         * decl.c (start_method): Added extra parameter for attributes.
10197         * cp-tree.h (start_method): Update prototype.
10198         * parse.y (fn.def2): Update start_method parameter list.
10199
10200 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
10201
10202         * cp-tree.h (specializations_of_same_template_p): Declare.
10203         * pt.c (specializations_of_same_template_p): New function.
10204         (unify): Use it.
10205         * search.c (get_template_base): Use it.
10206         (get_template_base_recursive): Likewise.
10207
10208 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
10209
10210         * decl2.c (start_objects): Add new variable `joiner' and
10211         initialize it properly.
10212
10213 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
10214
10215         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
10216         change to vtable types.
10217
10218         * cvt.c (ocp_convert): Avoid infinite recursion caused by
10219         1998-10-03 change.
10220
10221 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
10222
10223         * pt.c (resolve_overloaded_unification): New fn.
10224         (try_one_overload): Likewise.
10225         (unify): Don't fail on unknown type.
10226         (type_unification_real): Likewise.  Use resolve_overloaded_unification
10227         to handle an overloaded argument.
10228         (template_args_equal): Split out...
10229         (comp_template_args): From here.
10230         (determine_specialization): Also allow a template with more
10231         parms than were explicitly specified.
10232         * cp-tree.h: Add template_args_equal.
10233         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
10234
10235 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
10236
10237         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
10238         change.
10239
10240 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
10241
10242         * typeck.c (unsigned_type): Only return TItype nodes when
10243         HOST_BITS_PER_WIDE_INT is >= 64 bits.
10244         (signed_type): Likewise.
10245         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
10246         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
10247         (init_decl_processing): Only create TItype nodes when
10248         HOST_BITS_PER_WIDE_INT is >= 64 bits.
10249         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
10250         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
10251
10252 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10253
10254         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
10255         (gxx.gperf): Update comments describing invocation flags.
10256         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
10257
10258 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
10259
10260         * class.c (finish_struct_1): Add commentary on previous change.
10261
10262         * cp-tree.h (vtbl_ptr_type_node): New variable.
10263         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
10264         already of the right type.
10265         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
10266         Simplify code to grow vtable.
10267         * decl.c (vtbl_ptr_type_node): Define.
10268         (init_decl_processing): Initialize it.
10269
10270 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
10271
10272         * cp-tree.def (PTRMEM_CST): New tree node.
10273         * cp-tree.h (ptrmem_cst): New type.
10274         (lang_type): Remove local_typedecls.
10275         (dummy): Increase to 12 bits from 11.
10276         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
10277         (PTRMEM_CST_CLASS): New macro.
10278         (PTRMEM_CST_MEMBER): Likewise.
10279         (current_access_specifier): New variable.
10280         (current_class_type): Remove duplicate declaration.
10281         (finish_struct): Change prototype.
10282         (unreverse_member_declarations): New function.
10283         (pushdecl_class_level): Change prototype.
10284         (grok_enum_decls): Remove.
10285         (fixup_anonymous_union): New function.
10286         (grok_x_components): Change prototype.
10287         (tsubst_chain): Remove.
10288         (finish_member_template_decl): Likewise.
10289         (check_explicit_specialization): Fix indentation.
10290         (finish_class_definition): Change prototype.
10291         (finish_member_class_template): Likewise.
10292         (finish_member_declaration): New function.
10293         (check_multiple_declarators): Likewise.
10294         * class.c (class_stack_node_t): New type.
10295         (current_class_base): Remove.
10296         (current_class_stack): Change type.
10297         (current_access_specifier): New variable.
10298         (grow_method): Remove.
10299         (check_member_decl_is_same_in_complete_scope): Break out from
10300         finish_struct.
10301         (make_method_vec): New function.
10302         (free_method_vec): Likewise.
10303         (add_implicitly_declared_members): Break out from finish_struct_1.
10304         (free_method_vecs): New variable.
10305         (add_method): Rework for direct use from parser.
10306         (handle_using_decl): Watch for NULL_TREE while iterating through
10307         CLASSTYPE_METHOD_VEC.
10308         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
10309         just do some error-checking.
10310         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
10311         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
10312         (finish_struct): Change prototype.  Simplify; fields and methods
10313         are already set up at this point.
10314         (init_class_processing): Set up current_class_stack.
10315         (pushclass): Save current_access_specifier.
10316         (popclass): Restore it.
10317         (currently_open_class): Simplify.
10318         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
10319         * decl.c (saved_scope): Add access_specifier.
10320         (maybe_push_to_top_level): Save it.
10321         (pop_from_top_level): Restore it.
10322         (maybe_process_template_type_declaration): Use
10323         finish_member_declaration.
10324         (pushtag): Likewise.
10325         (pushdecl_class_level): Don't return a value.
10326         (fixup_anonymous_union): Break out from grok_x_components.
10327         (shadow_tag): Use it.
10328         (xref_tag): Complain about using an elaborated type specifier to
10329         reference a template type parameter or typedef name.
10330         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
10331         (current_local_enum): Remove.
10332         (build_enumerator): Call finish_member_declaration.
10333         (grok_enum_decls): Remove.
10334         * decl2.c (grok_x_components): Simplify.
10335         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
10336         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
10337         (merge_functions): Add to comment.
10338         (arg_assoc_type): Prototype.
10339         (arg_assoc): Pass as many arguments as there are parameters.
10340         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
10341         OFFSET_REF.
10342         * expr.c (cpls_expand_expr): Remove dead code.  Handle
10343         PTRMEM_CST.
10344         * friend.c (do_friend): Lookup friends when in nested classes.
10345         Change comments.
10346         * init.c (build_offset_ref): Do lookup even for classes that are
10347         only partially defined.
10348         (decl_constant_value): Remove dead code.
10349         * method.c (build_overload_value): Remove hack where by TYPE was
10350         not a TYPE.  Handle PTRMEM_CST.
10351         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
10352         should go.
10353         * parse.y (components, notype_components, component_decl,
10354         component_decl_1, component_declarator, component_declarator0):
10355         Now all are itype rather than ttype.  Rework to add members to
10356         classes on the fly.
10357         (typesqpecqual_reserved): Use check_multiple_declarators.
10358         (structsp): Update class to finish_class_definition.
10359         (do_xref_defn): Unsplit into named_class_head.
10360         (access_specifier): Set current_access_specifier.
10361         * pt.c (set_current_access_from_decl): New function.
10362         (finish_member_template_decl): Don't take the parameters.
10363         (comp_template_args): Make more robust.
10364         (lookup_template_class): Don't use current_local_enum.
10365         (for_each_template_parm): Handle PTRMEM_CST.
10366         (instantiate_class_template): Use set_current_access_from_decl,
10367         finish_member_declaration and unreverse_member_declarations.  Set
10368         lineno/input_filename before generating implicit member functions.
10369         (type_unification_real): Don't assume back-unification happens
10370         only for the last argument.
10371         (regenerate_decl_from_template): Call pushclass a bit earlier.
10372         (tsubst_chain): Remove.
10373         (tsubst_enum): Use set_current_access_from_decl.
10374         (set_mangled_name_for_template_decl): Fix indentation.
10375         * search.c (lookup_fnfields_1): Change iteration through
10376         CLASSTYPE_METHOD_VEC.
10377         (dfs_pushdecls): Likewise.
10378         (dfs_compress_decls): Likewise.
10379         (add_conversions): Likewise.
10380         * semantics.c (finish_class_definition): Don't take components.
10381         Change call to finish_struct.
10382         (finish_member_declaration): New function.
10383         (finish_member_class_template): Don't take template parameters.
10384         Change call to grok_x_components.  Call finish_member_template_decl.
10385         (check_multiple_declarators): New function.
10386         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
10387         a passed in fieldlist.
10388         * tree.c (search_tree): Handle PTRMEM_CST.
10389         (mapcar): Likewise.
10390         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
10391         INTEGER_CSTs, for pointer-to-data members.
10392
10393         * call.c (resolve_args): Resolve template specializations, if
10394         possible.
10395
10396 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10397
10398         * Makefile.in (spew.o): Depend on toplev.h.
10399
10400         * call.c (compare_ics): Initialize variables `deref_from_type2',
10401         `deref_to_type1' and `deref_to_type2'.
10402
10403         * except.c (get_eh_type): Hide prototype and definition.
10404         (process_start_catch_block_old): Remove unused static prototype.
10405
10406         * pt.c (tsubst_decl): Initialize variable `argvec'.
10407
10408         * spew.c: Include toplev.h.
10409
10410 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
10411
10412         * pt.c (instantiate_decl): Do save and restore file position.
10413
10414 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10415
10416         * method.c (build_decl_overload_real): Clear
10417         numeric_output_need_bar after __.
10418
10419 1998-10-05  Nathan Sidwell  <nathan@acm.org>
10420
10421         * call.c (build_new_method_call): Issue 'incomplete type' error,
10422         if class is not defined.
10423
10424 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10425
10426         * call.c (build_object_call): Move declaration of variable
10427         `fn' into the scope where it is used.  Don't access variable
10428         `fn' when it is uninitialized, instead use `fns'.
10429
10430 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10431
10432         * errfn.c (cp_thing): Print buf as a string not as a printf format
10433         to avoid problems with the operator%.  Consequently, `%%' sequences
10434         in format are copied as `%' in buf.
10435
10436 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
10437
10438         * pt.c (pop_tinst_level): Call extract_interface_info.
10439         (instantiate_decl): Don't save and restore file position.
10440
10441         * decl.c (cp_finish_decl): Make statics in extern inlines and
10442         templates common, if possible and the target doesn't support weak
10443         symbols.
10444
10445         * decl.c (grokdeclarator): Remove redundant calls to
10446         build_type_variant and some duplicated code.
10447         * sig.c (build_signature_reference_type): Only take the type parm.
10448         (build_signature_pointer_type): Likewise.
10449         * tree.c (build_cplus_method_type): Adjust.
10450         * cp-tree.h: Update.
10451
10452 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
10453
10454         * call.c (build_over_call): Make pedwarns about dropped qualifiers
10455         into full-fledged errors.
10456         * cvt.c (convert_to_reference): Likewise.
10457         * typeck.c (convert_for_assignment): Likewise.
10458
10459         * search.c (expand_upcast_vtables): In addition to unsetting
10460         TREE_READONLY, remove top-level const type qualifier.
10461
10462 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
10463
10464         * class.c (current_class_ptr, current_class_ref): Clarify
10465         documentation.
10466         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
10467         NOP type conversions.
10468         * decl.c (decls_match): Use comptypes directly; ignore
10469         qualifiers on the DECL.
10470         (duplicate_decls): Remove qualifier checks on DECL.
10471         (grokdeclarator): Make the type built up include top-level
10472         qualifiers.
10473         * decl2.c (do_dtors): Fix spelling error.
10474         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
10475         when printing type information.
10476         * init.c (build_new_1): Add documentation.  Deal with the fact
10477         that type of allocated memory now contains qualifiers.
10478         * lex.c (is_global): Improve error-recovery.
10479         * sig.c (build_member_function_pointer): Don't cast away const
10480         on fields of sigtable_entry_type.
10481         * tree.c (lvalue_type): Don't look at top-level qualifiers on
10482         expressions.
10483         * typeck.c (decay_conversion): Likewise.
10484         (build_component_ref): Make sure the type of the COMPONENT_REF
10485         contains top-level qualifiers, as appropriate.  Improve
10486         error-handling.
10487         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
10488         (build_array_ref): Likewise.
10489         (build_unary_op): Improve error-recovery.
10490         (unary_complex_lvalue): Make taking the address a bound member
10491         function an error, not a sorry.
10492         (build_conditional_expr): Look at the type qualifiers, not the
10493         qualifiers on the expression itself.
10494
10495 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
10496
10497         * decl2.c (merge_functions): Remove duplicates.
10498
10499         * decl2.c: Add -f{no-,}implicit-inline-templates.
10500         (import_export_decl): Check it.
10501
10502         * decl.c (lookup_name_real): Template parms also take precedence
10503         over implicit typename.  Only warn if yylex.
10504
10505         * typeck.c (build_conditional_expr): Only fold if ifexp is an
10506         INTEGER_CST.
10507
10508         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
10509         instead of linkage.
10510
10511 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
10512
10513         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
10514         * class.c (build_vbase_pointer): Use it.
10515         * rtti.c (expand_class_desc): Likewise.
10516         * tree.c (build_vbase_pointer_fields): Likewise.
10517
10518 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
10519
10520         * decl.c (start_decl): Add invocation of
10521         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
10522         (start_function): Add invocation of
10523         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
10524
10525         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
10526         HANDLE_GENERIC_PRAGMAS.
10527
10528 1998-09-28  Anthony Green  <green@cygnus.com>
10529
10530         * semantics.c (finish_asm_stmt): Always permit volatile asms.
10531
10532 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
10533
10534         * decl.c (grokdeclarator): Tighten checks for invalid
10535         destructors.  Improve error-messages and error-recovery.
10536         * decl2.c (check_classfn): Don't assume that mangled destructor
10537         names contain type information.
10538
10539 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
10540
10541         * search.c (get_base_distance): Remove assert.
10542
10543         * decl2.c (build_anon_union_vars): Don't process a field with no
10544         name.
10545         (finish_anon_union): Also complain about local anon unions with no
10546         members.
10547
10548 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10549
10550         * decl.c (lookup_namespace_name): If the name is a namespace,
10551         return it immediately.
10552
10553 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10554
10555         * cp-tree.h (define_case_label): Remove unused parameter.
10556         (check_java_method): Likewise.
10557         (grokclassfn): Likewise.
10558         (expand_aggr_init): Likewise.
10559         (build_x_delete): Likewise.
10560         (maybe_end_member_template_processing): Likewise.
10561         (unshare_base_binfos): Add prototype.
10562         (string_conv_p): Likewise.
10563         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
10564
10565         * cvt.c (build_up_reference): Remove unused parameter
10566         `checkconst', all callers changed.
10567         (build_type_conversion): Mark parameter `code' with
10568         ATTRIBUTE_UNUSED.
10569         (build_expr_type_conversion): Initialize variable `conv'.
10570
10571         * decl.c (push_namespace): Initialize variable `d'.
10572         (define_case_label): Remove unused parameter `decl', all callers
10573         changed.
10574
10575         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
10576         `argc' with ATTRIBUTE_UNUSED.
10577         (grokclassfn): Remove unused parameter `cname', all callers
10578         changed.
10579         (check_java_method): Likewise for parameter `ctype'.
10580         (copy_assignment_arg_p): Mark parameter `virtualp' with
10581         ATTRIBUTE_UNUSED.
10582         (finish_prevtable_vardecl): Likewise for parameter `prev'.
10583
10584         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
10585
10586         * init.c (expand_aggr_init_1): Remove unused parameter
10587         `alias_this', all callers changed.
10588         (expand_aggr_init): Likewise.
10589         (expand_default_init): Likewise.
10590         (build_new_1): Initialize variable `susp'.
10591         (build_x_delete): Remove unused parameter `type', all callers
10592         changed.
10593
10594         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
10595         ATTRIBUTE_UNUSED.
10596         (readescape): Use (unsigned) value in shift.
10597         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
10598         comparing to a signed quantity.
10599
10600         * pt.c (maybe_end_member_template_processing): Remove unused
10601         parameter `decl', all callers changed.
10602         (check_explicit_specialization): Add braces around empty body in
10603         an else-statement.
10604         (current_template_args): Initialize variable `args'.
10605         (lookup_template_class): Likewise for variable `prev_local_enum'.
10606         (tsubst_decl): Likewise for variable `r'.
10607         (set_mangled_name_for_template_decl): Initialize variable
10608         `context'.
10609
10610         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
10611         Likewise for variable `i'.
10612         (yylex): Initialize variable `trrr'.
10613
10614         * typeck.c (compparms): Mark variable `strict' with
10615         ATTRIBUTE_UNUSED.
10616
10617         * xref.c (simplify_type): Cast argument of ctype function to
10618         `unsigned char'.
10619
10620 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
10621
10622         * cp-tree.h (language_lvalue_valid): Remove.
10623         * decl.c (grokdeclarator): Don't disallow references to functions.
10624         * tree.c (lvalue_p_1): New function, combining duplicated
10625         code from ...
10626         (lvalue_p): Use it.
10627         (real_lvalue_p): Likewise.
10628         * typeck.c (language_lvalue_valid): Remove.
10629         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
10630         they don't have TREE_READONLY set.
10631         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
10632
10633 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10634
10635         * spew.c (yylex): Give diagnostic.
10636         * hash.h (is_reserved_word): Add export.
10637         * gxx.gperf: Likewise.
10638         * lex.h (rid): Add RID_EXPORT.
10639         * lex.c (init_parse): Likewise.
10640
10641 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
10642
10643         * friend.c (do_friend): Make warning a full sentence.
10644
10645 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
10646
10647         * parse.y (component_decl_list): Improve error-recovery.
10648
10649 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10650
10651         * decl.c (make_typename_type): Move error to point where name
10652         variable can be used by dump_type.
10653
10654 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
10655
10656         * decl.c (grokfndecl): Improve error-recovery.
10657         * decl2.c (grokfield): Likewise.
10658         * pt.c (finish_member_template_decl): Likewise.
10659
10660 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10661
10662         * method.c (hack_identifier): Finding multiple members is always
10663         an error.
10664
10665 1998-09-21  Per Bothner  <bothner@cygnus.com>
10666
10667         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
10668
10669 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
10670
10671         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
10672
10673 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
10674
10675         * class.c (maybe_warn_about_overly_private_class): Reformat.
10676
10677 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
10678
10679         * exception.cc (__cplus_type_matcher): Realign some code.
10680
10681 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
10682
10683         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
10684         (tinfo2.o): Likewise.
10685         (exception.o): Likewise.
10686         (new.o): Likewise.
10687         (opnew.o): Likewise.
10688         (opnewnt.o): Likewise.
10689         (opvnew.o): Likewise.
10690         (opvnewnt.o): Likewise.
10691         (opdel.o): Likewise.
10692         (opdelnt.o): Likewise.
10693         (opvdel.o): Likewise.
10694         (opvdelnt.o): Likewise.
10695
10696 1998-09-16  Richard Henderson  <rth@cygnus.com>
10697
10698         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
10699
10700 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
10701
10702         * call.c (build_field_call): Handle static data members too.
10703
10704         * typeck.c (comptypes): When comparing pointer types, check
10705         whether referred types match even in strictest modes.
10706
10707 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
10708
10709         * cp-tree.h: Revert previous change.
10710         (finish_struct_methods): Remove declaration.
10711         * class.c: Revert previous change.
10712         (maybe_warn_about_overly_private_class): New function.
10713         (finish_struct_methods): Declare here, and make static.  Remove
10714         unnecessary parameters.  Tidy slightly.  Use
10715         maybe_warn_about_overly_private_class.
10716         (finish_struct_1): Adjust.  Remove check for private constructors,
10717         now done elsewhere.
10718         (finish_struct): Adjust.
10719
10720 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
10721
10722         * except.c (expand_start_catch_block): No need to check for new
10723         exception model.
10724         (process_start_catch_block_old): Deleted.
10725         (process_start_catch_block): Add call to start_decl_1().
10726         (expand_end_catch_block): Add call to end_catch_handler().
10727         * exception.cc (__cplus_type_matcher): Only check the exception
10728         language if there is an exception table.
10729
10730 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
10731
10732         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
10733         as used to prevent conflicts with virtual function tables.
10734
10735 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
10736
10737         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
10738         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
10739         * class.c (maybe_class_too_private_p): New function.
10740         (finish_struct_methods): Use it.
10741         (finish_struct_1): Likewise.
10742         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
10743         appropriate.
10744
10745         * pt.c (check_specialization_scope): Fix spelling error.
10746         (check_explicit_specialization): Remove code to handle explicit
10747         specializations in class scope; they are now correctly diagnosed
10748         as errors.
10749
10750 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
10751
10752         * decl.c (pushdecl): Don't copy types if the
10753         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
10754         type.
10755
10756 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
10757
10758         * class.c (get_enclosing_class): New function.
10759         (is_base_of_enclosing_class): Likewise.
10760         * cp-tree.h (get_enclosing_class): Declare.
10761         (is_base_of_enclosing_class): Likewise.
10762         * pt.c (coerce_template_parms): Use them.
10763
10764 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
10765
10766         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
10767         null to decide whether to use it.
10768
10769         * error.c (dump_type_real): Handle NAMESPACE_DECL.
10770         * parse.y (base_class.1): Avoid crash on error.
10771
10772 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10773
10774         * decl.c (make_typename_type): If context is a namespace, the code
10775         is in error.
10776
10777 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
10778
10779         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
10780
10781 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
10782
10783         * cp-tree.h (anonymous_namespace_name): Declare.
10784         * decl.c: Define it.
10785         (push_namespace): Use anonymous_namespace_name, rather than local
10786         static anon_name.
10787         * error.c (dump_decl): If a namespace is named
10788         anonymous_namespace_name, call it {anonymous}.
10789
10790         * decl.c (grokparms): Distinguish between references and pointers
10791         in error message.
10792
10793 1998-09-08  Richard Henderson  <rth@cygnus.com>
10794             Mark Mitchell  <mark@markmitchell.com>
10795
10796         * pt.c (process_partial_specialization): Consistently allocate
10797         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
10798         tpd.parms, where appropriate.
10799
10800 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
10801
10802         * Makefile.in (INCLUDES): Update after recent toplevel gcc
10803         reorganizations.
10804
10805 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
10806
10807         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
10808         * class.c (finish_struct): Remove hackery to deal with explicit
10809         specializations in class scope.
10810         * decl.c (grokfndecl): Improve error-recovery.
10811         * decl2.c (grokfield): Likewise.
10812         * pt.c (check_specialization_scope): New function.
10813         (begin_specialization): Call it.
10814         (process_partial_specialization): New function, split out from
10815         push_template_decl.  Check partial specializations more
10816         stringently.
10817         (push_template_decl): Call it.
10818         (check_explicit_specialization): Don't attempt to handle explicit
10819         specializations in class scope.
10820         (template_parm_data): Document.  Add current_arg and
10821         arg_uses_template_parms.
10822         (mark_template_parm): Set it.
10823         (tsubst_arg_types): Remove unused variable.
10824         * semantics.c (begin_class_definition): Tweak.
10825
10826 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
10827
10828         * inc/typeinfo (type_info::type_info(const char*)): Make
10829         `explicit'.
10830
10831         * cp-tree.h (hash_tree_cons_simple): New macro.
10832         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
10833         (coerce_template_parms): Use make_temp_vec, instead of
10834         make_tree_vec.  Document this behavior.
10835         (lookup_template_class): Likewise.
10836         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
10837         Remove dead code (and add assertion to check its deadness).  Fix
10838         bug w.r.t. exception specifications.
10839
10840 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
10841
10842         * decl2.c (import_export_vtable): Always make artificials comdat.
10843         (import_export_decl): Likewise.
10844         * pt.c (mark_decl_instantiated): Likewise.
10845
10846 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
10847
10848         * cp-tree.h (finish_globally_qualified_member_call_expr):
10849         Rename to ...
10850         (finish_qualified_call_expr).
10851         * semantics.c: Likewise.
10852         * parse.y (primary): Use it.
10853         * method.c (hack_identifier): Remove redundant code.
10854
10855         * init.c (resolve_offset_ref): Call convert_from_reference to
10856         handle members of reference type.  Improve error recovery.
10857
10858 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
10859
10860         * cp-tree.h: Declare warn_nontemplate_friend.
10861         * decl2.c (lang_decode_option): Set.
10862         * lang-options.h: Add -Wnon-template-friend.
10863         * friend.c (do_friend): Use to toggle non-template function warning.
10864
10865 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
10866
10867         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
10868         corresponding INTEGER_CSTs when processing_template_decl.
10869         * pt.c (tsubst_enum): Tweak accordingly.
10870
10871 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10872
10873         * decl.c (pushdecl_class_level): Add warning here.
10874         (pushdecl): Tweak.
10875
10876 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
10877
10878         * cvt.c (convert_pointer_to_real): Tidy.
10879         * search.c (get_base_distance_recursive): Simplify.
10880         (get_base_distance): Likewise.
10881
10882         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
10883         parms.
10884
10885 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
10886
10887         * lex.c (check_newline):  Call HANDLE_PRAGMA before
10888         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
10889         if unknown pragmas are encountered.
10890         (handle_sysv_pragma): Interpret return code from
10891         handle_pragma_token ().  Return success/failure indication rather
10892         than next unprocessed character.
10893         (pragma_getc): New function: retrieves characters from the
10894         input stream.  Defined when HANDLE_PRAGMA is defined.
10895         (pragma_ungetc): New function: replaces characters back into the
10896         input stream.  Defined when HANDLE_PRAGMA is defined.
10897
10898 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
10899
10900         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
10901         * class.c (build_vtable_entry_ref): Likewise.
10902
10903 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
10904
10905         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
10906         * decl2.c (import_export_decl): Likewise.
10907         * pt.c (instantiate_decl): Use it.
10908
10909 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
10910
10911         * decl.c (lookup_name_real): Also do implicit typename thing for
10912         artificial TYPE_DECLs.
10913         * search.c (lookup_field): Likewise.
10914         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
10915         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
10916         (enter_scope_of): Extract type from implicit typename.
10917         (begin_class_definition): Likewise.
10918         * lex.c (identifier_type): Handle implicit typename when checking
10919         for SELFNAME.
10920
10921         * cp-tree.h: Declare flag_strict_prototype.
10922         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
10923         -fstrict-prototype.
10924         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
10925         specified, set it to the value of pedantic.
10926
10927 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
10928
10929         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
10930
10931 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
10932
10933         * decl.c (finish_enum): Handle member enums of classes declared in
10934         template functions.
10935
10936         * decl2.c (grok_x_components): Strip attributes before calling
10937         groktypename.
10938
10939 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
10940
10941         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
10942         -fenum-int-equivalence and -fno-nonnull-objects.
10943         * class.c (check_for_override): Remove support for -fall-virtual.
10944         (finish_struct_1): Likewise.
10945         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
10946         * typeck.c (build_binary_op_nodefault): Likewise.
10947         * cvt.c (ocp_convert): Likewise.
10948         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
10949         * class.c (build_vbase_path): Likewise.
10950
10951 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
10952
10953         * Makefile.in (INTERFACE): New, set to 1.
10954
10955 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
10956
10957         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
10958         comparing with global_namespace.
10959         (dump_aggr_type): Likewise.
10960
10961         * decl.c (grokfndecl): Issue error on declaration of friend
10962         templates with explicit template arguments.
10963
10964         * pt.c (convert_template_argument): New function, split out
10965         from...
10966         (coerce_template_parms): Here.
10967         (tsubst): Attempt better error-recovery.
10968
10969 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10970
10971         * pt.c (decl_template_parm_p): Add checks for
10972         TEMPLATE_TEMPLATE_PARM.
10973
10974 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
10975
10976         * lex.c (do_identifier): Fix thinko in previous change.
10977
10978 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
10979
10980         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
10981         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
10982
10983 1998-08-28  Richard Henderson  <rth@cygnus.com>
10984
10985         Add support for discarding unused virtual functions.
10986         * lang-options.h: Add -fvtable-gc.
10987         * cp-tree.h: Add flag_vtable_gc.
10988         * decl2.c (output_vtable_inherit): New fn.
10989         (finish_vtable_vardecl): Call it.
10990         * class.c (build_vtable_entry_ref): New fn.
10991         (build_vtbl_ref): Call it.
10992
10993 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
10994
10995         * cp-tree.h (build_enumerator): Take the enumeration type as a
10996         parameter.
10997         * decl.c (finish_enum): Don't set the TREE_TYPE for the
10998         enumeration constant values if we're processing_template_decls.
10999         Don't set the type for the CONST_DECLs either; that's done in
11000         build_enumerator.
11001         (build_enumerator): Take the enumeration type as a
11002         parameter.
11003         * lex.c (do_identifier): Don't resolve enumeration constants while
11004         processing template declarations, even if they happen to be
11005         TEMPLATE_PARM_INDEXs.
11006
11007         * parse.y (current_enum_type): New variable.
11008         (primary): Don't allow statement-expression in local classes just
11009         as we don't in global classes.
11010         (structsp): Use current_enum_type.
11011         (enum_list): Likewise.
11012         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
11013         finish_enum; they no longer occur.
11014
11015         * cp-tree.h (finish_base_specifier): New function.
11016         * parse.y (base_class): Use it.
11017         * semantics.c (finish_base_specifier): Define it.
11018
11019         * parse.y (structsp): Warn on use of typename outside of template
11020         declarations.
11021
11022 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
11023
11024         * lex.c (handle_cp_pragma): Remove #pragma vtable.
11025         * lang-options.h: Remove +e options.
11026         * decl2.c (lang_decode_option): Likewise.
11027         (import_export_vtable): Don't check write_virtuals.
11028         (finish_vtable_vardecl, finish_file): Likewise.
11029         * search.c (dfs_debug_mark): Likewise.
11030         * semantics.c (begin_class_definition): Likewise.
11031         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
11032
11033         * call.c (build_over_call): Check flag_elide_constructors.
11034         * decl2.c: flag_elide_constructors defaults to 1.
11035         * typeck.c (convert_arguments): Remove return_loc parm.
11036         (build_function_call_real): Adjust.
11037
11038         * search.c: Tear out all mi_matrix and memoize code.
11039         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
11040         * lang-options.h: Remove documentation for -fhandle-exceptions,
11041         -fmemoize-lookups and -fsave-memoized.
11042         * cp-tree.h: Lose mi_matrix and memoize support.
11043         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
11044         * class.c: Lose struct class_level.
11045         (pushclass, popclass): Lose memoize support.
11046         * init.c (build_offset_ref): Likewise.
11047
11048         Never change BINFO_INHERITANCE_CHAIN.
11049         * init.c (emit_base_init): Change modification of
11050         BINFO_INHERITANCE_CHAIN to an assert.
11051         * search.c (get_base_distance_recursive): Likewise.
11052         (get_base_distance): Likewise.
11053         (lookup_member): Likewise.
11054         (convert_pointer_to_single_level): Likewise.
11055         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
11056         (lookup_fnfields): Likewise.
11057         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
11058         (unshare_base_binfos): Don't call propagate_binfo_offsets.
11059         (layout_basetypes): Call propagate_binfo_offsets instead of
11060         unshare_base_binfos.
11061         * decl.c (xref_basetypes): Call unshare_base_binfos.
11062         * pt.c (instantiate_class_template): Likewise.
11063         * tree.c (reverse_path): Remove 'copy' parm; always make a
11064         temporary copy.
11065         * class.c (build_vbase_path): Just call it.
11066         * search.c (compute_access): Likewise.  Don't re-reverse.
11067
11068 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
11069
11070         * class.c (build_vbase_path): Use reverse_path.
11071         (finish_base_struct): Move warnings for inaccessible bases to
11072         layout_basetypes.
11073         (modify_one_vtable): Remove check of TREE_USED (binfo).
11074         (fixup_vtable_deltas1): Likewise.
11075         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
11076         (xref_tag): Remove binfos parameter.
11077         (make_binfo): Remove chain parameter.
11078         (reverse_path): Add copy parameter.
11079         * decl.c (init_decl_processing): Change calls to xref_tag.
11080         (xref_tag): Remove binfos parameter.
11081         (xref_basetypes): Change calls to make_binfo.
11082         * decl2.c (grok_x_components): Change calls to xref_tag.
11083         (handle_class_head): Likewise.
11084         * friend.c (do_friend): Likewise.
11085         * lex.c (make_lang_type): Change calls to make_binfo.
11086         * parse.y (structsp): Change calls to xref_tag.
11087         (named_complex_class_head_sans_basetype): Likewise.
11088         (named_class_head): Likewise.
11089         * rtti.c (init_rtti_processing): Likewise.
11090         * search.c (compute_access): Change calls to reverse_path.
11091         (dfs_get_vbase_types): Change calls to make_binfo.
11092         (get_vbase_types): Remove dead code.
11093         * tree.c (unshare_base_binfos): Change calls to make_binfo.
11094         (layout_basetypes): Warn here about inaccessible bases.
11095         (make_binfo): Remove chain parameter.
11096         (reverse_path): Add copy parameter.
11097
11098 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
11099
11100         * class.c: #if 0 complete_type_p.
11101         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
11102         * method.c (process_overload_item): Likewise.
11103         * typeck.c (comp_target_types): Likewise.
11104
11105         Stop sharing binfos for indirect virtual bases.
11106         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
11107         (layout_basetypes): Likewise.
11108         (unshare_base_binfos): Copy vbases, too.
11109         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
11110         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
11111         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
11112         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
11113         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
11114         reference to BINFO_VIA_PUBLIC.
11115         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
11116         (push_class_decls): Use them.
11117         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
11118         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
11119
11120 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
11121
11122         * decl.c (build_enumerator): Set DECL_CONTEXT for the
11123         CONST_DECLs.
11124
11125 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
11126
11127         * cp-tree.h (finish_enum): Change prototype.
11128         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
11129         VALUES parameter.  Don't try to compute mins/maxs if
11130         processing_template_decl.
11131         * parse.y (structsp): Use new calling sequence for finish_enum.
11132         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
11133         (lookup_template_class): Remove unused variables.  Tweak.
11134         Register enums on instantiation list before substituting
11135         enumeration constants.
11136         (tsubst_decl): Remove unused variables.
11137         (regenerate_decl_from_template): Likewise.
11138
11139         * decl.c (duplicate_decls): Don't obliterate the
11140         DECL_TEMPLATE_INFO for a template if we're not replacing it with
11141         anything.
11142
11143         * lex.c (do_identifier): Fix typo in comment.
11144
11145 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11146
11147         * errfn.c: Remove stdarg.h/varargs.h.
11148         * tree.c: Likewise.
11149
11150 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
11151
11152         * pt.c (tsubst_copy): Only do typename overloading on an
11153         IDENTIFIER_NODE that happens to look like a typename if it actually
11154         has a type for us to use.
11155
11156 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
11157
11158         * typeck.c (comp_cv_target_types): Split out...
11159         (comp_target_types): From here.  Don't allow cv-qual changes under
11160         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
11161         (build_ptrmemfunc): Pass 1 to nptrs.
11162         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
11163
11164 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
11165
11166         * search.c (dependent_base_p): Don't compare a binfo to
11167         current_class_type; use the TREE_TYPE of the binfo instead.
11168
11169         * cp-tree.h (CLASS_TYPE_P): Revise definition.
11170
11171 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
11172
11173         * decl.c (duplicate_decls): Don't complain about different
11174         exceptions from an internal decl even if pedantic.
11175
11176         * typeck.c (convert_for_assignment): Converting from pm of vbase
11177         to derived is an error, not a sorry.
11178
11179         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
11180         * class.c (fixed_type_or_null): Rename from
11181         resolves_to_fixed_type_p.  Return the dynamic type of the
11182         expression, if fixed, or null.
11183         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
11184         does not match the static type.
11185         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
11186         resolves_to_fixed_type_p again.
11187
11188 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
11189
11190         * pt.c (tsubst_decl): Move special case code for dealing with
11191         tricky friend templates here from ...
11192         (regenerate_decl_from_template): Here.
11193
11194 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
11195
11196         * decl.c (start_decl): Remove redundant linkage check.
11197
11198 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
11199
11200         * typeck.c (c_expand_return): Handle the case that valtype
11201         is wider than the functions return type.
11202
11203 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
11204
11205         * cp-tree.h (CLASS_TYPE_P): New macro.
11206         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
11207         * pt.c (process_template_parm): Undo previous change.
11208
11209 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
11210
11211         * cp-tree.h: Declare.
11212         * pt.c (decl_template_parm_p): New function.
11213         * decl.c (pushdecl): Check decls for redeclaring template parms.
11214         (xref_tag): Make redeclaration an error, print decl.
11215         * decl2.c (grokfield): Check field_decls for redeclaration as well.
11216
11217 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
11218
11219         * parse.y (primary): Fix up the type of string constants.
11220
11221 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
11222
11223         * typeck.c (convert_for_initialization): Move check for odd uses
11224         of NULL to avoid duplicate warnings.
11225
11226 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
11227
11228         * tree.c (lvalue_type): Fix for arrays.
11229         * typeck.c (string_conv_p): New fn.
11230         (convert_for_assignment): Use it.
11231         (build_unary_op): Use lvalue_type.
11232         * call.c (standard_conversion, convert_like): Use string_conv_p.
11233         (add_function_candidate): Use lvalue_type.
11234         * cvt.c (convert_to_reference): Likewise.
11235         * decl2.c (lang_decode_option): Ignore -traditional.
11236         * decl.c (init_decl_processing): flag_writable_strings inhibits
11237         flag_const_strings.
11238
11239 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
11240
11241         * lang-options.h (lang_options): Add fconst-strings to the list
11242         of valid options.
11243         * decl2.c (lang_f_options, lang_decode_option): Likewise.
11244
11245 1998-08-24  Nathan Sidwell  <nathan@acm.org>
11246
11247         * lex.c (real_yylex): Don't warn about long long constants if
11248         we're allowing long long.
11249
11250 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11251
11252         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
11253         accessing bindings directly.
11254
11255         * search.c (my_tree_cons): Reimplement.
11256
11257         * lang-specs.h: Remove __HONOR_STD.
11258         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
11259
11260 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
11261
11262         * decl.c (grokdeclarator): Complain about in-class initialization
11263         of aggregates and/or references.
11264         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
11265         TEMPLATE_TYPE_PARMs.
11266
11267         * decl2.c (grok_array_decl): Add comment.
11268         (mark_used): Don't instantiate an explicit instantiation.
11269         * friend.c (make_friend_class): Remove bogus comment.  Fix check
11270         for partial specializations.
11271         * pt.c (check_explicit_specialization): Don't
11272         SET_DECL_EXPLICIT_INSTANTIATION here.
11273         (mark_decl_instantiated): Or here.
11274         (do_decl_instantiation): Do it here, instead.  Add checks for
11275         duplicate explicit instantiations, etc.  Tidy.
11276         (do_type_instantiation): Likewise.
11277         (instantiate_decl): Improve comments.  Complain about explicit
11278         instantiations where no definition is available.
11279
11280         * cp-tree.h (ansi_null_node): Remove.
11281         * call.c (build_over_call): Warn about converting NULL to an
11282         arithmetic type.
11283         * cvt.c (build_expr_type_conversion): Likewise.  Use
11284         null_ptr_cst_p instead of expanding it inline.
11285         * decl.c (ansi_null_node): Remove.
11286         (init_decl_processing): Make null_node always have integral type.
11287         * except.c (build_throw): Warn about converting NULL to an
11288         arithmetic type.
11289         * lex.c (init_parse): Remove handling of ansi_null_node.
11290         * pt.c (type_unification_real): Don't convert NULL to void* type.
11291         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
11292         (convert_for_assignment): Warn about converting NULL to an
11293         arithmetic type.
11294         (convert_for_initialization): Likewise.
11295
11296 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
11297
11298         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
11299         * pt.c (coerce_template_parms): Use no_linkage_check.
11300         * decl.c (grokvardecl): Likewise.
11301         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
11302
11303         * method.c (process_overload_item): Remove useless code.
11304
11305 1998-08-20  Per Bothner  <bothner@cygnus.com>
11306
11307         Handle new'ing of Java classes.
11308         * init.c (build_class_classref):  New function.
11309         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
11310         constructor does not return this;  don't need to exception-protect.
11311
11312         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
11313         * decl2.c (acceptable_java_type):  Handle template-derived types.
11314
11315 1998-08-20  Per Bothner  <bothner@cygnus.com>
11316
11317         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
11318
11319 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
11320
11321         * decl.c (duplicate_decls): Always merge the old and new patterns
11322         for templates, regardless of whether or not the new one has
11323         DECL_INITIAL.  Don't throw away specializations.  Merge
11324         DECL_SAVED_TREE.
11325         * pt.c (tsubst_decl): Use the right pattern when calculating the
11326         complete args for a new template instance.
11327         (do_decl_instantiation): Fix typo in comment.
11328         (regenerate_decl_from_template): Deal with tricky friend template
11329         case.
11330         (instantiate_decl): Likewise.
11331
11332 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
11333
11334         * init.c (build_builtin_delete_call): Add missing assemble_external
11335         call.
11336
11337 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
11338
11339         * parse.y (notype_unqualified_id): Also accept ~A<int>.
11340
11341 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
11342
11343         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
11344         arithmetic.
11345         * except.c (build_throw): Warn when NULL is thrown, even with
11346         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
11347         thrown expression.
11348
11349         * cp-tree.h (ansi_null_node): New variable.
11350         * decl.c (ansi_null_node): New variable.
11351         (init_decl_processing): Initialize its type.
11352         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
11353         for null_node in non-ANSI mode.
11354         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
11355         place of null_node to avoid spurious errors.
11356
11357 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
11358
11359         * cp-tree.h (enter_scope_of): New function.
11360         * parse.y (complex_direct_notype_declarator): Use it.
11361         * semantics.c (enter_scope_of): New function.
11362
11363 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
11364
11365         * decl.c (grokparms): No, here.
11366
11367         * decl.c (grokdeclarator): Catch parm with pointer to array of
11368         unknown bound here...
11369         * method.c (process_overload_item): ...not here.
11370
11371         * gxxint.texi: Remove obsolete documentation of overloading code.
11372
11373         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
11374         * class.c (finish_struct_bits): Likewise.
11375
11376         * tree.c (lvalue_type): Fix for arrays.
11377         * typeck.c (build_unary_op): Use lvalue_type.
11378         * call.c (add_function_candidate): Likewise.
11379         * cvt.c (convert_to_reference): Likewise.
11380
11381         * decl2.c (lang_decode_option): Ignore -traditional.
11382
11383         * init.c (build_offset_ref): Don't mess with error_mark_node.
11384         * lex.c (do_scoped_id): Use cp_error.
11385
11386         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
11387
11388 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11389
11390         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
11391
11392 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
11393
11394         * cp-tree.h (set_identifier_local_value): Provide prototype.
11395
11396         * decl2.c (do_namespace_alias): Remove unused variables `binding'
11397         and `old'.
11398
11399 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
11400
11401         * Makefile.in: Rename BBISON to BISON so that it can be properly
11402         inherited from the parent makefile.
11403
11404 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
11405
11406         * lang-options.h: Add -finit-priority.
11407         * decl2.c: Likewise.  Check flag_init_priority instead of
11408         USE_INIT_PRIORITY.
11409
11410         * decl2.c (setup_initp): New fn.
11411         (start_objects, finish_objects, do_ctors): Handle init_priority.
11412         (do_dtors, finish_file): Likewise.
11413
11414 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
11415
11416         * pt.c (tsubst_copy): Hush warning.
11417
11418         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
11419
11420 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
11421
11422         * pt.c (print_template_context): Don't abort when instantiating a
11423         synthesized method.
11424
11425         * decl.c (grokdeclarator): Issue errors on namespace qualified
11426         declarators in parameter lists or in class scope.
11427
11428 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
11429
11430         * pt.c (check_explicit_specialization): Don't abort on bogus
11431         explicit instantiations.
11432
11433 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
11434
11435         * typeck.c (require_complete_type): Use complete_type_or_else.
11436         (complete_type_or_else): Always return NULL_TREE on failure, as
11437         documented.
11438
11439         * pt.c (tsubst_aggr_type): Prototype.
11440         (tsubst_decl): New function, split out from tsubst.  Set
11441         input_filename and lineno as appropriate.
11442         (pop_tinst_level): Restore the file and line number saved in
11443         push_tinst_level.
11444         (instantiate_class_template): Set input_filename and lineno as
11445         appropriate.
11446         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
11447         context for a TYPENAME_TYPE is complete.
11448
11449         * decl2.c (grokbitfield): Issue errors on bitfields declared with
11450         function type.
11451         (do_dtors): As in do_ctors, pretend to be a member of the same
11452         class as a static data member while generating a call to its
11453         destructor.
11454
11455         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
11456         conversions, even in complex virtual base class hierarchies.
11457
11458 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
11459
11460         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
11461         (TYPE_TEMPLATE_INFO): Likewise.
11462         (SET_TYPE_TEMPLATE_INFO): Likewise.
11463         (ENUM_TI_TEMPLATE): Likewise.
11464         (ENUM_TI_ARGS): Likewise.
11465         (lookup_nested_type_by_name): Remove.
11466         * decl.c (maybe_process_template_type_declaration): Handle enums.
11467         (start_enum): Don't check for primary-template enum declarations
11468         here.
11469         (finish_enum): Clean up, document.  Make sure template enum
11470         constants get the correct type.
11471         (build_enumerator): Copy initializers for template enumerations,
11472         too.
11473         (grok_enum_decls): Document.
11474         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
11475         better.  Build LOOKUP_EXPRs for local variables, even if they are
11476         TREE_PERMANENT.
11477         * pt.c (tsubst_enum): Remove field_chain parameter.
11478         (template_class_depth): Include the depth of surrounding function
11479         contexts.
11480         (push_template_decl): Check for primary-template enum declarations
11481         here.  Deal with enumeration templates.
11482         (lookup_template_class): Likewise.
11483         (for_each_template_parm): Likewise.
11484         (instantiate_class_template): Don't call tsubst_enum directly,
11485         call tsubst instead, to instantiate enums.  Deal with all
11486         field_chain issues here, not in tsubst_enum.
11487         (lookup_nested_type_by_name): Remove.
11488         (tsubst_aggr_type): Revise handling of enumeration types.
11489         (tsubst): Likewise.
11490         (tsubst_copy): Likewise.
11491         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
11492
11493 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
11494
11495         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
11496         uses template parameters.
11497         * method.c (build_template_parm_names): Use the full set of
11498         template arguments for tsubst'ing.
11499         (build_overload_identifier): Pass the full set of template
11500         arguments to build_template_parm_names, not just the
11501         innermost_args.
11502         * pt.c (TMPL_ARGS_DEPTH): Define using
11503         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
11504         (NUM_TMPL_ARGS): New macro.
11505         (add_outermost_template_args): Deal with the case where the outer
11506         args will be completely discarded.
11507         (coerce_template_parms): Use the full set of template arguments
11508         for tsubst'ing.  Simplify.  Add some asserts.  Improve
11509         error messages.
11510         (lookup_template_class): Pass the full set of template arguments
11511         to coerce_template_parms.
11512         (tsubst): Add assertion.
11513         (do_type_instantiation): Don't instantiate member template
11514         classes.
11515
11516         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
11517         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
11518
11519 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
11520
11521         * method.c (set_mangled_name_for_decl): Change return type to void.
11522
11523         * decl.c (lookup_name_real): A namespace-level decl takes priority
11524         over implicit typename.  Avoid doing the same lookup twice.
11525
11526         * search.c (dependent_base_p): New fn.
11527         (dfs_pushdecls, dfs_compress_decls): Use it.
11528
11529         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
11530         virtual functions if the type doesn't have any.
11531
11532 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
11533
11534         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
11535         uses template parameters.
11536
11537 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
11538
11539         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
11540         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
11541         * lex.c (do_identifier): Don't use a second argument, or a type,
11542         when building LOOKUP_EXPRs.
11543         (do_identifier): Likewise.
11544         (do_scoped_id): Likewise.
11545         * method.c (hack_identifier): Improve error message.
11546         * pt.c (lookup_template_function): Don't needlessly call
11547         copy_to_permanent or build_min.
11548         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
11549         necessary.
11550         (do_decl_instantiation): Improve error message.
11551         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
11552         (build_min): Copy the type to the permanent obstack, too.
11553
11554 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
11555
11556         * init.c (init_init_processing): Remove BI* handling.
11557         (build_builtin_call): Remove.
11558         (build_builtin_delete_call): New fn.
11559         (build_delete): Use it.
11560
11561 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
11562
11563         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
11564         (maybe_check_template_type): New function.
11565         * decl.c (maybe_process_template_type_declaration): New function,
11566         split out from pushtag  Call maybe_check_template_type.
11567         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
11568         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
11569         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
11570         * pt.c (template_class_depth_real): Generalization of ...
11571         (template_class_depth): Use it.
11572         (register_specialization): Use duplicate_decls for duplicate
11573         declarations of specializations.
11574         (maybe_check_template_type): New function.
11575         (push_template_decl_real): Fix comment.
11576         (convert_nontype_argument): Likewise.
11577         (lookup_template_class): Likewise.  Avoid an infinite loop on
11578         erroneous code.
11579         (tsubst_friend_function): Fix comment.
11580         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
11581         an IDENTIFIER_NODE.
11582         * semantics.c (begin_function_definition): Use
11583         reset_specialization to note that template headers don't apply
11584         directly to declarations after the opening curly for a function.
11585
11586 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
11587
11588         * decl.c (push_overloaded_decl): Use current_namespace instead of
11589         DECL_CONTEXT (decl) to determine where we go.
11590
11591         * decl.c (lookup_name_real): Fix typo.
11592
11593 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
11594
11595         * friend.c (is_friend): Be lenient with member functions to deal
11596         with nested friends.
11597
11598 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
11599
11600         * class.c (finish_struct_1): Convert integer_zero_node to
11601         ssizetype before passing it to set_rtti_entry.
11602         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
11603         of any size to a pointer.
11604
11605 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
11606
11607         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
11608         (build_template_decl_overload): Remove.
11609         (set_mangled_name_for_decl): New function.
11610         (innermost_args): Remove is_spec parameter.
11611         (most_specialized, most_specialized_class): Remove declarations.
11612         (lookup_template_class): Add entering_scope parameter.
11613         (maybe_process_partial_specialization): New function.
11614         (finish_template_decl): Likewise.
11615         (finish_template_type): Likewise.
11616         * class.c (finish_struct): Clean up processing of member template
11617         specializations.
11618         * decl.c (pushtag): Fix formatting.
11619         (lookup_tag): Improve handling of pseudo-global levels.
11620         (make_typename_type): Adjust call to lookup_template_class.
11621         (shadow_tag): Use maybe_process_partial_specialization.
11622         (xref_tag): Improve handling of member friends.
11623         (start_function): Call push_nested_class before
11624         push_template_decl.  Don't call push_template_decl for
11625         specializations.
11626         * decl2.c (grok_x_components): Don't call xref_tag for
11627         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
11628         (grokclassfn): Use set_mangled_name_for_decl.
11629         (arg_assoc_class): Adjust call to innermost_args.
11630         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
11631         * error.c (dump_function_name): Improve printing of template
11632         function names.
11633         * friend.c (is_friend): Don't compare types of decls to determine
11634         friendship, unless flag_guiding_decls.
11635         (make_friend_class): Partial specializations cannot be friends.
11636         (do_friend): Use set_mangled_name_for_decl.  Call
11637         push_template_decl_real instead of push_template_decl.
11638         * method.c (build_decl_overload_real): Remove prototype.  Give it
11639         external linkage.
11640         (build_overload_identififer): Adjust call to innermost_args.
11641         (build_template_decl_overload): Remove.
11642         (set_mangled_name_for_decl): New function.
11643         * parse.y (.finish_template_type): New non-terminal.
11644         (template_def): Use finish_template_decl.  Use template_extdef
11645         instead of extdef.
11646         (template_extdef, template_datadef): New non-terminals, containing
11647         only those rules for things which can be templates.
11648         (datadef): Tidy.
11649         (template_type, self_template_type): Use .finish_template_type.
11650         (named_class_head): Use maybe_process_partial_specialization.
11651         * pt.c (mangle_class_name_for_template): Remove context parameter.
11652         (get_class_bindings): Remove outer_args parameter.
11653         (complete_template_args): Remove.
11654         (add_outermost_template_args): New function.
11655         (register_specialization): Return the specialization.
11656         (unregister_specialization): New function.
11657         (tsubst_template_parms): Likewise.
11658         (most_specialized, most_specialized_class): Prototype here as
11659         static.
11660         (original_template): Rename to most_general_template.
11661         (tsubst_template_parms): New function.
11662         (set_mangled_name_for_template_decl): Likewise.
11663         (TMPL_ARGS_DEPTH): New macro.
11664         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
11665         (TMPL_ARGS_LEVEL): New macro.
11666         (SET_TMPL_ARGS_LEVEL): Likewise.
11667         (TMPL_ARG): Likewise.
11668         (SET_TMPL_ARG): Likewise.
11669         (TMPL_ARGS_DEPTH): Likewise.
11670         (finish_member_template_decl): Use finish_template_decl.
11671         (maybe_process_partial_specialization): New function, split out
11672         from tsubst.
11673         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
11674         (maybe_begin_member_template_processing): Use new macros.
11675         (is_member_template): Likewise.
11676         (is_member_template_class): Likewise.
11677         (add_to_template_args): Likewise.  Deal with multiple levels of
11678         args.
11679         (maybe_process_partial_specialization): New function.
11680         (retrieve_specialization): Add consistency check.
11681         (determine_specialization): Return full argument list.
11682         (check_explicit_specialization): Tweak friend handling.  Use full
11683         argument lists.  Simplify.
11684         (current_template_args): Use new macros.
11685         (push_template_decl_real): Change ill-named mainargs to specargs.
11686         Check that a partial specialization actually specializes at least
11687         one parameter.   Improve friend handling.  Modify for full
11688         template arguments.
11689         (classtype_mangled_name): Don't mangle the names of
11690         specializations.
11691         (lookup_template_class): Add entering_scope parameter.  Use it to
11692         avoid finding a template type when an instantiation is required.
11693         Simplify.  Use full template arguments.
11694         (tsubst_friend_function): Use unregister_specialization.  Use new
11695         macros.  Use full template arguments.
11696         (tsubst_friend_class): Substitute, using tsubst_template_parms,
11697         into the template parameters before passing them to
11698         redeclare_class_template.
11699         (instantiate_class_template): Simplify.  Use full template
11700         arguments.  Adjust calls to get_class_bindings.  Use
11701         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
11702         (innermost_args): Use new macros.
11703         (tsubst_aggr_type): New function, split out from tsubst.
11704         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
11705         conventions for lookup_template_class.  Refine handling of partial
11706         instantiations.   Remove calls to complete_template_args.
11707         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
11708         and set_mangled_name_for_template_decl.
11709         (tsubst_copy): Use tsubst_aggr_type.
11710         (instantiate_template): Use full template arguments.
11711         (more_specialized): Improve formatting.
11712         (more_specialized_class): Adjust calls to get_class_bindings.
11713         (get_bindings_real): Don't call complete_template_args.
11714         (most_specialized): Don't overwrite input; create a new list.
11715         (most_specialized_class): Use most_general_template.
11716         (regenerate_decl_from_template): Use unregister_specialization.
11717         Use full template arguments.
11718         (instantiate_decl): Use full template arguments.
11719         (set_mangled_name_for_template_decl): New function.
11720         * semantics.c (begin_class_definition): Use
11721         maybe_process_partial_specialization.
11722         (finish_member_class_template): New function.
11723         (finish_template_decl): Likewise.
11724         (finish_template_type): Likewise.
11725         (typeck.c): Don't crash after issuing a compiler_error.
11726         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
11727
11728 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
11729
11730         * typeck2.c (build_functional_cast): Handle default-initialization.
11731
11732         * call.c (build_over_call): Pass 1 to popclass.
11733
11734         * parse.y (direct_notype_declarator): Add precedence declaration
11735         to notype_unqualified_id case.
11736         * Makefile.in (EXPECT): Adjust.
11737
11738         * tree.c (ovl_member): Fix for single function in OVL.
11739
11740 1998-07-27  Dave Brolley  <brolley@cygnus.com>
11741
11742         * c-lex.c (yylex): Fix boundary conditions in character literal and
11743         string literal loops.
11744
11745 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
11746
11747         * decl.c (lookup_name_real): OK, do return the from_obj value
11748         unless got_object depends on template parms.
11749
11750         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
11751
11752         * pt.c (coerce_template_parms): Also complain about local enums.
11753
11754         * cp-tree.h: Add prototype for set_identifier_local_value.
11755         * decl.c (set_identifier_local_value_with_scope): Make static,
11756         prototype.
11757         * search.c (covariant_return_p): Likewise.
11758         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
11759
11760         * call.c (build_method_call): Only pull out the type of a destructor
11761         if it's a template type parm.
11762         * decl.c (lookup_name_real): Never return the from_obj value.
11763
11764 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
11765
11766         * except.c (process_start_catch_block_old): Call start_decl_1 for
11767         catch parm.
11768         * decl.c (start_decl_1): Avoid duplicate error.
11769
11770         * init.c (expand_default_init): Only perform the initialization if
11771         it will do something.
11772
11773 1998-07-23  H.J. Lu  (hjl@gnu.org)
11774
11775         * parse.y (base_class): Check for invalid base class.
11776
11777 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
11778
11779         * decl2.c (import_export_template): Fold in...
11780         (import_export_class): ...to here.  Handle dllimport/export.
11781
11782         * class.c (build_vtable): Pass at_eof to import_export_vtable.
11783         (prepare_fresh_vtable): Likewise.
11784         * decl2.c (import_export_class): Split out...
11785         (finish_prevtable_vardecl): From here.
11786         * class.c (finish_struct_1): Call import_export_class if at_eof.
11787
11788         * decl.c (start_function): #if 0 mysterious code I wrote and have
11789         forgotten why.
11790         * rtti.c (get_tinfo_fn): If this is for a class type, set
11791         DECL_CONTEXT.
11792
11793 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
11794
11795         * inc/exception: Change terminate and unexpected to ().
11796
11797         * parse.y (named_class_head_sans_basetype_defn): A
11798         named_class_head_sans_basetype followed by '{' or ':' is a defn.
11799
11800 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
11801
11802         * tree.c (canonical_type_variant): New fn to handle arrays.
11803         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
11804         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
11805         * method.c (process_overload_item): Use build_overload_value for
11806         arrays.
11807
11808 1998-07-20  Dave Brolley  <brolley@cygnus.com>
11809
11810         * lex.c (mbchar.h): #include it.
11811         (GET_ENVIRONMENT): New macro.
11812         (init_parse): Set character set based on LANG environment variable.
11813         (real_yylex): Handle multibyte characters in character literals.
11814         (real_yylex): Handle multibyte characters in string literals.
11815
11816 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
11817
11818         * lex.c (do_identifier): Look for class value even if we don't
11819         have a global value.  Do implicit declaration if parsing is 2.
11820         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
11821         lookup.
11822
11823 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
11824
11825         * decl.c (pushtag): Revert previous change.
11826         * pt.c (lookup_template_class): Don't put out debugging
11827         information for types that use template parameters.
11828
11829         * decl.c (pushtag): Don't put out debugging information for
11830         compiler-generated typedefs.
11831
11832         * error.c (dump_type_real): Don't crash when presented with
11833         intQI_type_node or the like.
11834
11835         * semantics.c (finish_translation_unit): Fix spelling error in
11836         comment.
11837
11838 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
11839
11840         * decl.c (lookup_name_real): Pull out single function here.
11841         (select_decl): Not here.
11842         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
11843
11844         * decl.c (qualify_lookup): Tweak again.
11845
11846         * pt.c (lookup_template_class): Don't mess with the context of the
11847         instantiation.
11848         * decl2.c (current_decl_namespace): Remove special handling for
11849         templates.
11850
11851         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
11852         a member template specialization.
11853
11854         * tree.c (ovl_member): Use decls_match to compare functions.
11855         * decl.c (decls_match): Check the context of a function.
11856
11857         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
11858         in Koenig lookup support rules.
11859         * semantics.c (finish_call_expr): Handle the new cases.
11860
11861         * typeck.c (build_x_function_call): Handle overloaded methods.
11862
11863         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
11864
11865 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
11866
11867         * semantics.c (finish_object_call_expr): Revert previous change.
11868         * call.c (build_new_method_call): Likewise.  Instead, convert
11869         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
11870
11871 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
11872
11873         * decl.c (qualify_lookup): Handle templates.
11874
11875         * decl2.c (do_using_directive): Don't pass ancestor.
11876         * decl.c (push_using_directive): Calculate ancestor.
11877
11878         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
11879         * decl.c (pushdecl): Move type shadowing handling from here...
11880         (duplicate_decls): ...to here.
11881         * decl.c (set_identifier_local_value_with_scope): New fn.
11882         (pushdecl): Use it.
11883         (set_identifier_local_value, lookup_type_current_level): New fns.
11884         * decl2.c (do_local_using_decl): Handle types and binding level
11885         stuff properly.
11886
11887         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
11888         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
11889         (lookup_namespace_name): Likewise.
11890         * typeck.c (build_unary_op): Not here anymore.
11891
11892         * decl2.c (do_class_using_decl): Make sure we get an identifier.
11893         * class.c (handle_using_decl): Ignore TYPE_DECLs.
11894
11895         * decl.c (qualify_lookup): New fn.
11896         (lookup_name_real): Use it.
11897
11898 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
11899
11900         * decl2.c (add_using_namespace): When directly using a namespace
11901         that was indirect before, promote it.
11902
11903         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
11904         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
11905         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
11906         * decl.c (select_decl): Replace two flag parameters by one.
11907         (unqualified_namespace_lookup): Likewise, pass flag.
11908         (lookup_flags): New function.
11909         (lookup_name_real): Compute flags, pass them.
11910         (lookup_namespace_name): Call with zero-flag.
11911         * decl2.c (ambiguous_decl): Add flag parameter, complain only
11912         according to flags.
11913         (lookup_using_namespace, qualified_lookup_using_namespace):
11914         Add flag parameter, pass them through.
11915         * lex.c (do_scoped_id): Call with zero-flag.
11916
11917 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
11918
11919         * typeck.c (convert_for_assignment): Use comptypes.
11920
11921 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
11922
11923         * semantics.c (finish_object_call_expr): Move test for the
11924         function called being a TYPE_DECL to ...
11925         * call.c (build_new_method_call): Here.
11926
11927 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
11928
11929         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
11930         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
11931
11932         * lex.c (looking_for_typename): Don't initialize.
11933
11934         * decl2.c (ambiguous_decl): Clarify error message.
11935
11936         * decl.c (push_using_directive): Iterate over namespaces used
11937         indirectly.
11938
11939 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11940
11941         * decl2.c (add_using_namespace): Iterate over namespaces used
11942         indirectly.
11943
11944         * decl.c (lookup_name_real): Accept namespace aliases as locals.
11945         (cat_namespace_levels): Ignore aliases.
11946         (duplicate_decls): Ignore duplicate aliases.
11947         * decl2.c (do_namespace_alias): Process block level namespace
11948         aliases.  Store alias with pushdecl.  Remove odr errors.
11949         * parse.y (namespace_alias): New non-terminal.
11950         (extdef): Use it.
11951
11952 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
11953
11954         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
11955         Handle TEMPLATE_TYPE_PARM.
11956         (arg_assoc): Rewrite.
11957
11958         * pt.c (complete_template_args): Don't look at the context unless
11959         we have to.
11960
11961         * method.c (build_decl_overload_real): Fix namespace handling.
11962
11963         * typeck.c (build_unary_op): Extract a lone function from an
11964         OVERLOAD.
11965
11966         * call.c (build_scoped_method_call): Handle getting a namespace
11967         for basetype in a destructor call.
11968         (check_dtor_name): Handle enums.
11969
11970         * parse.y (using_directive): New nonterminal.
11971         (extdef, simple_stmt): Use it.
11972
11973 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11974
11975         * decl2.c (add_function): Move error message ...
11976         (arg_assoc_namespace): ... from here.
11977
11978 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
11979
11980         * parse.y (namespace_qualifier): Fix multiple level handling.
11981         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
11982         (arg_assoc): Don't skip the first argument of a function.
11983
11984 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
11985
11986         * search.c (my_tree_cons): Clean up.
11987
11988 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
11989
11990         * call.c (joust): Don't warn about "confusing" conversions to the
11991         same type.
11992
11993 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11994
11995         * class.c (push_nested_class): Complain about namespaces.
11996         * decl.c (start_decl): Enter the object's namespace.
11997         (cp_finish_decl): Leave it.
11998         (grokdeclarator): Likewise.
11999         * decl2.c (check_decl_namespace): New function.
12000         (finish_file): Call it.
12001         * parse.y (complex_direct_notype_declarator): Set complexity
12002         of namespace-qualified ids to -1, enter the namespace.
12003
12004         * method.c (build_template_decl_overload): Expect _DECL as first
12005         parameter.  Put context temporarily into current_namespace.
12006         * pt.c (check_explicit_specialization): Change caller.
12007         (tsubst): Likewise.
12008
12009         * init.c (build_offset_ref): Call mark_used and
12010         convert_from_reference for namespace members.
12011
12012 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12013
12014         * search.c (my_tree_cons): The bitfield is at index 2.
12015
12016 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
12017
12018         * lang-options.h: Format changed to work with new --help support
12019         in gcc/toplev.c
12020
12021 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12022
12023         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
12024         Do Koenig lookup in CALL_EXPR.
12025         (arg_assoc): Handle error_mark.
12026         * lex.c (is_global): New function.
12027         (do_identifier): Expect arguments for Koenig lookup.
12028         * parse.y (primary): Add rules for calls of unqualified function calls.
12029         (do_id): Change call of do_identifier.
12030         * pt.c (finish_stmt_expr): Likewise.
12031         * semantics.c (finish_id_expr): Likewise.
12032         (finish_call_expr): Add integer parameter to indicate
12033         argument-dependent lookup.
12034
12035         * decl.c (struct binding_level): New field using_directives.
12036         (push_using_decl): Not sorry anymore.
12037         (push_using_directive): New function.
12038         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
12039         (unqualified_namespace_lookup): New function, code from ...
12040         (lookup_name_real): ... here.
12041         * decl2.c (lookup_using_namespace): Pass using list instead of
12042         initial scope.
12043         (validate_nonmember_using_decl): New function.
12044         (do_nonmember_using_decl): New function.
12045         (do_toplevel_using_decl): Use them.
12046         (do_local_using_decl): New function.
12047         (do_using_directive): Support block-level directives.
12048         * parse.y (simple_stmt): Support using declarations and
12049         directives.
12050         (namespace_qualifier, namespace_using_decl): New non-terminals.
12051
12052         * xref.c (classname): New function.
12053         (GNU_xref_hier): Change class and base parameters to tree.
12054         * decl.c (xref_baseypes): Change caller.
12055         * friend.c (make_friend_class): Likewise.
12056
12057 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
12058
12059         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
12060         comparison.
12061
12062         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
12063         template template parameter, record its use.
12064         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
12065         its template arguments if exists.
12066
12067         * pt.c (coerce_template_template_parms): New function equivalent
12068         to coerce_template_parms when IS_TMPL_PARM is true.
12069         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
12070         all callers changed.
12071
12072         (coerce_template_parms): Access ARGLIST properly when creating a
12073         new vector.  Only accept implicit TYPE_DECL as valid argument for
12074         a template template parameter when it is a base class of
12075         current_class_type.  Don't display error message when COMPLAIN is
12076         false.
12077
12078 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
12079
12080         * repo.c (get_base_filename): Use file_name_nondirectory.
12081         (open_repo_file): Likewise.
12082         * cp-tree.h (file_name_nondirectory): Add prototype.
12083
12084 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
12085
12086         * friend.c (do_friend): Pull the identifier out of declarator.
12087         Use cp_error and friends.
12088         * decl2.c (qualified_lookup_using_namespace): Fix call to
12089         purpose_member.
12090         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
12091         (grokvardecl): Use DECL_CLASS_SCOPE_P.
12092         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
12093         * class.c (warn_hidden): Fix for OVERLOAD.
12094         From grahams@rcp.co.uk:
12095         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
12096         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
12097
12098 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
12099
12100         * g++.1 (-traditional): Remove duplicated documentation.
12101
12102 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
12103
12104         * method.c (flush_repeats): Add nrepeats parameter.
12105         (issue_nrepeats): Likewise.
12106         (is_back_referenceable_type): New function.  Don't back-reference
12107         TEMPLATE_TYPE_PARMs as well as simple types like integers.
12108         (build_mangled_name_for_type): Likewise.
12109         (build_mangled_name_for_type_with_Gcode): Likewise.
12110         (lasttype): Remove.
12111         (nrepeats): Likewise.
12112         (Nrepeats): Likewise.
12113         (start_squangling): Don't clear the variables removed above.
12114         (end_squangling): Likewise.
12115         (flush_repeats): Tidy.  Use nrepeats parameter rather than
12116         Nrepeats global.
12117         (issue_nrepeats): Likewise, but with nrepeats global.  Use
12118         is_backreferenceable_type.
12119         (build_overload_nested_name): Tidy.  Add comment.  Use
12120         build_mangled_name_for_type.
12121         (build_underscore_int): Comment.
12122         (build_overload_scope_ref): Use build_mangled_name_for_type.
12123         (build_overload_int): Likewise.
12124         (build_template_template_parm_names): Tidy.
12125         (build_template_parm_names): Use build_mangled_name_for_type.
12126         (build_overload_identifier): Add comments.
12127         (build_mangled_name_for_type_with_Gcode): Split out from
12128         build_mangled_name.
12129         (build_mangled_name_for_type): Use it.
12130         (build_mangled_name): Rework to use build_mangled_name_for_type
12131         and to not use global nrepeats/Nrepeats.  Tidy.
12132         (process_modifiers): Tidy.
12133         (check_btype): Use is_backreferenceable_type.  Add comment.
12134         Rename `node' to `type'.
12135         (process_overload_item): Set numeric_output_need_bar here.
12136         Use build_mangled_name_for_type.  Tidy.
12137         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
12138         build_mangled_name_for_type.
12139
12140         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
12141         for TYPE_DECLs.
12142
12143 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
12144
12145         * cp-tree.h (warn_long_long): Define.
12146         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
12147         warning "ANSI C++ does not support `long long'".
12148         * decl2.c (warn_long_long): Define.
12149         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
12150
12151 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
12152
12153         * decl.c (xref_tag): Handle attributes between 'class' and name.
12154         * parse.y (aggr): Likewise.
12155         * semantics.c (finish_class_definition): Likewise.
12156         * Makefile.in (EXPECTED): Adjust.
12157
12158         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
12159         * decl2.c: Define them.
12160         (lang_decode_option): Handle them.
12161         * lang-options.h: Add -foptional-diags.
12162         * class.c (finish_struct): Don't complain about multiple meanings of
12163         name if -fno-optional-diags.
12164         * decl.c (pushdecl_class_level): Likewise.
12165         * lex.c (real_yylex): Check warn_multichar.
12166
12167 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
12168
12169         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
12170
12171         * tree.c (make_binfo): Fix length.
12172
12173 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
12174
12175         * decl2.c (lang_decode_option): Remove warn_template_debugging.
12176         * lang-options.h: Likewise.
12177
12178 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12179
12180         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
12181         (process_start_catch_block): Likewise for variables
12182         `false_label_rtx', `call_rtx' and `return_value_rtx'.
12183
12184 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
12185
12186         * tree.c (build_srcloc): Make sure we allocate this node on the
12187         permanent obstack.
12188
12189 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
12190
12191         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
12192         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
12193         (lang_specific_driver): Only add -lm automatically if need_math is
12194         nonzero.
12195
12196 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
12197
12198         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
12199
12200 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12201
12202         * Makefile.in (EXPR_H): New dependency variable.
12203         (decl2.o): Depend on $(EXPR_H).
12204         (typeck.o): Likewise.
12205         (init.o): Likewise.
12206         (expr.o): Likewise.
12207
12208 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
12209
12210         * decl.c (start_enum): Put local enums on permanent_obstack.
12211
12212 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
12213
12214         * cp-tree.h (c_get_alias_set): Declare.
12215         * decl.c (init_decl_processing): Set lang_get_alias_set.
12216
12217 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
12218
12219         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
12220         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
12221         flag for all function decls which are in the exception table.
12222         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
12223         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
12224         code is emitted for any referenced rtti function.
12225
12226 1998-06-25  Dave Brolley  <brolley@cygnus.com>
12227
12228         * lang-specs.h: Use new | syntax to eliminate
12229         string concatenation.
12230
12231 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
12232
12233         * cp-tree.h (CP_DECL_CONTEXT): New macro.
12234         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
12235         * method.c (build_overload_nested_name): Likewise.
12236         * sig.c (build_signature_pointer_or_reference_type): Don't set
12237         DECL_CONTEXT.
12238
12239 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12240
12241         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
12242         * cp-tree.h (FROB_CONTEXT): New macro.
12243         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
12244         * decl.c (namespace_binding): Replace NULL_TREE with
12245         global_namespace.
12246         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
12247         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
12248         Likewise.
12249         * decl.c (pushtag): Use FROB_CONTEXT.
12250         (pushdecl, make_typename_type, define_function, grokdeclarator):
12251         Likewise.
12252         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
12253         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
12254         Likewise.
12255         * decl2.c (decl_namespace): Return global_namespace if no context.
12256         * method.c (build_overload_nested_name): Expect null as context.
12257         * pt.c (mangle_class_name_for_template): Do nothing for null
12258         contexts.
12259         (lookup_template_class): Allow for null id_context.
12260
12261 1998-06-25  Richard Henderson  <rth@cygnus.com>
12262
12263         * method.c (emit_thunk): Set current_function_is_thunk for the
12264         ASM_OUTPUT_MI_THUNK case as well.
12265
12266 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
12267
12268         * exception.cc (__cplus_type_matcher): Get a match_info pointer
12269         instead of an exception table entry as a parameter.
12270
12271 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
12272
12273         * parse.y (function_try_block): Don't call start_catch_handler.
12274         * except.c (call_eh_info): Remove coerced field from declaration.
12275         (build_eh_type_type_ref): New function to create an address of a
12276         rtti function for the new style exception tables.
12277         (expand_start_catch_block): Split function, this contains the
12278         common part.
12279         (process_start_catch_block_old): New function to perform the rest
12280         of expand_start_catch_block under old style exceptions.
12281         (process_start_catch_block_old): New function to perform the rest
12282         of expand_start_catch_block under new style exceptions.
12283         (expand_end_catch_block): Only pop the false label off the stack under
12284         the old style of exceptions.
12285         * semantics.c (finish_try_block): Don't call start_catch_handler.
12286         * exception.cc (struct cp_eh_info): Add original_value field.
12287         (__cplus_type_matcher): Perform type matching on the original exception
12288         value, and if we have a match, set the current value.
12289         (__cp_push_exception): Set the original exception value.
12290
12291 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
12292
12293         * call.c (joust): Fix confusing conversion warning.
12294
12295         * call.c (build_op_delete_call): Add placement parm.  Check
12296         LOOKUP_SPECULATIVELY.
12297         * cp-tree.h, decl2.c, init.c: Adjust.
12298         * decl.c (finish_function): Use it.
12299
12300         * pt.c (tsubst): Diagnose creating void fields or variables.
12301
12302 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12303
12304         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
12305
12306         * cp-tree.h (check_dtor_name): Add prototype.
12307
12308         * init.c (expand_member_init): Remove unused variables
12309         `ptr_type_node', `parm' and `rval'.
12310
12311         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
12312         in call to fprintf.
12313         (lang_print_xnode): Likewise.
12314
12315         * typeck2.c (enum_name_string): Cast argument to sprintf to long
12316         and use %ld specifier.
12317
12318         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
12319         specifier in call to fprintf.
12320         (GNU_xref_member): Cast argument to sprintf to int.
12321
12322 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12323
12324         * typeck2.c (pop_init_level): Warn about implicit zero initialization
12325         of struct members.
12326
12327 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12328
12329         * cp-tree.h: Prototype function `check_java_method'.
12330
12331 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
12332
12333         * class.c (finish_struct): Make conflicting use of id a pedwarn.
12334         * decl.c (pushdecl_class_level): Likewise.
12335
12336 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
12337
12338         * pt.c (convert_nontype_argument): Issue an error when presented
12339         with an integer (real) constant that cannot be simplified to an
12340         INT_CST (REAL_CST).
12341
12342         * cp-tree.h (c_get_alias_set): Remove declaration added in
12343         1998-06-13 change that should never have been checked in.
12344
12345 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
12346
12347         * typeck.c (build_binary_op_nodefault): Change % in format strings
12348         to %%.
12349
12350         * decl.c (grokvardecl): Don't build_static_name for decls that
12351         aren't at namespace scope.
12352
12353         * init.c (perform_member_init): Catch default-initialization of
12354         references.
12355
12356 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
12357
12358         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
12359
12360 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
12361
12362         * method.c (hack_identifier): Complain about getting a namespace
12363         or class template.
12364         * typeck.c (decay_conversion): Remove check for namespaces.
12365         * typeck2.c (incomplete_type_error): Likewise.
12366         * parse.y (template_arg): Add PTYPENAME expansion.
12367
12368 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
12369
12370         * decl.c (grokvardecl): Don't build external assembler names for
12371         TYPENAMEs in other namespaces as there is no declarator.
12372         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
12373         info from DECL_CONTEXT if it is NULL.
12374
12375 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
12376
12377         * call.c (check_dtor_name): Split out.
12378         (build_scoped_method_call): Use it.
12379         (build_method_call): Use it.
12380         * init.c (build_offset_ref): Use it.
12381
12382         * typeck.c (build_static_cast): Fix handling of pointers to members.
12383
12384         * decl.c (finish_function): Just return nothing from a constructor.
12385         * typeck.c (c_expand_return): Complain about returning a void
12386         expression from a destructor.
12387
12388 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
12389
12390         * class.c (alter_access): Accept a BINFO explaining how to get
12391         from the entity whose accessed is being altered to the type doing
12392         the altering.
12393         (handle_using_decl): New function containing code split out from ...
12394         (finish_struct_1): Here.
12395
12396         * cp-tree.h (complete_type_or_else): Declare.
12397         * init.c (build_new_1, build_delete): Use it.
12398         * typeck.c (require_complete_type): Use complete_type, rather than
12399         expanding it inline.
12400         (complete_type_or_else): New function.
12401         (build_component_ref): Use it.
12402         (pointer_int_sum): Make sure the type pointed to is complete.
12403         (pointer_diff): Likewise.
12404
12405         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
12406         types.
12407
12408         * search.c (get_matching_virtual): Note that member templates
12409         cannot override virtual functions.
12410
12411 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
12412
12413         * pt.c (check_explicit_specialization): If DECLARATOR turned into
12414         an error_mark_node from lookup_template_function, return the same.
12415         (determine_specialization): Also make sure TEMPLATE_ID isn't an
12416         error_mark_node, before we try to read its operands.
12417         * decl.c (grokdeclarator): If we got an error_mark_node from
12418         check_explicit_specialization, just return it right back.
12419
12420 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
12421
12422         * class.c (instantiate_type): Don't treat template-ids that don't
12423         specify any template arguments as equivalent to ordinary
12424         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
12425         pointer-to-members for member templates.  Tidy slightly.
12426         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
12427         * init.c (build_offset_ref): Handle template-ids like ordinary
12428         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
12429         offset part of the OFFSET_REF.
12430         * typeck.c (build_unary_op): Change check for unknown types to
12431         look for OFFSET_REFs, not SCOPE_REFs.
12432
12433 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
12434
12435         * pt.c (is_member_template_class): New function.
12436         (push_template_decl_real): Use it.
12437
12438 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
12439
12440         * friend.c (do_friend): Add support for nested classes using
12441         member functions of the enclosing class as friends.
12442
12443 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
12444
12445         * call.c (convert_default_arg): Make global, not static.
12446         (convert_arg_for_ellipsis): Split out from ...
12447         (build_over_call): Here.
12448         * cp-tree.h (convert_default_arg); Declare.
12449         (convert_arg_to_ellipsis): Likewise.
12450         (do_member_init): Remove.
12451         * init.c (do_member_init): Remove; this code is dead.
12452         (expand_member_init): Remove much of this code; it is dead.
12453         * typeck.c (convert_arguments): Use convert_default_arg and
12454         convert_arg_for_ellipsis, rather than duplicating here.
12455
12456         * call.c (convert_like): Don't fail silently if
12457         build_user_type_conversion fails.  Always return error_mark_node
12458         for failure.
12459
12460 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
12461
12462         * search.c (covariant_return_p): Complain about ambiguous base.
12463
12464         * typeck.c (build_component_ref): Diagnose ref to nested type.
12465
12466 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
12467
12468         * decl.c (grokparms): Check that INIT isn't an error_mark_node
12469         before giving error about invalid type for default arg.
12470
12471 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
12472
12473         * call.c (build_method_call): Fix thinko.
12474
12475 1998-06-10  Dave Brolley  <brolley@cygnus.com>
12476
12477         * decl2.c (lang_decode_option): New argc/argv interface.
12478         * cp-tree.h (lang_decode_option): New argc/argv interface.
12479         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
12480         specified for cpplib-enabled compilers.
12481         * lex.c (lang_init): Don't check_newline for cpplib.
12482         (init_parse): Don't initialize cpplib here.
12483
12484 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
12485
12486         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
12487         piece before checking DECL_MUTABLE_P.
12488
12489 1998-06-10  John Carr  <jfc@mit.edu>
12490
12491         * tree.c (debug_binfo): Make printf format match arguments.
12492
12493         * error.c (OB_PUTI): Make printf format match arguments.
12494
12495 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
12496
12497         * init.c (perform_member_init): Handle default-initialization.
12498
12499         * except.c (build_throw): Handle throwing NULL.
12500
12501         * typeck.c (build_x_function_call): Use resolve_offset_ref.
12502
12503         * search.c (compute_access): Only strip an anonymous union
12504         for a FIELD_DECL.
12505
12506         * call.c (add_builtin_candidates): Tweak.
12507
12508         * cvt.c (build_expr_type_conversion): Restore code for conversion
12509         from class types.
12510         * decl2.c (delete_sanity): Use it.  Clean up.
12511
12512         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
12513
12514 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
12515
12516         * typeck.c (c_expand_return): Don't warn about void expressions on
12517         return statements in functions returning void.
12518
12519 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
12520
12521         * pt.c (fn_type_unification): Revise documentation.  Tidy.
12522         (type_unification): Likewise.
12523
12524 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
12525
12526         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
12527         expand_end_catch.
12528         * parse.y (function_try_block): Rename expand_start_catch, and delete
12529         expand_end_catch.
12530         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
12531         expand_end_catch.
12532
12533 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
12534
12535         * search.c (lookup_member): New fn.
12536         * class.c (finish_struct_1): Use it.
12537         * decl.c (lookup_name_real): Use it.
12538
12539 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12540
12541         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
12542
12543         * cp-tree.h: Add prototype for `maybe_print_template_context' and
12544         `maybe_make_one_only'.
12545
12546         * decl.c (auto_function): Remove unused variable `decl'.
12547
12548         * decl2.c: Include dwarf2out.h and dwarfout.h.
12549
12550         * lex.c: Remove redundant declarations of `set_float_handler' and
12551         `asm_out_file'.
12552
12553 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
12554
12555         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
12556         time flag.  Call __cp_eh_info instead of __cp_exception_info.
12557         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
12558         (__cp_exception_info): Return offset into cp_eh_info structure to
12559         match what use to be the start of this structure.
12560         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
12561         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
12562         compile time flag.
12563         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
12564         __cp_eh_info instead of __cp_exception_info.
12565
12566 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
12567
12568         * decl.c (cp_finish_decl): Disable inlining of extern inlines
12569         with static variables.
12570
12571 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
12572
12573         * init.c (build_offset_ref): Correct previous change to use build,
12574         not build_min.
12575
12576 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
12577
12578         * class.c (instantiate_type): Handle pointer-to-members where the
12579         member is a template.
12580         * init.c (build_offset_ref): Likewise.
12581         * typeck.c (build_unary_op): Likewise.
12582
12583 1998-06-07  Richard Henderson  <rth@cygnus.com>
12584
12585         * lex.c (lang_init_options): New function.
12586         (lang_init): Remove flag_exceptions == 2 hack.
12587
12588 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
12589
12590         * search.c (envelope_add_decl): Tweak for implicit typename.
12591
12592         * call.c (joust): Also warn about confusing conversion op/constructor
12593         overload resolution.
12594
12595         * spew.c (yylex): Also return the TYPE_DECL if got_object.
12596         Don't clear got_object after '~'.
12597         * call.c (build_scoped_method_call): Tweak destructor handling.
12598         (build_method_call): Likewise.
12599         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
12600         TYPE_MAIN_VARIANT for destructors.
12601         * semantics.c (finish_object_call_expr): Complain about calling a
12602         TYPE_DECL.
12603
12604 1998-06-05  Per Bothner  <bothner@cygnus.com>
12605
12606         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
12607         Define - update needed by gcc.c change.
12608
12609 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
12610
12611         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
12612
12613 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12614
12615         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
12616         * decl.c (lookup_name_real): Add namespaces_only parameter.
12617         If set, return only NAMESPACE_DECLs.
12618         (select_decl): Likewise.
12619         (identifier_type_value): Give additional parameter.
12620         (lookup_name_nonclass): Likewise.
12621         (lookup_name): Likewise.
12622         (find_binding): Skip namespace aliases.
12623         (binding_for_name): Likewise.
12624         (push_namespace): Check for namespace aliases.
12625         (lookup_name_namespace_only): New function.
12626         (begin_only_namespace_names, end_only_namespace_names): New functions.
12627         * decl2.c (set_decl_namespace): Skip namespace aliases.
12628         (do_using_directive): Likewise.
12629         (do_namespace_alias): Produce namespace aliases, fix alias
12630         redeclaration.
12631         * error.c (dump_decl): Support SCOPE_REF.
12632         * parse.y (extdef): Wrap lookup with namespace_only for namespace
12633         aliases and using declarations.
12634
12635 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
12636
12637         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
12638
12639         * error.c (dump_expr): Clean up NEW_EXPR case.
12640
12641 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12642
12643         Suggested by Brendan Kehoe
12644         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
12645         treat it as using ::decl.
12646
12647         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
12648
12649         * tree.c (mapcar): Support NEW_EXPR.
12650
12651         * error.c (dump_expr): Support NEW_EXPR.
12652
12653 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
12654
12655         * method.c (make_thunk): Use overload machinery to make name.
12656         * search.c (covariant_return_p): New fn.
12657         (get_matching_virtual): Use it.
12658
12659         * init.c (build_new_1): Fix check for void.
12660
12661 1998-06-01  Per Bothner  <bothner@cygnus.com>
12662
12663         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
12664         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
12665         java_int_type_node, java_long_type_node, java_float_type_node,
12666         java_double_type_node, java_char_type_node, java_boolean_type_node):
12667         New "primitive" types, with predefined names __java_byte etc.
12668         (record_builtin_java_type):  New function.
12669         (init_decl_processing):  Make Java types with record_builtin_java_type.
12670         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
12671         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
12672         (grokfndecl):  Call check_java_method for Java classes.
12673         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
12674         (process_overload_item):  Match types against specific
12675         java_XX_type_node types, rather than using is_java_type.
12676         * class.c (finish_struct_1):  Don't add default copy constructor
12677         or operator= if TYPE_FOR_JAVA.
12678         (pop_lang_conext):  Restore strict_prototyp proper if Java.
12679         * decl2.c (acceptable_java_type, check_java_method):  New functions.
12680         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
12681         (tsubst):  Move common statement after if statement.
12682         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
12683
12684 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
12685
12686         * pt.c (for_each_template_parm): Use first_rtl_op.
12687
12688         * tree.c (build_cplus_array_type_1): Also check index_type for
12689         template parms.
12690
12691 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
12692
12693         * pt.c (tsubst): Always copy BINFO_BASETYPES.
12694
12695 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
12696
12697         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
12698         TYPE_SIZE_UNIT too.
12699
12700 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
12701
12702         * decl.c (grokdeclarator): Don't complain about in-class
12703         initialization of static consts if we don't really know the type
12704         of the variable.
12705
12706 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
12707
12708         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
12709         * method.c (build_destructor_name): New fn.
12710         * decl2.c (maybe_retrofit_in_chrg): Split out...
12711         (grokclassfn): From here.  Reorganize.
12712         * decl.c (grok_ctor_properties): Make sure ctors for types with
12713         vbases have the in_chrg parm.
12714         * pt.c (instantiate_class_template): Update
12715         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
12716         grok_*_properties.
12717         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
12718
12719 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
12720
12721         * pt.c (instantiate_decl): Make test for whether or not static
12722         variables should be instantiated early match its comment.
12723
12724 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
12725
12726         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
12727         a member.
12728         (start_function): Call check_default_args.
12729         * decl2.c (grokfield): Don't call check_default_args.
12730         (check_default_args): Use cp_error_at.
12731         * lex.c (do_pending_defargs): Call check_default_args.
12732
12733 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
12734
12735         * call.c (build_method_call): Make sure get_type_value returns
12736         something before we try to use its TYPE_MAIN_VARIANT.
12737         (build_scoped_method_call): Likewise.
12738
12739 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
12740
12741         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
12742         initialize an array.
12743
12744         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
12745         DECL_VIRTUAL_P.
12746
12747         * friend.c (do_friend): Clarify template warning.
12748
12749 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
12750
12751         * decl.c (shadow_label): Don't treat decls as identifiers.
12752         (maybe_push_to_top_level): Clear shadowed_labels.
12753
12754         * pt.c (instantiate_decl): Reset lineno and filename after calling
12755         regenerate_decl_from_template.
12756
12757         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
12758         error_mark_node.
12759
12760 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
12761
12762         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
12763
12764 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12765
12766         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
12767         (convert_nontype_argument): Handle cases when nontype template
12768         parameters become classes after substitution.
12769
12770 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
12771
12772         * friend.c (is_friend): Use comptypes, rather than == to compare
12773         types.  Modify for new representation of template friends.
12774         (make_friend_class): Likewise.
12775         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
12776         (instantiate_class_template): Deal with template friends.
12777
12778         * decl.c (store_parm_decls): Remove redundant call to
12779         expand_main_function.
12780
12781 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
12782
12783         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
12784         DECL_USE_TEMPLATE.
12785
12786 1998-05-26  Per Bothner  <bothner@cygnus.com>
12787
12788         * language_as_string:  Handle lang_java.
12789
12790 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
12791
12792         * decl.c (pushdecl): Don't copy the type_decl.
12793
12794 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12795
12796         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
12797         current_class_type.
12798         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
12799
12800         * parse.y (complex_direct_notype_declarator): Use $1 to access
12801         scope of notype_qualified_id.
12802
12803 1998-05-26  Dave Brolley  <brolley@cygnus.com>
12804
12805         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
12806         (init_parse): Initialize cpplib interface.
12807
12808         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
12809         empty continuation.
12810
12811 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
12812
12813         * decl.c (pushtag): Avoid crashing on erroneous input.
12814
12815 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12816
12817         * decl.c (push_namespace): Only produce one unique name for
12818         anonymous namespaces.
12819         (get_unique_name): Remove.
12820
12821 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
12822
12823         * call.c (tourney): Don't do any extra comparisons.
12824
12825         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
12826
12827         * cp-tree.h (processing_template_parmlist): Declare.
12828         * decl.c (pushtag): Don't call push_template_decl when we
12829         shouldn't.
12830         * pt.c (processing_template_parmlist): New variable.
12831         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
12832         (complete_template_args): Use it.
12833         (add_to_template_args): Likewise.
12834         (innermost_args): Likewise.
12835         (tsubst): Likewise.
12836         (begin_template_parm_list): Use processing_template_parmlist.
12837         (end_template_parm_list): Likewise.
12838
12839         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
12840         * decl.c (grokdeclarator): Use it.
12841         * decl2.c (grok_x_components): Likewise.
12842         * init.c (initializing_context): Likewise.
12843         * method.c (do_build_copy_constructor): Likewise.
12844         (do_build_assign_ref): Likewise.
12845         * search.c (compute_access): Likewise.
12846         * typeck.c (build_component_ref): Likewise.
12847
12848         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
12849         unnamed type a typedef name "for linkage purposes".
12850
12851         * pt.c (lookup_template_class): Don't look at
12852         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
12853
12854         * method.c (build_overload_int): Handle error cases gracefully.
12855
12856         * pt.c (instantiate_decl): Handle static member variables
12857         correctly.
12858
12859         * pt.c (tsubst): Use the tsubst'd type when producing new
12860         TEMPLATE_PARM_INDEX nodes.
12861
12862 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
12863
12864         * tree.c (cp_tree_equal): Handle pointers to member functions.
12865
12866         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
12867         sure the type of the REF_BIND is a reference type.
12868         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
12869         target_type for clarity.
12870
12871         * parse.y (xcond): Move call to condition_conversion ...
12872         * semantics.c (finish_for_cond): Here.
12873         * parse.c: Regenerated.
12874
12875 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
12876
12877         * decl.c (push_namespace): Namespaces have type void.
12878         * typeck2.c (incomplete_type_error): Complain about namespace
12879         used as expression.
12880         * typeck.c (decay_conversion): Likewise.
12881
12882 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12883
12884         * error.c (dump_expr): Support namespaces.
12885
12886 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
12887
12888         * cp-tree.def: Add SRCLOC.
12889         * cp-tree.h: Add struct tree_srcloc and accessor macros.
12890         * tree.c (build_srcloc, build_srcloc_here): New fns.
12891         * pt.c (add_pending_template): Use build_srcloc_here.
12892         (push_tinst_level): Update last_template_error_tick before erroring.
12893         (instantiate_decl): Restore lineno and input_filename before
12894         calling add_pending_template.
12895         * decl2.c (finish_file): Set up lineno and input_filename for
12896         pending templates.
12897
12898 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
12899
12900         * decl.c (lang_print_error_function): New fn.
12901         (init_decl_processing): Set print_error_function to use it.
12902         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
12903
12904         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
12905         ICS_BAD_FLAG.
12906
12907         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
12908         copy-initialization.
12909
12910         * class.c (build_vtable_entry): Use int_fits_type_p.
12911         (build_vtable): Pass a signed offset to build_vtable_entry.
12912         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
12913         set_rtti_entry): Likewise.
12914
12915 1998-05-22  Per Bothner  <bothner@cygnus.com>
12916
12917         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
12918         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
12919
12920 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
12921
12922         * pt.c (print_template_context): Use fprintf instead of cp_error.
12923
12924         * pt.c (determine_specialization): Just return an error_mark_node.
12925         Also print the decl we want in error messages.  If we complain,
12926         return error_mark_node.
12927         (tsubst_friend_function): Set lineno and input_filename so
12928         error messages will be useful.
12929         (instantiate_template): Just return an error_mark_node.
12930         (check_explicit_specialization): Don't mess with a returned
12931         error_mark_node.
12932
12933         * pt.c (print_template_context): Add new argument.
12934         (maybe_print_template_context): New fn.
12935         (push_tinst_level): Increment tinst_level_tick.
12936         (pop_tinst_level): Likewise.
12937         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
12938         xrealloc instead of xmalloc.
12939
12940         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
12941
12942 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
12943
12944         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
12945         if the template we looked up is the same as the one we already
12946         have.
12947
12948 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
12949
12950         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
12951         (cpp_reader,parse_in): Add for cpplib.
12952         (check_newline): Call handle_sysv_pragma with new interface.
12953         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
12954
12955         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
12956         (sub_getch): Call GETC for cpplib.
12957
12958         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
12959         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
12960
12961         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
12962
12963 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
12964
12965         * decl2.c (maybe_make_one_only): New fn.
12966         (import_export_vtable): Use it.
12967         (import_export_decl): Likewise.
12968         * pt.c (mark_decl_instantiated): Likewise.
12969
12970 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
12971
12972         * decl2.c (find_representative_member): Rename to ...
12973         (build_anon_union_vars): New function.
12974         (finish_anon_union): Fix stupidity of previous change.
12975
12976 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
12977
12978         * decl.c (grokfndecl): Handle definition of specialization in
12979         friend declaration.
12980
12981         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
12982
12983 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
12984
12985         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
12986         to look for type declarations.
12987         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
12988         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
12989         (finish_member_class_template): Declare.
12990         * decl.c (pushtag): Put member class templates on the
12991         CLASSTYPE_TAGS list, just as for ordinary member classes.
12992         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
12993         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
12994         IDENTIFIER_NAMESPACE_VALUEs.
12995         * parse.y (component_decl): Move code to ...
12996         * semantics.c (finish_member_class_template): New function.
12997         Don't put member class templates on the list of components for a
12998         class.
12999         * parse.c: Regenerated.
13000         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
13001         In fact, don't use DECL_CONTEXT at all here.
13002
13003 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
13004
13005         * decl.c (record_unknown_type): New function.
13006         (init_decl_processing): Call it for the unknown and global type
13007         nodes.
13008
13009 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
13010
13011         * decl2.c (find_representative_member): New function.
13012         (finish_anon_union): Use it.
13013
13014         * cp-tree.h (MAIN_NAME_P): New macro.
13015         (DECL_MAIN_P): Likwise.
13016         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
13017         (grokfndecl): Use the new macros.
13018         (grokdeclarator): Likewise.
13019         (start_function): Likewise.
13020         (store_parm_decls): Likewise.
13021         (finsh_function): Likewise.
13022         * friend.c (do_friend): Likewise.
13023         * typeck.c (build_function_call_real): Likewise.
13024         (build_unary_op): Likewise.
13025
13026 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
13027
13028         * decl2.c (start_objects, finish_objects, do_dtors,
13029         do_ctors): Split out from...
13030         (finish_file): ...here.
13031
13032 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
13033
13034         * tree.c (is_overloaded_fn): Don't abort on placeholders from
13035         push_class_decls.
13036
13037 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
13038
13039         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
13040
13041         * error.c (dump_expr): Handle an ARROW_EXPR.
13042
13043 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
13044
13045         * decl.c (saveable_obstack): Declare.
13046         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
13047         declare, if necessary.
13048
13049 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
13050
13051         * call.c (compare_qual): Remove.
13052         (is_subseq): Tweak.
13053         (is_properly_derived_from): New function.
13054         (maybe_handle_ref_bind): Likewise.
13055         (maybe_handle_implicit_object): Likewise.
13056         (compare_ics): Modify substantially to bring into conformance with
13057         the standard.
13058         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
13059         (comp_cv_qualification): Declare.
13060         (comp_cv_qual_signature): Likewise.
13061         * typeck.c (comp_cv_qualification): Likewise.
13062         (comp_cv_qual_signature): Likewise.
13063
13064 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13065
13066         * Makefile.in (parse.o): Depend on toplev.h.
13067
13068         * class.c (typecode_p): Remove prototype and definition.
13069
13070         * cp-tree.h (currently_open_class, is_empty_class, member_p):
13071         Add prototype.
13072
13073         * decl.c (push_overloaded_decl_top_level): Remove prototype and
13074         definition.
13075
13076         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
13077         in call to `cp_thing'.
13078         (cp_warning): Likewise for function pointer `warning'.
13079
13080         * except.c (do_function_call): Remove prototype and definition.
13081         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
13082
13083         * method.c (is_java_type): Add prototype and make it static.
13084
13085         * parse.y: Include toplev.h.
13086
13087         * pt.c (type_unification): Remove unused variable `arg'.
13088         (instantiate_decl): Likewise for `save_ti'.
13089
13090         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
13091
13092 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
13093
13094         * init.c (build_member_call): Handle template_ids.
13095         * parse.y (primary): Add global_scope template_id.
13096
13097 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
13098
13099         * decl2.c (get_sentry): Use end_temporary_allocation.
13100         Don't declare permanent_obstack.
13101
13102 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
13103
13104         * parse.y (.finish_new_placement): New non-terminal.
13105         (unary_expr, new_type_id): Use it.
13106         * parse.c: Regenerated.
13107
13108 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
13109
13110         * pt.c (redeclare_class_template): Say where the original definition
13111         of the template-parameter's default argument appeared.
13112
13113 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
13114
13115         * call.c (build_over_call): Tweak empty class handling.
13116
13117         * decl.c (make_typename_type): Use currently_open_class.
13118
13119         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
13120
13121 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
13122
13123         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
13124         for a type unless it is one.
13125
13126         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
13127
13128 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
13129
13130         * Makefile.in (program_transform_name, objdir): Define.
13131
13132         * Makefile.in (BISON): Use bison from the build tree if it exists.
13133         (FLEX): Likewise.
13134
13135 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
13136
13137         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
13138
13139         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
13140
13141 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
13142
13143         * call.c (build_scoped_method_call): Likewise.
13144
13145 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
13146
13147         * init.c (build_new_1): Call suspend_momentary around the creation
13148         of values that must be saved for exception handling.
13149         * parse.y (.build_new_placement): New non-terminal.
13150         (unary_expr, new_placement): Use it.
13151         * parse.c: Regenerated.
13152
13153 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
13154
13155         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
13156         old and new types.
13157
13158         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
13159         canonical type.
13160
13161         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
13162
13163 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
13164
13165         * decl.c (start_decl): Revert problem change.
13166
13167         * Makefile.in (CONFLICTS): Fix.
13168
13169 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13170
13171         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
13172
13173 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
13174
13175         * class.c (finish_struct_1): Use BINFO_SIZE.
13176
13177         * decl.c (start_decl): Use 'tem'.
13178
13179 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
13180
13181         * exception.cc: Include eh-common.h.
13182         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
13183         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
13184         (__cp_push_exception): Initialize eh_info struct as well.
13185         * except.c: Remove local structs and include eh-common.h.
13186         (init_exception_processing): Set language and version codes.
13187         (call_eh_info): Add presence of eh_info to runtime description of
13188         struct cp_eh_info.
13189         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
13190         * semantics.c (finish_try_block): Call start_catch_block() and
13191         end_catch_block().
13192         * parse.y (function_try_block): Call start_catch_block() and
13193         end_catch_block().
13194
13195 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
13196
13197         * typeck.c (original_type): New function.
13198         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
13199         to see if they're actually the same.
13200         * cp-tree.h (original_type): Declare.
13201
13202 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13203
13204         * Makefile.in (lex.o): Depend on output.h.
13205
13206         * call.c (add_function_candidate): Remove unused variable `cand'.
13207         (add_conv_candidate): Likewise.
13208         (build_builtin_candidate): Likewise.
13209
13210         * cp-tree.h: Add prototype for `types_overlap_p'.
13211
13212         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
13213
13214         * decl2.c (merge_functions): Remove unused variables `tmp' and
13215         `tempn'.
13216
13217         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
13218         (code_as_string): Likewise.
13219         (language_as_string): Likewise.
13220         (parm_as_string): Likewise.
13221         (op_as_string): Likewise.
13222         (assop_as_string): Likewise.
13223         (cv_as_string): Likewise.
13224
13225         * lex.c: Include output.h.
13226
13227         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
13228
13229         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
13230         ATTRIBUTE_UNUSED.
13231
13232         * tinfo.cc (__class_type_info::dcast): Change the type of variable
13233         `i' from int to size_t.
13234
13235         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
13236         ATTRIBUTE_UNUSED.
13237
13238 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
13239
13240         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
13241         DECL_NAMESPACE_SCOPE_P.
13242         (lang_decl_name): Likewise.
13243         * pt.c (tsubst_friend_function, tsubst): Likewise.
13244         * decl.c (pushdecl, redeclaration_error_message, start_decl,
13245         cp_finish_decl, start_function): Likewise.
13246         * class.c (finish_struct_1): Likewise.
13247         * call.c (build_over_call): Likewise.
13248         (compare_ics): Use DERIVED_FROM_P.
13249
13250 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
13251
13252         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
13253         * method.c (build_mangled_name): Use it.
13254         (build_decl_overload_real): Likewise.
13255
13256         * error.c (dump_simple_decl): New function, broken out from ...
13257         (dump_decl): Use it.
13258
13259 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
13260
13261         * ptree.c (lang_print_xnode): Add missing `break'.
13262
13263         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
13264
13265         * call.c (add_template_candidate): Adjust for changes to
13266         fn_type_unification.
13267         (add_template_candidate_real): Likewise.
13268         (add_template_conv_candidate): Likewise.
13269         (build_user_type_conversion_1): Likewise.
13270         (build_new_function_call): Likewise.
13271         (build_object_call): Likewise.
13272         (build_new_op): Likewise.
13273         (build_new_method_call): Likewise.
13274         * class.c (instantiate_type): Likewise.
13275         * cp-tree.h (unification_kind_t): New type.
13276         (fn_type_unification): Adjust prototype.
13277         (type_unificaiton): Likewise.
13278         * pt.c (UNIFY_ALLOW_NONE): New macro.
13279         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
13280         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
13281         (UNIFY_ALLOW_DERIVED): Likewise.
13282         (unify): Change prototype.
13283         (maybe_adjust_types_for_deduction): New function.
13284         (check_cv_quals_for_unify): Likewise.
13285         (determine_specialization): Adjust.
13286         (fn_type_unification): Likewise.
13287         (type_unification): Likewise.
13288         (type_unification_real): Likewise.  Use
13289         maybe_adjust_types_for_deduction.  Fix mishandling of
13290         back-unification of template functions passed as arguments.  Pass
13291         appropriate combination of UNIFY_ALLOW_* to unify.
13292         (unify): Remove unused NTPARMS parameter.  Use
13293         check_cv_quals_for_unify.  Remove bogus code that allowed
13294         too-generous unification in order to adhere more closely to standard.
13295         (get_bindings_real): Adjust.
13296         (get_class_bindings): Likewise.
13297
13298         * method.c (build_overload_identifier): Only use the innermost
13299         template arguments when mangling.
13300         * pt.c (tsubst_template_argument_vector): New function.
13301         (complete_template_args): Deal with the situation where the
13302         extra_args contain more than one level of arguments.
13303         (lookup_template_class): Deal with member template classes, which
13304         may have more than one level of arguments.
13305         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
13306         Improve handling of member template classes.  Use
13307         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
13308         tsubst_template_argument_vector where appropriate.
13309         (regenerate_decl_from_template): Break out from ...
13310         (instantiate_decl): Here.
13311
13312         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
13313         * parse.h: Regenerated.
13314         * parse.c: Really regenerated.
13315
13316         * cp-tree.h (finish_unary_op_expr): New function.
13317         (finish_id_expr): Likewise.
13318         (begin_new_placement): Likewise.
13319         (finish_new_placement): Likewise.
13320         (finish_declarator): Likewise.
13321         (finish_translation_unit): Likewise.
13322         (finish_parmlist): Likewise.
13323         (begin_class_definition): Likewise.
13324         (finish_class_definition): Likewise.
13325         (finish_default_args): Likewise.
13326         (finish_inline_definitions): Likewise.
13327         * parse.y (GCC_ASM_KEYWORD): Remove.
13328         (TYPENAME_ELLIPSIS): Likewise.
13329         * parse.c: Regenerated.
13330         Use new functions in semantics.c in the actions for many rules.
13331         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
13332         * hash.h: Regenerated.
13333         * semantics.c (finish_expr_stmt): Allow NULL expr.
13334         (finish_unary_op_expr): New function, containing
13335         code previously in parse.y.
13336         (finish_id_expr): Likewise.
13337         (begin_new_placement): Likewise.
13338         (finish_new_placement): Likewise.
13339         (finish_declarator): Likewise.
13340         (finish_translation_unit): Likewise.
13341         (finish_parmlist): Likewise.
13342         (begin_class_definition): Likewise.
13343         (finish_class_definition): Likewise.
13344         (finish_default_args): Likewise.
13345         (finish_inline_definitions): Likewise.
13346
13347 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
13348
13349         * typeck.c (build_c_cast): Don't decay arrays and functions to
13350         pointer type when converting to a class type.
13351
13352 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
13353
13354         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
13355         (DECL_CLASS_SCOPE_P): Likewise.
13356
13357 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
13358
13359         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
13360         * decl2.c (constructor_name_full): Likewise.
13361
13362 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
13363
13364         * tree.c (mapcar): Add OVERLOAD support.
13365
13366         * init.c (resolve_offset_ref): We must use basetype_path before we
13367         destroy it with a call to convert_pointer_to.
13368
13369 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
13370
13371         * class.c (currently_open_class): New fn.
13372         * decl.c (lookup_name_real): Use it.
13373         * search.c (lookup_field): Likewise.
13374
13375 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
13376
13377         * cp-tree.def (OVERLOAD): New node.
13378         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
13379         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
13380         (NAMESPACE_BINDING): Remove.
13381         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
13382         namespace_binding.
13383         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
13384         Define.
13385         (tree_overload): New struct.
13386         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
13387         (REAL_IDENTIFIER_TYPE_VALUE): Define.
13388         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
13389         (lang_decl_flags): Remove in_namespace.
13390         (lang_decl): Remove chain.
13391         (DECL_CHAIN, DECL_NAMESPACE): Remove.
13392         (flag_honor_std): Declare extern.
13393         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
13394         namespace_binding, set_namespace_binding,
13395         lookup_function_nonclass, cat_namespace_levels,
13396         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
13397         scratch_ovl_cons, ovl_member, build_overload): Declare.
13398         (decl_list_length, get_namespace_id, current_namespace_id,
13399         overloaded_globals_p): Remove.
13400         (lookup_using_namespace, qualified_lookup_using_namespace): Change
13401         return type.
13402         (push_scratch_obstack): New macro.
13403         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
13404         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
13405         convs, fns.
13406         (build_new_function_call): Iterate using OVL_CHAIN.
13407         Print DECL_NAME in when reporting ambiguities.
13408         (build_object_call): Iterate using OVL_NEXT for fns, convs.
13409         (build_new_op): Call lookup_function_nonclass.
13410         Iterate using OVL_NEXT.
13411         (build_op_delete_call): Change detection of members.
13412         Do not wrap TREE_LIST around fields and single global functions.
13413         (build_over_call): Don't push a class level if the context is a
13414         namespace.
13415         (build_new_method_call): Iterate using OVL_NEXT.
13416         * class.c (add_method): Chain overloaded members using
13417         build_overload.  Remove copying of method.
13418         (grow_method): When iterating through the obstack, expect OVERLOAD
13419         nodes.  Chain overload members.
13420         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
13421         nodes in call to get_baselinks.
13422         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
13423         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
13424         fdecls that are OVERLOAD nodes.
13425         (validate_lhs): New function.
13426         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
13427         code.  Use DECL_NAME in error messages.  Split code between global
13428         and member function processing.
13429         * decl.c (global_type_node): New static variable.
13430         (in_std): New global.
13431         (struct binding_level): New field usings.
13432         (resume_binding_level): Assert that we are not in a class.
13433         (toplevel_bindings_p): Just check for namespace_p or
13434         pseudo_global.
13435         (resume_level): Remove.
13436         (find_binding): New function.
13437         (binding_for_name): Call it.
13438         (namespace_binding, set_namespace_binding): New functions.
13439         (push_namespace): Associate binding level with new namespace,
13440         resume_binding_level for existing namespace.  Remove old code.
13441         Fake std by counting.
13442         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
13443         (maybe_push_to_top_level): Save current namespace.
13444         (pop_from_top_level): Restore saved namespace.
13445         (pop_namespace): Call suspend_binding_level.  Remove old code.
13446         (cat_namespace_levels): New function.
13447         (set_identifier_type_value_with_scope): For namespace bindings,
13448         set BINDING_TYPE, and use global_type_node.
13449         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
13450         (identifier_type_value): New function.
13451         (pushtag): If no context, use current_namespace.
13452         (duplicate_decls): Don't process DECL_CHAIN.
13453         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
13454         already set.  Never reset it to NULL_TREE.  Lookup global variables
13455         in their namespace.  Push overloaded templates if they are on
13456         namespace level.
13457         (pushdecl_namespace_level): New function.
13458         (pushdecl_top_level): Implement using pushdecl_namespace_level.
13459         (pushdecl_using_decl): New function.
13460         (overloaded_globals_p): Remove.
13461         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
13462         them.  Use namespace_binding and set_namespace_value.
13463         (redeclaration_error_message): Complain if the declarations come
13464         from different namespaces.
13465         (lookup_tag): On namespace level, look in the BINDING_TYPE.
13466         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
13467         old code.
13468         (select_decl): New function.
13469         (lookup_name_real): Call it for qualified and unqualified lookup.
13470         Pass tree_bindings from the stack.
13471         If prefer_type is 1, also accept namespaces.
13472         (lookup_function_nonclass): New function.
13473         (init_decl_processing): Set the binding level of the global
13474         namespace to global_binding_level.
13475         Build a proper type list for __builtin_apply.
13476         Initialize std_node to "fake std" if flag_honor_std is set.
13477         Initialize global_type_node.
13478         Allocated bad_alloc in namespace std if flag_honor_std.
13479         (define_function): Set the DECL_CONTEXT to the current_namespace.
13480         (start_decl): A namespace is not considered as a context here.  If
13481         the DECL_CONTEXT is a namespace, push the decl.
13482         (cp_finish_decl): Check for namespaces used as initializers.
13483         (grokfndecl): Add namespace parameter.  Remove processing of
13484         DECL_CHAIN.
13485         (grokvardecl): Add namespace parameter.
13486         (grokdeclarator): Process SCOPEs that are namespaces.  For
13487         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
13488         (start_function): Check for contexts that are namespaces.
13489         Set context for declarations that have not been pushed.
13490         (store_parm_decls): Check for ::main only.
13491         (finish_function): Likewise.
13492         (start_method): Check for contexts that are namespaces.
13493         (start_method): Remove DECL_CHAIN processing.
13494         * decl2.c (flag_honor_std): Declare.
13495         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
13496         (decl_namespace_list): New static global.
13497         (grok_x_components): Ignore namespaces as type contexts.
13498         (check_classfn): Expect OVERLOAD nodes.
13499         (grokfield): Remove DECL_CHAIN processing.
13500         (finish_file): Call cat_namespace_levels.
13501         (merge_functions): New function.
13502         (ambiguous_decl): Rewrite.
13503         (lookup_using_namespace): Produce tree_bindings.
13504         (qualified_lookup_using_namespace): Likewise.
13505         (set_decl_namespace, decl_namespace, current_decl_namespace,
13506         push_decl_namespace, pop_decl_namespace): New functions.
13507         (arg_lookup): New struct.
13508         (add_function, arg_assoc_namespace, arg_assoc_class,
13509         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
13510         New functions.
13511         (get_namespace_id, current_namespace_id): Remove.
13512         (do_toplevel_using_decl): Rewrite.
13513         (do_class_using_decl): Complain about namespace qualifiers.
13514         (do_using_directive): Sorry if not on namespace level.  Complain
13515         about unknown namespaces.
13516         * error.c (dump_aggr_type): Check for namespace contexts.
13517         * except.c (init_exception_processing): Push terminate into std.
13518         * friend.c (is_friend): A namespace is not a context, here.
13519         * init.c (expand_member_init): Remove DECL_CHAIN processing.
13520         (build_offset_ref): Process OVERLOAD nodes.
13521         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
13522         * lex.c (identifier_type): Loop using OVL_CHAIN.
13523         (see_typename): Set looking_for_typename to 2.
13524         (real_yylex): Likewise.
13525         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
13526         (do_scoped_id): Expect OVERLOAD nodes.
13527         Change calling convention for qualified_lookup_using_namespace.
13528         (build_lang_decl): Don't set in_namespace anymore.
13529         * method.c (typevec_size): New global.
13530         (build_overload_nested_name): Return if global_namespace.
13531         Otherwise, always expect a declaration context.
13532         (build_qualified_name): Likewise.
13533         Make sure we don't write beyond typevec_size.
13534         (build_decl_overload_real): Likewise.
13535         Allocate one extra slot for the namespace.
13536         (hack_identifier): Mark code dead.
13537         Process OVERLOAD and NAMESPACE_DECL nodes.
13538         * parse.y (program): Pop namespaces until in global namespace.
13539         (extdef): In a using-declaration, don't discard the identifier if
13540         there is no declaration.
13541         (left_curly): Ignore type contexts which are namespaces.
13542         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
13543         used as scope.
13544         * pt.c (template_class_depth): Expect types to be namespaces.
13545         (determine_specialization): Simplify by expecting OVERLOAD nodes.
13546         (push_template_decl): Push into namespace level.
13547         Reset ctx if it is a namespace.
13548         Set DECL_CONTEXT to current_namespace if not set already.
13549         Ignore real contexts that are namespaces.
13550         (mangle_class_name_for_template): Skip global_namespace.
13551         Mangle other namespaces as declarations.
13552         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
13553         (lookup_template_class): Push into namespace of context.
13554         If the context is a namespace, set it to global_namespace.
13555         Use id_context for mangling.
13556         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
13557         (tsubst_friend_function): Ignore namespace contexts.
13558         Push into namespace level.
13559         (tsubst): Handle NAMESPACE_DECL nodes.
13560         Remove DECL_CHAIN processing.
13561         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
13562         * ptree.c (print_lang_identifier): Print bindings.
13563         (lang_print_xnode): Print OVERLOAD nodes.
13564         * rtti.c (init_rtti_processing): Push type_info into std.
13565         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
13566         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
13567         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
13568         lookup_fnfields_here): Likewise.
13569         Process all nodes, instead of going through TREE_CHAIN.
13570         * sig.c (build_signature_pointer_or_reference_type): Set context
13571         to global_namespace.
13572         (build_signature_table_constructor): Expect OVERLOAD nodes.
13573         * spew.c (yylex): Save old setting of looking_for_typename.
13574         * tree.c (decl_list_length): Remove.
13575         (binding_init): New function.
13576         (count_functions): Rewrite.
13577         (is_overloaded_fn): Expect OVERLOAD nodes.
13578         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
13579         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
13580         ovl_member): New functions.
13581         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
13582         (type_unknown_p): Likewise.
13583         (require_instantiated_type): Likewise.
13584         (build_component_ref): Declare code dead.
13585         (build_x_function_call): Create and expect OVERLOAD nodes.
13586         (build_function_call_real): Check for ::main only.
13587         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
13588         (convert_for_assignment): Check for TREE_LIST before accessing
13589         TREE_VALUE.
13590         * decl.c (duplicate_decls): Check for namespace bindings instead
13591         of global bindings.
13592         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
13593         lookup_name_current_level, start_decl, xref_tag,
13594         finish_enum): Likewise.
13595         * init.c (build_offset_ref): Likewise.
13596         * search.c (lookup_field): Likewise.
13597         (lookup_fnfields): Likewise.
13598         (dfs_debug_mark): Likewise.
13599         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
13600         (poplevel_class, pop_from_top_level): Likewise.
13601         * decl2.c (finish_method): Likewise.
13602         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
13603         * decl.c (record_builtin_type): Likewise.
13604         (init_decl_processing, grokfndecl): Likewise.
13605         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
13606         (make_lang_type): Likewise.
13607         * parse.y (make_thunk): Likewise.
13608         * pt.c (tsubst): Likewise.
13609         * tree.c (debug_binfo): Likewise.
13610         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
13611         tinfo2.cc, inc/new.h: Add std qualifications.
13612         * inc/new: Wrap with namespace std if __HONOR_STD.
13613         * inc/typeinfo: Likewise.
13614
13615 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
13616
13617         * call.c (build_user_type_conversion_1): Handle second_conv
13618         properly for templates.
13619
13620 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
13621
13622         * method.c (build_decl_overload_real): Set TREE_USED flag to
13623         zero for build_type_variants nodes as well.
13624
13625 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
13626
13627         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
13628
13629 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
13630
13631         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
13632         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
13633         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
13634         xref.o): Add toplev.h dependencies.
13635
13636 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
13637
13638         * errfn.c (cp_error, cp_warning): Remove declarations for
13639         error and warning respectively.
13640
13641 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13642
13643         * error.c: Convert to using ctype macros defined in system.h.
13644         * method.c: Likewise.
13645         * xref.c: Likewise.
13646         * lex.c: Likewise.  Also remove redundant system header stuff.
13647
13648 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
13649
13650         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
13651         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
13652         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
13653         xref.c: Add include of toplev.h.
13654
13655 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
13656
13657         * tree.c (perm_manip): Also regenerate the RTL of an extern.
13658         (copy_to_permanent): Use end_temporary_allocation.
13659
13660 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
13661
13662         * init.c (expand_vec_init): The initialization of each array
13663         element is a full-expression.
13664
13665 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
13666
13667         * method.c (build_mangled_name): Add a call to build_type_variant
13668         to get the right type.
13669
13670 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
13671
13672         * Makefile.in: Add .SUFFIXES.
13673
13674         * cp-tree.def: Remove NAMESPACE_DECL.
13675
13676 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
13677
13678         * call.c (build_over_call): Do evaluate arg even if it has empty
13679         class type.
13680         * decl.c (start_function): Don't push a member function.
13681
13682 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
13683
13684         * Makefile.in (g++FAQ.info): Put -o option before input file.
13685
13686 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
13687
13688         * gxxint.texi: Add info for squangling codes K and B.
13689
13690 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
13691
13692         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
13693         the expression in templates.
13694         (finish_stmt_expr): Likewise.
13695
13696 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
13697
13698         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
13699
13700 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
13701
13702         * decl.c (maybe_push_to_top_level): Always clear
13703         current_template_parms and processing_template_decl.
13704         (pushtag): Remove check of current_class_type and some comments,
13705         since maybe_push_to_top_level no longer creates confusion.
13706
13707 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
13708
13709         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
13710         (DECL_CLASS_TEMPLATE_P): Likewise.
13711         (DECL_PRIMARY_TEMPLATE): Likewise.
13712         (PRIMARY_TEMPLATE_P): Use it.
13713         (push_template_decl_real): New function.
13714         (redeclare_class_template): Take new template parameters as
13715         input.
13716         (is_specialization_of): New function.
13717         (comp_template_args): Declare.
13718         * decl.c (pushtag): Handle friend template classes.
13719         (xref_tag): Likewise.  Use new calling convention for
13720         redeclare_class_template.
13721         * decl2.c (grok_x_components): Handle friend templates.
13722         * friend.c (is_friend): Use is_specialization_of where
13723         appropriate.  Deal with friend class templates.
13724         (make_friend_class): Let a class template be friends with itself.
13725         * pt.c (comp_template_args): Remove declaration.
13726         (tsubst_friend_class): New function.
13727         (push_template_decl_real): New function.
13728         (push_template_decl): Use it.
13729         (redeclare_class_template): Adjust for new calling convention.
13730         (comp_template_args): Give it external linkage.
13731         (instantiate_class_type): Use tsubst_friend_class to deal
13732         with friend templates.
13733         * typeck.c (comptypes): Use comp_template_args, rather than
13734         expanding it inline.
13735         * parse.y (component_decl): Handle a nested template type
13736         like other component type declarations.
13737
13738         * pt.c (check_explicit_specialization): Handle overloaded
13739         constructors correctly.
13740
13741         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
13742         (lookup_template_class): Use it.
13743
13744 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
13745
13746         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
13747         * cp-tree.h: Add WRAPPER support.
13748         * call.c (add_candidate): Split out from add_*_candidate fns.
13749         (build_over_call): Take the candidate instead of function and args.
13750         Enforce access control here.  Emit overload warnings here.
13751         (add_warning): New fn.
13752         (joust): Add WARN parm.  If not set, call add_warning instead of
13753         printing a warning.  Re-enable some warnings.
13754         (tourney): Pass it.
13755         (convert_like): Adjust.
13756         (build_new_op): Adjust.
13757         (build_new_function_call): Adjust.
13758         (build_user_type_conversion_1): Adjust.
13759         (USER_CONV_FN): Adjust.
13760         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
13761         build_int_wrapper): New fns.
13762
13763 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
13764
13765         * pt.c (unify): Fix typo in previous change.
13766
13767 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
13768
13769         * error.c (dump_type_real): Declare canonical_name.
13770
13771         * typeck.c (comp_target_types): Fix PMFs.
13772
13773 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
13774
13775         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
13776         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
13777         TEMPLATE_DECL.
13778
13779         * pt.c (tsubst): Decrease the template-level of
13780         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
13781         TEMPLATE_PARM_INDEX.
13782         (template_decl_level): New function.
13783         (unify): Make sure to record unifications for template
13784         parameters, even when the parameters exactly match the arguments.
13785         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
13786         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
13787         aren't from the level we're currently working on.
13788
13789 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
13790
13791         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
13792
13793         * decl2.c (check_member_template): Set DECL_IGNORED for member
13794         class templates, too.
13795
13796         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
13797
13798 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13799
13800         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
13801
13802 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
13803
13804         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
13805         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
13806         (init_decl_processing): Handle TI types.
13807         * typeck.c (unsigned_type, signed_type): Handle TI types.
13808
13809 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
13810
13811         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
13812         New local added_libraries.  Increment count when add library to
13813         arglist.
13814
13815 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
13816
13817         * cp-tree.h (type_as_string_real): New function.
13818         * pt.c (mangle_class_name_for_template): Use it.
13819         * error.c (dump_aggr_type): Change prototype.
13820         (dump_type_prefix): Likewise.
13821         (dump_type_suffix): Likewise.
13822         (dump_type_real): Convert from dump_type.  If desired, the
13823         "canonica" name of a typedef, i.e., the name of the underlying
13824         type, can be printed.
13825         (dump_type): Call dump_type_real.
13826
13827 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
13828
13829         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
13830
13831         * typeck.c (comp_target_types): Tweak pedantic case.
13832         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
13833         Return -1 or 1 instead of 1 or 2.
13834         (compparms): Remove STRICT handling.
13835         (convert_for_assignment): Fix handling of pmfs.
13836
13837 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
13838
13839         * typeck.c (comp_target_types): Handle references like pointers.
13840         (comp_target_parms): Note that return code from comp_target_types
13841         can be negative to indicate failure.
13842
13843 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13844
13845         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
13846         which requires a working target compiler to build.
13847
13848 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
13849
13850         * tree.c (avoid_overlap): Add prototype.
13851
13852         * spew.c (num_tokens): Add prototype.
13853         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
13854
13855         * search.c (dfs_check_overlap): Add prototype.
13856         (dfs_no_overlap_yet): Likewise.
13857
13858         * pt.c (original_template): Add prototype.
13859         (inline_needs_template_parms): Likewise.
13860         (push_inline_template_parms_recursive): Likewise.
13861         (retrieve_specialization, register_specialization): Likewise.
13862         (print_candidates, reduce_template_parm_level): Likewise.
13863         (build_template_decl, mark_template_parm): Likewise.
13864         (tsubst_friend_function, get_bindings_real): Likewise.
13865
13866         * method.c (start_squangling): Add prototype.
13867         (end_squangling, check_ktype, issue_ktype): Likewise.
13868         (build_overloaded_scope_ref, check_btype): Likewise.
13869         (build_mangled_template_parm_index): Likewise.
13870
13871         * lex.c (init_cpp_parse): Add prototype.
13872         (handle_cp_pragma, handle_sysv_pragma): Likewise.
13873         (reduce_cmp, token_cmp): Likewise.
13874
13875         * except.c (call_eh_info): Add prototype.
13876         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
13877         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
13878
13879         * decl2.c (is_namespace_ancestor): Add prototype.
13880         (namespace_ancestor, add_using_namespace): Likewise.
13881         (ambiguous_decl): Likewise.
13882
13883         * decl.c (indent): Add prototype.
13884
13885         * call.c (add_template_candidate_real): Add prototype.
13886
13887 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
13888
13889         * decl2.c (build_expr_from_tree): Just return a PMF.
13890
13891 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
13892
13893         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
13894         when doing initializations.
13895
13896         * pt.c (unify): Use comptypes to compare type args.
13897
13898 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
13899
13900         * decl.c (duplicate_decls): Fix check for when it's safe to free
13901         the new decl.
13902
13903         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
13904         to type_as_string.
13905
13906 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
13907
13908         * pt.c (build_template_parm_index): Add prototype.
13909
13910         * search.c (my_tree_cons): Don't clear words outside the
13911         newly allocated node.
13912
13913 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
13914
13915         * lex.c (init_parse): Now returns char* containing the filename.
13916
13917 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
13918                           Jeff Law   <law@cygnus.com>
13919
13920         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
13921         than a pointer.
13922
13923 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13924
13925         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
13926
13927 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13928
13929         * decl.c (duplicate_decls): Don't warn for redundant decls if
13930         friend: let add_friend take care of it.
13931
13932 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
13933
13934         * sig.c (build_signature_pointer_constructor): Don't set
13935         TREE_HAS_CONSTRUCTOR for a signature pointer.
13936         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
13937         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
13938         here, too.
13939         * typeck.c (build_unary_op): Only allow taking the address of a
13940         real constructor.
13941         * typeck2.c (digest_init): Simplify.
13942         (store_init_value): Don't pedwarn about using { } for pmfs.
13943
13944 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
13945
13946         * cp-tree.h (start_decl):  Update prototype.
13947         * decl.c (start_decl):  Like the C version, new parameters
13948         for the attributes.  Call cplus_decl_attributes here,
13949         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
13950         (grokdeclarator):  Pass NULL for new start_decl arguments.
13951         * pt.c (tsubst_expr):  Likewise.
13952         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
13953         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
13954         * lex.c (build_lang_decl): Add lang_name_java.
13955         * class.c (push_lang_context): Add lang_name_java.
13956         * method.c (build_mangled_name): Check for is_java_type.
13957
13958 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13959
13960         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
13961         * call.c (build_scoped_method_call): Check for TREE_CODE for
13962         VOID_TYPE instead of type ==  void_type_node.
13963         (build_method_call): Likewise.
13964         * decl.c (lookup_name_real): Likewise.
13965         (grokdeclarator): Likewise.
13966         (start_decl): Likewise.
13967         (grokparms): Likewise.
13968         (start_function): Likewise.
13969         (finish_function): Likewise.
13970         (start_method): Likewise.
13971
13972 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
13973
13974         * lex.c (finput): New variable.
13975         (init_cpp_parse):  Renamed from init_parse.
13976         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
13977         (finish_parse): New function.
13978         * cp-tree.h (init_lex, init_parse): Remove declarations.
13979
13980 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
13981
13982         * call.c (build_call): Still evaluate the actual argument.
13983         * class.c (is_empty_class): Update for -fnew-abi.
13984
13985         * decl2.c: -fnew-abi implies -fsquangle.
13986
13987         * method.c (do_build_assign_ref): Don't do anything to copy
13988         an empty class.
13989         (do_build_copy_constructor): Likewise.
13990         * call.c (build_over_call): Likewise.
13991
13992 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
13993
13994         * tree.c (avoid_overlap): Return a value.
13995
13996 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
13997
13998         * method.c (check_btype): Add missing argument to xrealloc.
13999         (check_ktype): Likewise.
14000
14001 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
14002
14003         Implement empty base optimization.
14004         * class.c (finish_struct_1): Add vbase fields earlier.  Set
14005         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
14006         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
14007         (types_overlap_p): New fn.
14008         * tree.c (avoid_overlap): New fn.
14009         (build_base_fields): Use it to avoid overlapping empty bases.
14010         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
14011
14012         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
14013
14014         Re-implement allocation of base class subobjects.
14015         * tree.c (unshare_base_binfos): New fn.
14016         (layout_basetypes): Use it.  Now handles offsets of both virtual and
14017         non-virtual bases, after layout_type.
14018         (layout_vbasetypes): Remove.
14019         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
14020         (build_vbase_pointer_fields): Split out from old layout_basetypes.
14021         * class.c (finish_base_struct): Lose offset handling code.
14022         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
14023         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
14024         * cp-tree.h: Adjust.
14025
14026 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
14027
14028         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
14029         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
14030         * class.c (duplicate_tag_error): Likewise.
14031         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
14032         * tree.c (layout_vbasetypes): Update from layout_record, remove
14033         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
14034         (layout_basetypes): Likewise.
14035
14036 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
14037
14038         * class.c, Make sure system.h is included just after config.h.
14039         Delete lingering stdio and errno references too.
14040         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
14041
14042 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
14043
14044         * friend.c (is_friend): Fix access control for local classes.
14045
14046         * class.c (is_empty_class): New fn.
14047         * call.c (build_call): Don't pass empty class objects to a function.
14048
14049 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
14050
14051         * call.c (build_over_call): Do name resolution for default
14052         arguments of function templates in the scope of the templates.
14053
14054 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
14055
14056         * call.c: Include system.h.  Remove includes, declarations and
14057         defines provided by system.h.
14058         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
14059         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
14060         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
14061         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
14062         * typeck2.c, xref.c: Likewise.
14063         * Makefile.in: Dependencies updated as appropriate.
14064         * Make-lang.in: Likewise.
14065
14066 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
14067
14068         * pt.c (fn_type_unification): Allow incomplete unification without
14069         an immediate error message.
14070
14071 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
14072
14073         * tree.c (member_p): New fn.
14074         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
14075         initializing class members.
14076
14077         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
14078         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
14079
14080         * call.c (build_method_call): Handle non-scoped destructors, too.
14081         * pt.c (tsubst_copy): Likewise.
14082
14083         * pt.c (print_template_context): Split out...
14084         (push_tinst_level): ...from here.
14085
14086         * friend.c (is_friend): Don't pass a type to decl_function_context.
14087
14088         * typeck.c (convert_for_initialization): Always hand off
14089         conversions to class type.
14090
14091 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
14092
14093         * friend.c (is_friend): Local classes have the same access as the
14094         enclosing function.
14095
14096 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
14097
14098         * typeck.c (expand_target_expr): Delete dead function.
14099
14100         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
14101
14102         * repo.c (save_string): Delete dead function.
14103
14104         * method.c (thunk_printable_name): Delete dead function.
14105
14106         * lex.c (yynextch): Delete dead function.
14107
14108         * expr.c (tree_extract_aggr_init): #if 0 out.
14109
14110         * except.c (do_unwind): Delete dead function.
14111         (easy_expand_asm): Likewise.
14112
14113         * cvt.c (build_conversion_type_1): Delete dead function.
14114
14115         * cp-tree.h (push_expression_obstack): Declare.
14116
14117         * call.c (source_type): #if 0 out.
14118
14119         * class.c (alter_access): Remove unused label.  Add braces
14120         around empty else clause.
14121
14122         * lex.c (yyprint): Fix argument to printf.
14123
14124 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
14125
14126         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
14127
14128         * pt.c (instantiate_class_template): Make sure template
14129         arguments are permanent.
14130         * init.c (resolve_offset_ref): Don't go looking around in
14131         template types.
14132
14133         * semantics.c: Add routines to handle expressions, and some
14134         declaration processing.
14135         * parse.y: Use them.
14136         (current_class_depth): Move declaration to cp-tree.h.
14137         * parse.c: Regenerated.
14138         * cp-tree.h: Use them.
14139         (current_class_depth): Declare.
14140         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
14141
14142 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
14143
14144         * error.c (dump_decl): Be a bit more explicit with template
14145         type arguments, when verbose.
14146
14147 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
14148
14149         * inc/exception: Reorder closing braces.
14150
14151 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
14152
14153         * pt.c (redeclare_class_template): New function.
14154         * cp_tree.h (redeclare_class_template): Declare it.
14155         * decl.c (xref_tag): Use it.
14156
14157 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
14158
14159         * call.c (build_over_call): Check IS_AGGR_TYPE, not
14160         TYPE_LANG_SPECIFIC.
14161         * typeck.c (convert_arguments): Likewise.
14162
14163         * decl.c (grokdeclarator): Remove const and volatile from type after
14164         setting constp and volatilep.
14165
14166         * class.c (finish_struct_1): Don't warn about bool bitfield larger
14167         than one bit.
14168
14169 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
14170
14171         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
14172
14173 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
14174
14175         * call.c (build_object_call): Complain about ambiguous operator(),
14176         rather that crashing.
14177         (build_new_op): Likewise.
14178         (build_op_delete_call): Likewise.
14179
14180 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
14181
14182         * cvt.c (perform_qualification_conversions): Use comp_target_types
14183         instead of comp_ptr_ttypes.
14184
14185 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
14186
14187         * cp-tree.h (enforce_access): Declare.
14188         * call.c (enforce_access): Make it extern, not static.
14189         * class.c (alter_access): Use enforce_access; modify code for ISO
14190         compliance, rather than ARM rules.
14191
14192 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14193
14194         * cp-tree.h: Fix typo.
14195
14196 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
14197
14198         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
14199         if (aggregate_value_p (type)).
14200
14201         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
14202
14203 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
14204
14205         * tree.c (mapcar): When dealing with a DECL, use it's constant
14206         value, if any.
14207         * pt.c (lookup_template_class): Don't mangle the names of template
14208         classes whose arguments are unknown.
14209
14210         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
14211
14212 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
14213
14214         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
14215
14216 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
14217
14218         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
14219         boolean_type_node to 1.
14220
14221 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
14222
14223         * error.c (dump_expr): Remove unused variable `l'.
14224
14225         * pt.c (for_each_template_parm): New function, created by
14226         converting uses_template_parms.
14227         (tree_fn_t): New typedef.
14228         (uses_template_parms): Use it.
14229         (mark_template_parm): New function.
14230         (push_template_decl): Check that the argument list of a partial
14231         specialization uses all the template parameters.
14232
14233         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
14234         with it; we might want it for debugging.
14235         * cp-tree.h (type_unification): Change interface.
14236         * class.c (finish_struct_1): Skip nested template types, just like
14237         ordinary nested types.
14238         (instantiate_type): Use new interface to type_unification.
14239         * lex.c (init_lex): Add __sz as opname for sizeof.
14240         * method.c (build_overload_scope_ref): New function.
14241         (build_overload_int): Handle complex expressions.  Set
14242         numeric_output_need_bar if necessary.
14243         (build_overload_value): Handle non-PARM_DECL nodes; this
14244         routine is now used by build_overload_int.  Remove some
14245         assignments to numeric_output_need_bar.  Use
14246         build_overload_scope_ref.
14247         (build_qualified_name): Note that some template mangled names end
14248         with digits, and set numeric_output_need_bar appropriately.  Use
14249         build_underscore_int.
14250         * pt.c (unify): Change interface.
14251         (type_unification_real): Likewise.
14252         (determine_specialization): Use new interfaces.
14253         (tsubst): Deal gracefully with situations in which the argument
14254         vector is not fully filled.
14255         (fn_type_unification): Use new interfaces.
14256         (type_unification): Likewise.  Remove NOP_EXPR hack.
14257         (type_unification_real): Likewise.
14258         (unify): Likewise.  Deal with unification of complex expressions.
14259
14260 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
14261
14262         * pt.c (complete_template_args): Initialize skip properly.
14263
14264         * decl.c (make_typename_type): Revert.
14265         (make_implicit_typename): Remove.
14266         (lookup_name_real): Don't call it.  Call lookup_field if we see a
14267         TYPE_DECL from a template base.
14268         * search.c (lookup_field): Do implicit typename stuff.
14269
14270 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
14271                           Geoff Noer    <noer@cygnus.com>
14272
14273         * Makefile.in: Various fixes for building cygwin32 native toolchains.
14274         * Make-lang.in: Likewise.
14275
14276 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14277
14278         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
14279
14280 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
14281
14282         * decl.c (make_implicit_typename): Rewrite removed code.
14283         (make_typename_type): Call it if the type we look up comes from
14284         a base that uses template parms.
14285
14286         * pt.c (complete_template_args): Rewrite.
14287         (tsubst, FUNCTION_DECL): Use it.
14288
14289 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
14290
14291         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
14292         c_expand_asm_operands () if output_operands, input_operands or
14293         clobbers is not NULL_TREE.
14294
14295 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14296
14297         * pt.c (complete_template_args): New function.
14298         (get_bindings): Deal with specializations of function templates
14299         with return type containing parameters from outer class
14300         templates.
14301         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
14302         substitute arguments and compose a new type.
14303
14304 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
14305
14306         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
14307         FUNCTION_DECLs.
14308
14309 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
14310
14311         * decl.c (make_implicit_typename): Lose useless code.
14312
14313         * call.c (standard_conversion): Handle A* -> const A* properly.
14314
14315         * pt.c (get_bindings_real): Rename from get_bindings.  Add
14316         check_rettype parm.
14317         (get_bindings): Pass 1.
14318         (get_bindings_overload): Pass 0.
14319
14320 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
14321
14322         * pt.c (check_explicit_specialization): When reverting a static
14323         member function, also remove the `this' parameter from
14324         last_function_parms.
14325
14326 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
14327
14328         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
14329         a function context.
14330
14331         * decl.c (store_bindings): Use free_binding_vecs.
14332         (pop_from_top_level): Likewise.
14333
14334 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
14335
14336         * decl.c (make_implicit_typename): Only change the type of a
14337         TYPENAME_TYPE.
14338
14339 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
14340
14341         * semantics.c: New file, containing routines to perform the
14342         semantic phase of parsing.
14343         * parse.y: Use it.
14344         * pt.c (tsubst_expr): Likewise.
14345         * cp-tree.h: Declare the various functions in semantics.c.
14346         Provide macros to access _STMT tree nodes.
14347         * cp-tree.def: Add ASM_STMT tree node.
14348         * Makefile.in, Make-lang.in: Add dependencies on and for
14349         semantics.c.
14350
14351 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
14352
14353         * pt.c (push_template_decl): Only check primary templates.
14354
14355         * pt.c (check_explicit_specialization): Complain about default args
14356         in explicit specialization.
14357
14358         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
14359         constructor_declarator.
14360
14361 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
14362
14363         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
14364         has no overloaded operator ->.
14365
14366         * call.c (build_field_call): Don't crash when presented with a
14367         field that is actually a nested type.
14368
14369         * decl.c (pushtag): Deal with friend class injection in local
14370         classes.
14371
14372         * call.c (build_object_call): Don't crash if OBJ is a
14373         pointer-to-member-function.
14374
14375 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
14376
14377         * pt.c (push_template_decl): Complain about template with C linkage,
14378         anonymous template class.
14379
14380 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
14381
14382         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
14383         * search.c: Likewise.
14384
14385         * lex.c (do_pending_defargs): Only call
14386         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
14387
14388         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
14389
14390 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
14391
14392         * parse.y: Deal with CONSTRUCTORS in new_initializers.
14393
14394 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
14395
14396         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
14397         closely mimics the behavior in parse.y.
14398         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
14399         into a compound statement.
14400
14401 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
14402
14403         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
14404         * pt.c (inline_needs_template_parms): New fn.
14405         (original_template): New fn.
14406         (push_inline_template_parms_recursive): New fn.
14407         (maybe_begin_member_template_processing): Use them.
14408         (maybe_end_member_template_processing): Likewise.
14409         (is_member_or_friend_template): Rename to is_member_template.
14410         Member functions of local classes are never member templates.
14411
14412 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14413
14414         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
14415         added in the class scope to catch redefinition error.
14416
14417         * pt.c (reduce_template_parm_level): Also copy
14418         the DECL_TEMPLATE_PARMS field.
14419
14420 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
14421
14422         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
14423         reduced-level template type parameter.
14424
14425 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14426
14427         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
14428         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
14429         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
14430         * decl.c (duplicate_decls): Propagate it.
14431         * typeck2.c (abstract_virtuals_error): Use two loops to emit
14432         abstract virtual functions and virtual functions which need a
14433         final overrider separately.
14434
14435 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14436
14437         * lang-specs.h: Properly put brackets around array elements in
14438         initializer.
14439
14440         * typeck.c (build_binary_op_nodefault): Correctly place parens around
14441         && and || in expression.
14442
14443 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14444
14445         * call.c (default_parm_conversions): Remove prototype definition.
14446         (build_method_call): Remove unused variable result.
14447
14448         * cvt.c (ocp_convert): Remove unused variable conversion.
14449
14450         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
14451
14452         * except.c (do_unwind): #if 0 definition of unused variables fcall
14453         and next_pc.
14454
14455         * expr.c (extract_scalar_init): #if 0 prototype and function
14456         definition.
14457
14458         * init.c (expand_aggr_init_1): Remove unused variable init_type.
14459         (build_new_1): Remove unused variable t.
14460
14461         * pt.c (instantiate_class_template): Remove unused variable newtag;
14462         cast called function return value to void.
14463         (do_decl_instantiation): Remove unused variables name and fn.
14464
14465         * tree.c (get_type_decl): Add default return to shut up compiler from
14466         complaining control reaches end of non-void function.
14467
14468         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
14469
14470 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14471
14472         * call.c (default_parm_conversions): Remove prototype definition.
14473         (build_method_call): Remove unused variable result.
14474         (build_over_call): Add default case in enumeration switch.
14475
14476 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14477
14478         * decl2.c (lang_decode_option): Change j's type to size_t.
14479
14480         * tree.c (layout_vbasetypes): record_align and desired_align are of
14481         type unsigned int; const_size and nonvirtual_const_size likewise.
14482
14483 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
14484
14485         * parse.y (new_initializer): Make sure all initializers are
14486         lists.
14487
14488 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
14489
14490         * decl2.c (import_export_decl): Mark tinfo functions for
14491         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
14492
14493 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
14494
14495         * method.c: Fix typo.
14496
14497 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14498
14499         * method.c: Include "system.h" to get stdlib.h, stdio.h,
14500         ctype.h, string.h, etc.
14501         (issue_nrepeats): Add default case in enumeration switch.
14502         (check_btype): Likewise.
14503         (process_overload_item): Likewise.
14504
14505         * Makefile.in (method.o): Depend on system.h.
14506
14507 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14508
14509         * lex.c (do_scoped_id): Fix parenthesizing.
14510
14511 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
14512
14513         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
14514         FLAG_RTTI is unset, initialize type info machinery and continue
14515         with FLAG_RTTI enabled.
14516         (get_typeid): Likewise.
14517
14518 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
14519
14520         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
14521         from B.
14522
14523 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
14524
14525         * pt.c (finish_member_template_decl): Deal more gracefully with
14526         invalid declarations.
14527
14528 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
14529
14530         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
14531         cp-tree.h: Clean up more old overloading code, old RTTI code, and
14532         some formatting quirks.
14533
14534         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
14535         method.c, pt.c, ptree.c, typeck.c: Remove support for
14536         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
14537         * class.h: Remove.
14538         * Makefile.in: Adjust.
14539
14540         * pt.c (unify): Don't allow reduced cv-quals when strict.
14541
14542         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
14543         *type_unification* and unify.
14544
14545 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
14546
14547         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
14548         (nested_name_specifier): And add it before this use.
14549         (typename_sub0): And this use.  Also add use without the keyword.
14550         (typename_sub1): Likewise.
14551         * pt.c (instantiate_class_template): Don't actually instantiate
14552         anything if our type uses template parms.
14553
14554 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
14555
14556         * decl.c (start_function): Don't call temporary_allocation for a
14557         nested function.
14558
14559 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
14560
14561         * pt.c (instantiate_class_template): Don't mess with friends if
14562         our type uses template parms.
14563
14564 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
14565
14566         * parse.y (nested_name_specifier): Use explicit_template_type.
14567         (typename_sub): Allow a template_type, an explicit_template_type,
14568         or an implicit template type at the end.
14569         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
14570         * decl.c (make_typename_type): Handle template-id where the name
14571         is a TEMPLATE_DECL.
14572         * call.c (build_scoped_method_call): Handle member template
14573         destructor call.
14574         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
14575         destructor is represented by the type.
14576
14577         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
14578         * parse.y (nested_name_specifier): Add 'template' case.
14579         (explicit_template_type): New rule.
14580         (typename_sub): Use it.
14581         * decl.c (make_typename_type): Handle getting a template-id for NAME.
14582         * pt.c (tsubst): Likewise.
14583
14584 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
14585
14586         * pt.c (add_to_template_args): Fix thinko.
14587         (instantiate_class_template): Call it later.
14588
14589         * pt.c (get_class_bindings): Add outer_args parm.
14590         (most_specialized_class): Likewise.
14591         (instantiate_class_template): Pass it.
14592         (more_specialized_class): Likewise.
14593         (lookup_template_class): Get context from template if none
14594         was specified.
14595         (finish_member_template_decl): Don't do anything with a
14596         partial specialization.
14597         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
14598         AGGREGATE_TYPE_P.
14599         * class.c (finish_struct): Member class templates have already been
14600         checked for name clashes.
14601         * decl.c (pushdecl_with_scope): Handle pushing at class level.
14602
14603 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
14604
14605         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
14606         (tsubst, *_PARM): Support multiple levels of template classes.
14607         (instantiate_class_template): Look up the pattern from the
14608         original template.
14609         (lookup_template_class): Handle getting a template for d1.
14610         (push_template_decl): Correct setting of 'primary'.
14611         (reduce_template_parm_level): Add 'levels' parm.
14612         (finish_member_template_decl): Support member class templates.
14613         (template_class_depth): Handle multiple levels.
14614         * parse.y (component_decl_1, fn.def2): Remove member template case.
14615         (component_decl): Add member template cases.
14616         * decl2.c (check_member_template): We now handle member template
14617         classes.
14618         * decl.c (pushtag): Handle member templates.
14619         * method.c (do_inline_function_hair): Don't touch
14620         IDENTIFIER_GLOBAL_VALUE.
14621         * init.c (build_offset_ref): If name isn't an identifier, just
14622         return it.
14623         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
14624
14625         * typeck.c (get_delta_difference): Do adjust for conversions to
14626         and from virtual base.
14627
14628 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
14629
14630         * typeck.c (get_delta_difference): Give hard error for conversion
14631         from virtual base.
14632
14633         * cp-tree.h: Tweak formatting.
14634
14635 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
14636
14637         * decl.c (push_namespace): Handle redeclaration error.
14638
14639         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
14640         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
14641         (NAMESPACE_BINDING): New macro.
14642         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
14643         * *.c: Use them.
14644
14645         * pt.c (push_template_decl): Use innermost_args.
14646
14647         * decl.c (get_unique_name): Tweak from earlier in the name.
14648
14649 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
14650
14651         * cp-tree.def: Add CPLUS_BINDING node.
14652         * cp-tree.h (tree_binding): New struct.
14653         (BINDING_SCOPE, BINDING_VALUE): New macros.
14654         (current_namespace, global_namespace): Declare extern.
14655         (struct lang_decl_flags): New field in_namespace.
14656         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
14657         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
14658         (TREE_INDIRECT_USING): New macro.
14659         * decl2.c (current_namespace, global_namespace): Declare.  The
14660         value is a NAMESPACE_DECL now, not a TREE_LIST.
14661         (is_namespace_ancestor, namespace_ancestor): New static functions.
14662         (add_using_namespace, ambiguous_decl): Likewise.
14663         (lookup_using_namespace): New support function for lookup_name.
14664         (qualified_lookup_using_namespace): New support function for
14665         do_scoped_id and lookup_namespace_name.
14666         (get_namespace_id): Mark as obsolete.
14667         (current_namespace_id): Likewise.
14668         (do_namespace_alias): Implement.
14669         (do_using_directive): Implement as call to add_using_namespace.
14670         * decl.c (binding_for_name): New function.
14671         (push_namespace, pop_namespace): Implement.
14672         (push_decl): Don't install a FUNCTION_DECL in the global branch.
14673         (lookup_namespace_name): Implement using qualified lookup.
14674         (lookup_name_real): For global scoping, lookup in
14675         global_namespace.  For namespace scoping, lookup in given
14676         namespace.  For unscoped lookup, iterate over namespace,
14677         considering using directives.
14678         (init_decl_processing): Initialize global_namespace.
14679         (grokvardecl): Build assembler name as static name for globals.
14680         (grokdeclarator): Remove old namespace mangling.
14681         (xref_tag): When installing a global binding for the
14682         tag, make sure we have an identifier.
14683         * method.c (build_overload_nested_name): Mangle namespaces.
14684         (build_qualified_name): Likewise.
14685         (build_decl_overload_real): Likewise.
14686         * lex.c (build_lang_decl): Set namespace for new declaration to
14687         current_namespace.
14688         (do_scoped_id): Find global names in global or current
14689         namespace, or using qualified namespace lookup, depending on
14690         context.
14691         * init.c (build_member_call): When scope is namespace, use
14692         build_x_function_call instead.
14693         (build_offset_ref): When scope is namespace, collapse processing
14694         to lookup_namespace_name instead.
14695         * error.c (dump_decl): Support NAMESPACE_DECL.
14696         * decl.c (pushdecl): Bind globals to current namespace.
14697         (push_overloaded_decl): Likewise.
14698         (lookup_tag): Likewise.
14699         (lookup_name_current_level): Likewise.
14700         (xref_tag): Likewise.
14701         (start_function): Likewise.
14702         * lex.c (do_identifier): Likewise.
14703         (identifier_typedecl_value): Likewise.
14704         (real_yylex): Likewise.
14705         * method.c (do_inline_function_hair): Likewise.
14706         * parse.y (unscoped): Likewise.
14707         * pt.c (check_explicit_specialization): Likewise.
14708         (lookup_template_class): Likewise.
14709         * rtti.c (call_void_fn): Likewise.
14710         * sig.c (build_sigtable): Likewise.
14711         * ptree.c (lang_print_xnode): New function.
14712
14713 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
14714
14715         * pt.c (instantiate_class_template): Don't instantiate if pedantic
14716         and the args use template parms.
14717
14718         * pt.c (push_tinst_level): If the instantiation uses template parms,
14719         fail silently.
14720         * decl.c (xref_basetypes): Do call complete_type for basetypes
14721         that involve template parameters.
14722
14723 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
14724
14725         * typeck2.c (process_init_constructor): Fix labeled init check.
14726
14727 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
14728
14729         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
14730         argument to tsubst and friends.
14731
14732         * pt.c (tsubst, FUNCTION_DECL): Tidy.
14733
14734         * typeck.c (build_x_function_call): Handle static member function
14735         templates like non-templates.  Handle friend templates like normal
14736         function templates.
14737         * pt.c (tsubst, *_PARM): Don't use orig_level.
14738         (get_bindings): Don't call add_to_template_args.
14739         (instantiate_template): Likewise.
14740         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
14741         * ptree.c (print_lang_type): Print index/level for template parms.
14742
14743 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
14744
14745         * Make-lang.in (cc1plus): Note that cc1plus depends on
14746         cp/cp-tree.h and cp/cp-tree.def.
14747
14748         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
14749         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
14750         position in a template parameter list.
14751         * cp-tree.h (template_parm_index): New structure, used as the tree
14752         structure for a TEMPLATE_PARM_INDEX.
14753         (TEMPLATE_PARM_IDX): New macro.
14754         (TEMPLATE_PARM_LEVEL): Likewise.
14755         (TEMPLATE_PARM_DESCENDANTS): Likewise.
14756         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
14757         (TEMPLATE_PARM_DECL): Likewise.
14758         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
14759         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
14760         (TEMPLATE_TYPE_DECL): Likewise.
14761         (TEMPLATE_CONST_IDX): Remove.
14762         (TEMPLATE_CONST_LEVEL): Likewise.
14763         (TEMPLATE_CONST_SET_INFO): Likewise.
14764         (TEMPLATE_TYPE_SET_INFO): Likewise.
14765         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
14766         node.
14767         (TEMPLATE_TYPE_LEVEL): Likewise.
14768         * decl.c (decls_match): Call comp_template_parms, rather than
14769         expanding it inline.
14770         (duplicate_decls): If two template declarations are being merged,
14771         then their TEMPLATE_INFOs should be merged as well.
14772         (grokfndecl): Save template-id information when declaring a friend
14773         with explicit template arguments.  Pass arguments to
14774         check_explicit_specialization via correct convention; at some
14775         point check_explicit_specialization changed, but these call-sites
14776         did not.
14777         (grokdeclarator): Tidy up slightly.
14778         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
14779         two template functions with the same DECL_ASSEMBLER_NAME the same,
14780         since the names are not yet mangled.
14781         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
14782         TEMPLATE_CONST_PARM.
14783         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
14784         decl for a non-type parameter, rather than printing `<tparm ...>'.
14785         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
14786         (do_friend): Deal with template friends.
14787         * lex.c (do_pending_inlines): Call
14788         maybe_begin_member_template_processing, rather than
14789         conditionally calling begin_member_template_processing.
14790         (process_next_inline): Likewise.  Call
14791         maybe_end_member_template_processing, rather than
14792         conditionally calling end_member_template_processing.
14793         (do_pending_defargs): Likewise.
14794         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
14795         TEMPLATE_CONST_PARM.
14796         * method.c (build_mangled_template_parm_index): New function.
14797         (build_overload_value): Use it.
14798         (build_overload_name): Likewise.
14799         * pt.c (finish_member_template_decl): Allow friend declarations.
14800         (template_class_depth): New function.
14801         (is_member_template): Rename, and modify, to become...
14802         (is_member_or_friend_template): New function.
14803         (end_member_template_processing): Rename, and modify, to become...
14804         (maybe_end_member_template_processing).
14805         (build_template_parm_index): New function.
14806         (reduce_template_parm_level): New function.
14807         (process_template_parm): Modify to use build_template_parm_index.
14808         (push_template_decl): Deal with friend templates.
14809         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
14810         TEMPLATE_CONST_PARM.
14811         (tsubst_friend_function): New function.
14812         (instantiate_class_template): Generate the DECL_FRIENDLIST
14813         for a new instantiation by using tsubst_friend_function rather
14814         than just tsubst.
14815         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
14816         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
14817         appropriate new macros.  Use reduce_template_parm_level to
14818         generate lower-level template parameters.  Handle tsubst'ing into
14819         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
14820         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
14821         templates.  Similarly for the template parameters for a new
14822         template.
14823         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
14824         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
14825         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
14826         (get_bindings): Call add_to_template_args if necessary.
14827         (instantiate_decl): Handle instantiations of friend templates.
14828         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
14829         TEMPLATE_TYPE_PARM as a list of fields; it's not!
14830         * spew.c (yylex): Do a little manual constant propagation to
14831         clarify the code.
14832
14833 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
14834
14835         * error.c: Include sys/types.h.
14836
14837 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
14838
14839         * method.c (build_mangled_name): Start CPP directives in column zero.
14840
14841 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
14842
14843         * typeck2.c (process_init_constructor): Sorry about non-trivial
14844         labeled initializers.
14845         * parse.y (initlist): Re-enable labeled initializers.
14846
14847 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14848
14849         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
14850         all callers changed.  Rely on the new parameter instead of arg
14851         being a TREE_LIST when determine whether we are working inside
14852         template template parameter.  Clean up is_type test.
14853
14854 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
14855
14856         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
14857         * typeck2.c (initializer_constant_valid_p): Allow conversions
14858         between pointers and references.
14859
14860 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
14861
14862         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
14863         if pedantic || warn_pointer_arith.
14864
14865 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14866
14867         * pt.c (unify): Handle TEMPLATE_DECL.
14868
14869 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
14870
14871         * cp-tree.h (strip_attrs): Remove decl.
14872
14873 1998-02-18  Doug Evans  <devans@cygnus.com>
14874
14875         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
14876         Update olddecl's attributes too.
14877         (strip_attrs): Remove function.
14878         * typeck.c (common_type): Call merge_machine_type_attributes.
14879
14880 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
14881
14882         * parse.y (initdcl0_innards): New grammar symbol.
14883         (nomods_initdecls, nomods_initdcl0): Change type from itype to
14884         none, since the resulting value is never used.
14885         (parse_decl): New function.
14886         (datadef): Remove redundant actions.
14887         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
14888         * parse.c: Regenerated.
14889
14890 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
14891
14892         * parse.y (simple_stmt): Use getdecls() to check for decl.
14893
14894 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14895
14896         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
14897         macros.
14898         (c++.install-common): Install c++filt properly as native or as cross
14899         variant.
14900         (c++.uninstall): Add c++filt.
14901
14902 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
14903
14904         * call.c (standard_conversion): Fix multi-level ptr conversions.
14905
14906 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
14907
14908         * init.c (build_new): Propagate error_mark_node up.
14909
14910 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
14911
14912         * parse.y (simple_stmt): If the condition isn't a declaration,
14913         start the controlled block after the test.
14914
14915 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14916
14917         * call.c (build_over_call): Convert builtin abs, labs and fabs to
14918         tree-codes.
14919         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
14920         builtins.
14921
14922 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
14923
14924         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
14925
14926 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
14927
14928         * cp-tree.h: Add access_protected_virtual_node.
14929         * class.c (init_class_processing): Initialize it.
14930         * decl.c (xref_basetypes): Use it.
14931         * parse.y (base_class_access_list): Likewise.
14932
14933         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
14934         (c++.install-common): Install c++filt.
14935
14936 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14937
14938         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
14939
14940 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
14941
14942         * call.c (reference_binding): Use comptypes when comparing
14943         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
14944
14945 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
14946
14947         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
14948         (really_overloaded_fn): Move check here from is_overloaded_fn.
14949         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
14950
14951 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
14952
14953         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
14954         conversions.
14955
14956 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
14957
14958         * cp-tree.h (push_template_decl): Return the decl passed in, or an
14959         equivalent duplicate.
14960         * decl.c (pushtag): Use the return value from push_template_decl.
14961         (duplicate_decls): When duplicating a template declaration, merge
14962         the DECL_TEMPLATE_RESULTs as well.
14963         (make_implicit_typename): Don't try to dive into typename types to
14964         find a context for making a new implicit typename.
14965         (start_decl): Use the return value from push_template_decl.
14966         (grokdeclarator): Complain about declarations list `const operator
14967         int'.  Since we don't correctly handle in-class initializations of
14968         non-static data members, complain about this (now illegal)
14969         practice.  Issue an error for initializations of non-const statics
14970         since that is illegal as well, and since we don't handle that case
14971         correctly either.
14972         (start_function): Use the return value from push_template_decl.
14973         (start_method): Likewise.
14974         * decl2.c (grokfield): Likewise.  Since the change to
14975         grokdeclarator ensures that all initialized fields are in fact
14976         static, remove a redundant test for TREE_PUBLIC.
14977         * parse.y (initlist): Disable labeled initializers since they do
14978         not work as per the documentation, and since they do not use the
14979         same syntax as the C front end.
14980         * pt.c (push_template_decl): Return the decl passed in, or an
14981         equivalent duplicate.
14982         (lookup_template_class): When searching in a nested context,
14983         use the right arguments.
14984         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
14985         * typeck.c (build_component_ref): Assign the correct type to the
14986         result of build_vfn_ref.
14987
14988 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
14989
14990         * pt.c (convert_nontype_argument): Fix typo.
14991         (check_explicit_specialization): Allow old-style specialization
14992         of class template members.
14993
14994 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
14995                           Manfred Hollstein  <manfred@s-direktnet.de>
14996
14997         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
14998         when deciding to override DECL_ASSEMBLER_NAME.
14999
15000 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
15001
15002         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
15003         * cp-tree.h (flag_do_squangling): Add declaration.
15004         * lang-options.h: Add -fsquangle and -fno-squangle.
15005         * method.c: Add macros and static variables for squangling.
15006         (build_overload_name): Rename to build_mangled_name, add logic for B
15007         compression, and split into process_modifiers and
15008         process_overload_item.
15009         (process_modifiers): New function, to handle constant, reference,
15010         and pointer types.
15011         (process_overload_item): New function, handles issue of type codes.
15012         (build_overload_name): New function, start squangling and call
15013         build_mangled_name.
15014         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
15015         (start_squangling): New function to initialize squangling structs.
15016         (end_squangling): New function to destroy squangling structs.
15017         (nrepeats): Rename variable to Nrepeats.
15018         (issue_nrepeats): New function for issuing 'n' type repeats.
15019         (check_ktype): New function to check for type K name compression.
15020         (build_overload_nested_name): Add a check for K name compression.
15021         (build_qualified_name): Add a check for K name compression and don't
15022         use DECL_ASSEMBLER_NAME when squangling is on.
15023         (check_btype): New function, checks for B type compression.
15024         (build_static_name, build_decl_overload_real): Initiate squangling.
15025         (build_typename_overload, build_overload_with_type): Initiate
15026         squangling
15027
15028 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
15029
15030         * method.c (make_thunk): Avoid name buffer overflow.
15031
15032 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
15033
15034         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
15035         don't define them yet.
15036
15037         * parse.y (nomods_initdcl0): Add constructor_declarator case.
15038
15039 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15040
15041         * config-lang.in (diff_excludes): Use basename only.
15042
15043 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
15044
15045         * tinfo2.cc: Add tinfo for signed char.
15046
15047 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
15048
15049         * search.c (compute_access): Handle protected constructors in derived
15050         classes as accessible.
15051
15052 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
15053
15054         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
15055         Call convert_from_reference sooner.
15056
15057 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
15058
15059         * cvt.c (ocp_convert): Obtain the constant values from constant
15060         decls even if the destination type is the same as the type of the
15061         decl.
15062
15063         * decl2.c (finish_file): Make sure that static inlines with
15064         definitions are not marked DECL_EXTERNAL before returning.
15065
15066 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
15067
15068         * decl.c: Lose arg_looking_for_template.
15069         (lookup_name_real): Likewise.
15070         * parse.y: Lose processing_template_arg, template_arg1.
15071         (primary): Likewise.
15072         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
15073
15074 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15075
15076         * error.c (dump_decl): Fix type of default arguments for template
15077         template parameters and nontype template parameters.
15078         * parse.y (template_parm): Handle invalid default template
15079         template arguments here.
15080
15081         * parse.y (template_parm): Use template_arg instead of PTYPENAME
15082         for default template template argument.
15083         * pt.c (coerce_template_parms): Merge default template argument
15084         codes.  Can treat RECORD_TYPE as template name if it is implicitly
15085         created.  Fix argument index in error message.
15086         * typeck.c (comptypes): Merge template argument comparison codes in
15087         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
15088
15089 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
15090
15091         * lex.c (file_name_nondirectory): Also check for '/'.
15092
15093 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
15094
15095         * parse.y (primary): Deal with statement-expressions in
15096         templates.
15097         * pt.c (tsubst_copy): Handle BIND_EXPR.
15098         * tree.c (mapcar): Likewise.
15099
15100         * call.c (add_template_candidate_real): Pass extra parameter to
15101         fn_type_unification.
15102         * cp-tree.h (fn_type_unification): Add parameter.
15103         * pt.c (fn_type_unification): Add additional parameter to deal with
15104         static member functions.
15105         (get_bindings): Deal with static member functions.
15106
15107         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
15108         (revert_static_member_fn): Declare.
15109         * decl.c (revert_static_member_fn): Remove declaration.  Change
15110         linkage from internal to external.
15111         (cp_finish_decl): Deal with virtual functions in classes local to
15112         template functions.
15113         * decl2.c (finish_file): Don't forget to emit increment/decrement
15114         expressions in initializers for file-scope variables.
15115         * parse.y (typename_sub2): If the typename doesn't names a
15116         template, rather than a type, issue an error message.
15117         * pt.c (check_explicit_specialization): Handle specializations of
15118         static member functions.
15119         (coerce_template_parms): Handle offset references to lists of
15120         member functions.
15121         * search.c (note_debug_info_needed): Don't crash when handed a
15122         type which is being defined.
15123         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
15124         that can happen with some illegal code.
15125
15126 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15127
15128         * call.c (user_harshness): Initialize `code' to 0.
15129         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
15130         (null_ptr_cst_p): Add parentheses around && within ||.
15131         (standard_conversion): Likewise.
15132         (z_candidate): Likewise.
15133         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
15134         (build_object_call): Likewise for `mem_args'.
15135         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
15136         default case in enumeration switch.
15137
15138         * class.c (build_vtable_entry): Add explicit braces to avoid
15139         ambiguous `else'.
15140         (build_class_init_list): Likewise.
15141         (finish_struct_1): Initialize `width' to 0.
15142         (instantiate_type): Initialize `name' to NULL_TREE.  Add
15143         explicit braces to avoid ambiguous `else'.
15144
15145         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
15146         `else'.
15147
15148         * decl.c (grok_reference_init): Eliminate unused parameter, all
15149         callers changed.
15150         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
15151         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
15152         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
15153         (grokdeclarator): Add parentheses around && within ||.  Add
15154         explicit braces to avoid ambiguous `else'.
15155         (grokparms): Initialize `type' to NULL_TREE.
15156         (xref_tag): Remove unused label `just_return'.
15157         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
15158         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
15159         (hack_incomplete_structures): Add parentheses around assignment
15160         used as truth value.
15161
15162         * decl2.c (coerce_delete_type): Hide definition of `e3'.
15163
15164         * error.c: Include <stdlib.h>.
15165         (dump_expr): Change the type of `i' to size_t.  Remove unused
15166         label `error'.
15167
15168         * except.c (init_exception_processing): Remove unused variable `d'.
15169         (expand_throw): Likewise for `label'.
15170
15171         * friend.c (add_friends): Add explicit braces to avoid ambiguous
15172         `else'.
15173
15174         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
15175         (sort_base_init): Likewise for `binfo'.
15176         (expand_member_init): Likewise for `rval'.
15177         (build_member_call): Add parentheses around assignment used as
15178         truth value.
15179         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
15180         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
15181         `old_immediate_size_expand' to 0.
15182         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
15183         (build_vec_delete_1): Remove unused variable `block'.
15184         (expand_vec_init): Initialize `itype' to NULL_TREE.
15185
15186         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
15187         declaration of `index' and `rindex' with autoconf macros.
15188         (reinit_parse_for_expr): Remove unused variables
15189         `look_for_semicolon' and `look_for_lbrac'.
15190         (cons_up_default_function): Initialize `args' to NULL_TREE.
15191         (readescape): Initialize `firstdig' to 0.
15192         (real_yylex): Add parentheses around assignment used as truth value.
15193
15194         * method.c: Include <strings.h> if we don't have <string.h>.
15195         Protect declaration of `index' with autoconf macro.
15196
15197         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
15198         Initialize `type' to NULL_TREE.
15199         (structsp): Remove unused variable `id'.
15200
15201         * pt.c (coerce_template_parms): Add explicit braces to avoid
15202         ambiguous `else'.
15203         (lookup_template_class): Initialize `template' to NULL_TREE.
15204         (instantiate_class_template): Remove unused variable `name' and `e'.
15205         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
15206         (do_poplevel): Initialize `saved_warn_unused' to 0.
15207         (type_unification): Remove unused varable `parm'.
15208         (unify): Likewise for `j'.
15209
15210         * repo.c (init_repo): Add parentheses around assignment used as
15211         truth value.
15212         (finish_repo): Remove unused varable `p'.
15213
15214         * search.c (get_binfo): Initialize `type' to NULL_TREE.
15215         (get_base_distance): Likewise.
15216         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
15217         and `new_v' to NULL_TREE.
15218         (lookup_fnfields): Likewise for `rval_binfo_h'.
15219         (breadth_first_search): Add parentheses around assignment used as
15220         truth value.
15221         (get_template_base): Initialize `type' to NULL_TREE.
15222
15223         * sig.c (append_signature_fields): Initialize `last_mfptr' to
15224         NULL_TREE.
15225         (build_signature_table_constructor): Likewise for
15226         `last_rhs_field', `pfn' and `vt_off'.
15227         (build_sigtable): Likewise for `init'.
15228
15229         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
15230         (propagate_binfo_offsets): Likewise for `delta'.
15231         (hash_tree_cons): Initialize hashcode to 0.
15232         (can_free): Likewise for `size'.
15233         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
15234
15235         * typeck.c (convert_sequence): Hide prototype.
15236         (common_type): Add explicit braces to avoid ambiguous `else'.
15237         (comp_target_types): Likewise.
15238         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
15239         (build_function_call_real): Add explicit braces to avoid ambiguous
15240         `else'.
15241         (convert_arguments): Initialize `called_thing' to 0.
15242         (convert_for_initialization): Initialize `savew' and `savee' to 0.
15243
15244         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
15245         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
15246         (build_x_arrow): Likewise for `last_rval'.
15247
15248         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
15249
15250 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
15251
15252         * decl.c (init_decl_processing): Use set_sizetype.
15253         * decl2.c (sizetype): Don't declare.
15254         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
15255         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
15256         (build_component_addr, unary_complex_lvalue): Likewise.
15257         * rtti.c (expand_class_desc): Likewise.
15258         * class.c (get_vfield_offset): Likewise.
15259
15260 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
15261
15262         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
15263         early to avoid bogus error.  Handle overloaded function
15264         names provided as template arguments correctly.
15265         (coerce_template_parms): Don't mishandle overloaded functions when
15266         dealing with template template parameters.
15267         (lookup_template_class): Issue an error message, rather than
15268         crashing, when the TYPE_DECL provided is not a template type.
15269
15270 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
15271
15272         * class.c (instantiate_type): Don't just return a known type if
15273         it's wrong.
15274
15275 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
15276
15277         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
15278         since that code could never be reached.
15279
15280         * error.c (dump_decl): Avoid aborting in the midst of printing an
15281         error message about an illegal template declaration.
15282
15283         * parse.y (structsp): Print an error message, rather than crashing,
15284         when a class-head does not name a class.
15285
15286         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
15287         template arguments as a g++ extension.
15288
15289         * cp-tree.def (ALIGNOF_EXPR): New tree code.
15290         * decl2.c (grok_alignof): If processing_template_decl, just store
15291         the expression.
15292         * typeck.c (c_alignof): Likewise.
15293         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
15294         * error.c (dump_expr): Likewise.
15295         * pt.c (tsubst_copy): Likewise.
15296         * tree.c (cp_tree_equal): Likewise.
15297         * pt.c (uses_template_parms): Correctly determine whether or not a
15298         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
15299         folding can be done.
15300
15301         * cp-tree.h (grok_enum_decls): Remove type parameter.
15302         * decl.c (grok_enum_decls): Likewise.
15303         * decl2.c (grok_x_components): Call grok_enum_decls
15304         unconditionally, since it will do nothing if there is no
15305         current_local_enum.  Use the new calling sequence.
15306         * pt.c (tsubst_enum): Use the new calling sequence for
15307         grok_enum_decls.
15308
15309         * decl.c (start_function): Make member functions of local classes
15310         in extern inline functions have comdat linkage here...
15311         (grokdeclarator): Rather than here.
15312
15313 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
15314
15315         * pt.c (convert_nontype_argument): Use decl_constant_value.
15316
15317 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
15318
15319         * call.c (add_template_candidate_real): New function.
15320         (add_template_candidate): Use it.
15321         (add_template_conv_candidate): Likewise.
15322         (joust): Pass extra argument to more_specialized.
15323         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
15324         (is_local_class): Remove.
15325         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
15326         * cp-tree.h (is_local_class): Remove.
15327         (perform_array_to_pointer_conversion): Likewise.
15328         (finish_member_template_decl): Add.
15329         (check_explicit_specialization): Return a tree, not an int.
15330         (more_specialized): Take additional argument.
15331         (get_bindings): Likewise.
15332         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
15333         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
15334         (perform_array_to_pointer_conversion): Remove.
15335         * decl.c (saved_scope): Add processing_specialization,
15336         processing_explicit_instantiation fields.
15337         (maybe_push_to_top_level): Save them.
15338         (pop_from_top_level): Restore them.
15339         (grokfndecl): Use new return value from
15340         check_explicit_specialization.
15341         (start_decl): Don't check flag_guiding_decls before pushing
15342         decls.
15343         (cp_finish_decl): Remove previous (bogus) change.
15344         (grok_declarator): Use decl_function_context rather than
15345         is_local_class.
15346         * decl2.c (finish_file): Pass extra argument to get_bindings.
15347         (build_expr_from_tree): Let build_x_component_ref check
15348         validity of arguments rather than doing it here.
15349         * lex.c (cons_up_default_function): Remove code fooling with
15350         processing_specialization, processing_explicit_instantiation
15351         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
15352         * method.c (build_overload_identifier): Mangle local classes in
15353         template functions correctly.
15354         * parse.y (finish_member_template_decl): Move to pt.c.
15355         * pt.c (finish_member_template_decl): Moved here from parse.y.
15356         (print_candidates): New function.
15357         (determine_specialization): Change interface.  Properly look for
15358         most specialized versions of template candidates.
15359         (check_explicit_specialization): Fully process explicit
15360         instantiations.
15361         (push_template_decl): Avoid looking at CLASSTYPE fields in
15362         FUNCTION_DECLS.
15363         (determine_overloaded_function): Remove.
15364         (convert_nontype_argument): Change name from
15365         convert_nontype_parameter.  Use determine_overloaded_function
15366         instead of instantiate_type.
15367         (mangle_class_name_for_template): Handle type contexts as well as
15368         function contexts.
15369         (classtype_mangled_name): Likewise.
15370         (lookup_template_class): Likewise.
15371         (tsubst): Likewise.
15372         (more_specialized): Take explict template arguments as a
15373         parameter.
15374         (most_specialized): Likewise.
15375         (get_bindings): Likewise.  Check that return types match before
15376         proclaiming a function a match.
15377         (do_decl_instantiation): Remove code searching for function to
15378         instantiate; that is now done in check_explicit_specialization.
15379         (add_maybe_template): Pass extra argument to get_bindings.
15380         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
15381         implementation.
15382         * typeck.c (build_component_ref): Check for invalid arguments.
15383
15384 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
15385
15386         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
15387         return_target and call_target are equivalent.
15388
15389         * pt.c (type_unification_real): Just accept function parms that
15390         don't use any template parms.
15391
15392 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
15393
15394         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
15395         unset DECL_NOT_REALLY_EXTERN.
15396
15397         * parse.y (typename_sub*): Fix std::.
15398
15399 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
15400
15401         * error.c (dump_decl): Fix type default template args.
15402         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
15403
15404 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
15405
15406         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
15407         (file_name_nondirectory): Use.
15408
15409 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15410
15411         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
15412         that are not really present.  Substitute default arguments in
15413         template template arguments.  Correctly convert TEMPLATE_DECL to
15414         TEMPLATE_TEMPLATE_PARM.
15415         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
15416         are no longer treated specially here.
15417         * parse.y (template_template_parm): Fix copy error.
15418         * decl.c (grokdeclarator): Warn about missing `typename' for nested
15419         type created from template template parameters.
15420         * parse.y (bad_parm): Likewise
15421
15422         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
15423         (push_nested_class): Likewise.
15424         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
15425         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
15426         (copy_template_template_parm): Declare.
15427         * decl.c (arg_looking_for_template): New variable.
15428         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
15429         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
15430         node if arg_looking_for_template is nonzero.
15431         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
15432         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
15433         (grokdeclarator): Handle TEMPLATE_DECL.
15434         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
15435         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
15436         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
15437         (dump_decl): Handle unnamed template type parameters.
15438         Handle template template parameters.
15439         (dump_function_name): Handle template template parameters.
15440         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
15441         Handle TEMPLATE_TEMPLATE_PARM.
15442         * method.c (build_template_template_parm_names): New function.
15443         (build_template_parm_names): Handle TEMPLATE_DECL.
15444         (build_overload_nested_name, build_overload_name):
15445         Handle TEMPLATE_TEMPLATE_PARM.
15446         * parse.y (maybe_identifier): New nonterminal.
15447         (template_type_parm): Use it.
15448         (template_template_parm, template_arg1): New nonterminal.
15449         (template_parm): Add template_template_parm rules.
15450         (template_arg): Set processing_template_arg.
15451         (template_arg1): Rules moved from template_arg.
15452         (primary, nonnested_type): Set arg_looking_for_template if we are
15453         processing template arguments.
15454         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
15455         (process_template_parm): Handle template template parameters.
15456         (coerce_template_parms, comp_template_args): Likewise.
15457         (mangle_class_name_for_template, lookup_template_class): Likewise.
15458         (uses_template_parms): Handle TEMPLATE_DECL and
15459         TEMPLATE_TEMPLATE_PARM.
15460         (current_template_args): Handle TEMPLATE_DECL.
15461         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
15462         * search.c (dfs_walk, dfs_record_inheritance):
15463         Handle TEMPLATE_TEMPLATE_PARM.
15464         * tree.c (copy_template_template_parm): New function.
15465         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
15466         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
15467
15468 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
15469
15470         * decl.c (start_decl): Don't allow duplicate definitions of static
15471         data members.
15472
15473         * call.c (build_user_type_conversion_1): Handle user-defined
15474         template conversion operators correctly.
15475
15476         * decl2.c (build_expr_from_tree): Issue an error message if the
15477         object in a COMPONENT_REF is a TEMPLATE_DECL.
15478
15479         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
15480
15481         * class.c (is_local_class): New function.
15482         * cp-tree.h (is_local_class): Declare it.
15483         (last_tree): Likewise.
15484         (begin_tree): Likewise.
15485         (end_tree): Likewise.
15486         (lookup_template_class): Change prototype.
15487         * decl.c (cp_finish_decl): Check for NULL where necessary.
15488         Consider FUNCTION_DECLS to declare objects with top-level binding,
15489         when calling make_decl_rtl.
15490         (grokdeclarator): Give members of local classes internal linkage.
15491         (start_function): Remove declaration of last_tree.
15492         (finish_function): Set flag_keep_inline_functions around call to
15493         rest_of_compilation if we are processing a member function in a
15494         local class.
15495         (start_method): Call push_template_decl for member functions of
15496         local classes in template functions.
15497         * decl2.c (import_export_decl): Don't give external linkage to
15498         instantiations of templates with internal linkage.
15499         * parse.y (last_tree): Remove declaration.
15500         (template_type): Pass extra parameter to lookup_template_class.
15501         (self_template_type): Likewise.
15502         (structsp): Move call to reset_specialization into left_curly.
15503         (left_curly): Call reset_specialization, and begin_tree.
15504         * pt.c (saved_trees): New variable.
15505         (mangle_class_name_for_template): Change prototype.  Use
15506         additional function context to name local classes in templates
15507         correctly.
15508         (classtype_mangled_name): Pass the context.
15509         (push_template_decl): Handle local classes and templates, and
15510         member functions for such classes.
15511         (convert_nontype_parameter): Fix handling of pointer-to-member
15512         constants.
15513         (lookup_template_class): Handle local classes in templates.
15514         (tsubst): Likewise.  Don't assume that template instantiations
15515         have external linkage; pay attention to the template declaration.
15516         (mark_decl_instantiated): Likewise.
15517         (begin_tree): New function.
15518         (end_tree): Likewise.
15519
15520         * decl.c (xref_basetypes): Don't call complete_type for basetypes
15521         that involve template parameters; that can lead to infinite
15522         recursion unnecessarily.
15523
15524         * pt.c (register_specialization): Do not register specializations
15525         that aren't ready to be registered yet.
15526         (check_explicit_specialization): Handle explicit specialization of
15527         constructors and destructors.
15528         (build_template_decl): New function.
15529         (push_template_delc): Handle out-of-class specializations of
15530         member templates.
15531
15532         * pt.c (check_explicit_specialization): Set up the template
15533         information before registering the specialization.
15534         (coerce_template_parms): Fix thinko.
15535         (tsubst): Handle specializations of member templates correctly.
15536
15537         * class.c (finish_struct_methods): Remove calls to
15538         check_explicit_specialization from here.
15539         (finish_struct): And insert them here.
15540         * cp-tree.h (perform_qualification_conversions): New function.
15541         (perform_array_to_pointer_conversion): Likewise.
15542         (begin_explicit_instantiation): Likewise.
15543         (end_explicit_instantiation): Likewise.
15544         (determine_specialization): Renamed from
15545         determine_explicit_specialization.
15546         (comp_template_parms): New function.
15547         (processing_explicit_instantiation): New variable.
15548         * cvt.c (perform_qualification_conversions): New function.
15549         (perform_array_to_pointer_conversion): Likewise.
15550         * decl.c (duplicate_decls): Don't consider template functions
15551         alike unless they have the same parameters.  Refine handling of
15552         instantiation/specialization mismatches.
15553         (start_decl): Don't call pushdecl for template specializations,
15554         since they don't affect overloading.
15555         (start_function): Likewise.
15556         (grokfndecl): Call check_explicit_specialization a little later.
15557         Don't call duplicate_decls for memberm template specializations.
15558         (grokdeclarator): Don't update template_count for classes that are
15559         themselves specializations.  Remove use of `2' as parameter to
15560         grokfndecl since that value isn't used.
15561         * lex.c (cons_up_default_function): Save and restore
15562         processing_explicit_instantiation around calls to grokfield.
15563         * parse.y (finish_member_template_decl): New function.
15564         (component_decl_1): Use it.
15565         (fn.def2): Likewise.
15566         (template_arg_list_opt): New nonterminal.
15567         (template_type): Use it.
15568         (self_template_type): Likewise.
15569         (template_id): Likewise.
15570         (object_template_id): Likewise.
15571         (notype_template_declarator): Likwise.
15572         (begin_explicit_instantiation): Likewise.
15573         (end_explicit_instantiation): Likewise.
15574         (explicit_instantiation): Use them.
15575         * pt.c (coerce_template_parms): Add parameters.
15576         (processing_explicit_instantiation): New variable.
15577         (convert_nontype_parameter): New function.
15578         (determine_overloaded_function): Likewise.
15579         (begin_explicit_instantiation): Likewise.
15580         (end_explicit_instantiation): Likewise.
15581         (retrieve_specialization): Likewise.
15582         (register_specialization): Likewise.
15583         (processing_explicit_specialization): Removed.
15584         (determine_specialization): Handle specializations of member
15585         functions of template class instantiations.
15586         (check_explicit_specialization): Refine to conform to standard.
15587         (comp_template_parms): New function.
15588         (coerce_template_parms): Call convert_nontype_parameter.
15589         (tsubst): Refine handling of member templates.  Use
15590         register_specialization.
15591         (instantiate_template): Use retrieve_specialization.
15592         (do_decl_instantiation): Likewise.
15593         (instantiate_decl): Likewise.
15594         (type_unification): Improve handling of explict template
15595         arguments.
15596         * tree.c (mapcar): Return error_mark_node, rather than aborting,
15597         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
15598         * typeck.c (build_unary_op): Call determine_specialization, rather
15599         than determine_explicit_specialization.
15600
15601 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
15602
15603         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
15604
15605 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15606
15607         * error.c (dump_decl): For enum tags, output the tag, not its value.
15608
15609 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
15610
15611         * decl.c (init_decl_processing): Only call init_rtti_processing
15612         FLAG_RTTI is set.
15613
15614 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
15615
15616         * init.c (build_new_1): Split out from build_new.
15617         (build_new): Just return a NEW_EXPR.
15618         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
15619
15620         * decl2.c (get_temp_regvar): Tweak.
15621
15622         * cp-tree.h (TREE_CALLS_NEW): Comment out.
15623         * class.c (resolves_to_fixed_type_p): Remove use.
15624         * method.c (build_opfncall): Likewise.
15625         * call.c (build_new_op): Likewise.
15626
15627 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
15628
15629         * exception.cc (__eh_alloc, __eh_free): New fns.
15630         (__cp_push_exception, __cp_pop_exception): Use them.
15631         (__uncatch_exception): Call terminate here if no exception.
15632         * except.c (build_terminate_handler): New fn.
15633         (expand_start_catch_block): Use it.
15634         (expand_exception_blocks): Likewise.
15635         (alloc_eh_object): New fn.
15636         (expand_throw): Use it.  Protect exception init with terminate.
15637         * typeck.c (build_modify_expr): Remove code that ignores trivial
15638         methods.
15639
15640 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15641
15642         * call.c (add_builtin_candidate): Add default case in enumeration
15643         switch.
15644         (build_new_op): Likewise.
15645         (convert_like): Likewise.
15646         * cvt.c (build_expr_type_conversion): Likewise.
15647         * tree.c (real_lvalue_p): Likewise.
15648         (lvalue_p): Likewise.
15649         (cp_tree_equal): Likewise.
15650         * typeck.c (comptypes): Likewise.
15651         (build_component_ref): Likewise.
15652         (build_function_call_real): Likewise.
15653         (build_binary_op_nodefault): Likewise.
15654         (build_unary_op): Likewise.
15655         (build_modify_expr): Likewise.
15656         * typeck2.c (initializer_constant_valid_p): Likewise.
15657
15658 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
15659
15660         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
15661
15662 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
15663
15664         * pt.c (coerce_template_parms): Make sure to digest_init if
15665         possible.
15666
15667         * decl.c (duplicate_decls): Make the newdecl virtual if the
15668         olddecl was, just as is done with other attributes of olddecl.
15669
15670 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
15671
15672         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
15673         address of an OFFSET_REF.
15674
15675         * cp-tree.def: Add AGGR_INIT_EXPR.
15676         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
15677         AGGR_INIT_EXPR where appropriate.
15678         * expr.c (cplus_expand_expr): Likewise.  Simplify.
15679
15680         * decl2.c (finish_file): Remove call to register_exception_table.
15681
15682 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15683
15684         * pt.c (instantiate_class_template): Don't do injection when
15685         processing_template_decl is true, as pollutes current_binding_level
15686         for base classes.
15687
15688 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
15689
15690         * pt.c (maybe_fold_nontype_arg): Add prototype.
15691
15692 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
15693
15694         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
15695         * error.c (dump_expr): Likewise.
15696
15697 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
15698
15699         * typeck.c (build_function_call_real): Remove "inline called before
15700         definition" pedwarn.
15701
15702         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
15703
15704 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
15705
15706         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
15707
15708         * pt.c (type_unification_real): Change __null to type void* with
15709         a warning.
15710
15711 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
15712
15713         * call.c (implicit_conversion): Don't call
15714         build_user_type_conversion_1 with a NULL expr, since it will
15715         crash.
15716
15717         * pt.c (unify): Don't try to unify array bounds if either array is
15718         unbounded.
15719
15720 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15721
15722         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
15723         Replace extern decls with casts.
15724
15725         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
15726         Update last_parm_cleanup_insn.
15727         (store_after_parms): Remove.
15728         * cp-tree.h: Adjust.
15729
15730 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
15731
15732         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
15733         (finish_file): Check DECL_COMDAT instead of weak|one_only.
15734         (import_export_vtable): Use make_decl_one_only instead of
15735         comdat_linkage for win32 tweak.
15736         (import_export_decl): Likewise.
15737         * pt.c (mark_decl_instantiated): Likewise.
15738
15739         * decl2.c (finish_file): Lose handling of templates in pending_statics.
15740
15741 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
15742
15743         * decl2.c (finish_file): Lose call to expand_builtin_throw.
15744         * except.c (expand_builtin_throw): Remove.
15745         * cp-tree.h: Remove ptr_ptr_type_node.
15746         * decl.c: Likewise.
15747
15748 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
15749
15750         * decl.c (ptr_ptr_type_node): Define.
15751         (init_decl_processing): Initialize it.
15752         * cp-tree.h: Declare it.
15753         * exception.cc (__cp_exception_info): Use __get_eh_info.
15754         (__cp_push_exception): Likewise.
15755         (__cp_pop_exception): Likewise.
15756
15757         From Scott Snyder <snyder@d0sgif.fnal.gov>:
15758         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
15759         saved_pc.
15760         (init_exception_processing): Removed saved_pc initialization.
15761
15762 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
15763
15764         * pt.c (instantiate_decl): Defer all templates but inline functions.
15765
15766 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
15767
15768         * init.c (expand_vec_init): Don't fold a list of parameters.
15769
15770         * decl.c (copy_args_p): Handle copy elision for types with virtual
15771         bases.
15772         * call.c (build_over_call): Likewise.
15773
15774 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
15775
15776         * pt.c (lookup_template_function): Copy the template arguments,
15777         not just the list containing them, to the permanent obstack.
15778
15779 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
15780
15781         * except.c (expand_start_catch_block): suspend_momentary for the
15782         terminate handler.
15783
15784         * error.c (dump_decl): Handle LOOKUP_EXPR.
15785
15786 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
15787
15788         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
15789         permanent obstack if we are processing a template decl.
15790         * typeck.c (build_static_cast): Likewise.
15791         (build_const_cast): Likewise.
15792         (build_reinterpret_cast): Likewise.
15793
15794         * pt.c (coerce_template_parms): Coerce some expressions, even
15795         when processing_template_decl.
15796
15797 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15798
15799         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
15800         handling of pointer difference expressions.
15801
15802         * typeck.c (comp_target_types): Comparison of function/method types
15803         is independent of nptrs.
15804
15805 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
15806
15807         * pt.c (tsubst): Avoid creating pointer to reference and
15808         reference to reference types.
15809
15810 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
15811
15812         * parse.y (do_id): New nonterminal.
15813         (template_id): Use it.
15814
15815 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
15816
15817         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
15818         * spew.c (yylex): Don't do_identifier here.
15819         * decl2.c (build_expr_from_tree): Revert last change.
15820
15821         * decl2.c (build_expr_from_tree): Expand the name for a method call.
15822         * parse.y (object_template_id): Don't try to take the DECL_NAME.
15823
15824 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
15825
15826         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
15827         alloc_expr.
15828         * call.c (build_op_delete_call): Adjust.
15829
15830         * except.c (expand_end_catch_block): Lose rethrow region.
15831         (expand_start_catch_block): Likewise.
15832         (expand_end_catch_block): Don't expand_leftover_cleanups.
15833
15834 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15835
15836         * pt.c (tsubst): Remove tree_cons call (places redundant info into
15837         DECL_TEMPLATE_INSTANTIATION).
15838
15839 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
15840
15841         * tree.c (is_overloaded_fn): Handle getting a fn template.
15842         (really_overloaded_fn): Likewise.
15843         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
15844         * pt.c (check_explicit_specialization): Tweak.
15845         (determine_explicit_specialization): Tweak.
15846
15847         * tree.c, cp-tree.h (get_target_expr): New fn.
15848
15849 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
15850
15851         * pt.c (check_explicit_specialization): Fix misspelling in
15852         diagnostic: `preceeded'.
15853         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
15854         `conversiona'.
15855
15856 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
15857
15858         * pt.c (determine_explicit_specialization): Avoid an internal
15859         error for bad specializations.
15860
15861         * method.c (build_overload_value): Handle SCOPE_REF.
15862
15863 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
15864
15865         * class.c (prepare_fresh_vtable): Enable even more complex MI
15866         vtable names.
15867
15868 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
15869
15870         * exception.cc (__check_eh_spec): Optimize a bit.
15871
15872         * exception.cc (__cp_pop_exception): Lose handler arg.
15873         * except.c (do_pop_exception): Likewise.
15874         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
15875         (expand_end_catch_block): Likewise.
15876
15877 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15878
15879         * pt.c (check_explicit_specialization): Complain about using a
15880         template-id for a non-specialization.
15881
15882 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
15883
15884         * repo.c: Prototype rindex only if needed.
15885         * xref.c: Likewise.
15886
15887 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15888
15889         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
15890
15891 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
15892
15893         * typeck.c (build_const_cast): Handle references here instead of
15894         handing off to convert_to_reference.
15895
15896         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
15897         TerminateFunctionCall.
15898         (init_exception_processing): Likewise.  Terminate et al are now
15899         the fns, not ADDR_EXPRs.
15900         (various): Lose redundant assemble_external calls.
15901         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
15902
15903         * cp-tree.h (struct lang_decl_flags): Add comdat.
15904         (DECL_COMDAT): New macro.
15905         * decl.c (duplicate_decls): Propagate it.
15906         (cp_finish_decl): Handle it.
15907         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
15908
15909         * class.c: Remove static pending_hard_virtuals.
15910         (add_virtual_function): Take pointers to pending_virtuals
15911         and pending_hard_virtuals.
15912         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
15913
15914 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
15915
15916         * decl2.c (import_export_vtable): If we support one_only but not
15917         weak symbols, mark instantiated template vtables one_only.
15918         (import_export_decl): Likewise for tinfo functions.
15919         (finish_vtable_vardecl): Also write out vtables from explicitly
15920         instantiated template classes.
15921         * pt.c (mark_class_instantiated): Revert last change.
15922
15923         * except.c (expand_throw): Call mark_used on the destructor.
15924
15925 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
15926
15927         * lex.c (lang_init): Enable flag_exceptions by default if no
15928         command line switch was specified.
15929
15930 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
15931
15932         * pt.c (unify): Handle `void' template parameters in
15933         specializations.
15934
15935 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
15936
15937         * rtti.c (build_dynamic_cast): Handle template case here.
15938         (build_dynamic_cast_1): Not here.
15939
15940         * typeck2.c (digest_init): Make copies where appropriate.
15941
15942         * decl2.c (delete_sanity): resolve_offset_ref.
15943
15944         * except.c: Call terminate without caching so many bits.
15945
15946         * except.c (expand_start_catch_block): Fix catching a reference
15947         to pointer.
15948
15949 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
15950
15951         * init.c (build_new): Copy size to the saveable obstack.
15952
15953         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
15954         TRY_CATCH_EXPR for now.
15955
15956 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
15957
15958         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
15959         has DECL_LANG_SPECIFIC.
15960
15961         * exception.cc (struct cp_eh_info): Add handlers field.
15962         (__cp_push_exception): Initialize it.
15963         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
15964         (__throw_bad_exception): Remove.
15965         * except.c (call_eh_info): Add handlers field.
15966         (get_eh_handlers): New fn.
15967         (push_eh_cleanup): Increment handlers.
15968
15969 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
15970
15971         * except.c (expand_start_eh_spec): Use the try/catch code.
15972         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
15973         doing everything inline.
15974         (init_exception_processing): throw_type_match now takes
15975         const void pointers.
15976         * exception.cc (__check_eh_spec): New fn.
15977         * inc/exception: Neither terminate nor unexpected return.
15978         * decl.c: Make const_ptr_type_node public.
15979         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
15980
15981         * except.c (expand_start_catch_block): We only need the rethrow
15982         region for non-sjlj exceptions.
15983         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
15984
15985 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
15986
15987         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
15988         (various.o): Likewise.
15989         * inc/new: Add placement deletes.  Add throw specs for default new.
15990         * new.cc (set_new_handler): Move here from libgcc2.
15991         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
15992         (new): Move from libgcc2.  Throw bad_alloc.
15993         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
15994         * decl.c (init_decl_processing): Update exception specs on new and
15995         delete.
15996
15997         * method.c (build_decl_overload_real): Don't mess with global
15998         placement delete.
15999
16000         * init.c (build_new): Check for null throw spec, not nothrow_t.
16001
16002         * decl.c (duplicate_decls): Don't complain about different exceptions
16003         from an internal declaration.
16004
16005         * call.c (build_op_delete_call): Fix check for member fns again.
16006
16007         * decl2.c (import_export_decl): Interface hackery affects
16008         virtual synthesized methods.
16009
16010 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
16011
16012         * decl.c (start_decl): Don't just complain about a mismatched
16013         scope, fix it.
16014
16015         * decl.c (make_implicit_typename): Handle case where t is not
16016         actually from context.
16017         * tree.c (get_type_decl): Lose identifier case.
16018         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
16019         * parse.y (nonnested_type): Just use lookup_name.
16020         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
16021
16022 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
16023
16024         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
16025         T was built in C language context (for example, by
16026         output_func_start_profiler).
16027
16028 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
16029
16030         * decl.c (make_implicit_typename): New fn.
16031         (lookup_name_real): Use it.  Use current_class_type as the context.
16032
16033 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
16034
16035         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
16036
16037 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
16038
16039         * friend.c (do_friend): Warn about non-template friends in templates.
16040
16041         * call.c (build_op_delete_call): Fix handling of inherited delete.
16042
16043         * search.c (dfs_record_inheritance): Ignore template type parms.
16044
16045 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
16046
16047         * call.c (build_new_op): Fix copy error.
16048         (build_op_new_call): New fn.
16049         (build_op_delete_call): New fn.
16050         * cp-tree.h: Declare them.
16051         * init.c (build_new): Use them.  Support placement delete.
16052         (build_x_delete): Use build_op_delete_call.
16053         (build_delete): Likewise.
16054         * decl2.c (delete_sanity): Likewise.
16055         (coerce_delete_type): Don't complain about placement delete.
16056
16057 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16058
16059         * call.c (build_new_function_call): Remove unused 'obj' parm.
16060         * cp-tree.h, typeck.c: Adjust.
16061
16062         * init.c (build_new): Make the cleanup last longer.
16063         (expand_vec_init): Call do_pending_stack_adjust.
16064
16065 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
16066
16067         * pt.c (do_type_instantiation): Fix typo.
16068         (mark_class_instantiated): If we support one_only but not weak
16069         symbols, don't mark this as known.
16070
16071         * init.c (build_new): Handle vec delete in EH cleanup.
16072
16073 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16074
16075         * call.c (build_method_call): Call complete_type before checking
16076         for destructor.
16077
16078 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
16079
16080         * decl.c (add_block_current_level): Delete.
16081         * init.c (build_vec_delete_1): Delete build_block and
16082         add_block_current_level calls.
16083
16084 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
16085
16086         * init.c (build_new): Handle freeing allocated memory when the
16087         constructor throws.
16088
16089         * call.c (build_new_method_call): Fix flags arg.
16090
16091         * pt.c (do_type_instantiation): Don't try to instantiate
16092         member templates.
16093         (mark_decl_instantiated): If we support one_only but not
16094         weak symbols, mark this one_only.
16095         * decl2.c (import_export_vtable): Don't defer handling of vtables
16096         if MULTIPLE_SYMBOL_SPACES.
16097
16098 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
16099
16100         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
16101
16102 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
16103
16104         * except.c (do_pop_exception): Return a value.
16105
16106 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
16107
16108         * call.c (build_new_method_call): Handle getting a
16109         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
16110         if we got template parms.
16111         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
16112         not just the args.
16113         * decl2.c (build_expr_from_tree): Tweak last change.
16114         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
16115         (maybe_fold_nontype_arg): Split out from tsubst_copy.
16116         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
16117
16118 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
16119
16120         * pt.c (tsubst_copy): Handle explicit template arguments in
16121         function calls.
16122         * typeck.c (build_x_function_call): Likewise.
16123         * decl2.c (build_expr_from_tree): Lookup function name if it
16124         hasn't been done.
16125
16126         * pt.c (tsubst): Instantiate template functions properly when
16127         template parameter does not appear in function arguments and return
16128         type.
16129         (comp_template_args): Handle member templates required by tsubst.
16130
16131 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
16132
16133         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
16134         previous change.
16135
16136 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
16137
16138         * pt.c (coerce_template_parms): Tweak error message.
16139
16140         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
16141         return type defaults to `int', even if there are storage-class
16142         specifiers.
16143
16144 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
16145
16146         Complete nested exception support.
16147         * except.c (do_pop_exception): Split out...
16148         (push_eh_cleanup): From here.  Handle the EH region by hand.
16149         (expand_start_catch_block): Add a new level for the catch parm.
16150         Move the rethrow region outside the two cleanup regions.
16151         Protect the initializer for the catch parm with terminate.
16152         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
16153         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
16154         popping off the middle of the stack.
16155         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
16156         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
16157         (build_cplus_new): Only wrap CALL_EXPRs.
16158         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
16159         the constructor call.
16160
16161 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16162
16163         * Make-lang.in (c++.distdir): Make inc subdirectory.
16164
16165 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
16166
16167         * decl2.c (finish_file): Put back some code.
16168
16169 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
16170
16171         * decl2.c (finish_file): Remove redundant code.
16172         * method.c (emit_thunk): Don't let the backend defer generic thunks.
16173
16174 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
16175
16176         * except.c (call_eh_info): Split out...
16177         (push_eh_info): From here.
16178         (expand_builtin_throw): Use it.
16179         (expand_start_catch_block): Move region start back.
16180
16181 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
16182
16183         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
16184         (real_yylex): Record wide strings using target endianness, not host.
16185
16186 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
16187
16188         * repo.c (rindex): Add decl unconditionally.
16189         (get_base_filename, open_repo_file): Don't cast rindex.
16190         * xref.c (rindex): Add decl unconditionally.
16191         (index): Remove unused decl.
16192         (open_xref_file): Don't cast rindex.
16193
16194 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
16195
16196         * class.c (build_vbase_path): Propagate the result type properly.
16197
16198 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
16199
16200         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
16201         remaining use of saved_throw_type with a call to get_eh_type.
16202
16203 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
16204
16205         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
16206         (file_name_nondirectory): New function, doing the same as the macro.
16207         (set_typedecl_interface_info): Use it instead of the macro.
16208         (check_newline): Likewise.
16209         (handle_cp_pragma): Likewise.
16210
16211         * repo.c (get_base_filename): Cast result of rindex to char*.
16212         (open_repo_file): Likewise.
16213         * xref.c (open_xref_file): Likewise.
16214         * error.c (dump_char): Make its arg int, not char.
16215
16216         * except.c (push_eh_info): Pass the number of fields - 1 down, not
16217         the exact number of fields.
16218
16219 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
16220
16221         Support for nested exceptions.
16222         * tinfo2.cc (__is_pointer): New fn.
16223         * exception.cc (struct cp_eh_info): Define.
16224         (__cp_exception_info, __uncatch_exception): New fns.
16225         (__cp_push_exception, __cp_pop_exception): New fns.
16226         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
16227         Lose empty_fndecl.
16228         (init_exception_processing): Likewise.  __eh_pc is now external.
16229         (push_eh_info): New fn.
16230         (get_eh_{info,value,type,caught}): New fns.
16231         (push_eh_cleanup): Just call __cp_pop_exception.
16232         (expand_start_catch_block): Use push_eh_info.  Start the eh region
16233         sooner.
16234         (expand_end_eh_spec): Use push_eh_info.
16235         (expand_throw): Call __cp_push_exception to set up the exception info.
16236         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
16237         when we rethrow.
16238         (expand_builtin_throw): Don't refer to empty_fndecl.
16239
16240 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
16241
16242         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
16243
16244 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
16245
16246         * method.c (build_template_parm_names, build_decl_overload_real):
16247         Add static to definitions.
16248         * pt.c (add_to_template_args, note_template_header,
16249         processing_explicit_specialization, type_unification_real): Likewise.
16250         ({determine,check}_explicit_specialization): Use a single string for
16251         error messages.
16252
16253 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
16254
16255         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
16256         (expand_end_catch_block): Likewise.
16257         (expand_end_eh_spec): Likewise.
16258
16259 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
16260
16261         * decl.c (duplicate_decls): Handle template specializations
16262         correctly.
16263         * error.c (dump_function_name): Fix printing of specializations of
16264         member functions that are not member templates.
16265         * cp-tree.h (processing_specialization): Make global.
16266         * pt.c (processing_specialization): Likewise.
16267         * lex.c (cons_up_default_function): Save and restore
16268         processing_specialization to avoid confusion.
16269
16270 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
16271
16272         * decl.c (init_decl_processing): Give null_node unknown* type.
16273         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
16274         (common_type): Likewise.
16275         * error.c (args_as_string): Recognize null_node.
16276
16277 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16278
16279         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
16280         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
16281
16282         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
16283
16284         * Make-lang.in (g++): Include prefix.o.
16285
16286 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
16287
16288         * pt.c (determine_explicit_specialization): Initialize "dummy"
16289         to keep Purify quiet.
16290
16291 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
16292
16293         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
16294         (build_overload_int): Not here.
16295
16296 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
16297
16298         * class.c (build_type_pathname): Remove.
16299         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
16300
16301 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
16302
16303         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
16304         &&label GNU extension.
16305
16306 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
16307
16308         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
16309         so as to avoid incorrect manglings.
16310         * method.c (build_decl_overload_real): Don't mangle return types
16311         for constructors.
16312
16313 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
16314
16315         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
16316         scratch_tree_cons): Define as macros for now.
16317         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
16318         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
16319         typeck2.c: Use them and the expression_obstack variants.
16320
16321 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16322
16323         * decl.c (store_return_init): Allow classes with explicit ctors to
16324         be used with the named return values extension.
16325
16326 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
16327
16328         * pt.c (instantiate_decl): Fix previous change.
16329
16330 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
16331
16332         * pt.c (tsubst): Fix thinko.
16333         (instantiate_decl): Really use the original template.
16334
16335         * call.c (build_new_method_call): Use simple constructor_name for
16336         error messages.
16337
16338 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
16339
16340         * method.c (build_underscore_int): Don't use ANSI specific
16341         features.
16342
16343 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
16344
16345         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
16346         for our key method; it might have been inlined by -O3.
16347
16348 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
16349
16350         * decl.c (make_typename_type): Do not try to call lookup_field for
16351         non-aggregate types.
16352
16353 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
16354
16355         * typeck.c (build_reinterpret_cast): Tweak.
16356
16357 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
16358
16359         * typeck.c (build_reinterpret_cast): Converting a void pointer
16360         to function pointer with a reinterpret_cast produces a warning
16361         if -pedantic is issued.
16362
16363 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
16364
16365         * typeck.c (c_expand_return): Don't warn about returning a
16366         reference-type variable as a reference.
16367
16368 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
16369
16370         * method.c (build_static_name): Fix typo.
16371
16372 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
16373
16374         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
16375         OLDDECL before we try to do DECL_USE_TEMPLATE.
16376
16377 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16378
16379         * decl.c (duplicate_decls): Don't warn about template instances.
16380
16381         * typeck.c (mark_addressable): Lose ancient code that unsets
16382         DECL_EXTERNAL.
16383
16384         * pt.c (do_decl_instantiation): Lose support for instantiating
16385         non-templates.
16386
16387         * call.c (build_new_function_call): Fix handling of null explicit
16388         template args.
16389         (build_new_method_call): Likewise.
16390
16391 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
16392
16393         * method.c (build_underscore_int): Fix typo.
16394
16395 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
16396
16397         * tree.c (print_lang_statistics): #if 0 call to
16398         print_inline_obstack_statistics until its definition is checked in.
16399
16400 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
16401
16402         * decl2.c (finish_file): Move dump_tree_statistics to end.
16403
16404         * pt.c (instantiate_decl): Look for the original template.
16405         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
16406         of member templates.
16407
16408 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
16409
16410         * Makefile.in (g++FAQ.*): New rules.
16411         (CONFLICTS): Update.
16412         * g++FAQ.texi: Moved from libg++.
16413
16414         * parse.y (PFUNCNAME): Only specify the type once.
16415
16416 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
16417
16418         * lex.c (real_yylex): Clean up the code to fully behave the way
16419         the c-lex.c parser does for complex and real numbers.
16420
16421 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16422
16423         * method.c (build_decl_overload_real): Reformat.
16424
16425 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
16426
16427         * method.c (synthesize_method): If at_eof, determine our linkage.
16428
16429 1997-09-29  Paul Eggert  <eggert@twinsun.com>
16430
16431         * lex.c (real_yylex): Treat `$' just like `_', except issue a
16432         diagnostic if !dollars_in_ident or if pedantic.
16433
16434         * lang-specs.h (@c++): -ansi no longer implies -$.
16435
16436         * decl2.c (lang_decode_option):
16437         -traditional and -ansi now do not mess with
16438         dollars_in_ident.
16439
16440 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
16441
16442         * Makefile.in (parse.o, decl.o): Also depend on
16443         $(srcdir)/../except.h $(srcdir)/../output.h.
16444         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
16445         $(srcdir)/../except.h $(srcdir)/../output.h.
16446         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
16447         ../insn-codes.h.
16448
16449         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
16450
16451         * expr.c (cplus_expand_expr): Make it static.
16452
16453         * decl2.c, init.c, typeck.c: Include "expr.h".
16454         (expand_expr): Use proper values when calling the function.
16455
16456 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
16457
16458         * lang-options.h: New -Wold-style-cast flag.
16459         * cp-tree.h (warn_old_style_cast): New variable.
16460         * decl2.c (warn_old_style_cast): Likewise.
16461         (lang_decode_option): Support -Wold-style-cast.
16462         (reparse_absdcl_as_casts): Produce old-style-cast warning.
16463
16464 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16465
16466         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
16467         TREE_USED, reset value based on already_used.
16468
16469         * init.c (expand_member_init): Revert change.
16470
16471 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
16472
16473         * cp-tree.h, decl.c, decl2.c, pt.c:
16474         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
16475
16476         * decl2.c (lang_decode_option): Add missing ;.
16477
16478 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
16479
16480         * friend.c (do_friend): Disable injection for all template-derived
16481         decls.
16482         * decl2.c (lang_decode_option): Handle -fguiding-decls.
16483         * parse.y (notype_template_declarator): New nonterminal.
16484         (direct_notype_declarator): Use it.
16485         (complex_direct_notype_declarator): Likewise.
16486         (object_template_id): Accept any kind of identifier after TEMPLATE.
16487         (notype_qualified_id): Don't add template declarators here.
16488
16489 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
16490
16491         * call.c (add_template_candidate): Add explicit_targs parameter.
16492         (build_scoped_method_call): Use it.
16493         (build_overload_call_real): Likewise.
16494         (build_user_type_conversion_1): Likewise.
16495         (build_new_function_call): Likewise.
16496         (build_object_call): Likewise.
16497         (build_new_op): Likewise.
16498         (build_new_method_call): Likewise.
16499         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
16500         (build_new_method_call): Likewise.
16501
16502         * class.c (finish_struct_methods): Add specialization pass to
16503         determine which methods were specializing which other methods.
16504         (instantiate_type): Handle TEMPLATE_ID_EXPR.
16505
16506         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
16507
16508         * cp-tree.h (name_mangling_version): New variable.
16509         (flag_guiding_decls): Likewise.
16510         (build_template_decl_overload): New function.
16511         (begin_specialization): Likewise.
16512         (reset_specialization): Likewise.
16513         (end_specialization): Likewise.
16514         (determine_explicit_specialization): Likewise.
16515         (check_explicit_specialization): Likewise.
16516         (lookup_template_function): Likewise.
16517         (fn_type_unification): Add explicit_targs parameter.
16518         (type_unification): Likewise.
16519
16520         * decl.c (duplicate_decls): Add smarts for explicit
16521         specializations.
16522         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
16523         specializations.
16524         (grokfndecl): Call check_explicit_specialization.
16525
16526         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
16527         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
16528         (check_classfn): Handle specializations.
16529
16530         * error.c (dump_function_name): Print specialization arguments.
16531
16532         * friend.c (do_friend): Don't call pushdecl for template
16533         instantiations.
16534
16535         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
16536
16537         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
16538         and -fno-guiding-decls.
16539
16540         * lex.c (identifier_type): Return PFUNCNAME for template function
16541         names.
16542
16543         * method.c (build_decl_overload_real): New function.
16544         (build_template_parm_names): New function.
16545         (build_overload_identifier): Use it.
16546         (build_underscore_int): New function.
16547         (build_overload_int): Use it.  Add levels for template
16548         parameters.
16549         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
16550         (build_overload_nested_names): Handle template type parameters.
16551         (build_template_decl_overload): New function.
16552
16553         * parse.y (YYSTYPE): New ntype member.
16554         (nested_name_specifier): Use it.
16555         (nested_name_specifier_1): Likewise.
16556         (PFUNCNAME): New token.
16557         (template_id, object_template_id): New non-terminals.
16558         (template_parm_list): Note specializations.
16559         (template_def): Likewise.
16560         (structsp): Likewise.
16561         (fn.def2): Handle member template specializations.
16562         (component_decl_1): Likewise.
16563         (direct_notype_declarator): Handle template-ids.
16564         (component_decl_1): Likewise.
16565         (direct_notype_declarator): Handle template-ids.
16566         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
16567
16568         * pt.c (processing_specializations): New variable.
16569         (template_header_count): Likewise.
16570         (type_unification_real): New function.
16571         (processing_explicit_specialization): Likewise.
16572         (note_template_header): Likewise.
16573         (is_member_template): Handle specializations.
16574         (end_template_decl): Call reset_specialization.
16575         (push_template_decl): Handle member template specializations.
16576         (tsubst): Likewise.
16577         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
16578         (instantiate_template): Handle specializations.
16579         (instantiate_decl): Likewise.
16580         (fn_type_unification): Handle explicit_targs.
16581         (type_unification): Likewise.  Allow incomplete unification
16582         without an error message, if allow_incomplete.
16583         (get_bindings): Use new calling sequence for fn_type_unification.
16584
16585         * spew.c (yylex): Handle PFUNCNAME.
16586
16587         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
16588         (really_overloaded_fn): Likewise.
16589         (get_first_fn): Handle function templates.
16590
16591         * typeck.c (build_x_function_call): Use really_overloaded_fn.
16592         Handle TEMPLATE_ID_EXPR.
16593         (build_x_unary_op): Likewise.
16594         (build_unary_op): Likewise.
16595         (mark_addressable): Templates whose address is taken are marked
16596         as used.
16597
16598 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
16599
16600         * decl.c (init_decl_processing): Declare __builtin_constant_p as
16601         accepting any kind of type, not only int.
16602
16603 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
16604
16605         * search.c (get_matching_virtual): Notice virtual bases when sorrying
16606         about covariant returns.
16607
16608         * parse.y (member_init): Also imply typename here.  Remove ancient
16609         extension for initializing base members.
16610
16611 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
16612
16613         Handle multi-level typenames and implicit typename in base list.
16614         * parse.y (typename_sub{,[0-2]}): New rules.
16615         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
16616         (nonnested_type): New rule.
16617         (complete_type_name): Use it.
16618         (base_class.1): Use typename_sub and nonnested_type.
16619         (nested_name_specifier): Don't elide std:: here.
16620         * decl.c (make_typename_type): Handle getting a type for NAME.
16621         (lookup_name_real): Turn std:: into :: here.
16622
16623         Rvalue conversions were removed in London.
16624         * call.c (is_subseq): Don't consider lvalue transformations.
16625         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
16626         (joust): Re-enable ?: kludge.
16627
16628 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
16629
16630         * decl.c (start_function): Up warning of no return type to be a
16631         pedwarn.
16632
16633 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16634
16635         * init.c (expand_member_init): Don't set TREE_USED.
16636         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
16637         set,don't clear TREE_USED wholesale.
16638
16639 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
16640
16641         * call.c (build_over_call): Do require_complete_type before
16642         build_cplus_new.
16643
16644 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
16645
16646         * search.c (lookup_field): Call complete_type in all cases.
16647
16648         * decl.c (finish_function): Just warn about flowing off the end.
16649
16650 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
16651
16652         * decl.c (grokparms): Don't bash a permanent list node if we're
16653         in a function.
16654
16655 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
16656
16657         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
16658
16659 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
16660
16661         * call.c (build_new_op): Give better error for syntactically
16662         correct, but semantically invalid, use of undeclared template.
16663
16664         * call.c (compare_qual): Handle pmfs.
16665
16666         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
16667         after the exception spec.
16668
16669 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
16670
16671         * call.c (null_ptr_cst_p): Integer type, not integral type.
16672
16673         * call.c (joust): Disable warnings until they can be moved to the
16674         right place.
16675
16676 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
16677
16678         * Makefile.in, config-lang.in:  Convert to autoconf.
16679
16680 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
16681
16682         * decl.c (lookup_name_real): Add implicit 'typename' to types from
16683         base classes.
16684
16685         * pt.c (most_specialized_class): Fix typo.
16686         (tsubst): Move constant folding to TREE_VEC case.
16687
16688 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
16689
16690         * pt.c (do_poplevel): Don't warn about unused local variables
16691         while processing_template_decl since we don't always know whether
16692         or not they will need constructing/destructing.
16693
16694         * pt.c (uses_template_parms): Check the values of an enumeration
16695         type to make sure they don't depend on template parms.
16696
16697         * decl.c (make_typename_type): Don't lookup the field if the
16698         context uses template parms, even if we're not
16699         processing_template_decl at the moment.
16700
16701         * pt.c (coerce_template_parms): Avoid looking at the
16702         TYPE_LANG_DECL portion of a typename type, since there won't be
16703         one.
16704         (tsubst): Do constant folding as necessary to make sure that
16705         arguments passed to lookup_template_class really are constants.
16706
16707 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
16708
16709         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
16710         * decl2.c (finish_file): Only register exception tables if we
16711         need to.
16712
16713         * decl.c (init_decl_processing): Add __builtin_[fs]p.
16714
16715 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
16716
16717         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
16718
16719 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
16720
16721         * error.c (dump_decl): Avoid crashing when presented with a
16722         uninitialized constant, as can occur with a template parameter.
16723         (dump_expr): Make sure that there are enough levels of
16724         current_template_parms before we start diving through them.
16725
16726 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
16727
16728         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
16729         c-typeck.c.
16730
16731 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16732
16733         * except.c (expand_throw): Call build_delete for all
16734         exception types, not just objects with destructors.
16735
16736 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
16737
16738         * decl.c (current_local_enum): Remove static.
16739         * pt.c (tsubst_enum): Save and restore value of current_local_enum
16740         in case template is expanded in enum decl.
16741         (instantiate_class_template): Use new tsubst_enum signature.
16742         (tsubst_expr): Likewise.
16743
16744 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
16745
16746         * pt.c (begin_member_template_processing): Take a function as
16747         argument, not a set of template arguments.  Use the template
16748         parameters, rather than the arguments.  Handle non-type parameters
16749         correctly.  Push a binding level for the parameters so that multiple
16750         member templates using the same parameter names can be declared.
16751         (end_member_template_processing): Pop the binding level.
16752         (push_template_decl): Mark member templates as static when
16753         appropriate.
16754
16755         * lex.c (do_pending_inlines): Pass the function, not its template
16756         arguments, to begin_member_template_processing.
16757         (process_next_inline): Likewise.
16758         (do_pending_defargs): Likewise.
16759
16760         * error.c (dump_expr): Obtain the correct declaration for a
16761         TEMPLATE_CONST_PARM.
16762
16763         * call.c (add_template_conv_candidate): New function.
16764         (build_object_call): Handle member templates, as done in the other
16765         build_ functions.
16766
16767 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
16768
16769         * decl.c (replace_defag): Undo previous change.
16770         * lex.c (do_pending_defargs): Deal with member templates.
16771
16772         * pt.c (is_member_template): Avoid crashing when passed a
16773         non-function argument.
16774
16775 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
16776
16777         * class.c (grow_method): Remove check for redeclaration.
16778
16779 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
16780
16781         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
16782         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
16783         (PRIMARY_TEMPLATE_P): Use it.
16784         * call.c (build_overload_call_real): Use it.
16785         * class.c (instantiate_type): Likewise.
16786         * decl.c (decls_match): Likewise.
16787         * method.c (build_overload_identifier): Likewise.
16788         * pt.c (push_template_decl): Likewise.
16789         (classtype_mangled_name): Likewise.
16790         (lookup_template_class): Likewise.
16791
16792         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
16793         DECL_NTPARMS to conform to usage elsewhere.
16794         * call.c (add_template_candidate): Likewise.
16795         * class.c (instantiate_type): Likewise.
16796         * pt.c (instantiate_template): Likewise.
16797         (get_bindings): Likewise.
16798
16799         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
16800         is_member_template.
16801
16802         * pt.c (unify): Undo changes to allow multiple levels of template
16803         parameters.
16804         (type_unification): Likewise.
16805         (fn_type_unification): Likewise.
16806         (get_class_bindings): Likewise.
16807         * cp-tree.h (Likewise).
16808
16809         * decl.c (replace_defarg): Check that the type of the default
16810         parameter does not invlove a template type before complaining
16811         about the initialization.
16812
16813         * error.c (dump_expr): Deal with template constant parameters in
16814         member templates correctly.
16815
16816         * pt.c (is_member_template): Deal with class specializations
16817         correctly.
16818         (tsubst): Handle "partial instantiation" of member templates
16819         correctly.
16820
16821 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
16822
16823         * pt.c (type_unification): Change calling sequence to allow for
16824         multiple levels of template parameters.
16825         (tsubst_expr): Likewise.
16826         (tsubst): Likewise.
16827         (tsubst_copy): Likewise.
16828         (instantiate_template): Likewise.
16829         (unify): Likewise.
16830         * call.c (build_overload_call_real): Use it.
16831         (add_builtin_candidate): Use it.
16832         (build_new_method_call): Use it.
16833         * class.c (instantiate_type): Use it.
16834         * decl.c (grokdeclarator): Use it.
16835         * decl2.c (finish_file): Use it.
16836         * method.c (build_overload_identifier): Use it.
16837
16838         * call.c (add_template_candidate):  Add additional parameter for
16839         the function return type.  Call fn_type_unification istead of
16840         type_unification.
16841         (build_user_type_conversion_1): Handle member templates.
16842         (build_new_function_call): Likewise.
16843         (build_new_op): Likewise.
16844         (build_new_method_call): Likewise.
16845
16846         * class.c (grow_method): Don't give an error message indicating
16847         that two member templates with the same name are ambiguous.
16848         (finish_struct): Treat member template functions just like member
16849         functions.
16850
16851         * cp-tree.h (check_member_template): Add declaration.
16852         (begin_member_template_processing): Likewise.
16853         (end_member_template_processing): Likewise.
16854         (fn_type_unification): Likewise.
16855         (is_member_template): Likewise.
16856         (tsubst): Change prototype.
16857         (tsubst_expr): Likewise.
16858         (tsubst_copy): Likewise.
16859         (instantiate_template): Likewise.
16860         (get_bindings): Likewise.
16861
16862         * decl.c (decls_match): Handle multiple levels of template
16863         parameters.
16864         (pushdecl): Handle template type params just like other type
16865         declarations.
16866         (push_class_level_binding): Return immediately if the
16867         class_binding_level is NULL.
16868         (grokfndecl): If check_classfn() returns a member_template, use
16869         the result of the template, not the template itself.
16870
16871         * decl2.c (check_member_template): New function.  Check to see
16872         that the entity declared to be a member template can be one.
16873         (check_classfn): Allow redeclaration of member template functions
16874         with different types; the new functions can be specializations or
16875         explicit instantiations.
16876
16877         * error.c (dump_decl): Handle multiple levels of template
16878         parameters.
16879         (dump_function_decl): Update to handle function templates.
16880
16881         * lex.c (do_pending_inlines): Set up template parameter context
16882         for member templates.
16883         (process_next_inline): Likewise.
16884
16885         * method.c (build_overload_identifier): Adjust for multiple levels
16886         of template parameters.
16887
16888         * parse.y (fn.def2): Add member templates.
16889         (component_decl_1): Likewise.
16890
16891         * pt.c (begin_member_template_processing): New function.
16892         (end_member_template_processing): Likewise.
16893         (is_member_template): Likewise.
16894         (fn_type_unification): Likewise.
16895         (current_template_parms): Return a vector of all the template
16896         parms, not just the innermost level of parms.
16897         (push_template_decl): Deal with the possibility of member
16898         templates.
16899         (lookup_template_class): Likewise.
16900         (uses_template_parms): Likewise.
16901         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
16902         TEMPLATE_CONST_PARM to deal with multiple levels of template
16903         arguments.   Add processing of TEMPLATE_DECL to produce new
16904         TEMPLATE_DECLs from old ones.
16905         (do_decl_instantiation): Handle member templates.
16906
16907         * search.c (lookup_fnfields_1): Handle member template conversion
16908         operators.
16909
16910         * tree.c (cp_tree_equal): Check the levels, as well as the
16911         indices, of TEMPLATE_CONST_PARMs.
16912
16913         * typeck.c (comptypes): Check the levels, as well as the indices,
16914         fo TEMPLATE_TYPE_PARMs.
16915         (build_x_function_call): Treat member templates like member
16916         functions.
16917
16918 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
16919
16920         * typeck.c (c_expand_return): Always convert_for_initialization
16921         before checking for returning a pointer to local.
16922
16923         * pt.c (type_unification): If strict and the function parm doesn't
16924         use template parms, just compare types.
16925
16926 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
16927
16928         * method.c (build_overloaded_value): Replace direct call
16929         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
16930
16931 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
16932
16933         * typeck.c (convert_arguments): Don't arbitrarily choose the first
16934         of a set of overloaded functions.
16935
16936 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
16937
16938         * lex.c (real_yylex): Don't elide __FUNCTION__.
16939
16940         * method.c (build_overload_value): Add in_template parm.
16941         (build_overload_int): Likewise.
16942         (build_overload_identifier): Pass it.
16943
16944         * decl.c (duplicate_decls): Don't bash a previous template
16945         definition with a redeclaration.
16946
16947         * pt.c (unify): float doesn't match double.
16948
16949         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
16950         TYPE_DECL.  Handle getting non-template types.
16951         * parse.y (explicit_instantiation): Use typespec instead of
16952         aggr template_type.
16953
16954 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
16955
16956         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
16957
16958 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
16959
16960         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
16961         (compare_ics): Likewise.
16962
16963 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
16964
16965         * call.c (joust): Warn about choosing one conversion op over
16966         another because of 'this' argument when the other return type is
16967         better.
16968         (source_type): New fn.
16969
16970         * call.c (build_new_op): Strip leading REF_BIND from first operand
16971         to builtin operator.
16972
16973         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
16974         use its RTL.
16975
16976 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
16977
16978         * call.c (null_ptr_cst_p): Remove support for (void*)0.
16979
16980 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
16981
16982         * typeck.c (expand_target_expr): Make definition match declaration.
16983
16984         * class.c (get_basefndecls): Make definition match declaration.
16985
16986 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
16987
16988         * input.c (sub_getch): Eventually give up and release the input file.
16989
16990         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
16991         right place.
16992
16993         * call.c (joust): Tweak message.
16994
16995 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
16996
16997         * error.c (type_as_string): Put const/volatile on template type
16998         parameters where appropriate.
16999
17000 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
17001
17002         * call.c (strictly_better): Make arguments unsigned ints.
17003
17004 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
17005
17006         * lex.c (real_yylex): Refer to __complex instead of complex.
17007
17008 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
17009
17010         * lex.c (real_yylex): Don't use getc directly.
17011
17012 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
17013
17014         * call.c (is_subseq): Don't try to be clever.
17015
17016 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
17017
17018         * parse.y, pt.c: Include "except.h".
17019         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
17020         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
17021         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
17022         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
17023         prototyping.
17024
17025 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
17026
17027         * decl2.c (mark_vtable_entries): Instead of replacing pure
17028         virtuals with a reference to __pure_virtual, copy the decl and
17029         change the RTL.
17030
17031 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
17032
17033         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
17034
17035         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
17036
17037         * pt.c (instantiate_class_template): Call repo_template_used
17038         before finish_prevtable_vardecl.
17039
17040         * call.c (is_subseq): New fn.
17041         (compare_ics): Use it.
17042
17043         * repo.c (finish_repo): Don't crash on no args.
17044
17045         * parse.y (named_complex_class_head_sans_basetype): Handle
17046         explicit global scope.
17047         * decl2.c (handle_class_head): New fn.
17048
17049         * pt.c (unify): Add CONST_DECL case.
17050
17051 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17052
17053         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
17054
17055         * cp-tree.h (report_type_mismatch): Add prototype.
17056         * call.c (build_overload_call_real): Remove erroneous fourth
17057         argument to report_type_mismatch.
17058         (build_user_type_conversion_1): Remove erroneous second arg to
17059         tourney.
17060         (build_new_function_call): Likewise.
17061         (build_object_call): Likewise.
17062         (build_new_op): Likewise.
17063         (build_new_method_call): Likewise.
17064
17065 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
17066
17067         * error.c (dump_decl): Don't bother processing a function with no
17068         DECL_LANG_SPECIFIC.
17069
17070         * method.c (emit_thunk): Call init_function_start in the macro case.
17071
17072 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
17073
17074         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
17075         defined and used to set flag_vtable_thunks.
17076
17077 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
17078
17079         * parse.y: Don't clear the inlines from their obstack until they've
17080         all been processed.
17081
17082         * decl.c (duplicate_decls): Don't complain about exception
17083         specification mismatch if flag_exceptions is off.
17084
17085 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
17086
17087         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
17088
17089 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
17090
17091         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
17092         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
17093         Include <stdio.h> before include files that formerly used STDIO_PROTO.
17094
17095         * decl.c, g++spec.c, lex.c, method.c, repo.c:
17096         Include "config.h" first, as per autoconf manual.
17097
17098 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
17099
17100         * decl.c (duplicate_decls): Tweak wording.
17101         * lex.c (do_pending_defargs): Don't die if we see a default arg
17102         that isn't a DEFAULT_ARG.
17103         * error.c (dump_expr): Handle DEFAULT_ARG.
17104
17105         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
17106         * lang-options.h: Add -fhandle-exceptions.
17107
17108         * class.c (build_vtable): Vtables are artificial.
17109         (prepare_fresh_vtable): Likewise.
17110
17111 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
17112
17113         * cvt.c (ocp_convert): After converting to the target type, set
17114         LOOKUP_NO_CONVERSION.
17115
17116         * call.c (joust): Warn about potentially confusing promotion rules
17117         with -Wsign-promo.
17118         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
17119
17120 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
17121
17122         * exception.cc: Declare __terminate_func with noreturn attribute.
17123
17124 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
17125
17126         * parse.y: Break out eat_saved_input, handle errors.
17127         (function_try_block): Use compstmt instead of compstmt_or_error.
17128
17129 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
17130
17131         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
17132
17133 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
17134
17135         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
17136         existence of cc1plus check whether $(LANGUAGES) contains C++.
17137
17138 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
17139
17140         * method.c (do_build_copy_constructor): When copying an anonymous
17141         union member loop around to handle nested anonymous unions.  Use
17142         the offset of the member relative to the outer structure, not the
17143         union.
17144
17145 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
17146
17147         * call.c (resolve_args): New fn.
17148         (build_new_function_call): Use it.
17149         (build_object_call): Likewise.
17150         (build_new_method_call): Likewise.
17151
17152 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
17153
17154         * call.c (build_over_call): tsubst all default parms from templates.
17155
17156 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
17157
17158         * decl.c (struct cp_function): Add static_labelno.
17159         (push_cp_function_context): Save it.
17160         (pop_cp_function_context): Restore it.
17161
17162 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
17163
17164         * typeck.c (build_component_ref_1): Convert from reference.
17165
17166 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17167
17168         * parse.y (current_declspecs, prefix_attributes): Initialize to
17169         NULL_TREE.
17170
17171         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
17172         before we try to force it to be a TREE_LIST.
17173         (decl): Make sure $1.t is non-nil.
17174
17175 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
17176
17177         * pt.c (uses_template_parms): Handle template first-parse codes.
17178
17179         * decl.c (cp_finish_decl): Only warn about user-defined statics.
17180
17181 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
17182
17183         * pt.c (unify): Handle BOOLEAN_TYPE.
17184
17185         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
17186         * pt.c (tsubst): Don't set it.
17187         * call.c (build_over_call): Use uses_template_parms.
17188
17189 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
17190
17191         * method.c (build_overload_nested_name): Use static_labelno
17192         instead of var_labelno.
17193         (build_qualified_name): New fn.
17194         (build_overload_name): Split out from here.
17195         (build_static_name): Use build_qualified_name.
17196         * decl.c (cp_finish_decl): Statics in extern inline functions
17197         have comdat linkage.
17198         (start_function): Initialize static_labelno.
17199
17200 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
17201
17202         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
17203         before "all member functions in class [] are private".
17204
17205 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
17206
17207         * lex.c (do_scoped_id): convert_from_reference.
17208         * init.c (build_offset_ref): Likewise.
17209
17210 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
17211
17212         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
17213
17214 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
17215
17216         * typeck.c (get_member_function_from_ptrfunc): Promote index
17217         before saving it.
17218
17219 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
17220
17221         * tree.c (layout_basetypes): Move non-virtual destructor warning.
17222         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
17223
17224 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
17225
17226         * decl.c (grokdeclarator): Call add_defarg_fn for the function
17227         type, too.
17228         * lex.c (add_defarg_fn): Adjust.
17229         (do_pending_defargs): Adjust.  Don't skip the first parm.
17230
17231 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
17232
17233         * decl.c (build_enumerator): Global enumerators are also readonly.
17234
17235         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
17236         (build_dynamic_cast): Call it and convert_from_reference.
17237
17238         * lex.c (add_defarg_fn): New fn.
17239         (snarf_defarg): Don't add to defarg_types.
17240         (do_pending_defargs): Lose defarg_types.  All fns we process now
17241         have defargs.
17242         * decl.c (grokfndecl): Call add_defarg_fn.
17243
17244         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
17245         * cp-tree.def: Add DEFAULT_ARG.
17246         * spew.c (yylex): Call snarf_defarg as appropriate.
17247         * parse.y: New tokens DEFARG and DEFARG_MARKER.
17248         (defarg_again, pending_defargs, defarg, defarg1): New rules.
17249         (structsp): Use pending_defargs.
17250         (parms, full_parm): Use defarg.
17251         * lex.c (init_lex): Initialize inline_text_firstobj.
17252         (do_pending_inlines): Never pass the obstack to feed_input.
17253         (process_next_inline): Call end_input instead of restore_pending_input.
17254         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
17255         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
17256         * input.c (end_input): New fn.
17257         (sub_getch): At the end of some fed input, just keep returning EOF
17258         until someone calls end_input.
17259         Remove 'obstack' field from struct input_source.
17260         * decl.c (grokparms): Handle DEFAULT_ARG.
17261         (replace_defarg): New fn.
17262         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
17263
17264 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
17265
17266         * call.c (implicit_conversion): If nothing else works, try binding
17267         an rvalue to a reference.
17268
17269 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
17270
17271         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
17272         ifndef for Cygwin32 to include SIGSEGV.
17273
17274 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
17275
17276         * class.c (finish_struct_1): Only complain about pointers without
17277         copy stuff if there are any constructors.
17278
17279         * rtti.c (build_dynamic_cast): Call complete_type on the types.
17280
17281         * decl.c (grokfndecl): If the function we chose doesn't actually
17282         match, die.
17283
17284         * decl2.c (grokclassfn): Don't specify 'const int' for the
17285         artificial destructor parm.
17286
17287         * pt.c (type_unification): If we are called recursively, nothing
17288         decays.
17289
17290 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
17291
17292         * decl.c (init_decl_processing): Stop trying to catch signals
17293         other than SIGABRT since the Cygwin32 library doesn't support
17294         them correctly yet.  This fixes a situation in which g++ causes
17295         a hang on SIGSEGVs and other such signals in our Win32-hosted
17296         tools.
17297
17298 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
17299
17300         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
17301
17302 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
17303
17304         * typeck2.c (store_init_value): Always return the value if our
17305         type needs constructing.
17306
17307         * method.c (hack_identifier): Convert class statics from
17308         reference, too.
17309
17310 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
17311
17312         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
17313
17314 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
17315
17316         * typeck.c (c_expand_return): Make sure we clean up temporaries at
17317         the end of return x;
17318
17319 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17320
17321         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
17322
17323 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
17324
17325         * except.c (expand_builtin_throw): Add support
17326         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
17327
17328 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
17329
17330         * repo.c (extract_string): Null-terminate.
17331
17332         * cp-tree.h (TI_SPEC_INFO): New macro.
17333         (CLASSTYPE_TI_SPEC_INFO): New macro.
17334         * pt.c (push_template_decl): Correctly determine # of template parms
17335         for partial specs.
17336
17337         * call.c (compare_ics): Really fix 'this' conversions.
17338
17339         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
17340         non-template fn.
17341
17342         * pt.c (push_template_decl): Complain about mismatch in # of
17343         template parms between a class template and a member template.
17344
17345 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
17346
17347         * method.c (synthesize_method): You can't call
17348         function_cannot_inline_p after finish_function.
17349         * decl.c (finish_function): Turn on flag_inline_functions and turn
17350         off DECL_INLINE before handing a synthesized method to the
17351         backend.
17352
17353 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
17354
17355         * method.c (synthesize_method): Remove July 30 change to never set
17356         DECL_INLINE if at_eof.
17357
17358 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
17359
17360         * xref.c (GNU_xref_member): Ensure that the node has a
17361         decl_lang_specific part before checking DECL_FRIEND_P.
17362
17363 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
17364
17365         * pt.c (instantiate_class_template): Diagnose non-class types used
17366         as bases.
17367
17368 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
17369
17370         * typeck.c (build_conditional_expr): Use convert_for_initialization
17371         instead of convert_and_check.
17372
17373 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17374
17375         * parse.y (typespec): Don't pedwarn for typeof.
17376
17377 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
17378
17379         * repo.c (finish_repo): Only check changes if we would write a
17380         repo file.
17381
17382         * call.c (compare_ics): Fix handling of 'this' conversions.
17383
17384         * pt.c (do_decl_instantiation): Support static data too.  Rename
17385         from do_function_instantiation.
17386         * cp-tree.h: Adjust.
17387         * parse.y: Adjust.
17388
17389         * repo.c (extract_string): New fn.
17390         (get_base_filename): Use it.
17391         (init_repo): Compare old args with current args.
17392
17393 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
17394
17395         * Makefile.in, Make-lang.in: Protect C-ls with a comment
17396         character, idea from Paul Eggert <eggert@twinsun.com>.
17397
17398 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
17399
17400         * typeck.c (c_expand_return): Be more persistent in looking for
17401         returned temps.
17402
17403         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
17404         pointer to reference.
17405
17406         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
17407
17408 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
17409
17410         * init.c (build_member_call, build_offset_ref):
17411         Use do_scoped_id instead of do_identifier.
17412
17413         * cvt.c (convert): Remove bogosity.
17414
17415 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17416
17417         * cvt.c (build_up_reference): Do checks of ARGTYPE and
17418         TARGET_TYPE before trying to use get_binfo.
17419
17420 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
17421
17422         * cvt.c (build_up_reference): Call get_binfo to get access control.
17423
17424         * decl2.c (import_export_decl): If we don't support weaks, leave
17425         statics undefined.
17426
17427 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
17428
17429         * except.c (expand_builtin_throw): Add support for machines that
17430         cannot access globals after throw's epilogue when
17431         -fno-sjlj-exceptions is used.
17432
17433 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
17434
17435         * parse.y: 'std::' becomes '::'.
17436         * lex.c (real_yylex): Remove 'namespace' warning.
17437         * init.c (build_member_call): Ignore 'std::'.
17438         (build_offset_ref): Likewise.
17439         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
17440         (do_toplevel_using_decl): Ignore 'using std::whatever'.
17441         * decl.c (push_namespace): Just sorry.
17442         (pop_namespace): Nop.
17443         (init_decl_processing): Declare std namespace.
17444
17445 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
17446
17447         * search.c (push_class_decls): A name which ambiguously refers to
17448         several instantiations of the same template just refers to the
17449         template.
17450
17451 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
17452
17453         * decl.c (build_enumerator): Fix problem with unsigned long
17454         enumerated values being smashed to ints, causing overflow
17455         when computing next enumerated value (for enum values around
17456         MAX_VAL).
17457
17458 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
17459
17460         * typeck.c (build_component_ref): Only call mark_used on a decl.
17461
17462 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17463
17464         * typeck.c (build_c_cast): Make the check for a ptr to function
17465         more specific before possible default_conversion call.
17466
17467 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
17468
17469         * except.c (expand_exception_blocks): Simplify and fix and make
17470         sure we don't end a region in a sequence, as expand_end_bindings
17471         doesn't like it.
17472
17473 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
17474
17475         * except.c (init_exception_processing): Mark terminate as not
17476         returning so that the optimizer can optimize better.
17477
17478 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
17479
17480         * cvt.c (convert): Don't do any extra work, if we can avoid it
17481         easily.
17482
17483 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
17484
17485         * *.[chy]: Change cp_convert to ocp_convert, change convert to
17486         cp_convert.  convert is now reserved for the backend, and doesn't
17487         have the semantics a frontend person should ever want.
17488
17489 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
17490
17491         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
17492         Lose -traditional support.
17493
17494 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
17495
17496         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
17497
17498         * parse.y (self_reference): Do it for templates, too.
17499         * class.c (pushclass): Don't overload_template_name; the alias
17500         generated by build_self_reference serves the same purpose.
17501
17502         * tree.c (list_hash): Make static, take more args.
17503         (list_hash_lookup): Likewise.
17504         (list_hash_add): Make static.
17505         (list_hash_canon): Lose.
17506         (hash_tree_cons): Only build a new node if one isn't already in the
17507         hashtable.
17508         (hash_tree_chain): Use hash_tree_cons.
17509         * cp-tree.h: Adjust.
17510         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
17511         of calling lookup_name.
17512
17513 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
17514
17515         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
17516         doesn't refer to the CONST_DECLs.
17517
17518 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
17519
17520         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
17521         is bigger.
17522         (expand_class_desc): Convert the last argument to a sizetype.
17523
17524 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17525
17526         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
17527         __real__): Add reswords.
17528         * hash.h: Regenerate.
17529         * lex.h (rid): Add RID_COMPLEX.
17530         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
17531         * lex.c (init_lex): Add building of RID_COMPLEX.
17532         (real_yylex): General cleanup in line with what c-lex.c also has,
17533         sans the cruft for traditional; add handling of SPEC_IMAG, complex
17534         types, and imaginary numeric constants.
17535         * parse.y (REALPART, IMAGPART): Add tokens.
17536         (unary_expr): Add REALPART and IMAGPART rules.
17537         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
17538         * decl.c (complex_{integer,float,double,long}_type_node): Define
17539         types.
17540         (init_decl_processing): Set up the types.
17541         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
17542         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
17543         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
17544         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
17545         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
17546         COMPLEX_TYPE case.
17547         * method.c (build_overload_name): Add handling of the different
17548         COMPLEX_TYPEs, prefixing them with `J'.
17549         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
17550         as a template parm.
17551         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
17552         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
17553         (mapcar): Handle COMPLEX_CST.
17554         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
17555         (common_type): Add code for complex types.
17556         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
17557         (convert_for_assignment): Likewise.
17558         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
17559
17560 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
17561
17562         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
17563         tsubst_expr, as it might try to do overload resolution.
17564
17565 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
17566
17567         * pt.c (instantiate_class_template): Oops.
17568
17569 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
17570
17571         * cp-tree.def: Add TAG_DEFN.
17572         * pt.c (tsubst_enum): New fn.
17573         (instantiate_class_template): Use it.
17574         (tsubst_expr): Support TAG_DEFN.
17575         (tsubst): Support local enums.
17576         (tsubst_copy): Likewise.
17577         * decl.c (finish_enum): Likewise.
17578         (start_enum): If this is a local enum, switch to permanent_obstack.
17579
17580 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
17581
17582         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
17583         (finish_function): Put the base init code for constructors just
17584         after the parm cleanup insns.
17585         (struct cp_function): Add last_parm_cleanup_insn.
17586         (push_cp_function_context): Likewise.
17587         (pop_cp_function_context): Likewise.
17588
17589 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
17590
17591         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
17592
17593 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17594
17595         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
17596         for THUNK_FNDECL before we switch to temporary allocation.
17597
17598 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
17599
17600         * call.c (build_new_op): Handle null arg2 for ?:.
17601
17602 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
17603
17604         * except.c (expand_exception_blocks): Ensure that we flow through
17605         the end of the exception region for the exception specification.
17606         Move exception region for the exception specification in, so that
17607         it doesn't protect the parm cleanup.  Remove some obsolete code.
17608         * decl.c (store_parm_decls): Likewise.
17609         (finish_function): Likewise.
17610
17611 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
17612
17613         * init.c (build_new): Fix nothrow handling.
17614
17615 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17616
17617         * init.c (emit_base_init): Don't warn about the initialization
17618         list for an artificial member.
17619
17620 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17621
17622         * expr.c (do_case): Handle !START case for the error msg.
17623
17624 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
17625
17626         * decl2.c, lang-options.h: New option -Weffc++.
17627         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
17628         to -Weffc++.
17629
17630         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
17631         to MULTIPLE_SYMBOL_SPACES.
17632
17633 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
17634
17635         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
17636
17637         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
17638
17639         * typeck.c (c_expand_return): Don't complain about returning void
17640         to void in an artificial function.
17641         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
17642         don't set DECL_RESULT, set DECL_ARTIFICIAL.
17643         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
17644
17645 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
17646
17647         * init.c (init_decl_processing): Add support for setjmp/longjmp based
17648         exception handling.
17649         * except.c (init_exception_processing): Likewise.
17650         (expand_end_catch_block): Likewise.
17651         (expand_exception_blocks): Likewise.
17652         (expand_throw): Likewise.
17653         * exception.cc (__default_terminate): Likewise.
17654
17655         * init.c (perform_member_init): Use new method of expr level
17656         cleanups, instead of cleanups_this_call and friends.
17657         (emit_base_init): Likewise.
17658         (expand_aggr_vbase_init_1): Likewise.
17659         (expand_vec_init): Likewise.
17660         * decl.c (cp_finish_decl): Likewise.
17661         (expand_static_init): Likewise.
17662         (store_parm_decls): Likewise.
17663         (cplus_expand_expr_stmt): Likewise.
17664         * decl2.c (finish_file): Likewise.
17665
17666         * Make-lang.in (exception.o): Ok to compile with -O now.
17667
17668         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
17669         we know it will be done later by the backend.
17670
17671         * decl2.c (lang_f_options): Remove support for short temps.
17672         * lang-options.h: Likewise.
17673
17674 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
17675
17676         * tree.c (varargs_function_p): New fn.
17677         * method.c (emit_thunk): Replace broken generic code with code to
17678         generate a heavyweight thunk function.
17679
17680 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
17681
17682         * pt.c (process_template_parm): pedwarn about floating-point parms.
17683
17684         * decl.c (grokdeclarator): inline no longer implies static.
17685
17686         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
17687
17688 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
17689
17690         * class.c (check_for_override): The signature of an overriding
17691         function is not changed.
17692
17693         * call.c (build_over_call): Move setting of conv into the loop.
17694         Note: this change, along with the related changes of the 18th thru
17695         the 20th of April, fix an infinite loop problem in conversions.
17696
17697 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
17698
17699         * call.c (build_user_type_conversion_1): Really ignore rvalue
17700         conversions when looking for a REFERENCE_TYPE.
17701
17702         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
17703         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
17704         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
17705         (build_unary_op): Likewise.
17706         * call.c (build_over_call): See through a CONVERT_EXPR around the
17707         ADDR_EXPR for on a temporary.
17708         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
17709         the ADDR_EXPR for a local variable.
17710
17711 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
17712
17713         * call.c (build_user_type_conversion_1): If we're trying to
17714         convert to a REFERENCE_TYPE, only consider lvalue conversions.
17715         (build_new_function_call): Print candidates.
17716         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
17717         (reference_binding): Binding a temporary of a reference-related type
17718         is BAD.
17719
17720 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17721
17722         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
17723         * tinfo2.cc (type_info::before): Likewise.
17724
17725 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
17726
17727         * call.c (implicit_conversion): Oops.
17728
17729 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
17730
17731         * call.c (implicit_conversion): Try to find a reference conversion
17732         before binding a const reference to a temporary.
17733
17734 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
17735
17736         * exception.cc (__default_unexpected): Call terminate by default,
17737         so that if the user overrides terminate, the correct function will
17738         be called.
17739
17740 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
17741
17742         * parse.y (left_curly): Avoid trying to use any fields of
17743         error_mark_node, as there aren't any.
17744
17745 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
17746
17747         * lex.c (do_identifier): Avoid breaking on overloaded methods
17748         as default arguments.
17749
17750 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
17751
17752         * call.c (add_template_candidate): Initialize the variable "dummy".
17753
17754 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
17755
17756         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
17757         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
17758
17759 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17760
17761         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
17762         (debug_binfo): Delete decl, not needed.
17763
17764         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
17765         promotes_to_aggr_type): Delete fns.
17766         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
17767         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
17768         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
17769
17770         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
17771
17772         * friend.c (is_friend_type): Delete fn.
17773         * cp-tree.h (is_friend_type): Delete decl.
17774
17775         * decl.c (original_result_rtx, double_ftype_double,
17776         double_ftype_double_double, int_ftype_int, long_ftype_long,
17777         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
17778         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
17779
17780         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
17781         fwd decls.
17782         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
17783
17784         * decl.c (pushdecl_nonclass_level): #if 0, unused.
17785         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
17786
17787         * lex.c (reinit_lang_specific): #if 0, unused.
17788         * cp-tree.h (reinit_lang_specific): #if 0 decl.
17789
17790         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
17791         * cp-tree.h (revert_static_member_fn): Delete decl.
17792
17793         * class.c (root_lang_context_p): Delete fn.
17794         * cp-tree.h (root_lang_context_p): Delete decl.
17795
17796         * decl.c (set_current_level_tags_transparency): #if 0, unused.
17797         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
17798
17799         * lex.c (set_vardecl_interface_info): Make static.
17800         * cp-tree.h (set_vardecl_interface_info): Delete decl.
17801
17802         * call.c (find_scoped_type): Make static.
17803         * cp-tree.h (find_scoped_type): Delete decl.
17804
17805         * search.c (convert_pointer_to_vbase): Make static.
17806         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
17807
17808         * decl.c (const_ptr_type_node): Likewise.
17809         * cp-tree.h (const_ptr_type_node): Delete decl.
17810
17811         * typeck.c (common_base_type): Make static.
17812         * cp-tree.h (common_base_types): Delete erroneous decl.
17813
17814         * pt.c (classtype_mangled_name): Make static.
17815         * cp-tree.h (classtype_mangled_name): Delete decl.
17816
17817         * lex.c (check_newline): Make static.
17818         * cp-tree.h (check_newline): Delete decl.
17819
17820         * typeck.c (build_x_array_ref): Delete fn, same idea as
17821         grok_array_decl.
17822         * cp-tree.h (build_x_array_ref): Delete decl.
17823
17824         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
17825         copy_lang_decl.
17826         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
17827
17828         * class.c (build_vtable_entry): Make static.
17829         * cp-tree.h (build_vtable_entry): Delete decl.
17830
17831         * class.c (build_vbase_pointer): Make static.
17832         * cp-tree.h (build_vbase_pointer): Delete decl.
17833
17834         * sig.c (build_sptr_ref): Add forward decl and make static.
17835         * cp-tree.h (build_sptr_ref): Delete decl.
17836
17837         * call.c (build_new_method_call): Add forward decl and make static.
17838         * cp-tree.h (build_new_method_call): Delete decl.
17839
17840         * call.c (build_object_call): Make static.
17841         * class.c (check_for_override, complete_type_p, mark_overriders):
17842         Likewise.
17843         * decl.c (cp_function_chain): Likewise.
17844         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
17845         Likewise.
17846         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
17847         Likewise.
17848         * tree.c (build_cplus_array_type_1): Likewise.
17849         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
17850         (comp_target_parms): Likewise.
17851
17852         * init.c (build_builtin_call): Make static.
17853         * cp-tree.h (build_builtin_call): Delete decl.
17854
17855         * typeck.c (binary_op_error): Delete decl.
17856         * cp-tree.h (binary_op_error): Likewise.
17857
17858 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17859
17860         * call.c (build_method_call): Compare against error_mark_node
17861         directly, rather than the ERROR_MARK tree code.
17862         * cvt.c (cp_convert): Likewise.
17863         * decl.c (print_binding_level): Likewise.
17864         (duplicate_decls): Likewise.
17865         (grokdeclarator): Likewise.
17866         (grokdeclarator): Likewise.
17867         * init.c (expand_aggr_init_1): Likewise.
17868         (decl_constant_value): Likewise.
17869         * method.c (build_opfncall): Likewise.
17870         (hack_identifier): Likewise.
17871         * typeck.c (build_modify_expr): Likewise.
17872
17873         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
17874
17875 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
17876
17877         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
17878
17879         * pt.c (coerce_template_parms): Add new error message.
17880
17881         * method.c (build_overload_value): Implement name mangling for
17882         floating-point template arguments.
17883
17884         * method.c (build_overload_int, icat, dicat): Fix mangling of template
17885         arguments whose absolute value doesn't fit in a signed word.
17886
17887 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17888
17889         * friend.c: New file; put all of the friend stuff in here.
17890         * init.c: Instead of here.
17891         * Makefile.in (CXX_OBJS): Add friend.o.
17892         (friend.o): Add dependencies.
17893         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
17894
17895 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
17896
17897         * call.c (build_scoped_method_call): Complain if the scope isn't a
17898         base.
17899
17900 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
17901
17902         * parse.y (left_curly): Don't crash on erroneous type.
17903
17904         * init.c (build_delete): Fix type of ref.
17905
17906 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
17907
17908         * search.c (get_vbase_1): Renamed from get_vbase.
17909         (get_vbase): Wrapper, now non-static.
17910         (convert_pointer_to_vbase): Now static.
17911
17912         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
17913         * init.c (build_delete): Pass one.
17914         (build_partial_cleanup_for): Use build_scoped_method_call.
17915         * decl.c (finish_function): Pass a binfo.
17916
17917 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
17918
17919         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
17920
17921         * typeck.c (build_c_cast): Lose other reference to flag.
17922
17923         * call.c (build_field_call): Don't look for [cd]tor_identifier.
17924         * decl2.c (delete_sanity): Remove meaningless use of
17925         LOOKUP_HAS_IN_CHARGE.
17926         * decl.c (finish_function): Use build_scoped_method_call instead
17927         of build_delete for running vbase dtors.
17928         * init.c (build_delete): Call overload resolution code instead of
17929         duplicating it badly.
17930
17931 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
17932
17933         * call.c (build_over_call): Call mark_used before trying to elide
17934         the call.
17935
17936         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
17937
17938 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17939
17940         * typeck.c (build_modify_expr): Always pedwarn for a cast to
17941         non-reference used as an lvalue.
17942
17943 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
17944
17945         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
17946
17947 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
17948
17949         * parse.y (handler): Fix template typo.
17950
17951 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
17952
17953         * error.c (lang_decl_name): New fn.
17954         * tree.c (lang_printable_name): Use it.
17955
17956 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
17957
17958         * g++spec.c: Include config.h so that we can catch bzero #defines
17959         from the config file.
17960
17961 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
17962
17963         * new1.cc: Include a declaration for malloc, to avoid warning, and
17964         avoid lossing on systems that require one (ones that define malloc
17965         in xm.h).
17966
17967 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
17968
17969         * decl2.c (max_tinst_depth): New variable.
17970         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
17971         option.
17972         * pt.c (max_tinst_depth): Variable moved.
17973         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
17974         as legal.
17975
17976 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
17977
17978         * decl.c (xref_basetypes): Allow a base class that depends on
17979         template parms to be incomplete.
17980
17981         * decl2.c (build_expr_from_tree): Support typeid(type).
17982         * rtti.c (get_typeid): Support templates.
17983         (expand_si_desc, expand_class_desc): Fix string length.
17984         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
17985
17986 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
17987
17988         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
17989
17990         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
17991
17992 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
17993
17994         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
17995         smashes together template and non-template decls of the same
17996         signature.
17997
17998 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
17999
18000         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
18001
18002 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18003
18004         * decl.c (duplicate_decls): Next route, pedwarn about different
18005         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
18006
18007 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18008
18009         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
18010         (struct lang_type): Delete has_default_implementation member.
18011         Increase dummy to 21.
18012         * decl.c (start_method): Delete usage.
18013
18014         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
18015         store_after_parms, start_decl_1, auto_function): Add decls.
18016         (get_arglist_len_in_bytes, declare_implicit_exception,
18017         have_exceptions_p, make_type_decl, typedecl_for_tag,
18018         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
18019         build_component_type_expr, cplus_exception_name,
18020         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
18021         * call.c (build_this): Make static.
18022         (is_complete): Likewise.
18023         (implicit_conversion): Likewise.
18024         (reference_binding): Likewise.
18025         (standard_conversion): Likewise.
18026         (strip_top_quals): Likewise.
18027         (non_reference): Likewise.
18028         (build_conv): Likewise.
18029         (user_harshness): Likewise.
18030         (rank_for_ideal): Likewise.
18031         * decl.c (start_decl_1): Delete forward decl.
18032         (push_decl_level): Make static.
18033         (resume_binding_level): Make static.
18034         (namespace_bindings_p): Make static.
18035         (declare_namespace_level): Make static.
18036         (lookup_name_real): Make static.
18037         (duplicate_decls): Make static.  Take register off NEWDECL and
18038         OLDDECL parm decls.
18039         * decl2.c (get_sentry): Make static.
18040         (temp_name_p): Delete fn.
18041         * except.c (auto_function): Delete decl.
18042         * lex.c (handle_{cp,sysv}_pragma): Make static.
18043         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
18044         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
18045         * pt.c (tsubst_expr_values): Make static.
18046         * rtti.c (combine_strings): Delete decl.
18047
18048 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
18049
18050         * pt.c (push_template_decl): Handle getting a typedef.
18051
18052         * call.c (build_new_function_call): Complain about void arg.
18053
18054 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18055
18056         * decl.c (duplicate_decls): Give pedwarn of different exceptions
18057         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
18058
18059 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
18060
18061         * except.c (expand_throw): Don't expand the cleanup tree here,
18062         since we are not going to write the rtl out.  Fixes problem with
18063         -g -O on SPARC.
18064
18065 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
18066
18067         * Make-lang.in: Add $(exeext) as necessary.
18068
18069 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
18070
18071         * parse.y (handler_seq): Must have at least one catch clause.
18072
18073 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
18074
18075         * call.c (add_builtin_candidate): Restore ?: hack.
18076
18077         * decl.c (grok_op_properties): More warnings.
18078
18079 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18080
18081         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
18082         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
18083
18084         * decl.c (duplicate_decls): Scale back to a warning, and only do
18085         'em if -pedantic.
18086
18087 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
18088
18089         * decl.c (duplicate_decls): pedwarn mismatched exception
18090         specifications.
18091
18092 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
18093
18094         * call.c (build_new_method_call): Don't display the invisible
18095         argument for controlling virtual bases.
18096
18097 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
18098
18099         * new: Add nothrow new and delete, bad_alloc and throw specifications
18100         for delete.
18101         * decl.c (init_decl_processing): Add throw specification for delete.
18102         * new.cc (nothrow): Define.
18103         * lex.c (real_yylex): Removing warning that throw and friends are
18104         keywords.
18105         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
18106         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
18107         * Make-lang.in: Add new{1,2}.{cc,o}.
18108
18109 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
18110
18111         * lex.c (cons_up_default_function): Fix return type of synth op=.
18112
18113         * init.c (emit_base_init): Add warnings for uninitialized members
18114         and bases.
18115
18116         * decl.c (xref_basetypes): Add warning for non-polymorphic type
18117         with destructor used as base type.
18118
18119         * decl.c (grok_op_properties): Add warning for op= returning void.
18120         * typeck.c (c_expand_return): Add warning for op= returning anything
18121         other than *this.
18122
18123         * class.c (finish_struct_1): Add warning for class with pointers
18124         but not copy ctor or copy op=.
18125
18126         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
18127         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
18128         (instantiate_template): If -fexternal-templates, add this
18129         instantiation to pending_templates.
18130
18131         * decl2.c (copy_assignment_arg_p): Disable old hack to support
18132         Booch components.
18133
18134 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
18135
18136         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
18137
18138 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
18139
18140         * call.c (standard_conversion): Handle getting references.  Tack
18141         on RVALUE_CONV here.  Do it for non-class types, too.
18142         (reference_binding): Pass references to standard_conversion.
18143         (implicit_conversion): Likewise.
18144         (add_builtin_candidate): Disable one ?: kludge.
18145         (convert_like): Handle RVALUE_CONVs for non-class types.
18146         (joust): Disable the other ?: kludge.
18147
18148 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18149
18150         * decl.c (init_decl_processing): Add code to build up common
18151         function types beforehand, to avoid creation then removal of
18152         things already in the hash table.
18153
18154 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
18155
18156         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
18157         the arguments.
18158
18159         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
18160         current_template_parms.
18161
18162 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
18163
18164         * search.c (lookup_field): Don't return a function, check want_type.
18165
18166 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18167
18168         * init.c (build_new): Make sure PLACEMENT has a type.
18169
18170 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
18171
18172         * init.c (build_new): Support new (nothrow).
18173
18174 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
18175
18176         * pt.c (instantiate_decl): Also do push_to_top_level before setting
18177         up DECL_INITIAL.
18178
18179         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
18180         * pt.c (tsubst): Defer instantiation of default args.
18181         * call.c (build_over_call): Until here.
18182
18183 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18184
18185         * search.c (lookup_field): Make sure we have an
18186         IDENTIFIER_CLASS_VALUE before we try to return it.
18187
18188 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18189
18190         * call.c (build_method_call): Delete unused var PARM.
18191         (build_overload_call_real): Likewise.
18192         (build_object_call): Delete unused var P.
18193         (build_new_op): Likewise.
18194         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
18195         var definitions, which are never used.
18196         (shadow_tag): Delete unused var FN.
18197         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
18198         * init.c (build_new): Delete unused var ALLOC_TEMP.
18199         * method.c (hack_identifier): Delete unused var CONTEXT.
18200         (do_build_copy_constructor): Delete unused var NAME.
18201         (synthesize_method): Delete unused var BASE.
18202         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
18203         * rtti.c (build_headof): Delete unused var VPTR.
18204         (get_typeid): Delete unused var T.
18205         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
18206         and ORIG_OP2.
18207         (build_ptrmemfunc): Delete unused vars U and NINDEX.
18208         * typeck2.c (build_functional_cast): Delete unused var BINFO.
18209
18210 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
18211
18212         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
18213         things in a type being defined.
18214         * decl.c (finish_enum): Reverse the values so that they are in
18215         the correct order.
18216
18217         * pt.c (instantiate_class_template): Don't initialize
18218         BINFO_BASETYPES until the vector is filled out.
18219         (unify): Don't abort on conflicting bindings, just fail.
18220         (instantiate_decl): Do push_tinst_level before any tsubsting.
18221
18222         * method.c (build_overload_value): Handle getting a
18223         TEMPLATE_CONST_PARM for a pointer.
18224
18225 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
18226
18227         * init.c (expand_member_init): Don't give 'not a base' error for
18228         templates.
18229
18230         * pt.c (instantiate_decl): Call import_export_decl later.
18231
18232         * pt.c (instantiate_class_template): Return a value.
18233
18234         * parse.y (extension): New rule for __extension__.
18235         (extdef, unary_expr, decl, component_decl): Use it.
18236
18237 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
18238
18239         * class.c (base_binfo): Remove unused base_has_virtual member.
18240         (finish_base_struct): Likewise.
18241         (finish_struct_1): Likewise.
18242
18243 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
18244
18245         * search.c (expand_upcast_fixups): Fix bogus code generation
18246         problem where the generated code uses the wrong index into the
18247         runtime built vtable on the stack.  Old code could clobber random
18248         stack values.
18249
18250 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
18251
18252         * init.c (perform_member_init): Make sure the partial EH cleanups
18253         live on the function_obstack.
18254
18255 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
18256
18257         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
18258         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
18259
18260 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
18261
18262         * decl.c (grokvardecl): Avoid ANSI style initialization.
18263
18264 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
18265
18266         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
18267
18268 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
18269
18270         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
18271
18272 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18273
18274         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
18275         arguments we compare against.  Start the count of I at 1, not 0,
18276         since argv[0] is still the command.
18277
18278 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
18279
18280         * lang-specs.h: Accept .cp as an C++ extension.
18281
18282 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18283
18284         * cp-tree.h (ptr_reasonably_similar): Add decl.
18285
18286 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18287
18288         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
18289         pointer.  New local SPECBITS with the parm's value.
18290         (grokdeclarator): Pass &specbits down.
18291
18292         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
18293         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
18294
18295         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
18296         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
18297
18298         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
18299         not an error_mark_node.
18300
18301 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
18302
18303         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
18304         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
18305
18306 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
18307
18308         * decl.c (grokdeclarator): When giving an anonymous struct a name,
18309         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
18310         not affected).
18311
18312         * typeck2.c (build_m_component_ref): If component is a pointer
18313         to data member, resolve the OFFSET_REF now.
18314
18315         * call.c (convert_like): Don't go into infinite recursion.
18316
18317         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
18318
18319         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
18320         * tree.c (layout_basetypes): And on the vbase ptr.
18321
18322 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
18323
18324         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
18325         CHAR_TYPE_SIZE so bool is always the same size as another type.
18326
18327         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
18328
18329 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
18330
18331         * decl2.c (grok_x_components): Remove synthesized methods from
18332         TYPE_METHODS of an anonymous union, complain about member
18333         functions.
18334         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
18335         anonymous unions.
18336         (finish_function): Just clear the DECL_RTL of our arguments.
18337
18338 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18339
18340         * decl2.c (finish_file): Emit DWARF debugging info for static data
18341         members.
18342
18343         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
18344
18345 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
18346
18347         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
18348         IDENTIFIER_NODE.
18349
18350 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
18351
18352         * Make-lang.in (g++-cross$(exeext)): Fix typo.
18353
18354 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18355
18356         Make the g++ driver now be a standalone program, rather than one
18357         that tries to run the gcc driver after munging up the options.
18358         * Make-lang.in (g++.c, g++spec.o): New rules.
18359         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
18360         added.
18361         (g++$(exeext)): New rule, based on xgcc rule.
18362         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
18363         * g++spec.c: New file.
18364         * g++.c: Removed file.
18365
18366 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
18367
18368         * cvt.c (build_up_reference): Arrange for any temporary values
18369         that have been keep in registers until now to be put into memory.
18370
18371 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18372
18373         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
18374         that make -j3 bootstrap works better.
18375
18376 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
18377
18378         * decl.c (pushtag): Do pushdecl for anon tags.
18379
18380 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
18381
18382         * typeck.c (c_expand_return): Fix logic.
18383         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
18384
18385 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
18386
18387         * g++.c (main): Make sure arglist has a final NULL entry.  Add
18388         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
18389         stdin/stdout of the invoked program are redirected to
18390         nowheresville.
18391
18392 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18393
18394         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
18395
18396 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
18397
18398         * init.c (resolve_offset_ref): Handle obj.vfn better.
18399         * typeck.c (build_component_ref): Set TREE_TYPE on result from
18400         build_vfn_ref.
18401
18402 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
18403
18404         * typeck.c (convert_for_assignment): Also handle anachronistic
18405         implicit conversions from (::*)() to cv void*.
18406         * cvt.c (cp_convert_to_pointer): Likewise.
18407
18408 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
18409
18410         * lex.c (handle_cp_pragma): Fix bogus warning.
18411
18412 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
18413
18414         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
18415         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
18416
18417 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18418
18419         * class.c (finish_struct_1): Support DWARF2_DEBUG.
18420         * search.c (dfs_debug_mark): Likewise.
18421         * decl2.c (finish_vtable_vardecl): Likewise.
18422         * decl.c (pushtag, finish_enum): Likewise.
18423         * lex.c (check_newline): Use debug_* instead of calling *out
18424         functions directly.
18425
18426 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18427
18428         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
18429         on some picky hosts.
18430
18431 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
18432
18433         * class.c (finish_struct_1): A class has a non-trivial copy
18434         constructor if it has virtual functions.
18435
18436         * cvt.c (cp_convert): Always call a constructor.
18437
18438         * call.c (reference_binding): Still tack on a REF_BIND
18439         for bad conversions.
18440         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
18441
18442         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
18443         (c_expand_return): Likewise.
18444         * typeck2.c (digest_init): Likewise for { }.
18445         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
18446         * cvt.c (cp_convert): Handle failure better.
18447
18448 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18449
18450         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
18451         of GCC be path-relative.
18452
18453 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
18454
18455         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
18456         it does need choose-temp.o and pexecute.o.
18457
18458 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18459
18460         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
18461         that we still use it.
18462         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
18463
18464 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
18465
18466         * init.c (expand_default_init): Avoid calling constructors to
18467         initialize reference temps.
18468
18469         * cvt.c (convert_to_reference): Fix.
18470
18471 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
18472
18473         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
18474         (convert_to_reference): Likewise.
18475         * typeck.c (convert_for_initialization): Likewise.
18476         * init.c (expand_default_init): Likewise.
18477         (expand_aggr_init_1): Likewise.
18478         * cp-tree.h (CONV_NONCONVERTING): Lose.
18479         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
18480         * *.c: Adjust.
18481         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
18482
18483 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
18484
18485         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
18486
18487 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18488
18489         * init.c (expand_aggr_init_1): Don't crash on non-constructor
18490         TARGET_EXPR.
18491
18492 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18493
18494         * g++.c: Include gansidecl.h.
18495         (VPROTO, PVPROTO, VA_START): Delete.
18496         (choose_temp_base_try, choose_temp_base, perror_exec,
18497         run_dos) [__MSDOS__]: Delete fns.
18498         (pfatal_with_name): Delete fn.
18499         (temp_filename): Declare like in gcc.c.
18500         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
18501         (error_count, signal_count): Define.
18502         (error): Delete both definitions.
18503         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
18504         (pfatal_pexecute): Add fn from gcc.c.
18505         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
18506         code to use the pexecute stuff also used by gcc.c.
18507         (MIN_FATAL_STATUS): Define.
18508         * Make-lang.in (g++): Add dependency on and linking with
18509         choose-temp.o and pexecute.o.
18510
18511         * cp-tree.h: Include gansidecl.h.
18512         (STDIO_PROTO): Delete #undef/#define.
18513         * cvt.c (NULL): Delete #undef/#define.
18514         * expr.c (NULL): Likewise.
18515         * init.c (NULL): Likewise.
18516         * rtti.c (NULL): Likewise.
18517         * xref.c (NULL): Likewise.
18518
18519         * cp-tree.h (build_user_type_conversion): Add prototype.
18520         * call.c (build_user_type_conversion): Delete prototype.  Correct
18521         decl of FLAGS arg to be an int.
18522         * cvt.c (build_user_type_conversion): Likewise.
18523
18524 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
18525
18526         * cp-tree.def: Add TRY_BLOCK and HANDLER.
18527         * except.c (expand_start_catch_block): Support templates.
18528         * parse.y (try_block, handler_seq): Likewise.
18529         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
18530
18531 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
18532
18533         * pt.c (current_template_args): New fn.
18534         (push_template_decl): Use it.
18535         * decl.c (grokdeclarator): Use it.
18536
18537         * decl2.c (build_expr_from_tree): Dereference ref vars.
18538
18539         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
18540         the decl-specifier-seq.
18541
18542         * decl.c (grok_op_properties): Don't force the type of a conversion
18543         op to be complete.  Don't warn about converting to the same type
18544         for template instantiations.
18545
18546         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
18547         methods.
18548
18549 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
18550
18551         * typeck.c (get_delta_difference): Remove previous bogusness.
18552         Don't give errors if force is set.
18553
18554 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18555
18556         * decl2.c (finish_file): Don't emit debug info.
18557         * decl.c (pushdecl): Lose obsolete code.
18558         (grokdeclarator): Still do the long long thing after complaining.
18559         * search.c (note_debug_info_needed): Don't do anything if we're in a
18560         template.
18561         * method.c (synthesize_method): For non-local classes,
18562         push_to_top_level first.
18563
18564 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
18565
18566         * typeck.c (get_delta_difference): Add no_error parameter.
18567         (build_ptrmemfunc): Call get_delta_difference with no_error set;
18568         we don't want error messages when converting unrelated
18569         pointer-to-member functions.
18570
18571 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
18572
18573         * error.c (dump_expr): Improve the wording on error messages that
18574         involve pointer to member functions.
18575
18576 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
18577
18578         * cvt.c (cp_convert_to_pointer): Move code for conversions from
18579         (::*)() to void* or (*)() up a bit, so that we can convert from
18580         METHOD_TYPEs as well.
18581
18582 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18583
18584         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
18585         There are no 'member' types.
18586         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
18587         (build_x_typeid): Handle errors.
18588
18589 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
18590
18591         * typeck.c (convert_for_assignment): Handle anachronistic implicit
18592         conversions from (::*)() to void* or (*)().
18593         * cvt.c (cp_convert_to_pointer): Likewise.
18594         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
18595         conversions from here.
18596         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
18597         * lang-options.h: Likewise.
18598         * decl2.c (warn_pmf2ptr): Define.
18599         * cp-tree.h: Declare it.
18600         * typeck2.c (digest_init): Allow pmfs down into
18601         convert_for_initialization.
18602
18603 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
18604
18605         * typeck.c (c_expand_return): Fix for returning overloaded fn.
18606
18607 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18608
18609         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
18610         * decl.c (grok_reference_init): Pass DIRECT_BIND.
18611         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
18612         DIRECT_BIND.
18613         * call.c (convert_like): Don't pass INDIRECT_BIND.
18614         * typeck.c (convert_arguments): Likewise.
18615         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
18616
18617 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
18618
18619         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
18620         similar code in build_up_ref.
18621         * cvt.c (build_up_reference): Drastically simplify.
18622
18623 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
18624
18625         * typeck.c (signed_or_unsigned_type): If the given type already
18626         as the correct signedness, then just return it.
18627
18628         * typeck.c ({un,}signed_type): If can't do anything, call
18629         signed_or_unsigned_type.
18630
18631 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
18632
18633         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
18634         current_class_type is NULL.
18635
18636 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
18637
18638         * class.c (finish_struct_1): Avoid empty structs by adding a field
18639         so layout_type gets the mode right.
18640
18641         * typeck.c (c_expand_return): Drastically simplify.
18642
18643 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
18644
18645         * typeck.c (decay_conversion): Handle overloaded methods.
18646
18647 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
18648
18649         * call.c (build_over_call): A TARGET_EXPR has side-effects.
18650
18651 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
18652
18653         * cvt.c (convert_to_pointer_force): Add code to support pointer to
18654         member function to pointer to function conversions.
18655         * init.c (resolve_offset_ref): Add code to allow faked up objects,
18656         ignoring them if they are not used, and giving an error, if they
18657         are needed.
18658         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
18659         code, and so that we can give an error, if we needed an object,
18660         and one was not provided.
18661         (build_c_cast): Don't call default_conversion when we want to
18662         convert to pointer to function from a METHOD_TYPE.
18663
18664 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
18665
18666         * Make-lang.in (cplib2.ready): Fix logic.
18667
18668         * decl.c (shadow_tag): Only complain about non-artificial function
18669         members.
18670
18671         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
18672
18673 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
18674
18675         * expr.c (cplus_expand_expr): Pre-tweak call_target like
18676         expand_inline_function would.
18677
18678         * pt.c (mark_decl_instantiated): If extern_p, call
18679         mark_inline_for_output.
18680
18681 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
18682
18683         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
18684         pmd conversions.
18685
18686         * typeck.c (get_delta_difference): Fix wording, as we can be used
18687         for pointer to data members.
18688
18689 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
18690
18691         * pt.c (tsubst): If the function decl isn't a member of this
18692         template, return a copy of the decl (including copying the
18693         lang-specific part) so we don't hose ourselves later.
18694
18695 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
18696
18697         * class.c (finish_struct): Remove DWARF-specific tag handling.
18698         * decl.c (pushtag): Likewise.
18699         (finish_function): Always clear DECL_ARGUMENTS on function decls with
18700         no saved RTX.
18701         * decl2.c (finish_file): Emit DWARF debugging info for static data
18702         members.
18703
18704 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
18705
18706         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
18707         isn't the same as the new one before we whack it.
18708
18709 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
18710
18711         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
18712         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
18713         warn_traditional and warn_strict_prototypes; remove ancient
18714         'overload' code; remove references to flag_traditional.
18715
18716 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
18717
18718         * input.c (sub_getch): Handle 8-bit characters in string literals.
18719
18720 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
18721
18722         * tree.c (mapcar): Handle CONSTRUCTORs.
18723         (copy_to_permanent): Handle expression_obstack properly.
18724
18725         * Make-lang.in (cplib2.txt): Also depend on the headers.
18726
18727         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
18728         INT_TYPE_SIZE.
18729         (expand_class_desc): Use USItype for offset field.
18730         * tinfo.h (struct __class_type_info): Likewise.
18731
18732         * method.c (build_overload_int): TYPE_PRECISION should be applied
18733         to types.
18734
18735 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
18736
18737         * call.c (build_new_op): A COND_EXPR involving void must be a
18738         builtin.
18739
18740 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
18741
18742         * typeck.c (build_x_component_ref): New fn.
18743         (build_object_ref): Use it.
18744         * parse.y (primary): Use it.
18745         * decl2.c (build_expr_from_tree): Use it.
18746         * cp-tree.h: Declare it.
18747
18748         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
18749         * error.c (dump_type_suffix): Handle variable arrays.
18750
18751 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18752
18753         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
18754
18755 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
18756
18757         * decl.c (lookup_name_real): Don't try to look up anything in a
18758         TYPENAME_TYPE.
18759
18760         * tinfo2.cc (__throw_type_match_rtti): Oops.
18761
18762 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18763
18764         * Make-lang.in (exception.o): Use -fno-PIC for now.
18765
18766 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
18767
18768         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
18769         calling them.
18770         (get_tinfo_fn_dynamic): Extracted from build_typeid.
18771         * tinfo2.cc (__dynamic_cast): Adjust.
18772
18773         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
18774         (build_x_typeid): Likewise.
18775
18776         * parse.y: Call build_x_typeid instead of build_typeid.
18777         * cp-tree.def: Add TYPEID_EXPR.
18778         * pt.c (tsubst_copy): Handle typeid.
18779         * decl2.c (build_expr_from_tree): Likewise.
18780         * rtti.c (build_x_typeid): Throw bad_typeid from here.
18781         (build_typeid): Not here.
18782         * cp-tree.h: Declare build_x_typeid.
18783
18784 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
18785
18786         * call.c (convert_like): Pull out constant values.
18787
18788         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
18789
18790 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
18791
18792         * decl.c (init_decl_processing): Create short int types before
18793         creating size_t in case a machine description needs to use
18794         unsigned short for size_t.
18795
18796 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18797
18798         * Make-lang.in (exception.o): Turn off pic.
18799
18800         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
18801         type, multi-level ptr conversions.
18802
18803         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
18804         (throw_bad_cast): Use it.
18805         (throw_bad_typeid): New fn.
18806         (build_typeid): Throw bad_typeid as needed.
18807         Use build_call.
18808         (synthesize_tinfo_fn): Handle functions and arrays before checking
18809         for cv-quals.
18810
18811         * Remove .h from standard C++ headers, add new.h, move into inc
18812         subdirectory.
18813
18814         * exception*: Remove pointer from object, constructors.  Add
18815         default exception::what that uses type_info::name.  Add
18816         __throw_bad_typeid.
18817
18818         * init.c (build_new): Don't add a cookie to new (void *) T[2].
18819
18820 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
18821
18822         * Make-lang.in: Building C++ code depends on cc1plus.
18823
18824 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18825
18826         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
18827         a HOST_WIDE_INT, not a tree.
18828
18829 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
18830
18831         * exception.cc: Don't include <stdlib.h>.
18832
18833         * Make-lang.in (c++.clean): Remove cplib2.*.
18834
18835 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
18836
18837         * parse.y (component_decl_1, component_costructor_declarator case):
18838         Pass attributes/prefix_attributes in tree list.
18839
18840 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
18841
18842         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
18843
18844 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
18845
18846         * lex.c (do_identifier): Don't do deferred lookup in a template
18847         header.
18848
18849         * typeck2.c (store_init_value): Oops.
18850
18851         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
18852         New files for C++ lang-support library.
18853         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
18854         (CXX_LIB2FUNCS): Define.
18855         And rules for building the C++ lang-support code.
18856         * config-lang.in (headers): Define.
18857         (lib2funcs): Define.
18858
18859 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
18860
18861         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
18862         digest_init.
18863         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
18864         * typeck2.c (store_init_value): Check for initializing pmf with { }
18865         here.
18866         (process_init_constructor): Not here.
18867
18868 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
18869
18870         * pt.c (begin_template_parm_list): Increment
18871         processing_template_decl here.
18872         (end_template_parm_list): Not here.
18873         (process_template_parm): No need to add 1 to it now.
18874         * *.c: Use processing_template_decl instead of current_template_parms
18875         to check for being in a template.
18876
18877         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
18878         (tsubst_copy): Handle CONSTRUCTOR.
18879         (instantiate_decl): Set up context properly for variables.
18880         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
18881         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
18882
18883 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18884
18885         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
18886
18887 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
18888
18889         * method.c (make_thunk): Call comdat_linkage before setting the
18890         TREE_CODE.
18891
18892         * decl2.c (comdat_linkage): Use make_decl_one_only.
18893         (import_export_decl): Likewise.
18894         * decl.c (init_decl_processing): Check supports_one_only instead of
18895         SUPPORTS_WEAK.
18896
18897 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
18898
18899         * decl2.c (grokfield): Tighten checking for access decls.
18900
18901         * decl.c (make_typename_type): Resolve references to
18902         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
18903         (lookup_name_real): Types that depend on a template parameter get
18904         an implicit 'typename' unless they're in the current scope.
18905         (start_decl_1): We don't care about incomplete types that depend
18906         on a template parm.
18907         (grokdeclarator): Resolve 'typename's in the type specifier that
18908         refer to members of the current scope.
18909
18910         * call.c (build_over_call): Remove 'inline called before
18911         definition' diagnostic.
18912         (build_method_call): Likewise.
18913         * decl.c (duplicate_decls): Downgrade 'used before declared
18914         inline' to a warning, only with -Winline.
18915
18916 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
18917
18918         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
18919
18920 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
18921
18922         * call.c (build_method_call): When calling a signature
18923         default implementation, as in other cases, let instance_ptr simply
18924         be instance.
18925
18926 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
18927
18928         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
18929
18930 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
18931
18932         * except.c (expand_start_catch_block): Add a pushlevel so that -g
18933         works on hppa and SPARC.
18934
18935 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18936
18937         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
18938
18939 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
18940
18941         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
18942         before testing whether it's a signature.
18943
18944 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
18945
18946         * call.c (build_new_method_call): Don't complain about signature
18947         pointers and references not being an aggr type.
18948         (build_this): If a signature pointer or reference was passed in,
18949         just return it.
18950         (build_new_method_call): If instance is a signature pointer, set
18951         basetype to the signature type of instance.
18952         * sig.c (build_signature_method_call): Deleted basetype and
18953         instance parameters, they can be found as the DECL_CONTEXT of
18954         function and as the first argument passed in.
18955         * cp-tree.h: Changed declaration of build_signature_method_call.
18956         * call.c (build_method_call): Deleted first two arguments in call
18957         of build_signature_method_call.
18958         (build_over_call): Added call to build_signature_method_call.
18959
18960 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
18961
18962         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
18963         target_expr.
18964
18965 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18966
18967         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
18968
18969 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
18970
18971         * except.c (expand_start_try_stmts): Move to except.c in the backend.
18972         (expand_end_try_stmts): Remove.
18973
18974         * init.c (perform_member_init): Use add_partial_entry () instead
18975         of directly manipulating lists.
18976         (emit_base_init): Likewise.
18977
18978 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
18979
18980         * except.c (expand_exception_blocks): Always make sure USE and
18981         CLOBBER insns that came at the end still do, the backend relies
18982         upon this.
18983
18984 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
18985
18986         * call.c (build_over_call): We can only use a TARGET_EXPR of the
18987         right type.
18988
18989 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
18990
18991         * cvt.c (convert_to_reference): Revert last change, don't complain
18992         about temp without target decl.
18993
18994 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
18995
18996         * decl.c (grokdeclarator): Don't core dump when void() is given.
18997
18998 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
18999
19000         * decl.c (copy_args_p): Don't crash.
19001
19002 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
19003
19004         * pt.c (tsubst): And support template args inside the exception
19005         specification.
19006
19007         * pt.c (tsubst): Add support for exception specifications in
19008         template functions.
19009
19010 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
19011
19012         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
19013         fields now.
19014         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
19015         (start_function): Likewise.
19016         (start_method): Likewise.
19017         (grokfield): Likewise.
19018         (make_call_declarator): Add throw spec parameter.
19019         (set_quals_and_spec): Add routine.
19020         * lex.c (set_quals_and_spec): Likewise.
19021         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
19022         * decl.c (shadow_tag): Eliminate the throw spec parameter to
19023         grokdeclarator.
19024         (groktypename): Likewise.
19025         (start_decl): Eliminate the throw spec parameter.  Eliminate the
19026         throw spec parameter to grokdeclarator.  Eliminate the throw spec
19027         field in DECL_STMT.
19028         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
19029         (grokfndecl): Remove useless set of raises.
19030         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
19031         the throw spec parameter to start_decl.  Pull the throw spec out
19032         of the call declarator.
19033         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
19034         (start_function): Eliminate the throw spec parameter.  Eliminate
19035         the throw spec parameter to grokdeclarator.
19036         (start_method): Likewise.
19037         * decl2.c (grokfield): Likewise.
19038         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
19039         (grokoptypename): Likewise.
19040         (finish_file): Eliminate the throw spec parameter to
19041         start_function.  Add throw spec to make_call_declarator.
19042         * except.c (init_exception_processing): Add throw spec to
19043         make_call_declarator.  Eliminate the throw spec parameter to
19044         start_decl.
19045         (expand_start_catch_block): Eliminate the throw spec parameter to
19046         grokdeclarator.
19047         (expand_builtin_throw): Add throw spec to make_call_declarator.
19048         Eliminate the throw spec parameter to start_function.
19049         (start_anon_func): Likewise.
19050         * lex.c (make_call_declarator): Add throw spec parameter.
19051         (set_quals_and_spec): New routine.
19052         (cons_up_default_function): Add throw spec to make_call_declarator.
19053         Eliminate the throw spec parameter to grokfield.
19054         * method.c (synthesize_method): Eliminate the throw spec parameter
19055         to start_function.
19056         * pt.c (process_template_parm): Eliminate the throw spec parameter
19057         to grokdeclarator.
19058         (tsubst): Add throw spec to make_call_declarator.
19059         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
19060         (do_function_instantiation): Eliminate the throw spec parameter to
19061         grokdeclarator.  Eliminate the throw spec parameter to
19062         start_function.
19063         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
19064         to start_function.
19065         * parse.y (datadef): Remove non-winning optimization.
19066         (decl): Likewise.
19067         (fndef): Remove ambiguous error productions uncovered by grammar
19068         fixing.
19069         (constructor_declarator): Add exception_specification_opt here.
19070         (component_constructor_declarator): Likewise.
19071         (direct_after_type_declarator): Likewise.
19072         (complex_direct_notype_declarator): Likewise.
19073         (direct_abstract_declarator): Likewise.
19074         (fn.def1): Remove exception_specification_opt.
19075         (fn.def2): Likewise.
19076         (condition): Likewise.
19077         (initdcl0): Likewise.
19078         (initdcl): Likewise.
19079         (notype_initdcl0): Likewise.
19080         (nomods_initdcl0): Likewise.
19081         (component_decl_1): Likewise.
19082         (component_declarator): Likewise.
19083         (after_type_component_declarator0): Likewise.
19084         (after_type_component_declarator): Likewise.
19085         (notype_component_declarator): Likewise.
19086
19087 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19088
19089         * call.c (build_over_call): Also use an INIT_EXPR when
19090         initializing anything from an rvalue.
19091
19092         * call.c (build_over_call): Call stabilize_reference when building
19093         an INIT_EXPR instead of calling the copy ctor.
19094
19095         * call.c (joust): Extend the previous change to all comparisons.
19096
19097         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
19098         NO_LINKAGE_HEURISTICS.
19099
19100         * decl2.c (finish_file): Emit any statics that weren't already.
19101
19102         * typeck.c (build_static_cast): Implement.
19103         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
19104         * decl.c (grokparms): Use can_convert_arg instead of
19105         implicit_conversion directly.
19106         (copy_args_p): New fn.
19107         * cvt.c (convert_to_reference): Don't complain about temp with
19108         static_cast.
19109         (build_up_reference): Handle TARGET_EXPRs.
19110         * call.c (build_over_call): Elide unnecessary temps.
19111         (can_convert*): Use new overloading code.
19112
19113 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
19114
19115         * call.c: Move TYPE_PTR*_MACROS ...
19116         * cp-tree.h: To here.
19117         * typeck.c (build_reinterpret_cast): Implement.
19118
19119         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
19120         ptr_complete_ob.
19121         (joust): If we're comparing a function to a builtin and the worst
19122         conversion for the builtin is worse than the worst conversion for the
19123         function, take the function.
19124
19125         * typeck.c (build_const_cast): Implement.
19126         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
19127         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
19128
19129 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
19130
19131         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
19132         too early.  Make sure we explode if exprtype turns out to be a
19133         NULL_TREE when it shouldn't be.
19134
19135 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
19136
19137         * cp-tree.h: New routine make_call_declarator.
19138         * lex.c (make_call_declarator): Define it.
19139         * except.c (init_exception_processing): Use it.
19140         (expand_builtin_throw): Likewise.
19141         (start_anon_func): Likewise.
19142         * decl2.c (finish_file): Likewise.
19143         * lex.c (cons_up_default_function): Likewise.
19144         * parse.y: Likewise.
19145         * pt.c (tsubst): Likewise.
19146
19147 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
19148
19149         * decl2.c (groktypefield): Remove unused code.
19150
19151 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
19152
19153         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
19154         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
19155         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
19156         nonempty_cv_qualifiers.
19157         * hash.h: Rebuild.
19158
19159         * lex.c (make_pointer_declarator): Change type_quals into
19160         cv_qualifiers.
19161         (make_reference_declarator): Likewise.
19162
19163 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
19164
19165         * decl.c (start_function): Only check interface_* for templates
19166         with flag_alt_external_templates.
19167
19168         * call.c (build_new_op): Check for comparison of different enum types.
19169         (build_over_call): Fix arg # output.
19170
19171         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
19172
19173 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
19174
19175         * call.c (build_new_op): Check for erroneous args.
19176
19177         * call.c (build_new_method_call): Add missing args to cp_error.
19178
19179         * tree.c (error_type): Don't print reference-to-array.
19180
19181         * typeck.c (convert_for_assignment): Don't say contravariance for
19182         removing const.
19183
19184 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
19185
19186         * call.c (build_over_call): Diagnose bad convs for `this'.
19187
19188         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
19189         on _ctor_arg.
19190
19191         * call.c (convert_like): Handle bad convs.
19192         (build_over_call): Handle bad convs better.
19193
19194         * decl2.c: -fansi-overloading is now the default.
19195
19196         * call.c (build_new_method_call): Check for erroneous args.
19197
19198         * pt.c (instantiate_class_template): Propagate
19199         TYPE_USES_MULTIPLE_INHERITANCE.
19200
19201 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
19202
19203         * call.c (enforce_access): Add static to routine.
19204
19205 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
19206
19207         * call.c (build_user_type_conversion_1): Fix bad handling.
19208         (compare_ics): Likewise.
19209
19210 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
19211
19212         * call.c (standard_conversion): Oops.
19213
19214 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
19215
19216         * g++.c: Update test for win32 (&& ! cygwin32).
19217
19218 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
19219
19220         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
19221         (ptr_reasonably_similar): New fn.
19222         * call.c (BAD_RANK): New rank.
19223         (ICS_BAD_FLAG): New macro.
19224         (standard_conversion): Handle almost-right pointer conversions.
19225         (reference_binding): Handle bad rvalue bindings.
19226         (add_*_candidate): Stuff.
19227         (build_over_call): Pass bad conversions to convert_for_initialization.
19228         (compare_ics): Handle bad convs.
19229         (joust): Likewise.
19230
19231 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
19232
19233         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
19234         integer_type_node when computing pointer offsets.
19235
19236 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
19237
19238         * tree.c (lvalue_type): New fn.
19239         (error_type): New fn.
19240         * call.c (op_error): Use error_type.
19241         (add_conv_candidate): Use lvalue_type.
19242         (add_builtin_candidates): Likewise.
19243         * error.c (args_as_string): Use error_type.
19244
19245 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
19246
19247         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
19248         (tsubst): Not here.
19249
19250         * decl.c (init_decl_processing): With -ansi, __null's type is the
19251         signed integral type with the same number of bits as a pointer.
19252         Introduce a new variable null_node for it.
19253         * cp-tree.h: Adjust.
19254         * call.c (null_ptr_cst_p): Adjust.
19255
19256 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
19257
19258         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
19259         optimize.
19260
19261 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
19262
19263         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
19264         fns of classes without virtual functions.
19265
19266         * call.c (add_function_candidate): Handle `this' specially.
19267         (compare_ics): Likewise.
19268
19269 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
19270
19271         * typeck.c (build_conditional_expr): Fix handling of __null.
19272
19273         * decl2.c (comdat_linkage): New fn.
19274         (import_export_vtable): Use it.
19275         (import_export_decl): Use it.
19276         * method.c (make_thunk): Use it.
19277
19278 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
19279
19280         * pt.c (end_template_decl): If we don't actually have parms, return.
19281         * parse.y (template_header): Accept 'template <>'.
19282
19283         * errfn.c: Allow 5 args.
19284
19285 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
19286
19287         * tree.c (make_temp_vec): New fn.
19288         * pt.c (push_template_decl): Handle partial specs.
19289         (instantiate_class_template): Likewise.
19290         (more_specialized): Use get_bindings.
19291         (more_specialized_class): New fn.
19292         (get_class_bindings): New fn.
19293         (most_specialized_class): New fn.
19294         (do_function_instantiation): List candidates for ambiguous case.
19295         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
19296         (shadow_tag): Call push_template_decl for partial specializations.
19297         * parse.y: Likewise.
19298         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
19299         DECL_TEMPLATE_MEMBERS.
19300         * call.c (print_z_candidates): Reduce duplication.
19301
19302 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
19303
19304         * decl2.c (lang_decode_option): Allow -fansi-overloading.
19305
19306 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
19307
19308         * pt.c (get_bindings): New fn.
19309         (most_specialized): Likewise.
19310         (do_function_instantiation): Use them.
19311         (add_maybe_template): New fn.
19312         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
19313         * call.c (build_new_op): Handle guiding decls.
19314         (build_new_function_call): Likewise.
19315         * decl2.c (finish_file): Likewise.
19316
19317         * decl2.c (mark_used): Do synthesis here.
19318         * call.c (build_method_call): Not here.
19319         (build_over_call): Or here.
19320         * typeck.c (build_function_call_real): Or here.
19321         * tree.c (bot_manip): Call mark_used on functions used in default
19322         args.
19323
19324 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
19325
19326         * decl2.c (import_export_vtable): Delete code that disabled vtable
19327         heuristic on systems with ASM_OUTPUT_EXTERNAL.
19328
19329 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
19330
19331         * typeck.c (build_x_function_call): Handle static call context
19332         better.
19333
19334         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
19335         the function, not its outer block.
19336
19337         * call.c (build_field_call): Pass fields on to build_opfncall
19338         regardless of TYPE_OVERLOADS_CALL_EXPR.
19339         (build_method_call): Pass on to build_new_method_call sooner.
19340
19341         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
19342         gives us.
19343         * class.c (instantiate_type): Don't put a POINTER_TYPE to
19344         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
19345         modifying it.
19346
19347 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
19348
19349         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
19350         (add_builtin_candidate): Don't take enums for ++.
19351         (build_new_method_call): Handle non-aggregates and field calls.
19352         Move new overloading code from...
19353         * cvt.c: Here.
19354
19355         * decl.c (grokparms): Don't check default args in templates.
19356
19357 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
19358
19359         * cvt.c (build_new_op): Fix args to build_unary_op.
19360         (add_builtin_candidates): Don't call type_promotes_to on float.
19361
19362         * decl.c (grokparms): Check the type of the default arg.
19363
19364         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
19365         returning NULL_TREE.
19366
19367         * typeck.c (build_x_binary_op): Avoid doing extra work.
19368         (build_x_unary_op): Likewise.
19369         (build_x_conditional_expr): Likewise.
19370         * cvt.c (build_over_call): Return.
19371         (add_builtin_candidate): Fix MEMBER_REF.
19372         (build_new_op): Likewise.
19373
19374 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
19375
19376         * method.c (build_overload_name): Put bug fix into code but leave
19377         disabled for now so we can be bug compatible with older releases
19378         that do repeats incorrectly.  In the future, we can enable it.
19379
19380 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
19381
19382         * cvt.c (convert_like): Don't call build_cplus_new twice.
19383
19384         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
19385         Control new overloading code with -fansi-overloading.
19386
19387 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
19388
19389         * cvt.c (build_over_call): Call build_cplus_new.
19390         * call.c (build_method_call): Likewise.
19391         * typeck.c (build_function_call_real): Likewise.
19392         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
19393         the COND_EXPR in a TARGET_EXPR so they use the same slot.
19394
19395         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
19396         recursive calls.
19397         * typeck.c (complete_type): Propagate
19398         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
19399
19400 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
19401
19402         * cvt.c (joust): More ?: kludging.  Sigh.
19403         (build_over_call): Don't try to synthesize global fns.
19404
19405         * search.c (lookup_conversions): Use binfo marking.
19406
19407 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
19408
19409         * search.c (build_mi_matrix): Use the correct value of cid
19410         when determining the new mi_size.
19411
19412 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
19413
19414         * cvt.c (add_builtin_candidates): Do consider type conversion ops
19415         for the first parms of += et al.
19416         (strip_top_quals): New fn.
19417         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
19418         (implicit_conversion): Likewise.
19419         (add_builtin_candidates): Be careful about arrays.
19420         (build_new_method_call): Handle vtable optimization.
19421
19422 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
19423
19424         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
19425         * cvt.c (reference_binding): Use it.
19426         (implicit_conversion): Use it.
19427         (add_builtin_candidate, COND_EXPR): Use it.
19428
19429         * cvt.c (build_new_function_call): Check for error args.
19430
19431         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
19432
19433         * gxx.gperf: Add __null.
19434         * hash.h: Regenerate.
19435         * lex.h: Add RID_NULL.
19436         * lex.c (init_lex): Create null_pointer_node here, stick it in
19437         RID_NULL.
19438         * decl.c (init_decl_processing): Still set its type here.
19439         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
19440         (convert_to_pointer_force): Likewise.
19441         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
19442         if (! pedantic).
19443         * call.c (convert_harshness): Use null_ptr_cst_p.
19444         * typeck.c (convert_for_assignment): Likewise.  Don't produce
19445         null_pointer_node.
19446
19447         * error.c (args_as_string): Handle lists of actual args, too.
19448         * cvt.c (null_ptr_cst): Support (void*)0 for now.
19449         (build_user_type_conversion_1): Improve diagnostics.
19450         (build_new_function_call): Likewise.
19451         (build_object_call): Likewise.
19452         (build_new_method_call): Likewise.  Move call before def diagnostic...
19453         (build_over_call): Here.
19454
19455         * cvt.c (build_new_method_call): Don't complain about no match if
19456         LOOKUP_SPECULATIVELY.
19457         (build_over_call): Fix 'this' for virtual fn.
19458         (build_new_method_call): Add diagnostic.
19459
19460 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
19461
19462         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
19463         constructors to be passed in.
19464         (build_over_call): Likewise.
19465         (build_user_type_conversion_1): Pass them in.
19466         (convert_like): Likewise.
19467         (build_object_call): Handle overloaded conversions.
19468         (build_over_call): Pass the right args to build_vfn_ref.
19469         (standard_conversion): Fix pmf convs.
19470         (joust): Handle comparing statics and non-statics.
19471         (build_new_method_call): New fn.
19472         * call.c (build_method_call): Call it if NEW_OVER.
19473
19474 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
19475
19476         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
19477         %D instead.
19478
19479 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
19480
19481         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
19482         instead of just maybe_build_cleanup so that we deallocate the
19483         thrown object.
19484
19485 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19486
19487         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
19488         * cp-tree.h (finish_prevtable_vardecl): Add decl.
19489
19490 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
19491
19492         * pt.c (instantiate_class_template): Call complete_type.  Also, if
19493         we're at the end of the file and we just instantiated a template
19494         class with a vtable, call finish_prevtable_vardecl.
19495
19496         * error.c (dump_decl): Don't explode (or explode more gracefully
19497         as appropriate) if the object being dumped has a null type.
19498         (dump_expr): Likewise.
19499
19500         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
19501         by counting the number of nodes that we'll need before allocating
19502         the array.
19503         (lookup_fnfields): Fix comment.
19504         (breadth_first_search): Fix comment.
19505
19506 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
19507
19508         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
19509         TYPE_ALIGN.
19510         * class.c (finish_struct): Call cplus_decl_attributes here.
19511         (finish_struct_1): Not here.
19512         * cp-tree.h: Adjust.
19513
19514         * pt.c (type_unification): New parameter STRICT.
19515         (unify): If STRICT, don't allow cv addition or base deduction.
19516         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
19517
19518 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
19519
19520         * search.c (get_template_base{_recursive}): New fns.
19521         * pt.c (more_specialized): New fn.
19522         (do_function_instantiation): Use it.
19523         (unify): Handle base deduction.
19524         * cvt.c (joust): Use more_specialized.
19525         Don't arbitrarily choose between non-builtin candidates.
19526         (build_over_call): Call require_complete_type.
19527
19528         * decl.c (start_function): Statics are static even in a #pragma
19529         interface file.
19530
19531         * decl2.c (import_export_vtable): Disable vtable heuristic on
19532         systems with ASM_OUTPUT_EXTERNAL.
19533
19534         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
19535         (standard_conversion): No std conv to enum type.
19536
19537         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
19538         for ptm's.
19539
19540         * cvt.c (reference_binding): Bind directly to a base subobject of
19541         a class rvalue.
19542
19543         * cvt.c (build_new_op): Enforce access control.
19544
19545 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
19546
19547         * typeck2.c (process_init_constructor): When scanning the
19548         union for a named field, skip things that aren't FIELD_DECLs.
19549
19550         * method.c (synthesize_method): Don't scan fndecl's rtl if
19551         we're at the end of the file; just assume the function can't
19552         be inlined.
19553
19554 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19555
19556         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
19557         it failed.
19558
19559         * cvt.c (build_user_type_conversion_1): Handle overloaded
19560         conversion ops.
19561
19562         * cvt.c (add_builtin_candidates): Don't consider type conversion
19563         operators for the first parameter of operator=.
19564
19565 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
19566
19567         * typeck.c (complete_type): Only call layout_type if we're not
19568         expanding a template.
19569
19570 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
19571
19572         * cvt.c (compare_ics): Oops.
19573
19574         * cvt.c (op_error): Oops.
19575
19576         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
19577         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
19578         (build_conv): Use them.
19579         (implicit_conversion): Use them.
19580         (convert_like): Handle them.
19581         (build_new_op): Handle builtin COND_EXPR again.
19582         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
19583         in lists of types for COND_EXPR.
19584         (add_builtin_candidate): Add enum candidates for COND_EXPR.
19585
19586 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
19587
19588         * typeck.c (build_modify_expr): Always attempt to build a call to
19589         the assignment operator, even if we're using a default one.
19590         (convert_for_initialization): Call complete_type.
19591
19592 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
19593
19594         * cvt.c (reference_binding): A REF_BIND gets the reference type.
19595         (implicit_conversion): Likewise.
19596         (convert_like): Likewise.
19597         (compare_ics): Likewise.
19598         (compare_qual): Likewise.
19599         (print_z_candidates): Handle no candidates.
19600         (build_new_op): Don't handle builtin COND_EXPR for now.
19601
19602 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
19603
19604         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
19605
19606 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
19607
19608         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
19609
19610         * cvt.c (build_builtin_candidate): Oops.
19611         (build_new_op): Oops.
19612
19613         * method.c (build_opfncall): Pass COND_EXPR on.
19614         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
19615         (add_builtin_candidate{,s}): Likewise.
19616         (add_builtin_candidates): Likewise.
19617         (print_z_candidates, op_error, build_new_op): Likewise.
19618         (type_decays_to): New fn.
19619         * lex.c (init_lex): Just say ?: for COND_EXPR.
19620
19621 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
19622
19623         * typeck.c (complete_type): Call layout_type rather than building
19624         a new array type.
19625
19626         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
19627         only use ptrdiff_t.
19628
19629 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
19630
19631         * cvt.c: Always compile the new overloading code (but don't use it).
19632         (implicit_conversion): Add a BASE_CONV when converting to
19633         the same class type.
19634         (convert_like): Handle BASE_CONV.
19635
19636 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19637
19638         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
19639         (add_builtin_candidate): Likewise.
19640
19641         NEW_OVER changes:
19642         * typeck.c (build_x_function_call): Try an operator function
19643         whenever we call an object of class type.
19644         * method.c (build_opfncall): Pass CALL_EXPRs through.
19645         * cvt.c (implicit_conversion): Do const-ref case first.
19646         (add_conv_candidate, build_object_call, op_error): New fns.
19647         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
19648         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
19649         builtin candidates.
19650         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
19651         Fall back on preincrement handling.  Use op_error.
19652         Handle warn_synth.
19653         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
19654         an error_mark_node.
19655         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
19656         properly.
19657
19658 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
19659
19660         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
19661
19662 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
19663
19664         * typeck.c (build_component_ref_1): Use build_component_ref
19665         instead of open coding it here.
19666
19667 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
19668
19669         * g++.c (main): Don't link with -lg++.
19670
19671         NEW_OVER changes:
19672         * cvt.c (convert_to_reference): Don't use convert_from_reference on
19673         result of build_type_conversion.
19674         (cp_convert): Only call build_method_call for ctors if
19675         build_type_conversion failed.
19676         (ptr_complete_ob): New function.
19677         (TYPE_PTR{,OB,MEM}_P): New macros.
19678         ({add,build}_builtin_candidate{,s}): New functions.
19679         (print_z_candidates): Handle builtins.
19680         (build_user_type_conversion_1): Don't use conversion fns for
19681         converting to a base type.
19682         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
19683         (build_user_type_conversion): Use convert_from_reference.
19684         (build_new_op): New function.
19685         (build_over_call): Fix handling of methods.
19686         (compare_ics): Handle AMBIG_CONV properly.
19687         * typeck2.c: Increment abort count.
19688         * method.c (build_opfncall): Forward most requests to build_new_op.
19689         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
19690
19691 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19692
19693         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
19694         invalid second argument to dump_expr_list.
19695
19696 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
19697
19698         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
19699
19700 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
19701
19702         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
19703         ASSEMBLE_EXTERNAL.
19704
19705 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
19706
19707         * typeck2.c (process_init_constructor): New pedwarn for using { }
19708         to initialize a pointer to member function.
19709         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
19710         we can avoid the new error.
19711
19712 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
19713
19714         * typeck.c (build_ptrmemfunc1): New function to hide details of
19715         pointer to member functions better.
19716
19717 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
19718
19719         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
19720         methods into the actual method, as we know the implied object is
19721         not used.
19722
19723 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19724
19725         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
19726         inside a system header.
19727
19728 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
19729
19730         * call.c (build_method_call): Call complete_type on the
19731         instance type.
19732
19733 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
19734
19735         * typeck.c (build_component_ref): Always build up an OFFSET_REF
19736         for obj_ptr->func so that we can know which object to use in a
19737         method call.
19738
19739 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
19740
19741         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
19742         around things.  Also improve maintainability.
19743
19744 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
19745
19746         * decl.c (grokdeclarator): Check for overflow when evaluating an
19747         array dimension.
19748
19749 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
19750
19751         * cvt.c (cp_convert): Don't check for ambiguity with constructor
19752         if NEW_OVER.
19753
19754         * typeck.c (build_x_function_call): Pass function overload
19755         questions to new overloading code if NEW_OVER.
19756         * init.c (expand_aggr_init_1): Only check for type conversion ops
19757         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
19758         Don't check for ambiguity with constructor if NEW_OVER.
19759         * cvt.c (convert_to_reference): Dereference the result of a type
19760         conversion operator.
19761         (build_conv): Propagate ICS_USER_FLAG.
19762         (implicit_conversion): Call instantiate_type.
19763         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
19764         (add_function_candidate): Fix cv-quals on argtype.
19765         (print_z_candidates): New function.
19766         (build_new_function_call): Call it.
19767         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
19768         consider non-converting constructors.
19769         Call print_z_candidates.
19770         Return an AMBIG_CONV for an ambiguous conversion.
19771         (build_user_type_conversion): Handle AMBIG_CONV.
19772         (convert_like): Fix test for building TARGET_EXPR.
19773         Call instantiate_type.
19774         Handle AMBIG_CONV and LVALUE_CONV.
19775         (build_over_call): Handle 0 args and ellipsis.
19776         * cp-tree.def: Add AMBIG_CONV.
19777
19778 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
19779
19780         * decl.c (lookup_name_real): If we find mem in obj when parsing
19781         `obj->mem', make sure we return the right value.
19782
19783 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
19784
19785         * search.c (get_base_distance): Call complete_type.
19786
19787 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
19788
19789         * decl.c (store_bindings): Make static.
19790
19791 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
19792
19793         * init.c (expand_aggr_init_1): Don't check type conversions if
19794         NEW_OVER.
19795
19796         * cvt.c (z_candidate): Put back template field.
19797         (add_function_candidate): Set it.
19798         (add_template_candidate): Likewise.
19799         (joust): Use it.
19800         (compare_qual): Handle references and pointers to members.
19801         (compare_ics): Handle reference bindings.
19802
19803         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
19804
19805 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
19806
19807         * call.c (compute_conversion_costs): Call complete_type.
19808
19809         * tree.c (vec_binfo_member): Use comptypes instead of comparing
19810         pointers, so we can handle template parameters.
19811
19812 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
19813
19814         * cvt.c (cp_convert_to_pointer): We have to call complete_type
19815         here; let's make it explicit instead of a side effect of an
19816         error check.
19817
19818 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
19819
19820         * cvt.c (z_candidate): Remove template field.
19821         (reference_binding): Handle binding to temporary.
19822         (implicit_conversion): Likewise.
19823         (add_function_candidate): Handle artificial constructor parms.
19824         Handle functions with too few parms.
19825         (add_template_candidate): New function.
19826         (build_user_type_conversion_1): Handle constructors.
19827         (convert_like): Likewise.
19828         (build_over_call): Likewise.
19829         (build_new_function_call): Support templates.
19830         (compare_ics): Fix reference, inheritance handling.
19831
19832 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
19833
19834         * decl.c: Add signed_size_zero_node.
19835         (init_decl_processing): Build it.
19836         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
19837         when we're trying to make a negative delta.
19838
19839 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19840
19841         Stop doing this damn index==strchr variable name confusion.
19842         * class.c (add_virtual_function): Change local var INDEX to be
19843         named IDX.
19844         (add_method): Likewise.
19845         * lex.c (print_parse_statistics): Likewise.
19846         * search.c (make_memoized_table_entry): Likewise.
19847         (lookup_fnfields_here): Likewise.
19848         (lookup_field): Likewise.
19849         (lookup_fnfields): Likewise.
19850         (get_baselinks): Likewise.
19851         * sig.c (build_signature_table_constructor): Likewise.
19852         (build_signature_method_call): Likewise.
19853         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
19854         (get_member_function_from_ptrfunc): Likewise.
19855         (build_ptrmemfunc): Change local var INDEX to be IDX.
19856         (c_expand_start_case): Likewise.
19857
19858 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
19859
19860         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
19861         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
19862         (convert_to_reference): Use build_type_conversion to convert to
19863         the reference type directly.
19864         (standard_conversion): Fix void* case, non-conversions.
19865         (reference_binding): Fix expr == 0 case, non-conversions.
19866         (convert_like): Support REF_BIND.
19867         (compare_qual): Split out from compare_ics.
19868         (compare_ics): Use it, handle icses with only a qual_conv.
19869
19870         * init.c (expand_vec_init): Don't crash if decl is NULL.
19871
19872 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
19873
19874         * mpw-config.in: New file, configury for Mac MPW.
19875         * mpw-make.sed: New file, makefile editing for MPW.
19876
19877 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19878
19879         * pt.c (instantiate_class_template): Call repo_template_used.
19880
19881         * search.c (lookup_conversions): Only lookup conversions in
19882         complete types.
19883
19884 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19885
19886         * cp-tree.def: Renamed from tree.def, to avoid confusion with
19887         gcc's tree.def.
19888         * cp-tree.h, lex.c: Include cp-tree.def.
19889         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
19890
19891 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
19892
19893         * init.c (build_vec_delete_1): Call complete_type.
19894
19895 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
19896
19897         * except.c (start_anon_func): Make sure anonymous functions are
19898         never external.
19899
19900 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
19901
19902         * decl.c (finish_function): If function_depth > 1, set nested.
19903
19904         * decl2.c (grokbitfield): Revert Bob's change.
19905         * class.c (finish_struct_1): Fix handling of named bitfield widths.
19906
19907 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
19908
19909         * pt.c (add_pending_template): Handle types.
19910         (lookup_template_class): With -fexternal-templates, just add the class
19911         to pending_templates instead of instantiating it now.
19912         * decl2.c (finish_file): Handle types in pending_templates.
19913
19914 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
19915
19916         * decl2.c (grokbitfield): Handle constant decls appropriately.
19917         Give an appropriate error message now instead of spewing core
19918         later.
19919
19920 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
19921
19922         * decl2.c: Don't turn on thunks by default for now.
19923
19924 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
19925
19926         * typeck.c (complete_type): Handle error_mark_node.
19927         (common_type, OFFSET_TYPE): Handle template_type_parms.
19928
19929 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
19930
19931         * pt.c (instantiate_decl): If at_eof, call import_export_decl
19932         regardless of DECL_INLINE.
19933
19934         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
19935
19936         * class.c (finish_struct_bits): Copy TYPE_SIZE.
19937
19938         * rtti.c (build_dynamic_cast): Support templates.
19939         * tree.def: Support DYNAMIC_CAST_EXPR.
19940         * pt.c (tsubst_copy): Likewise.
19941         * decl2.c (build_expr_from_tree): Likewise.
19942
19943 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
19944
19945         * typeck.c (build_static_cast): Support templates.
19946         (build_const_cast): Likewise.
19947         * tree.def: Support CONST/STATIC_CAST_EXPR.
19948         * pt.c (tsubst_copy): Likewise.
19949         * decl2.c (build_expr_from_tree): Likewise.
19950
19951 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
19952
19953         * decl2.c (finish_vtable_vardecl): Don't trust
19954         TREE_SYMBOL_REFERENCED for vtables of local classes.
19955
19956 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
19957
19958         * pt.c (tsubst_copy): Handle operator T.
19959
19960 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19961
19962         * init.c (build_delete): Move creation of PARMS inside test of
19963         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
19964
19965 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
19966
19967         * typeck.c (build_conditional_expr): Don't assume that
19968         the arguments to ?: are always pointers or records.
19969
19970 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
19971
19972         * decl2.c (import_export_decl): Still emit static/weak/comdat
19973         copies of inline template functions with -fno-implicit-templates.
19974
19975 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
19976
19977         * init.c (build_delete): Determine the complete basetype
19978         path to the destructor we're calling.
19979
19980 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
19981
19982         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
19983         initialize the enum, because we really and truly don't know where
19984         it came from.
19985         (start_enum): Don't copy integer_zero_node because
19986         build_enumerator will do it.
19987
19988 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
19989
19990         * decl.c (finish_function): Do access control on base destructors.
19991
19992         * pt.c (tsubst, case FUNCTION_DECL): Set up
19993         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
19994         hose us.
19995
19996 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
19997
19998         * cvt.c (build_up_reference): If we have already extended the
19999         lifetime of the temporary, don't try it again.
20000         * typeck.c (c_expand_return): Don't try and convert the return
20001         value twice when we want a reference, once is enough.
20002
20003 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
20004
20005         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
20006         LOOKUP_ONLYCONVERTING at all for now.
20007
20008         * search.c (add_conversions): Put the conversion function in
20009         TREE_VALUE, the basetype in TREE_PURPOSE.
20010         * cvt.c (build_type_conversion): Adjust.
20011         * cvt.c (build_expr_type_conversion): Adjust.
20012         * call.c (user_harshness): Adjust.
20013
20014 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
20015
20016         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
20017         backend's benefit.
20018
20019 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
20020
20021         * except.c (expand_start_catch_block): Add a dummy region, if we
20022         get an error, so that we can avoid core dumping later.
20023
20024 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
20025
20026         * cp-tree.h (OFFSET_REF): Remove.
20027         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
20028         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
20029         * init.c (expand_aggr_init_1): Likewise.
20030         (build_new): Likewise.
20031         * typeck.c (expand_target_expr): Likewise.
20032
20033 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
20034
20035         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
20036         TARGET_EXPR.
20037
20038 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
20039
20040         * cvt.c (build_up_reference): Redo how and when temporaries are
20041         created.
20042         * decl.c (grok_reference_init): Don't try and be smart about
20043         running cleanups.
20044
20045 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
20046
20047         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
20048         (TARGET_EXPR...), now that it has 4 arguments.
20049         * tree.c (build_cplus_new): Likewise.
20050
20051 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20052
20053         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
20054
20055         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
20056         * decl.c (struct saved_scope): Remove named_labels,
20057         {base,member}_init_list.
20058         (maybe_push_to_top_level): Don't set them.  Call
20059         push_cp_function_context if appropriate.
20060         (pop_from_top_level): Likewise.
20061
20062         * method.c (do_build_assign_ref): Remove obsolete check of
20063         TYPE_HAS_ASSIGN_REF (basetype).
20064
20065         * decl.c (grokfndecl): Diagnose user definition of
20066         implicitly-declared methods.
20067
20068 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
20069
20070         * method.c (do_build_copy_constructor): Add code to give
20071         meaningful error messages instead of crashing.
20072         (do_build_assign_ref): Don't synthesize assignment operators for
20073         classes containing reference or const members.
20074
20075         * class.c (struct base_info): Remove cant_synth_copy_ctor
20076         and cant_synth_asn_ref.
20077         (finish_base_struct): Remove the code that tries to conditionalize
20078         synthesis of copy constructors & assignment operators based on
20079         access permissions.  Instead, let it fail when it tries to
20080         synthesize the copy constructor.  This will give meaningful error
20081         messages instead of silently generating code to perform a bitcopy.
20082
20083 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
20084
20085         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
20086         determining types for constant values.
20087
20088         * decl.c (struct named_label_list): Use instead of stuffing
20089         random items into a TREE_LIST node.
20090         (named_label_uses): Use the new struct.
20091         (poplevel): Likewise.
20092         (lookup_label): Likewise.
20093         (define_label): Add an error message to tell the user the line
20094         where the goto is located in addition to the destination of the
20095         goto.
20096         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
20097         named_label_uses.
20098         (finish_function): Likewise.
20099
20100         (start_decl): Complain about defining a static data member
20101         in a different type from which it was declared.
20102
20103 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
20104
20105         * cvt.c (build_expr_type_conversion): Adjust.
20106
20107 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
20108
20109         * call.c (build_method_call): Always convert 'this' to the
20110         appropriate type.
20111
20112         * search.c (add_conversions): Put the conversion function in
20113         TREE_VALUE, the type in TREE_PURPOSE.
20114         * cvt.c (build_type_conversion): Adjust.
20115         * call.c (user_harshness): Adjust.
20116
20117         * method.c (emit_thunk): Call temporary_allocation and
20118         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
20119
20120         * tree.c (build_cplus_array_type): Handle tweaking of
20121         TYPE_MAIN_VARIANT here.
20122         * typeck.c (common_type): Not here.
20123
20124         * typeck.c (complete_type): Only try to complete an array type if
20125         it has a domain.
20126
20127 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
20128
20129         * decl.c (grokvardecl): Call complete_type.
20130         (grokdeclarator): Call complete_type for PARM_DECLs.
20131
20132 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
20133
20134         * pt.c (instantiate_class_template): Re-set
20135         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
20136
20137 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
20138
20139         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
20140         smart enough to do it right.
20141         * tree.c (cp_expand_decl_cleanup): Likewise.
20142         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
20143         cp_expand_decl_cleanup.
20144         (store_parm_decls): Likewise.
20145         (hack_incomplete_structures): Likewise.
20146         * except.c (push_eh_cleanup): Likewise.
20147
20148 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
20149
20150         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
20151         frontend to the backend where it belongs.
20152         * tree.c (unsave_expr): Likewise.
20153         (unsave_expr_now): Likewise.
20154         * tree.def (UNSAVE_EXPR): Likewise.
20155         * cp-tree.h (unsave_expr): Likewise.
20156         (unsave_expr_now): Likewise.
20157
20158 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
20159
20160         * init.c (emit_base_init): Make sure the partial EH cleanups live
20161         on the function_obstack.
20162
20163 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
20164
20165         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
20166         when checking for pointer types.
20167
20168 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
20169
20170         * pt.c (instantiate_class_template): Remove obsolete check for
20171         access declarations.
20172
20173 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
20174
20175         * call.c (build_overload_call): Simplify calls to
20176         build_overload_call by removing last parameter.
20177         (build_method_call): Likewise.
20178         * cp-tree.h: Likewise.
20179         * method.c (build_opfncall): Likewise.
20180         * typeck.c (build_x_function_call): Likewise.
20181
20182 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
20183
20184         * call.c (default_parm_conversions): Factor out common code.
20185         (build_method_call): Use it.
20186         (build_overload_call_real): Use it.
20187
20188 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
20189
20190         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
20191         but pedwarn as the code is bogus.
20192         * typeck.c (decay_conversion): Likewise.
20193         (build_function_call_real): Use build_addr_func instead of
20194         default_conversion.  Don't allow pointer-to-method functions down
20195         here.
20196         (build_unary_op): Use real pointer-to-member functions instead of
20197         fake ones.
20198         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
20199         (convert_for_assignment): Removed some obsolete code.
20200         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
20201         build_x_function_call instead of current_class_ptr.  Only call
20202         digest_init once on an initializer, we do this just checking
20203         TREE_TYPE.
20204         (build_expr_from_tree): Pass current_class_ref to
20205         build_x_function_call instead of current_class_ptr.
20206         * init.c (build_member_call): Likewise.
20207         * pase.y: Likewise.
20208         * error.c (dump_expr): Handle OFFSET_REFs better.
20209         * pt.c (unify): Handle pointer-to-member functions better.
20210         * decl.c (finish_function): Clear out current_class_ref just like
20211         we do for current_class_ptr.
20212
20213         * typeck.c (get_delta_difference): Handle virtual bases better.
20214
20215 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
20216
20217         * sig.c (build_signature_table_constructor): Use the delta for
20218         the original basetype for this virtual function with thunks.
20219         (build_signature_method_call): We still need to adjust 'this'
20220         with thunks.
20221
20222 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
20223
20224         * call.c (build_addr_func): New routine.  Used to get the `real'
20225         address of a function or a method.  Needed to avoid getting a
20226         pointer-to-member function.
20227         (build_call): New routine to build CALL_EXPRs.
20228         (build_method_call): Use it.
20229         * cvt.c (convert_to_aggr): Likewise.
20230         * typeck.c (build_function_call_real): Likewise.
20231         * sig.c (build_signature_table_constructor): Use build_addr_func.
20232         * cp-tree.h (build_call, build_addr_func): Declare them.
20233
20234 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
20235
20236         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
20237         * parse.y: Remove uses of LOOKUP_AGGR.
20238
20239 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
20240
20241         * *.[chy]: Rename current_class_decl to current_class_ptr, and
20242         C_C_D to current_class_ref.
20243
20244 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
20245
20246         * call.c (convert_harshness): Tighten up pointer conversions.
20247
20248 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
20249
20250         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
20251         (finish_file): Likewise.
20252
20253 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
20254
20255         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
20256
20257         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
20258         code.
20259
20260 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20261
20262         * decl2.c: Turn on thunks by default where supported.
20263
20264 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
20265
20266         * cp-tree.h (build_overload_call_maybe): Removed.
20267         * call.c (build_overload_call_real): Invert meaning of last arg to
20268         be require_complete.
20269         (build_overload_call): Likewise.
20270         * typeck.c (build_x_function_call): Use build_overload_call_real
20271         instead of build_overload_call_maybe.
20272
20273 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
20274
20275         * decl2.c (finish_file): Don't try to emit functions that haven't
20276         been compiled.
20277
20278 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
20279
20280         * decl2.c (finish_vtable_vardecl): Oops.
20281
20282         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
20283         Also store the bindings from previous_class_values.
20284         (pop_from_top_level): Restore them.
20285
20286 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
20287
20288         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
20289         symbol has been referenced.
20290         (finish_file): Re-join synthesis/vtable loop with inline emission
20291         loop, disable inlining when an inline is output.
20292
20293 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
20294
20295         * except.c (init_exception_processing): Setup saved_in_catch.
20296         (push_eh_cleanup): Reset __eh_in_catch.
20297         (expand_start_catch_block): Set __eh_in_catch.
20298
20299 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
20300
20301         * except.c (push_eh_cleanup): Add tracking for whether or not we
20302         have an active exception object.
20303         (expand_builtin_throw): Use it to make sure a rethrow without an
20304         exception object is caught.
20305
20306 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
20307
20308         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
20309         cache.
20310
20311 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
20312
20313         * decl2.c (finish_file): Also use sentries for vars with
20314         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
20315         created).
20316
20317         * lex.c (handle_cp_pragma): Disable #pragma
20318         interface/implementation if SUPPORTS_ONE_ONLY > 1.
20319
20320 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
20321
20322         * method.c (emit_thunk): Wrap default case in
20323         temporary/permanent_allocation.
20324
20325         * method.c (make_thunk): Use DECL_ONE_ONLY.
20326         (emit_thunk): Call assemble_end_function.
20327
20328 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
20329
20330         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
20331         (import_export_decl): Likewise.
20332         (finish_prevtable_vardecl): Disable vtable hack if
20333         SUPPORTS_ONE_ONLY > 1.
20334
20335 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
20336
20337         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
20338         PREDECREMENT_EXPRs take two arguments, not one.
20339
20340 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
20341
20342         * class.c (build_vtable_entry): Don't build thunks for abstract
20343         virtuals.
20344
20345         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
20346         frontend.
20347
20348 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
20349
20350         * class.c (set_rtti_entry): Use size_zero_node.
20351         (build_vtable): Likewise.
20352
20353 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
20354
20355         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
20356         (prepare_fresh_vtable): Likewise.
20357
20358 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
20359
20360         * method.c (emit_thunk): Call mark_used on the target function.
20361
20362         * call.c (build_method_call): Don't warn about pending templates.
20363
20364 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
20365
20366         * decl2.c (finish_file): Fix list walking logic.
20367
20368         * typeck2.c (check_for_new_type): Only warn if -pedantic.
20369
20370 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
20371
20372         * class.c (finish_struct_1): Remove old code for
20373         dont_allow_type_definitions.
20374         * cp-tree.h: Likewise.
20375         * spew.c: Make sure cp-tree.h is included before parse.h, so the
20376         definition of flagged_type_tree is found before it is used.
20377         * lex.c: Likewise.
20378         * parse.y: Added the ftype member to the type union, and changed a
20379         number of rules to use it instead of ttype.  Added calls to
20380         check_for_new_type() as appropriate.
20381         * typeck2.c (check_for_new_type): New function for checking
20382         if a newly defined type appears in the specified tree.
20383         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
20384         for check_for_new_type().
20385
20386 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
20387
20388         * decl2.c (finish_file): Only use a sentry if the decl is public.
20389
20390         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
20391         don't pass LOOKUP_ONLYCONVERTING.
20392
20393 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
20394
20395         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
20396         properly keeps track of const and volatile type modifiers.
20397
20398 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
20399
20400         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
20401         * pt.c (comp_template_args): Use it.
20402
20403         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
20404         assemble_external for artificial function decls.
20405
20406         * decl.c (cp_finish_decl): Oops.
20407
20408 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
20409
20410         * decl2.c (import_export_decl): Put static data member templates
20411         into common storage, or make them weak, depending on whether they
20412         are dynamically or statically initialized.
20413         (get_sentry): New function.
20414         (finish_file): Do import_export_decl for static data members before
20415         building the init/fini functions.  Don't init/fini a variable that's
20416         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
20417         push/pop_temp_slots.
20418         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
20419         expand_static_init thang.
20420         * method.c (get_id_2): New function.
20421
20422 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
20423
20424         * parse.y (empty_parms): Make sure we use C++-style prototypes
20425         when we're declaring member functions.
20426
20427 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
20428
20429         * Makefile.in (CONFLICTS): 16 s/r conflicts.
20430         * parse.y (self_template_type): New nonterminal.
20431
20432 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
20433
20434         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
20435         name.
20436         * parse.y (base_class.1): Allow 'typename foo::bar'.
20437
20438         * lex.c (check_newline): Remove #pragma code that plays with the
20439         input stream, since we now deal with tokens.  Clear nextchar when
20440         we're done.
20441         (handle_cp_pragma): Use real_yylex.
20442         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
20443         in one place.
20444
20445         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
20446
20447         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
20448
20449 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20450
20451         * parse.y: New token SELFNAME for potential constructor.
20452         * spew.c (yylex): Handle it.
20453         * lex.c (identifier_type): Produce it.
20454
20455         * parse.y (complete_type_name): In :: case, don't push class binding.
20456         (complex_type_name): Likewise.
20457
20458 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
20459
20460         * typeck.c (build_reinterpret_cast): Handle pointer to member
20461         functions.
20462
20463 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20464
20465         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
20466         pragmas.
20467         (check_newline): Put the vtable/unit/implementation/interface pragma
20468         code into handle_cp_pragma, replacing it with a call.
20469         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
20470         args.  Get the next token after handling the pragma token.
20471
20472 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
20473
20474         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
20475         (convert_to_pointer_force): Likewise.
20476
20477         * init.c (build_new): Fix array new without -fcheck-new.
20478
20479 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
20480
20481         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
20482         tree.c: Lose TYPE_NESTED_NAME.
20483
20484         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
20485         as identifiers.
20486
20487         * tree.def: Add VEC_INIT_EXPR.
20488         * expr.c (cplus_expand_expr): Handle it.
20489         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
20490         the extra file-scope symbol nastiness.
20491
20492 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
20493
20494         * method.c (make_thunk): Thunks are static.
20495         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
20496
20497         * decl2.c (mark_vtable_entries): Emit thunks as needed.
20498         (finish_file): Don't emit them here.
20499
20500 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
20501
20502         * rtti.c (build_dynamic_cast): Handle null pointers.
20503         (ifnonnull): New function.
20504
20505 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
20506
20507         * call.c (build_method_call): Remember the original basetype we
20508         were called with.  Give an error message instead of trying
20509         (incorrectly) to call a non-static member function through a
20510         non-inherited class.
20511
20512         * search.c (expand_upcast_fixups): Mark the new fixup as
20513         DECL_ARTIFICIAL.
20514
20515 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20516
20517         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
20518
20519         * class.c (set_rtti_entry): Fix for thunks.
20520
20521         * decl2.c (import_export_decl): Still emit typeinfo fns for
20522         cv-variants of builtin types.
20523
20524         * rtti.c (expand_class_desc): Set up base_info_type_node here.
20525         (init_rtti_processing): Instead of here.
20526
20527 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
20528
20529         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
20530         (build_typeid): Only complain about taking dynamic typeid without
20531         -frtti.
20532
20533         * decl2.c: flag_rtti defaults to 1.
20534
20535         * rtti.c (get_tinfo_var): The general class case is now smaller.
20536         (init_rtti_processing): Pack the latter three fields of base_info
20537         into 32 bits.
20538
20539 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
20540
20541         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
20542
20543 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
20544
20545         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
20546         (push_memoized_context): Split out code to undefer pop_type_level to
20547         (clear_memoized_cache): here.
20548         (pop_memoized_context): We can only handle one layer of deferral of
20549         pop_type_level so clear the cache, if there was a previous level.
20550
20551 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20552
20553         * rtti.c (init_rtti_processing): Build up base_info_type_node.
20554         (expand_class_desc): Use one pointer to an array of base_info
20555         structs, passed using a CONSTRUCTOR.
20556
20557 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
20558
20559         * class.c (build_vbase_path): Remove block extern for
20560         flag_assume_nonnull_objects here.
20561         (build_vfn_ref): Split out functionality into build_vtbl_ref.
20562         (build_vtbl_ref): New routine.
20563         (build_vtable): Set up rtti info here.
20564         (add_virtual_function): Note in CLASSTYPE_RTTI the best
20565         place where we can get the rtti pointers from to avoid having to
20566         search around for a place.
20567         (finish_base_struct): Likewise.
20568         (finish_struct_1): Likewise.  Never create totally new vtables
20569         with totally new vtable pointers for rtti.  Disable code to layout
20570         vtable pointers better until we want to break binary
20571         compatibility.
20572         * rtti.c (build_headof_sub): New routine to convert down to a
20573         sub-object that has an rtti pointer in the vtable.
20574         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
20575         maintainable.
20576         (build_dynamic_cast): Make sure we have saved it, if we need to.
20577         * search.c (dfs_init_vbase_pointers): Disable code that deals with
20578         a more efficient vtable layout, enable later.
20579         * call.c (flag_assume_nonnull_objects): Moved declaration to
20580         * cp-tree.h: here.  Declare build_vtbl_ref.
20581         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
20582         function calls that want a tree.
20583
20584 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
20585
20586         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
20587         other X subobjects in the most derived type.  Ack.
20588
20589         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
20590         get_typeid will do it for us.
20591         (get_typeid_1): Break out call-building for expand_*_desc to use.
20592         (get_typeid): Call it.
20593         (expand_*_desc): Likewise.
20594         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
20595         and void *.
20596         (init_decl_processing): Lose builtin_type_tdescs lossage.
20597         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
20598
20599 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
20600
20601         * pt.c (tsubst): When calling set_nested_typename, use
20602         TYPE_NESTED_NAME (current_class_type) instead of
20603         current_class_name.
20604
20605         * decl.c (pushdecl): Likewise.
20606         (pushdecl_class_level): Likewise.
20607         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
20608         set_nested_typename.
20609
20610 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
20611
20612         * rtti.c (synthesize_tinfo_fn): Handle arrays.
20613
20614         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
20615
20616 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
20617
20618         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
20619         (init_rtti_processing): Lose bad_cast_type.
20620         (build_dynamic_cast): Use throw_bad_cast.
20621
20622         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
20623
20624         * decl2.c (finish_file): Don't synthesize artificial functions
20625         that are external and not inline.
20626
20627         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
20628
20629         * decl2.c (finish_file): Handle having new inlines added to
20630         saved_inlines by synthesis.
20631
20632         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
20633
20634 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20635
20636         RTTI rewrite to initialize nodes as needed, not require that
20637         users #include <typeinfo>, complete functionality and reduce wasted
20638         space.
20639         * rtti.c (init_rtti_processing): New fn.
20640         (build_typeid): The vtable entry is now a function.
20641         (get_tinfo_var): New fn.
20642         (get_tinfo_fn): Likewise.
20643         (get_typeid): Use it.
20644         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
20645         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
20646         points __rtti_*.
20647         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
20648         (synthesize_tinfo_fn): New fn.
20649         * method.c (build_t_desc_overload): Lose.
20650         (build_overload_with_type): More generic.
20651         * decl.c (init_decl_processing): Call init_rtti_processing.
20652         * class.c (set_rtti_entry): Use get_tinfo_fn.
20653         * decl2.c (mark_vtable_entries): Mark the rtti function.
20654         (finish_prevtable_vardecl): Don't build_t_desc.
20655         (import_export_decl): Handle tinfo functions.
20656         (finish_file): Likewise.
20657         * typeck.c (inline_conversion): New fn.
20658         (build_function_call_real): Use it.
20659         * cp-tree.h: Add decls.
20660
20661         * method.c (hack_identifier): Also convert component_refs from
20662         references.
20663
20664         * lex.c (cons_up_default_function): Use the type, not the name, in
20665         declspecs.
20666
20667         * decl2.c (import_export_vtable): Fix weak vtables.
20668
20669 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
20670
20671         * search.c (get_base_distance_recursive): Fix access checks for
20672         protected bases.
20673
20674 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20675
20676         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
20677         cp-tree.h.
20678         (convert_harshness): Add prototypes wrapped by PROTO.
20679         * decl2.c (grok_function_init): Likewise.
20680         (do_toplevel_using_decl): Change to void return type.
20681         * class.c (build_vtable_entry): Remove decl of make_thunk.
20682         (merge_overrides): Fix order of arg definitions.
20683         (finish_vtbls): Likewise.
20684         (fixup_vtable_deltas): Likewise.
20685         (modify_all_direct_vtables): Likewise.
20686         (modify_all_indirect_vtables): Likewise.
20687         * search.c (get_base_distance_recursive): Likewise.
20688         (get_abstract_virtuals_1): Likewise.
20689         (fixup_virtual_upcast_offsets): Likewise.
20690         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
20691         * init.c (perform_member_init): Fix order of arg definitions.
20692         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
20693         * cp-tree.h (make_thunk): Add decl.
20694         (overload_template_name, push_template_decl): Add decls.
20695         (do_toplevel_using_decl): Change to void return type.
20696         (vec_binfo_member): Add decl.
20697
20698 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20699
20700         * typeck.c (mark_addressable, convert_for_assignment,
20701         convert_for_initialization, pointer_int_sum, pointer_diff,
20702         unary_complex_lvalue): Add prototypes wrapped by PROTO.
20703         (convert_sequence): #if 0 fn decl, since definition also is.
20704
20705 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
20706
20707         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
20708         cast to pointer types for type searching.
20709
20710 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20711
20712         * typeck.c (get_delta_difference): Use cp_error, not error, in the
20713         case where BINFO == 0.
20714
20715 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
20716
20717         * call.c (build_method_call): Fix wording of error messages so
20718         constructors come out right.
20719
20720 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
20721
20722         * decl.c (push_overloaded_decl): Don't warn about hidden
20723         constructors when both the type and the function are declared
20724         in a system header file.
20725
20726 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
20727
20728         * class.c (finish_struct_1): Propagate the TYPE_PACKED
20729         flag for the type to the type's fields.
20730
20731 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20732
20733         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
20734
20735 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
20736
20737         * class.c (base_info, finish_base_struct): Replace
20738         needs_virtual_dtor with base_has_virtual.
20739
20740         (finish_struct_1): Remove the old code that tried to make default
20741         destructors virtual.  Use base_has_virtual when checking if we need
20742         to add a vtable entry for the rtti code.
20743
20744 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
20745
20746         * pt.c (push_template_decl): Complain about template decl with
20747         inappropriate declaration.
20748
20749 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
20750
20751         * typeck.c (build_x_unary_op): Remove bogus check for taking
20752         the address of a member function.
20753
20754 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
20755
20756         * parse.y (constructor_declarator): Only push the class if
20757         we are not already in the class.
20758
20759 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
20760
20761         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
20762         Add additional argument to INIT_CUMULATIVE_ARGS.
20763
20764 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
20765
20766         * decl.c (shadow_tag): Fix error about anon union with methods.
20767
20768         * parse.y (self_reference): Only generate a self-reference if this
20769         is a non-template class.
20770         (opt.component_decl_list): Only use it if it was generated.
20771
20772         * parse.y (component_decl_1): Use constructor_declarator.
20773         (fn.def2): Likewise.
20774         (notype_component_declarator0): Likewise.
20775
20776 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
20777
20778         * typeck.c (build_x_unary_op): Add checks for taking the address
20779         of a TARGET_EXPR or of a member function, and give appropriate
20780         warnings.
20781
20782 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
20783
20784         * pt.c (process_template_parm): Allow template type parms to be
20785         used as types for template const parms.
20786
20787 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
20788
20789         * init.c (expand_vec_init): Ensure the eh cleanups are on the
20790         function_obstack.
20791
20792 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20793
20794         * decl.c (lookup_name_real): Be even more picky about the
20795         ambiguous lookup warning.
20796         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
20797         * parse.y (constructor_declarator): Rather than here.
20798
20799         * parse.y (constructor_declarator): New nonterminal.
20800         (fn.def1): Use it.
20801         (explicit_instantiation): Likewise.
20802
20803 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20804
20805         Add implicit declaration of class name at class scope.
20806         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
20807         * parse.y (self_reference): New nonterminal.
20808         (opt.component_decl_list): Use it.
20809         (fn.def1): Add nested_name_specifier type_name cases.
20810         * class.c (build_self_reference): New function.
20811         (finish_struct): Handle access_default later, move self-reference
20812         decl to the end.
20813         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
20814         * cp-tree.h: Adjust.
20815
20816         * pt.c (do_function_instantiation): Separate handling of member
20817         functions and non-member functions properly.
20818
20819 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
20820
20821         * pt.c (process_template_parm): Improve error for 'volatile class K'.
20822
20823         * class.c (finish_struct_1): Check the right slot for destructors.
20824
20825         * decl.c (start_enum): Complain about enum templates.
20826
20827 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
20828
20829         * init.c (resolve_offset_ref): Offset pointers to member data by one.
20830         * typeck.c (unary_complex_lvalue): Likewise.
20831
20832 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
20833
20834         * typeck.c (c_expand_return): Check for a returned local
20835         array name, similar to the check for an ADDR_EXPR.
20836
20837 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
20838
20839         * decl.c (cp_finish_decl): Don't build cleanups for static
20840         variables here.
20841
20842 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
20843
20844         * typeck.c (build_modify_expr): Fix error messages to be more
20845         accurate.
20846         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
20847         assignment operators.
20848         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
20849         assignment operators.
20850
20851 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
20852
20853         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
20854         give an error if initialized.  pedwarn about nested type with the
20855         same name as its enclosing class.
20856
20857         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
20858
20859         * typeck.c (require_complete_type): Be sure to instantiate the
20860         MAIN_VARIANT of the type.
20861
20862         * decl2.c (finish_file): Instantiate pending templates before
20863         processing static constructors and destructors.
20864
20865         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
20866         unless at_eof.
20867
20868 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
20869
20870         * decl2.c (delete_sanity): If error_mark_node is passed
20871         in as an expression, quit while we're ahead.
20872
20873         * decl.c (grokdeclarator): Give an error message if `friend'
20874         is combined with any storage class specifiers.
20875
20876 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
20877
20878         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
20879         definition of nonexistent nested type.
20880
20881         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
20882         not to say 'typedef'.
20883
20884 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20885
20886         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
20887         * search.c (dfs_walk, dfs_init_vbase_pointers,
20888         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
20889         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
20890
20891 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
20892
20893         * except.c (build_throw): Support minimal parse.
20894         * pt.c (tsubst_copy): Support THROW_EXPR.
20895         * decl2.c (build_expr_from_tree): Likewise.
20896
20897         * pt.c (mangle_class_name_for_template): Always allocate
20898         scratch_firstobj.
20899
20900 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
20901
20902         * cvt.c (cp_convert_to_pointer): Give an appropriate error
20903         when trying to cast from an incomplete type.
20904
20905 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20906
20907         * pt.c (instantiate_class_template): Don't bother setting up
20908         CLASSTYPE_TAGS explicitly, as the nested types will add
20909         themselves.
20910
20911 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
20912
20913         * decl.c (shadow_tag): Remove old error check for usage of
20914         an enum without a previous declaration.
20915         (xref_tag): Add error message about usage of enums without a
20916         previous declaration.
20917
20918 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
20919
20920         * lex.c (do_identifier): Only do name consistency check if we're
20921         parsing.
20922
20923         * pt.c (push_template_decl): Don't crash if we get a member defn
20924         that doesn't match.
20925
20926         * decl.c (xref_tag_from_type): New function to do an xref without
20927         always having to figure out code_type_node.
20928         * cp-tree.h: Declare it.
20929         * pt.c (instantiate_class_template): Use it for friend classes.
20930         (lookup_template_class): Use it.
20931
20932         * typeck2.c (build_functional_cast): Pull out a single parm before
20933         passing it to build_c_cast.
20934
20935 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
20936
20937         * expr.c (do_case): Give an error message if a pointer is
20938         given as a case value.
20939
20940 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
20941
20942         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
20943         an overload list.
20944
20945         * lex.c (cons_up_default_function): Really, now, interface hackery
20946         does not apply to synthesized methods.
20947
20948 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
20949
20950         * call.c (build_method_call): Ctors and dtors now have special names
20951         with respect to lookups.
20952         * class.c (add_method): Likewise.
20953         (grow_method): Likewise.
20954         (finish_struct_methods): Likewise.
20955         (warn_hidden): Likewise.
20956         (finish_struct_1): Likewise.
20957         * cvt.c (convert_to_reference): Likewise.
20958         (convert_to_aggr): Likewise.
20959         (cp_convert): Likewise.
20960         * decl2.c (check_classfn): Likewise.
20961         * init.c (expand_member_init): Likewise.
20962         (expand_default_init): Likewise.
20963         (expand_aggr_init_1): Likewise.
20964         (build_offset_ref): Likewise.
20965         (build_new): Likewise.
20966         (build_delete): Likewise.
20967         * lex.c (do_inline_function_hair): Likewise.
20968         * search.c (lookup_field_1): Likewise.
20969         (lookup_fnfields_here): Likewise.
20970         (lookup_field): Likewise.
20971         (lookup_fnfields): Likewise.
20972         (get_virtual_destructor): Likewise.
20973         (dfs_debug_mark): Likewise.
20974         (dfs_pushdecls): Likewise.
20975         (dfs_compress_decls): Likewise.
20976         * tree.c (layout_basetypes): Likewise.
20977         * typeck.c (build_component_ref): Likewise.
20978         (build_x_function_call): Likewise.
20979         (build_modify_expr): Likewise.
20980         (convert_for_initialization): Likewise.
20981         (build_functional_cast): Likewise.
20982         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
20983         (CTOR_NAME): New.
20984         (DTOR_NAME): New.
20985         * decl.c (ctor_identifier): New.
20986         (dtor_identifier): New.
20987         (init_decl_processing): Set them.
20988
20989 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
20990
20991         * typeck.c (build_component_ref): Don't get confused by fields whose
20992         context has no type name, like pointer to member functions.
20993
20994 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
20995
20996         * decl.c (grokdeclarator): Handle typedef without declarator.
20997
20998         * pt.c (tsubst): Handle SCOPE_REF in declarator.
20999
21000         * parse.y (bad_parm): Catch another case of missing `typename'.
21001
21002         * lex.c (yyprint): Handle TYPE_DECLs.
21003
21004         * decl.c (start_function): Don't try to be clever.
21005
21006         * lex.c: Lose compiler_error_with_decl.
21007         * typeck2.c: Lose error_with_aggr_type.
21008         (incomplete_type_error): Use cp_* instead of old functions.
21009         (readonly_error): Likewise.
21010         * typeck.c (convert_arguments): Likewise.
21011         * search.c (lookup_nested_field): Likewise.
21012         * method.c (make_thunk): Likewise.
21013         * decl.c (grokparms): Likewise.
21014         * cp-tree.h: Update.
21015
21016         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
21017         and value.
21018
21019 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
21020
21021         * method.c (build_opfncall): When deleting a pointer to an
21022         array, build a new pointer to the tree past any ARRAY_TYPE
21023         nodes.
21024
21025 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21026
21027         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
21028
21029 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
21030
21031         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
21032         and ! DECL_INLINE.
21033
21034         * decl.c (finish_function): Don't set nested based on
21035         hack_decl_function_context.
21036         * parse.y (function_try_block): Check for nested function.
21037         (pending_inlines): Likewise.
21038
21039         * decl2.c (build_expr_from_tree): If a unary op already has a
21040         type, just return it.
21041
21042         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
21043
21044         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
21045         (finish_file): Check the return value of walk_vtables.
21046         (finish_prevtable_vardecl): Return int.
21047         (finish_vtable_vardecl): Likewise.
21048         (prune_vtable_vardecl): Likewise.
21049         * lex.c (set_vardecl_interface_info): Likewise.
21050         * cp-tree.h: Adjust return types.
21051
21052         * class.c (delete_duplicate_fields_1): Don't complain about
21053         duplicate nested types if they're the same type.
21054         (finish_struct): Remove check for duplicate.
21055         * decl2.c (grokfield): Don't check for typedef of anonymous type.
21056
21057 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
21058
21059         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
21060
21061         * decl.c (grokdeclarator): Lose special handling of class-level
21062         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
21063         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
21064
21065         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
21066
21067         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
21068
21069         * search.c (compute_access): Fix handling of anonymous union
21070         members.
21071         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
21072         from anonymous unions to their members.
21073
21074         * typeck.c (build_x_function_call): For static member functions,
21075         hand off to build_member_call.
21076
21077 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
21078
21079         * typeck.c (build_component_ref): Handle OFFSET_REFs.
21080
21081         * init.c (expand_vec_init): Fix init == 0 case.
21082
21083 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
21084
21085         * init.c (build_new): pedwarn about init and array new.
21086         (expand_vec_init): Handle lists, use convert_for_initialization.
21087
21088         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
21089         when converting to an aggregate type.
21090         * cvt.c (cp_convert): Pass it through.
21091
21092         * typeck.c (build_conditional_expr): Handle user-defined
21093         conversions to slightly different types.
21094
21095         * decl.c (grokdeclarator): Force an array type in a parm to be
21096         permanent.
21097
21098         * decl2.c (do_using_directive): Sorry.
21099         (do_namespace_alias): Likewise.
21100         * lex.c (real_yylex): Warn about using the `namespace' keyword.
21101
21102 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
21103
21104         * parse.y (datadef): Move call to note_list_got_semicolon up.
21105
21106 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
21107
21108         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
21109
21110 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
21111
21112         * decl.c (cp_finish_decl): The exception regions have to be
21113         nested, not overlapping.  We start the exception region for a
21114         decl, after it has been fully built, and all temporaries for it
21115         have been cleaned up.
21116
21117 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
21118
21119         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
21120
21121 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
21122
21123         * tree.def: Add RETURN_INIT.
21124         * pt.c (instantiate_decl): Handle RETURN_INIT.
21125         * decl.c (store_return_init): Handle minimal_parse_mode.
21126
21127         * tree.c (cp_build_type_variant): Just return an error_mark_node.
21128         * decl.c (make_typename_type): Don't try to get the file and line
21129         of an identifier.
21130         * typeck.c (comptypes): Handle TYPENAME_TYPE.
21131
21132 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
21133
21134         * decl.c (poplevel): Make sure we clear out and restore old local
21135         non-VAR_DECL values by default when they go out of scope.
21136
21137 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
21138
21139         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
21140         referring to addresses of variables and functions.
21141
21142         * error.c (dump_expr): Support SIZEOF_EXPR.
21143
21144         * init.c (do_friend): Use the return value of check_classfn.
21145
21146         * typeck.c (convert_arguments): Call complete_type.
21147
21148         * method.c (hack_identifier): After giving an error, set value to
21149         error_mark_node.
21150
21151 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
21152
21153         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
21154         lossage for local classes.
21155         * cp-tree.h: Declare it.
21156         * decl.c (lookup_name_real): Evil, painful hack for local classes.
21157         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
21158         Use hack_decl_function_context.
21159         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
21160         (start_function): Use hack_decl_function_context.
21161         (finish_function): Likewise.
21162         * method.c (synthesize_method): Likewise.
21163         * lex.c (process_next_inline): Likewise.
21164         (do_pending_inlines): Likewise.
21165         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
21166         done with it.
21167
21168 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
21169
21170         * sig.c (build_signature_pointer_or_reference_type): Align
21171         signature pointers/references on 8-byte boundaries so they can be
21172         grabbed 2 words at a time on a Sparc.
21173
21174 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
21175
21176         * method.c (hack_identifier): Requiring a static chain is now a
21177         hard error.
21178         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
21179         functions.
21180
21181 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21182
21183         * init.c (build_offset_ref): Call complete_type.
21184
21185         * decl.c (pop_from_top_level): Always pop previous_class_type.
21186
21187         * parse.y: Handle multiple decls in a for-init-statement.
21188         * pt.c (tsubst_expr): Likewise.
21189
21190         * pt.c (tsubst): Use tsubst_expr for the second operand of an
21191         ARRAY_REF.
21192
21193         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
21194         (poplevel_class): Set it here.
21195         (pop_from_top_level): Pop it here if we're returning to class scope.
21196         * class.c (pushclass): Don't set it here.
21197
21198         * decl.c (maybe_push_to_top_level): Save current_template_parms,
21199         and clear it if !pseudo.
21200         (pop_from_top_level): Restore it.
21201
21202         * decl2.c (finish_file): Push the dummy each time we walk the list
21203         of vtables.
21204
21205         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
21206         something for CAST_EXPR.
21207
21208 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
21209
21210         * cvt.c (cp_convert): Warn about implicit conversion of the
21211         address of a function to bool, as it is always true.
21212
21213 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
21214
21215         * typeck.c (c_expand_return): Fix warning for local externs returned.
21216
21217 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
21218
21219         * tree.c (mapcar): Propagate const and volatile properly.
21220
21221         * typeck.c (complete_type): Be sure to instantiate the
21222         MAIN_VARIANT of the type.
21223
21224         * method.c (synthesize_method): Class interface hackery does not
21225         apply to synthesized methods.
21226
21227 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
21228
21229         * pt.c (comp_template_args): Use comptypes rather than just
21230         checking for TEMPLATE_TYPE_PARM equivalence.
21231
21232         * typeck.c (build_x_function_call): Call complete_type before
21233         checking TYPE_OVERLOADS_CALL_EXPR.
21234
21235 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
21236
21237         * g++.c (main): Check also for new define ALT_LIBM.
21238
21239 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21240
21241         * pt.c (instantiate_class_template): If we don't have a pattern
21242         yet, that's OK.
21243         (coerce_template_parms): If we see a local class, bail.
21244
21245         * decl.c (grok_reference_init): Make sure there's a type before
21246         checking its code.
21247
21248         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
21249         (push_template_decl): Likewise.
21250
21251         * parse.y (named_class_head): Set
21252         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
21253
21254         * decl.c (xref_tag): Diagnose redeclaration of template
21255         type-parameter name.
21256
21257         * error.c (dump_type): Handle anonymous template type parms.
21258
21259         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
21260         TYPE_STUB_DECL.
21261         (coerce_template_parms): Likewise.
21262
21263 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
21264
21265         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
21266         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
21267
21268 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
21269
21270         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
21271         before trying to get its STUB_DECL.
21272         (coerce_template_parms): Likewise.
21273
21274         * parse.y (template_type_parm): If they didn't use 'class',
21275         pretend they did after giving an error.
21276
21277         * pt.c (coerce_template_parms): Diagnose use of local class.
21278
21279         * decl.c (grok_reference_init): Use instantiate_type.
21280
21281         * error.c (dump_expr): Handle TEMPLATE_DECLs.
21282
21283         * parse.y (named_class_head): Diagnose mismatching types and tags.
21284
21285         * decl.c (pushdecl): Type decls and class templates clash with
21286         artificial type decls, not hide them.
21287
21288         * decl.c (redeclaration_error_message): Diagnose redefinition of
21289         templates properly.
21290         (duplicate_decls): Diagnose disallowed overloads for template
21291         functions, too.
21292
21293         * decl.c (start_decl): Call complete_type before checking for a
21294         destructor.
21295
21296         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
21297
21298         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
21299
21300 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
21301
21302         * decl.c (grok_op_properties): Don't check for operator++(int) in
21303         a template.
21304
21305         * tree.c (perm_manip): Return a copy of variable and function
21306         decls with external linkage.
21307
21308         * tree.def: Change some of the min tree codes to type "1".
21309         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
21310         * method.c (build_overload_int): Emit something arbitrary for
21311         anything but an INTEGER_CST if we're in a template.
21312
21313         * decl.c (cp_finish_decl): Call complete_type before deciding
21314         whether or not to lay out the decl.
21315
21316         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
21317
21318 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
21319
21320         * typeck2.c (build_x_arrow): Call complete_type.
21321
21322         * pt.c (add_pending_template): Broken out.
21323         (lookup_template_class): If -fexternal-templates, call it for all
21324         the methods of implemented types.
21325         (instantiate_class_template): Instead of instantiating them here.
21326         (instantiate_decl): Handle -fexternal-templates earlier.
21327
21328 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21329
21330         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
21331         memoized lookup stuff inside GATHER_STATISTICS.
21332
21333 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
21334
21335         * decl.c (start_decl): Complain about array of incomplete type
21336         here.
21337         (grokdeclarator): Not here.
21338
21339         * parse.y (template_parm): Expand full_parm inline so we can set
21340         the rule's precedence.
21341
21342         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
21343         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
21344         * decl2.c (grokbitfield): Don't check for integer constant here.
21345         * class.c (finish_struct_1): Check here.
21346
21347         * decl.c (define_label): Make the min decl go on permanent_obstack.
21348
21349         * pt.c (unify): Don't handle CONST_DECLs.
21350         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
21351         (tsubst_copy): Likewise.
21352
21353         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
21354         CONST_DECL for a template parm.
21355
21356 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
21357
21358         * decl.c (grokdeclarator): Complain about array of incomplete type
21359         here.
21360         (start_decl_1): Not here.
21361
21362         * pt.c (tsubst): Handle pointer-to-function declarators.
21363
21364         * method.c (hack_identifier): If pedantic, diagnose local class
21365         methods that require a static chain.
21366
21367         * decl.c (grok_op_properties): No longer static.
21368         * cp-tree.h: Declare it.
21369         * pt.c (tsubst): Call it for operators.
21370         Use tsubst_copy for TREE_VECs.
21371
21372         * parse.y (template_arg): The expr has precedence like '>'.
21373
21374 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
21375
21376         * pt.c (coerce_template_parms): Don't coerce an expression using
21377         template parms.
21378         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
21379         (tsubst): Don't use build_index_2_type if the max_value uses template
21380         parms.
21381         * method.c (build_overload_int): Emit something arbitrary for an
21382         expression using template parms.
21383
21384         * parse.y (template_close_bracket): New non-terminal to catch use
21385         of '>>' instead of '> >' in template class names.
21386         (template_type): Use it.
21387         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
21388
21389         * tree.def: Add CAST_EXPR.
21390         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
21391         CONVERT_EXPR for minimal_parse_mode.
21392         * typeck.c (build_c_cast): Likewise.
21393         * pt.c (tsubst_copy): Likewise.
21394         * decl2.c (build_expr_from_tree): Likewise.
21395         * error.c (dump_expr): Likewise.
21396
21397 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21398
21399         * except.c (SetTerminate, SetUnexpected): Put back global vars.
21400         (init_exception_processing): Put back decl/init of
21401         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
21402         fns from libstdc++.
21403
21404         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
21405         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
21406         Delete unused fns.
21407         * cp-tree.h (declare_uninstantiated_type_level,
21408         uninstantiated_type_level_p): Delete prototypes.
21409
21410 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
21411
21412         * pt.c (tsubst_expr): Add default return.
21413
21414 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21415
21416         * error.c (fndecl_as_string): Delete unused arg CNAME.
21417         * sig.c (build_signature_table_constructor,
21418         build_signature_method_call): Fix calls.
21419
21420         * class.c (the_null_vtable_entry): Delete var definition.
21421         (init_class_processing): Delete tree the_null_vtable_entry init.
21422         * decl.c (no_print_{functions, builtins}): Declare as static.
21423         (__tp_desc_type_node): #if 0 var definition.
21424         (init_type_desc): #if 0 init of __tp_desc_type_node.
21425         (vb_off_identifier): Move var decl into init_decl_processing.
21426         (current_function_assigns_this): Declare as static.
21427         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
21428         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
21429         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
21430         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
21431         * init.c (BI_header_type, BI_header_size): Declare as static.
21432         * pt.c (template_classes): Delete unused var.
21433         (add_pending_template): Delete decl for non-existent fn.
21434         (lookup_template_class): Delete vars CODE and TAG_CODE.
21435         (instantiate_template): Delete unused var TARGS.
21436         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
21437         Delete decls.
21438         (__tp_desc_type_node): #if 0 var decl.
21439         (fndecl_as_string): Fix prototype.
21440
21441 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
21442
21443         * tree.def: Add GOTO_STMT.
21444         * pt.c (tsubst_expr): Support goto and labels.
21445         * decl.c (define_label): Support minimal parsing.
21446         * parse.y (simple_stmt): Likewise.
21447
21448 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21449
21450         * xref.c (GNU_xref_member): Only define/set var I if
21451         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
21452         used.
21453         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
21454         (GNU_xref_end): Fix call.
21455         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
21456         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
21457
21458         * tree.c (build_exception_variant): Delete unused vars I, A, T,
21459         T2, and CNAME.
21460         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
21461         (mapcar): Delete unused var CODE.
21462         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
21463         (break_out_cleanups): Fix call.
21464         (bot_manip): Likewise.
21465         * call.c (build_method_call): Likewise.
21466         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
21467         Likewise.
21468         * typeck.c (unary_complex_lvalue, build_modify_expr,
21469         convert_for_initialization): Likewise.
21470         * typeck2.c (build_functional_cast): Likewise.
21471         * cp-tree.h (build_cplus_new): Fix prototype.
21472
21473         * repo.c (open_repo_file): Delete unused var Q.
21474         (repo_compile_flags, repo_template_declared,
21475         repo_template_defined, repo_class_defined, repo_inline_used,
21476         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
21477         (repo_get_id, repo_vtable_used): Declare as static.
21478         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
21479         prototypes.
21480
21481 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
21482
21483         * parse.y (pending_inlines): Add function_try_block case.
21484
21485         * pt.c (unify): Fix for template const parms.
21486
21487 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21488
21489         * lex.c (extract_interface_info): Delete forward decl.
21490         (default_copy_constructor_body, default_assign_ref_body): Delete
21491         decls for non-existent functions.
21492         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
21493         (init_lex): Delete setting them.
21494         (cons_up_default_function): Delete unused vars FUNC_BUF,
21495         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
21496         #if 0'd synth code.
21497         (toplevel, expression_obstack): Delete unused extern decls.
21498         (tree_node_kind): Delete unused enum.
21499         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
21500         GATHER_STATISTICS.
21501         (tree_node_kind_names): Delete unused extern decl.
21502         (synth_obstack): Delete unused var.
21503         (init_lex): Don't set it.
21504         (init_parse): Add decl before use.
21505         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
21506         (current_unit_{name, language}): Delete unused vars.
21507         (check_newline): Don't bother setting them, just accept the #pragma.
21508         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
21509         (current_unit_{name, language}): Delete decls.
21510
21511         * search.c: Wrap all of the memoized functions, macros, and
21512         variables inside #ifdef GATHER_STATISTICS.
21513         (lookup_field, lookup_fnfields): Likewise.
21514         (init_search_processing): Likewise.
21515         (reinit_search_statistics): Wrap whole function.
21516         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
21517
21518         * decl.c (finish_function): Only call pop_memoized_context if
21519         GATHER_STATISTICS is defined.
21520         (start_function): Likewise for push_memoized_context.
21521         * class.c (pushclass, popclass): Likewise.
21522
21523         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
21524         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
21525
21526         * cvt.c (cp_convert): Delete unused local var FORM.
21527         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
21528         prototypes.
21529
21530 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
21531
21532         * pt.c (do_poplevel): Oops; really return what we get from
21533         poplevel this time.
21534
21535 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21536
21537         * cp-tree.h (is_aggr_type): Add prototype.
21538
21539         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
21540         * method.c ({push,pop}_cp_function_context): Delete decls.
21541         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
21542         (SetUnexpected, SetTerminate): Delete unused vars.
21543         (init_exception_processing): Don't set SetUnexpected or
21544         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
21545         (output_exception_table_entry): Delete unused array LABEL.
21546         (expand_internal_throw): Delete unused var PARAMS.
21547         (expand_start_catch_block): Delete unused var CLEANUP.
21548         (emit_exception_table): Delete unused var EH_NODE_DECL.
21549         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
21550         GOTO_UNWIND_AND_THROW.  Don't set them.
21551         (end_eh_unwinder): Add top decl.
21552         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
21553         (exception_section, push_rtl_perm, do_function_call,
21554         lang_interim_eh, push_eh_cleanup, eh_outer_context,
21555         expand_end_eh_spec, end_eh_unwinder): Declare as static.
21556         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
21557         throw_used): Likewise.
21558         * cp-tree.h (expand_end_eh_spec): Delete prototype.
21559
21560         * search.c (dfs_mark, dfs_mark_vtable_path,
21561         dfs_unmark_vtable_path, dfs_mark_new_vtable,
21562         dfs_unmark_new_vtable, dfs_clear_search_slot,
21563         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
21564         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
21565         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
21566         functions.
21567         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
21568         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
21569         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
21570         Only define #ifdef GATHER_STATISTICS.
21571         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
21572         is defined.
21573         (vbase_decl): Delete var definition.
21574         (init_search): Delete old decl.
21575         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
21576         never actually used.
21577         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
21578         (get_base_distance_recursive): Delete unused fourth arg
21579         BASETYPE_PATH.  Fix call .
21580         (get_base_distance): Fix call.
21581         (push_class_decls): Delete unused var ID.
21582         (make_memoized_table_entry): Declare as static.
21583         (breadth_first_search): Declare as static.
21584         (tree_has_any_destructor_p): Declare as static.
21585         (pop_class_decls): Delete unused arg pop_class_decls.
21586         * class.c (popclass): Fix call to pop_class_decls.
21587         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
21588         tree_has_any_destructor_p): Delete prototypes.
21589
21590         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
21591         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
21592         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
21593         (build_user_desc): Delete unused var T.
21594         (build_class_desc): Delete unused vars T and OFF.
21595         (build_t_desc): Delete unused var NAME_STRING.
21596         (build_headof): Make static.
21597         (get_bad_cast_node): Likewise.
21598         (get_def_to_follow): Likewise.
21599         * cp-tree.h (init_type_desc): Add prototype.
21600         (build_headof): Remove prototype.
21601
21602 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
21603
21604         * pt.c (tsubst): Only look for matching decls at file scope for
21605         non-member functions.
21606
21607         * call.c (build_scoped_method_call): Handle scoped destructor
21608         calls in templates.
21609
21610         * decl.c (*_top_level): Also save previous_class_values.
21611
21612         * pt.c (tsubst_expr): Support do {} while loops.
21613         * parse.y (simple_stmt): Likewise.
21614         * tree.def: Likewise.
21615
21616         * method.c (build_overload_identifier): For a class nested in a
21617         template class, don't mangle in the template parms from our
21618         context.
21619
21620         * lex.c, cp-tree.h: Remove support for template instantiations in
21621         the pending_inlines code.
21622         * pt.c: Remove dead functions and unused arguments.
21623         (uses_template_parms): TYPENAME_TYPEs always use template parms.
21624         * parse.y: Stop passing anything to end_template_decl.
21625         * tree.c (print_lang_statistics): Only print tinst info #ifdef
21626         GATHER_STATISTICS.
21627
21628 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21629
21630         * init.c (expand_recursive_init{,_1}): Delete decls.
21631         (sort_member_init): Delete unused var INIT.
21632         (emit_base_init): Delete unused var X.
21633         (build_offset_ref): Delete unused var CNAME.
21634         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
21635         (emit_base_init): Delete unused local var BASE.  Delete extern
21636         decl of IN_CHARGE_IDENTIFIER.
21637         (build_delete): Delete unused local var VIRTUAL_SIZE.
21638
21639         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
21640         (build_delete): Fix call.
21641         * decl2.c (delete_sanity): Likewise.
21642         * cp-tree.h (build_vec_delete): Update prototype.
21643
21644         * typeck.c (common_base_type): Delete unused var TMP.
21645         (build_binary_op): Delete local var ARGS_SAVE.
21646         (build_array_ref): Delete unused var ITYPE.
21647         (c_expand_return): Delete unused var USE_TEMP.
21648
21649         * typeck.c (compexcepttypes): Delete unused arg STRICT.
21650         (comptypes): Fix calls.
21651         * decl.c (duplicate_decls): Likewise.
21652         * cp-tree.h (compexcepttypes): Delete extra arg.
21653
21654         * decl2.c (check_classfn): Delete unused second arg CNAME.
21655         * decl.c (start_decl, grokfndecl): Fix calls.
21656         * init.c (do_friend): Likewise.
21657         * cp-tree.h (check_classfn): Update prototype.
21658
21659         * cp-tree.h (signature_error, import_export_vtable,
21660         append_signature_fields, id_in_current_class, mark_used,
21661         copy_assignment_arg_p): Add decls.
21662         * decl2.c (mark_used): Delete decl.
21663
21664         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
21665
21666         * class.c (get_vtable_entry): Disable unused function.
21667         (doing_hard_virtuals): Delete unused static global var.
21668         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
21669         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
21670         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
21671         (modify_one_vtable): Delete unused var OLD_RTTI.
21672         (finish_struct_anon): Delete unused vars OFFSET and X.
21673         (finish_struct_bits): Delete unused var METHOD_VEC.
21674         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
21675         for-scope local variable METHODS.
21676
21677         * call.c (user_harshness): Delete unused/unneeded arg PARM.
21678         (ideal_candidate): Delete unused args BASETYPE and PARMS.
21679         (build_method_call): Delete unused args passed into ideal_candidate.
21680         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
21681         * cp-tree.h (synthesize_method): Add decl.
21682
21683         * decl.c (note_level_for_for): Give void return type.
21684         (pushdecl_nonclass_level): Likewise.
21685         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
21686         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
21687         (suspend_binding_level): Delete unused var LEVEL.
21688         (duplicate_decls): Delete unused var CTYPE.
21689         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
21690         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
21691         PTR_ENDLINK.
21692         (grokdeclarator): Delete unused var C.
21693         (grokdeclarator): Delete unused var SIZE_VARIES.
21694         (grokparms): Delete unused var SAW_VOID.
21695         (start_function): Delete unused var OLDDECL.
21696         (cplus_expand_expr_stmt): Delete unused var
21697         REMOVE_IMPLICIT_IMMEDIATELY.
21698
21699         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
21700
21701         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
21702
21703 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
21704
21705         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
21706         (build_min_nt): Likewise.
21707         * pt.c (do_pushlevel): Emit line note.
21708         (do_poplevel): Return what we get from poplevel.
21709         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
21710         * parse.y: Use do_pushlevel and do_poplevel.
21711         * cp-tree.h: Declare do_poplevel.
21712
21713         * cp-tree.h: Declare at_eof.
21714         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
21715         * decl2.c (import_export_decl): Renamed from import_export_inline.
21716         (finish_file): Call it to do interface handling for statics.
21717         * pt.c (tsubst_copy): Call mark_used on variables and functions
21718         used here.
21719
21720         * decl2.c (finish_file): Don't emit statics we can't generate.
21721         * pt.c (instantiate_decl): Don't set interface on instantiations
21722         we can't generate.
21723
21724         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
21725         * tree.c (print_lang_statistics): Print max template depth.
21726         * pt.c (push_tinst_level): Dump entire instantiation context.
21727         (instantiate_class_template): Use it and pop_tinst_level.
21728         (instantiate_decl): Likewise.
21729
21730         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
21731         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
21732
21733 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
21734
21735         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
21736         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
21737         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
21738         the new template implementation.
21739
21740 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21741
21742         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
21743
21744 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
21745
21746         * decl.c (cp_finish_decl): Delay emitting the debug information for
21747         a typedef that has been installed as the canonical typedef, if the
21748         type has not yet been defined.
21749
21750 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
21751
21752         * decl2.c (grokfield): Still call pop_nested_class for access decls.
21753
21754 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21755
21756         * decl.c (lookup_label): Call label_rtx.
21757
21758         * decl.c (make_binding_level): New function.
21759         (pushlevel, pushlevel_class): Call it instead of explicit
21760         duplicate calls to xmalloc.
21761
21762         * decl.c (init_decl_processing): Delete useless build_pointer_type
21763         call.
21764
21765         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
21766         (sizet_ftype_string): Delete variable.
21767         (init_decl_processing): Add built-in functions fabsf, fabsl,
21768         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
21769         variable strlen_ftype, used for strlen.
21770
21771 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
21772
21773         * decl.c (push_to_top_level): Start from current_binding_level
21774         again for now; the stl hacks depend on g++ being broken in this
21775         way, and it'll be fixed in the template rewrite.
21776
21777         * tree.def: Add USING_DECL.
21778         * decl2.c (do_class_using_decl): Implement.
21779         (grokfield): Pass access decls off to do_class_using_decl instead of
21780         grokdeclarator.
21781         * error.c (dump_decl): Handle USING_DECLs.
21782         * decl.c (grokdeclarator): Remove code for handling access decls.
21783         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
21784         as access decls for now.
21785         (finish_struct): Don't check USING_DECLs for other uses of the name.
21786
21787         * search.c (get_matching_virtual): Use cp_error_at.
21788
21789 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21790
21791         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
21792         match c-typeck.c.
21793         (self_promoting_args_p): Move the check that TYPE is non-nil
21794         before trying to look at its main variant.
21795         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
21796
21797         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
21798         Delete macros.
21799         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
21800         (do_friend): Delete call to xref_friend.
21801         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
21802
21803         * typeck.c (convert_sequence): #if 0 unused function.
21804
21805         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
21806         be in decl_in_memory_p.
21807         (decl_in_memory_p): Delete decl.
21808         * expr.c (decl_in_memory_p): Delete fn.
21809         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
21810
21811         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
21812
21813 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
21814
21815         * class.c (finish_struct_1): Check for a pure-specifier on a
21816         non-virtual function here.
21817
21818         * decl2.c (grok_function_init): Don't check whether the function
21819         is virtual here.
21820         (grokfield): Don't call check_for_override here.
21821
21822         * decl.c (push_to_top_level): Start from inner_binding_level,
21823         check class_shadowed in class levels.
21824
21825 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
21826
21827         * decl.c (resume_level): Ignore things that don't have names, instead
21828         of core dumping.
21829
21830 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21831
21832         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
21833
21834 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
21835
21836         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
21837         synthesized dtor.
21838
21839         * parse.y (complete_type_name): Bind global_scope earlier.
21840         (complex_type_name): Likewise.
21841         (qualified_type_name): Remove.
21842
21843 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
21844
21845         * decl.c (grokfndecl): Move code that looks for virtuals in base
21846         classes...
21847         * class.c (check_for_override): ... to a new function.
21848         (finish_struct_1): Call it.
21849
21850         * cp-tree.h: Declare warn_sign_compare.
21851
21852         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
21853         rather than extra_warnings to decide whether to warn about
21854         comparison of signed and unsigned.
21855
21856         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
21857         implies -Wsign-compare.  -Wall doesn't imply -W.
21858
21859 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
21860
21861         * typeck.c (build_component_ref): Fix to handle anon unions in base
21862         classes as well.
21863
21864 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21865
21866         * class.c (resolves_to_fixed_type_p): Delete code dealing with
21867         a WITH_CLEANUP_EXPR, since we don't generate them any more.
21868         * cvt.c (build_up_reference): Likewise.
21869         * decl.c (grok_reference_init): Likewise.
21870         (cp_finish_decl): Likewise.
21871         * error.c (dump_expr): Likewise.
21872         * tree.c (real_lvalue_p): Likewise.
21873         (lvalue_p): Likewise.
21874         (build_cplus_new): Likewise.
21875         (unsave_expr_now): Likewise.
21876         * typeck.c (unary_complex_lvalue, build_modify_expr,
21877         c_expand_return): Likewise.
21878
21879 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21880
21881         Make the C++ front-end pay attention to attributes for structures.
21882         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
21883         finish_struct_1.
21884         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
21885         Take out old round_up_size use and setting the DECL_ALIGN possibly
21886         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
21887         can override what the attribute set.
21888         * cp-tree.h (finish_struct): Update prototype.
21889         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
21890         attributes to finish_struct.
21891         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
21892         value down into finish_struct.
21893         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
21894
21895 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
21896
21897         * decl.c (poplevel):  Re-word dead for local handling.
21898         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
21899         (cp_finish_decl):  If is_for_scope, check for duplicates so
21900         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
21901
21902         * lex.c (do_identifier):  Use global binding in preference of
21903         dead for local variable.
21904
21905 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
21906
21907         * init.c (initializing_context): Handle anon union changes, the
21908         context where fields of anon unions can be initialized now has to be
21909         found by walking up the TYPE_CONTEXT chain.
21910
21911 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
21912
21913         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
21914         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
21915         (obscure_complex_init): If bss is supported, always set
21916         DECL_INITIAL to error_mark_node.
21917
21918 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21919
21920         * init.c (is_friend): Make sure there's a context before we see if
21921         it's an aggr type.
21922
21923 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
21924
21925         * init.c (is_friend): Classes are not friendly with nested classes.
21926
21927 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
21928
21929         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
21930         and record its result.
21931
21932 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
21933
21934         * class.c (finish_struct_anon): Switch around code to not move anon
21935         union elements around, nor mess up their contexts, nor offsets,
21936         instead we now build up the right number of COMPONENT_REFs for all
21937         the anon unions that may be present at build_component_ref time.
21938         * typeck.c (lookup_anon_field): New routine to handle field lookup
21939         on fields without names.  We find them, based upon their unique type
21940         instead.
21941         * typeck.c (build_component_ref): Allow FIELD_DECL components.
21942         Handle finding components in anonymous unions, and ensure that a
21943         COMPONENT_REF is built for each level as necessary.
21944
21945 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
21946
21947         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
21948         code that ensures that copy ctors are used if appropriate.
21949
21950 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21951
21952         * init.c (build_vec_delete): Only give an error if base isn't an
21953         error_mark_node.
21954
21955 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
21956
21957         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
21958         (yylex): If we see `new', keep slurping.
21959
21960 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
21961
21962         * class.c (finish_struct_1): Move code for handling anon unions...
21963         (finish_struct_anon): to here.  Fixup so that we do the offset
21964         calculations right, and so that the fields are physically moved to
21965         the containers's chain.
21966
21967 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21968
21969         * decl.c (grokdeclarator): Avoid trying to get an operand off an
21970         identifier node.
21971
21972 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
21973
21974         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
21975         POINTER_SIZE to agree with expr.c.
21976
21977 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
21978
21979         * search.c (lookup_field): Don't report ambiguities if protect is 0,
21980         instead return NULL_TREE.
21981
21982 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
21983
21984         * class.c (finish_struct_1): Call warn_hidden if we want warnings
21985         about overloaded virtual functions.
21986         (warn_hidden): New routine to warn of virtual functions that are
21987         hidden by other virtual functions, that are not overridden.
21988         (get_basefndecls): New routine, used by warn_hidden.
21989         (mark_overriders): New routine, used by warn_hidden.
21990         * search.c (get_matching_virtual): Remove old warning that just
21991         isn't very useful.
21992
21993 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21994
21995         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
21996
21997         * typeck.c (null_ptr_cst_p): Delete unused fn.
21998         (build_function_call_maybe): Delete unused fn.
21999
22000         * expr.c (extract_init): #if 0 the code after unconditional return 0
22001         for now.
22002
22003         Delete old cadillac code.
22004         * edsel.c: Remove file.
22005         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
22006         * Makefile.in (CXX_OBJS): Delete edsel.o.
22007         (edsel.o): Delete rule.
22008         * cp-tree.h (flag_cadillac): Delete var decl.
22009         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
22010         * decl2.c (flag_cadillac): Delete var definition.
22011         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
22012         (grokfield): Delete code depending on flag_cadillac.
22013         (finish_anon_union): Likewise.
22014         * class.c (finish_struct_1): Likewise.
22015         (pushclass): Likewise.
22016         (popclass): Likewise.
22017         (push_lang_context): Likewise.
22018         (pop_lang_context): Likewise.
22019         * decl.c (init_decl_processing): Likewise.
22020         (start_decl): Likewise.
22021         (cp_finish_decl): Likewise.
22022         (xref_tag): Likewise.
22023         (finish_enum): Likewise.
22024         (start_function): Likewise.
22025         (finish_function): Likewise.
22026         (finish_stmt): Likewise.
22027         * lex.c (lang_init): Likewise.
22028         (check_newline): Likewise.
22029
22030         * lex.c (do_pending_inlines): Delete synthesized method kludge.
22031
22032         Delete defunct, ancient garbage collection implementation.
22033         * rtti.c: New file with the RTTI stuff from gc.c.
22034         * gc.c: Removed file (moved the remaining stuff into rtti.c).
22035         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
22036         (rtti.o): New rule, replacing gc.o.
22037         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
22038         * cp-tree.h: Delete gc-related fn decls.
22039         (DECL_GC_OFFSET): Delete macro.
22040         (flag_gc): Delete extern decl.
22041         * decl.c (current_function_obstack_index): Delete var decl.
22042         (current_function_obstack_usage): Delete var decl.
22043         (start_function): Delete clearing of current_function_obstack_index
22044         and current_function_obstack_usage.
22045         (init_decl_processing): Delete code relying on -fgc.
22046         Delete call to init_gc_processing.
22047         (cp_finish_decl): Delete calls to build_static_gc_entry and
22048         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
22049         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
22050         and to expand_expr of a __gc_main call.
22051         (maybe_gc_cleanup): Delete var decl.
22052         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
22053         * decl2.c (flag_gc): Delete var decl.
22054         (lang_f_options): Delete offering of -fgc.
22055         (lang_decode_option): Delete -fgc and -fno-gc handling.
22056         (get_temp_regvar): Delete gc code.
22057         * init.c (build_new): Delete gc code.
22058         * lex.c (init_lex): Delete checking of flag_gc.
22059
22060         * typeck.c (convert_arguments): Delete gc code.
22061         (build_component_addr): Delete -fgc warning.
22062         (build_modify_expr): Delete gc code.
22063
22064         * decl2.c (build_push_scope): Delete fn.
22065         * cp-tree.h (build_push_scope): Delete decl.
22066
22067         * search.c (clear_search_slots): Delete fn.
22068         * cp-tree.h (clear_search_slots): Delete decl.
22069
22070         * search.c (tree_needs_constructor_p): Delete fn.
22071         * cp-tree.h (tree_needs_constructor_p): Delete decl.
22072
22073         * tree.c (id_cmp): Delete fn.
22074
22075         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
22076         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
22077
22078         * tree.c (decl_value_member): Delete fn.
22079         * cp-tree.h (decl_value_member): Delete decl.
22080
22081         * tree.c (list_hash_lookup_or_cons): Delete fn.
22082         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
22083
22084         * method.c (cplus_exception_name): Delete fn.
22085         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
22086
22087         * spew.c (shift_tokens): Delete fn.
22088
22089 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
22090
22091         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
22092         to cp_finish_decl.
22093         * parse.y: Likewise.
22094
22095 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22096
22097         * tree.c (build_cplus_staticfn_type): Delete function definition;
22098         never used.
22099         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
22100
22101         * tree.c (virtual_member): Delete function definition; never used.
22102         * cp-tree.h (virtual_member): Delete decl.
22103
22104 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
22105
22106         * typeck.c (build_component_ref): Handle getting vbase pointers
22107         out of complex multiple inheritance better.
22108
22109 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
22110
22111         * typeck.c (build_object_ref): Make sure we use the real type, not
22112         any reference type.
22113
22114 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
22115
22116         * tree.c (build_exception_variant): Don't create new types if we
22117         don't have to, also build new types on the right obstack.
22118
22119 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
22120
22121         * decl.c (store_bindings): Split out from push_to_top_level.
22122         (push_to_top_level): Call it for b->type_shadowed on class binding
22123         levels.
22124
22125 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
22126
22127         * search.c (expand_upcast_fixups): Fix so that offsets stored in
22128         vbase_offsets are always right.  Fixes a problem where virtual base
22129         upcasting and downcasting could be wrong during conversions on this
22130         during virtual function dispatch at ctor/dtor time when dynamic
22131         vtable fixups for deltas are needed.  This only sounds easier than
22132         it is.  :-)
22133         (fixup_virtual_upcast_offsets): Change to reflect new calling
22134         convention for expand_upcast_fixups.
22135
22136 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22137
22138         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
22139         check that it's usable as the bitfield width.
22140
22141 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22142
22143         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
22144         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
22145         only ever used for functions in it.
22146
22147 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
22148
22149         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
22150         (nested_type): Likewise.
22151         (nested_name_specifier): Use lastiddecl.
22152
22153         * decl.c (grokdeclarator): Adjust accordingly.
22154         * init.c (expand_member_init): Likewise.
22155         * parse.y (base_class): Likewise.
22156         * typeck2.c (build_functional_cast): Likewise.
22157
22158         * typeck2.c (build_functional_cast): Fill in name after we've
22159         checked for non-aggr type.
22160
22161 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
22162
22163         * decl2.c (warn_pointer_arith): Default to on.
22164
22165 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
22166
22167         * lex.c (is_rid): New function.
22168         * decl.c (grokdeclarator): Diagnose reserved words used as
22169         declarator-ids.
22170
22171 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
22172
22173         * tree.c (get_decl_list): Don't lose cv-quals.
22174
22175         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
22176         typespecs used as declarator-ids.
22177
22178 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
22179
22180         * decl.c (poplevel): When poping a level, don't give a warning for
22181         any subblocks that already exist.
22182
22183 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
22184
22185         * typeck.c (build_object_ref): Finish what I started.
22186
22187         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
22188
22189         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
22190
22191         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
22192         scope.
22193
22194 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
22195
22196         * decl.c (xref_tag): Handle passing a type in directly.
22197
22198         * parse.y (qualified_type_name): Pull out the type.
22199         (nested_type): Likewise.
22200         Take types directly instead of as identifiers.
22201         * call.c (build_scoped_method_call): Take types directly instead of
22202         as identifiers.
22203         * decl.c (xref_basetypes): Likewise.
22204         * init.c (expand_member_init): Likewise.
22205         (build_member_call): Likewise.
22206         (build_offset_ref): Likewise.
22207         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
22208         * method.c (do_build_assign_ref): Likewise.
22209         * decl.c (grokdeclarator): Handle a type appearing as the
22210         declarator-id for constructors.
22211         * method.c (do_build_copy_constructor): current_base_init_list now
22212         uses the types directly, not their names.
22213         * init.c (sort_base_init): Likewise.
22214         (expand_member_init): Likewise.
22215         * init.c (is_aggr_type): New function, like is_aggr_typedef.
22216
22217 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
22218
22219         * tree.c (layout_basetypes): Call build_lang_field_decl instead
22220         of build_lang_decl if first arg is a FIELD_DECL.
22221
22222 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22223
22224         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
22225         non-empty.
22226         * except.c (expand_start_catch_block): Set TREE_USED to avoid
22227         warnings about the catch handler.
22228
22229 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
22230
22231         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
22232         expand_target_expr.
22233
22234 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22235
22236         Fix access control to use trees rather than integers.
22237         * class.c (access_{default, public, protected, private,
22238         default_virtual, public_virtual, private_virtual}_node): Add
22239         definitions.
22240         (init_class_processing): Do creation of those nodes.
22241         * cp-tree.h (access_type): Delete enum decl.
22242         (access_{default, public, protected, private, default_virtual,
22243         public_virtual, private_virtual}_node): Add decls.
22244         (compute_access): Change return type.
22245         * search.c (compute_access): Have tree return type, instead of enum.
22246         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
22247         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
22248         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
22249         * parse.y (VISSPEC): Make ttype rather than itype.
22250         (base_class_access_list): Likewise.
22251         * *.[cy]: Change all refs of `access_public' to `access_public_node',
22252         etc.
22253         * call.c (build_method_call): Make ACCESS be a tree.
22254         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
22255         * cvt.c (convert_to_aggr): Likewise.
22256         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
22257         Likewise.
22258         * method.c (hack_identifier): Likewise.
22259         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
22260
22261 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
22262
22263         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
22264         frontend, and make it more consistent with respect to
22265         warn_pointer_arith.
22266
22267 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
22268
22269         * decl.c (pushdecl): Check for duplicate parameter names.
22270
22271 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
22272
22273         * decl.c (expand_static_init): Call assemble_external for atexit.
22274
22275 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
22276
22277         * except.c (do_unwind): Remove some generated dead code.
22278         (eh_outer_context): New routine, factor out some common code from
22279         expand_builtin_throw and end_eh_unwinder.  Add code to do return
22280         address masking for the PA.
22281         (expand_builtin_throw): Use eh_outer_context instead of open coding
22282         it here.
22283         (end_eh_unwinder): Likewise.
22284
22285 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
22286
22287         * except.c (expand_throw): Call assemble_external for __empty, if we
22288         use it.
22289
22290 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
22291
22292         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
22293         NORMAL_RETURN_ADDR_OFFSET.
22294         (end_eh_unwinder): Likewise.
22295
22296 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
22297
22298         * gc.c (build_dynamic_cast): Make sure we don't cast away const
22299         when dealing with references, and make sure we handle dynamic
22300         casting to a cv qualified reference.
22301
22302 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
22303
22304         * except.c (struct eh_context): New structure top hold eh context
22305         information.
22306         (push_eh_context): New routine.
22307         (pop_eh_context): Likewise.
22308         * decl.c (push_cp_function_context): Use them.
22309         (pop_cp_function_context): Likewise.
22310
22311 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
22312
22313         * decl2.c (finish_file): Also prune uninteresting functions in the
22314         inline emission loop.
22315
22316 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
22317
22318         * sig.c (build_signature_table_constructor): Mark functions
22319         in the signature as referenced.
22320
22321 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
22322
22323         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
22324         the inline emission stuff.
22325
22326 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
22327
22328         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
22329         weak symbols.
22330         * lang-options.h: Add -f{no-,}weak.
22331         * decl.c (init_decl_processing): If the target does not support weak
22332         symbols, don't use them.
22333         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
22334
22335 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
22336
22337         * init.c (expand_member_init): warning for base init after members.
22338
22339 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
22340
22341         * cvt.c (build_expr_type_conversion): Don't convert to a reference
22342         type.
22343
22344 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
22345
22346         * method.c (report_type_mismatch): Improve wording for volatile
22347         mismatches.
22348
22349 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
22350
22351         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
22352         expand_assignment, as the later doesn't handle things that have
22353         copy constructors well.  The compiler would do bitwise copying,
22354         instead of ctor calling in some cases.
22355
22356 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
22357
22358         * g++.c (my_strerror): Return "cannot access" if errno is 0.
22359         (pfatal_with_name, perror_exec): Don't assume that
22360         the returned value from my_strerror contains no '%'s.
22361         (concat): Remove.
22362         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
22363
22364 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
22365
22366         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
22367         TYPE_METHODS/TREE_CHAIN mean what they used to.
22368         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
22369         instead of TYPE_METHODS.
22370         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
22371         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
22372         * cp-tree.h (CLASSTYPE_METHODS): Lose.
22373         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
22374         TYPE_METHODS.
22375         (struct lang_decl): Lose next_method field.
22376         (DECL_NEXT_METHOD): Lose.
22377         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
22378         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
22379         anymore.
22380         (finish_struct_methods): Don't mess with the TREE_CHAINs in
22381         fn_fields.
22382
22383         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
22384         vector.
22385
22386         * call.c (build_method_call): Synthesize here even when not inlining.
22387         * typeck.c (build_function_call_real): Likewise.
22388
22389 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
22390
22391         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
22392         == DBX_DEBUG, call dbxout_start_new_source_file and
22393         dbxout_resume_previous_source_file when appropriate.
22394
22395 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
22396
22397         * except.c (start_anon_func): Push to the top level.
22398         (end_anon_func): Pop from the top level.
22399
22400 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
22401
22402         * cp-tree.h (build_cleanup): New routine to build cleanups.
22403         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
22404         call at ctor time and use atexit to run it later.
22405         * decl2.c (build_cleanup): New routine, taken from finish_file.
22406         (finish_file): Use build_cleanup instead, and don't put function
22407         local statics in global dtor list.
22408
22409 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
22410
22411         * except.c (expand_throw): Ensure that we have cleanups, if we try
22412         and expand cleanups.
22413
22414 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
22415
22416         * except.c (expand_throw): Add logic to manage dynamic cleanups for
22417         the EH object.
22418         (expand_end_catch_block): Use the magic of expand_goto, instead of
22419         emit_jump so that we get the cleanup for any catch clause parameter
22420         and the cleanup for the exception object.  Update to reflect label
22421         changes.
22422         (push_eh_cleanup): New routine to register a cleanup for an
22423         exception object.
22424         (empty_fndecl): Used to default cleanup actions to
22425         nothing.
22426         (init_exception_processing): Setup empty_fndecl.  Setup
22427         saved_cleanup.
22428         (expand_start_catch_block): Update to reflect label changes.  Call
22429         push_eh_object to register the cleanup for the EH object.
22430         (start_anon_func): New routine to start building lambda expressions
22431         from trees.
22432         (end_anon_func): New routine to end them.
22433         (struct labelNode): Change so that we can use tree labels, or rtx
22434         labels.
22435         (saved_cleanup): Object to check for dynamic cleanups for the
22436         exception handling object.
22437         (push_label_entry): Change so that we can use tree labels, or rtx
22438         labels.
22439         (pop_label_entry): Likewise.
22440         (top_label_entry): Likewise.
22441         (expand_start_all_catch): Use tree label instead of rtx label, so
22442         that we can get the magic of expand_goto.
22443         (expand_end_all_catch): Update to reflect label changes.
22444
22445         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
22446         use UNSAVE_EXPRs.
22447         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
22448         building_cleanup logic, as we now use UNSAVE_EXPRs.
22449         * cp-tree.h (unsave_expr): Declare it.
22450         * decl.c (building_cleanup): Remove.
22451         (maybe_build_cleanup): Remove building_cleanup logic, and use
22452         UNSAVE_EXPR instead.
22453
22454 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
22455
22456         * gc.c (build_t_desc): Update error message to say <typeinfo>.
22457
22458 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22459
22460         * decl.c (pushdecl): Only warn about shadowing a local variable if
22461         warn_shadow is true.
22462
22463 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
22464
22465         * typeck.c (build_binary_op_nodefault): Added warning about
22466         comparisons between different enum types with -Wall, unless
22467         -fenum-int-equiv set.
22468
22469 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
22470
22471         * class.c (finish_struct_1): Skip down to the inner type in
22472         multidimensional arrays.  Ensures ctors will be made for types that
22473         need constructing.
22474
22475 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
22476
22477         * decl.c (last_dtor_insn): New to track the last compiler generated
22478         insn in a dtor.
22479         (store_parm_decls): Set it.
22480         (finish_function): Use it to see if the dtor is empty.  Avoid doing
22481         vtable setup all the time, if we can.
22482         (struct cp_function): Add last_dtor_insn.
22483         (push_cp_function_context): Save it.
22484         (pop_cp_function_context): Restore it.
22485
22486 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
22487
22488         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
22489         warnings.
22490
22491 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
22492
22493         * typeck.c (expand_target_expr): Make sure targets get put into the
22494         current temp_slot_level, so that the free_temp_slots call will reuse
22495         them.
22496
22497 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
22498
22499         * class.c (finish_struct_1): Delay delta fixups for virtual bases
22500         until after we have done the hard virtuals, to avoid a bogus `every
22501         virtual function must have a unique final overrider' for virtual
22502         functions that are only overridden by hard virtuals.
22503
22504 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
22505
22506         * pt.c (do_function_instantiation): Don't try to find a file-scope
22507         template for a member function.
22508
22509 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
22510
22511         * g++.c (main): Add handling of -nodefaultlibs.
22512
22513 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
22514
22515         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
22516         distinguish between direct bindings of reference variables, and
22517         indirect bindings of reference variables.
22518         * cvt.c (build_up_reference): Use it.
22519         * typeck.c (convert_arguments): Use it to indicate this is an
22520         indirect binding.
22521         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
22522         as they are unused.
22523         (expand_static_init): Likewise.
22524         (cplus_expand_expr_stmt): Likewise.
22525         * decl2.c (finish_file): Likewise.
22526         * init.c (perform_member_init): Likewise.
22527         (emit_base_init): Likewise.
22528         (expand_aggr_vbase_init_1): Likewise.
22529
22530 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22531
22532         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
22533         get a DECL_LANG_SPECIFIC node.
22534         * cp-tree.h (lang_decl_flags): Add new member `level'.
22535         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
22536         decl_flags level member.
22537
22538 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22539
22540         * call.c (build_method_call): Make sure instance has a
22541         TYPE_LANG_SPECIFIC node before we dive into it.
22542
22543 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
22544
22545         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
22546
22547 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
22548
22549         * decl.c (duplicate_decls): When smashing decls, smash staticness in
22550         the usual way.
22551
22552 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
22553
22554         * decl.c (poplevel): Handle the merging of subblocks of cleanups
22555         when finishing blocks that have already been created (usually due to
22556         the fixup goto code).  Fixes bad debugging information.
22557
22558 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
22559
22560         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
22561         that's not a list of overloaded functions.
22562
22563 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22564
22565         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
22566         before trying to use DECL_ABSTRACT_VIRTUAL_P.
22567
22568 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
22569
22570         * decl2.c (mark_used): New function for hooking into setting of
22571         TREE_USED on decls.
22572         * call.c (build_method_call): Use it.
22573         * class.c (instantiate_type): Likewise.
22574         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
22575         for all like-named functions.
22576         * method.c (hack_identifier): Likewise.
22577         (emit_thunk): Don't call assemble_external.
22578         (make_thunk): Create thunk as a FUNCTION_DECL so that it
22579         gets the right mode and ENCODE_SECTION_INFO works.
22580
22581         * parse.y: Use mark_used.  Pass operator names to do_identifier.
22582         * lex.c (do_identifier): Handle operator names.
22583
22584         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
22585
22586 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22587
22588         * errfn.c: Include stdio.h.
22589         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
22590
22591 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
22592
22593         * typeck2.c (digest_init): Always convert initializers to the
22594         right type.
22595
22596 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
22597
22598         * init.c (member_init_ok_or_else): Don't allow member initializers
22599         for indirect members, as it is invalid.
22600
22601 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22602
22603         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
22604
22605 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
22606
22607         * parse.y (for.init.statement): Catch compound statements inside for
22608         initializations, if we're being pedantic.
22609
22610 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
22611
22612         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
22613         looking for.
22614
22615 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
22616
22617         * error.c (dump_expr): Don't core dump when a boolean expression is
22618         used as a default argument.
22619
22620 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
22621
22622         * class.c (finish_struct_bits): Check aggregate_value_p instead of
22623         RETURN_IN_MEMORY.
22624
22625 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
22626
22627         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
22628         BLKmode type that would otherwise be returned in registers.
22629
22630 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22631
22632         * g++.c (WITHLIBC): New macro.
22633         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
22634         saw_libc and pass it at the end if it was set.
22635
22636 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22637
22638         * parse.y (fn.def1): Call split_specs_attrs in
22639         declmods notype_declarator case.