OSDN Git Service

* function.c (free_temps_for_rtl_expr): Don't free slots
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
2
3         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
4         RTL_EXPR_HAS_NO_SCOPE after all.
5
6 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
7
8         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
9         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
10         RTL_EXPR_HAS_NO_SCOPE.
11
12         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
13         later.
14         
15         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
16
17 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
18
19         * call.c (convert_like): Macrofy.
20         (convert_like_with_context): New macro.
21         (convert_like_real): Renamed from convert_like.  Add calling
22         context parameters, for diagnostics. Add recursive flag.  Call 
23         dubious_conversion_warnings for outer conversion.
24         (build_user_type_conversion): Use convert_like_with_context.
25         (build_over_call): Likewise. Don't warn about dubious
26         conversions here. Adjust convert_default_arg calls.
27         (convert_default_arg): Add context parameters for diagnostics.
28         Pass throught to convert_like_with_context.
29         * cp-tree.h (convert_default_arg): Add context parameters.
30         (dubious_conversion_warnings): Prototype new function.
31         * typeck.c (convert_arguments): Adjust convert_default_arg call.
32         (dubious_conversion_warnings): New function, broken
33         out of convert_for_assignment. 
34         (convert_for_assignment): Adjust.
35
36 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
37
38         * decl2.c (key_method): Break out from...
39         (import_export_vtable, import_export_class): ...here.
40
41         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
42         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
43
44         * search.c (note_debug_info_needed, dfs_debug_mark, 
45         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
46         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
47
48 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
49
50         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
51         typos.
52
53 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
54
55         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
56         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
57         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
58         (lang_type): Split gets_new into has_new and has_array_new.
59         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
60         (TYPE_GETS_NEW): Split into ...
61         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
62         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
63         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
64         (build_op_new_call): Don't declare.
65         (build_new_1): Likewise.
66         * call.c (build_op_new_call): Remove.
67         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
68         instead of TYPE_NEEDS_DESTRUCTOR.
69         (finish_struct_bits): Likewise.
70         (add_implicitly_declared_members): Likewise.
71         (check_field_decl): Likewise.
72         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
73         correctly under the new ABI.
74         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
75         instead of TYPE_NEEDS_DESTRUCTOR.
76         (initialize_local_var): Likewise.
77         (destroy_local_var): Likewise.
78         (cp_finish_decl): Likewise.
79         (register_dtor_fn): Likewise.
80         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
81         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
82         TYPE_VEC_DELETE_TAKES_SIZE here.
83         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
84         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
85         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
86         (finish_destructor_body): Likewise.
87         (maybe_build_cleanup_1): Likewise.
88         * decl2.c (do_static_destruction): Likewise.
89         * init.c (build_new_1): Make it static.
90         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
91         (expand_cleanup_for_base): Likewise.
92         (get_cookie_size): New function.
93         (build_new_1): Handle array-new cookies correctly under the new
94         ABI.
95         (build_vec_delete_1): Likewise.
96         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
97         (build_delete): Likewise.
98         (build_vec_delete): Handle array-new cookies correctly under the new
99         ABI.
100         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
101         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
102         TYPE_HAS_ARRAY_NEW_OPERATOR.
103         * ptree.c (print_lang_type): Check them.
104         * search.c (context_for_name_lookup): Fix typo in comment.
105         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
106         * tree.c (break_out_cleanups): Likewise.
107         (build_cplus_array_test_1): Likewise.
108         (cp_build_qualified_type_real): Likewise.
109         * typeck.c (complete_type): Likewise.
110         
111         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
112         the command-line, not the end.
113         
114 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
115
116         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
117
118 2000-03-02  Tom Tromey  <tromey@cygnus.com>
119
120         * cp-tree.h (build_java_class_ref): Declare.
121         * init.c (build_java_class_ref): No longer static.
122         * except.c (expand_throw): Generate a Java-style `throw' if the
123         thrown object is a "Java" object.
124         (initialize_handler_parm): Generate a Java-style lookup of
125         exception info if the caught object is a "Java" object.
126         (catch_language, catch_language_init): New globals.
127         (decl_is_java_type): New function.
128         (expand_start_catch_block): Don't call push_eh_info() or
129         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
130         class reference to build_catch_block.
131
132 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
133
134         * typeck.c (comptypes): Treat sizetype like its language equivalent.
135
136 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
137
138         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
139         to merge reference/pointer code and fix incorrect warnings.
140
141 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
142
143         * search.c (protected_accessible_p): Use context_for_name_lookup.
144
145         * init.c (construct_virtual_bases): Fix thinko.
146         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
147
148 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
149
150         * decl.c (current_function_decl): Move to toplev.c.
151
152 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
153
154         * pt.c (fn_type_unification): Unify return type, whenever
155         provided.
156         (get_bindings_real): Only pass return type when necessary.
157         Remove explicit return type check.
158         * class.c (resolve_address_of_overloaded_function): Pass desired
159         return type to fn_type_unification.
160
161 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
162
163         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
164         DECL_FIELD_SIZE.
165         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
166         DECL_FIELD_SIZE.
167         * rtti.c (expand_class_desc): Likewise.
168         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
169         (THUNK_VCALL_OFFSET): Likewise.
170         (THUNK_DELTA): Reflect changes in ../tree.h.
171
172 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
173
174         * search.c (protected_accessible_p): Also allow the access if
175         the member is public in DERIVED.  Lose TYPE parm.
176         (friend_accessible_p): Lose TYPE parm.
177         (accessible_p): Adjust.
178
179 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
180
181         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
182         on things that are not sizes; ssize_binop deleted.
183         Call size_diffop when appropriate.
184         (dfs_build_vcall_offset_vtbl_entries): Likewise.
185         (build_primary_vtable, build_secondary_vtable): Likewise.
186         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
187         Variable I is HOST_WIDE_INT.
188         (get_vfield_offset): Pass proper types to size_binop.
189         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
190         (finish_struct_1): Likewise.
191         (skip_rtti_stuff): Arg N is now pointer to signed.
192         (layout_class_type): Use size_zero_node.
193         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
194         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
195         * decl.c (complete_arry_type): Pass proper types to size_binop.
196         (xref_basetypes): BINFO_OFFSET is sizetype.
197         * error.c (dump_expr): Don't use size_binop non-sizes.
198         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
199         * init.c (construct_virtual_bases): Fix type error.
200         (build_vec_delete_1): Pass proper type to size_binop and don't
201         fold result.
202         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
203         * rtti.c (get_base_offset): Pass proper type to size_binop.
204         * search.c (dfs_find_vbases): Fix type error.
205         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
206         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
207         * tree.c (debug_binfo): Variable N is signed.
208         Use HOST_WIDE_INT_PRINT_DEC.
209         * typeck.c (comptypes): sizetype is same as equivalent integer type.
210         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
211         size_one_node and size_zero_node.
212         (c_alignof): Use size_one_node.
213         (build_component_addr): Pass proper types to size_binop.
214         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
215
216 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
217
218         Implement class scope using-declarations for functions.
219         * class.c (handle_using_decl): Call add_method for used functions.
220         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
221         (add_method): Used functions are hidden by local functions.
222         (check_bases_and_members): Handle using-decls before finalizing
223         CLASSTYPE_METHOD_VEC.
224         * call.c (add_function_candidate): Add ctype parm; if non-zero,
225         override the type of 'this' accordingly.
226         (add_template_candidate, add_template_candidate_real): Add ctype parm.
227         (convert_class_to_reference, build_user_type_conversion_1, 
228         build_new_function_call, build_object_call, build_new_op,
229         build_new_method_call): Pass ctype parm.
230
231         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
232         the baselink.
233         * call.c (convert_class_to_reference, build_user_type_conversion_1, 
234         build_new_function_call, build_object_call, build_new_op,
235         build_new_method_call, build_op_delete_call): Don't get basetype_path
236         from a baselink.
237         * typeck.c (build_component_ref): Likewise.
238         * init.c (build_offset_ref): Likewise.
239         (resolve_offset_ref): Don't call enforce_access.  
240         Call build_scoped_ref.
241         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
242         would cause an error or if -pedantic.
243         * class.c (alter_access): Lose binfo parm.
244
245 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
246
247         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
248         types.
249
250 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
251
252         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
253         pseudo_type_info creation into the std namespace
254
255 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
256
257         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
258         (import_export_class): Remove declaration.
259         * decl2.c (import_export_class): Make it static.
260         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
261         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
262         EXPR_WITH_FILE_LOCATION.
263         * lex.c (check_newline): Tweak filename/lineno setting.
264         * semantics.c (begin_while_stmt): Fix typo in comment.
265         
266 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
267
268         * lang-options.h (-fmessage-length=): Add missing option.
269
270         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
271
272 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
273
274         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
275
276 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
277
278         * optimize.c (expand_call_inline): Emit the return label before
279         evaluating the return value.
280
281 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
282
283         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
284         than duplicating functionality here.
285         * optimize.c: Include input.h.
286         (expand_call_inline): Use push_srcloc and pop_srcloc.
287         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
288         * parse.c: Regenerated.
289         * Makefile.in (lex.o): Depend on input.h.
290         (optimize.o): Likewise.
291         
292 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
293
294         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
295         function type, rather than ICE.
296
297 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
298
299         * decl.c (grokdeclarator): Call decl_type_access_control.
300         * parse.y (parse_end_decl): Don't call decl_type_access_control if
301         decl is null.
302
303 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
304
305         * decl.c (decls_match): Remove obsolete static member nadgering.
306
307 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
308
309         * decl.c (grokdeclarator): Change ANSI to ISO.
310         * lex.c (consume_string, readescape, do_identifier): Likewise.
311         (parse_float, real_yylex): Likewise.
312         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
313         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
314         new_type_id, maybe_label_decls, simple_stmt, 
315         for.init.statement): Likewise.
316         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
317         * semantics.c (finish_named_return_value): Likewise.
318         * parse.c: Regenerate.
319
320 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
321
322         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
323         (CPTI_CLASS_STAR_TYPE): Remove.
324         (vtable_index_type): Likewise.
325         (class_star_type_node): Remove.
326         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
327         (build_binary_op_nodefault): Remove.
328         * call.c (build_new_op): Use build_binary_op instead of
329         build_binary_op_nodefault.
330         * decl.c (init_decl_processing): Remove class_star_type_node
331         initialization.  Make delta_type_node ptrdiff_type_node under the
332         new ABI.  Initialize vtable_index_type.
333         (build_ptrmemfunc_type): Build different structures for the new
334         ABI.
335         (build_enumerator): Use build_binary_op instead of
336         build_binary_op_nodefault.
337         * method.c (build_overload_value): Mangle pointers-to-members
338         appropriately under the new ABI.
339         * typeck.c (build_array_ref): Use build_binary_op instead of
340         build_binary_op_nodefault.
341         (get_member_function_from_ptrfunc): Adjust for the new ABI.
342         (build_binary_op_nodefault): Rename to ...
343         (build_binary_op): ... this.  Remove old version.  Adjust for
344         pointer-to-member comparisons under the new ABI.
345         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
346         (build_ptrmemfunc): Adjust for the new ABI.
347         (expand_ptrmemfunc_cst): Likewise.
348         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
349         (pfn_from_ptrmemfunc): Adjust for the new ABI.
350         
351 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
352
353         * call.c (build_object_call): Compress consecutive calls to
354         cp_error.
355         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
356         (build_op_delete_call): Adjust message formatting.
357
358         * class.c (check_bases): Compress consecutive calls to
359         cp_pedwarn. 
360         (finish_struct_anon): Say 'ISO C++'.
361
362         * decl.c (start_decl): Same here.
363         (grok_reference_init): Likewise.
364         (grokfndecl): Correct message formatting.
365         (grokfndecl): Improve diagnostic.
366         (check_static_variable_definition): Likewise. Say 'ISO C++'
367         (compute_array_index_type): Say 'ISO C++'
368         (create_array_type_for_decl): Compress consecutive calls to
369         cp_error. 
370         (grokdeclarator): Say 'ISO C++'
371         (grok_op_properties): Likewise.
372
373         * decl2.c (delete_sanity): Clairify diagnostic.
374         (check_member_template): Same here.
375         (grok_function_init): Use consistent terminology.
376
377         * expr.c (do_case): Say 'ISO C++'
378
379         * friend.c (do_friend): Compress consecutive calls to warning.
380         
381 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
382
383         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
384         * class.c (build_secondary_vtable): Reorganize.  Don't create a
385         new vtable under the new ABI.
386         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
387         computing the size.
388         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
389         the initializing elements.
390         (initialize_vtable): New function.
391         (dfs_finish_vtbls): Use it.
392         (dfs_accumulate_vtbl_inits): New function.
393         (finish_vtbls): Merge primary and secondary vtables under the new
394         ABI.
395         (finish_struct_1): Remove redundant call to layout_vtable_decl.
396         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
397         aren't VAR_DECLs.
398
399         * class.c (build_vtable): New function, split out from ...
400         (get_vtable_decl): ... here, and ...
401         (build_secondary_vtable): ... here.
402
403         * pt.c (tsubst_decl): Fix formatting.
404         
405 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
406
407         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
408         (avoid_overlap, build_base_field): Likewise.
409         (build_base_field, build_base_fields, is_empty_class): 
410         Test DECL_SIZE with integer_zero.
411         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
412         * cp-tree.h (struct lang_type): New field size_unit.
413         (CLASSTYPE_SIZE_UNIT): New macro.
414         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
415         (cp_finish_decl): Delete -Wlarger-than processing.
416         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
417         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
418         * tree.c (make_binfo): binfo vector is one entry longer.
419         (walk_tree): Walk DECL_SIZE_UNIT.
420
421 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
422
423         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
424         comment.
425         (build_vtable_entry): Don't assume all vtable entries are
426         functions.
427         (build_vtbl_initializer): Adjust accordingly.
428         (get_vtable_decl): Fix formatting.
429         
430 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
431
432         * semantics.c (deferred_type_access_control): Walk the entire
433         type_lookups list.
434         (save_type_access_control): Rename from 
435         initial_deferred_type_access_control.  Just remember the value.
436         (decl_type_access_control): New fn.
437         (begin_function_definition): Use deferred_type_access_control, after
438         we've started the function.  Set type_lookups to error_mark_node.
439         * parse.y (frob_specs, fn.def1): Adjust.
440         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
441         (parse_end_decl, parse_bitfield0, parse_method): New fns.
442         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
443         (after_type_component_declarator0): Likewise.
444         (after_type_component_declarator): Likewise.
445         (notype_component_declarator): Likewise.
446         * cp-tree.h: Adjust.
447
448         * decl.c (redeclaration_error_message): Allow redeclaration of 
449         namespace-scope decls.
450
451 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
452
453         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
454
455 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
456
457         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
458         * decl2.c (grokclassfn): Likewise.
459
460         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
461
462         * decl2.c (lang_decode_option): Don't set default message length
463         here.
464         * lex.c (lang_init_options): Set it here.
465
466 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
467
468         Make DECL_CONTEXT mean the class in which a member function was
469         declared, even for a virtual function.
470         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
471         (DECL_FRIEND_CONTEXT): New macro.
472         (DECL_REAL_CONTEXT): Remove.
473         (SET_DECL_FRIEND_CONTEXT): Likewise.
474         (DECL_VIRTUAL_CONTEXT): Adjust.
475         (DECL_CLASS_SCOPE_P): Use TYPE_P.
476         (add_friends): Remove.
477         (hack_decl_function_context): Likewise.
478         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
479         CP_DECL_CONTEXT.
480         (build_over_call): Fix indentation.  Use DECL_CONTEXT
481         instead of DECL_CLASS_CONTEXT.
482         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
483         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
484         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
485         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
486         (build_base_field): Likewise.
487         (finish_struct_1): Likewise.
488         (build_self_reference): Likewise.
489         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
490         DECL_REAL_CONTEXT.
491         (pushtag): Use decl_function_context, not
492         hack_decl_function_context.
493         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
494         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
495         (pushdecl): Remove bogus code.
496         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
497         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
498         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
499         Use decl_function_context, nothack_decl_function_context.
500         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
501         (grokdeclarator): Likewise.  Use decl_function_context, not
502         hack_decl_function_context.
503         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
504         (start_function): Use DECL_FRIEND_CONTEXT, not
505         DECL_CLASS_CONTEXT.  Use decl_function_context, not
506         hack_decl_function_context.
507         (finish_function): Use decl_function_context, not
508         hack_decl_function_context.
509         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
510         DECL_CLASS_CONTEXT.
511         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
512         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
513         (grokfield): Likewise.
514         (finish_builtin_type): Likewise.
515         (finish_vtable_vardec): Use decl_function_context, not
516         hack_decl_function_context.
517         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
518         (start_static_initialization_or_destruction): Likewise.
519         (finish_static_initialization_or_destruction): Likewise.
520         (mark_used): Adjust logic for deciding when to synthesize methods.
521         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
522         DECL_REAL_CONTEXT.
523         * error.c (dump_function_decl): Use DECL_CONTEXT, not
524         DECL_CLASS_CONTEXT.
525         * friend.c (is_friend): Likewise.
526         (add_friends): Remove.
527         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
528         * lex.c (begin_definition_of_inclass_inline): Use
529         decl_function_context, not hack_decl_function_context.
530         (process_next_inline): Likewise.
531         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
532         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
533         DECL_CLASSS_CONTEXT.
534         (hack_identifier): Likewise.
535         (synthesize_method):  Use decl_function_context, not
536         hack_decl_function_context.
537         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
538         DECL_REAL_CONTEXT.
539         (is_member_template): Use decl_function_context, not
540         hack_decl_function_context.  Use DECL_CONTEXT, not
541         DECL_CLASS_CONTEXT.
542         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not 
543         DECL_CLASS_CONTEXT.
544         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
545         DECL_REAL_CONTEXT.
546         (push_template_decl_real): Likewise.
547         (instantiate_class_template): Don't call add_friends.
548         (tsubst_default_argument): Use DECL_CONTEXT, not
549         DECL_REAL_CONTEXT.
550         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
551         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
552         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
553         DECL_CLASS_CONTEXT.
554         * repo.c (repo_inline_used): Likewise.
555         * search.c (current_scope): Adjust for new _CONTEXT macros.
556         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
557         DECL_REAL_CONTEXT.
558         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
559         (lookup_fnfields_here):Likewise.
560         (check_final_overrider): Likewise.
561         (init_vbase_pointers): Likewise.
562         (virtual_context): Likewise.
563         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
564         (expand_body): Use decl_function_context, not
565         hack_decl_function_context.
566         * tree.c (hack_decl_function_context): Remove.
567         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
568         DECL_CLASS_CONTEXT.
569         * typeck2.c (error_not_base_type): Likewise.
570         
571 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
572
573         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
574
575 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
576
577         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
578
579 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
580
581         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
582
583 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
584
585         * decl2.c (lang_decode_option): Enable automatic line wrapping.
586
587 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
588
589         * parse.y (frob_specs): Split out...
590         (parse_decl): From here.
591         (fn.def2): Call initial_deferred_type_access_control.
592         (after_type_component_declarator0): Call frob_specs.
593         (notype_component_declarator0): Likewise.
594         * search.c (friend_accessible_p): Nested classes are friends of their
595         enclosing classes.
596
597 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
598
599         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
600         used to create an implicit temporary.
601
602         * class.c (dfs_modify_vtables): Tweak calculation of functions to
603         override.
604
605 2000-02-08  Nathan Sidwell  <nathan@acm.org>
606
607         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
608         strip array element qualifiers too.
609
610 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
611
612         * decl.c (store_parm_decls): Don't build cleanups for parameters
613         while processing_template_decl.
614
615 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
616
617         * cp-tree.h (struct saved_scope): Add incomplete field.
618         (namespace_scope_incomplete): New macro.
619         * decl.c (pushdecl): Use it.
620         (hack_incomplete_structures): Use it.  See through artificial
621         binding levels.
622         (mark_saved_scope): Mark it.
623
624         Implement access control for nested types.
625         * search.c (type_access_control): New fn.
626         (accessible_p): Now we do perform access control for types.
627         * semantics.c (deferred_type_access_control): New fn.
628         (initial_deferred_type_access_control): New fn.
629         (begin_function_definition): Call it.  Add lookups parm.
630         * decl.c (struct binding_level): Add this_class field.
631         (pushlevel_class): Set it.
632         (mark_binding_level): Mark it.
633         (lookup_name_real): Use it.  Call type_access_control.
634         (mark_saved_scope): Mark lookups field.
635         * cp-tree.h (flagged_type_tree): Add lookups field.
636         (struct saved_scope): Add lookups field.
637         (type_lookups): New macro.
638         * parse.y (declmods): Now <ftype>.
639         (parse_decl): Add lookups parm.  Call 
640         initial_deferred_type_access_control.
641         (lang_extdef): Clear type_lookups.
642         (typed_declspecs, declmods, typespec): Set lookups field.
643         (initdcl): Call deferred_type_access_control.
644         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
645         component_decl_1, named_parm): Adjust.
646         * friend.c (is_friend): Nested classes are friends of their
647         enclosing classes.
648
649         * class.c (currently_open_derived_class): New fn.
650         * method.c (hack_identifier): Use it.
651
652         * lex.c (do_identifier): Remove obsolete code.
653
654         * parse.y (typed_typespecs): Propagate new_type_flag properly.
655
656 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
657
658         * tinfo.h: Remove apostrophes from C++ comment (xgettext
659         thinks this file is plain C).
660
661 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
662
663         * Makefile.in (call.o): Depend on $(EXPR_H).
664
665         * call.c: Include "expr.h".
666
667         * class.c (dump_class_hierarchy): Add prototype.
668
669         * search.c (dfs_get_pure_virtuals): Likewise.
670
671 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
672
673         * parse.y (simple_stmt): Allow :: token in asm parameter list.
674         * parse.c: Rebuilt.
675
676 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
677
678         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
679         Store it in DECL_FCONTEXT.
680         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
681
682 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
683
684         * tinfo.h (old abi): #include "tconfig.h".
685         * tinfo.cc (convert_to_base): Move into old abi section.
686
687 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
688
689         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
690         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
691         (BINFO_PRIMARY_BINFO): New macro.
692         (BF_DELTA): Rename to ...
693         (BV_DELTA): ... this.
694         (BF_VCALL_INDEX): Rename to ...
695         (BV_VCALL_INDEX): ... this.
696         (BF_FN): Rename to ...
697         (BV_FN): ... this.
698         * class.c (build_vbase_path): Adjust for changes to reverse_path.
699         (set_rtti_entry): Rename BF_ macros to BV_ variants.
700         (modify_vtable_entry): Simplify.
701         (add_virtual_function): Rename BF_ macros to BV_ variants.
702         (build_vtable_initializer): Likewise.
703         (get_class_offset_1): Remove.
704         (dfs_get_class_offset): Likewise.
705         (get_class_offset): Likewise.
706         (dfs_find_final_overrider): New function.
707         (find_final_overrider): Likewise.
708         (modify_one_vtable): Remove.
709         (dfs_find_base): New function.
710         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
711         find_final_overrider.
712         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
713         virtuals.
714         (dfs_fixup_vtable_deltas): Remove.
715         (override_one_vtable): Remove.
716         (merge_overrides): Likewise.
717         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
718         unreal chilren of virtual bases.
719         (finish_struct_1): Don't use merge_overrides.  Don't use
720         dfs_fixup_vtable_deltas.
721         * tree.c (reverse_path): Return a TREE_LIST, not a chain of 
722         BINFOs.
723         
724 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
725             Jason Merrill  <jason@yorick.cygnus.com>
726
727         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
728
729 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
730
731         * exception.cc (__throw_bad_typeid): Add missing std::.
732
733 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
734
735         * cp-tree.h (make_thunk): PROTO -> PARAMS.
736
737 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
738
739         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
740
741         Runtime support for new-abi rtti.
742         * inc/typeinfo (type_info::operator!=): Define in class.
743         (type_info::before, type_info::name, type_info::operator==,
744         type_info::operator!=): Define new ABI implementations.
745         (type_info::is_pointer_p, type_info::is_function_p): Declare
746         new virtual functions.
747         (type_info::do_catch, type_info::do_upcast): Likewise.
748         
749         * tinfo.h (__base_class_info): Define new class.
750         (__class_type_info): Likewise.
751         (__si_class_type_info): Likewise.
752         (__vmi_class_type_info): Likewise.
753         (__dynamic_cast): Prototype.
754         
755         * tinfo.cc: Conditionalize old and new rtti mechanisms.
756         (type_info::is_pointer_p): Define new function.
757         (type_info::is_function_p): Likewise.
758         (type_info::do_catch): Likewise.
759         (type_info::do_upcast): Likewise.
760         (vtable_prefix): New structure for vtable access.
761         (adjust_pointer): Define new template function.
762         (contained_p, public_p, virtual_p, contained_public_p,
763         contained_nonpublic_p, contained_nonvirtual_p): Define new
764         functions.
765         (nonvirtual_base_type): New local variable.
766         (__class_type_info::~__class_type_info): Define.
767         (__si_class_type_info::~__si_class_type_info): Likewise.
768         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
769         (__class_type_info::do_catch): Define new function.
770         (__class_type_info::do_upcast): Likewise.
771         (__class_type_info::find_public_src): Likewise.
772         (__class_type_info::do_find_public_src): Likewise.
773         (__si_class_type_info::do_find_public_src): Likewise.
774         (__vmi_class_type_info::do_find_public_src): Likewise.
775         (__class_type_info::do_dyncast): Likewise.
776         (__si_class_type_info::do_dyncast): Likewise.
777         (__vmi_class_type_info::do_dyncast): Likewise.
778         (__class_type_info::do_upcast): Likewise.
779         (__si_class_type_info::do_upcast): Likewise.
780         (__vmi_class_type_info::do_upcast): Likewise.
781         (__dynamic_cast): Likewise.
782         
783         * tinfo2.cc (__fundamental_type_info): Define new class.
784         (__pointer_type_info): Likewise.
785         (__reference_type_info): Likewise.
786         (__array_type_info): Likewise.
787         (__function_type_info): Likewise.
788         (__enum_type_info): Likewise.
789         (__ptr_to_member_type_info): Likewise.
790         (__fundamental_type_info::~__fundamental_type_info): Define.
791         (__pointer_type_info::~__pointer_type_info): Likewise.
792         (__reference_type_info::~__reference_type_info): Likewise.
793         (__array_type_info::~__array_type_info): Likewise.
794         (__function_type_info::~__function_type_info): Likewise.
795         (__enum_type_info::~__enum_type_info): Likewise.
796         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
797         (__pointer_type_info::do_catch): Define new function.
798         (__ptr_to_member_type_info::do_catch): Define new function.
799         
800         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
801         (__is_pointer): Likewise.
802
803         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
804
805 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
806
807         * cp/class.c (build_vtable): Rename to build_primary_vtable.
808         (prepare_fresh_vtable): Rename to build_secondary_vtable.
809         (make_new_vtable): New function.
810         (modify_vtable_entry): Handle generation of new vtables correctly.
811         (modify_one_vtable): Remove unused parameter.
812         (dfs_fixup_vtable_deltas): Likewise.
813         (override_one_vtable): Use build_secondary_vtable.
814         (finish_struct_1): Use build_primary_vtable and
815         build_secondary_vtable.
816         
817 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
818
819         * cp/decl.c: Adjust variable names, comments, help strings.
820
821 2000-01-29  Nathan Sidwell  <nathan@acm.org>
822
823         * new2.cc (operator delete[]): Use operator delete, don't assume
824         implementation.
825
826 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
827
828         * class.c (build_vtbl_initializer): Add argument to
829         build_vtable_entry call.
830
831 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
832
833         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
834         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
835         (BF_DELTA): New macro.
836         (BF_VCALL_INDEX): Likewise.
837         (BF_FN): Likewise.
838         (THUNK_VCALL_OFFSET): Likewise.
839         (make_thunk): Change prototype.
840         * class.c (build_vtable_entry): Integrate
841         build_vtable_entry_for_fn.  Handle vcall indices.
842         (build_vtable_entry_for_fn): Remove.
843         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
844         BF_VCALL_INDEX, BF_FN.
845         (modify_vtable_entry): Integrate common code from
846         modify_one_vtable and dfs_fixup_vtable_deltas.
847         (add_virtual_function): Set BF_VCALL_INDEX.
848         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
849         and BF_FN.
850         (modify_one_vtable): Simplify.
851         (dfs_fixup_vtable_deltas): Likewise.
852         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. 
853         * method.c (make_thunk): Handle vcall indices.
854         
855 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
856
857         Compiler side new abi rtti (not enabled).
858         * cp-tree.h (new_abi_rtti_p): New macro.
859         (emit_support_tinfos): Prototype new function.
860         (tinfo_decl_p): Likewise.
861         (emit_tinfo_decl): Likwise.
862         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
863         macros.
864         (doing_runtime): New local static.
865         (init_rtti_processing): Add new-abi initializer.
866         (get_tinfo_decl): Add new-abi logic.
867         (tinfo_from_decl): Likewise.
868         (build_dynamic_cast_1): Likewise.
869         (qualifier_flags): New static function.
870         (tinfo_base_init): Likewise.
871         (generic_initializer): Likewise.
872         (ptr_ref_initializer): Likewise.
873         (ptmd_initializer): Likewise.
874         (class_hint_flags): Likewise.
875         (class_initializer): Likewise.
876         (synthesize_tinfo_var): Likewise.
877         (create_real_tinfo_var): Likewise.
878         (create_pseudo_type_info): Likewise.
879         (get_vmi_pseudo_type_info): Likewise.
880         (create_tinfo_types): Likewise.
881         (emit_support_tinfos): New global function.
882         (tinfo_decl_p): New global predicate.
883         (emit_tinfo_decl): New global function.
884         * class.c (set_rtti_entry): Generalize for old and new rtti.
885         (build_vtbl_initializer): Likewise.
886         * decl2.c (finish_file): Likewise.
887
888 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
889
890         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
891         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
892
893 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
894
895         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
896         for scopes.
897
898 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
899
900         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
901
902 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
903
904         * optimize.c (calls_setjmp_r): Supply new argument
905         to special_function_p.
906
907 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
908
909         * call.c: PROTO -> PARAMS.
910         * class.c: Likewise.
911         * cp-tree.h: Likewise.
912         * cvt.c: Likewise.
913         * decl.c: Likewise.
914         * decl.h: Likewise.
915         * decl2.c: Likewise.
916         * dump.c: Likewise.
917         * errfn.c: Likewise.
918         * error.c: Likewise.
919         * except.c: Likewise.
920         * expr.c: Likewise.
921         * init.c: Likewise.
922         * input.c: Likewise.
923         * lex.c: Likewise.
924         * lex.h: Likewise.
925         * method.c: Likewise.
926         * optimize.c: Likewise.
927         * parse.y: Likewise.
928         * pt.c: Likewise.
929         * repo.c: Likewise.
930         * rtti.c: Likewise.
931         * search.c: Likewise.
932         * semantics.c: Likewise.
933         * spew.c: Likewise.
934         * tree.c: Likewise.
935         * typeck.c: Likewise.
936         * typeck2.c: Likewise.
937         * xref.c: Likewise.
938
939 2000-01-25  Richard Henderson  <rth@cygnus.com>
940
941         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
942
943 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
944
945         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
946         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
947         (struct vcall_offset_data_s): New type.
948         (dfs_vcall_offset_queue_p): New function.
949         (dfs_build_vcall_offset_vtbl_entries): Likewise.
950         (build_vcall_offset_vtbl_entries): Likewise.
951         (layout_vtable_decl): Likewise.
952         (num_vfun_entries): Likewise.
953         (num_extra_vtbl_entries): Add the entries for vcall offsets.
954         (build_vtbl_initializer): Likewise.
955         (dfs_finish_vtabls): Use layout_vtable_decl.
956         (modify_one_vtables): Always duplicate vtables under the new ABI.
957         (finish_struct_1): Use layout_vtable_decl.
958         
959 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
960
961         * decl.c (member_function_or_else): Change third arg from a format
962         specifier to an `enum overload_flags'.  Callers changed.
963
964 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
965
966         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
967         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
968         build_const_cast, get_delta_difference, check_return_expr): Avoid
969         ANSI string concatenation usage.  
970
971 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
972
973         * class.c (layout_class_type): Put the fields required to make a
974         class non-empty at the end, not the beginning, of the TYPE_FIELDs
975         list.
976
977 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
978
979         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
980         template.
981
982         * decl2.c (mark_used): Do instantiate inlines that have been
983         explicitly instantiated.
984
985 2000-01-24  Richard Henderson  <rth@cygnus.com>
986
987         * call.c (build_over_call): Use expand_tree_builtin.
988         * typeck.c (build_function_call_real): Likewise.
989         (build_binary_op_nodefault): Handle unordered compares.
990
991 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
992
993         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
994         cp_tree_index values.
995         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
996         New global node #defines for them.
997         * rtti.c (call_void_fn): Replace with ...
998         (build_runtime_decl): ... new static function.
999         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
1000         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
1001         (build_dynamic_cast_1): Always produce correctly typed result.
1002         Explicitly produce type_info addresses. Use dynamic_cast_node.
1003         * exception.cc (__throw_bad_cast): Return `void *'.
1004         (__throw_bad_typeid): Return `const type_info &'.
1005
1006 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
1007
1008         * cp-tree.h (get_vtable_decl): Prototype new function.
1009         * class.c (get_vtable_decl): New function. Broken out from ...
1010         (build_vtable): ... here. Use it.
1011         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
1012         by get_vtable_decl.
1013
1014 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
1015
1016         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
1017         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
1018         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
1019         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
1020         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
1021         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
1022         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
1023         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
1024         (CPTI_TINFO_VAR_ID): New enumeration.
1025         (__tp_desc_type_node, __access_mode_type_node,
1026         __bltn_desc_type_node, __user_desc_type_node,
1027         __class_desc_type_node, __ptr_desc_type_node,
1028         __attr_desc_type_node, __func_desc_type_node,
1029         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
1030         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
1031         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
1032         enum_desc_type_node, class_desc_type_node,
1033         si_class_desc_type_node, vmi_class_desc_type_node,
1034         ptmd_desc_type_node, base_desc_type_node): New #defines.
1035         (tinfo_fn_id, tinfo_fn_type): Rename to ...
1036         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
1037         (tinfo_var_id): New enumeration.
1038         (DECL_TINFO_FN_P): Augment comment.
1039         * decl.c (cp_global_trees): Adjust documentation.
1040         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
1041         tinfo_decl_type and tinfo_var_id.
1042         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
1043         (build_typeid): Remove unused variable.
1044         (get_tinfo_var): Use tinfo_var_id.
1045         (tinfo_name): New static function.
1046         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
1047         (tinfo_from_decl): Likewise.
1048         (get_base_offset): New static function, broken out of
1049         expand_class_desc.
1050         (expand_si_desc): Use tinfo_name.
1051         (expand_class_desc): Likewise. Lose local static variable.
1052         Use base_desc_type_node. Use get_base_offset.
1053         (expand_ptr_desc): Use tinfo_name.
1054         (expand_attr_desc): Likewise.
1055         (expand_generic_desc): Likewise.
1056
1057         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
1058         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
1059
1060 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
1061
1062         * cp-tree.h (__eprintf): Remove declaration.
1063         * tree.c (__eprintf): Remove definition.
1064
1065 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
1066             Mark Mitchell  <mark@codesourcery.com>
1067
1068         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
1069         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
1070
1071 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
1072
1073         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
1074
1075 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
1076
1077         * cp-tree.h (register_dtor_fn): New function.
1078         * decl.c (destroy_local_static): Rename to ...
1079         (register_dtor_fn): ... this.  Give it external linkage.
1080         (expand_static_init): Use it.
1081         * decl2.c (do_static_initialization): Likewise, if using
1082         __cxa_atexit.
1083         (do_static_destruction): Check that __cxa_atexit is not in use.
1084         (finish_file): Don't call do_static_destruction if using
1085         __cxa_atexit.
1086
1087         * typeck.c (convert_arguments): Restore two-message error
1088         reporting.
1089         
1090 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
1091
1092         Remap dynamic cast hint values to be consistent across ABIs.
1093         * search.c (dynamic_cast_base_recurse): Remap generated value.
1094         (get_dynamic_cast_base_type): Adjust documentation.
1095         * tinfo.h (__user_type_info::dyncast): Likewise.
1096         (__user_type_info::find_public_subobj): Remap BOFF meaning.
1097         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
1098         (__class_type_info::do_dyncast): Likewise.
1099         (__class_type_info::do_find_public_subobj): Likewise.
1100         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.     
1101
1102 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.coom>
1103
1104         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
1105
1106         * typeck2.c (incomplete_type_error): Restore previous
1107         cp_error and cp_error_at call sequence.
1108         
1109 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
1110
1111         * class.c (dump_class_hierarchy): Make format agree with argument;
1112         cast pointer to unsigned long and print with %lx.
1113         
1114 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery>
1115
1116         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
1117         
1118         * typeck.c (composite_pointer_type, common_type,
1119         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
1120         build_function_call_real, convert_arguments,
1121         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
1122         build_unary_op, mark_addressable, build_compound_expr,
1123         build_static_cast, build_reinterpret_cast, build_const_cast,
1124         build_c_cast, build_modify_expr, get_delta_difference,
1125         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with 
1126         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
1127         into a single one.
1128         * typeck2.c (readonly_error, abstract_virtuals_error,
1129         process_init_constructor, check_for_new_type): Likewise.
1130
1131 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
1132
1133         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
1134         VAR_DECLs.
1135
1136 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
1137
1138         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
1139         (build_x_typeid): Likewise.
1140         (get_tinfo_fn): Likewise.
1141         (get_tinfo_fn_unused): Rename to ...
1142         (get_tinfo_decl): ... here.
1143         * rtti.c (build_headof): Replace logic error with assertion.
1144         (get_tinfo_fn_dynamic): Rename to ...
1145         (get_tinfo_decl_dynamic): ... here. Make static. Use
1146         complete_type_or_else.
1147         (build_x_typeid): Move into ...
1148         (build_typeid): ... here. Adjust call to
1149         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
1150         throw_bad_typeid expression.
1151         (get_tinfo_fn_unused): Rename to ...
1152         (get_tinfo_decl): ... here. Adjust comment.
1153         (get_tinfo_fn): Delete.
1154         (tinfo_from_decl): New static function.
1155         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
1156         (get_typeid): Use complete_type_or_else.
1157         (build_dynamic_cast_1): Adjust calls to
1158         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
1159         * parse.y (primary): Adjust call to build_typeid.
1160         * except.c (build_eh_type_type_ref): Adjust call to
1161         get_tinfo_decl. Mark as used.
1162         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
1163         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
1164         * parse.c: Regenerated.
1165
1166 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
1167
1168         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
1169         calling convention.
1170         (resolves_to_fixed_type_p): Document calling convention.
1171         * rtti.c (build_x_typeid): Initialize NONNULL.
1172
1173         * cp-tree.h (build_shared_int_cst): New function.
1174         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
1175         * class.c (modify_vtable_entry): Likewise.
1176         (add_virtual_function): Split out code to generated shared
1177         INTEGER_CSTs to build_share_int_cst.
1178         (modify_all_vtables): Handle all the overridden functions here.
1179         Add overridden functions from non-primary virtual bases to the
1180         primary vtable.
1181         (finish_struct_1): Adjust call to modify_all_vtables.  Add
1182         overridden functions from non-primary bases to the vtable.
1183         * tree.c (build_shared_int_cst): New function.
1184         
1185         * cp-tree.h (scratchalloc): Remove.
1186         (build_scratch_list): Likewise.
1187         * call.c (convert_class_to_reference): Replace build_scratch_list
1188         and build_expr_list with build_tree_list.
1189         (add_candidate): Replace scratchalloc with expralloc.  Note memory
1190         leak.
1191         (build_user_type_conversion_1):  Replace build_scratch_list
1192         and build_expr_list with build_tree_list.
1193         (build_new_op): Likewise.
1194         (build_op_delete_call): Likewise.
1195         (convert_like): Likewise.
1196         * cvt.c (ocp_convert): Likewise.
1197         * decl.c (start_decl): Likewise.
1198         (start_function): Likewise.
1199         (finish_destructor_body): Likewise.
1200         (maybe_build_cleanup_1): Likewise.
1201         * decl2.c (reparse_decl_as_expr): Likewise.
1202         * init.c (perform_member_init): Likewise.
1203         (expand_cleanup_for_base): Likewise.
1204         (build_builtin_delete_call): Likewise.
1205         (build_new_1): Likewise.
1206         (build_delete): Likewise.
1207         * method.c (do_build_assign_ref): Likewise.
1208         * parse.y (already_scoped_stmt): Likewise.
1209         (nontrivial_exprlist): Likewise.
1210         (net_initializer): Likewise.
1211         (initlist): Likewise.
1212         * parse.c: Regenerated.
1213         * rtti.c (build_x_typeid): Likewise.
1214         (build_dynamic_cast_1): Likewise.
1215         * typeck.c (build_x_compound_expr): Likewise.
1216         (build_static_cast): Likewise.
1217         (build_modify_expr): Likewise.
1218         
1219         * cp-tree.h (DECL_VINDEX): Add documentation.
1220         * class.c (build_vtable_entry): Likewise.
1221         (start_vtable): Add comment.
1222         (add_virtual_function): Replace pending_hard_virtuals with
1223         overridden_virtuals and pending_virtuals with new_virtuals.
1224         Replace redundant assignments with assertions.
1225         (check_for_override): Add comment.
1226         (check_bases_and_members): Replace pending_hard_virtuals with
1227         overridden_virtuals and pending_virtuals with new_virtuals.
1228         (create_vtbl_ptr): Likewise.
1229         (layout_class_type): Likewise.
1230         (finish_struct_1): Likewise.  Add comments.
1231         
1232 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
1233
1234         * class.c (finish_struct_1): Replace redundant code with
1235         assertions.
1236
1237         * cp-tree.h (flag_new_abi): Move.
1238         (flag_use_cxa_atexit): Likewise.
1239         (flag_honor_std): Likewise.
1240         (flag_rtti): Likewise.
1241         (vbase_offsets_in_vtable_p): Define.
1242         (vptrs_present_everywhere_p): Likewise.
1243         (TYPE_CONTAINS_VPTR_P): Likewise.
1244         (dfs_walk_real): Declare.
1245         * class.c (build_vbase_pointer_fields): Check
1246         vbase_offsets_in_vtable_p.
1247         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
1248         BINFO_VPTR_FIELD.
1249         (build_vbase_offset_vtbl_entries): Simplify.
1250         (build_vbase_offset_vtbl_entries): Adjust.
1251         (build_vbase_pointer): Add ability to look up vbase offsets in
1252         vtable. 
1253         (start_vtable): New function.
1254         (add_virtual_function): Use it.
1255         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
1256         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
1257         (build_vtbl_initializer): Take the type of the complete object as
1258         input.  Use it to correctly calculate vbase offsets.
1259         (dfs_finish_vtbls): Pass the complete type to
1260         build_vtbl_initializer.
1261         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
1262         (create_vtable_ptr): Create a vtable even if there are no
1263         new virtual functions, under the new ABI.
1264         (finish_struct_1): Likewise.
1265         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
1266         * decl.c (exapnd_static_init): Remove call to
1267         preserve_initializer.
1268         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
1269         vtables.
1270         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
1271         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
1272         (construct_virtual_bases): Don't initialize virtual base pointers
1273         under the new ABI.
1274         (build_aggr_init): Clean up comment.
1275         (expand_aggr_init_1): Likewise.
1276         * rtti.c (expand_class_desc): Store the virtual function table
1277         index where the vbase offset lives in the offset field.
1278         * search.c (dfs_walk_real): Make it global.
1279         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
1280         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
1281         
1282         * tinfo.h (USItype): Make it signed under the new ABI.
1283         * tinfo.cc (convert_to_base): New function.  Encapsulate base
1284         conversion logic here.
1285         (__class_type_info::do_upcast): Use it.
1286         (__class_type_info::do_dyncast): Likewise.
1287         (__class_type_info::do_find_public_subobj): Likewise.
1288         
1289         * init.c (construct_virtual_bases): Don't look up the addresses of
1290         virtual bases at run-time.
1291
1292         * class.c (build_vbase_pointer): Relocate.
1293         (build_vbase_pointer_fields): Likewise.
1294         (dfs_build_vbase_offset_vtbl_entries): Likewise.
1295         (build_vbase_offset_vtbl_entries): Likewise.
1296
1297         * decl.c (init_decl_processing): Complain if -fnew-abi
1298         -fno-vtable-thunks is used.
1299
1300         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
1301         flag_new_abi.
1302
1303 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
1304
1305         * cp-tree.h (num_extra_vtbl_entries): New function.
1306         (size_extra_vtbl_entries): Likewise.
1307         (dfs_vtable_path_unmark): Likewise.
1308         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
1309         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
1310         * class.c (num_extra_vtbl_entries): New function.
1311         (size_extra_vtbl_entries): Likewise.
1312         (dfs_build_vbase_offset_vtbl_entries): New function.
1313         (build_vbase_offset_vtbl_entries): Likewise.
1314         (build_vtbl_initializer): Use it.
1315         (finish_struct_1): Adjust vtable sizes (using
1316         num_extra_vtbl_entries).
1317         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
1318         THUNK_DECL is non-NULL before expanding it.
1319         * init.c (expand_virtual_init): Adjust the vtable pointer by
1320         size_extra_vtbl_entries before storing it.
1321         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
1322         Handle TREE_LIST parameters here, not in the dfs_* functions.
1323         (dfs_unmarked_real_bases_queue_p): Adjust.
1324         (dfs_marked_real_bases_queue_p): Likewise.
1325         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
1326         (dfs_vtable_path_marked_real_bases_queue_p): New function.
1327         (dfs_vtable_path_unmark): Likewise.
1328         
1329 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
1330
1331         * optimize.c (copy_body_r): Clear the operand three of a
1332         TARGET_EXPR when copying it.
1333
1334 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1335
1336         * method.c (build_decl_overload_real): Check whether we are in ::
1337         before returning __builtin_new/delete.
1338
1339 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
1340
1341         * pt.c (tsubst_friend_function): Improve comment.
1342         (instantiate_decl): Avoid crashing when a "nested" function is
1343         instantiated from the top level.
1344         
1345         * dump.c (dqeueue_and_dump): Dump
1346         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
1347
1348 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1349
1350         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
1351
1352 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
1353
1354         * g++spec.c (lang_specific_driver): Add -fnew-abi if
1355         ENABLE_NEW_GXX_ABI defined.
1356         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
1357         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
1358         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
1359
1360 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
1361
1362         * decl.c (start_cleanup_fn): Call pushdecl.
1363
1364         * call.c (convert_class_to_reference): Fix typos.
1365         (build_conditional_expr): Handle errors gracefully.
1366         * class.c (push_nested_class): Likewise.
1367         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
1368         (DECL_THIS_EXTERN): Use it.
1369         (DECL_THIS_STATIC): Likewise.
1370         * cvt.c (convert_to_void): Handle errors gracefully.
1371         (build_expr_type_conversion): Likewise.
1372         * decl.c (maybe_push_decl): Likewise.
1373         (start_decl_1): Likewise.
1374         (require_complete_types_for_parms): Likewise.
1375         * parse.y (structsp): Likewise.
1376         (base_class): Likewise.
1377         * parse.c: Regenerated.
1378         * pt.c (finish_member_template_decl): Likewise.
1379         * typeck.c (decay_conversion): Likewise.
1380         
1381         * cp-tree.h (dfs_skip_vbases): New function.
1382         (find_vbase_instance): Likewise.
1383         * class.c (determine_primary_base): Allow a nearly empty base to
1384         serve as a primary base class under the new ABI.
1385         (get_class_offset_1): Rename to ...
1386         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
1387         messages here.
1388         (get_class_offset): Use it.  Issue error messages here.
1389         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
1390         find the right copies of virtual bases.
1391         (fixup_vtable_deltas1): Rename to ...
1392         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
1393         bases as primary bases.
1394         (fixup_vtable_deltas): Remove.
1395         (override_one_vtable): Handle virtual bases as primary bases.
1396         (merge_overrides): Likewise.
1397         (finish_struct_1): Likewise.
1398         (dump_class_hierarchy): Dump primary-ness of bases as well.
1399         * search.c (mark_primary_bases): Use a pre-order traversal to
1400         handle primary virtual bases.
1401         (dfs_skip_vbases): New fiunction.
1402         (expand_upcast_fixups): Adjust to handle primary virtual bases.
1403         (fixup_virtual_upcast_offsets): Likewise.
1404         (fixup_all_virtual_upcast_offsets): Likewise.
1405         (dfs_find_vbase_instances): New function.
1406         (find_vbase_instance): Likewise.
1407         
1408 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
1409
1410         * lex.c (DIR_SEPARATOR): Delete macro.
1411
1412 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
1413  
1414        * decl2.c (lang_decode_option): Handle automatic line wrapping
1415        option.
1416         
1417 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
1418
1419         * friend.c (do_friend): Don't resolve scopes when processing
1420         template declarations, even if the qualifying scope doesn't
1421         involve template parameters.
1422
1423 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
1424
1425         * class.c (dfs_modify_vtables_queue_p): Remove.
1426         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
1427         and dfs_marked_real_bases_queue_p instead of
1428         dfs_modify_vtables_queue_p.
1429
1430         * class.c (build_vbase_path): Simplify.
1431         (dfs_propagate_binfo_offsets): New function.
1432         (propagate_binfo_offsets): Use it.
1433         (remove_base_field): Simplify.
1434         (dfs_set_offset_for_vbases): Remove.
1435         (dfs_set_offset_for_shared_vbases): New function.
1436         (dfs_set_offset_for_unshared_vbases): Likewise.
1437         (layout_virtual_bases): Use them.
1438         (layout_basetypes): Don't call propagate_binfo_offsets.
1439         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
1440         for the vbases.
1441         
1442         * class.c (build_base_field): New function, split out from ...
1443         (build_base_fields): ... here.  Use it.  Allocate primary bases
1444         first, under the new ABI.
1445         (get_vtable_entry): Remove.
1446         (remove_base_field): New function, split out from ...
1447         (remove_base_fields): ... here.  Adjust since primary bases come
1448         first under the new ABI.
1449         
1450         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
1451         (initialize_vtbl_ptrs): New function.
1452         (expand_indirect_vtbls_init): Change prototype.
1453         (convert_pointer_to_vbase): Declare.
1454         * init.c (expand_direct_vtbls_init): Remove.
1455         (dfs_initialize_vtbl_ptrs): New function.
1456         (initialize_vtbl_ptrs): Likewise.
1457         (emit_base_init): Use initialize_vtbl_ptrs.
1458         * search.c (convert_pointer_to_vbase): Make it global.
1459         (expand_indirect_vtbls_init): Remove vtable initialization code.
1460         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
1461         
1462         * class.c (dfs_finish_vtbls): New function.
1463         (finish_vtbls): Use it.
1464         (dump_class_hierarchy): New function.
1465         
1466         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
1467         (BINFO_VBASE_PRIMARY_P): New macro.
1468         (BINFO_VIRTUALS): Add to documentation.
1469         (SET_BINFO_PRIMARY_MARKED_P): Remove.
1470         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1471         (dfs_mark_primary_bases_queue_p): Likewise.
1472         (dfs_unmarked_real_bases_queue_p): New function.
1473         (dfs_marked_real_bases_queue_p): Likewise.
1474         * search.c (dfs_mark_primary_bases): Adjust.
1475         (mark_primary_bases): Likewise.
1476         (get_shared_vbase_if_not_primary): New function.
1477         (dfs_unmarked_real_bases_queue_p): Likewise.
1478         (dfs_marked_real_bases_queue_p): Likewise.
1479         (dfs_get_pure_virtuals): Simplify.
1480         (get_pure_virtuals): Likewise.
1481         
1482 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1483
1484         * lex.c: Include tm_p.h.
1485
1486 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
1487
1488         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
1489
1490 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
1491
1492         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
1493         * pt.c (instantiate_decl): Defer comdat templates that might not be
1494         needed.
1495         
1496         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
1497         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
1498         (finish_file): Likewise.
1499
1500         * decl2.c (import_export_class): Undo 12/14 change.
1501
1502         * error.c (dump_decl): operator new, not operatornew.
1503
1504         * class.c (field_decl_cmp): A nontype is "greater" than a type.
1505         * search.c (lookup_field_1): Look for the last field with the
1506         desired name.
1507
1508 2000-01-05  Nathan Sidwell  <nathan@acm.org>
1509
1510         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
1511         FUNCTION_DECL.
1512
1513 2000-01-05  Nathan Sidwell  <nathan@acm.org>
1514
1515         * typeck.c (build_static_cast): Don't strip target qualifiers
1516         when casting from a class.
1517
1518 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1519
1520         * class.c (warn_hidden): Initialize variable `fndecl'.
1521
1522 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
1523
1524         * decl.c (flag_isoc9x): New variable to be able to use code in
1525         c-common.c.  For now always zero.
1526
1527 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
1528
1529         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
1530         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
1531         or unshare_base_binfos for virtual bases here.
1532         * search.c (dfs_get_vbase_types): Do it here.
1533         (get_vbase_types): Adjust.
1534         
1535 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
1536
1537         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
1538         (BINFO_PRIMARY_MARKED_P): Use flag 5.
1539         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
1540         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1541         (unmark_primary_bases): Remove declaration.
1542         (unmarkedp): Declare.
1543         (dfs_vbase_unmark): Likewise.
1544         * class.c (determine_primary_base): Return immediately if there
1545         are no base classes.  Call mark_primary_bases here.
1546         (modify_all_direct_vtables): Remove.
1547         (modify_all_indirect_vtables): Remove.
1548         (dfs_modify_vtables_queue_p): New function.     
1549         (dfs_modify_vtables): New function.
1550         (modify_all_vtables): Use them.
1551         (build_base_fields): Build FIELD_DECLs for primary virtual base
1552         classes.
1553         (create_vtable_ptr): Don't call determine_primary_base here.
1554         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
1555         (dfs_set_offset_for_vbases): ... this.
1556         (layout_virtual_bases): Use it.
1557         (layout_class_type): Call determine_primary_base here.
1558         * search.c (unmarkedp): Make it global.
1559         (shared_marked_p): Simplify.
1560         (shared_unmarked_p): Likewise.
1561         (dfs_primary_bases_queue_p): Remove.
1562         (dfs_unmark_primary_bases): Likewise.
1563         (unmark_primary_bases): Likewise.
1564         (mark_primary_bases): Simplify.
1565         (get_pure_virtuals): Don't call mark_primary_bases here.
1566         (dfs_vbase_unmark): New function.
1567         (get_vbase_types): Simplify.
1568
1569         * class.c (struct base_info): Remove.
1570         (determine_primary_base): Take has_virtual_p rather than a
1571         base_info as input.  Don't calculate max_has_virtual.
1572         (finish_struct_bits): Remove max_has_virtual argument.
1573         (create_vtable_ptr): Remove max_has_virtual_p argument.
1574         (layout_virtual_bases): Remove max argument.
1575         (layout_basetypes): Likewise.
1576         (layout_class_type): Remove max_has_virtual_p argument.
1577         (finish_struct_1): Remove max_has_virtual.
1578
1579         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
1580         (layout_basetypes): Remove.
1581         * class.c (propagate_binfo_offsets): Moved here from tree.c.
1582         Update to handle primary virtual bases.
1583         (remove_base_fields): New function, split out from
1584         layout_basetypes.
1585         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
1586         (layout_virtual_bases): New function, split out from
1587         layout_basetypes.  Update to handle primary virtual bases.
1588         (layout_basetypes): Moved here from tree.c.  Use
1589         remove_base_fields and layout_virtual_bases.
1590         * search.c (dfs_mark_primary_bases_queue_p): New function.
1591         (mark_primary_bases): Use it.
1592         * tree.c (CEIL): Remove.
1593         (propagate_binfo_offsets): Remove.
1594         (layout_basetypes): Remove.
1595         
1596 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
1597
1598         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
1599         (BINFO_PRIMARY_MARKED_P): New macro.
1600         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
1601         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1602         (mark_primary_bases): New function.
1603         (unmark_primary_bases): Likewise.
1604         * search.c (get_abstract_virtuals_1): Remove.
1605         (dfs_mark_primary_bases): New function.
1606         (mark_primary_bases): Likewise.
1607         (dfs_unmark_primary_bases): Likewise.
1608         (unmark_primary_bases): Likewise.
1609         (dfs_get_pure_virtuals): Likewise.
1610         
1611 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
1612
1613         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
1614         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
1615         (modify_one_vtable): Adjust.
1616         (fixup_vtable_deltas1): Likewise.
1617         (override_one_vtable): Likewise.
1618         * search.c (get_abstract_virtuals_1): Likewise.
1619         (get_pure_virtuals): Likewise.
1620         (expand_upcast_fixups): Likewise.
1621         * tree.c (debug_binfo): Likewise.
1622         
1623         * class.c (build_vtable): Don't return a value.  Don't rebuild
1624         vtables for bases that have already been handled.
1625         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
1626         already been handled.
1627         (modify_one_vtable): Adjust accordingly.
1628         (fixup_vtable_deltas1): Likewise.
1629         (finish_struct_1): Likewise.
1630
1631 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1632
1633         * call.c (build_new_method_call): Also check destructors.
1634
1635 1999-12-31  Mark Mitchell  <mark@codesourcery.com>
1636
1637         * cp-tree.h (VF_NORMAL_VALUE): Remove.
1638         * class.c (struct base_info): Remove vfield, vfields, and rtti.
1639         (set_primary_base): New function, split out from ...
1640         (finish_base_struct): ... here.  Rename to ...
1641         (determine_primary_base): ... this.  Simplify.
1642         (create_vtable_ptr): Tweak accordingly.
1643         (finish_struct_1): Simplify.
1644         
1645         * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
1646         (CLASSTYPE_N_BASECLASSES): Likewise.
1647         (BINFO_FOR_VBASE): New macro.
1648         (get_vbase_types): Change prototype.
1649         * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
1650         (prepare_fresh_vtable): Likewise.
1651         (finish_vtbls): Likewise.
1652         (get_class_offset_1): Likewise.
1653         (modify_all_indirect_vtables): Likewise.
1654         (build_vbase_pointer_fields): Likewise.
1655         * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
1656         * init.c (sort_base_init): Use BINFO_FOR_VBASE.
1657         (expand_member_init): Likewise.
1658         * search.c (get_base_distance): Likewise.
1659         (lookup_field_queue_p): Likewise.
1660         (virtual_context): Likewise.
1661         (get_vbase_types): Don't return a value.  Set
1662         CLASSTYPE_VBASECLASSES here.
1663         * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
1664         
1665 1999-12-30  Mark Mitchell  <mark@codesourcery.com>
1666
1667         * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
1668
1669 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
1670
1671         * class.c (create_vtable_ptr): Put the vtable at the beginning of
1672         the class, not the end, in the new ABI.
1673         * tree.c (propagate_binfo_offsets): Do the right thing for the new
1674         ABI.
1675
1676 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
1677
1678         * cp-tree.h (lang_type): Add nearly_empty_p.  Adjust dummy.
1679         (CLASSTYPE_NEARLY_EMPTY_P): New macro.
1680         * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
1681         (check_field_decls): Likewise.
1682         (check_bases_and_members): Likewise.
1683
1684 1999-12-28  Mark Mitchell  <mark@codesourcery.com>
1685
1686         * cp-tree.h (do_inline_function_hair): Remove.
1687         * class.c (layout_class_type): New function, split out from
1688         finish_struct_1.
1689         (fixup_pending_inline): Likewise.
1690         (fixup_inline_methods): New function.
1691         * method.c (fixup_pending_inline): Remove.
1692         (do_inline_function_hair): Likewise.
1693         
1694         * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
1695         new ABI.
1696         
1697         * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
1698         (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
1699         (CLASSTYPE_PURE_VIRTUALS): ... this.
1700         (lang_decl_flags): Replace abstract_virtual with pure_virtual.
1701         (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
1702         (DECL_PURE_VIRTUAL_P): ... this.
1703         (get_abstract_virtuals): Rename to ...
1704         (get_pure_virtuals): ... this.
1705         * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
1706         DECL_ABSTRACT_VIRTUAL_P.  Replace CLASSTYPE_ABSTRACT_VIRTUALS with
1707         CLASSTYPE_PURE_VIRTUALS.
1708         * class.c (build_vtable_entry): Likewise.
1709         (finish_struct_bits): Likewise.  Call get_pure_virtuals, not
1710         get_abstract_virtuals.
1711         (build_vtbl_initializer): Likewise.
1712         (override_one_vtable): Likewise.
1713         (check_methods): Likewise.
1714         * decl.c (duplicate_decls): Likewise.
1715         (redeclaration_error_message): Likewise.
1716         (lang_mark_tree): Likewise.
1717         * decl2.c (grok_function_init): Likewise.
1718         (import_export_vtable): Likewise.
1719         (import_expor_class): Likewise.
1720         * typeck2.c (abstract_virtuals_error): Likewise.
1721         * xref.c (GNU_xref_member): Likewise.
1722         * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
1723         
1724 1999-12-26  Zack Weinberg  <zack@wolery.cumb.org>
1725
1726         * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
1727         throughout.
1728
1729 1999-12-26  Mark Mitchell  <mark@codesourcery.com>
1730
1731         * decl.c (store_return_init): Use mode of old RTL generated for
1732         DECL_RESULT, not the mode of DECL_RESULT itself.
1733         * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
1734         for functions that used named return values.
1735         
1736 1999-12-24  Mark Mitchell  <mark@codesourcery.com>
1737
1738         * semantics.c (expand_body): Use
1739         note_deferral_of_defined_inline_function.
1740
1741 1999-12-22  Mark Mitchell  <mark@codesourcery.com>
1742
1743         * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
1744
1745 1999-12-22  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
1746
1747         * error.c (dump_decl): Support named return values.
1748
1749 1999-12-20  Mark Mitchell  <mark@codesourcery.com>
1750
1751         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
1752         (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
1753         (CLASSTYPE_PRIMARY_BINFO): Likewise.
1754         * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
1755         TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
1756         (check_bases_and_members): Set them here instead.
1757         (create_vtable_ptr): New function, split out from ...
1758         (finish_struct_1): ... here.  Use it.  Tidy.  Use
1759         CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
1760         * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
1761         the first field in the class.
1762         * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES.  Handle
1763         seeing TYPE_VFIELD as the first field in the class.
1764         
1765         * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
1766         (TYPE_POLYMORPHIC_P): ... this.
1767         (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
1768         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
1769         (TREE_CALLS_NEW): Remove.
1770         (TREE_MANGLED): Likewise.
1771         * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
1772         and TYPE_POLYMORPHIC_P.
1773         * class.c (check_bases): Likewise.
1774         (finish_base_struct): Likewise.
1775         (finish_struct_bits): Likewise.
1776         (check_for_override): Likewise.
1777         (finish_struct_1): Likewise.
1778         (get_vfield_name): Likewise.
1779         * decl.c (xref_basetypes): Likewise.
1780         * decl2.c (import_export_class): Likewise.
1781         (import_export_decl): Likewise.
1782         * error.c (dump_function_decl): Likewise.
1783         * pt.c (instantiate_class_template): Likewise.
1784         * repo.c (repo_inline_used): Likewise.
1785         * rtti.c (build_headof): Likewise.
1786         (get_tinfo_fn_dynamic): Likewise.
1787         (build_x_typeid): Likewise.
1788         (get_tinfo_var): Likewise.
1789         (build_dynamic_cast_1): Likewise.
1790         (synthesize_tinfo_fn): Likewise.
1791         * search.c (lookup_field_1): Likewise.
1792         (dfs_debug_mark): Likewise.
1793         (maybe_suppress_debug_info): Likewise.
1794         * typeck.c (build_component_ref): Likewise.
1795         (build_component_addr): Likewise.
1796         * typeck2.c (process_init_constructor): Likewise.
1797         
1798 1999-12-20  Nathan Sidwell  <nathan@acm.org>
1799
1800         * typeck.c (strip_all_pointer_quals): New static function.
1801         (build_static_cast): Use it. Don't use at_least_as_qualified_p.
1802
1803 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
1804
1805         * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
1806         (dso_handle_node): New macro.
1807         (flag_use_cxa_atexit): New variable.
1808         (declare_global_var): New function.
1809         (start_anon_func): Remove declaration.
1810         (end_anon_func): Likewise.
1811         * decl.c (get_atexit_node): New function, split out from
1812         destroy_local_static.  Handle flag_use_cxa_atexit.
1813         (get_dso_handle_node): Likewise.
1814         (start_cleanup_fn): Renamed from start_anon_func.  Moved here from
1815         except.c.  Handle flag_use_cxa_atexit.
1816         (end_cleanup_fn): Renamed from end_anon_func.  Moved here from
1817         except.c.
1818         (declare_global_var): New variable.
1819         (destroy_local_static): Handle flag_use_cxa_atexit.
1820         * decl2.c (flag_use_cxa_atexit): New variable.
1821         (lang_f_options): Likewise.
1822         * except.c (start_anon_func): Remove.
1823         (end_anon_func): Liekwise.
1824         * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
1825         * rtti.c (get_tinfo_var): Use declare_global_var.
1826
1827 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
1828
1829         * class.c (check_field_decls): Don't return a value.
1830         (avoid_overlap): Moved here from tree.c.
1831         (build_base_fields): Likewise.
1832         (check_bases): New function, split out from finish_base_struct.
1833         (check_bases_and_members): New function, split out from 
1834         finish_struct_1.
1835         (struct base_info): Remove cant_have_default_ctor,
1836         cant_have_const_ctor, cant_have_asn_ref.
1837         (finish_base_struct): Split semantic analysis into check_bases.
1838         (finish_struct_methods): Fix bogus assertion.
1839         (check_field_decls): Call finish_struct_anon here.
1840         (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
1841         (finish_struct_1): Use check_bases_and_members.  Reorganize.
1842         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
1843         (build_base_fields): Don't declare.
1844         * tree.c (avoid_overlap): Remove.
1845         (build_base_fields): Likewise.
1846         
1847         * optimize.c (struct inline_data): Remove scope_stmt.
1848         (remap_block): Don't use insert_block_after_note.  Don't update
1849         scope_stmt.
1850         (expand_call_inline): Don't update scope_stmt.
1851         (optimize_function): Don't initialize scope_stmt.
1852         * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
1853         NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
1854
1855 1999-12-15  Mark Mitchell  <mark@codesourcery.com>
1856
1857         * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
1858         out of the class, rather than taking them as parameters.
1859         (build_vbase_pointer_fields): Move here from tree.c.
1860         (build_vtbl_or_vbase_field): New function.
1861         (check_methods): Likewise.
1862         (remove_zero_width_bitfields): Likewise.
1863         (add_virtual_function): Use tree_cons instead of temp_tree_cons.
1864         (delete_duplicate_fields_1): Tidy.  Don't delete duplicate
1865         USING_DECLs here.
1866         (finish_struct_methods): Handle the case where there are no
1867         methods here.
1868         (get_basefndecls): Use tree_cons instead of temp_tree_cons.
1869         (check_field_decls): Call delete_duplicate_fields here.
1870         (finish_struct_1): Tidy.  Use check_methods and
1871         remove_zero_width_bitfields.
1872         * cp-tree.h (build_vbase_pointer_fields): Remove.
1873         * decl.c (grokdeclarator): Use tree_cons instead of
1874         temp_tree_cons.
1875         * decl2.c (qualified_lookup_using_namespace): Use tree_cons
1876         instead of temp_tree_cons.
1877         * lex.c (cons_up_default_function): Remove dead code.
1878         * method.c (fixup_pending_inline): New function, split out from ...
1879         (do_inline_function_hair): ... here.
1880         * tree.c (build_vbase_pointer_fields): Remove.
1881         
1882 1999-12-15  Jason Merrill  <jason@casey.cygnus.com>
1883
1884         * tree.c (walk_tree): Walk operand subtrees in forward order.
1885         * optimize.c (expand_call_inline): Likewise.
1886         (optimize_function): Initialize id->scope_stmt to something useful.
1887         (remap_block): Assume id->scope_stmt has a useful value.
1888
1889 1999-12-15  Nathan Sidwell  <nathan@acm.org>
1890
1891         * typeck.c (build_c_cast): Expand warning message. Move pointer
1892         alignment warning to after the cast. Don't warn about pointer
1893         alignment when given a pointer to incomplete.
1894
1895 1999-12-15  Richard Henderson  <rth@cygnus.com>
1896
1897         * cp-tree.h (make_aggr_type): Declare.
1898         * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
1899         (make_aggr_type): New.
1900
1901         * decl.c (build_typename_type, init_decl_processing): Use it.
1902         (build_ptrmemfunc_type, xref_tag): Likewise.
1903         * except.c (call_eh_info): Likewise.
1904         * init.c (init_init_processing): Likewise.
1905         * pt.c (process_template_parm, lookup_template_class): Likewise.
1906         * rtti.c (expand_class_desc): Likewise.
1907         * semantics.c (begin_class_definition, finish_typeof): Likewise.
1908         * tree.c (copy_template_template_parm): Likewise.
1909
1910 1999-12-15  Jason Merrill  <jason@yorick.cygnus.com>
1911
1912         * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
1913         sizeof (struct tree_common).
1914
1915 1999-12-14  Jason Merrill  <jason@casey.cygnus.com>
1916
1917         * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
1918         outermost block to point to the inlined function decl.
1919
1920         * error.c (dump_decl): operator==, not operator ==.
1921         (op_to_string): Likewise.
1922
1923         * decl.c (compute_array_index_type): Handle null name.
1924
1925         * decl2.c (ambiguous_decl): Fix to match comment.
1926         (lookup_using_namespace): Adjust.
1927
1928         * decl2.c (import_export_class): Don't ignore dllimport.
1929
1930 1999-12-14  Mark Mitchell  <mark@codesourcery.com>
1931
1932         * class.c (check_field_decls): Split out from ...
1933         (finish_struct_1): ... here.  Use it.  Tidy.
1934
1935         * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
1936         * optimize.c (copy_body_r): Pass it.
1937         * tree.c (remap_save_expr): Clear walk_subtrees for an
1938         already-handled SAVE_EXPR.
1939         (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
1940
1941         * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
1942         * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
1943
1944         * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
1945
1946 1999-12-14  Mumit Khan  <khan@xraylith.wisc.edu>
1947
1948         * class.c (finish_base_struct): Allow multiple COM base classes
1949         as well as non-COM bases as long as it's not the leftmost.
1950
1951 1999-12-13  Mumit Khan  <khan@xraylith.wisc.edu>
1952
1953         * lex.c (saving_parse_to_obstack): New global.
1954         (reinit_parse_for_block): Use.
1955         (reinit_parse_for_expr): Use.
1956         (check_newline): Use.
1957
1958 1999-12-13  Mark Mitchell  <mark@codesourcery.com>
1959
1960         * optimize.c (initialize_inlined_parameters): Take FN to which the
1961         parameters belong as an argument.
1962         (expand_call_inline): Expand calls into the parameter
1963         initializations before pushing the function onto the list of
1964         functions we are presently expanding.
1965
1966 1999-12-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1967
1968         * class.c (get_vtable_name): Use a literal format string and
1969         VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
1970         (prepare_fresh_vtable): Likewise.
1971
1972         * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
1973         VTABLE_NAME_FORMAT.
1974
1975         * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
1976
1977         * init.c (build_vec_init): Initialize variable `try_body'.
1978
1979         * lex.c (yyerror): Don't call a variadic function with a
1980         non-literal format string.
1981
1982         * optimize.c (optimize_function): Call memset, not bzero.
1983
1984         * pt.c (for_each_template_parm_r): Add static prototype.
1985
1986 1999-12-09  Andreas Jaeger  <aj@suse.de>
1987
1988         * except.c (expand_throw): Add static attribute to match
1989         prototype.
1990
1991         * Makefile.in (semantics.o): Add dependency on output.h.
1992         * semantics.c: Include output.h for declaration of
1993         make_function_rtl.
1994
1995 1999-12-09  Mark Mitchell  <mark@codesourcery.com>
1996
1997         * decl.c (init_decl_processing): Reenable inlining on trees.
1998         (finish_function): Likewise.
1999         * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
2000         * semantics.c (simplify_aggr_init_exprs): New function.
2001         (expand_body): Use it.
2002         * tree.c (walk_tree): Special-case TARGET_EXPRs since they
2003         sometimes present the same sub-tree twice.
2004         
2005         * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
2006         `csl'.
2007
2008         * semantics.c (finish_switch_cond): Do conversions here, not ...
2009         * typeck.c (c_expand_start_case): Here.
2010
2011         * semantics.c (do_poplevel): Remove unused variable.
2012         
2013 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
2014
2015         * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
2016         unless we're declaring the variable in question.
2017
2018 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
2019
2020         * decl.c (init_decl_processing): #if 0 last patch.
2021         (finish_function): Likewise.
2022
2023 1999-12-05  Mark Mitchell  <mark@codesourcery.com>
2024
2025         * decl.c (init_decl_processing): Set flag_inline_trees if
2026         !flag_no_inline.
2027
2028         * cp-tree.h (calls_setjmp_p): Declare.
2029         * decl.c (finish_function): Mark functions that call setjmp as
2030         uninlinable.
2031         * optimize.c (calls_setjmp_r): New function.
2032         (calls_setjmp_p): Likewise.
2033
2034 1999-12-04  Mark Mitchell  <mark@codesourcery.com>
2035
2036         * optimize.c (expand_call_inline): Wrap the expanded call in an
2037         EXPR_WITH_FILE_LOCATION node to get correct line numbers for
2038         inlined functions.
2039
2040         * optimize.c (inline_data): Remove fns_top.  Add scope_stmt.  Add
2041         in_target_cleanup_p.
2042         (remap_decl): New function.
2043         (remap_block): Likewise.
2044         (copy_scope_stmt): Likewise.
2045         (copy_body_r): Use remap_decl and copy_scope_stmt.
2046         (copy_body): Use VARRAY_TOP_TREE.
2047         (initialize_inlined_parameters): Likewise.
2048         (declare_return_variable): Likewise.
2049         (inlinable_function_p): Check flag_inline_trees.
2050         (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
2051         specially.  Use VARRAY_PUSH_TREE.  Create a BLOCK for the
2052         parameters of the inlined function.
2053         (optimize_function): Prevent recursion into partially complete
2054         functions.
2055         
2056         * cp-tree.def (SCOPE_STMT): Take one operand.
2057         * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
2058         (SCOPE_NULLIFIED_P): Redefine.
2059         (SCOPE_NO_CLEANUPS_P): New macro.
2060         (add_scope_stmt): Change prototype.
2061         * decl.c (poplevel): Tidy.  Warn about unused variables here.
2062         Record SCOPE_STMT_BLOCKs.
2063         (finish_function): Keep DECL_INITIAL for functions that might be
2064         inlined.
2065         * ir.texi: Document SCOPE_NO_CLEANUPS_P.
2066         * semantics.c: Include rtl.h.
2067         (add_scope_stmt): Return the new scope statement and, for an
2068         end-of-scope statement, its matching begin statement.  Don't set
2069         SCOPE_NULLIFIED_P.
2070         (do_pushlevel): Simplify, now that we are always
2071         function-at-a-time.
2072         (do_poplevel): Likewise.  Record SCOPE_STMT_BLOCKs.
2073         (expand_stmt): Don't call expand_start_bindings or
2074         expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
2075         * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
2076         SCOPE_NULLIFIED_P.
2077         * Makefile.in (semantics.o): Depend on RTL_H.
2078         
2079         * decl2.c (pending_statics_used): Make it a macro.
2080         (saved_inlines_used): Likewise.
2081         (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
2082         (mark_inline_for_output): Likewise.
2083         (ssdf_decls_used): Remove.
2084         (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
2085         (generate_ctor_or_dtor_function): Adjust accordingly.
2086         
2087 1999-11-24  Geoffrey Keating  <geoffk@cygnus.com>
2088             Greg McGary  <gkm@gnu.org>
2089
2090         * decl.c (duplicate_decls): Merge
2091         DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
2092         DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
2093
2094 1999-12-02  Mike Stump  <mrs@wrs.com>
2095
2096         * init.c (perform_member_init): Handle parse errors better.
2097
2098 1999-12-01  Mark Mitchell  <mark@codesourcery.com>
2099
2100         * cp-tree.h (min_tree_cons): Remove.
2101         (scratch_ovl_cons): Likewise.
2102         * decl.c (saveable_obstack): Don't declare.
2103         (duplicate_decls): Tweak error-message.
2104         (initialize_local_var): Explicitly mark the definition as static.
2105         (finish_function): Call permanent_allocation, just so
2106         that the middle-end sees the obstacks it expects.
2107         (mark_cp_function_context): Likewise.
2108         * init.c (build_new): Don't use min_tree_cons.
2109         * lex.c (permanent_obstack): Don't declare.
2110         (current_obstack, saveable_obstack): Likewise.
2111         * spew.c (current_obstack, saveable_obstack): Likewise.
2112         * tree.c (current_obstack, saveable_obstack): Likewise.
2113         (scratch_ovl_cons): Remove.
2114         (build_min_nt): Don't mess with obstacks.
2115         (build_min): Likewise.
2116         (min_tree_cons): Remove
2117         * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
2118         (build_x_function_call): Likewise.
2119         (build_c_cast): Don't use min_tree_cons.
2120         
2121 1999-11-29  Mark Mitchell  <mark@codesourcery.com>
2122
2123         * pt.c (tsubst_decl): Robustify.
2124
2125 1999-11-27  Mark Mitchell  <mark@codesourcery.com>
2126
2127         * decl2.c (finish_file): Call expand_body for inline functions
2128         that will be written out but that do not yet have RTL.
2129         * semantics.c (expand_body): Do not generate RTL For inline
2130         functions that do not yet need to be written out.
2131
2132 1999-11-25  Mark Mitchell  <mark@codesourcery.com>
2133
2134         * Make-lang.in (CXX_SRCS): Add optimize.c.  
2135         * Makefile.in (CXX_OBJS): Add optimize.o.
2136         (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
2137         (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
2138         (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
2139         (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
2140         (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
2141         (dump.o): Likewise.
2142         (optimize.o): New target.  
2143         * class.c: Don't include splay-tree.h.
2144         * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.  
2145         * cp-tree.h: Include splay-tree.h.
2146         (DECL_UNINLINABLE): New macro.
2147         (CTOR_BEGIN_P, CTOR_END_P): New macros.
2148         (flag_inline_trees): New variable.
2149         (local_variable_p): New function.
2150         (nonstatic_local_decl_p): Likewise.
2151         (optimize_function): Likewise.
2152         (cplus_unsave_expr_now): Remove.
2153         (copy_tree_r): Declare.
2154         (remap_save_expr): Likewise.  
2155         * decl.c (local_variable_p): Don't
2156         make it static.
2157         (local_variable_p_walkfn): New function.
2158         (make_rtl_for_local_static): Remove code to try to avoid writing
2159         out static constants.
2160         (emit_local_var): Fix indentation.
2161         (nonstatic_local_decl_p): New function.
2162         (check_default_argument): Use local_variable_p_walkfn, not
2163         local_variable_p, when walking the tree.
2164         (start_function): Set the DECL_CONTEXT for automatically generated
2165         labels.
2166         (finish_constructor_body): Use CTOR_STMT to mark the end of a
2167         constructor.  
2168         * decl2.c: Don't include splay-tree.h.
2169         (flag_inline_trees): Define.  
2170         * dump.c: Don't include
2171         splay-tree.h.  
2172         * except.c (expand_end_catch_block): Fix comment formatting.
2173         (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
2174         (expand_throw): Tidy comment.  
2175         * init.c (build_vec_delete_1): Use create_temporary_var.  
2176         * lex.c (cplus_tree_code_type): Make it static.
2177         (cplus_tree_code_length): Likewise.
2178         (cplus_tree_code_name): Likewise.  
2179         * optimize.c: New file.  
2180         * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
2181         with computed gotos.
2182         (setup_vtbl_ptr): Mark the beginnings of constructors with
2183         CTOR_STMT.
2184         (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
2185         (expand_body): Call optimize_function.  Save bodies if we're doing
2186         inlining on trees.
2187         * tree.c: Don't include splay-tree.h.  Include insn-config.h and
2188         integrate.h.
2189         (copy_tree_r): Make it public.
2190         (statement_code_p): New function.
2191         (mark_local_for_remap_r): Likewise.
2192         (cp_usave_r): Likewise.
2193         (cp_unsave): Likewise.
2194         (build_cplus_new): Set DECL_CONTEXT for temporary variables.
2195         (walk_tree): Walk into `s' class nodes.  Walk statement chains.
2196         (copy_tree_r): Handle 's' class nodes.  Restore chains for
2197         statements.  Nullify scopes.  Don't copy types.
2198         (init_tree): Set lang_unsave to cp_unsave.
2199         (remap_save_expr): Define.
2200         * ir.texi: Document CTOR_STMT.
2201         
2202 1999-11-24  Jason Merrill  <jason@casey.cygnus.com>
2203
2204         * search.c (note_debug_info_needed): Do perform this optimization
2205         for dwarf2.  
2206         (maybe_suppress_debug_info): Likewise.  Start by clearing
2207         TYPE_DECL_SUPPRESS_DEBUG.
2208
2209 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
2210
2211         * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
2212
2213         * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
2214
2215 1999-11-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2216
2217         * decl.c (pushdecl, grokdeclarator): Don't call a variadic
2218         function with a non-literal format string.
2219
2220         * lex.c (do_identifier): Likewise.
2221
2222         * typeck.c (build_unary_op): Likewise.
2223
2224 1999-11-23  Mark Mitchell  <mark@codesourcery.com>
2225
2226         * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
2227
2228 1999-11-22  Mark Mitchell  <mark@codesourcery.com>
2229
2230         * cp-tree.def (CTOR_COMPLETE): New tree node.
2231         * decl.c (finish_constructor_body): Add it, to mark the end of the
2232         constructor.
2233         (finish_function): Don't call end_protect_partials here.
2234         * ir.texi (CTOR_COMPLETE): Document it.
2235         * semantics.c (expand_stmt): Handle it.
2236         
2237         * cp-tree.def (FUNCTION_NAME): New tree node.
2238         * cp-tree.h (current_function_name_declared): Tweak documentation.
2239         (lang_decl_flags): Add pretty_function_p, adjust dummy.
2240         (DECL_PRETTY_FUNCTION_P): New macro.
2241         * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
2242         etc., in a template function.  Use at_function_scope_p instead of
2243         expanding it inline.
2244         * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
2245         specially.
2246         (tsubst): Handle FUNCTION_NAME.
2247         (tsubst_copy): Likewise.
2248         (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
2249         etc. in instantiation.
2250         * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
2251         even in template functions.
2252         (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
2253         conditional scope at the top of a destructor.
2254         
2255         * error.c (dump_function_decl): Use `[ with ... ]' syntax for
2256         specializations too.
2257
2258 1999-11-22  Nathan Sidwell  <nathan@acm.org>
2259
2260         * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
2261         when actually negative.
2262
2263         * typeck.c (convert_for_assignment): Expand comment about
2264         strange NULL check, moved from ...
2265         (convert_for_initialization): ... here. Remove unneeded
2266         code.
2267
2268 1999-11-21  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
2269
2270         * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
2271         * init.c (build_vec_delete, build_vec_delete_1): Likewise.
2272         Always destruct virtual bases of array components, but never
2273         delete them.
2274         (build_vec_init): Adjust invocations.
2275         (build_delete): Likewise.
2276         * decl2.c (delete_sanity): Likewise.
2277
2278 1999-11-19  Nathan Sidwell  <nathan@acm.org>
2279
2280         * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
2281         * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
2282         * decl2.c (grok_method_quals): Accept `restrict' as applying to
2283         the object pointer. Return such qualifiers.
2284         (grokclassfn): Apply this pointer qualifiers. Cleanup unused
2285         variables.
2286
2287 1999-11-18  Mark Mitchell  <mark@codesourcery.com>
2288
2289         * except.c (expand_end_catch_block): Fix typo.
2290         (expand_exception_blocks): Simplify.  Don't call
2291         expand_leftover_cleanups.
2292
2293 1999-11-15  Jason Merrill  <jason@casey.cygnus.com>
2294
2295         * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
2296         * pt.c (tsubst, case INTEGER_TYPE): Call it.  
2297         Check uses_template_parms.
2298
2299         * class.c (finish_struct): If we're a local class in a template
2300         function, add a TAG_DEFN.
2301         * pt.c (lookup_template_class): If this is a local class in a
2302         template function, call pushtag.
2303         (tsubst_expr, case TAG_DEFN): Handle classes, too.
2304
2305         Emit debug info with the vtable.
2306         * search.c (maybe_suppress_debug_info): New function...
2307         * class.c (finish_struct_1): ...split out from here.
2308         * cp-tree.h: Declare it.
2309         * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
2310         if we're writing out the vtable.
2311         * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, 
2312         note_debug_info_needed): #if 0 out.
2313
2314 1999-11-14  Mark Mitchell  <mark@codesourcery.com>
2315
2316         * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
2317         * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
2318         TREE_PERMANENT.
2319         * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
2320         * decl2.c (lookup_arg_dependent): Use it.
2321         
2322         * cp-tree.h (cp_finish_decl): Change prototype.
2323         (finish_static_data_member_decl): Likewise.
2324         (push_permanent_obstack): Remove declaration.
2325         (push_expression_obstack): Likewise.
2326         (push_scratch_obstack): Likewise.
2327         (DECL_TEMPLATE_PARM_P): Robustify.
2328         (SET_DECL_TEMPLATE_PARM_P): New macro.
2329         * class.c (add_method): Don't manipulate obstacks.
2330         (finish_vtbls): Likewise.
2331         * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
2332         * decl.c (binding_for_name): Don't manipulate obstacks.
2333         (maybe_push_to_top_level): Likewise.
2334         (pop_from_top_level): Likewise.
2335         (duplicate_decls): Likewise.
2336         (pushdecl): Likewise.
2337         (implicitly_declare): Likewise.
2338         (build_typename_type): Likewise.
2339         (start_decl): Likewise.
2340         (cp_finish_decl): Likewise.
2341         (finish_decl): Likewise.
2342         (destroy_local_static): Likewise.
2343         (expand_static_init): Likewise.
2344         (complete_array_type): Likewise.
2345         (grokvardecl): Likewise.
2346         (build_ptrmemfnc_type): Likewise.
2347         (grokdeclarator): Likewise.
2348         (xref_tag): Likewise.
2349         (xref_basetypes): Likewise.
2350         (start_enum): Likewise.
2351         (finish_enum): Likewise.
2352         (start_function): Likewise.
2353         (finish_function): Likewise.
2354         (start_method): Adjust call to cp_finish_decl.
2355         * decl2.c (finish_static_data_member_decl): Don't manipulate
2356         obstacks.
2357         (grokfield): Likewise.
2358         (grokbitfield): Likewise.
2359         (get_temp_name): Likewise.
2360         (get_sentry): Likewise.
2361         (fnish_file): Likewise.
2362         (lookup_arg_dependent): Likewise.
2363         * except.c (call_eh_info): Likewise.
2364         (push_eh_info): Likewise.
2365         (do_pop_exception): Likewise.
2366         (initialize_handler_parm): Likewise.
2367         (expand_end_eh_spec): Likewise.
2368         (alloc_eh_object): Likewise.
2369         (expand_throw): Likewise.
2370         * expr.c (extract_scalar_init): Likewise.
2371         * init.c (build_java_class_ref): Likewise.
2372         * lex.c (get_time_identifier): Likewise.
2373         (snarf_defarg): Likewise.
2374         (add_defarg_fn): Likewise.
2375         (is_global): Simplify.
2376         (do_identifier): Don't check TREE_PERMANENT.
2377         * method.c (emit_thunk): Don't manipulate obstacks.
2378         * parse.y (condition): Adjust call to cp_finish_decl.
2379         (primary): Likewise.
2380         (initdcl): Likewise.
2381         (initdcl0_innards): Likewise.
2382         (nomods_initdcl0): Likewise.
2383         * pt.c (push_inline_template_parms_recursive): Use
2384         SET_DECL_TEMPLATE_PARM_P.
2385         (process_template_parm): Likewise.
2386         (lookup_template_class): Don't manipulate obstacks.
2387         (instantiate_class_template): Adjust call to
2388         finish_static_data_member_decl.
2389         (tsubst_decl): Don't manipulate obstacks.
2390         (tsubst_expr): Likewise.
2391         (instantiate_template): Likewise.
2392         (instantiate_decl): Adjust calls to cp_finish_decl.
2393         * rtti.c (call_void_fn): Don't manipulate obstacks.
2394         (get_tinfo_var): Likewise.
2395         (get_tinfo_fn_unused): Likewise.
2396         (build_dynamic_cast_1): Likewise.
2397         (expand_si_desc): Likewise.
2398         (expand_class_desc): Likewise.
2399         (expand_ptr_desc): Likewise.
2400         (expand_attr_desc): Likewise.
2401         (expand_generic_desc): Likewise.
2402         (synthesize_tinfo_fn): Likewise.
2403         * search.c (expand_upcast_fixups): Likewise.
2404         * semantics.c (finish_asm_stmt): Likewise.
2405         (finish_named_return_value): Likewise.
2406         (begin_class_definition): Likewise.
2407         (finish_class_definition): Likewise.
2408         (finish_typeof): Likewise.
2409         * tree.c (build_cplus_method_type): Likewise.
2410         (reverse_path): Likewise.
2411         (copy_template_template_parm): Likewise.
2412         (build_expr_ptr_wrapper): Likewise.
2413         (push_expression_obstack): Remove.
2414         (push_permanent_obstack): Likewise.
2415         * typeck.c (mark_addressable): Likewise.
2416         
2417 1999-11-13  Mark Mitchell  <mark@codesourcery.com>
2418
2419         * call.c (build_conditional_expr): Use build_target_expr_with_type.
2420         (convert_like): Likewise.
2421         (build_over_call): Likewise.
2422         * cp-tree.h (build_target_expr): Remove.
2423         (build_target_expr_with_type): New function.
2424         * cvt.c (build_up_reference): Use get_target_expr.
2425         * decl.c (build_target_expr): Move to ...
2426         * tree.c (build_target_expr): Here.  Make it static.
2427         (build_target_expr_with_type): New function.  Set DECL_CONTEXT on
2428         the temporary VAR_DECLs.
2429         (get_target_expr): Use it.
2430
2431 1999-11-13  Jason Merrill  <jason@yorick.cygnus.com>
2432
2433         * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
2434         * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
2435         * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
2436         * class.c (set_rtti_entry): Use it.
2437
2438 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
2439
2440         * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
2441         here.
2442         * semantics.c (finish_expr_stmt): Call it here instead.  Move
2443         default_conversion logic to semantic-analysis time.
2444
2445 1999-11-12  Jason Merrill  <jason@yorick.cygnus.com>
2446
2447         * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
2448
2449 Fri Nov 12 12:56:32 MST 1999    Diego Novillo <dnovillo@cygnus.com>
2450
2451         * init.c (init_init_processing): Re-instated Nov 11 patch after
2452         approval.
2453
2454 Fri Nov 12 10:42:02 MST 1999    Diego Novillo <dnovillo@cygnus.com>
2455
2456         * init.c (init_init_processing): Undo patch from Nov 11, 1999.
2457         Patch had not been approved yet.
2458
2459 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
2460
2461         * decl.c (compute_array_index_type): New function, split out from
2462         grokdeclarator.
2463         (create_array_type_for_decl): Likewise.
2464         (grokdeclarator): Use them.
2465
2466         * semantics.c (expand_stmt): Don't suspend_momentary or
2467         resume_momentary.
2468
2469 Thu Nov 11 12:42:11 MST 1999    Diego Novillo <dnovillo@cygnus.com>
2470
2471         * init.c (init_init_processing): Header information for
2472         arrays allocated via `new' should have the same alignment used by
2473         malloc.
2474
2475 1999-11-10  Mark Mitchell  <mark@codesourcery.com>
2476
2477         * error.c (dump_function_name): Don't crash if given a friend
2478         pseudo-instantiation.
2479
2480         * cp-tree.h (build_enumerator): Change prototype.
2481         * decl.c (enum_next_value): Remove.
2482         (enum_overflow): Likewise.
2483         (init_decl_processing): Don't register enum_next_value as a root.
2484         (start_enum): Clear TYPE_VALUES for a redefined enum.
2485         (finish_enum): Reset the type of enumeration constants.
2486         (build_enumerator): Fix indentation.  Don't copy CONST_DECLs when
2487         we don't need to.  Maintain the TYPE_VALUES list and look there
2488         for the previously defined enumeration constant.  Let enumeration
2489         constants have the type of their values until the enumeration type
2490         is complete.
2491         * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
2492         (structsp): Adjust.
2493         * parse.c: Regenerated.
2494         * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
2495         
2496 Wed Nov 10 12:43:21 1999  Philippe De Muyter  <phdm@macqel.be>
2497                           Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2498
2499         * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
2500
2501 1999-11-09  Mark Mitchell  <mark@codesourcery.com>
2502
2503         * cp-tree.h (language_function): Remove x_last_dtor_insn and
2504         x_last_parm_cleanup_insn.
2505         * decl.c (last_dtor_insn): Remove.
2506         (last_parm_cleanup_insn): Likewise.
2507         (expand_start_early_try_stmts): Don't set them.
2508         (store_parm_decls): Likewise.
2509         (save_function_data): Or save them.
2510         (mark_lang_function): Or mark them.
2511
2512 1999-11-08  Mark Mitchell  <mark@codesourcery.com>
2513
2514         * decl.c (store_parm_decls): Generate cleanup code at
2515         semantic-analysis time.  Destroy objects in the correct order.
2516
2517 1999-11-07  Mark Mitchell  <mark@codesourcery.com>
2518
2519         * cp-tree.h (begin_new_placement): Remove.
2520         (finish_new_placement): Likewise.
2521         * class.c (finish_struct_1): Don't suspend_momentary or
2522         resume_momentary.
2523         * decl.c (grokdeclarator): Likewise.
2524         (maybe_build_cleanup_1): Likewise.
2525         * except.c (push_eh_cleanup): Likewise.
2526         (build_terminate_handler): Likewise.
2527         * init.c (build_new_1): Likewise.
2528         * parse.y (parse_decl): Change prototype.
2529         (initdecls, notype_initdecls, initdcl): Don't return int.
2530         (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
2531         (.begin_new_placement): Remove.
2532         (.finish_new_placement): Likewise.
2533         (nonmomentary_expr): Likewise.
2534         (suspend_mom): Likewise.
2535         (condition): Don't suspend_momentary, resume_momentary, or keep
2536         track of need to resume.
2537         (unary_expr): Likewise.
2538         (new_placement): Likewise.
2539         (decl): Likewise.
2540         (structsp): Likewise.
2541         (new_type_id): Likewise.
2542         (maybe_parmlist): Likewise.
2543         (direct_after_type_declaration): Likewise.
2544         (direct_new_declarator): Likewise.
2545         (direct_abstract_declaration): Likewise.
2546         * parse.c: Regenerated.
2547         * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
2548         * semantics.c (begin_new_placement): Remove.
2549         (finish_new_placement): Likewise.
2550         
2551 1999-11-05  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2552
2553         * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
2554         (DECL_TEMPLATE_INFO): Use it.
2555         * decl.c (warn_extern_redeclared_static): Do nothing for
2556         TEMPLATE_DECLs.
2557         * decl2.c (mark_used): Explicitly check for function or variable.
2558         * semantics.c (finish_unary_op_expr): Check whether result is also
2559         an INTEGER_CST.
2560
2561 1999-11-05  Mark Mitchell  <mark@codesourcery.com>
2562
2563         * Makefile.in (typeck2.o): Depend on output.h.
2564         * typeck2.c: Include output.h.
2565
2566         * decl.c (flag_ansi): Remove declaration.
2567
2568         * pt.c (tinst_level_tick): Make it static.
2569         (last_template_error_tick): Likewise.
2570         
2571         * cp-tree.h (mapcar): Remove declaration.
2572         (search_tree): Likewise.
2573         (walk_tree_fn): New typedef.
2574         (walk_tree): New function.
2575         * tree.c (bot_manip): Change prototype.  Adjust to be called via
2576         walk_tree.
2577         (bot_replace): Likewise.
2578         (no_linkage_helper): Likewise.
2579         (copy_tree_r): New function.
2580         (search_tree): Rename, and adjust, to become ...
2581         (walk_tree): New function.
2582         (mapcar): Remove.
2583         (target_remap): Remove.
2584         (target_remap_count): Likewise.
2585         (break_out_target_exprs): Use walk_tree.
2586         * decl.c (local_variable_p): Change prototype.
2587         (check_default_argument): Use walk_tree.
2588         * pt.c (for_each_template_parm_r): New function, split out from ...
2589         (for_each_template_parm): Here.  Use it, via walk_tree.
2590         
2591 1999-11-03  Mark Mitchell  <mark@codesourcery.com>
2592
2593         * class.c (check_bitfield_decl): New function, split out from
2594         finish_stuct_1.
2595         (check_field_decl): Likewise.  Recursively examine members of
2596         anonymous structs.
2597         (finish_struct_1): Use them.
2598         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
2599         
2600 1999-11-02  Mark Mitchell  <mark@codesourcery.com>
2601
2602         * decl.c (grokfndecl): Remove dead code.
2603
2604         * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
2605
2606 1999-11-02  Scott Snyder  <snyder@fnal.gov>
2607
2608         * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
2609         IMAGPART_EXPR.
2610         * pt.c (tsubst_copy): Likewise.
2611
2612 1999-11-01  Jason Merrill  <jason@yorick.cygnus.com>
2613
2614         * decl2.c (maybe_make_one_only): Always make things comdat on
2615         ELF targets, too.
2616
2617 1999-10-31  Mark Mitchell  <mark@codesourcery.com>
2618
2619         * decl.c (finish_function): Call free_after_parsing for functions
2620         we are not immediately turning into RTL.
2621
2622 1999-10-31  Brendan Kehoe  <brendan@cygnus.com>
2623
2624         * cp-tree.h (flag_dump_translation_unit): Add decl.
2625
2626 Sat Oct 30 22:42:50 1999  Stephen L Moshier <moshier@mediaone.net>
2627
2628         * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
2629
2630 1999-10-30  Mark Mitchell  <mark@codesourcery.com>
2631
2632         * decl.c (pop_cp_function_context): Don't call free on a NULL
2633         pointer.
2634         * semantics.c: Include ggc.h.
2635         (expand_body): Do garbage-collection after processing a template
2636         function.  Clear DECL_SAVED_TREE after generating RTL for a
2637         function.
2638         * Makefile.in (semantics.o): Depend on ggc.h.
2639         
2640 1999-10-29  Mark Mitchell  <mark@codesourcery.com>
2641
2642         * cp-tree.h (make_typename_type): Change prototype.
2643         * decl.c (make_typename_type): Only complain if so requested.
2644         * parse.y (nested_name_specifier): Adjust calls.
2645         (typename_sub0): Likewise.
2646         (typename_sub1): Likewise.
2647         * parse.c: Regenerated.
2648         * pt.c (convert_template_argument): Pass complain to
2649         make_typename_type.
2650         (tsubst): Likewise.
2651         
2652 1999-10-28  Mark Mitchell  <mark@codesourcery.com>
2653
2654         * semantics.c (finish_handler): End the scope of the handler
2655         before attaching it to the statement-tree.
2656
2657 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
2658
2659         * rtti.c (build_dynamic_cast_1): Give a better error message for
2660         an attempt to dynamic_cast from a non-polymorphic type.
2661
2662 1999-10-27  Mark Mitchell  <mark@codesourcery.com>
2663
2664         * cp-tree.h (make_temp_vec): Remove.
2665         (make_scratch_vec): Likewise.
2666         * call.c (add_function_candidate): Use make_tree_vec.
2667         (add_conv_candidate): Likewise.
2668         (build_builtin_candidate): Likewise.
2669         (add_template_candidate_real): Likewise.
2670         * class.c (resolve_address_of_overloaded_function): Likewise.
2671         * decl.c (start_function): Don't fool with the momentary obstack.
2672         (finish_function): Likewise.
2673         * init.c (expand_direct_vtbls_init): Likewise.
2674         (begin_init_stmts): Likewise.
2675         (finish_init_stmts): Likewise.
2676         * pt.c (add_to_template_args): Use make_tree_vec.
2677         (check_explicit_specialization): Likewise.
2678         (coerce_template_parms): Likewise.
2679         (lookup_template_class): Don't fool with the momentary obstack.
2680         (instantiate_class_template): Likewise.
2681         (tsubst_template_arg_vector): Use make_tree_vec.
2682         (tsubst_aggr_type): Don't fool with the momentary obstack.
2683         (tsubst_decl): Likewise.  Use make_tree_vec.
2684         (try_one_overload): Likewise.
2685         (try_class_unification):  Don't fool with the momentary obstack.
2686         (get_bindings_real): Use make_tree_vec.
2687         (set_mangled_name_for_template_decl): Likewise.
2688         * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
2689         * semantics.c (finish_expr_stmt): Likewise.
2690         (finish_do_stmt): Likewise.
2691         (finish_for_expr): Likewise.
2692         (finish_switch_cond): Likewise.
2693         (do_pushlevel): Likewise.
2694         (do_poplevel): Likewise.
2695         * tree.c (make_temp_vec): Remove.
2696         
2697         * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.  Dump
2698         CLEANUP_P for a TRY_BLOCK.
2699         * ir.texi: Document SAVE_EXPR.
2700
2701 Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
2702
2703         * call.c (build_over_call):  Check that the built-in function is
2704         of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
2705         * typeck.c (build_function_call_real): Similarly. 
2706
2707 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
2708
2709         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
2710         remember_end_note.
2711
2712 1999-10-24  Mark Mitchell  <mark@codesourcery.com>
2713
2714         * decl.c (push_overloaded_decl_1): Use pushdecl.
2715         
2716         * decl.c (auto_function): Replace #ifdef'd __inline with just
2717         plain inline.
2718         * lex.c (my_get_run_time): Likeise.
2719         (yyprint): Likewise.
2720         (identifier_type): Likewise.
2721         * method.c (start_squangling): Likewise.
2722         (end_squangling): Likewise.
2723         (icat): Likewise.
2724         (old_backref_index): Likewise.
2725         (flush_repeats): Likewise.
2726         (issue_ktype): Likewise.
2727         * parse.y (empty_parms): Likewise.
2728         * parse.c: Regenerated.
2729         
2730 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
2731
2732         * dump.c (dequeue_and_dump): Replace several uses of
2733         queue_and_dump_index with dump_child.
2734
2735 1999-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2736
2737         * expr.c: Include tm_p.h.
2738
2739 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
2740
2741         * cp-tree.h (SCOPE_PARTIAL_P): New macro.
2742         (pushlevel_temporary): Remove.
2743         (add_scope_stmt): New function.
2744         * decl.c (pushlevel_temporary): Remove.
2745         (poplevel): Use add_scope_stmt.
2746         (start_decl_1): Likewise.
2747         * semantics.c (add_scope_stmt): New function.
2748         (do_pushlevel): Use it.
2749         (do_poplevel): Use it.
2750         (expand_stmt): Check SCOPE_PARTIAL_P.
2751         
2752         * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
2753         * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
2754         * expr.c (cplus_expand_expr): Expand it.
2755         * ir.texi: Document EMPTY_CLASS_EXPR.
2756         
2757 1999-10-20  Mark Mitchell  <mark@codesourcery.com>
2758
2759         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
2760         parameters as having namespace scope.
2761
2762 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
2763
2764         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
2765         (mangling_flags): New type.
2766         (build_overload_int): Change prototype.
2767         (build_overload_value): Likewise.
2768         (numeric_output_need_bar): Improve comment.
2769         (mangle_expression): New function, broken out from ...
2770         (build_overload_int): Here.
2771         (build_overload_value): Adjust for use of mangling flags.  Don't
2772         warn about real-valued template parameters here.  Do handle
2773         complex expressions involving real-valued template parameters.
2774         (build_template_parm_names): Encase non-type template parameters
2775         in underscores, if necessary.
2776         (process_overload_item): Remove conditional on
2777         PARM_CAN_BE_ARRAY_TYPE.
2778
2779 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
2780
2781         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
2782
2783         * ir.texi: Clean up documentation of RETURN_INIT.
2784         
2785 1999-10-15  Greg McGary  <gkm@gnu.org>
2786
2787         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
2788         (lang_init): Set default for flag_bounds_check if still "unspecified".
2789
2790 1999-10-13  Andrew Haley  <aph@cygnus.com>
2791
2792         * class.c (finish_struct_1): Force alignment of non-bitfields to
2793         BITS_PER_UNIT.
2794
2795 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
2796
2797         * typeck2.c (process_init_constructor): Handle empty constructors.
2798
2799 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
2800
2801         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
2802
2803         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
2804         array error.
2805
2806 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
2807
2808         * decl.c (make_rtl_for_local_static): Don't create register RTL
2809         for addressable constants.
2810
2811 1999-10-13  Nathan Sidwell  <nathan@acm.org>
2812
2813         * cp-tree.h (build_x_va_arg): Prototype new function.
2814         * call.c (build_x_va_arg): Define it.
2815         * parse.y (unary_expr): Call build_x_va_arg.
2816         
2817         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
2818         * call.c (convert_type_from_ellipsis): Define it.
2819         * decl.c (init_decl_processing): Set lang_type_promotes_to.
2820
2821         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
2822
2823 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
2824
2825         * class.c (fixed_type_or_null): Always set *nonnull.
2826
2827 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2828
2829         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
2830         __GNUC__ and __GNUC_MINOR__.
2831
2832 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
2833
2834         * cp-tree.h (make_rtl_for_local_static): New function.  
2835         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
2836         local statics ...
2837         (make_rtl_for_local_static): Here.
2838         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
2839         
2840 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2841
2842         * method.c: Include tm_p.h.
2843
2844 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
2845
2846         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
2847         * lex.c (cp_make_lake_type): Likewise.
2848         * tree.c (init_tree): Init make_lang_type_fn.
2849         
2850 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
2851
2852         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
2853         paramter.
2854         
2855         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
2856         local statics if we don't really have them.
2857
2858         * ir.texi: Improve documentation for STMT_EXPR.  Describe
2859         CLEANUP_POINT_EXPR.
2860
2861 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
2862
2863         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
2864
2865 1999-10-07  Greg McGary  <gkm@gnu.org>
2866
2867         * class.c (finish_struct_1): Use simpler method of
2868         removing elements of a singly-linked list which doesn't
2869         lose for classes without data members.
2870
2871 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
2872
2873         * friend.c (make_friend_class): Robustify.
2874
2875         * semantics.c (finish_object_call_expr): Reject calls to template
2876         types.
2877
2878 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
2879
2880         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
2881
2882         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
2883         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
2884         CLASSTYPE_VFIELD.
2885         * class.c (get_vfield_offset): Likewise.
2886         (finish_base_struct): Likewise.
2887         (modify_one_vtable): Likewise.
2888         (fixup_vtable_deltas): Likewise.
2889         (finish_struct_1): Likewise.
2890         * init.c (expand_virtual_init): Likewise.
2891         * search.c (lookup_field_1): Likewise.
2892         (expand_upcast_fixups): Likewise.
2893         * typeck.c (build_component_ref): Likewise.
2894         (build_binary_op_nodefault): Likewise.
2895         
2896         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
2897         * ir.texi: Document TYPE_VFIELD.
2898
2899 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
2900
2901         * decl.c (grokdeclarator): Only warn about non-zero arrays if
2902         !in_system_header (linux socketbits.h can give this for
2903         __cmsg_data, which is using a GNU extension).
2904
2905 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
2906
2907         * decl2.c (start_static_storage_duration_function): Push the
2908         function declaration so it ends up in namespace scope.
2909
2910         * dump.c (DUMP_CHILDREN): Remove.
2911         (DUMP_BINFO): Adjust.
2912         (struct dump_node_info): Remove dump_children_p.
2913         (queue_and_dump_type): Remove dump_children_p parameter.
2914         (queue): Don't set dump_children_p.
2915         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
2916         queue_and_dump_index.
2917         (dequeue_and_dump): Unconditionally print children.  Adjust calls
2918         to functions mentioned above.
2919         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
2920         
2921         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
2922         * dump.c (dequeue_and_dump): Dump them.
2923         
2924         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
2925
2926         * decl.c (start_function): Set current_in_charge_parm for
2927         constructors, too, where appropriate.
2928         * search.c (fixup_all_virtual_upcast_offsets): New function.
2929         (expand_indirect_vtbls_init): Use it.
2930         
2931 1999-10-04  Nathan Sidwell  <nathan@acm.org>
2932
2933         * decl2.c (grok_alignof): Don't decay lvalues.
2934         
2935         * init.c (build_new): Remove unused variable.
2936
2937 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
2938
2939         * cp-tree.h (struct language_function): Remove static_labelno.
2940         (static_labelno): Remove macro.
2941         * method.c (build_overload_nested_name): Make static_labelno
2942         static here.
2943         
2944         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
2945         to decide whether or not a function is defined.
2946
2947         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
2948         situations where make_node will do it automatically.
2949         * decl.c (grok_reference_init): Likewise.
2950         (expand_static_init): Likewise.
2951         (do_static_initialization): Likewise.
2952         * init.c (perform_member_init): Likewise.
2953         (expand_aggr_init_1): Likewise.
2954         (build_new_1): Likewise.
2955         * method.c (do_build_copy_constructor): Likewise.
2956         (do_build_assign_ref): Likewise.
2957         * search.c (expand_upcast_fixups): Likewise.
2958         * semantics.c (finish_stmt_expr): Likewise.
2959         * typeck.c (build_unary_op): Likewise.
2960         (check_return_expr): Likewise.
2961
2962 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
2963
2964         * init.c (build_vec_delete_1): Fold COND_EXPRs.
2965
2966 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
2967
2968         * cp-tree.def (VEC_INIT_EXPR): Remove.
2969         * cp-tree.h (struct stmt_tree): New type.
2970         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
2971         x_stmt_tree.
2972         (class_cache_firstobj): Remove.
2973         (struct language_function): Remove stmts_are_full_exprs_p,
2974         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
2975         (current_stmt_tree): New macro.
2976         (last_tree): Adjust.
2977         (last_expr_type): Likewise.
2978         (doing_semantic_analysis_p): Simplify.
2979         (stmts_are_full_exprs_p): Adjust.
2980         (begin_tree): Remove prototype.
2981         (end_tree): Likewise.
2982         (begin_stmt_tree): Change prototype.
2983         (finish_stmt_tree): Likewise.
2984         (building_stmt_tree): Simplify.
2985         * decl.c (mark_stmt_tree): New function.
2986         (mark_saved_scope): Use it.
2987         (start_function): Rearrange slightly to call begin_stmt_tree 
2988         earlier.
2989         (save_function_data): Tweak.
2990         (finish_function): Adjust call to finish_stmt_tree.
2991         (mark_lang_function): Use mark_stmt_tree.
2992         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
2993         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
2994         (build_vec_init): Remove creation of stand-in intializer.
2995         * pt.c (begin_tree): Remove.
2996         (end_tree): Likewise.
2997         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
2998         (begin_compound_stmt): Handle a compound-statement outside of a
2999         function.
3000         (begin_stmt_expr): Handle a statement-expression outsidef of a
3001         function.
3002         (finish_stmt_expr): Likewise.
3003         (begin_class_definition): Don't call begin_tree.
3004         (finish_inline_definitions): Don't call end_tree.
3005         (begin_stmt_tree): Take a pointer to tree, not a function as input.
3006         (finish_stmt_tree): Likewise.
3007         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
3008         (mapcar): Likewise.
3009         
3010         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
3011         * parse.c: Regenerated.
3012         
3013         * dump.c (dqueue_and_dump): Dump bitfieldness.
3014         
3015         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
3016         bitfields, rather than DECL_BIT_FIELD.
3017         * ir.texi: Document how to tell whether or not a field is a
3018         bitfield.
3019         
3020         * lex.c (make_lang_type): Fix typo in comment.
3021
3022 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
3023
3024         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
3025
3026 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
3027
3028         * pt.c (tsubst_decl): If the type of a template instantiation is
3029         bogus, so is the whole instantiation.
3030
3031 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
3032
3033         * decl.c (initialize_local_var): Handle static variables here.
3034         (cp_finish_decl): Tweak handling of function-scope static
3035         variables.
3036         * semantics.c (expand_stmt): Handle DECL_STMTs for static
3037         variables.
3038
3039         * method.c (emit_thunk): Don't crash when -fsyntax-only.
3040
3041         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
3042         global_dtor_p.  Add init_priority.
3043         (DECL_ACCESS): Adjust accordingly.
3044         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
3045         (GLOBAL_INIT_PRIORITY): Likewise.
3046         * decl.c (lang_mark_tree): Adjust accordingly.
3047         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
3048         and GLOBAL_INIT_PRIORITY.
3049         * dump.c (dequeue_and_dump): Print them.
3050         * ir.texi: Document them.
3051
3052         * decl2.c (struct priority_info_s): Remove initialization_sequence
3053         and destruction_sequence.
3054         (start_static_storage_duration_function): Return the body of the
3055         function.  Convert for function-at-a-time mode.
3056         (generate_inits_for_priority): Remove.
3057         (finish_static_storage_duration_function): Change prototype.
3058         Adjust for function-at-a-time mode.
3059         (do_static_initialization): Likewise.
3060         (do_static_destruction): Likewise.
3061         (do_static_initialization_and_destruction): Remove.
3062         (start_static_initialization_or_destruction): New function.
3063         (finish_static_initialization_or_destruction): Likewise.
3064         (get_priority_info): Don't manipulation initialization_sequence or
3065         destruction_sequence.
3066         (prune_vars_needing_no_initialization): New function.
3067         (write_out_vars): Likewise.
3068         (finish_file): Use the various new functions instead of the old.
3069         
3070 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
3071
3072         * cp-tree.h (warn_float_equal): Declare.
3073         * decl2.c (warn_float_equal): Define.
3074         (lang_decode_option): Recognize -W[no-]float-equal.
3075         * typeck.c (build_binary_op_nodefault): Conditionally warn
3076         about equality tests of floating point types.
3077
3078 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
3079
3080         Support normal type_info-based EH mechanisms with -fno-rtti.
3081         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
3082         (build_eh_type_type_ref): Likewise.
3083         (build_eh_type): Remove.
3084         (expand_throw): Call build_eh_type_type, not build_eh_type.
3085         * decl2.c (import_export_decl): Don't associate the tinfo fn with
3086         the vtable if -fno-rtti.
3087         * decl.c (init_decl_processing): Always init_rtti_processing.
3088
3089         * rtti.c (get_typeid): Don't complain about -fno-rtti.
3090
3091         * class.c (class_cache_obstack, class_obstack): Remove.
3092         (init_class_processing): Don't initialize class_obstack.
3093         (push_cache_obstack): Remove.
3094         (pushclass): Don't call it.
3095         * cp-tree.h: Remove prototype for push_cache_obstack.
3096         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
3097         (pushlevel_class): Don't push_decl_level.
3098         (poplevel_class): Don't pop_stack_level.
3099         (push_class_level_binding): Don't push_cache_obstack.
3100         (init_decl_processing): Don't intialize decl_obstack.
3101         * search.c (push_class_decls): Don't push_cache_obstack.
3102         * tree.c (list_hash_add): Put hash node on permanent_obstack.
3103         (hash_tree_cons): Don't mess with obstacks.
3104         (print_lang_statistics): Don't print stats for class_obstack and
3105         decl_obstack.
3106
3107 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
3108
3109         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
3110         * ir.texi: Document DECL_EXTERNAL.
3111
3112         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
3113         * ir.texi: Document THUNK_DECLs.
3114
3115         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
3116         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
3117         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
3118         * error.c (dump_template_bindings): Remove unused parameter.
3119         Handle multiple levels of template parameters.
3120         (dump_template_decl): Use `parms', not `args', for template
3121         parameters.  Fix thinko.
3122         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
3123         flags to dump_template_bindings.
3124         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
3125         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
3126         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
3127         (tsubst_copy): Clarify variable name.
3128         (most_general_template): Robustify.
3129         
3130 1999-09-29  Nathan Sidwell  <nathan@acm.org>
3131
3132         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
3133         to change primary template rendering.
3134
3135 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
3136
3137         * cp-tree.h (UPT_TEMPLATE): Remove.
3138         (UPT_PARMS): Likewise.
3139         (DECL_NEEDED_P): New macro.
3140         * decl2.c (finish_vtable_vardecl): Use it.
3141         (finish_objects): Don't crash with -fsyntax-only.
3142         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
3143         -fsyntax-only.
3144         * pt.c (tsubst_friend_function): Remove FIXME that talks about
3145         obstacks.
3146         (tsubst_expr): Correct handling of function try-blocks.
3147         * semantics.c: Include flags.h.
3148         (expand_body): Don't do RTL generation if -fsyntax-only.
3149         * Makefile.in (semantics.o): Depends on flags.h.
3150         
3151 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
3152
3153         * pt.c (most_general_template): Adjust declaration.
3154
3155         * cp-tree.h: (most_general_template): Declare.
3156
3157         * error.c (dump_template_value): Rename to ...
3158         (dump_template_argument): This.
3159         (dump_template_argument_list): New function.
3160         (dump_type): Use it.
3161         (dump_template_parameter): New function.
3162         (dump_template_decl): Use it.
3163         (dump_template_bindings): New function.
3164         (dump_function_decl): Use it. Pretty print function template
3165         instantiations.
3166
3167 1999-09-28  Nathan Sidwell  <nathan@acm.org>
3168
3169         * decl.c (grokdeclarator): Distinguish parameter context for
3170         diagnostics. Tidy up missing type diagnostic.
3171         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
3172
3173 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
3174
3175         * ir.texi: Improve documentation for TARGET_EXPR.
3176
3177 1999-09-27  Nathan Sidwell  <nathan@acm.org>
3178
3179         Augment stringification of trees.
3180         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
3181         (fndecl_as_string, type_as_string_real, args_as_string,
3182         code_as_string, language_as_string, parm_as_string,
3183         op_as_string, assop_as_string, cv_as_string): Remove.
3184         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
3185         (context_as_string): Declare new function.
3186         * error.c (cp_printers): Move definition.
3187         (OB_UNPUT): Remove.
3188         (OB_END_TEMPLATE_ID): Adjust.
3189         (interesting_scope_p): Remove.
3190         (dump_scope): New static function.
3191         (dump_qualifiers): Adjust prototype, reimplement.
3192         (dump_template_value): Use tree_string_flags.
3193         (dump_type_real): Move back to dump_type.
3194         (dump_type): Adjust prototype. Use tree_string_flags.
3195         (dump_aggr_type): Likewise. Use dump_template_parms.
3196         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
3197         Return pad flag.
3198         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
3199         (dump_simple_decl): Likewise.
3200         (dump_decl): Likewise. Use dump_template_decl.
3201         (dump_template_decl): New static function broken out of dump_decl.
3202         (dump_function_decl): Adjust prototype. Use tree_string_flags.
3203         (dump_parameters): Likewise. Prefix space.
3204         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
3205         (dump_function_name): Likewise. Use dump_template_parms.
3206         (dump_template_parms): New static function broken out of
3207         dump_function_name.
3208         (dump_expr_list): Adjust prototype. Use tree_string_flags.
3209         (dump_expr): Likewise.
3210         (fndecl_as_string): Removed
3211         (type_as_string_real): Removed
3212         (dump_binary_op): Adjust prototype. Use tree_string_flags.
3213         (dump_unary_op): Likewise.
3214         (type_as_string): Likewise.
3215         (expr_as_string): Likewise.
3216         (decl_as_string): Likewise.
3217         (context_as_string): New function.
3218         (lang_decl_name): Adjust.
3219         (decl_to_string): New static print callback.
3220         (expr_to_string): Likewise.
3221         (fndecl_to_string): Likewise.
3222         (code_as_string): Renamed to ...
3223         (code_to_string): ... here. Adjust.
3224         (language_as_string): Renamed to ...
3225         (language_to_string): ... here. Adjust.
3226         (parm_as_string): Renamed to ...
3227         (parm_to_string): ... here.
3228         (op_as_string): Renamed to ...
3229         (op_to_string): ... here.
3230         (assop_as_string): Renamed to ...
3231         (assop_to_string): ... here.
3232         (type_to_string): New static print callback.
3233         (args_as_string): Renamed to ...
3234         (args_to_string): ... here. Adjust.
3235         (cv_as_string): Renamed to ...
3236         (cv_to_string): ... here. Adjust.
3237         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
3238         (print_template_context): Likewise.
3239
3240 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
3241
3242         * cp-tree.h (expand_throw): Remove prototype.
3243         * except.c (expand_throw): Make it static.  Use tree-generation
3244         functions, rather than RTL-generation functions.
3245         (build_throw): Use it.
3246         * expr.c: Include except.h.
3247         (cplus_expand_expr): Don't call expand_throw here.
3248         * Makefile.in (expr.o): Depend on except.h.
3249         * ir.texi: Update documentation for THROW_EXPR.
3250         
3251         * decl.c (start_function): Set x_dont_save_pending_sizes rather
3252         than calling get_pending_sizes.
3253         * init.c (build_new): Don't save and restore
3254         immediate_size_expand; instead, assert that it has the expected
3255         value already.
3256
3257 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3258
3259         * lex.c (compiler_error): Add missing call to va_end().
3260
3261 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
3262
3263         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
3264         * ir.texi: Document RESULT_DECL and DECL_RESULT.
3265
3266         * cp-tree.h (check_return_expr): New function.
3267         * decl.c (finish_constructor_body): New function.
3268         (pushdecl): Put global friend functions in namespace binding
3269         level, not the class binding level.
3270         (finish_destructor_body): Make sure the dtor_label is always
3271         defined.  Fix typo in comment.
3272         (finish_function): Move generation of constructor-termination code
3273         to semantic-analysis time.  Move generation of implicit `main'
3274         return value to semantic-analysis time.
3275         * semantics.c (finish_return_stmt): Generate goto's to
3276         ctor_label/dtor_label here.  Use check_return_expr to do semantic
3277         analysis on the returned expression.
3278         * typeck.c (maybe_warn_about_returning_address_of_local): New
3279         function split out from c_expand_return.
3280         (check_return_expr): Likewise.
3281         (c_expand_return): Just generate the RTL for the return.
3282         
3283 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
3284
3285         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
3286         (cleanup_type): Likewise.
3287         (search_tree): Change prototype.
3288         * decl.c (local_variable_p): Adjust for new interface to
3289         search_tree.
3290         (check_default_argument): Likewise.
3291         * error.c (dump_expr): Handle INIT_EXPR.
3292         * except.c (expand_throw): Don't make cleanup_type a local static.
3293         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
3294         * init.c (build_new): Call build_new_1 directly, rather than
3295         building a NEW_EXPR.
3296         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
3297         processing file-scope initializers.
3298         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
3299         * tree.c: Include splay-tree.h
3300         (no_linkage_helper): Adjust for new interface to search_tree.
3301         (search_tree): Pass around pointers to tree nodes, rather than the
3302         nodes themselves.  Handle VEC_INIT_EXPR.
3303         (no_linkage_check): Adjust for new interface to search_tree.
3304         (mapcar): Handle VEC_INIT_EXPR.
3305         (target_remap): New variable.
3306         (bot_manip): Use it.
3307         (bot_replace): New function.
3308         (break_out_target_exprs): Use it to remap all variables used in a
3309         default argument expression.
3310         * typeck.c (build_modify_expr): Don't crash when outside a
3311         function and presented with an INIT_EXPR assignment
3312         * Makefile.in (tree.o): Depend on splay-tree.h.
3313
3314 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
3315
3316         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
3317         DECL_BUILT_IN.
3318         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
3319         callers changed.
3320         Set the builtin's DECL_BUILT_IN_CLASS.
3321
3322 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
3323
3324         * decl.c (pushdecl): Don't make local declarations of extern
3325         variables give the variable a DECL_CONTEXT for the function.
3326         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
3327         Don't accidentally make RTL for local declarations.
3328         (emit_local_var): Handle declarations with asm-specifiers here.
3329         
3330 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
3331
3332         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
3333         STMT_IS_FULL_EXPR_P.
3334
3335         * cp-tree.h (language_function): Add cannot_inline.
3336         * decl.c (start_function): Restore current_function_cannot_inline
3337         from the saved value.
3338         (save_function_data): Save current_function_cannot_inline.
3339         * decl2.c (start_objects): Change prototype.  Build the function
3340         in function-at-a-time mode.
3341         (finish_objects): Likewise.
3342         (generate_ctor_or_dtor_function): Adjust accordingly.
3343         
3344         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
3345         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
3346         Don't call expand_anon_union_decl here
3347         * semantics.c (exapnd_stmt): Call it here, instead.
3348         * typeck.c (mark_addressable): Addressed variables are implicitly
3349         used.
3350         
3351 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3352
3353         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
3354         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
3355         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
3356         * cp-tree.h: Add tree checking macros to various tree access
3357         macros. 
3358         * ptree.c (print_lang_decl): Test for function or variable
3359         before accessing template info.
3360
3361 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
3362
3363         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
3364         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
3365         * decl2.c (lang_f_options): Add -fshort-wchar.
3366         * cp-tree.h: Declare flag_short_wchar.
3367         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
3368         int' for wchar_t.
3369
3370 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3371
3372         * ir.texi: Fix formatting errors and typos.
3373
3374 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
3375
3376         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
3377
3378         * decl.c (pushdecl): Do create a binding for extern "C" functions,
3379         but not for their DECL_ASSEMBLER_NAMEs.
3380         (lookup_name_current_level): Fix formatting.
3381         (xref_tag): Likewise.
3382         * decl2.c (start_objects): Mark static constructors and
3383         destructors as used.
3384
3385 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
3386
3387         * decl.c (define_case_label): Don't crash if we're not in a switch.
3388
3389         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
3390         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
3391         for unsupported flags.
3392
3393 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
3394
3395         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
3396         Accept and warn about -fthis-is-variable.
3397
3398 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
3399
3400         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
3401         CLEANUP_STMT, and SCOPE_STMT.
3402
3403         * decl2.c (lang_decode_option): Adjust, in the wake of recent
3404         changes to option processing.
3405
3406 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3407
3408         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
3409         function pointer from pmfs with no object given.
3410         (convert_for_assignment): Do not return error when converting
3411         pmfs.
3412
3413 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
3414
3415         * lex.c (internal_filename): New variable.
3416         (INTERNAL_FILENAME): New macro.
3417         (init_parse): Allocate internal_filename and mark as root.  Use it
3418         instead of a string constant.
3419
3420 1999-09-21  Nathan Sidwell  <nathan@acm.org>
3421
3422         Reimplement dynamic cast and catch matching.
3423         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
3424         * search.c (dynamic_cast_base_recurse): New function.
3425         (get_dynamic_cast_base_type): New function for dynamic cast.
3426         * rtti.c (build_dynamic_cast_1): Determine source and target
3427         class relationship. Call __dynamic_cast_2.
3428         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
3429         (__user_type_info::dyncast): New dynamic cast dispatcher.
3430         (__user_type_info::sub_kind): New nested enumeration.
3431         (__user_type_info::contained_p): sub_kind predicate.
3432         (__user_type_info::contained_public_p): Likewise.
3433         (__user_type_info::contained_nonpublic_p): Likewise.
3434         (__user_type_info::contained_nonvirtual_p: Likewise.
3435         (__user_type_info::upcast_result): New nested struct.
3436         (__user_type_info::dyncast_result): New nested struct.
3437         (*::do_upcast): New catch function.
3438         (*::do_dyncast): New dynamic cast function.
3439         (__user_type_info::find_public_subobj): New dynamic cast
3440         helper dispatcher.
3441         (*::do_find_public_subobj): New dynamic cast helper function.
3442         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
3443         (__user_type_info::dyncast): Define dynamic cast dispatcher.
3444         (*::do_upcast): Define catch function.
3445         (*::do_dyncast): Define dynamic cast function.
3446         (*::do_find_public_subobj): Define dynamic cast helper function.
3447         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
3448         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
3449         (__dynamic_cast_2): New dynamic cast runtime.
3450
3451 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
3452
3453         * cp-tree.h (finish_stmt_expr): Change prototype.
3454         * expr.c (cplus_expand_expr): Adjust call accordingly.
3455         * init.c (finish_init_stmts): Likewise.
3456         * parse.y (primary): Likewise.
3457         * pt.c (tsubst_copy): Likewise.
3458         * semantics.c (finish_stmt_expr): Don't take two parameters.
3459         Don't remove generated BLOCKs from the block-tree.
3460
3461         Remove support for assigning to `this'.
3462         * NEWS: Note that fact.
3463         * class.c (build_vbase_path): Don't check flag_this_is_variable.
3464         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
3465         (language_function): Remove assigns_this, just_assigned_this, and
3466         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
3467         (base_init_expr): Remove.
3468         (current_vcalls_possible_p): New macro.
3469         (vtbls_set_up_p): Likewise.
3470         (emit_base_init): Change prototype.
3471         * decl.c (finish_destructor_body): New function, split out from
3472         finish_function.
3473         (current_function_assigns_this): Remove.
3474         (current_function_just_assigned_this): Likewise.
3475         (start_function): Don't set them.
3476         (finish_function): Don't check them.  Don't emit
3477         base-initialization code here.  Generate code for destructors when
3478         doing semantic analysis.
3479         (finish_stmt): Don't check current_function_just_assigned_this.
3480         * decl2.c (lang_f_options): Remove this-is-variable.
3481         (lang_decode_option): Likewise.
3482         (grokclassfn): Don't check flag_this_is_variable.
3483         * init.c (emit_base_init): Return the expression generated.
3484         (construct_virtual_bases): Don't push/pop obstacks.  Fix
3485         typo.
3486         (build_new_1): Don't check flag_this_is_variable.
3487         (get_temp_regvar): Don't set DECL_REGISTER.
3488         (build_vec_init): Don't call use_variable.
3489         * lang-options.h: Remove "-fthis-is-variable" and
3490         "-fno-this-is-variable".
3491         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
3492         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
3493         expand_expr_stmt.
3494         * semantics.c (finish_expr_stmt_real): Rename to ...
3495         (finish_expr_stmt): This.  Remove assigned_this parameter.
3496         (begin_if_stmt): Call do_pushlevel before starting the statement.
3497         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
3498         blocks.
3499         (setup_vtbl_ptr): Emit initialization code for bases and members
3500         at semantic-analysis time.  Emit code to initialize vtables in
3501         destructors here.
3502         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
3503         Don't handle CTOR_INITIALIZER any more.
3504         * typeck.c (build_modify_expr): Don't check for assignments to
3505         this.
3506         (c_expand_return): Don't suggest assigning to `this'.
3507         
3508         * Makefile.in (decl.o): Depend on RTL_H.
3509         (decl2.o): Likewise.
3510         (class.o): Likewise.
3511         (call.o): Likewise.
3512         (method.o): Likewise.
3513         (search.o): Likewise.
3514         (tree.o): Likewise.
3515         (pt.o): Likewise.
3516
3517         * decl.c (duplicate_decls): When a builtin function is redeclared
3518         as static, make sure it is mangled correctly.
3519
3520         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
3521         detail about the statement-tree.
3522         
3523 1999-09-20  Nathan Sidwell  <nathan@acm.org>
3524
3525         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
3526
3527 1999-09-20  Nick Clifton  <nickc@cygnus.com>
3528
3529         * decl2.c (lang_decode_option): Extend comment.
3530
3531 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
3532
3533         * typeck.c: Include "tm_p.h".
3534
3535 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
3536
3537         * ir.texi: New file.
3538
3539 1999-09-19  Paul Burchard <burchard@pobox.com>
3540
3541         * semantics.c (expand_stmt): Initialize return value.
3542
3543 1999-09-18  Paul Burchard <burchard@pobox.com>
3544
3545         * gxxint.texi: G++ now implements namespaces.
3546         
3547 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
3548
3549         * decl.c (pop_label): Don't warn about unused labels more than
3550         once.
3551         * semantics.c (finish_goto_stmt): Always marked used labels as
3552         used.
3553
3554         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
3555         even when the declaration is external.
3556         (cp_finish_decl): Adjust call to layout_var_decl.
3557         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
3558
3559 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
3560
3561         * typeck.c (get_member_function_from_ptrfunc): Always consider
3562         virtuality inside member pointer.
3563
3564 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
3565
3566         Turn on function-at-a-time processing.  
3567         * cp-tree.h (doing_semantic_analysis_p): New macro.
3568         (SF_DEFAULT): Define to zero, not SF_EXPAND.
3569         (start_handler_parms): Change prototype.
3570         (expand_start_catch_block): Likewise.
3571         (expand_end_catch_block): Likewise.
3572         (expand_start_eh_spec): Likewise.
3573         (expand_end_eh_spec): Declare.
3574         (finish_handler_parms): Change prototype.
3575         (begin_catch_block): Declare.
3576         (finish_handler): Change prototype.
3577         (do_pushlevel): Declare.
3578         (do_poplevel): Likewise.  
3579         * decl.c (pushlevel): Don't create
3580         binding levels when not doing semantic analysis.
3581         (poplevel): Don't pop them.
3582         (pushdecl): Assert that we are never called when not doing
3583         semantic analysis.
3584         (pushdecl_top_level): Use push_to_top_level.
3585         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
3586         label when expanding.
3587         (cp_finish_decl): Only inject for-scope variables when doing
3588         semantic analysis.  Add comments.
3589         (start_handler_parms): Return the handler parm.
3590         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
3591         already set.  Reinitialize from saved function data if available.
3592         Don't pushlevel when not doing semantic analysis.
3593         (store_parm_decls): Only generate RTL when expanding.  Only
3594         pushdecl when doing semantic analysis.  Set
3595         current_eh_spec_try_block if appropriate.
3596         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
3597         Combine common code.  Don't poplevel when not doing semantic
3598         analysis.
3599         (push_cp_function_context): Don't expand functions without an
3600         explicit call to expand_body.
3601         (mark_lang_function): Make eh_spec_try_block and
3602         x_scope_stmt_stack.  
3603         * except.c (expand_end_eh_spec): Don't
3604         declare.
3605         (process_start_catch_block): Likewise.
3606         (push_eh_cleanup): Use finish_decl_cleanup.
3607         (initialize_handler_parm): New function.
3608         (expand_start_catch_block): Use it.
3609         (expand_end_catch_block): Use tree-generation functions, not
3610         RTL-generation functions.
3611         (expand_start_eh_spec): Likewise.
3612         (expand_end_eh_spec): Likewise.
3613         (expand_exception_blocks): Simplify.
3614         (start_anon_func): Use do_pushlevel.
3615         (end_anon_func): Use do_poplvel.  Call expand_body for the
3616         function.  
3617         * expr.c (do_case): Don't call define_case_label.  
3618         * init.c (create_temporary_var): Set DECL_CONTEXT for local
3619         variables.  
3620         * method.c (emit_thunk): Call expand_body for the
3621         thunk.
3622         (sythesize_method): Likewise.  
3623         * parse.y (handler_args): Give it ttype.
3624         (eat_saved_input): Call expand_body.
3625         (base_init): Use do_pushlevel.
3626         (pending_inline): Call expand_body.
3627         (handler): Adjust calls to finish_handler_parms and
3628         finish_handler.
3629         (handler_args): Don't call expand_start_catch_block.  Return the
3630         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
3631         * parse.c: Regenerated.
3632         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
3633         * semantics.c (do_pushlevel): Give it external linkage.  Build
3634         SCOPE_STMTs.
3635         (do_poplevel): Likewise.
3636         (finish_case_label): Call define_case_label when doing semantic
3637         analysis.
3638         (finish_goto_stmt): Create RTL for labels.
3639         (finish_function_try_block): Set in_function_try_handler
3640         unconditionally.
3641         (finish_function_handler_sequence): Unset it.
3642         (finish_handler_parms): Use expand_start_catch_block even when
3643         building a statement-tree.
3644         (begin_catch_block): New function.
3645         (finish_handler): Move a little RTL-generation logic here.
3646         (finish_decl_cleanup): Allow cleanups for empty declarations.
3647         (finish_named_return_value): Don't pushdecl when not doing
3648         semantic analysis.
3649         (expand_stmt): Don't do semantic analysis for variable
3650         declarations.  Handle START_CATCH_STMT.  Call expand_label
3651         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
3652         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
3653         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
3654         RETURN_INIT and function try blocks.
3655         
3656         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
3657         x_scope_stmt_stack.  Add x_in_charge_parm.
3658         (current_eh_spec_try_block): New macro.
3659         (current_scope_stmt_stack): Likewise.
3660         (current_in_charge_parm): Likewise.
3661         * decl.c (start_function): Initialize current_in_charge_parm.
3662         (finish_function): Use current_in_charge_parm rather than looking
3663         up __in_chrg.
3664         * search.c (expand_indirect_vtbls_init): Likewise.
3665
3666         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
3667         (TRY_BLOCK): Likewise.
3668         (HANDLER): Likewise.
3669         (START_CATCH_STMT): New tree node.
3670         (SCOPE_STMT): Likewise.
3671         * cp-tree.h (SCOPE_BEGIN_P): New macro.
3672         (SCOPE_NULLIFIED_P): Likewise.
3673         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
3674         (struct lang_decl): Add saved_language_function.
3675         (DECL_PENDING_INLINE_INFO): Adjust documentation.
3676         (DECL_PENDING_INLINE_P): New macro.
3677         (TYPE_TI_ARGS): Fix typo in comment.
3678         (DECL_SAVED_TREE): Add to documentation.
3679         (DECL_SAVED_FUNCTION_DATA): New macro.
3680         (START_CATCH_TYPE): Likewise.
3681         (SCOPE_END_P): New macro.
3682         (declare_parm_level): Don't declare.
3683         * decl.c (mark_lang_function): New function, split out from
3684         mark_cp_function_context.
3685         (save_function_data): New function.
3686         (declare_parm_level): Remove.
3687         (finish_function): Use save_function_data to squirrel away
3688         important stuff for later use.
3689         (mark_cp_function_context): Use mark_function_data.
3690         (lang_mark_tree): Likewise.
3691         * lex.c (begin_definition_of_inclass_inline): Set
3692         DECL_PENDING_INLINE_P.
3693         (store_pending_inline): Clear it.
3694         * pt.c (tsubst_decl): Likewise.
3695
3696 1999-09-17  Nathan Sidwell  <nathan@acm.org>
3697
3698         * call.c (perform_implicit_conversion): Deal with error_mark_node.
3699
3700 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
3701
3702         * decl.c (warn_extern_redeclared_static): Don't get confused by
3703         static member functions.
3704         (duplicate_decls): Merge DECL_THIS_STATIC.
3705
3706         * decl.c (expand_static_init): Make sure assignments to local
3707         statics actually occur.
3708
3709 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
3710
3711         * cp-tree.h (poplevel_class): Declare.
3712         * class.c (popclass): Use poplevel_class, not poplevel.
3713         * decl.c (poplevel_class): Don't make it static.  Don't return a
3714         value.
3715         (poplevel): Don't call poplevel_class; abort in a class
3716         binding level is seen.
3717         * semantics.c (finish_translation_unit): Use pop_everything.
3718         * parse.y (member_init): Allow errors.
3719         (pending_inline): Call finish_function.
3720         * parse.c: Regenerated.
3721         * Makefile.in (CONFLICTS): Adjust.
3722
3723 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
3724         
3725         * error.c: Reduce code duplication.
3726         (dump_template_value): New function.
3727         (dump_type_real): Use it.
3728         (dump_decl): Likewise.
3729         (dump_function_name): Likewise.
3730         (dump_function_decl): Don't be too talkative about function return
3731         type variety.
3732
3733 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3734
3735         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
3736
3737         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
3738
3739 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
3740
3741         * decl2.c (finish_file): Also call check_global_declarations for
3742         the pending_statics list.
3743
3744 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
3745
3746         * lex.c (cp_pragma_implementation): Allow #pragma implementation
3747         in header files.
3748
3749 1999-09-15  Richard Henderson  <rth@cygnus.com>
3750
3751         * lex.c (mark_impl_file_chain): Follow the next chain.
3752
3753 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
3754
3755         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
3756         problems with extern "C" functions redeclared as static.
3757         (duplicate_decls): When a builtin is redeclared static, make the
3758         new function have internal linkage.
3759         
3760 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
3761
3762         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
3763         * pt.c (tsubst_copy): Likewise.
3764         * tree.c (search_tree): Likewise.
3765         (mapcar): Likewise.
3766
3767 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3768
3769         * typeck2.c (ack): Don't declare progname.
3770
3771 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
3772
3773         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
3774         filenames with ggc_alloc_string.
3775
3776 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
3777
3778         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
3779         TARGET_EXPR.
3780         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
3781         the TARGET_EXPR.
3782         * cvt.c (build_up_reference): Likewise.
3783         * tree.c (build_cplus_new): Likewise.
3784         (get_target_expr): Likewise.
3785         
3786 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
3787
3788         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
3789
3790 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
3791
3792         * cp-tree.h (build_target_expr): New function.
3793         * call.c (build_conditional_expr): Use build_target_expr.
3794         (convert_like): Likewise.
3795         (build_over_call): Likewise.
3796         * cvt.c (build_up_reference): Likewise.
3797         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
3798         (destroy_local_var): Here.
3799         (build_target_expr): New function.
3800         * tree.c (build_cplus_new): Use it.
3801         (get_target_expr): Likewise.
3802
3803 1999-09-13  Nathan Sidwell  <nathan@acm.org>
3804
3805         * typeck.c (expr_sizeof): Don't decay arrays and functions.
3806         Remove misleading comment.
3807         (build_compound_expr): Don't decay arrays.
3808
3809 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
3810
3811         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
3812         class rvalues again.
3813
3814 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3815
3816         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
3817
3818         * g++spec.c: Include gcc.h.
3819         (lang_specific_driver): Constify a char*.  Call xcalloc, not
3820         xmalloc/bzero.  All calls to the function pointer parameter now
3821         explicitly call `fatal'.
3822
3823 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
3824
3825         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
3826         * cvt.c (ocp_convert): Complete the from and destination types.
3827         Adjust warning about functions always being `true' in conditionals.
3828         * decl.c (duplicate_decls): Don't play funny games with abort.
3829         * error.c (dump_expr): Handle OVERLOADs.
3830         * spew.c (probe_obstack): Remove.
3831         * typeck.c (condition_conversion): Use perform_implicit_conversion.
3832         
3833 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
3834
3835         * cp-tree.h (auto_function, define_function): Adjust prototypes.
3836         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
3837         changed.
3838         (auto_function): Likewise, for CODE arg.
3839         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
3840         (builtin_function): ... here.
3841
3842 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
3843
3844         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
3845         (init_decl_processing): Don't set TREE_PERMANENT for the
3846         error_mark_node.
3847         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
3848         (grokdeclarator): Likewise.
3849         (grokparms): Don't check TREE_PERMANENT when building up lists.
3850         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
3851         (mark_inline_for_output): Likewise.
3852         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
3853         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
3854         * lex.c (check_newline): Don't check ggc_p; it is always one.
3855         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
3856         * spew.c (yylex): Don't copy_node or probe_obstacks for
3857         non-permanent CONSTANTs and STRINGs.
3858         * tree.c (build_cplus_array_type_1): Don't fuss with
3859         TREE_PERMANENT on ARRAY_TYPEs.
3860         
3861         * cp-tree.def (CLEANUP_STMT): New node.
3862         * cp-tree.h (language_function): Add name_declared.
3863         (current_function_name_declared): New macro.
3864         (CLEANUP_DECL): New macro.
3865         (CLEANUP_EXPR): Likewise.
3866         (emit_local_var): Likewise.
3867         (finish_decl_cleanup): New function.
3868         * cvt.c (build_up_reference): Simplify.
3869         (ocp_convert): Remove dead code.
3870         * decl.c (start_decl): Remove call to add_decl_stmt.
3871         (grok_reference_init): Adjust, to handle bindings temporaries to
3872         references.  Remove dead code.
3873         (initialize_local_var): Don't generate RTL for
3874         declarations here, or build cleanups here.  Don't fuss with
3875         obstacks.  Replace expand_start_target_temps calls with explicit
3876         setting of stms_are_full_exprs_p.
3877         (destroy_local_var): New function.
3878         (emit_local_var): Likewise.
3879         (cp_finish_decl): Use them, as appropriate.
3880         (start_function): Announce template functions.
3881         (store_parm_decls): Don't call declare_function_name here.
3882         (finish_stmt): Don't start emit base-initialization code when just
3883         building the statement-tree.
3884         * init.c (create_temporary_var): Move add_decl_stmt call ...
3885         (get_temp_regvar): Here.
3886         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
3887         cp_finish_decl would expect.  Don't call add_decl_stmt.
3888         * semantics.c (begin_compound_stmt): Call declare_function_name,
3889         if appropriate.
3890         (finish_decl_cleanup): New function.
3891         (expand_stmt): Use emit_local_var to output variables.          
3892         (expand_body): Set current_funtion_name_declared.
3893         
3894 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
3895
3896         * cp-tree.h (finish_cleanup_try_block): New function.
3897         * semantics.c (finish_cleanup_try_block): Add comment.
3898
3899 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
3900
3901         * cp-tree.h: Delete declarations for all tree nodes now moved to
3902         global_trees.
3903         * decl.c: Delete their definitions.
3904         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
3905         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
3906         provide defaults.
3907         (init_decl_processing): Call build_common_tree_nodes and
3908         build_common_tree_nodes_2 instead of building their nodes here.
3909         Don't add gc roots for them.
3910
3911 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
3912
3913         * cp-tree.h (language_function): Rename expanding_p to
3914         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
3915         (expanding_p): Adjust accordingly.
3916         (TREE_VIA_PRIVATE): Fix typo in comment.
3917         (DECL_REFERENCE_SLOT): Remove.
3918         (SET_DECL_REFERENCE_SLOT): Likewise.
3919         * decl.c (named_label_uses): Adjust. Remove chicken comment.
3920         (push_overloaded_decl): Don't truncate the chain of bindings when
3921         adding an overloaded function.
3922         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
3923         (initialize_local_var): Fix typo in comment.
3924         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
3925         * decl2.c (start_objects): Make the fact that we are expanding
3926         the generated function right away explicit.
3927         (start_static_storage_duration_function): Likewise.
3928         (finish_file): Fix typo in comment.
3929         * init.c (build_vec_init): Correct bugs in handling cleanups.
3930         * semantics.c (maybe_convert_cond): New function.
3931         (FINISH_COND): Always store the condition, even if there's
3932         a declaration.
3933         (finish_if_stmt_cond): Use maybe_convert_cond.
3934         (finish_while_stmt_cond): Likewise.
3935         (finish_do_stmt): Likewise.
3936         (finish_for_cond): Likewise.
3937         (expand_cond): Adjust.
3938         
3939         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
3940         * init.c (perform_member_init): Remove obstack machinations.
3941         (expand_cleanup_for_base): Likewise.
3942         (finish_init_stmts): Mark the statement-expression as used.
3943         * method.c (emit_thunk): Use tree-generating functions, not
3944         RTL.
3945         (do_build_copy_constructor): Likewise.
3946         (do_build_assign_ref): Likewise.
3947         (synthesize_method): Likewise.  Keep track of line numbers.
3948         * pt.c (tsubst_expr): Handle various kinds of try blocks.
3949         * semantics.c (expand_stmts): Remove.
3950         (begin_function_try_block): Set FN_TRY_BLOCK_P.
3951         (finish_function_try_block): Be careful rechaining 
3952         function try blocks.
3953         (expand_stmt): Loop through all the statements at a given level.
3954         (exapnd_body): Be careful with line-numbers here too.  Prepare for
3955         being called directly from the parser.
3956
3957         * cp-tree.h (finish_function): Adjust prototype.
3958         * decl.c (finish_function): Return the function compiled.
3959         * pt.c (instantiate_decl): Don't play games with obstacks.
3960         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
3961         (search_tree): Likewise.
3962         * typeck.c: Fix typo in comment.
3963         * typeck2.c (store_init_value): Add comment.
3964
3965         * cp-tree.h (CPTI_ATEXIT): New macro.
3966         (atexit_node): Likewise.
3967         * decl.c (destroy_local_static): New function, broken out from ...
3968         (expand_static_init): Here.
3969
3970         * rtti.c (get_tinfo_var): These should always be global
3971         (expand_si_desc): Use tree, not RTL, functions to generate code.
3972         (expand_class_desc): Likewise.
3973         (expand_ptr_desc): Likewise.
3974         (expand_attr_desc): Likewise.
3975         (expand_generic_desc): Likewise.
3976         (synthesize_tinfo_fn): Likewise.
3977
3978 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
3979
3980         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
3981         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
3982         RECHAIN_STMTS. 
3983         (RECHAIN_STMST_FROM_CHAIN): Likewise.
3984
3985         * parse.y (simple_stmt): Fix typo in last change.
3986
3987         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
3988         (STMT_IS_FULL_EXPR_P): Likewise.
3989         (STMT_LINENO_FOR_FN_P): Likewise.
3990         (prep_stmt): New function.
3991         (building_stmt_tree): Tweak for safety.
3992         * pt.c (tsubst_expr): Use prep_stmt throughout.
3993         (add_tree): Move it to semantics.c
3994         * semantics.c (add_tree): Move it here.
3995         (finish_expr_stmt_real): New function.
3996         (finish_expr_stmt): Use it.
3997         (finish_if_stmt_cond): Use FINISH_COND.
3998         (finish_while_stmt_cond): Likewise.
3999         (finish_for_cond): Likewise.
4000         (finish_stmt_tree): Tweak line-number handling.
4001         (prep_stmt): New function.
4002         (expand_stmt): Use it.
4003         
4004         * cp-tree.h (begin_switch_stmt): Adjust prototype.
4005         (finish_switch_cond): Likewise.
4006         * parse.y (simple_stmt): Adjust accordingly.
4007         * parse.c: Regenerated.
4008         * pt.c (tsubst_expr): Adjust accordingly.
4009         * semantics.c (expand_cond): New function.
4010         (FINISH_COND): New macro.
4011         (begin_switch_stmt): Build the SWITCH_STMT here.
4012         (finish_switch_stmt_cond): Not here.
4013         (expand_stmt): Adjust calls to begin_switch_stmt and
4014         finish_switch_cond.  Use expand_cond throughout.
4015
4016         * dump.c (dequeue_and_dump): Dump types for constants.
4017         Describe DECL_ARG_TYPE more intuitively.
4018         Handle ARRAY_REF.
4019
4020         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
4021         (lang_cleanup_tree): Remove.
4022         * lex.c (make_lang_type): Use ggc_alloc to allocate
4023         TYPE_LANG_SPECIFIC.
4024
4025         Reorganize per-function data.
4026         * cp-tree.h (saved_scope): Add function_decl, bindings.
4027         (language_function): Rename binding_level to bindings.
4028         (cp_function_chain): Use the current_function, not the
4029         outer_function_chain.
4030         (current_class_ptr): Make it work, even when there's no 
4031         current function.
4032         (current_class_ref): Likewise.
4033         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
4034         macros.
4035         (clear_temp_name): Remove.
4036         * decl.c (check_function_type): New function, broken out from
4037         start_function.
4038         (current_binding_level): Adjust definition.
4039         (pushlevel): Simplify.
4040         (poplevel): Don't use named_label_uses when we're outside
4041         a function scope.
4042         (mark_saved_scope): Mark function_decl and bindings.
4043         (maybe_push_to_top_level): Don't unconditionally push a new
4044         function context.  Save bindings and the current_function_decl.
4045         Don't clear named_labels.
4046         (pop_from_top_level): Pop function context if appropriate.
4047         (init_decl_processing): Set init_lang_status and free_lang_status,
4048         rather than save_lang_status and restore_lang_status.
4049         (start_function): Take SF_* flags.  Don't clear per-function data.
4050         Reorder and simplify to use new per-function data code.  Add
4051         asserts.
4052         (store_parm_decls): Don't call init_function_start here.
4053         (finish_function): Adjust for new handling of per-function data.
4054         (push_cp_function_context): Simplify.
4055         (mark_cp_function_context): Change binding_level to bindings.
4056         * decl2.c (clear_temp_name): Remove.
4057         (start_objects): Use SF flags to start_function.
4058         (start_static_storage_duration_function): Likewise.
4059         * except.c (start_anon_func): Remove redundant calls to 
4060         push_function_context_to.  Use SF flags to start function.
4061         (end_anon_func): Remove redundant call to pop_function_context
4062         from.
4063         * lex.c (reinit_parse_for_function): Don't initialize per-function 
4064         data.
4065         * method.c (emit_thunk): Clear current_function after calling
4066         assemble_end_function.  Use SF flags for start_function.
4067         (synthesize_method): Use SF flags for start_function.
4068         * parse.c: Regenerated.
4069         * parse.y (fn.defpen): Likewise.
4070         (pending_inline): Clear current_function, even if something goes
4071         wrong.
4072         * pt.c (instantiate_decl): Use SF flags to start_function.
4073         Don't save and restore expanding_p.
4074         (add_tree): Handle the case where we are outside any function.
4075         (end_tree): Likewise.
4076         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
4077         * semantics.c (begin_function_definition): Likewise.
4078         (expand_body): Likewise.
4079         
4080 1999-09-09  Nathan Sidwell  <nathan@acm.org>
4081
4082         * cp-tree.h (convert_to_void): Prototype new function.
4083         (require_complete_type_in_void): Remove prototype.
4084         * cvt.c (convert_to_void): New function.
4085         (ocp_convert): Use convert_to_void.
4086         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
4087         expressions.
4088         * typeck.c (require_complete_type_in_void): Remove function.
4089         (build_compound_expr): Use convert_to_void.
4090         (build_static_cast): Likewise.
4091         (build_c_cast): Likewise.
4092         * semantics.c (finish_expr_stmt): Do not decay full expressions.
4093         
4094         * typeck.c (build_x_compound_expr): Add FIXME.
4095
4096 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
4097
4098         * cp-tree.h (scratch_tree_cons): Remove.
4099         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
4100         and perm_tree_cons with plain tree_cons.
4101         * class.c: Likewise.
4102         * decl.c: Likewise.
4103         * decl2.c: Likewise.
4104         * except.c: Likewise.
4105         * expr.c: Likewise.
4106         * init.c: Likewise.
4107         * lex.c: Likewise.
4108         * method.c: Likewise.
4109         * parse.y: Likewise.
4110         * pt.c: Likewise.
4111         * repo.c: Likewise.
4112         * rtti.c: Likewise.
4113         * search.c: Likewise.
4114         * typeck.c: Likewise.
4115         * parse.c: Regenerated.
4116         * tree.c (build_srcloc): Simplify.
4117         
4118 1999-09-08  Bruce Korb  autogen@linuxbox.com
4119
4120         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
4121
4122 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
4123
4124         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
4125         Remove next.
4126         (LANG_DECL_PERMANENT): Remove.
4127         * decl.c (duplicate_decls): Don't mess about with obstacks trying
4128         to free memory.
4129         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
4130         * lex.c (free_lang_decl_chain): Remove.
4131         (build_lang_decl): Don't use obstacks.
4132         (retrofit_lang_decl): Likewise.
4133         (copy_lang_decl): Likewise.
4134
4135         * cp-tree.h (saved_scope): Remove old_binding_level and 
4136         function_decl.  Tidy up.
4137         * decl.c (mark_saved_scope): Don't set them.
4138         (maybe_push_to_top_level): Clear memory.
4139
4140         * decl.c (layout_var_decl): Change prototype.  Don't complete
4141         types for external objects.
4142         (check_initializer): Likewise.  Tidy.
4143         (initialize_local_var): Complete types here.
4144         (cp_finish_decl): Not here.  Reorganize a little.
4145         (grokvardecl): Don't complete types here.
4146
4147         * decl.c (start_function): Clear last_dtor_insn and
4148         last_parm_cleanup_insn. 
4149         (push_cp_function_context): Just copy over a little of
4150         the old context, not all of it.
4151
4152         * cp-tree.h (copy_to_permanent): Remove.
4153         (permanent_p): Likewise.
4154         * decl.c (building_typename_type): Don't use copy_to_permanent.
4155         (start_decl): Likewise.
4156         (grok_reference_init): Likewise.
4157         (cp_finish_decl): Likewise.
4158         * init.c (build_new_1): Don't use mapcar.
4159         (build_vec_delete_1): Don't use copy_to_permanent.
4160         (build_vec_init): Likewise.
4161         * parse.y (primary): Likewise.
4162         * parse.c: Regenerated.
4163         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
4164         (lookup_template_class): Likewise.
4165         (tsubst_friend_function): Likewise.
4166         (instantiate_class_template): Likewise.
4167         (tsubst_decl): Likewise.
4168         (tsubst): Likewise.
4169         (instantiate_template): Likewise.
4170         (unify): Likewise.
4171         * rtti.c (get_tinfo_fn): Likewise.
4172         (build_dynamic_cast): Likewise.
4173         * semantics.c (finish_if_stmt_cond): Likewise.
4174         (finish_while_stmt_cond): Likewise.
4175         (finish_do_stmt): Likewise.
4176         (finish_for_cond): Likewise.
4177         (finish_for_expr): Likewise.
4178         (finish_cleanup): Likewise.
4179         (add_decl_stmt): Likewise.
4180         (finish_named_return_value): Likewise.
4181         (finish_qualified_call_expr): Likewise.
4182         * tree.c (perm_manip): Remove.
4183         (build_exception_variant): Don't use copy_to_permanent.
4184         (permanent_p): Remove.
4185         (copy_to_permament): Remove.
4186         (build_min_nt): Don't use copy_to_permanent.
4187         (build_min): Likewise.
4188         (min_tree_cons): Likewise.
4189         * typeckc.c (build_static_cast): Likewise.
4190         (build_reinterpret_cast): Likewise.
4191         (build_const_cast): Likewise.
4192         
4193 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
4194
4195         * decl.c (ggc_p): Set it to 1.
4196         (mark_saved_scope): Add prototype.
4197
4198 1999-09-07  Richard Henderson  <rth@cygnus.com>
4199
4200         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
4201         * typeck.c (self_promoting_args_p): Delete.
4202
4203 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
4204
4205         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
4206         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
4207
4208 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
4209
4210         * Makefile.in (tree.o): Depend on ggc.h.
4211         * class.c (make_method_vec): Remove.
4212         (free_method_vec): Likewise.
4213         (free_method_vecs): Remove.
4214         (add_method): Don't use them.
4215         * cp-tree.def (PTRMEM_CST): Make it longer.
4216         (TEMPLATE_PARM_INDEX): Make it shorter.
4217         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
4218         (template_parm_index): Remove RTL field.
4219         (ptrmem_cst): Add RTL field.
4220         (finish_function): Removed parameter.
4221         (process_next_inline): Change prototype.
4222         (init_cplus_unsave): Rename to init_tree.
4223         (binding_init): Remove.
4224         * decl.c (free_binding_nodes): Remove.
4225         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
4226         (pop_binding): Don't use free_binding_nodes.
4227         (free_binding_vecs): Remove.
4228         (store_bindings): Don't use them.
4229         (pop_from_top_level): Likewise.
4230         (lookup_namespace_name): Simplify.
4231         (build_typename_type): Don't use obstack_free.
4232         (unqualified_namespace_lookup): Simplify.
4233         (lookup_name_real): Simplify.
4234         (start_function): Remove comment about leaks.
4235         (finish_function): Removed nested parameter.  Call
4236         expand_end_bindings even when building_stmt_tree.
4237         Call ggc_push_context and ggc_pop_context around
4238         rest_of_compilation, if necessary.
4239         (mark_cp_function_context): Handle a NULL language-context.
4240         (lang_mark_false_label_stack): Fix typo.
4241         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
4242         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
4243         pointer to method types.
4244         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
4245         * decl2.c (finish_objects): Adjust call to finish_function.
4246         (finish_static_store_duration_function): Likewise.
4247         (do_nonmember_using_decl): Remove call to binding_init.
4248         * except.c (end_anon_func): Adjust call to finish_function.
4249         * lex.c (mark_impl_file_chain): New function.
4250         (init_parse): Call init_tree, not init_cplus_unsave.
4251         Add GC roots.
4252         (cp_pramga_interface): Use xmalloc, not permalloc.
4253         (cp_pragma_implementation): Likewise.
4254         (begin_definition_of_inclass_inline): Simplify.
4255         (process_next_inline): Adjust prototype.
4256         (do_scoped_id): Don't call binding_init.
4257         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
4258         * method.c (emit_thunk): Adjust call to finish_function.
4259         (synthesize_method): Likewise.
4260         * parse.y (%union): Add a new `pi' variant.
4261         (PRE_PARSED_FUNCTION_DECL): Use it.
4262         (fn.defpen): Likewise.
4263         (fndef): Adjust call to finish_function.
4264         * pt.c (instantiate_decl): Likewise.
4265         * rtti.c (syntheisze_tinfo_fn): Likewise.
4266         * semantics.c (expand_body): Likewise.
4267         * tree.c: Include ggc.h.
4268         (mark_list_hash): New function.
4269         (binding_init): Remove.
4270         (init_cplus_unsave): Rename to ...
4271         (init_tree): This.  Add GC roots.
4272         
4273 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
4274
4275         Get ready for garbage collection.
4276         * Makefile.in (CXX_TREE_H): Add varray.h
4277         (lex.o): Depend on ggc.h.
4278         (decl.o): Likewise.
4279         (decl2.o): Likewise.
4280         (method.o): Likewise.
4281         (search.o): Likewise.
4282         (pt.o): Likewise.
4283         (repo.o): Likewise.
4284         * class.c: Include ggc.h.
4285         (current_class_name): Remove.
4286         (current_class_type): Likewise.
4287         (current_access_specifier): Likewise.
4288         (previous_class_type): Likewise.
4289         (previous_class_values): Likewise.
4290         (class_cache_firstobj): Likewise.
4291         (current_lang_base): Likewise.
4292         (current_lang_stack): Likewise.
4293         (current_lang_stacksize): Likewise.
4294         (lang_name_c): Likewise.
4295         (lang_name_cplusplus): Likewise.
4296         (lang_name_java): Likewise.
4297         (current_lang_name): Likewise.
4298         (base_layout_decl): Likewise.
4299         (access_default_node): Likewise.
4300         (access_public_node): Likewise.
4301         (access_protected_node): Likewise.
4302         (access_private_node): Likewise.
4303         (access_default_virtual_node): Likewise.
4304         (access_public_virtual_node): Likewise.
4305         (access_protected_virtual_node): Likewise.
4306         (access_private_virtual_node): Likewise.
4307         (signed_zero_node): Likewise.
4308         (init_class_processing): Don't build base_layout_decl.
4309         (push_lang_context): Adjust now that current_lang_base is a varray.
4310         (pop_lang_context): Likewise.
4311         * cp-tree.h: Include varray.h.
4312         (cp_global_trees): Add access_default, access_public,
4313         access_protected, access_private, access_default_virtual,
4314         access_public_virtual, access_protected_virtual,
4315         access_private_virtual, ctor_identifier, delta2_identifier, 
4316         delta_identifier, dtor_identifier, in_charge_identifier,
4317         index_identifier, nelts_identifier, this_identifier,
4318         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
4319         lang_name_c, lang_name_cplusplus, lang_name_java,
4320         empty_except_spec, null, jclass, minus_one, terminate.
4321         (saved_scope): Move here from decl.c.  Define globals in terms of
4322         saved_scope: current_namespace, current_class_name,
4323         current_class_type, current_access_specifier, current_lang_stack,
4324         current_lang_base, current_lang_name, current_function_parms,
4325         current_template_parms, processing_template_decl,
4326         processing_specialization, processing_explicit_instantiation,
4327         previous_class_type, previous_class_values, class_cache_firstobj.
4328         (scope_chain): New variable.
4329         (init_pt): New function.
4330         * decl.c (current_namespace): Remove.
4331         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
4332         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
4333         (delta_identifier, delta2_identifier): Likewise.
4334         (pfn_or_delta2_identifier, tag_identifier): Likewise
4335         (vt_off_identifier, empty_except_spec, null_node): Likewise.
4336         (current_function_parms, current_lang_base): Remove.
4337         (current_lang_stack, previous_class_values): Remove.
4338         (class_binding_level): Macroize.
4339         (saved_scope): Remove.
4340         (current_saved_scope): Rename to scope_chain.
4341         (mark_saved_scope): Adjust for new scope structure.
4342         (maybe_push_to_top_level): Likewise.
4343         (pop_from_top_level): Likewise.
4344         (duplicate_decls): Adjust now that current_lang_base is a varray.
4345         (build_typename_type): Call ggc_add_tree_hash_table_root.
4346         (init_decl_processing): Call init_pt.  Call push_to_top_level to
4347         set up globals.  Add GC roots.
4348         (xref_basetypes): Adjust now that current_lang_base is a varray.
4349         * decl.h (this_identifier): Remove.
4350         (in_charge_identifier): Likewise.
4351         * decl2.c: Don't include varray.h.
4352         (current_namespace): Remove.
4353         (init_decl2): Add GC roots.
4354         * except.c (Terminate): Remove. 
4355         (init_exception_processing): Use terminate_node instead.
4356         (build_terminate_handler): Likewise.
4357         * init.c (nc_nelts_field_id): Remove.
4358         (minus_one): Likewise.
4359         (init_init_processing): Use minus_one_node and nelts_identifier
4360         instead.  Add GC roots.
4361         (jclass_node): Remove.
4362         (build_new_1): Use nelts_identifier.
4363         (build_vec_init): Likewise.
4364         (build_vec_delete): Likewise.
4365         * lex.c: Include ggc.h.
4366         (defarg_fn): Move declaration early.
4367         (defarg_parms): Likewise.
4368         (init_parse): Add GC roots.
4369         (handle_cp_pragma): Remove redundant declaration of
4370         pending_vtables.
4371         * method.c: Include ggc.h.
4372         (btypelist): Make it a varray.  All uses changed.
4373         (ktypelist): Likewise.
4374         (init_method): Add GC roots.
4375         * pt.c: Don't include varray.h.  Include ggc.h.
4376         (current_template_parms): Remove.
4377         (processing_template_decl): Likewise.
4378         (processing_specialization): Likewise.
4379         (processing_explicit_instantiation): Likewise.
4380         (init_pt): New function.
4381         * repo.c: Include ggc.h.
4382         (init_repo): Add GC roots.
4383         * search.c: Don't include varray.h.
4384         (_vptr_name): Remove.
4385         (lookup_field_1): Use vtpr_identifier instead.
4386         (expand_indirect_vtbls_init): Remove redundant declaration of
4387         in_charge_identifier.
4388         (init_search_processing): Use vptr_identifier.
4389         
4390 1999-09-05  Richard Henderson  <rth@cygnus.com>
4391             Bernd Schmidt <bernds@cygnus.co.uk>
4392             Mark Mitchell  <mark@codesourcery.com>
4393
4394         * Makefile.in (parse.o): Depend on ggc.h.
4395         (decl2.o): Depend on ggc.h.
4396         (init.o): Depend on ggc.h.
4397         * cp-tree.h (init_decl2): Declare.
4398         (cp_parse_init): Likewise.
4399         * decl.c (ggc_p): Define to zero.
4400         (mark_saved_scope): New function.
4401         (init_decl_processing): Call cp_parse_init, and cp_decl2.
4402         Register GC roots.
4403         (expand_static_init): Add GC roots.
4404         * decl2.c: Include ggc.h.
4405         (init_decl2): New function.
4406         * init.c: Include ggc.h.
4407         (init_init_processing): Add GC roots.
4408         * parse.y: Include ggc.h.
4409         (cp_parse_init): New function.
4410         
4411 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
4412
4413         * decl.c (init_decl_processing): Set mark_lang_status.
4414         (lang_mark_false_label_stack): Adjust prototype.
4415         * decl2.c (grok_function_init): Remove extraneous declaration of
4416         abort_fndecl.
4417
4418         * Make-lang.in (cc1plus): Remove dependency on GGC.
4419         * Makefile.in (OBJS): Don't mention ggc-simple.o.
4420         (OBJDEPS): Don't mention ggc-simple.o.
4421
4422         * Make-lang.in (cc1plus): Depend on $(GGC).
4423         * Makefile.in (OBJS): Add ggc-simple.o.
4424         (OBJDEPS): Likewise.
4425         * cp-tree.h (language_function): Rename members to `x_' versions;
4426         we now have x_named_labels, x_ctor_label, x_dtor_label,
4427         x_base_init_list, x_member_init_list, x_base_init_expr,
4428         x_current_class_ptr, x_current_class_ref, x_last_tree,
4429         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
4430         x_result_rtx. 
4431         (dtor_label, ctor_label, current_base_init_list,
4432         current_member_init_list, base_init_expr, current_class_ptr,
4433         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
4434         * decl.c: Include ggc.h.
4435         (last_dtor_insn): Adjust to use x_ names.
4436         (last_parm_cleanup_insn): Likewise.
4437         (original_result_rtx): Likewise.
4438         (named_labels): Likewise.
4439         (mark_binding_level): New function.
4440         (mark_cp_function_context): Likewise.
4441         (mark_false_label_stack): Likewise.
4442         (lang_mark_tree): Likewise.
4443         (lang_cleanup_tree): Likewise.
4444         
4445 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
4446
4447         * Makefile.in (CXX_TREE_H): Include function.h.
4448         (decl.o): Don't depend on function.h.
4449         (decl2.o): Likewise.
4450         (typeck.o): Likewise.
4451         (init.o): Likewise.
4452         (method.o): Likewise.
4453         * cp-tree.h: Include function.h.
4454         (cp_function): Rename to language_function.  Remove next.
4455         (cp_function_chain): Make it a macro, not a variable.
4456         (push_cp_function_context): Don't declare.
4457         (pop_cp_function_context): Likewise.
4458         * decl.c: Don't include function.h.
4459         (push_cp_function_context): Make it static.  Make it suitable for
4460         a save_lang_status callback.
4461         (pop_cp_function_context): Likewise.
4462         (maybe_push_to_top_level): Call push_function_context_to, not
4463         push_cp_function_context.
4464         (pop_from_top_level): Call pop_function_context_from, not
4465         pop_cp_function_context.
4466         (init_decl_processing):  Set save_lang_status and
4467         restore_lang_status.  Call push_function_context_to, not
4468         push_cp_function_context.
4469         (cp_function_chain): Remove.
4470         * decl2.c: Don't include function.h.
4471         * except.c: Don't include function.h.
4472         (start_anon_func): Call push_function_context_to, not
4473         push_cp_function_context.
4474         (end_anon_func):  Call pop_function_context_from, not
4475         pop_cp_function_context.
4476         * init.c: Don't include function.h.
4477         * lex.c (begin_definition_of_inclass_inline): Call
4478         push_function_context_to, not push_cp_function_context. 
4479         (process_next_inline):  Call pop_function_context_from, not
4480         pop_cp_function_context.
4481         * method.c: Don't include function.h.
4482         (synthesize_method): Call push_function_context_to, not
4483         push_cp_function_context.  Call pop_function_context_from, not
4484         pop_cp_function_context.
4485         * typeck.c: Don't include function.h.
4486         
4487         * decl.c (expand_static_init): Tweak handling of static
4488         initializations for objects without constructors.
4489
4490 1999-09-03  Nathan Sidwell  <nathan@acm.org>
4491
4492         * typeck.c (build_indirect_ref): Reject dereference of pointer to
4493         void.
4494
4495 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
4496
4497         * cp-tree.h (cp_function): Move here, from decl.c.
4498         (cp_function_chain): Declare.
4499         (dtor_label): New macro, instead of variable.
4500         (ctor_label): Likewise.
4501         (current_base_init_list): Likewise.
4502         (current_member_init_list): Likewise.
4503         (base_init_expr): Likewise.
4504         (current_class_ptr): Likewise.
4505         (current_class_ref): Likewise.
4506         (last_tree): Likewise.
4507         (last_expr_type): Likewise.
4508         (current_function_returns_value): Likewise.
4509         (current_function_returns_null): Likewise.
4510         (current_function_just_assigned_this): Likewise.
4511         (current_function_parms_stored): Likewise.
4512         (temp_name_counter): Likewise.
4513         (static_labelno): Likewise.
4514         (expanding_p): Likewise.
4515         (stmts_are_full_exprs_p): Likewise.
4516         (in_function_try_handler): Likewise.
4517         (lang_type): Remove nested type_flags.  All uses changed.
4518         * call.c (ctor_label): Remove.
4519         (dtor_label): Likewise.
4520         * class.c (current_class_ptr): Remove.
4521         (current_class_ref): Likewise.
4522         * decl.c (static_labelno): Remove.
4523         (dtor_label): Likewise.
4524         (last_dtor_insn): New macro, instead of variable.
4525         (last_parm_cleanup_insn): Likewise.
4526         (original_result_rtx): Likewise.
4527         (in_function_try_handler): Remove.
4528         (named_label_uses): New macro, instead of variable.
4529         (named_labels): Likewise.
4530         (current_function_returns_value): Remove.
4531         (current_function_returns_null): Likewise.
4532         (current_function_assigns_this): New macro, instead of variable.
4533         (current_function_just_assigned_this): Likewise.
4534         (current_binding_level): Likewise.
4535         (init_decl_processing): Call push_cp_function_context.
4536         (cp_function): Move to cp-tree.h
4537         (cp_function_chain): Make it global.
4538         (temp_name_counter): Remove.
4539         (push_cp_function_context): Simplify.
4540         (pop_cp_function_context): Likewise.
4541         * decl2.c (temp_name_counter): Remove.
4542         * init_c (current_base_init_list): Likewise.
4543         (current_member_init_list): Likewise.
4544         (base_init_expr): Likewise.
4545         * method.c (static_labelno): Likewise.
4546         * pt.c (last_tree): Likewise.
4547         * semantics.c (expanding_p): Likewise.
4548         (stmts_are_full_exprs_p): Likewise.
4549         (last_expr_type): Likewise.
4550         * typeck.c (dtor_label): Likewise.
4551         (ctor_label): Likewise.
4552         
4553 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
4554
4555         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
4556         (arg_assoc_class): Use arg_assoc_template_arg for template
4557         arguments. 
4558         (arg_assoc): Likewise.
4559         * pt.c (mangle_class_name_for_template): Allow member template
4560         template arguments.
4561
4562 1999-09-02  Nathan Sidwell  <nathan@acm.org>
4563
4564         * call.c (build_conditional_expr): Warn on enum mismatches.
4565         (convert_arg_to_ellipsis): Move non-pod check to after
4566         conversion.
4567
4568 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4569
4570         * gxx.gperf (hash, is_reserved_word): Add prototypes.
4571
4572         * init.c (build_vec_init): Initialize variable `try_block'.
4573
4574         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
4575         Likewise for bzero/memset.
4576         (token_getch, token_put_back): Add static prototypes.  Remove
4577         `inline' from the definitions.
4578         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
4579
4580 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
4581
4582         * cp-tree.h (lang_type): Move align into type_flags.
4583         (CLASSTYPE_ALIGN): Adjust accordingly.
4584         * call.c (direct_reference_binding): Remove misleading comment.
4585
4586 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4587
4588         * parse.y (language_string): Constify.
4589
4590 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4591
4592         * repo.c (getpwd): Don't prototype.
4593         * xref.c (getpwd): Likewise
4594
4595 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4596
4597         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
4598         Remove hacks for stuff which now comes from libiberty.
4599
4600 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
4601
4602         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
4603
4604 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
4605
4606         * cp-tree.h (begin_init_stmts): Declare.
4607         (finish_init_stmts): Likewise.
4608         * cvt.c (build_up_reference): Wrap the declaration of a temporary
4609         in a statement-expression so that we will see it when expanding
4610         tree structure later.
4611         * init.c (begin_init_stmts): Don't make it static.
4612         (finish_init_stmts): Likewise.
4613
4614         * cp-tree.h (start_handler_parms): New function.
4615         (expand_start_catch_block): Take only one parameter.
4616         (start_handler_parms): New function.
4617         * decl.c (start_handler_parms): Define it.
4618         * except.c (process_start_catch_block): Take only one parameter.
4619         Don't call grokdeclarator here.
4620         (expand_start_catch_block): Don't call grokdeclarator here,
4621         either.
4622         * parse.y (handler_args): Adjust call to
4623         expand_start_catch_block.  Use start_handler_parms.
4624         * pt.c (push_template_decl_real): Make permanent lists have
4625         permanent elements.
4626         (tsubst_expr): Adjust calls to expand_start_catch_block
4627         appropriately.
4628         * semantics.c (expand_stmt): Likewise.
4629         
4630 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
4631
4632         * pt.c (push_template_decl_real): Use template declaration from
4633         class type if it exists.
4634
4635 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
4636
4637         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
4638         (maybe_inject_for_scope_var): Declare it.
4639         (initialize_local_var): Likewise.
4640         * decl.c (maybe_inject_for_scope_var): Make it global.
4641         (initialize_local_var): Likewise.  Move cleanup handling here,
4642         from cp_finish_decl.
4643         (make_rtl_for_nonlocal_decl): Use
4644         push_obstacks_nochange/pop_obstacks, rather than
4645         end_temporary_allocation/resume_temporary_allocation.
4646         (cp_finish_decl): Try to complete the type of a variable when it
4647         is declared.  Move cleanup-handling to initialize_local_var.
4648         (expand_static_init): Use tree-building code, rather than
4649         RTL-building code.
4650         * decl2.c (get_temp_name): Assert non-initializedness of
4651         temporaries.
4652         * init.c (create_temporary_var): Move RTL-assigning code to ...
4653         (get_temp_regvar): Here.
4654         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
4655         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
4656         call initialize_local_var to generate initialization code.
4657         
4658 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4659
4660         * cp-tree.h (fndecl_as_string, type_as_string,
4661         type_as_string_real, args_as_string, decl_as_string,
4662         expr_as_string, code_as_string, language_as_string,
4663         parm_as_string, op_as_string, assop_as_string, cv_as_string,
4664         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
4665
4666         * errfn.c (cp_printer): Likewise.
4667
4668         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
4669         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
4670         cp_file_of, code_as_string, language_as_string, parm_as_string,
4671         op_as_string, assop_as_string, args_as_string, cv_as_string):
4672         Likewise.
4673
4674         * tree.c (lang_printable_name): Likewise.
4675
4676 1999-08-28  Richard Henderson  <rth@cygnus.com>
4677
4678         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
4679
4680 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
4681
4682         * cp-tree.h (strip_array_types): New function.
4683         * decl.c (maybe_deduce_size_from_array_init): New function, split
4684         out from cp_finish_decl.
4685         (layout_var_decl): Likewise.
4686         (maybe_commonize_var): Likewise.
4687         (maybe_inject_for_scope_var): Likewise.
4688         (initialize_local_var): Likewise.
4689         (build_cleanup_on_safe_obstack): Likewise.
4690         (check_initializer): Likewise.
4691         (make_rtl_for_nonlocal_decl): Likewise.
4692         (cp_finish_decl): Use them.
4693         * typeck.c (strip_array_types): New function.
4694         
4695         * cp-tree.def (LABEL_STMT): New tree node.
4696         * cp-tree.h (LABEL_STMT_LABEL): New macro.
4697         (shadow_label): Remove.
4698         (declare_local_label): New function.
4699         (finish_label_decl): Likewise.
4700         * decl.c (make_label_decl): New function, split out from
4701         lookup_label.
4702         (shadowed_labels): Remove.
4703         (binding_level): Add shadowed_labels.
4704         (clear_binding_level): Remove.
4705         (push_binding_level): Just bzero the new binding level.
4706         (pushlevel): Fix indentation.
4707         (pop_label): New function.
4708         (pop_labels): Likewise, split out from poplevel.
4709         (poplevel): Pop local labels.  Use pop_labels.
4710         (maybe_push_to_top_level): Don't clear shadowed_labels.
4711         (lookup_label): Use make_label_decl.
4712         (shadow_label): Remove.
4713         (declare_local_label): New function.
4714         (define_label): Simplify.
4715         (start_function): Don't clear shadowed_labels.
4716         (cp_function): Remove shadowed_labels.
4717         (push_cp_function_context): Don't save shadowed_labels.
4718         (pop_cp_function_context): Don't restore it.
4719         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
4720         * parse.y (label_decl): Use finish_label_decl.
4721         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
4722         declarations.
4723         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
4724         building_stmt_tree.
4725         (finish_label_decl): New function.
4726         (expand_stmt): Handle LABEL_STMTs and local label declarations.
4727         
4728 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
4729
4730         * decl.c (lookup_label): Build labels on the permanent obstack
4731         when building statement trees.  Don't build RTL for labels when
4732         building statement trees.
4733         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
4734         building statement trees.
4735         (finish_label_stmt): Likewise.
4736         (expand_stmt): Adjust accordingly.
4737         * pt.c (tsubst_expr); Likewise.
4738         (do_decl_instantiation): Robustify.
4739         
4740         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
4741         * tree.c (build_cplus_new): Set it.
4742         * expr.c (cplus_expand_expr): Use it.
4743         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
4744         
4745         * decl.c (store_parm_decls): Reset immediate_size_expand.
4746         (finish_function): Likewise.
4747         
4748         * tree.c (cplus_unsave_expr_now): Don't return a value.
4749
4750         * semantics.c (do_poplevel): Always initialize the return value.
4751
4752 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
4753
4754         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
4755         * tree.h (cplus_unsave_expr_now) : Same.
4756
4757 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
4758
4759         * decl.c (grokdeclarator): Amend comment.
4760         * except.c (expand_start_catch_block): Call push_template_decl for
4761         catch-block parameters.
4762         * method.c (synthesize_method): Build an empty compound statement
4763         for the body of a constructor.
4764
4765 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
4766
4767         * tree.c (cp_build_qualified_type_real): If we're asking for the
4768         same quals we already have, just return.
4769
4770 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
4771
4772         * cp-tree.def (SUBOBJECT): New tree node.
4773         * cp-tree.h (CLEANUP_P): New macro.
4774         (SUBOBJECT_CLEANUP): Likewise.
4775         (keep_next_level): Add parameter.
4776         (get_temp_regvar): Don't declare.
4777         (emit_base_init): Remove parameter.
4778         (expand_aggr_init): Rename to build_aggr_init.
4779         (expand_vec_init): Rename to build_vec_init.
4780         (do_pushlevel): Remove.
4781         (do_poplevel): Likewise.
4782         (finish_cleanup): New function.
4783         (finish_subobject): Likewise.
4784         (stmts_are_full_exprs_p): New variable.
4785         * decl.c (keep_next_level): Add parameter.
4786         (cp_finish_decl): Use build_aggr_init, not
4787         expand_aggr_init.  Use finish_expr_stmt to expand the code.
4788         (expand_static_init): Use tree-generating, not RTL-generating,
4789         functions to handle the initialization.
4790         (start_function): Remove dead code.  Always have a momentary
4791         obstack inside the function, even before hitting the first curly
4792         brace.
4793         (cplus_expand_expr_stmt): Move calls to
4794         expand_{start,end}_target_temps into semantics.c.
4795         (cp_function): Add stmts_are_full_exprs_p.
4796         (push_cp_function_context): Save it.
4797         (pop_cp_function_context): Restore it.
4798         * decl2.c (get_temp_regvar): Move to init.c.
4799         (do_static_initialization): Use build_{aggr,vec}_init.
4800         (do_static_destruction): Fix typo in comment.
4801         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
4802         * except.c (expand_throw): Use create_temporary_var.
4803         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
4804         * init.c (expand_vec_init_try_block): Remove.
4805         (expand_vec_init_catch_clause): Likewise.
4806         (get_temp_regvar): New function.
4807         (begin_init_stmts): Likewise.
4808         (finish_init_stmts): Likewise.
4809         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
4810         structure here.
4811         (emit_base_init): Likewise.  Remove unused parameter.
4812         (expand_virtual_init): Likewise.
4813         (expand_cleanup_for_base): Use finish_subobject.
4814         (expand_aggr_vbase_init_1): Simplify.
4815         (construct_virtual_bases): Use tree-generating functions to build
4816         up initialization.
4817         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
4818         (expand_default_init): Likewise.
4819         (expand_aggr_init_1): Likewise.
4820         (expand_vec_init): Rename to build_vec_init.
4821         * method.c (do_build_copy_constructor): Use tree-generating
4822         functions.  Don't call clear_last_expr.
4823         (do_build_assign_ref): Likewise.
4824         (synthesize_method): Call clear_last_expr here.
4825         * parse.y (base_init): Don't call clear_last_expr here.
4826         (nodecls): Likewise.
4827         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
4828         * semantics.c (do_pushlevel): Move to here.
4829         (do_poplevel): Likewise.
4830         (stmts_are_full_exprs_p): New variable.
4831         (finish_expr_stmt): Handle logic for temoprary cleanup here.
4832         (finish_for_stmt): Use finish_expr_stmt.
4833         (finish_cleanup): New function.
4834         (finish_function_try_block): Fix indentation.
4835         (finish_subobject): New function.
4836         (setup_vtbl_ptr): Call keep_next_level here.
4837         (finish_stmt_expr): Handle a block with no scope inside the
4838         statement-expression.
4839         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
4840         SUBOBJECT.
4841         * tree.c (search_tree): Handle INIT_EXPR.
4842         (mapcar): Likewise.
4843         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
4844         * typeck2.c (store_init_value): Change expand_aggr_init to
4845         build_aggr_init in comment.
4846         
4847 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
4848
4849         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
4850
4851 1999-08-25  Nathan Sidwell  <nathan@acm.org>
4852
4853         * decl2.c (handle_class_head): Be graceful about additional
4854         scope qualifiers. Adjust comments to reflect reality.
4855
4856 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
4857
4858         * call.c (build_conditional_expr): Fix typo.
4859         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
4860         lvalue before trying to mess with the sides.
4861
4862         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
4863
4864 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
4865
4866         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
4867
4868 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
4869
4870         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
4871         Return arbitrary pointer or NULL.
4872         (check_eh_spec): Call __throw_type_match_rtti_2.
4873         * tinfo.h (*::dcast): Return int.  Add valp parm.
4874         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
4875         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
4876         (__throw_type_match_rtti): Now just a wrapper.
4877
4878         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
4879         (init_exception_processing): Don't initialize them.
4880
4881 1999-08-23  Paul Burchard <burchard@pobox.com>
4882
4883         * decl.c (check_default_argument): Fix typo.
4884
4885 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
4886
4887         * cp-tree.def (STMT_EXPR): Fix typo in node name.
4888
4889         * dump.c (dump_next_stmt): New function.
4890         (dequeue_and_dump): Use it.
4891         
4892         * pt.c (tsubst_copy): Make sure to initialize return value for a
4893         STMT_EXPR, even when processing_template_decl.
4894         * semantics.c (finish_stmt_expr): A statement-expression whose
4895         last statement is not an expression-statement has type `void'.  
4896         
4897 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
4898
4899         * semantics.c (finish_stmt_expr): Fix typo in comment.
4900         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
4901         (mapcar): Likewise.
4902         * init.c (build_vec_delete_1): Make the children of a permanent
4903         BIND_EXPR permanent.
4904         * pt.c (register_specialization): Don't register a specialization
4905         more than once.
4906         
4907 1999-08-18  Andrew Haley  <aph@cygnus.com>
4908
4909         * method.c (process_overload_item): Call build_mangled_C9x_name ()
4910         for all integer parameter types larger than long long.
4911
4912 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
4913
4914         * pt.c (redeclare_class_template): Merge default template
4915         arguments in both directions.
4916
4917         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
4918         compiler_error message.
4919
4920 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
4921
4922         * cp-tree.h: Declare flag_use_repository.
4923         * pt.c (do_decl_instantiation): Don't complain about duplicate
4924         instantiation with -frepo.
4925         (do_type_instantiation): Likewise.
4926
4927         * pt.c (push_template_decl_real): Complain about everything
4928         that isn't a valid template.
4929
4930         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
4931         affect inlines.
4932
4933 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
4934
4935         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
4936         * decl2.c (build_expr_from_tree): Handle it.
4937         * error.c (dump_expr): Likewise.
4938         * pt.c (for_each_template_parm): Likewise.
4939         (tsubst_copy): Likewise.
4940         * tree.c (search_tree): Likewise.
4941         * semantics.c (finish_pseudo_destructor_call): Create it.
4942         
4943 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
4944
4945         * search.c (setup_class_bindings): Robustify.
4946         * typeck.c (common_type): Use same_type_p, not pointer equality,
4947         to compare types.
4948
4949         * cp-tree.h (build_lang_field_decl): Remove.
4950         * class.c (build_vtable): Replace calls to build_lang_field_decl
4951         with build_lang_decl.
4952         (prepare_fresh_vtable): Likewise.
4953         (finish_struct_1): Likewise.
4954         (init_class_processing): Likewise.
4955         * decl.c (push_using_decl): Likewise.
4956         (init_decl_processsing): Likewise.
4957         (grokvardecl): Likewise.
4958         (build_ptrmemfunc_type): Likewise.
4959         (grokdeclarator): Likewise.
4960         (build_enumerator): Likewise.
4961         * decl2.c (grok_x_components): Likewise.
4962         (do_class_using_decl): Likewise.
4963         * except.c (call_eh_info): Likewise.
4964         * init.c (init_init_processing): Likewise.
4965         * rtti.c (expand_class_decl): Likewise.
4966         * tree.c (build_base_fields): Likewise.
4967         (build_vbase_pointer_fields): Likewise.
4968         * lex.c (build_lang_decl): Build declarations on the permanent
4969         obstack if we're building statmeent trees.
4970         (retrofit_lang_decl): Handle both the full lang_decl and also the
4971         smaller lang_decl_flags here.
4972         (build_lang_field_decl): Remove.
4973         * pt.c (push_template_decl_real): Issue errors for variable
4974         declarations that are not static members.
4975
4976 1999-08-18  Richard Henderson  <rth@cygnus.com>
4977
4978         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
4979         (mapcar): Likewise.
4980
4981 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
4982
4983         * cp-tree.h (back_end_hook): New variable.
4984         * decl2.c (back_end_hook): Define it.
4985         (finish_file): If it's non-NULL, call it.
4986
4987         * decl.c (add_decl_to_level): New function.
4988         (push_local_binding): Use it.
4989         (find_binding): Fix typo in comment.
4990         (pushdecl): Use add_decl_to_level.  Put templates on the
4991         corresponding namespace-scope binding levels.
4992         * dump.c (dequeue_and_dump): Print the specializations of a
4993         template.
4994         * pt.c (push_template_decl_real): Don't push a template multiple
4995         times.
4996
4997 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
4998
4999         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
5000         (CALL_DECLARATOR_QUALS): Likewise.
5001         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
5002         * decl.c (grokdeclarator): Adjust to use them.
5003         * decl2.c (grokfield): Likewise.
5004         (reparse_absdcl_as_casts): Likewise.
5005         * lex.c (make_call_declarator): Likewise.
5006         (set_quals_and_spec): Likewise.
5007         * pt.c (tsubst): Likewise.
5008         * tree.c (mapcar): Remove special hack to handle third operand of
5009         a CALL_EXPR.
5010
5011 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
5012
5013         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
5014         * class.c (build_vtable): Use build_lang_field_decl to build the
5015         VAR_DECLs for vtables.
5016         (prepare_fresh_vtable): Likewise.
5017         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
5018         CAN_HAVE_FULL_LANG_DECL_P.
5019         (push_using_decl): Use build_lang_decl to build USING_DECLs.
5020         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
5021         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
5022         (build_lang_field_decl): Likewise.
5023         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
5024         to copy.
5025         
5026         * cp-tree.def (STMT_EXPR): New tree node.
5027         * cp-tree.h (STMT_EXPR_STMT): New macro.
5028         (store_return_init): Change prototype.
5029         (finish_named_return_value): New function.
5030         (expand_stmt): Likewise.
5031         (expand_body): Likewise.
5032         (begin_stmt_tree): Likewise.
5033         (finish_stmt_tree): Likewise.
5034         (expanding_p): New variable.
5035         (last_expr_type): Likewise.
5036         (building_stmt_tree): New macro.
5037         * decl.c (start_function): Use building_stmt_tree, not
5038         processing_template_decl, where appropriate.
5039         (store_parm_decls): Likewise.
5040         (store_return_init): Move most of the body to semantics.c.
5041         (finish_function): Use building_stmt_tree.
5042         (finish_stmt): Clear last_expr_type here.
5043         (cp_function): Add expanding_p, last_tree, last_expr_type.
5044         (push_cp_function_context): Save them.
5045         (pop_cp_function_context): Restore them.
5046         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
5047         * error.c (dump_expr): Handle STMT_EXPR.
5048         * except.c (expand_start_catch_block): Use building_stmt_tree.
5049         Use add_decl_stmt.
5050         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
5051         (do_case): Move add_tree call to semantics.c.
5052         * parse.y (return_init): Use finish_named_return_value.
5053         (for.init.statement): Use finish_expr_stmt.
5054         * parse.c: Regenerated.
5055         * pt.c (do_pushlevel): Move to semantics.c.
5056         (do_poplevel): Likewise.
5057         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
5058         (tsubst_expr): Don't expand all the way to RTL here.  Handle
5059         RETURN_INIT and CTOR_INITIALIZER.
5060         (instantiate_decl): Call expand_body after tsubst'ing into
5061         DECL_SAVED_TREE.
5062         * semantics.c (expand_stmts): New function.
5063         (expanding_p): New variable.
5064         (last_expr_type): Likewise.
5065         (finish_expr_stmt): Use building_stmt_tree.
5066         (begin_if_stmt): Likewise.
5067         (finish_if_stmt_cond): Likewise.
5068         (finish_then_clause): Likewise.
5069         (begin_else_clause): Likewise.
5070         (finish_else_clause): Likewise.
5071         (begin_while_stmt): Likewise.
5072         (finish_while_stmt_cond): Likewise.
5073         (finish_while_stmt): Likewise.
5074         (finish_do_body): Likewise.
5075         (finish_do_stmt): Likewise.
5076         (finish_return_stmt): Likewise.
5077         (begin_for_stmt): Likewise.
5078         (fnish_for_init_stmt): Likewise.
5079         (finish_for_cond): Likewise.
5080         (finish_for_expr): Likewise.
5081         (finish_for_stmt): Likewise.
5082         (finish_break_stmt): Likewise.
5083         (finish_continue_stmt): Likewise.
5084         (finish_switch_cond): Likewise.
5085         (finish_switch_stmt): Likewise.
5086         (finish_case_label): Call add_tree here if necessary.
5087         (finish_goto_statement): Use building_stmt_tree.
5088         (begin_try_block): Likewise.
5089         (begin_function_try_block): Likewise.
5090         (finish_try_block): Likewise.
5091         (finish_function_try_block): Likewise.
5092         (finish_handler_sequence): Likewise.
5093         (finish_function_handler_sequence): Likewise.
5094         (begin_handler): Likewise.
5095         (finish_handler_parms): Likewise.
5096         (finish_handler): Likewise.
5097         (begin_compound_stmt): Likewise.
5098         (finish_compound_stmt): Likewise.
5099         (finish_asm_stmt): Likewise.
5100         (finish_label_stmt): Likewise.
5101         (finish_named_return_value): New function.
5102         (setup_vtbl_ptr): Moved here from decl2.c.
5103         (do_pushlevel): Moved here from pt.c.
5104         (do_poplevel): Likewise.
5105         (begin_stmt_expr): Use building_stmt_tree.
5106         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
5107         when building_stmt_tree.
5108         (begin_stmt_tree): New function.
5109         (finish_stmt_tree): Likewise.
5110         (expand_stmt): Likewise.
5111         (expand_body): Likewise.
5112         * tree.c (build_cplus_method_type): Make sure the argument types
5113         end up on the same obstack as the METHOD_TYPE.
5114         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
5115         THROW_EXPR, STMT_EXPR.
5116         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
5117         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
5118         sorry, if an unsupported node is encountered.
5119         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
5120         (c_expand_return): Don't call add_tree here.
5121         
5122 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
5123
5124         * pt.c (check_default_tmpl_args): Don't check in local scopes.
5125         (tsubst_decl): Make sure the declaration is on a saveable
5126         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
5127         variable.
5128         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
5129         
5130 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
5131
5132         Speed up Koenig lookup.
5133         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
5134         to return namespaces we've looked at.
5135         * decl2.c (lookup_using_namespace): Likewise.
5136         (add_function): Don't call ovl_member.
5137         (lookup_arg_dependent): Initialize k.namespaces to the list of 
5138         namespaces seen in unqualified lookup.
5139         * call.c (equal_functions): Move here from tree.c.
5140         (joust): Use it to handle duplicate candidates.
5141         * tree.c (ovl_member): Use ==.
5142
5143 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
5144
5145         * cp-tree.def (DECL_STMT): Make it smaller.
5146         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
5147         (lang_decl): ... here.  Add next.
5148         (DECL_SAVED_TREE): Adjust accordingly.
5149         (DECL_IMPLICIT_TYPEDEF_P): New macro.
5150         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
5151         (DECL_STMT_DECL): Likewise.
5152         (create_implicit_typedef): New function.
5153         (maybe_push_decl): Likewise.
5154         (tsubst_default_argument): New function.
5155         (at_function_scope_p): Likewise.
5156         (add_decl_stmt): Likewise.
5157         (push_permanent_obstack): Likewise.
5158         * call.c (convert_default_arg): Use tsubst_default_argument.
5159         * class.c (add_method): Use push_permanent_obstack.
5160         (build_self_reference): Create a TEMPLATE_DECL for the
5161         self-reference, if necessary.
5162         * decl.c (pseudo_global_level_p): Only look at the current binding
5163         level.
5164         (push_binding): Use push_permanent_obstack.
5165         (create_implicit_typedef): New function.
5166         (pushtag): Use it.
5167         (duplicate_decls): Use push_permanent_obstack.
5168         (maybe_push_decl): New function.
5169         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
5170         (start_decl_1): Remove dead code.
5171         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
5172         pseudo_global_level_p.
5173         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
5174         template.
5175         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
5176         pseudo_global_level_p.
5177         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
5178         a template.
5179         (get_sentry): Use push_permanent_obstack.
5180         * dump.c (dequeue_and_dump): Enable DECL_STMT.
5181         * except.c (call_eh_info): Use push_permanent_obstack.
5182         (build_eh_type_ref): Likewise.
5183         (do_pop_exception): Likewise.
5184         (expand_eh_spec): Likewise.
5185         (alloc_eh_object): Likewise.
5186         (expand_throw): Likewise.
5187         * init.c (build_java_class_ref): Likewise.
5188         * lex.c (get_time_identifier): Likewise.
5189         (free_lang_decl_chain): Correct type.
5190         (retrofit_lang_decl): Adjust accordingly.
5191         (build_lang_field_decl): Likewise.
5192         * lex.h (free_lang_decl_chain): Likewise.
5193         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
5194         * parse.c: Regenerated.
5195         * pt.c (tsubst_default_arguments): New function.
5196         (retrieve_local_specialization): Likewise.
5197         (register_local_specialization): Likewise.
5198         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
5199         pseudo_global_level_p to determine whether or not a template is
5200         primary.
5201         (lookup_template_class): Likewise.  Use create_implicit_typedef.
5202         (instantiate_class_template): Call tsubst_default_arguments for
5203         member functions, if appropriate.
5204         (tsubst_default_argument): New function.
5205         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
5206         * search.c (at_function_scope_p): New function.
5207         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
5208         (finish_label_stmt): Likewise.
5209         (add_decl_stmt): New function.
5210         (begin_class_definition): Likewise.
5211         (finish_typeof): Likewise.
5212         * tree.c (copy_template_template_parm): Likewise.
5213         (copy_to_permanent): Likewise.
5214         (push_permanent_obstack): Define.
5215         (mark_addressable): Use it.
5216         * typeck.c (mark_addressable): Likewise.
5217         
5218 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
5219
5220         * cp-tree.h (init_cplus_unsave): New.
5221         (cplus_unsave_expr_now): New.
5222         * lex.c (init_parse): Call init_cplus_unsave.
5223         * tree.c (init_cplus_unsave): New.
5224         (cplus_unsave_expr_now): New.
5225
5226 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
5227
5228         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
5229         decl_constant_value to simplify array bounds.
5230
5231 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
5232
5233         * lang-options.h: Add -fms-extensions.
5234         * cp-tree.h: Declare flag_ms_extensions.
5235         * decl2.c: Define it.
5236         * class.c (instantiate_type): Don't complain about taking the address
5237         of a bound member function if -fms-extensions.
5238         * typeck.c (build_unary_op): Likewise.
5239         * decl.c (grokdeclarator): Or about implicit int.
5240         * init.c (resolve_offset_ref): Or about implicit '&'.
5241
5242 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
5243
5244         * cp-tree.h (minimal_parse_mode): Remove.
5245         (finish_label_stmt): New function.
5246         * decl.c (saved_scope): Remove minimal parse mode.
5247         (maybe_push_to_top_level): Don't save it.
5248         (pop_from_top_level): Don't restore it.
5249         (define_label): Split out template-handling code to semantics.c.
5250         (start_decl): Don't use minimal_parse_mode.
5251         (cp_finish_decl): Likewise.
5252         (start_function): Don't increment it.
5253         (store_return_init): Don't use it.
5254         (finish_function): Don't decrement it.
5255         * parse.y (label_colon): Use finish_label_stmt throughout.
5256         * parse.c: Regenerated.
5257         * pt.c (minimal_parse_mode): Don't define it.
5258         (tsubst_expr): Use finish_label_stmt.
5259         * semantics.c (finish_label_stmt): New function.
5260
5261         * dump.c (queue): Be careful when computing bitmasks.
5262         (dequeue_and_dump): Describe binfos as binfos, not as
5263         vectors.
5264         
5265         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
5266         throughout.     
5267         * parse.c: Regenerated.
5268         
5269         * Make-lang.in (CXX_SRCS): Remove sig.c.
5270         * Makefile.in (CXX_OBJS): Remove sig.o.
5271         (sig.o): Remove.
5272         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
5273         (CPTI_SIGNATURE_TYPE): Likewise.
5274         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
5275         (opaque_type_node): Likewise.
5276         (signature_type_node): Likewise.
5277         (sigtable_entry_type): Likewise.
5278         (flag_handle_signatures): Likewise.
5279         (lang_type): Remove is_signature, is_signature_pointer,
5280         is_signature_reference, has_opaque_typedecls,
5281         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
5282         signature_pointer_to, signature_reference_to.
5283         (IS_SIGNATURE): Remove.
5284         (SET_SIGNATURE): Remove.
5285         (CLEAR_SIGNATURE): Remove.
5286         (IS_SIGNATURE_POINTER): Remove.
5287         (IS_SIGNATURE_REFERENCE): Remove.
5288         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
5289         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
5290         (CLASSTYPE_SIGNATURE): Remove.
5291         (SIGNATURE_TYPE): Remove.
5292         (SIGNATURE_METHOD_VEC): Remove.
5293         (SIGNATURE_POINTER_TO): Remove.
5294         (SIGNATURE_REFERENCE_TO): Remove.
5295         (lang_decl_flags): Remove is_default_implementation.  Rename
5296         memfunc_pointer_to to saved_tree.
5297         (IS_DEFAULT_IMPLEMENTATION): Remove.
5298         (DECL_MEMFUNC_POINTER_TO): Remove.
5299         (DECL_MEMFUNC_POINTING_TO): Remove.
5300         (DECL_SAVED_TREE): Adjust definition.
5301         (tag_types): Remove signature_type_node.
5302         (SIGNATURE_FIELD_NAME): Remove.
5303         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
5304         (SIGNATURE_OPTR_NAME): Likewise.
5305         (SIGNATURE_SPTR_NAME): Likewise.
5306         (SIGNATURE_POINTER_NAME): Likewise.
5307         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
5308         (SIGNATURE_REFERENCE_NAME): Likewise.
5309         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
5310         (SIGTABLE_PTR_TYPE): Likewise.
5311         (SIGTABLE_NAME_FORMAT): Likewise.
5312         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
5313         (SIGTABLE_TAG_NAME): Likewise.
5314         (SIGTABLE_VB_OFF_NAME): Likewise.
5315         (SIGTABLE_VT_OFF_NAME): Likewise.
5316         (finish_base_specifiers): Change prototype.
5317         (build_signature_pointer_type): Remove.
5318         (build_signature_reference_type): Remove.
5319         (build_signature_pointer_constructor): Remove.
5320         (build_signature_method_call): Remove.
5321         (build_optr_ref): Likewise.
5322         (append_signature_fields): Likewise.
5323         (signature_error): Likewise.
5324         * call.c (build_this): Remove signature support.
5325         (build_over_call): Likewise.
5326         (build_new_method_call): Likewise.
5327         * class.c (add_implicitly_declared_members): Likewise.
5328         (finish_struct_1): Likewise.
5329         (finish_struct): Likewise.
5330         * cvt.c (cp_convert_to_pointer): Likewise.
5331         (convert_to_pointer_force): Likewise.
5332         (ocp_convert): Likewise.
5333         * decl.c (sigtable_decl_p): Remove.
5334         (init_decl_processing): Remove support for signatures.
5335         (cp_finish_decl): Likewise.
5336         (grokdeclarator): Likewise.
5337         (grokparms): Likewise.
5338         (xref_tag): Likewise.
5339         (start_function): Likewise.
5340         (start_method): Likewise.
5341         * decl2.c (finish_sigtable_vardecl): Remove.
5342         (flag_handle_signatures): Remove.
5343         (lang_f_options): Remove handle-signatures.
5344         (grokfield): Remove support for signatures.
5345         (grokbitfield): Likewise.
5346         (finish_file): Likewise.
5347         (reparse_absdcl_as_casts): Likewise.
5348         * error.c (dump_type_real): Likewise.
5349         (dump_function_decl): Likewise.
5350         * friend.c (make_friend_class): Likewise.
5351         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
5352         * hash.h: Regenerated.
5353         * init.c (build_new_1): Remove support for signatures.
5354         * lang-options.h: Remove -fhandle-signatures,
5355         -fno-handle-signatures. 
5356         * lex.c (init_parse): Remove support for signatures.
5357         (yyprint): Likewise.
5358         * lex.h (rid): Remove RID_SIGNATURE.
5359         * method.c (build_decl_overload_real): Remove support for
5360         signatures. 
5361         (hack_identifier): Likewise.
5362         * parse.y (base_class): Likewise.
5363         (base_class.1): Likewise.
5364         (access_specifier): Likewise.
5365         * search.c (lookup_member): Likewise.
5366         * semantics.c (finish_qualified_object_call_expr): Likewise.
5367         (finish_template_type_parm): Likewise.
5368         (begin_class_definition): Likewise.
5369         (finish_base_specifier): Likewise.
5370         * sig.c: Remove.
5371         * tree.c (build_cplus_method_type): Remove support for signatures.
5372         * typeck.c (require_complete_type): Likewise.
5373         (c_sizeof): Likewise.
5374         (c_alignof): Likewise.
5375         (build_object_ref): Likewise.
5376         (build_component_ref): Likewise.
5377         (build_indirect_ref): Likewise.
5378         (build_c_cast): Likewise.
5379         (build_modify_expr): Likewise.
5380         (convert_for_initialization): Likewise.
5381         * typeck2.c (signature_error): Remove.
5382         (store_init_value): Remove support for signatures.
5383         (digest_init): Likewise.
5384         (build_x_arrow): Likewise.
5385         (build_functional_cast): Likewise.
5386         * xref.c (GNU_xref_decl): Likewise.
5387         
5388 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
5389
5390         * lex.c (do_identifier): Remove unnecessary lookup of class field.
5391
5392 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
5393
5394         * decl2.c (set_decl_namespace): Do not complain about non-matching
5395         decls if processing a template.
5396
5397 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
5398
5399         * decl.c (build_ptrmemfunc_type): Handle qualified
5400         pointer-to-member types here.
5401         * tree.c (cp_build_qualified_type_real): Simplify handling here.
5402
5403 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5404
5405         * lex.c (lang_identify): Likewise.
5406
5407 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
5408
5409         * Makefile.in: Update dependencies.
5410         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
5411         NULL_RTX.
5412         * decl.c: Include "function.h"
5413         (cleanup_label, return_label): Delete declarations.
5414         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
5415         (finish_function): Rename last_parm_insn variable to
5416         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
5417         * decl2.c: Include "function.h".
5418         (rtl_expr_chain): Delete declaration.
5419         * method.c: Include "function.h"
5420         * tree.c (build_vbase_pointer_fields): Don't initialize
5421         DECL_SAVED_INSNS with NULL_RTX.
5422         * typeck.c: Include "function.h"
5423
5424 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
5425
5426         * semantics.c (begin_function_try_block, finish_function_try_block,
5427         finish_function_handler_sequence): New fns.
5428         * parse.y (function_try_block): Use them.
5429         * pt.c (instantiate_decl): Likewise.
5430
5431         * cp-tree.h: Declare in_function_try_handler.
5432         * decl.c: Define it.
5433         (start_function): Clear it.
5434         (struct cp_function, push_cp_function_context): Save it.
5435         (pop_cp_function_context): Restore it.
5436         * parse.y (function_try_block): Set and clear it.
5437         * except.c (expand_end_catch_block): Rethrow if we reach the end
5438         of a function-try-block handler in a ctor or dtor.
5439         * typeck.c (c_expand_return): Complain about returning from a
5440         function-try-block handler of a ctor.
5441
5442         * parse.y (function_try_block): Call end_protect_partials
5443         before expand_start_all_catch.
5444
5445 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
5446
5447         * decl.c (struct binding_level): Add eh_region field.
5448         (push_binding_level): Set it.
5449         (define_label): Complain about jumping into an EH block.
5450
5451         * ptree.c (print_lang_type): Print the real type of a PMF.
5452         Print what exceptions a fn type throws.
5453
5454 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5455
5456         * class.c (count_fields, add_fields_to_vec): Add static prototype.
5457
5458         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
5459         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
5460         char*.
5461
5462         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
5463         Constify a char*.
5464
5465         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
5466         char*.
5467
5468         * dump.c (queue_and_dump_index, dump_int, dump_string,
5469         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
5470         a char*.
5471         (dump_stmt): Add static prototype.
5472
5473         * errfn.c (cp_thing): Constify a char*.
5474
5475         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
5476         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
5477         dump_expr): Constify a char*.
5478
5479         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
5480         read_line_number): Add static prototype.
5481         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
5482         (real_yylex): Move label `letter' into the scope where it is used.
5483
5484         * method.c (build_mangled_template_parm_index, build_overload_int,
5485         build_decl_overload_real, get_id_2): Constify a char*.
5486
5487         * search.c (check_final_overrider): Make static.
5488
5489         * typeck.c (composite_pointer_type): Constify a char*.
5490
5491 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
5492
5493         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
5494         we're looking at a class.
5495
5496         * decl.c (lookup_name_real): Set the complain flag if we're
5497         looking for a namespace member.
5498
5499         * lex.c (real_yylex): We can have a number with no digits.
5500
5501         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
5502
5503         * search.c (binfo_from_vbase): New fn.
5504         * cp-tree.h: Declare it.
5505         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
5506         from pointer to member of virtual base.  
5507         * typeck.c (get_delta_difference): Likewise.
5508
5509 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
5510
5511         * pt.c (tsubst): Use build_index_type to build in-template array
5512         index type.  Fixes g++.oliva/dwarf1.C.
5513         * decl.c (grokdeclarator): Likewise, just for consistency, as it
5514         doesn't seem to trigger the bug without it.
5515
5516 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
5517
5518         * typeck2.c (add_exception_specifier): Use complete_type.
5519
5520 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
5521
5522         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
5523         (dump_binary_op): Bulletproof.
5524         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
5525         * tree.c (search_tree): Don't enumerate all the nodes of classes
5526         `1', `2', and `<'; handle them generically.  Don't be sorry about
5527         "unrecognized tree codes"; just abort.
5528         (no_linkage_check): Don't do linkage checks for templates.
5529         
5530         * tree.c (cp_build_qualified_type_real): Handle
5531         pointer-to-member-function types correctly.
5532
5533 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
5534
5535         * decl.c (pushdecl): Only give an error for shadowing a parm 
5536         from *this* function.
5537
5538 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
5539
5540         * typeck2.c: Update URLs and mail addresses.
5541
5542 1999-08-04  Nathan Sidwell  <nathan@acm.org>
5543
5544         * cp-tree.h (empty_except_spec): New global var.
5545         (compexcepttypes): Remove prototype.
5546         (comp_except_specs): Prototype new global function.
5547         (add_exception_specifier): Prototype new global function.
5548         * decl.c (empty_except_spec): Define new global var.
5549         (duplicate_decls): Use comp_except_specs, reword error message.
5550         (init_decl_processing): Initialize empty_except_spec.
5551         Adjust build_exception_variant calls.
5552         * parse.y (exception_specification_opt): Use empty_except_spec.
5553         (ansi_raise_identifier): Call check_for_new_type.
5554         (ansi_raise_identifiers): Use add_exception_specifier.
5555         * pt.c (tsubst): Use add_exception_specifier to build exception
5556         specifier.
5557         * search.c (check_final_overrider): New static function, broken
5558         out of get_matching_virtual. Check throw specifiers, reword
5559         diagnostics.
5560         (get_matching_virtual): Use check_final_overrider.
5561         * tree.c (build_exception_variant): Use comp_except_specs.
5562         * typeck.c (compexcepttypes): Remove.
5563         (comp_except_types): New static function, helper for
5564         comp_except_specs. Compare two types as exception specifiers.
5565         (comp_except_specs): New global function, compare two exception
5566         specifiers.
5567         (comptypes): Adjust for comp_except_specs.
5568         * typeck2.c (add_exception_specifier): New global function.
5569         
5570         * class.c (check_for_override): Reword error message.
5571
5572 1999-08-03  Nathan Sidwell  <nathan@acm.org>
5573
5574         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
5575         * cp-tree.h (struct lang_type): Added non_pod_class flag.
5576         (CLASSTYPE_NON_POD_P): New macro to access it.
5577         * class.c (finish_struct_1): Determine non-PODness.
5578         Check for arrays of pointers (-Weffc++).
5579         Remove array inspection duplicated code.
5580         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
5581         Use CLASSTYPE_NON_POD_P.
5582
5583 1999-08-03  Nathan Sidwell  <nathan@acm.org>
5584
5585         * class.c (duplicate_tag_error): Preserve template information.
5586
5587 1999-08-03  Nathan Sidwell  <nathan@acm.org>
5588
5589         * decl.c (start_enum): Show location of previous definition.
5590         * parse.y (enumlist_opt): New reduction.
5591         (structsp): Simplify enum rules to use enumlist_opt.
5592
5593 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
5594
5595         * lex.c (yyprint): Handle PFUNCNAME.
5596
5597         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
5598         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
5599
5600 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
5601
5602         * decl.c (start_decl): Set attributes before duplicate_decls call.
5603
5604 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
5605
5606         * Make-lang.in (CXX_SRCS): Add dump.c.
5607         * Makefile.in (CXX_OBJS): Add dump.o.
5608         (dump.o): New target.
5609         * cp-tree.h (DECL_CONV_FN_P): Document.
5610         (DECL_OVERLOADED_OPERATOR_P): New function.
5611         (TYPE_PTRMEM_CLASS_TYPE): New macro.
5612         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5613         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
5614         (ASM_VOLATILE_P): New macro.
5615         (STMT_LINENO): Likewise.
5616         (cp_namespace_decls): New function.
5617         (dump_node_to_file): New function.
5618         * decl.c (cp_namespace_decls): New function.
5619         (walk_namespaces_r): Use it.
5620         (wrapup_globals_for_namespace): Likewise.
5621         * decl2.c (flag_dump_translation_unit): New variable.
5622         (lang_decode_option): Handle -fdump-translation-unit.
5623         (finish_file): If flag_dump_translation_unit is set, dump the
5624         translation unit.
5625         * dump.c: New file.
5626         * lang-options.h: Add -fdump-translation-unit.
5627         * pt.c (tsubst_template_parms): Robustify.
5628         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
5629         (tsubst_expr): Use STMT_LINENO.
5630         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
5631         for invalid cv-qualifiers even while building templates.
5632         
5633 1999-08-02  Richard Henderson  <rth@cygnus.com>
5634
5635         * call.c: Include defaults.h instead of expr.h.
5636         * decl.c: Likewise.
5637         * pt.c: Likewise.
5638         * typeck.c: Include defaults.h.
5639
5640 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
5641
5642         * lex.c (errorcount, sorrycount): Don't declare.
5643         * repo.c (errorcount, sorrycount): Likewise.
5644         * typeck2.c (errorcount, sorrycount): Likewise.
5645
5646 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
5647
5648         * call.c (convert_default_arg, build_over_call): Change all uses of
5649         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
5650         Ensure expr.h is included.
5651         * decl.c (grokparams): Ditto.
5652         * pt.c (tsubst_decl): Ditto.
5653         * typeck.c (convert_arguments): Ditto.
5654
5655 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
5656
5657         * class.c (mark_overriders): Fix order of args to overrides.
5658         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
5659         functions with the same name.
5660
5661 1999-08-02  Richard Henderson  <rth@cygnus.com>
5662
5663         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
5664
5665 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
5666
5667         * call.c (build_conditional_expr): Fix typo in comment.
5668
5669 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
5670
5671         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
5672         case_stack; use in_control_zone_p.
5673         * typeck.c (c_expand_return): Likewise.
5674
5675 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
5676
5677         * except.c (catch_clauses): Delete declaration.
5678
5679 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
5680
5681         * call.c (build_conditional_expr): Call convert_from_reference to
5682         avoid reference/non-reference type confusion.  Fix typo.
5683
5684 1999-07-30  Richard Henderson  <rth@cygnus.com>
5685
5686         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
5687         * cp-tree.h (initializer_constant_valid_p): Remove.
5688
5689 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
5690
5691         * call.c (conditional_conversion): Don't build BASE_CONVs for
5692         conversions between things that have the same type.
5693         (build_conditional_expr): Tweak.
5694         (convert_like): Some BASE_CONVs really do require the generation
5695         of code.
5696         
5697         * init.c (perform_member_init): Don't go through build_modify_expr
5698         for simple initializations.
5699
5700 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
5701
5702         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
5703         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
5704         virtual functions and MI.  Simplify.
5705
5706         * method.c: Remove prototype for largest_union_member.
5707         * pt.c (determine_specialization): Fix uninitialized warning.
5708         * lex.c (real_yylex): Likewise.
5709
5710 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
5711
5712         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
5713         here too.
5714
5715         * cp-tree.h (BINFO_VIRTUALS): Document new format.
5716         * class.c (modify_one_vtable): Change prototype accordingly.
5717         (modify_all_vtables): Likewise.
5718         (modify_all_direct_vtables): Likewise.
5719         (modify_all_indirect_vtables): Likewise.
5720         (build_vtable_entry_for_fn): New function.
5721         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
5722         (modify_vtable_entry): Likewise.
5723         (add_virtual_function): Likewise.
5724         (build_vtbl_initializer): New function.
5725         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
5726         (fixup_vtable_deltas1): Likewise.
5727         (fixup_vtable_deltas): Likewise.
5728         (override_one_vtable): Likewise.
5729         (finish_struct_1): Likewise.
5730
5731         * error.c (dump_expr): Likewise.
5732         * search.c (get_abstract_virtuals_1): Likewise.
5733         (get_abstract_virtuals): Likewise.
5734         (expand_upcast_fixups): Likewise.
5735         * tree.c (debug_binfo): Likewise.
5736         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
5737         __pure_virtual here.
5738         
5739 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
5740
5741         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
5742         as per 1999-07-26 change.
5743
5744         * typeck.c (c_sizeof): Don't allow non-static data members.
5745         (expr_sizeof): Likewise.
5746
5747 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
5748
5749         * input.c (feed_input): Only touch lineno and input_filename
5750         if !USE_CPPLIB.  Save the old values before setting the new ones.
5751
5752         * input.c (feed_input): Add file, line parms.
5753         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
5754         (real_yylex): Check linemode before input_redirected().
5755
5756         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
5757         from op new to warning.
5758
5759 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
5760
5761         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
5762         * call.c: All uses changed.
5763         * typeck.c: Likewise.
5764
5765 1999-07-26  Nathan Sidwell  <nathan@acm.org>
5766
5767         * exception.cc (__cplus_type_matcher): Match __eh_matcher
5768         prototype.
5769
5770 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
5771
5772         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
5773         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
5774         (strip_top_quals): Declare.
5775         (ncp_convert): Likewise.
5776         (type_after_usual_arithmetic_converions): Likewise.
5777         (composite_pointer_type): Likewise.
5778         * call.c (strip_top_quals): Don't make it static.
5779         (promoted_arithmetic_type_p): New function.
5780         (conditional_conversion): Likewise.
5781         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
5782         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
5783         for converting a type to itself.
5784         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
5785         (implicit_conversion): Make sure the from and to types are
5786         complete.
5787         (add_builtin_candidate): Correct handling of ?: operator.
5788         (add_builtin_candidates): Improve documentation.
5789         (build_conditional_expr): New function.
5790         (can_convert): Implement in terms of can_convert_arg.
5791         (ncp_convert): New function.
5792         * typeck.c (type_after_usual_arithmetic_conversions): New
5793         function, split out from common_type.
5794         (composite_pointer_type): New function, split out from
5795         build_conditional_expr.
5796         (common_type): Use type_after_usual_arithmetic_conversions.
5797         Remove redundant attribute merging.
5798         (comptypes): Tidy.  Handle COMPLEX_TYPE.
5799         (build_binary_op_nodefault): Use null_ptr_cst_p.
5800         (build_conditional_expr): Remove.
5801         (convert_for_assignment): Use new conversion functions.
5802         
5803         * cp-tree.h (abstract_virtuals_error): Change declaration.
5804         * typeck2.c (abstract_virtuals_error): Check to see if an error
5805         ocurred, and return a boolean value accordingly.
5806         (build_functional_cast): Adjust accordingly.
5807         * class.c (finish_struct_1): Likewise.
5808         * cvt.c (ocp_convert): Likewise.
5809         * decl.c (cp_finish_decl): Likewise.
5810         (grokparams): Likewise.
5811         (grok_op_properties): Likewise.
5812         (start_function): Likewise.
5813         * init.c (build_new_1): Likewise.
5814
5815         * pt.c (unify): Don't get confused by pointers-to-member functions.
5816
5817         * search.c (build_cplus_new): Robustify.
5818         
5819 1999-07-24  Richard Henderson  <rth@cygnus.com>
5820
5821         * gxx.gperf (__builtin_va_arg): New.
5822         * parse.y (VA_ARG): New token.
5823         (unary_expr): Recognize it.
5824
5825 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
5826
5827         * g++FAQ.texi: Deleted per Joe Buck's request.
5828         * Makefile.in: Corresponding changes.
5829
5830 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
5831
5832         * lex.c: Sync with C frontend.
5833         (whitespace_cr): New fn.
5834         (skip_white_space): Use it.
5835         (init_parse): Reorder.
5836         (yyprint): Support CONSTANT.
5837         (pragma_getc, pragma_ungetc): Bring back.
5838         (read_line_number): Change in_system_header directly.
5839         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
5840         (parse_float): Update to C version.
5841         (yylex): Handle '$' under the letter case.
5842         Remove looking_for_typename handling.
5843         Support hex floating point constants.
5844         Follow C's lead for choosing type of integer constants.
5845         Rearrange stuff to match C frontend.
5846         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
5847         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
5848
5849 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
5850
5851         * call.c (reference_binding): Tweak.
5852         (mayble_handle_implicit_object): Use direct_reference_binding to
5853         create the right implicit conversion sequence.
5854
5855 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
5856
5857         * pt.c (convert_nontype_argument): Don't call decl_constant_value
5858         if we're converting to a reference type.
5859
5860         * call.c (NEED_TEMPORARY_P): New macro.
5861         (standard_conversion): Set it, for derived-to-base conversions.
5862         (reference_related_p): New function.
5863         (reference_compatible_p): Likewise.
5864         (convert_class_to_reference): Likewise.
5865         (direct_reference_binding): Likewise.
5866         (reference_binding): Rework for standards-compliance.
5867         (convert_like): Adjust accordingly.
5868         (maybe_handle_ref_bind): Simplify; the right conversion sequences
5869         are now built up in reference_binding.
5870         (initialize_reference): New function.
5871         * cp-tree.h (ICS_USER_FLAG): Document.
5872         (ICS_THIS_FLAG): Likewise.
5873         (ICS_BAD_FLAG): Likewise.
5874         (NEED_TEMPORARY_P): Likewise.
5875         (cp_lvalue_kind): New type.
5876         (real_lvalue_p): Return it.
5877         * error.c (dump_expr): Provide more accurate representation for
5878         AGGR_INIT_EXPRs.
5879         * init.c (expand_default_init): Do not try to perform implicit
5880         conversions for a brace-enclosed initializer.
5881         * search.c (lookup_conversions): Document.
5882         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
5883         appropriately.
5884         (real_lvalue_p): Adjust accordingly.
5885         (lvalue_p): Likewise.
5886         (build_cplus_new): Don't allow the creation of an abstract class.
5887         * typeck.c (convert_for_initialization): Use initialize_reference.
5888         
5889 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
5890
5891         * lex.c (real_yylex) : Correct the test for overflow when lexing
5892         integer literals.
5893
5894 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
5895
5896         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
5897         not DECL_BUILT_IN, to determine if a function is internally declared.
5898         (duplicate_decls): Likewise.  Improve handling of builtins.
5899         (push_overloaded_decl): Remove special handling of builtins.
5900
5901         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
5902
5903         * decl.c (grokdeclarator): Pull out decl_constant_value in
5904         templates, too.
5905
5906         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
5907         * cp-tree.h, pt.c, semantics.c: Adjust.
5908         * method.c (largest_union_member): Remove.
5909
5910         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
5911
5912         * lex.c (token_getch, token_put_back): New fns.
5913         (real_yylex): Use them.
5914
5915         * lex.c (lang_init): Generalize.
5916         (lang_init_options): Tell cpplib this is C++.
5917         (nextchar): Remove.  Replace uses with put_back.
5918         (skip_white_space): Handle linemode here.  Optimize for cpplib.
5919         (extend_token_buffer_to): New fn.
5920         (extend_token_buffer): Use it.
5921         (read_line_number, check_newline): Just deal with tokens.
5922         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
5923         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
5924         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
5925         * parse.y (PAREN_STAR_PAREN): Remove.
5926         * input.c: Don't use the putback machinery with cpplib.
5927         (sub_getch): Fold back into getch.
5928         (getch): Don't handle linemode here.
5929         (feed_input): Unget any text in the token buffer.
5930
5931         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
5932         nextyychar, nextyylval): Remove.
5933
5934 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
5935             Jason Merrill  <jason@yorick.cygnus.com>
5936
5937         * lex.c (indent_level): New variable.
5938         (init_parse): Set cpp_token to CPP_DIRECTIVE.
5939         (consume_string): Make this smart about USE_CPPLIB.
5940         (yyungetc): Use put_back function.
5941         (pragma_getc, pragma_ungetc): Functions deleted.
5942         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
5943         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
5944         pragma_ungetc.
5945         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
5946         Also, clean up cases where we redundantly set token_buffer[0].
5947         (read_line_number): New fn.
5948         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
5949         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
5950         (sub_getch): Conditionalize out code that's not appropriate if
5951         USE_CPPLIB.
5952         (put_back): Rewrite in case USE_CPPLIB is defined.
5953         (input_redirected): Ditto.
5954
5955 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
5956
5957         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
5958         c_global_trees and accessor macros defined in c-common.h.
5959         (cp_tree_index): New enumeration.
5960         (cp_global_trees): Declare new array.  Add accessor macros for it, and
5961         delete declarations of tree nodes replaced by it.
5962         (builtin_function): Delete macro, add declaration for new function.
5963         Include c-common.h.
5964         * decl.c: Delete definitions for tree nodes that were replaced by
5965         cp_global_trees and c_global_trees.
5966         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
5967         to generate the common builtins here.
5968         (builtin_function): New function.
5969         * decl2.c (abort_fndecl): Delete declaration.
5970         * except.c (expand_builtin_return_address): Delete declaration.
5971         (builtin_return_address_fndecl): Delete variable.
5972         (const_ptr_type_node): Delete declaration.
5973         * lex.c (cons_up_default_function): Delete declaration of
5974         void_list_node.
5975         * parse.y (void_list_node): Delete declaration.
5976         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
5977         Delete variables.
5978         (const_string_type_node): Delete declaration.
5979         * search.c (abort_fndecl): Delete declaration.
5980         * Makefile.in: Update dependencies.
5981
5982 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
5983
5984         * pt.c (check_default_tmpl_args): Move test for missing default
5985         arguments here, from ...
5986         (end_template_parm_list): Here.
5987
5988 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
5989
5990         * decl.c (lookup_nested_type): Remove.
5991         (pushtag): Don't call it.
5992
5993 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
5994
5995         * Makefile.in (INTERFACE): Bump to 2.
5996
5997 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
5998         
5999         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
6000         instructions to gcc.gnu.org.  Removed e-mail address.
6001
6002 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
6003
6004         * pt.c (determine_specialization): Tighten error-checking.
6005         (end_template_parm_list): Likewise.
6006
6007 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
6008
6009         * pt.c (check_default_tmpl_args): Handle friends defined in the
6010         class just like member functions defined in the class.
6011
6012 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
6013             Jason Merrill  <jason@yorick.cygnus.com>
6014
6015         * cp-tree.h (struct lang_decl): Added field for storing sorted
6016         FIELD_DECLs (used in TYPE_DECLs).
6017         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
6018         (DECL_SORTED_FIELDS): New macro.
6019         * class.c (method_name_cmp): New function.
6020         (finish_struct_methods): Modified to support sorting and searching
6021         methods.
6022         (finish_struct_anon): Changed code in inner loop to use ELT rather 
6023         than UELT (which required an extra indirection for every reference).
6024         (field_decl_cmp): New function to support sorting FIELD_DECLs.
6025         (finish_struct_1): Sort fields.
6026         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
6027         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
6028         Also, switch to using array indexing rather than a changing pointer.
6029         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
6030         DECL_SORTED_FIELDS.
6031
6032 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
6033
6034         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
6035         casts in system headers or extern "C" blocks.
6036
6037         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
6038         errors to pedwarn.
6039
6040 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
6041
6042         * decl2.c (write_virtuals): Deleted declaration.
6043         * cp-tree.h (write_virtuals): Deleted extern declaration.
6044         * class.c (finish_struct_1): Removed #if 0'd code that mentions
6045         write_virtuals.
6046         * semantics.c (begin_class_definition): Rewrite code to not depend
6047         on write_virtuals.
6048
6049         * lex.c (cp_pragma_interface): New function.
6050         (cp_pragma_implementation): Likewise.
6051         (handle_cp_pragma): Call them.
6052
6053         * typeck.c (comptypes): Simplify C code in look_hard.
6054
6055         * xref.c (PALLOC): Use xcalloc, not calloc.
6056         (SALLOC): Use xmalloc, not malloc.
6057
6058         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
6059
6060         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
6061         is NO_DEBUG.
6062
6063         * decl.c (duplicate_decls): If a redeclaration doesn't match the
6064         initial declaration, then don't save the inline info and by all
6065         means don't mark the function as a builtin function.
6066
6067         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
6068         CURRENT_CLASS_TYPE is 0.
6069
6070         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
6071         NULL_TREE.
6072
6073         * ptree.c (print_lang_type): Added vtable-needs-writing.
6074
6075 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
6076
6077         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
6078
6079 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
6080
6081         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
6082         Merged into c-common.
6083
6084 1999-07-05  Dave Brolley  <brolley@cygnus.com>
6085
6086         * lex.c (errorcount): Declare it.
6087         (finish_parse): Update errorcount for when using CPPLIB.
6088
6089 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
6090
6091         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
6092         parameters.
6093         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
6094         * decl.c (push_class_binding): Use it.
6095         (lookup_name_real): Likewise.
6096
6097 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
6098
6099         * cp-tree.h (widest_integer_literal_type_node,
6100         widest_unsigned_literal_type) : New.
6101         * decl.c (widest_integer_literal_type_node,
6102         widest_unsigned_literal_type) : New.
6103         (init_decl_processing): Handle/use the two new types.
6104         * lex.c (real_yylex): Same.
6105         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
6106         Same. 
6107
6108 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
6109
6110         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
6111         to anonymous cv-qualified types.
6112
6113 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
6114
6115         * lex.c (real_yylex) : Change integer literal overflow handling to
6116         be like c-lex.c.
6117
6118         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
6119
6120 1999-06-28  Richard Henderson  <rth@cygnus.com>
6121
6122         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
6123
6124 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
6125
6126         * error.c (dump_type_real): Handle TREE_LIST again.
6127
6128         * typeck.c (comp_target_parms): Don't complain about 
6129         converting from () to (...) if !flag_strict_prototype.
6130
6131         * decl.c (grokdeclarator): Update the names of all variants when
6132         de-anonymizing.
6133
6134 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
6135
6136         * init.c (expand_aggr_vbase_init): Rename to
6137         construct_virtual_bases.  Conditionalize construction here, 
6138         rather than ...
6139         (emit_base_init): Here.
6140
6141 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
6142
6143         * semantics.c (finish_asm_stmt): Apply decay conversions to
6144         input operands.
6145
6146         * decl.c (expand_static_init): When building an anonymous function
6147         for use with atexit, compute its body before and after entering
6148         the function.
6149
6150         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
6151         EXIT_EXPR.
6152         
6153 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
6154
6155         * init.c (expand_aggr_vbase_init): Add flag parameter.
6156         (build_partial_cleanup_for): Remove, inlining into ..
6157         (expand_cleanup_for_base): ... here.  Take flag parameter.
6158         (emit_base_init): Pass the in_chrg parameter to
6159         emit_aggr_vbase_init. 
6160         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
6161         
6162 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
6163
6164         * decl2.c (import_export_decl): Use same_type_p, rather than
6165         relying on pointer-equality for types.
6166
6167         * method.c (do_build_copy_constructor): Simplify.
6168
6169         * call.c (build_method_call): Remove bogus code for two-argument
6170         delete.
6171         * init.c (build_new_1): Expand on comment, and remove dead code.
6172
6173         * init.c (expand_cleanup_for_base): New function, split out
6174         from ...
6175         (emit_base_init): Here.
6176         (expand_aggr_vbase_init): Use it.
6177
6178 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
6179
6180         * cp-tree.h (class_cache_firstobj): Declare.
6181         (maybe_push_cache_obstack): Rename to push_cache_obstack.
6182         * class.c (permanent_obstack): Remove declaration.
6183         (class_cache_firstobj): Make it global.
6184         (add_method): Don't use permanent_obstack directly.
6185         (pushclass): Only free the class_cache_obstack if we know how far
6186         back to free it.
6187         (maybe_push_cache_obstack): Rename to push_cache_obstack.
6188         * decl.c: Remove dead comment.
6189         (saved_scope): Add class_cache_firstobj.
6190         (push_to_top_level): Save it.
6191         (pop_from_top_level): Restore it.
6192         (push_class_level_binding): Use push_cache_obstack, not
6193         maybe_push_cache_obstack.
6194         * search.c (push_class_decls): Likewise.
6195         
6196 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6197
6198         * pt.c (tsubst_friend_function): Push into namespace of friend
6199         function before pushdecl'ing it.
6200
6201 1999-06-14  Nathan Sidwell  <nathan@acm.org>
6202
6203         * call.c (build_new_op): Remove REF_BIND from all operands.
6204
6205 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
6206
6207         * init.c (build_new_1): Look up operator delete even if there was
6208         no explicit new placement.
6209
6210 1999-06-08  Nathan Sidwell  <nathan@acm.org>
6211
6212         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
6213         of ...
6214         (build_throw): ... here. Call it.
6215         (process_start_catch_block): Call it.
6216
6217 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
6218
6219         * search.c (convert_pointer_to_single_level): Reimplement without
6220         using get_binfo.
6221
6222 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
6223
6224         * method.c (is_back_referenceable_type): Back-reference bools when
6225         not squangling.
6226
6227 1999-06-07  Dave Brolley  <brolley@cygnus.com>
6228
6229         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
6230         * input.c (putback_buffer): New structure type.
6231         (putback): Replaces putback_char member.
6232         (putback): Replaces putback_char static variable.
6233         (feed_input): Use putback.
6234         (end_input): Use putback.
6235         (sub_getch): Use putback.
6236         (put_back): Use putback.
6237
6238 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
6239
6240         * decl.c (grokdeclarator): Fix typo in last change.
6241
6242 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
6243
6244         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
6245         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
6246
6247 1999-06-04  Nathan Sidwell  <nathan@acm.org>
6248
6249         * except.c (build_throw): Check throw expression validity.
6250
6251 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
6252
6253         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
6254         just because flag_signed_bitfields is false.
6255
6256 1999-06-03  Nathan Sidwell  <nathan@acm.org>
6257
6258         * semantics.c (begin_class_definition): Update the struct's
6259         location here ...
6260         * class.c (finish_struct): ... rather than here.
6261
6262         * decl.c (make_typename_type): Don't rely on uninitialized
6263         variable.
6264
6265 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6266
6267         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
6268
6269 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
6270
6271         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
6272         and friends rather than messing with current_obstack directly.
6273         (cp_build_qualified_type_real): Rework ARRAY_TYPE
6274         allocation to match practice throughout the rest of the 
6275         compiler.
6276
6277 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
6278
6279         * lex.c (make_lang_type): Create TYPE_BINFO for
6280         TEMPLATE_TYPE_PARMs just like for non-template types.
6281
6282         * decl.c (start_decl): Move checks on initialization to ...
6283         (cp_finish_decl): Here.  Tidy formatting slightly.
6284
6285 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
6286
6287         * decl.c (add_binding): Don't complain about a redeclaration of a
6288         semantically identical typedef in a local scope.
6289
6290 1999-05-28  Nathan Sidwell  <nathan@acm.org>
6291
6292         * decl.c (complete_array_type): Allocate off same obstack. Fix
6293         DO_DEFAULT comment to match reality.
6294
6295         * friend.c (make_friend_class): Fix diagnostic typo.
6296
6297 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
6298
6299         * decl.c (lookup_namespace_name): Handle getting a
6300         TEMPLATE_ID_EXPR.
6301         (expand_static_init): Don't call pushdecl for implicitly declared
6302         `atexit' used to register destructors.
6303
6304 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
6305
6306         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
6307         intialize a vtable.
6308
6309         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
6310         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
6311         by combining TEMPLATE_INFO and LEVEL into a single union.
6312         (DECL_TEMPLATE_INFO): Reformat.
6313         (DECL_SAVED_TREE): Document.
6314         (DECL_TEMPLATE_INJECT): Remove.
6315         * class.c (finish_struct): Remove code to deal with
6316         DECL_TEMPLATE_INJECT. 
6317
6318         * decl.c (maybe_process_template_type_declaration): Handle all new
6319         types in templates uniformly.
6320         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
6321         DECL_CONTEXT.
6322         * pt.c (lookup_template_class): Inject template instantiations of
6323         forward-declarations.
6324         (instantiate_class_template): Remove code processing
6325         DECL_TEMPLATE_INJECT.
6326         
6327         * pt.c (lookup_template_class): Tweak lookup to find member
6328         templates.
6329
6330         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
6331         ASM_CV_QUAL.
6332         * semantics.c (finish_asm_stmt): Make strings permanent if they're
6333         used in a template.
6334         
6335 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
6336
6337         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
6338         parts of pointer to data member types.
6339
6340 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
6341
6342         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
6343         and then make it look like `abort'.  Just use `abort' instead.
6344         
6345         * typeck.c (build_static_cast): Don't allow static_casts that cast
6346         away constness.
6347         (casts_away_constness_r): New function.
6348         (casts_away_constness): Likewise.
6349
6350         * decl.c (lookup_tag): Remove code no longer needed after
6351         name-lookup improvements.
6352         * decl2.c (handle_class_head): Make error-recovery more robust.
6353         * friend.c (make_friend_class): Reject templated typename types.
6354         * lex.c (is_global): A template parameter isn't global.
6355         * parse.y (class_head): Robustify.
6356         * parse.c: Regenerated.
6357         
6358 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
6359
6360         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
6361         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
6362         
6363         * cp-tree.h (push_nested_namespace): Declare.
6364         (pop_nested_namespace): Likewise.
6365         * decl.c (push_nested_namespace): New function.
6366         (pop_nested_namespace): Likewise.
6367         * pt.c (instantiate_class_template): Use them.
6368
6369         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
6370
6371         * cp-tree.h (cplus_expand_constant): Declare.
6372         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
6373         converted from one pointer-to-object type to another.
6374         * expr.c (cplus_expand_constant): Don't make it static.
6375         * typeck.c (build_component_ref): Don't crash when presented with
6376         a component which is a TEMPLATE_DECL.
6377         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
6378         cast from a pointer-to-member constant to its own type does not
6379         result in a valid non-type template argument.
6380
6381 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
6382             Nathan Sidwell  <nathan@acm.org>
6383         
6384         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
6385         * cp-tree.h: Fix typo in documentation on pointers-to-members.
6386         (cp_build_qualified_type): Make it a macro.
6387         (cp_build_qualified_type_real): Declare.
6388         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
6389         problem with template parameters and restrict-qualification.
6390         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
6391         * hash.h: Regenerated.
6392         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
6393         the enumeration.
6394         (NORID): Remove definition.
6395         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
6396         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
6397         (fn_type_unification): Check that the function type resulting from
6398         the deduction is legal.
6399         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
6400         (unify): Use cp_build_qualified_type_real.
6401         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
6402         (cp_build_qualified_type): Rename to ...
6403         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
6404         and modify appropriately.
6405         
6406         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
6407         reveal optimization opportunities.
6408
6409         * pt.c (tsubst): Don't issue error messages when we're not
6410         complaining, even if we see a qualified function type.
6411         (check_cv_quals_for_unify): Don't allow a qualified function
6412         type.
6413
6414 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
6415
6416         * class.c (instantiate_type): Downgrade errors for object-dependent
6417         memfn refs to pedwarn.
6418
6419 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
6420
6421         * decl.c (grokdeclarator): Don't treat [] as indicating a
6422         zero-sized array in a typedef.
6423
6424         * call.c (build_object_call): Don't look at DECL_NAME for a type.
6425         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
6426         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
6427
6428         * pt.c (for_each_template_parm): Rework to match documentation.
6429         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
6430
6431 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
6432
6433         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
6434
6435         * class.c (finish_base_struct): Allow non-COM bases for COM classes
6436         except at the leftmost position.
6437         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
6438         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
6439         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
6440
6441         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
6442         (build_cplus_new): Make sure that what we return is of the right type.
6443
6444 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
6445
6446         * cp-tree.h (make_ptrmem_cst): New function.
6447         * expr.c (cplus_expand_constant): Split out from ...
6448         (cplus_expand_expr): Here.  Use cplus_expand_constant.
6449         (init_cplus_expand): Set lang_expand_constant.
6450         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
6451
6452         * tree.c (make_ptrmem_cst): Define.
6453         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
6454         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
6455
6456 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
6457
6458         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
6459
6460         * decl2.c (start_static_storage_duration_function): Fix comment.
6461         (finish_file): Create static storage duration functions lazily.
6462
6463 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
6464
6465         Implement anonymous structs.
6466         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
6467         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
6468         * class.c (finish_struct_1): Remove redundant check for anon struct.
6469         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
6470         (check_tag_decl): Check for anonymous struct here.
6471         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
6472         * init.c (sort_member_init, emit_base_init): Handle getting fields
6473         as well as names in current_member_init_list.
6474         (perform_member_init): Handle getting an anon aggr.
6475         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
6476         (do_build_copy_constructor): Likewise.
6477
6478 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
6479
6480         * tree.c (cp_build_qualified_type): Don't allow qualified function
6481         types.
6482
6483 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
6484
6485         * gxxint.texi: Fix typo.
6486
6487 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
6488
6489         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
6490         * class.c (finish_struct_1): Use CLASS_TYPE_P.
6491         * ptree.c (print_lang_type): Likewise.
6492         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
6493         IS_AGGR_TYPE_CODE.
6494         * typeck2.c (digest_init): Likewise.
6495
6496 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
6497
6498         * call.c (joust): Compare the types of the conv ops, not the
6499         target types of the conversions.
6500
6501 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6502
6503         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
6504         was not given.
6505
6506 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
6507
6508         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
6509         * decl.c (grokfndecl): Don't allow inline declarations of friend
6510         template specializations, or friend template specializations with
6511         default arguments.
6512         * pt.c (tsubst): Handle substitution into array types that does
6513         not yield a fixed upper bound, even when not processing a
6514         template.
6515         (tsubst_copy): Deal with the fact that the second operand to a
6516         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
6517         * search.c (marked_pushdecls_p): Don't descend into
6518         TEMPLATE_TYPE_PARMs and the like.
6519         (unmarked_pushdecls_p): Likewise.
6520         
6521         * call.c (build_over_call): Don't throw away
6522         initializations/copies of empty classes; use MODIFY_EXPR and
6523         INIT_EXPR as for non-empty classes.
6524         * class.c (finish_struct_1): Put the padding byte for an empty
6525         class on the TYPE_NONCOPIED_PARTS list for the class.
6526
6527 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
6528
6529         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
6530         indicate a reference to a field that is a qualified name.
6531
6532 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
6533
6534         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
6535         ASM_OUTPUT_CONSTRUCTOR.
6536
6537         * friend.c (do_friend): Add attrlist arg.  Remove support for
6538         getting a non-decl as 'decl'.
6539         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
6540         rtl.
6541         (grokdeclarator): Adjust.
6542         * cp-tree.h: Adjust.
6543
6544 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
6545
6546         * cp-tree.h (permanent_p): New function.
6547         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
6548         possibly complex tree node.
6549         * tree.c (mapcar): Adjust comments, and follow coding standards in
6550         conditional.
6551         (permanent_p): New function.
6552
6553 1999-05-13  Per Bothner  <bothner@cygnus.com>
6554
6555         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
6556         primitive Java types, if we actually see `extern "Java"'.
6557
6558 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6559
6560         * lang-specs.h: Pass -$ to the preprocessor.
6561
6562 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
6563
6564         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
6565         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
6566         (resolve_offset_ref): Don't handle a raw baselink.
6567         * cvt.c (build_expr_type_conversion): Likewise.
6568         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
6569         convert_for_initialization): Likewise.
6570         * class.c (instantiate_type): Handle seeing a baselink under an
6571         OFFSET_REF.
6572         * error.c (dump_expr): Likewise.        
6573         * pt.c (for_each_template_parm): Likewise.
6574         (resolve_overloaded_unification): Likewise.
6575         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
6576         * typeck.c (expr_sizeof): Also complain about other permutations
6577         of overloaded functions.
6578
6579 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
6580
6581         * init.c (resolve_offset_ref): Don't return a raw method.
6582         Use BASELINK_P.
6583         * typeck.c (decay_conversion): Don't handle a raw method.
6584         Resolve all OFFSET_REFs.
6585         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
6586         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
6587         same_type_p for pmf bits.  Don't use build_binary_op to compare
6588         raw pointers to methods.
6589         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
6590         to decide when to call resolve_offset_ref.
6591         (build_c_cast, convert_for_initialization): Likewise.
6592         * cvt.c (build_expr_type_conversion): Likewise.
6593
6594 1999-05-06  Nathan Sidwell  <nathan@acm.org>
6595
6596         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
6597
6598 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
6599
6600         * decl2.c (start_objects): Don't let static constructors and
6601         destructors get inlined.
6602
6603         * parse.y (nested_name_specifier): Make sure ordinary types are
6604         complete, just like template types.
6605         * parse.c: Regenerated.
6606
6607         * pt.c (check_explicit_specialization): Improve error messages.
6608
6609 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6610
6611         * typeck.c (string_conv_p): Use same_type_p to check whether we
6612         try to convert between char and wchar_t.
6613
6614 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
6615
6616         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
6617         lookup to error_mark_node here.
6618         (lookup_member): Revise documentation.  Add comments.  Don't set
6619         the TREE_TYPE to error_mark_node here, and don't build up an extra
6620         TREE_LIST for ambiguous lookups.
6621         (setup_class_bindings): Adjust accordingly.
6622         (push_class_decls): Revise out-of-date comments.
6623         
6624         * typeck.c (build_const_cast): Tighten checks for legality.
6625
6626 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6627
6628         * init.c (build_member_call): Lookup names coming from
6629         namespace-scoped LOOKUP_EXPR.
6630
6631 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
6632
6633         * gxxint.texi: Add documentation for 'I'.
6634
6635 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6636
6637         * tinfo.cc (operator==): Qualify type_info with std::.
6638
6639 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
6640
6641         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
6642         (DECL_COMDAT): Remove definition.
6643
6644 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
6645
6646         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
6647         change.
6648
6649 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
6650
6651         * class.c (build_vtable): Use build_lang_decl when building
6652         vtables, not just build_decl.
6653         (prepare_fresh_vtable): Likewise.
6654         * decl.c (wrapup_globals_for_namespace): Mark vtables as
6655         DECL_EXTERNAL when calling wrapup_global_declarations.
6656         * decl2.c (priority_info_s): Add initializations_p and
6657         destructions_p members.
6658         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
6659         when deciding what vtables to write out.
6660         (ssdf_decls): New variable.
6661         (ssdf_decls_used): Likewise.
6662         (start_static_storage_duration_function): Deal with being called
6663         multiple times.  Avoid inlining this function.
6664         (generate_inits_for_priority): Deal with reuse of priority map.
6665         (get_priority_info): Clear initializations_p and destructions_p.
6666         (do_static_initialization): Tweak comment.
6667         (do_static_destruction): Likewise.  Fix condition on sentries for
6668         destruction.
6669         (generate_ctor_or_dtor_function): Call all of the static storage
6670         duration functions.
6671         (generate_ctor_or_dtor_function_for_priority): Check
6672         initializations_p and destructions_p to see what priorities need
6673         initialization functions.
6674         (finish_file): Rework to generate multiple static storage duration
6675         functions, rather than just one.
6676
6677         * typeck.c (build_const_cast): Tweak last change to handle
6678         templates correctly.
6679
6680         * typeck.c (build_const_cast): Disallow use of const_cast to
6681         anything but a pointer or reference type.
6682
6683 1999-04-30  Nathan Sidwell  <nathan@acm.org>
6684
6685         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
6686         signature type.
6687
6688 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
6689
6690         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
6691         (finish_file): Indent comments properly.
6692
6693 1999-04-29  Richard Henderson  <rth@cygnus.com>
6694
6695         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
6696         (do_static_destruction): Likewise.
6697
6698 1999-04-29  Nathan Sidwell  <nathan@acm.org>
6699
6700         * cp-tree.h (TYPE_NOTHROW_P): New macro.
6701         * decl2.c (delete_sanity): Warn on deleting void *.
6702         * init.c (build_new_1): Use TYPE_NOTHROW_P.
6703         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
6704         throwing operator new.
6705
6706 1999-04-28  Nathan Sidwell  <nathan@acm.org>
6707
6708         * cp-tree.h (build_component_addr): Remove prototype.
6709         * typeck.c (build_component_addr): Make static. Remove MSG
6710         argument.
6711         (build_component_addr): Remove MSG parameter, clean up
6712         comment.
6713         (build_x_function_call): Use cp_error.
6714         (build_unary_op): Adjust call of build_component_addr.
6715
6716 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
6717
6718         * pt.c (tsubst_friend_class): Check for NULL.
6719
6720 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6721
6722         * search.c (binfo_for_vtable): Initialize bfvi.var.
6723
6724 1999-04-27  Nathan Sidwell  <nathan@acm.org>
6725
6726         * rtti.c (build_x_typeid): Check rtti is enabled.
6727
6728 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
6729
6730         * search.c (is_subobject_of_p): Make sure we're looking at the
6731         right baseclasses.
6732
6733 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
6734
6735         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
6736
6737 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
6738
6739         * decl2.c (finish_file): Tweak handling of extern inlines so that
6740         they are not unnecessarily put out.
6741
6742         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
6743         such as base classes.
6744
6745 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
6746
6747         * tree.c (build_exception_variant): Fix typo: use the chain of U,
6748         not trying V, while cycling through U.
6749
6750 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
6751
6752         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
6753         preserves_first_arg.  Enlarge dummy accordingly.
6754         (DECL_TINFO_FN_P): New macro.
6755         (SET_DECL_TINFO_FN_P): Likeiwse.
6756         (DECL_RETURNS_FIRST_ARG): Remove.
6757         (DECL_PRESERVES_THIS): Likewise.
6758         (DECL_INIT_PRIORITY): New macro.
6759         (finish_struct_1): Change prototype.
6760         (cat_namespace_levels): Remove prototype.
6761         (vtable_decl_p): New prototype.
6762         (vtype_decl_p): Likewise.
6763         (sigtable_decl_p): Likewise.
6764         (walk_globals_pred): New typedef.
6765         (walk_globals_fn): Likewise.
6766         (walk_globals): New prototype.
6767         (walk_namespaces_fn): New typedef.
6768         (walk_namespaces): New prototype.
6769         (wrapup_globals_for_namespace): Likewise.
6770         (walk_vtables): Remove prototype.
6771         (walk_sigtables): Likewise.
6772         (instantiate_pending_templates): New prototype.
6773         * class.c (finish_struct_1): Don't return a value.
6774         * decl.h (pending_statics): Remove declaration.
6775         * decl.c (walk_namespaces_r): New function.
6776         (walk_globals_r): Likewise.
6777         (vtable_decl_p): Likewise.
6778         (vtype_decl_p): Likewise.
6779         (sigtable_decl_p): Likewise.
6780         (walk_namespaces): Likewise.
6781         (walk_globals_data): New type.
6782         (walk_globals): New function.
6783         (wrapup_globals_for_namespace): Likewise.
6784         (expand_static_init): Remove assertion.  Remove redundancy in
6785         conditional.  Don't put static data members in static_aggregates
6786         Tidy.
6787         (finish_function): Remove redundancy in conditional.  Don't set
6788         DECL_RETURNS_FIRST_ARG.
6789         (cat_namespace_levels): Remove.
6790         * decl2.c: Include splay-tree.h and varray.h.
6791         (priority_info_s): New structure.
6792         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
6793         conventions.
6794         (prune_vtable_vardecl): Likewise.
6795         (finish_sigtable_vardecl): Likewise.
6796         (setup_initp): Remove.
6797         (do_dtors): Remove.
6798         (do_ctors): Remove.
6799         (start_static_storage_duration_function): New function.
6800         (generate_inits_for_priority): Likewise.
6801         (finish_static_storage_duration_function): Likewise.
6802         (get_priority_info): Likewise.
6803         (do_static_initialization): Likewise.
6804         (do_static_destruction): Likewise.
6805         (do_static_initialization_and_destruction): Likewise.
6806         (generate_ctor_or_dtor_function): Likewise.
6807         (generate_ctor_and_dtor_functions_for_priority): Likewise.
6808         (pending_statics): Make it a varray.
6809         (pending_statics_used): New variable.
6810         (saved_inlines): Make it a varray.
6811         (saved_inlines_used): New variable.
6812         (finish_static_data_member): Change method of updating
6813         pending_statics.
6814         (mark_inline_for_output): Remove #if 0'd code.  Change method of
6815         updating saved_inlines.
6816         (walk_vtables): Remove.
6817         (walk_sigtables): Likewise.
6818         (import_export_decl): Use DECL_TINFO_FN_P.
6819         (pending_templates): Remove declaration.
6820         (maybe_templates): Likewise.
6821         (static_aggregates_initp): Likewise.
6822         (setup_initp): Likewise.
6823         (finish_objects): Simplify.
6824         (INITIALIZE_P_IDENTIFIER): New macro.
6825         (PRIORITY_IDENTIFIER): New macro.
6826         (SSDF_IDENTIFIER): New macro.
6827         (initialize_p_decl): New variable.
6828         (priority_decl): Likewise.
6829         (ssdf_decl): Likewise.
6830         (priority_info_map): Likewise.
6831         (finish_file): Recode output of static intializers and other
6832         file-scope finalization tasks.
6833         * error.c (OB_END_TEMPLATE_ID): New macro.
6834         (dump_type_real): Use it.
6835         (dump_decl): Likewise.
6836         (dump_function_name): Likewise.
6837         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
6838         interface.
6839         (check_newline): Use walk_globals, not walk_vtables.
6840         * pt.c (pending_tempalte_expansions): Remove.
6841         (set_vardecl_interface_info): Likewise.
6842         (pending_templates): Make static.
6843         (maybe_templates): Likewise.
6844         (instantiate_class_template): Adjust call to finish_struct_1.
6845         (instantiate_pending_templates): New function.
6846         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
6847         * tree.c (static_aggregates_initp): Remove.
6848         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
6849         instead.
6850         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
6851
6852         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
6853         with the RTL code RETURN.
6854         * hash.h: Regenerated.
6855         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
6856         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
6857         * parse.c: Regenerated.
6858         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
6859         it.
6860         (inline_parm_levels): New variable.
6861         (inline_parm_levels_used): Likewise.
6862         (maybe_begin_member_template_processing): Update them.
6863         (maybe_end_member_template_processing): Use them, rather than
6864         guessing how many levels to pop.
6865
6866         * decl.c (make_typename_type): Tighten error-checking.
6867
6868 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
6869
6870         * cp-tree.h (build_binary_op): Remove unneeded parameter.
6871         * class.c (build_vrable_entry_ref): Adjust call to
6872         build_binary_op.
6873         * decl.c (expand_static_init): Likewise.
6874         (grokdeclarator): Likewise.
6875         (finish_function): Likewise.
6876         * decl2.c (delete_sanity): Likewise.
6877         (do_dtors): Likewise.
6878         (do_ctors): Likewise.
6879         * error.c (dump_type_suffix): Likewise.
6880         * expr.c (cplus_expand_expr): Likewise.
6881         * init.c (resolve_offset_ref): Likewise.
6882         (build_new): Likewise.
6883         (build_new_1): Likewise.
6884         (build_vec_delete_1): Likewise.
6885         (expand_vec_init_catch_clause): Likewise.
6886         (build_delete): Likewise.
6887         * pt.c (tsubst): Likewise.
6888         * rtti.c (synthesize_tinfo_fn): Likewise.
6889         * search.c (expand_upcast_fixups): Likewise.
6890         (expand_direct_vtbls_init): Likewise.
6891         * typeck.c (get_member_function_from_ptrfunc): Likewise.
6892         (build_binary_op_nodefault): Likewise.
6893         (point_int_sum): Likewise.
6894         (pointer_diff): Likewise.
6895         (build_unary_op): Likewise.
6896         (build_modify_expr): Likewise.
6897         (get_delta_difference): Likewise.
6898         (build_ptrmemfunc): Likewise.
6899         (expand_ptrmemfunc_cst): Likewise.
6900
6901 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
6902
6903         * decl.c (grokfndecl): Always call cplus_decl_attributes.
6904         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
6905
6906 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
6907
6908         * cp-tree.h (finish_static_data_member_decl): New function.
6909         * decl2.c (finish_static_data_member_decl): Split out from ...
6910         (grokfield): Here.
6911         * pt.c (instantiate_class_template): Use it here instead of
6912         trying to fake it.
6913         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
6914         finish_static_data_member_decl will do that.  Explicit set
6915         DECL_EXTERNAL to match non-template processing.
6916
6917 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
6918
6919         * cp-tree.h (finish_class_definition): Add parameter.
6920         * parse.y (structsp): Use it.  Don't call pop_scope here.
6921         * parse.c: Regenerated.
6922         * semantics.c (finish_class_definition): Pop it here.
6923
6924 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
6925
6926         * decl.c (xref_tag): Revise handling of nested template
6927         declarations.
6928         * pt.c (check_explicit_specialization): Tweak handling of friend
6929         templates in template classes.
6930         (tsubst_friend_class): Handle friend declarations for nested
6931         member template classes.
6932
6933 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
6934
6935         * class.c (finish_struct): Remove unused variable.
6936         (pushclass): Likewise.
6937         (invalidate_class_lookup_cache): Likewise.
6938         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
6939         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
6940         doesn't get obliterated.
6941         (make_typename_type): Handle template classes correctly.
6942
6943         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
6944         (storetags): Declare.
6945         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
6946         (pushclass): Likewise.  Use storetags to install tag declarations,
6947         not pushtag.
6948         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
6949         * decl.c (storetags): Make it global.
6950         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
6951         implicit typename declaration.
6952         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
6953         * method.c (hack_identifier): Likewise.
6954         * search.c (lookup_member): Likewise.
6955
6956         * decl.c (warn_about_implicit_typename_lookup): New function.
6957         (lookup_name_real): Use it.  Rework handling of implicit typename
6958         extension.
6959
6960 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
6961
6962         * cp-tree.h (lookup_nested_field): Remove.
6963         * class.c (push_nested_class): Handle UNION_TYPEs.
6964         (pop_nested_class): Likewise.
6965         * decl.c (lookup_name_real): Don't call lookup_nested_field.
6966         (start_decl): Use push_nested_class, not just pushclass.
6967         (cp_finish_decl): Use pop_nested_class, not just popclass.
6968         * search.c (lookup_nested_field): Remove.
6969
6970         * cp-tree.h (lang_type): Add documentation.
6971         * decl2.c (handle_class_head): Create template declarations here,
6972         as appropriate.
6973         * parse.y (class_head): Return whether or not we entered a new
6974         scope, as well as the type named.
6975         (named_class_head): Likewise.
6976         (named_complex_class_head_sans_basetype): Likewise.
6977         (structsp): Adjust accordingly.  Pop scope when required.
6978         * parse.c: Regenerated.
6979         * pt.c (check_default_tmpl_args): Robustify.
6980         (redeclare_class_template): Likewise.
6981         (instantiate_class_template): An instantiation of an
6982         anonymous union is itself an anonymous union.
6983         * semantics.c (begin_class_definition): Don't create template
6984         declarations here.
6985
6986 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
6987
6988         * parse.y (after_type_declarator_intern): New nonterminal.
6989         (after_type_declarator): Use it.
6990         (direct_after_type_declarator): Likewise.  Move above
6991         nonnested_type to fix reduce/reduce conflict resolution.
6992         (declmods): Reducing from just 'attributes' has EMPTY precedence.
6993         * Makefile.in (CONFLICTS): Update.
6994
6995         * decl.c (define_label): Downgrade error for jumping over a
6996         non-POD decl to pedwarn.
6997
6998 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
6999
7000         * cp-tree.h (popclass): Change declaration.
7001         (pop_nested_class): Likewise.
7002         (poplevel_class): Remove declaration.
7003         * call.c (convert_default_argument): Pass no arguments to
7004         popclass.
7005         * class.c (finish_struct_1): Likewise.
7006         (finish_struct): Likewise.
7007         (popclass): Remove argument.  Simplify code accordingly.
7008         (pop_nested_class): Likewise.
7009         * decl.c (poplevel_class): Declare it here, and make it static.
7010         (poplevel): Handle class scopes.
7011         (poplevel_class): Don't take an rgument.  Simplify.
7012         (pop_everything): Pass no arguments to pop_nested_class.
7013         (cp_finish_decl): Pass no arguments to popclass.
7014         (grokdeclarator): Pass no arguments to pop_nested_class.
7015         (finish_function): Likewise.
7016         * decl2.c (grokfield): Likewise.
7017         (pop_scope): Pass no arguments to popclass.
7018         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
7019         * pt.c (instantiate_class_template): Move call to pushclass, and
7020         document.  Pass no arguments to popclass.
7021         (regenerate_decl_from_template): Likewise.
7022
7023 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
7024
7025         * typeck.c (build_unary_op): Handle taking the address of a unique
7026         bound non-static member function.
7027
7028 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
7029
7030         * lang-options.h (-Wdeprecated): New flag.
7031         * decl2.c (warn_deprecated): New flag.
7032         (lang_decode_option): Deprecated this-is-variable,
7033         external-templates, alt-external-templates.
7034         Support -Wdeprecated.
7035         * errfn.c (cp_deprecated): New function.
7036
7037 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
7038
7039         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
7040         of the decls themselves.
7041
7042         * pt.c (tsubst_function_type): Copy attributes over.
7043
7044         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
7045         and com_interface.
7046         * cp-tree.h: Add prototype.
7047         * decl.c (init_decl_processing): Set valid_lang_attribute.
7048
7049 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
7050
7051         * class.c (finish_struct_1): Look at the const-ness of the field's
7052         type, not the TREE_READONLY-ness of the declaration.
7053         * method.c (synthesize_method): Likewise.
7054         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
7055         creating new declarations.
7056
7057 1999-04-13  Mike Stump  <mrs@wrs.com>
7058
7059         * decl2.c (import_export_decl): Because vtables always reference
7060         virtual functions, even if they are inlined, don't allow
7061         -fno-implement-inlines to not emit them, instead, emit them with
7062         the vtable.
7063         * decl.c (start_function): Likewise.
7064
7065 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
7066
7067         * cp-tree.h (struct lang_type): Add com_interface.
7068         (CLASSTYPE_COM_INTERFACE): New macro.
7069         * class.c (set_rtti_entry): COM interface classes have no RTTI
7070         entries in their vtables; adjust.
7071         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
7072         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
7073         finish_struct_1): Likewise.
7074         * decl2.c (mark_vtable_entries): Likewise.
7075         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
7076         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
7077         expand_upcast_fixups): Likewise.
7078         * tree.c (debug_binfo): Likewise.
7079
7080         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
7081         * typeck.c (comptypes): If we get it, ignore attributes.
7082         * class.c (instantiate_type): Use BASELINK_P.  Change complain
7083         parameter to flags; 2 means ignore attributes.
7084         * call.c (build_op_delete_call): Pass it.
7085
7086         * decl.c (xref_tag): Only complain once about using a typedef-name
7087         with 'struct'.  Downgrade to pedwarn.
7088
7089         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
7090
7091         * parse.y (absdcl_intern): New nonterminal.
7092         (absdcl, direct_abstract_declarator): Use it.
7093
7094         * pt.c (lookup_template_class): Look through implict typename.
7095
7096 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
7097
7098         * friend.c (add_friend): Deal gracefully with error_mark_node.
7099         * method.c (build_overload_value): Handle pointers-to-members as
7100         template parameters.
7101
7102         * decl.c (push_binding): Fix typo in comment.
7103
7104 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
7105
7106         * error.c (dump_type_real): If a typename is a template-id, put
7107         out the template arguments.
7108         (dump_expr): Handle TEMPLATE_ID_EXPR.
7109         * pt.c (lookup_template_class): Now that full arguments are
7110         available everywhere, remove code that tried to guess them.
7111
7112 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
7113
7114         * decl.c (make_typename_type): Complain if we don't find a type
7115         when trying to make a typename type for a non-template type.
7116
7117 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
7118
7119         * decl.c (start_decl): Pass attributes to grokdeclarator.
7120         (grokdeclarator): Handle attributes on constructor-syntax
7121         initializers.
7122
7123 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
7124
7125         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
7126         don't have types.
7127
7128         * search.c (template_self_reference_p): Tweak.
7129
7130 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
7131
7132         * init.c (build_offset_ref): Don't build yet another weird data
7133         structure to describe overloaded functions.
7134
7135 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
7136
7137         * cp-tree.h (BASELINK_P): New macro.
7138         (SET_BASELINK_P): Likewise.
7139         * init.c (build_member_call): Remove needless assignment in if
7140         statement.
7141         * search.c (lookup_field_r): Fix handling when we are looking
7142         specifically for a type; these are not hidden by functions and
7143         variables.
7144         (lookup_member): Use SET_BASELINK_P.
7145         * tree.c (is_overloaded_fn): Use BASELINK_P.
7146         (really_overloaed_fn): Likewise.
7147         (get_first_fn): Likewise.
7148
7149 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
7150
7151         * decl.c (lookup_name_current_level): Tweak, and improve
7152         documentation.
7153
7154         * class.c (maybe_fixup_vptrs): Remove declaration.
7155         (build_class_init_list): Likewise.
7156         * decl.c (pushdecl_class_level): Call check_template_shadow here
7157         ...
7158         (push_class_level_binding): ... not here.
7159         * search.c (dfs_push_type_decls): Only avoid
7160         template-self-reference TYPE_DECLs if they are from base classes.
7161
7162 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
7163
7164         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
7165         nodes.  Tidy.
7166
7167 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
7168
7169         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
7170         (finish_struct_1): Don't call build_class_init_list.
7171
7172 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
7173
7174         * tinfo.h (__class_type_info): Fix illegal declaration.
7175
7176         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
7177         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
7178         (IDENTIFIER_CLASS_VALUE): Improve documentation.
7179         (is_properly_derived_from): Declare.
7180         (invalidate_class_lookup_cache): Likewise.
7181         (maybe_maybe_note_name_used_in_class): Likewise.
7182         (note_name_declared_in_class): Likewise.
7183         (push_using_decl): Remove duplicate declaration.
7184         (id_in_current_class): Remove declaration.
7185         (push_class_binding): Change prototype.
7186         (clear_identitifer_class_values): Declare.
7187         * call.c (is_properly_derived_from): Make it global.
7188         (build_new_function_call): Be careful about updating candidates.
7189         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
7190         asked to make illegal calls.
7191         * class.c: Include splay-tree.h.
7192         (class_stack_node): Add names_used slot.
7193         (check_member_decl_is_same_in_complete_scope): Remove.
7194         (add_method): Fix comment.  Push the declaration into class
7195         scope.
7196         (finish_struct_1): When popping the class, pop the bindings too.
7197         Remove check for data member/function member conflict.
7198         (finish_struct): Remove calls to
7199         check_member_decl_is_same_in_complete_scope.  Change calls to
7200         popclass.
7201         (pushclass): Clear names_used in the class stack entry.
7202         Use invalidate_class_lookup_cache to remove cached entries, rather
7203         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
7204         before entering a new class.  Remove dead code.  Don't mess with
7205         current_function_decl when pushing declarations.
7206         (invalidate_class_lookup_cache): New function, split out from ...
7207         (popclass): Here.  Clean up names_used on our way out.
7208         (instantiate_type): Adjust.
7209         (build_self_reference): Don't push the declaration here.
7210         (maybe_note_name_used_in_class): New function.
7211         (note_name_declared_in_class): Likewise.
7212         * decl.c (add_binding): Change prototype.
7213         (find_class_binding_level): New function.
7214         (innermost_nonclass_level): Likewise.
7215         (current_binding_level): Update documentation.
7216         (inner_binding_level): Remove.  Replace with current_binding_level
7217         throughout.
7218         (push_binding_level): Remove special handling of
7219         class_binding_level.
7220         (pop_binding_level): Likewise.  Use find_class_binding_level.
7221         (suspend_binding_level): Likewise.
7222         (global_bindings_p): Use innermost_nonclass_level.
7223         (toplevel_bindings_p): Likewise.
7224         (namespace_bindings_p): Likewise.
7225         (pseudo_global_level_p): Likewise.
7226         (push_binding): Clear INHERITED_VALUE_BINDING_P.
7227         (add_binding): Check for illegal multiple declarations.  Return a
7228         value indicating whether or not the new binding was legal.
7229         (push_local_binding): Skip over class binding levels.  Check
7230         return value from add_binding.
7231         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
7232         note_name_declared_in_class.
7233         (pushlevel_class): Remove "fake out the rest of the compiler"
7234         code.
7235         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
7236         (clear_identifier_class_values): New function.
7237         (pop_from_top_level): Use it.
7238         (pop_everything): Tweak.
7239         (maybe_process_template_type_declaration): Don't push the
7240         declaration for the template here.
7241         (pushtag): Don't push tag declarations into class scope here.
7242         (pushdecl): Apply DeMorgan's law for readability.
7243         (pushdecl_class_level): Remove special-case code for
7244         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
7245         (push_class_level_bindng): Deal with inherited bindings.
7246         (lookup_name_real): Remove special-case code for
7247         TYPE_BEING_DEFINED, and some implicit typename magic.
7248         (grokdeclarator): Handle COMPONENT_REF for a template function.
7249         (build_enumerator): Don't call pushdecl_class_level here.
7250         (id_in_current_class): Remove.
7251         * decl2.c (grokfield): Don't call pushdecl_class_level or
7252         check_template_shadow.
7253         * errfn.c (cp_file_of): Don't declare.
7254         (cp_line_of): Likewise.
7255         * error.c (dump_decl): Handle an OVERLOAD.
7256         (cp_file_of): Likewise.
7257         (cp_line_of): Likewise.
7258         * init.c (build_member_call): Handle a COMPONENT_REF.
7259         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
7260         pushdecl_class_level.
7261         * method.c (hack_identifier): Build COMPONENT_REFs for references
7262         to member templates as well as member functions.  Remove dead
7263         code.
7264         * parse.y (left_curly): Remove.
7265         (nonnested_type): Call maybe_note_name_used_in_class, not
7266         pushdecl_class_level.
7267         * parse.c: Regenerated.
7268         (nested_name_specifier_1): Likewise.
7269         * pt.c (check_explicit_specialization): Adjust, for robustness.
7270         (check_template_shadow): Handle OVERLOADs.
7271         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
7272         TEMPLATE_DECL, if appropriate.
7273         * search.c (envelope_add_decl): Remove.
7274         (dfs_pushdecls): Likewise.
7275         (dfs_compress_decls): Likewise.
7276         (dfs_push_decls): New function.
7277         (dfs_push_type_decls): Likewise.
7278         (setup_class_bindings): Likewise.
7279         (template_self_reference_p): Likewise.
7280         (lookup_field_r): Use it.
7281         (looup_member): Remove old comment.  Deal with ambiguity.
7282         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
7283         and remove envelope processing.
7284         * semantics.c (begin_class_definition): Let pushclass push
7285         declarations for base classes.
7286         (finish_member_declaration): Push declarations into class scope.
7287         * typeck.c (build_component_ref): Just put an OVERLOAD into the
7288         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
7289         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
7290         * Makefile.in (class.o): Depend on splay-tree.h.
7291
7292 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
7293
7294         * cvt.c (convert_pointer_to_real): Use same_type_p.
7295         * typeck.c (comp_target_types): Use same_type_p.
7296
7297 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
7298
7299         * semantics.c (begin_inline_definitions,
7300         finish_inline_definitions): Rename from finish_default_args and
7301         begin_inline_definitions, respectively, to something that isn't a
7302         total lie.  :)
7303         * parse.y (structsp): Adjust.
7304
7305         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
7306         (list_hash_lookup): Likewise.
7307         (hash_tree_chain): Adjust.
7308         * pt.c (tsubst): Adjust.
7309         (tsubst_arg_types): Use plain hash_tree_cons.
7310         * cp-tree.h (hash_tree_cons_simple): Lose.
7311         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
7312
7313 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7314
7315         * Makefile.in (hash.h): Generate using gperf language 'C', not
7316         'KR-C', so gperf uses the `const' keyword on strings.
7317
7318         * gxx.gperf (resword): Const-ify a char*.
7319
7320 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
7321
7322         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
7323         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
7324         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
7325         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
7326         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
7327         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
7328         tree.c: Adjust.
7329
7330 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
7331
7332         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
7333
7334 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
7335
7336         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
7337
7338 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
7339
7340         * cp-tree.h (add_friend): Declare.
7341         (add_friends): Likewise.
7342         * friend.c (add_friend): Make it global.  Don't add to
7343         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
7344         (add_friends): Make it global.
7345         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
7346         befriending class is a template.
7347         * parse.y (component_decl_1): Fix typo in comment.
7348         * parse.c: Regenerated.
7349         * pt.c (instantiate_class_template): Use add_friend and
7350         add_friends rather that duplicating some of their functionality
7351         here.
7352
7353 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
7354
7355         * call.c (build_field_call): Unify 'this' and non-'this' cases.
7356
7357         * typeck.c (build_indirect_ref): Check for 'this' sooner.
7358
7359 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7360
7361         * call.c (op_error): Const-ify a char*.
7362         (add_candidate, source_type, add_warning): Add static prototype.
7363         (print_z_candidates): Const-ify a char*.
7364
7365         * class.c (resolve_address_of_overloaded_function,
7366         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
7367         (get_vtable_name, finish_struct_1): Const-ify a char*.
7368
7369         * cvt.c (convert_to_reference): Likewise.
7370
7371         * decl.c (redeclaration_error_message, record_builtin_type,
7372         record_unknown_type, member_function_or_else, bad_specifiers):
7373         Likewise.
7374         (find_binding, select_decl, unqualified_namespace_lookup,
7375         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
7376         Add static prototype.
7377         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
7378         implicitly_declare, record_builtin_java_type, define_function,
7379         grok_op_properties, tag_name): Const-ify a char*.
7380
7381         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
7382         (define_function, finish_builtin_type): Const-ify a char*.
7383         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
7384         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
7385         (file_name_nondirectory): Const-ify a char*.
7386         (init_filename_times): Don't prototype.
7387         (compiler_error): Prototype.
7388         (yyerror, init_repo): Const-ify a char*.
7389         (build_srcloc): Don't prototype.
7390         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
7391         Const-ify a char*.
7392         (warn_for_assignment): Don't prototype.
7393         (convert_for_initialization, readonly_error, check_for_new_type,
7394         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
7395         Const-ify a char*.
7396
7397         * decl2.c (acceptable_java_type, output_vtable_inherit,
7398         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
7399         merge_functions, decl_namespace, validate_nonmember_using_decl,
7400         do_nonmember_using_decl): Add static prototype.
7401         (lang_f_options): Const-ify a char*.
7402         (finish_builtin_type): Likewise.
7403         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
7404         prototype.
7405
7406         * errfn.c: Include cp-tree.h.
7407         (cp_thing): Add static prototype.
7408         (compiler_error): Don't protoptype.
7409         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
7410         passing it to `cp_thing'.
7411
7412         * error.c (interesting_scope_p): Add static prototype.
7413
7414         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
7415         a char*.
7416
7417         * init.c (compiler_error): Don't prototype.
7418         (member_init_ok_or_else): Const-ify a char*.
7419         (build_java_class_ref): Add static prototype.
7420
7421         * lex.c (compiler_error): Don't prototype.
7422         (get_time_identifier, interface_strcmp, extend_token_buffer,
7423         handle_cp_pragma): Const-ify a char*.
7424         (is_global, init_filename_times): Add static prototype.
7425         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
7426         (compiler_error): Change from fixed args to variable args.
7427         (yyerror): Const-ify a char*.
7428
7429         * parse.y (cond_stmt_keyword): Const-ify a char*.
7430         (parse_decl): Add static prototype.
7431
7432         * pt.c (template_args_equal, print_template_context): Likewise.
7433         (print_candidates, check_default_tmpl_args): Const-ify a char*.
7434         (instantiate_class_template): Likewise.
7435
7436         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
7437
7438         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
7439         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
7440
7441         * search.c (lookup_field_info, lookup_member): Likewise.
7442         (lookup_member): Cast the first argument of `bzero' to a PTR.
7443
7444         * sig.c (compiler_error): Don't prototype.
7445         (build_signature_pointer_or_reference_nam): Const-ify a char*.
7446         (get_sigtable_name, build_member_function_pointer): Likewise.
7447
7448         * tree.c (compiler_error): Don't prototype.
7449         (no_linkage_helper, build_srcloc): Add static prototype.
7450         (build_vbase_pointer_fields): Const-ify a char*.
7451         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
7452
7453         * typeck.c (compiler_error): Don't prototype.
7454         (convert_for_assignment): Const-ify a char*.
7455         (comp_cv_target_types): Add static prototype.
7456         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
7457         build_component_addr, build_unary_op, convert_for_initialization):
7458         Const-ify a char*.
7459
7460         * typeck2.c (ack): Add static prototype and change from fixed args
7461         to variable args.
7462         (readonly_error, check_for_new_type): Const-ify a char*.
7463
7464         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
7465         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
7466         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
7467         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
7468         gen_assign, GNU_xref_member): Const-ify a char*.
7469
7470 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7471
7472         * gxxint.texi: Remove old discussion on copying virtual bases.
7473
7474 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
7475
7476         * Make-lang.in: Remove all references to g++.o/g++.c.
7477         Link g++ from gcc.o.
7478
7479 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
7480
7481         * decl2.c (comdat_linkage): Treat vtables like functions.
7482
7483 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
7484
7485         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
7486
7487 1999-03-25  Nathan Sidwell  <nathan@acm.org>
7488
7489         * decl.c (init_decl_processing): Add `signed' type as a synonym
7490         for `int'.
7491
7492 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
7493
7494         * typeck.c (common_type): Handle cv-qual unification for pointers
7495         to members.
7496
7497         * decl.c (unqualified_namespace_lookup): Return error_mark_node
7498         on error.
7499         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
7500         * lex.c (do_identifier): If we got error_mark_node, call
7501         lookup_name again.
7502
7503 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7504
7505         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
7506         classes.
7507
7508 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
7509
7510         * decl.c (lookup_name_real): Do nested field lookup regardless of
7511         TYPE_BEING_DEFINED.
7512
7513 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
7514
7515         * cp-tree.h (lang_type): Remove has_assignment and
7516         has_real_assignment.  Add befriending_classes.
7517         (TYPE_HAS_ASSIGNMENT): Remove.
7518         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
7519         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
7520         (lang_decl): Document.
7521         (DECL_BEFRIENDING_CLASSES): New macro.
7522         (FRIEND_NAME): Move declaration to more obvious location.
7523         (FRIEND_DECLS): Likewise.
7524         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
7525         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
7526         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
7527         (grok_op_properties): Likewise.
7528         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
7529         (add_friend): Likewise.  Don't do weird things with assignment
7530         operators.  Update DECL_BEFRIENDING_CLASSES.
7531         (add_friends): Don't do weird things with assignment operators.
7532         (make_friend_class): Likewise.  Update
7533         CLASSTYPE_BEFRIENDING_CLASSES.
7534         * pt.c (instantiate_class_template): Don't set
7535         TYPE_HAS_ASSIGNMENT.
7536         (tsubst_copy): Substitute the TREE_TYPE for more unary
7537         expressions.
7538         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
7539         * search.c (protected_accessible_p): New function.
7540         (friend_accessible_p): Likewise.
7541         (accessible_p): Use them.
7542
7543 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
7544
7545         * pt.c (convert_nontype_argument): Don't create things that aren't
7546         PTRMEM_CSTs when applying a qualification conversion to a
7547         PTRMEM_CST.
7548
7549 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
7550
7551         * Makefile.in (OBJS): Don't mention hash.o.
7552         (OBJDEPS): Likewise.
7553
7554 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
7555
7556         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
7557         * decl.c (expand_static_init): Make sure we don't add any after
7558         then.
7559
7560         * decl.c (cp_finish_decl): Move intelligence about handling
7561         DECL_COMDAT for variables from here...
7562         * decl2.c (comdat_linkage): ...to here.
7563         (maybe_make_one_only): Tweak.
7564         (import_export_decl): Call comdat_linkage for variables, too.
7565         (finish_file): Handle template statics properly.
7566
7567 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
7568
7569         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
7570         Document internals of pointer-to-member-functions.
7571         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
7572         (PFN_FROM_PTRMEMFUNC): Likewise.
7573         (build_type_conversion): Remove unused parameter.
7574         (build_ptrmemfunc1): Declare.
7575         (expand_ptrmemfunc_cst): New function.
7576         (delta2_from_ptrmemfunc): Likewise.
7577         (pfn_from_ptrmemfunc): Likewise.
7578         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
7579         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
7580         (convert_to_reference): Remove unused parameter to
7581         build_type_conversion.
7582         (ocp_convert): Likewise.
7583         (build_user_type_conversion): Likewise.
7584         * error.c (dump_expr): Handle NULL pointer-to-member functions.
7585         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
7586         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
7587         open when handling pointer-to-member functions.
7588         * pt.c (convert_nontype_argument): Clean up error messages.  Be
7589         more stringent with pointers-to-members.
7590         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
7591         (build_unary_op): Tidy ever-so-slightly.
7592         (build_conditional_expr): Remove extra parameter to
7593         build_type_conversion.
7594         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
7595         we're using.
7596         (expand_ptrmemfunc_cst): Define.
7597         (delta2_from_ptrmemfunc): Likewise.
7598         (pfn_from_ptrmemfunc): Likewise.
7599
7600 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
7601
7602         * init.c (build_member_call): Handle template-id expressions
7603         correctly.
7604         * typeck.c (build_x_function_call): Likewise.
7605
7606 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
7607
7608         * friend.c (make_friend_class): Avoid core dump when
7609         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
7610
7611 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
7612
7613         * decl.c (start_function): Suppress normal linkage heuristics
7614         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
7615
7616 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
7617
7618         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
7619         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
7620
7621 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7622
7623         * parse.y (named_complex_class_head_sans_basetype):
7624         Do not push a scope for error_mark_node.
7625         (maybe_base_class_list): Likewise.
7626
7627         * decl.c (start_decl): Check for error_mark_node as a type.
7628         Detected by g++.brendan/array-refs.C.
7629         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
7630         (maybe_build_cleanup_1): Likewise.  Detected by
7631         g++.jason/incomplete1.C.
7632
7633         * tree.c (build_dummy_object): Use void_zero_node instead of the
7634         error_mark_node.
7635         (is_dummy_object): Check for such a node.
7636         Detected by g++.bob/inherit1.C
7637
7638 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
7639
7640         * method.c (old_backref_index): Split out...
7641         (flush_repeats): From here.  Rename back from try_old_backref.
7642         (build_mangled_name): Put back some old-style repeat handling.
7643
7644 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7645
7646         * lex.c: Don't include setjmp.h.
7647         (parse_float): New static function.
7648         (pf_args): New struct.
7649         (real_yylex): Use them in call to `do_float_handler'.
7650
7651 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
7652
7653         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
7654         * tree.c (layout_basetypes): Not here.
7655         * search.c (dfs_search): Remove; no longer used.
7656
7657 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
7658
7659         * decl2.c (validate_nonmember_using_decl): Issue sensible
7660         error-messages on bogus qualifiers.
7661
7662 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
7663
7664         * call.c (add_function_candidate): Fix uninitialized variable.
7665
7666         * Makefile.in (search.o): Add dependency on varray.h.
7667
7668 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
7669
7670         * decl.c (duplicate_decls): Use same_type_p.
7671         * method.c (try_old_backref): Renamed from flush_repeats.  Use
7672         same_type_p.  Don't try to handle repeats.  Return success.
7673         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
7674         calls from old-style code, too.
7675         (check_ktype): Use same_type_p.
7676         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
7677         (build_qualified_name): Simplify logic.
7678         (process_overload_item): Strip typedefs and quals at the top.
7679         (build_mangled_name_for_type_with_Gcode): Remove call to
7680         type_canonical_variant.
7681         (build_mangled_name): Likewise.  Remove support for old-style
7682         repeats, which have been disabled since 2.7.2.  Don't mess with
7683         TREE_USED.
7684         (build_decl_overload_real): Don't mess with TREE_USED.
7685
7686 1999-03-13  Nathan Sidwell  <nathan@acm.org>
7687
7688         * error.c (cp_printers): Add 'F' escape character.
7689         (dump_type_real): Remove TREE_LIST (fnargs) printing.
7690         Functionality moved to dump_parameters.
7691         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
7692         (dump_function_decl): Extend meaning of V parameter.  Use
7693         dump_parameters and dump_exception_spec.
7694         (dump_parameters): New static function.
7695         (dump_exception_spec): New static function.
7696         (fndecl_as_string): Change argument semantics.  Use
7697         dump_function_decl directly.
7698
7699         * sig.c (build_signature_table_constructor): Use cp_error.
7700
7701 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7702
7703         * semantics.c (finish_switch_cond): Handle error cases gracefully.
7704         Detected by g++.law/enum5.C.
7705
7706         * typeck.c (build_modify_expr): Check for errors after resolving
7707         offsets.  Detected by g++.brendan/static1.C.
7708
7709         * decl.c (complete_array_type): Ignore initial_value if it is an
7710         error.  Detected by g++.benjamin/17930.C.
7711
7712         * typeck2.c (process_init_constructor): Return error if one argument
7713         is in error.  Detected by g++.benjamin/13478.C.
7714
7715 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7716
7717         * decl.c (select_decl): Allow class templates when we need types.
7718         * decl2.c (ambiguous_decl): Likewise.
7719
7720 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
7721
7722         * lex.c (do_identifier): Correct call to enforce_access.
7723         * search.c (accessible_p): Tweak comment.
7724
7725 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
7726
7727         * semantics.c (begin_class_definition): Call build_self_reference.
7728         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
7729
7730         * search.c (assert_canonical_unmarked): Fix typo in prototype.
7731
7732         * search.c (dfs_canonical_queue): New function.
7733         (dfs_assert_unmarked_p): Likewise.
7734         (assert_canonical_unmarked): Likewise.
7735         (access_in_type): Use it.
7736         (accessible_p): Likewise.  Walk the whole tree when umarking.
7737
7738         * sig.c (build_signature_table_constructor): Use accessible_p
7739         instead of compute_access.
7740
7741 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
7742
7743         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
7744
7745 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
7746
7747         * cp-tree.h (flag_access_control): Declare.
7748         (TREE_VIA_PPUBLIC): Document.
7749         (DECL_NONSTATIC_MEMBER_P): New macro.
7750         (enforce_access): Return an indication of whether or not access
7751         was permitted.
7752         (build_self_reference): Change prototype.
7753         (compute_access): Replace with ...
7754         (accessible_p): New function.
7755         (dfs_walk): Change prototype.
7756         (dfs_unmark): Likewise.
7757         (markedp): Likewise.
7758         * call.c (enforce_access): Use accessible_p.
7759         * class.c (build_self_reference): Insert the declaration into the
7760         list of members for this type, and make it public.
7761         * decl.c (xref_basetypes): Avoid ill-timed recursion.
7762         * init.c (build_offset_ref): Use lookup_member, not three separate
7763         name-lookups.  Call enforce_access rather than checking for
7764         illegal accesses here.
7765         (resolve_offset_ref): Likewise.
7766         * lex.c (do_identifier): Likewise.
7767         * method.c (hack_identifier): Likewise.
7768         * parse.y (self_reference): Remove.
7769         (opt_component_decl_list): Don't use it.
7770         * parse.c: Regenerated.
7771         * pt.c (print_candidates): Generalize to handle lists of
7772         overloaded functions.
7773         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
7774         not set.
7775         (get_template_base): Use new calling convention for dfs_walk.
7776         * search.c: Include varray.h.  Add prototypes.
7777         (dfs_walk): Accept a data pointer to pass to the work functions.
7778         All callers changed.  All work functions changed.
7779         (breadth_first_search): Rename to bfs_walk, and make consistent
7780         with dfs_walk.
7781         (dfs_walk_real): New function.
7782         (canonical_binfo): New function.
7783         (context_for_name_lookup): Likewise.
7784         (shared_marked_p): Likewise.
7785         (shared_unmarked_p): Likewise.
7786         (lokup_field_queue_p): Likewise.
7787         (lookup_field_r): Generalize to handle both functions and fields.
7788         (lookup_field): Just call lookup_member.
7789         (lookup_fnfields): Likewise.
7790         (lookup_member): Move body of lookup_field here and generalize.
7791         (dfs_accessible_queue_p): Likewise.
7792         (dfs_accessible_p): Likewise.
7793         (dfs_access_in_type): Likewise.
7794         (access_in_type): Likewise.
7795         (compute_access): Remove, and replace with ...
7796         (accessible_p): New function.
7797         (vbase_types): Remove.
7798         (vbase_decl_ptr_intermediate): Likewise.
7799         (vbase_decl_ptr): Likewise.
7800         (vbase_init_result): Likewise.
7801         (closed_envelopes): Likewise.
7802         (bvtable): Likewise.
7803
7804 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
7805
7806         * call.c (add_function_candidate): Check for proper number of args
7807         before checking the validity of those args.
7808
7809 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
7810
7811         * cp-tree.h (struct lang_type): Add anon_union field.
7812         (ANON_UNION_TYPE_P): Use it instead of examining type.
7813         (SET_ANON_UNION_TYPE_P): New macro.
7814         * decl.c (check_tag_decl): Use it.
7815
7816         * search.c (compute_access): Handle non-type contexts earlier, and
7817         handle NULL_TREE.
7818
7819         * tree.c (build_exception_variant): Use copy_to_permanent.
7820
7821         * decl2.c (setup_initp): Give statics with no priority the default
7822         priority here.
7823         (do_dtors, do_ctors, finish_file): Remove special handling of
7824         non-prioritized statics.
7825
7826 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
7827
7828         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
7829         * decl.c (make_typename_type): Don't issue an error if an
7830         immediate lookup fails; it migt be resolved later.
7831         * friend.c (is_friend): Add comment.
7832         * search.c (breadth_first_search): Add POSTFN and DATA
7833         parameters.  Tidy.  All callers changed.
7834         (lookup_field_queue_p): New function.
7835         (lookup_field_r): Likewise.
7836         (lookup_field_post): Likewise.
7837         (lookup_field): Use them, via breadth_first_search, instead of
7838         duplicating logic.
7839         (compute_access): Robustify.
7840         (lookup_fnfield_info): New structure.
7841
7842 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
7843
7844         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
7845
7846 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
7847
7848         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
7849         cc happy.
7850
7851         * decl2.c (import_export_class): Also return if
7852         CLASSTYPE_INTERFACE_ONLY is set.
7853
7854 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7855
7856         * decl.c (push_overloaded_decl): Only overwrite the old binding if
7857         there was one.
7858         * decl2.c (do_local_using_decl): Fix loop termination.
7859
7860 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
7861
7862         * cp-tree.h (determine_specialization): Don't declare.
7863         * pt.c (determine_specialization): Make it static.  Eliminate
7864         complain parameter.  Note that decl is always non-NULL now, and
7865         simplify accordingly.
7866
7867         * decl.c (maybe_push_to_top_level): Always call
7868         push_cp_function_context.
7869         (pop_from_top_level): Always call pop_cp_function_context.
7870
7871 1999-02-26  Nathan Sidwell  <nathan@acm.org>
7872
7873         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
7874         diagnostics.
7875         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
7876         * init.c (build_new_1): Extra arg to complete_type_or_else.
7877         (build_delete): Likewise.
7878         * typeck.c (require_complete_type): Likewise.
7879         (pointer_int_sum): Likewise.
7880         (pointer_diff): Likewise.
7881         (build_component_ref): Likewise.
7882
7883         * typeck2.c (incomplete_type_error): Always use cp_error.
7884         Show declaration of undefined type, if appropriate.
7885         Deal with UNKNOWN_TYPE nodes.
7886
7887         * typeck.c (require_complete_type): Use TYPE_SIZE as
7888         size_zero_node to mean incomplete type.
7889         (require_complete_type_in_void): New function.
7890         (build_compound_expr): Call complete_type_in_void for LHS.
7891         (build_c_cast): Call complete_type_in_void for void cast.
7892         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
7893         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
7894         require_complete_type_in_void.  Call it.
7895         * cp-tree.h (require_complete_type_in_void): Prototype new function.
7896
7897         * typeck.c (convert_arguments): Use alternative format for
7898         function decls.  Don't require_complete_type here.  Simplify
7899         diagnostic printing.
7900         (convert_for_initialization): Don't require_complete_type on RHS yet.
7901         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
7902
7903         * call.c (build_over_call): Cope with qualified void return type.
7904         * semantics.c (finish_call_expr): Likewise.
7905         * typeck.c (build_function_call_real): Likewise.
7906         (c_expand_return): Likewise.
7907         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
7908
7909         * call.c (print_z_candidates): Use alternate print format, to be
7910         consistent with (pt.c) print_candidates.
7911         * method.c (hack_identifier): List candidate members.
7912         * search.c (lookup_field): Build ambiguous list, and show it, if
7913         ambiguous.
7914
7915 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
7916
7917         * typeck.c (decay_conversion): Don't confuse constant array
7918         variables with their initializers.
7919
7920         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
7921         merging decls.
7922         * pt.c (regenerate_decl_from_template): Tweak for clarity.
7923         (instantiate_decl): Mark a decl instantiated before regenerating
7924         it to avoid recursion.
7925         * tree.c (mapcar): Don't call decl_constant_value unless we know
7926         something is TREE_READONLY_DECL_P.
7927
7928         * class.c (check_for_override): Don't stop checking when we find
7929         the first overridden function.  Delete #if 0'd code.
7930         * search.c (get_matching_virtual): Likewise.
7931
7932 1999-02-25  Richard Henderson  <rth@cygnus.com>
7933
7934         * lang-specs.h: Define __FAST_MATH__ when appropriate.
7935
7936 1999-02-24  Mike Stump  <mrs@wrs.com>
7937
7938         * typeck.c (convert_for_assignment): Allow boolean integral constant
7939         expressions to convert to null pointer.
7940
7941 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
7942
7943         * decl.c (lookup_namespace_name): Resolve namespace aliases.
7944
7945         * class.c (push_nested_class): Allow namespaces.
7946
7947         * decl2.c (set_decl_namespace): Add friendp parameter.
7948         * decl.c (grokfndecl): Pass it.
7949         (grokvardecl): Likewise.
7950         * cp-tree.h: Change declaration.
7951
7952 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
7953
7954         * pt.c (tsubst): Allow an array of explicit size zero.
7955
7956 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
7957
7958         * errfn.c: Change varargs code to look like toplev.c.
7959
7960         * method.c (process_modifiers): Don't prepend 'U' for char or
7961         wchar_t.
7962
7963 1999-02-20  Craig Burley  <craig@jcb-sc.com>
7964
7965         * Make-lang.in (cplib2.ready): Don't consider updating
7966         cplib2 stuff if the current directory isn't writable, as
7967         it won't work (such as during a `make install').
7968
7969 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
7970
7971         * decl2.c (start_objects): Make file scope constructors and
7972         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
7973         ASM_OUTPUT_DESTRUCTOR are defined.
7974
7975 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
7976
7977         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
7978         (fn_type_unification): Adjust prototype.
7979         (lookup_fnfields_1): Declare.
7980         * call.c (add_template_candidate_real): Adjust call to
7981         fn_type_unification.
7982         * class.c (add_method): Don't allow duplicate declarations of
7983         constructors or destructors.
7984         (resolve_address_of_overloaded_function): Remove unused variable.
7985         Adjust call to fn_type_unification.
7986         * decl.c (grokfndecl): Be more robust in the face of illegal
7987         specializations.
7988         * decl2.c (check_classfn): Remove hokey handling of member
7989         templates.
7990         * pt.c (determine_specialization): Improve comments.  Adjust to
7991         handle template argument deduction as per the standard.
7992         (check_explicit_specialization): Fix comment spacing.  Handle
7993         type-conversion operators correctly.  Improve error-recovery.
7994         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
7995         (get_bindings_real): Simplify handling of static members.
7996         * search.c (lookup_fnfields_1): Make it have external linkage.
7997         * typeck.c (compparms): Fix comment.
7998         (build_unary_op): Don't try to figure out which template
7999         specialization is being referred to when when the address-of
8000         operator is used with a template function.
8001
8002 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8003
8004         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
8005         keyword to match an analogous change at the top level.
8006
8007         * tree.c (lvalue_or_else): Likewise.
8008
8009 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
8010
8011         * decl.c (xref_basetypes): Comment.
8012         * pt.c (instantiate_class_template): Use xref_basetypes.
8013
8014 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
8015
8016         * cp-tree.h (tsubst): Change prototype.
8017         (tsubst_expr): Likewise.
8018         (tsubst_copy): Likewise.
8019         (type_unification): Remove prototype.
8020         * call.c (convert_default_arg): Adjust call to tsubst_expr.
8021         * class.c (resolve_address_of_overloaded_function): Just use
8022         fn_type_unification.
8023         * decl.c (grokdeclarator): Adjust call to tsubst.
8024         * method.c (build_template_parm_names): Likewise.
8025         * pt.c (GTB_VIA_VIRTUAL): New macro.
8026         (GTB_IGNORE_TYPE): Likewise.
8027         (resolve_overloaded_unification): Add `complain' parameter.
8028         (try_one_overload): Likewise.
8029         (tsubst_template_arg_vector): Likewise.
8030         (tsubst_template_parms): Likewise.
8031         (tsubst_aggr_type): Likewise.
8032         (tsubst_arg_types): Likewise.
8033         (tsubst_call_declarator_parms): Likewise.
8034         (unify): Remove explicit_mask.
8035         (type_unification_real): Likewise.
8036         (get_template_base_recursive): Likewise.
8037         (coerce_template_template_parms): Provide prototype.
8038         (tsubst_function_type): Likewise.
8039         (try_class_unification): New function.
8040         All callers changed to use new complain parameter.
8041         (get_template_base): Use try_class_unification.
8042         (unify): Adjust handling of classes derived from template types.
8043         (fn_type_unification): Substitute explicit arguments before
8044         unification.
8045
8046 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8047
8048         * decl.c (pushdecl): Remove dead code.
8049
8050 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
8051
8052         * decl2.c (finish_objects): Fix code I missed in previous change.
8053
8054 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
8055
8056         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
8057         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
8058
8059         * pt.c (maybe_process_partial_specialization): Complain about
8060         'template <>' on non-specialization.
8061
8062 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
8063
8064         * decl.c (grokdeclarator): Catch wierd declarators.
8065         * decl2.c (finish_file): Don't abort because of namespace parsing
8066         failure.
8067         (check_decl_namespace): Remove.
8068
8069 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
8070
8071         * cp-tree.h (get_template_base): Don't declare.
8072         (dfs_walk): Declare.
8073         (dfs_unmark): Likewise.
8074         (markedp): Likewise.
8075         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
8076         targs to get_template_base.
8077         (get_template_base_recursive): Move here from search.c.  Check to
8078         see that the base found can be instantiated to form the desired
8079         type.
8080         (get_template_base): Likewise.
8081         (get_class_bindings): Simplify.
8082         * search.c (get_template_base_recursive): Move to pt.c.
8083         (get_template_base): Likewise.
8084         (markedp): Make it global.
8085         (dfs_walk): Likewise.
8086         (dfs_unmark): Likewise.
8087
8088 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
8089
8090         * pt.c (maybe_process_partial_specialization): Complain about
8091         specialization in wrong namespace.
8092         * tree.c (decl_namespace_context): New fn.
8093
8094 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8095
8096         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
8097         * pt.c (coerce_template_template_parms): Handle nested
8098         template template parameters.
8099
8100 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
8101
8102         * typeck2.c: Update email addresses.
8103
8104 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8105
8106         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
8107         turned off.
8108
8109 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
8110
8111         * lex.c (retrofit_lang_decl): Split out...
8112         (build_lang_decl): From here.
8113         * decl.c (pushdecl): Call it for functions generated by the middle
8114         end that don't have DECL_LANG_SPECIFIC.
8115         * cp-tree.h: Declare it.
8116
8117         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
8118         (start_objects, finish_objects): Only use special
8119         init_priority code if the user specified a priority.
8120         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
8121         objects.
8122
8123 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
8124
8125         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
8126         mkstemp.o.  Get them from libiberty now.
8127         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
8128
8129 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
8130
8131         * decl2.c (lang_decode_option): Use read_integral_parameter.
8132
8133 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
8134
8135         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
8136         before calling complete_type_or_else.
8137
8138 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8139
8140         * input.c (inline): Don't define, its handled by system.h.
8141
8142 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
8143
8144         * decl2.c: Don't define flag_no_ident here.  Don't process
8145         -f(no-)ident here.
8146         * cp-tree.h: Don't declare flag_no_ident here.
8147         * lang-specs.h: Map -Qn to -fno-ident.
8148
8149 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
8150
8151         * cp-tree.h (struct tree_binding): Replace scope field with a union.
8152         (BINDING_SCOPE): Adjust.
8153         * decl.c (BINDING_LEVEL): Adjust.
8154
8155 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
8156
8157         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
8158         member constants.
8159
8160         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
8161         a ctor initializer.
8162
8163         * tree.c (equal_functions): Fix name in prototype.
8164
8165         * decl.c (push_local_binding): Add FLAGS argument.
8166         (pushdecl, push_overloaded_decl): Pass it.
8167         * decl2.c (do_local_using_decl): Likewise.
8168         * cp-tree.h: Adjust prototype.
8169         * decl.c (poplevel): Fix logic.
8170
8171         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
8172         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
8173         (cat_namespace_levels): Don't loop forever.
8174
8175 1999-01-25  Richard Henderson  <rth@cygnus.com>
8176
8177         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
8178
8179 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
8180
8181         * class.c (resolve_address_of_overloaded_function): Mark the
8182         chosen function used.
8183
8184         * call.c (build_call): Make sure that a function coming in has
8185         been marked used already.
8186         * decl.c (expand_static_init): Call mark_used instead of
8187         assemble_external.
8188         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
8189         alloc_eh_object, expand_throw): Likewise.
8190         * init.c (build_builtin_delete_call): Likewise.
8191         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
8192         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
8193         expand_generic_desc): Likewise.
8194
8195 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8196
8197         * tree.c (equal_functions): New function.
8198         (ovl_member): Call it.
8199
8200 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
8201
8202         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
8203
8204 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8205
8206         * decl.c (decls_match): Return 1 if old and new are identical.
8207         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
8208
8209 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
8210
8211         * decl.c (start_function): Make member functions one_only on windows.
8212         * decl2.c (import_export_decl): Likewise.
8213
8214         * decl.c (grokdeclarator): Don't complain about implicit int in
8215         a system header.  Change same-name field check to not complain in
8216         a system header instead of within extern "C".
8217
8218 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
8219
8220         * cp-tree.h (PUSH_GLOBAL): New macro.
8221         (PUSH_LOCAL): Likewise.
8222         (PUSH_USING): Likewise.
8223         (namespace_bindings_p): Declare.
8224         (push_overloaded_decl): Likewise.
8225         * decl.c (push_overloaded_decl): Don't make it static.  Check for
8226         illegal declarations after using declarations here.
8227         (namespace_bindings_p): Likewise.
8228         (duplicate_decls): Don't consider declarations from different
8229         namespaces to be the same.
8230         (pushdecl): Use symbolic PUSH_ constants in calls to
8231         push_overloaded_decl.
8232         (push_overloaded_decl_1): Likewise.
8233         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
8234         (do_nonmember_using_decl): Check for illegal using declarations
8235         after ordinary declarations here.
8236         (do_local_using_decl): Call pushdecl to insert declarations.
8237
8238 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
8239
8240         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
8241
8242 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
8243
8244         * tree.c (build_cplus_array_type_1): Don't call build_array_type
8245         for types involving template parameters.
8246
8247         * cp-tree.h (PARM_DECL_EXPR): Delete.
8248         (convert_default_arg): Change prototype.
8249         (check_default_argument): Declare.
8250         (search_tree): Likewise.
8251         * call.c (convert_default_arg): Take the function to which the
8252         default argument belongs as a parameter, and do any necessary
8253         instantiation here, instead of ...
8254         (build_over_call): Here.
8255         * decl.c (local_variable_p): New function.
8256         (check_default_argument): Likewise, split out and tidied from ...
8257         (grokparms): Here.
8258         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
8259         * pt.c (tsubst_call_declarator_parms): New function.
8260         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
8261         with CALL_EXPRs, rather than trying to be clever.
8262         (tsubst): Use tsubst_call_declarator_parms.
8263         * tree.c (search_tree): Don't make it static.
8264         * typeck.c (convert_arguments): Use new interface to
8265         convert_default_arg.
8266
8267 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
8268
8269         * error.c (dump_function_decl): Don't print the argument types for
8270         a function when the verbosity level is negative.
8271
8272         * call.c (build_over_call): Check format attributes at call-time.
8273
8274         * pt.c (tsubst_copy): Fix comment.
8275         (unify): Don't allow unification with variable-sized arrays.
8276
8277         * semantics.c (finish_stmt_expr): When processing a template make
8278         the BIND_EXPR long-lived.
8279
8280 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
8281
8282         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
8283         (import_export_vtable): Not here.
8284
8285 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
8286
8287         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
8288         non-static member function.
8289
8290 1999-01-18  Nathan Sidwell  <nathan@acm.org>
8291
8292         * class.c (instantiate_type): Only diagnose illegal address of member
8293         function if complaining.
8294
8295         * decl.c (lookup_name_real): Remove duplicate code.
8296
8297 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
8298
8299         * tree.c (copy_template_template_parm): Use permanent_obstack.
8300
8301 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8302
8303         * pt.c (unify): Remove restrictions on deduction of argument
8304         of template template parameters.
8305
8306 1999-01-18  Nathan Sidwell  <nathan@acm.org>
8307
8308         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
8309
8310         * class.c (resolve_address_of_overloaded_function): Show list of
8311         all candidates, when none of them match.
8312
8313 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
8314
8315         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
8316         definition of 'casting away const' in reinterpret_cast<>.
8317
8318 1999-01-18  Graham  <grahams@rcp.co.uk>
8319
8320         * cvt.c: Add include for decl.h, remove extern for
8321         static_aggregates which is now provided by decl.h.
8322
8323         * Makefile.in (cvt.o): Add dependency for decl.h and missing
8324         dependencies for convert.h and flags.h.
8325
8326 1999-01-18  Nathan Sidwell  <nathan@acm.org>
8327
8328         * decl2.c (do_dtors): Set current location to that of the
8329         decl, for sensible diagnostics and debugging.
8330         (check_classfn): Issue `incomplete type' error, if
8331         class is not defined.
8332
8333 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
8334
8335         * cp-tree.h: Add prototype for bound_pmf_p.
8336
8337 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
8338             Manfred Hollstein <manfred@s-direktnet.de>
8339
8340         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
8341         -Wreturn-type.
8342
8343 1999-01-16  Nathan Sidwell  <nathan@acm.org>
8344
8345         * cp-tree.h (struct lang_type): Added has_mutable flag.
8346         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
8347         (TYPE_HAS_MUTABLE_P): New macro to read it.
8348         (cp_has_mutable_p): Prototype for new function.
8349         * class.c (finish_struct_1): Set has_mutable from members.
8350         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
8351         it contains a mutable.
8352         * typeck.c (cp_has_mutable_p): New function.
8353
8354 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
8355
8356         * pt.c (process_template_parm): Ignore top-level qualifiers on
8357         non-type parameters.
8358
8359         * decl.c (start_function): Use current_function_parms in the call
8360         to require_complete_type_for_parms, not the probably empty
8361         DECL_ARGUMENTS.
8362
8363 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
8364
8365         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
8366
8367         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
8368         that we don't suppress the other copies.
8369         * lex.c (handle_cp_pragma): Likewise.
8370
8371 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
8372
8373         * decl.c (grokdeclarator): Undo 1998-12-14 change.
8374         * tree.c (build_cplus_array_type_1): Likewise.
8375         * pt.c (instantiate_class_template): Remove misleading comment.
8376         (tsubst_aggr_type): Substitute if there are template parameters,
8377         regardless of whether or not they use template arguments.
8378         (unify): Likewise, but for unification.
8379
8380 1999-01-12  Richard Henderson  <rth@cygnus.com>
8381
8382         * cp-tree.h (flag_permissive): Declare extern.
8383
8384 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
8385
8386         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
8387         here.
8388         (lang_type): Add is_partial_instantiation.  Decrease width of
8389         dummy.
8390         (PARTIAL_INSTANTIATION_P): New macro.
8391         (OPERATOR_TYPENAME_P): Remove.
8392         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
8393         OPERATOR_TYPENAME_P.
8394         (grok_op_properties): Likewise.
8395         * friend.c (do_friend): Handle friends that are member functions
8396         correctly.
8397         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
8398         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
8399         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
8400         any more partial instantiation than is absolutely necessary for
8401         implicit typename.  Set PARTIAL_INSTANTIATION_P.
8402         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
8403         * semantics.c (begin_class_definition): Handle partial
8404         specializations of a type that was previously partially
8405         instantiated.
8406
8407 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
8408
8409         * g++spec.c (LIBSTDCXX): Provide default definition.
8410         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
8411
8412 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8413
8414         * Make-lang.in (g++.o): Depend on prefix.h.
8415
8416 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
8417
8418         * tree.c (bound_pmf_p): New fn.
8419         * typeck.c (build_c_cast): Use it.
8420
8421         * decl.c (grok_op_properties): Use same_type_p.
8422
8423 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8424
8425         * Makefile.in (cvt.o): Depend on toplev.h.
8426
8427         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
8428
8429         * cvt.c: Include toplev.h.
8430
8431         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
8432         definitions.
8433
8434         * init.c (expand_vec_init): Initialize variable `itype'.
8435
8436         * lex.c (yyerror): Cast the argument passed to a ctype function to
8437         an unsigned char.
8438
8439         * method.c (build_mangled_C9x_name): Wrap prototype and definition
8440         in "HOST_BITS_PER_WIDE_INT >= 64".
8441
8442         * typeck.c (build_binary_op): Mark parameter `convert_p' with
8443         ATTRIBUTE_UNUSED.
8444
8445 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
8446
8447         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
8448         * tree.c (build_exception_variant): Don't crash on empty throw
8449         specs.
8450
8451 1998-12-18  DJ Delorie  <dj@cygnus.com>
8452
8453         * cvt.c (convert_to_reference): Check for both error_mark_node
8454         and NULL_NODE after call to convert_for_initialization.
8455
8456 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
8457
8458         * error.c (interesting_scope_p): New fn.
8459         (dump_simple_decl): Use it.
8460         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
8461         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
8462
8463 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
8464
8465         * class.c (resolve_address_of_overloaded_function): Do conversion
8466         to correct type here, rather than ...
8467         (instantiate_type): Here.
8468
8469         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
8470         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
8471         (decl_template_parm_p): Remove.
8472         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
8473         parameter.
8474         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
8475         * pt.c (push_inline_template_parms_recursive): Set it.
8476         (decl_template_parm_p): Remove.
8477         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
8478         (process_template_parm): Set it.
8479
8480 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
8481
8482         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
8483         if configured with cpplib.
8484
8485 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
8486
8487         * decl.c (poplevel): Make sure ns_binding is initialized.
8488
8489         * decl.c (finish_function): Undo inadvertent change in previous
8490         patch.
8491
8492 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
8493
8494         * class.c (pushclass): Tweak handling of class-level bindings.
8495         (resolve_address_of_overloaded_function): Update pointer-to-member
8496         handling.
8497         (instantiate_type): Likewise.
8498         * cvt.c (cp_convert_to_pointer): Likewise.
8499         * decl.c (pop_binding): Take the DECL to pop, not just the name.
8500         Deal with `struct stat' hack.
8501         (binding_level): Add to documentation.
8502         (push_binding): Clear BINDING_TYPE.
8503         (add_binding): New function.
8504         (push_local_binding): Use it.
8505         (push_class_binding): Likewise.
8506         (poplevel): Adjust calls to pop_binding.
8507         (poplevel_class): Likewise.
8508         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
8509         declarations to current binding level.
8510         (push_class_level_binding): Likewise.
8511         (push_overloaded_decl): Adjust handling of OVERLOADs in local
8512         bindings.
8513         (lookup_namespace_name): Don't crash when confronted with a
8514         TEMPLATE_DECL.
8515         (lookup_name_real): Do `struct stat' hack in local binding
8516         contexts.
8517         (build_ptrmemfunc_type): Adjust documentation.
8518         (grokdeclarator): Don't avoid building real array types when
8519         processing templates unless really necessary.
8520         (finish_method): Adjust calls to pop_binding.
8521         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
8522         not reparse_decl_as_expr.
8523         (build_expr_from_tree): Deal with a template-id as the function to
8524         call in a METHOD_CALL_EXPR.
8525         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
8526         (maybe_adjust_types_For_deduction): Don't do peculiar things with
8527         METHOD_TYPEs here.
8528         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
8529         pointer-to-member types where necessary.
8530         * tree.c (build_cplus_array_type_1): Don't avoid building real
8531         array types when processing templates unless really necessary.
8532         (build_exception_variant): Compare the exception lists correctly.
8533
8534 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
8535
8536         * cp-tree.def (CPLUS_BINDING): Update documentation.
8537         * cp-tree.h (LOCAL_BINDING_P): New macro.
8538         (lang_identifier): Rename local_value to bindings.
8539         (tree_binding): Make `scope' of type `void*', not `tree'.
8540         (BINDING_SCOPE): Update documentation.
8541         (IDENTIFIER_LOCAL_VALUE): Remove.
8542         (IDENTIFIER_CLASS_VALUE): Document.
8543         (IDENTIFIER_BINDING): New macro.
8544         (IDENTIFIER_VALUE): Likewise.
8545         (TIME_IDENTIFIER_TIME): Likewise.
8546         (TIME_IDENTIFIER_FILEINFO): Likewise.
8547         (IMPLICIT_TYPENAME_P): Likewise.
8548         (set_identifier_local_value): Remove.
8549         (push_local_binding): New function.
8550         (push_class_binding): Likewise.
8551         * class.c (pushclass): Update comments; use push_class_binding.
8552         * decl.c (set_identifier_local_value_with_scope): Remove.
8553         (set_identifier_local_value): Likewise.
8554         (push_binding): New function.
8555         (pop_binding): Likewise.
8556         (binding_level): Update documentation.  Remove shadowed.
8557         (BINDING_LEVEL): New macro.
8558         (free_binding_nodes): New variable.
8559         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
8560         BLOCK_VARs when doing for-scope extension.  Remove effectively
8561         dead code.
8562         (pushlevel_class): Tweak formatting.
8563         (poplevel_class): Adjust for new name-lookup scheme.
8564         (print_binding_level): Likewise.
8565         (store_bindings): Likewise.
8566         (pushdecl): Likewise.
8567         (pushdecl_class_level): Likewise.
8568         (push_class_level_binding): Likewise.
8569         (push_overloaded_decl): Update comments.  Adjust for new
8570         name-lookup scheme.
8571         (lookup_name_real): Likewise.
8572         (lookup_name_current_level): Likewise.
8573         (cp_finish_decl): Likewise.
8574         (require_complete_types_for_parms): Likewise.  Remove misleading
8575         #if 0'd code.
8576         (grok_parms): Likewise.  Don't call
8577         require_complete_types_for_parms here.
8578         (grok_ctor_properties): Don't treat templates as copy
8579         constructors.
8580         (grop_op_properties): Or as assignment operators.
8581         (start_function): Document.  Adjust for new name-lookup scheme.
8582         (finish_function): Likewise.
8583         * decl2.c (do_local_using_decl): Use push_local_binding.
8584         * lex.c (begin_definition_of_inclass_inline): New function, split
8585         out from ...
8586         (do_pending_inlines): Here, and ...
8587         (process_next_inline): Here.
8588         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
8589         (init_filename_times): Likewise.
8590         (extract_interface_info): Likewise.
8591         (ste_typedecl_interface_info): Likewise.
8592         (check_newline): Likewise.
8593         (dump_time_statistics): Likewise.
8594         (handle_cp_pragma): Likewise.
8595         (do_identifier): Adjust for new name-lookup scheme.
8596         * parse.y (function_try_block): Return ctor_initializer_opt value.
8597         (fndef): Use it.
8598         (fn.defpen): Pass appropriate values to start_function.
8599         (pending_inline): Use functor_try_block value, and pass
8600         appropriate values to finish_function.
8601         * pt.c (is_member_template): Update documentation; remove handling
8602         of FUNCTION_DECLs.  As per name, this function should deal only in
8603         TEMPLATE_DECLs.
8604         (decl_template_parm_p): Change name of olddecl parameter to decl.
8605         (check_template_shadow): Adjust for new name-lookup scheme.
8606         (lookup_template_class): Likewise.
8607         (tsubst_decl): Tweak so as not to confuse member templates with
8608         copy constructors and assignment operators.
8609         (unify): Handle UNION_TYPEs.
8610         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
8611         (lang_print_xnode): Adjust for new name-lookup scheme.
8612         * typeck.c (mark_addressable): Likewise.
8613         (c_expand_return): Likewise.
8614
8615 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
8616
8617         * decl.c (grokdeclarator): Allow field with same name as class
8618         in extern "C".
8619
8620         * decl.c (lookup_name_real): Don't limit field lookup to types.
8621         * class.c (check_member_decl_is_same_in_complete_scope): No error
8622         if icv and x are the same.
8623         * lex.c (do_identifier): Tweak error message.
8624
8625 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
8626
8627         * decl.c (start_enum): Use push_obstacks, not
8628         end_temporary_allocation.
8629         (finish_enum): Call pop_obstacks.
8630
8631 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
8632
8633         * class.c (instantiate_type): Return error_mark_node rather than
8634         junk.
8635
8636 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
8637
8638         * cp-tree.h (most_specialized_instantiation): New function.
8639         (print_candidates): Likewise.
8640         * class.c (validate_lhs): Remove.
8641         (resolve_address_of_overloaded_function): New function, split out
8642         and then substantially reworked, from ...
8643         (instantiate_type): Use it.  Simplify.
8644         * cvt.c (convert_to_reference): Complain when caller has indicated
8645         that's the right thing to do.  Don't crash if instantiate_type
8646         fails.
8647         * pt.c: Substitute `parameters' for `paramters' throughout.
8648         (print_candidates): Don't make it static.
8649         (most_specialized_instantiation): Split out from ...
8650         (most_specialized): Here.
8651
8652 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
8653
8654         * lex.c (lang_init_options): Initialize cpplib.
8655         * decl2.c (parse_options,cpp_initialized): Removed.
8656         (lang_decode_option): Move initialization of cpplib to
8657         lang_init_options.
8658
8659 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
8660
8661         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
8662         well as the TYPE_DECL, when a typedef name is assigned to a
8663         previously anonymous type.
8664
8665 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
8666
8667         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
8668         __cp_eh_info for getting the eh info pointer.  Add table_index to
8669         field list.
8670         (push_eh_cleanup): Don't increment 'handlers' data field.
8671         (process_start_catch_block): Don't set the 'caught' field.
8672
8673         * cp/exception.cc (CP_EH_INFO): New macro for getting the
8674         exception info pointer within library routines.
8675         (__cp_eh_info): Use CP_EH_INFO.
8676         (__start_cp_handler): Get exception info pointer, set caught field,
8677         and increment the handlers field.  Avoids this being done by handlers.
8678         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
8679         (uncaught_exception): Use CP_EH_INFO macro.
8680
8681 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
8682
8683         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
8684
8685 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
8686
8687         * lex.c (check_newline): Add support for \ as `natural'
8688         characters in file names in #line to be consistent with #include
8689         handling.  We support escape processing in the # 1 "..." version of
8690         the command.  See also support in cp/lex.c.
8691
8692 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
8693
8694         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
8695         structure.
8696
8697 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
8698
8699         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
8700
8701         * error.c (dump_simple_decl): Also print namespace context.
8702         (dump_function_decl): Likewise.
8703
8704         * decl2.c (ambiguous_decl): Don't print old value if it's
8705         error_mark_node.
8706
8707         * decl.c (lookup_name_real): Fix handling of local types shadowed
8708         by a non-type decl.  Remove obsolete code.
8709         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
8710
8711         * lang-options.h: Add -fpermissive.
8712         * decl2.c: Likewise.
8713         * cp-tree.h: Add flag_permissive.
8714         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
8715         were specified, set flag_pedantic_errors.
8716         * call.c (build_over_call): Turn dropped qualifier messages
8717         back into pedwarns.
8718         * cvt.c (convert_to_reference): Likewise.
8719         * typeck.c (convert_for_assignment): Likewise.
8720
8721 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
8722
8723         * decl2.c (coerce_new_type): Use same_type_p.
8724         (coerce_delete_type): Likewise.
8725
8726         * call.c (check_dtor_name): Return 1, not error_mark_node.
8727
8728 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
8729
8730         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
8731         if MULTIPLE_SYMBOL_SPACES.
8732
8733         * pt.c (check_template_shadow): New fn.
8734         * decl2.c (grokfield): Use it.
8735         * decl.c (pushdecl): Likewise.
8736         (pushdecl_class_level): Likewise.
8737         (start_method): Likewise.
8738         (xref_tag): Don't try to use 't' if we're defining.
8739
8740         * call.c (check_dtor_name): Just return an error_mark_node.
8741         * pt.c (lookup_template_class): Complain about using non-template here.
8742         * parse.y (apparent_template_type): Not here.
8743
8744         * pt.c (check_explicit_specialization): Complain about specialization
8745         with C linkage.
8746
8747         * lang-options.h: Add -f{no-,}implicit-inline-templates.
8748
8749         * pt.c (convert_nontype_argument): Don't assume that any integer
8750         argument is intended to be a constant-expression.
8751
8752 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
8753
8754         * class.c (handle_using_decl): Fix comment.  Don't lookup
8755         constructors in base classes.
8756         (validate_lhs): Fix typo in comment.
8757         * search.c (lookup_field_1): Don't return a USING_DECL.
8758
8759         * cp-tree.h (DECL_ACCESS): Improve documentation.
8760
8761         * decl.c (expand_static_init): Don't set the initialization-done
8762         flag until the initialization is done.
8763
8764 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
8765
8766         * decl2.c (validate_nonmember_using_decl): Complain about using
8767         declarations for class members.
8768
8769 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
8770
8771         * typeck2.c (process_init_constructor): Use same_type_p.
8772
8773         * decl.c (check_tag_decl): Don't warn about null decl inside a
8774         class.
8775
8776         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
8777         UNIFY_ALLOW_NONE.
8778         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
8779         (resolve_overloaded_unification): Strip baselinks.
8780
8781 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8782
8783         * g++spec.c: Don't prototype xmalloc.
8784
8785 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
8786
8787         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
8788
8789         * decl.c (check_tag_decl): Do complain about null friend decl at
8790         file scope.
8791
8792 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
8793
8794         * lex.c (make_lang_type): Clear the whole struct lang_type, not
8795         only the first multiple of sizeof (int).
8796
8797 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
8798
8799         * decl.c (start_decl): An explicit specialization of a static data
8800         member is only a definition if it has an initializer.
8801
8802         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
8803         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
8804         cp_finish_decl.
8805         * init.c (expand_default_init): Check for DIRECT_BIND instead of
8806         DECL_ARTIFICIAL.
8807
8808         * call.c (build_over_call): Use build_decl.
8809
8810         * except.c (expand_throw): Just use convert, not
8811         build_reinterpret_cast.
8812
8813         * lex.c (handle_generic_pragma): Use token_buffer.
8814
8815         * decl.c (check_tag_decl): Don't complain about null friend decl.
8816
8817 1998-11-24  Dave Pitts  <dpitts@cozx.com>
8818
8819         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
8820         first position.
8821         * lex.c (check_newline): Use ISALPHA.
8822         (readescape): Use ISGRAPH.
8823         (yyerror): Use ISGRAPH.
8824
8825 1998-11-24  Nathan Sidwell  <nathan@acm.org>
8826
8827         * search.c (get_abstract_virtuals): Do not use initial
8828         CLASSTYPE_ABSTRACT_VIRTUALS.
8829         * typeck2.c (abstract_virtuals_error): Show location of abstract
8830         declaration.
8831         * call.c (build_new_method_call): Use
8832         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
8833         * class.c (finish_struct_bits): Don't bother working out whether
8834         get_abstract_virtuals will do anything, just do it.
8835
8836 1998-11-24  Graham  <grahams@rcp.co.uk>
8837
8838         * typeck.c (build_component_ref): Remove unused statement.
8839
8840 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
8841
8842         * class.c (add_method): Catch invalid overloads.
8843
8844         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
8845         * search.c (lookup_conversions): Handle getting real OVERLOADs.
8846         (add_conversions): Likewise.  Revert last change.
8847         * call.c (add_conv_candidate): Pass totype to add_candidate instead
8848         of fn.  Don't add a new candidate if the last one was for the same
8849         type.
8850         (print_z_candidates): Handle getting a type as a function.
8851         (joust): If we got two conversion candidates to the same type,
8852         just pick one.
8853         (build_object_call): Lose 'templates'.
8854         (build_user_type_conversion_1): Handle getting real OVERLOADs.
8855
8856 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
8857
8858         * typeck2.c (process_init_constructor): If there are elements
8859         that don't have initializers and they need to have constructors
8860         run, supply them with initializers.
8861
8862         * class.c (finish_struct_1): A class with a 0-width bitfield is
8863         still empty.
8864
8865 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
8866
8867         * pt.c (instantiate_class_template): Don't try to figure out what
8868         specialization to use for a partial instantiation.  Correct
8869         typos in a couple of comments.  Avoid calling uses_template_parms
8870         multiple times.
8871
8872 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
8873
8874         * method.c (process_overload_item): Add call to
8875         build_mangled_C9x_name for intTI_type_nodes.
8876         (build_mangled_C9x_name): Add prototype, define.
8877         * decl.c (init_decl_processing): Add names for
8878         TImode_type_node.
8879
8880 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
8881
8882         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
8883
8884         * class.c (finish_struct_1): Set things up for 0-width bitfields
8885         like we do for others.
8886
8887         * decl.c (check_tag_decl): New fn.
8888         (shadow_tag): Split out from here.
8889         * decl2.c (grok_x_components): Call it.
8890
8891 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
8892
8893         * decl.c: Lose warn_about_return_type.
8894         (grokdeclarator): Always complain about implicit int, except for
8895         `main () { ... }'.
8896
8897         * decl.c (tag_name): New fn.
8898         (xref_tag): Complain about using typedef-name after class-key.
8899
8900         * init.c (expand_vec_init): Also keep going if from_array.
8901
8902         * tree.c (is_overloaded_fn): Also handle the output of
8903         build_offset_ref.
8904
8905         * decl.c (grokdeclarator): Use constructor_name when comparing
8906         field name against enclosing class.
8907         * class.c (finish_struct_anon): Likewise.
8908
8909 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
8910
8911         * decl.c (poplevel): Remove code to handle KEEP == 2.
8912         (finish_function): Don't confuse BLOCK-order when
8913         processing a destructor.
8914
8915 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
8916
8917         * decl.c (require_complete_types_for_parms): Call layout_decl
8918         after we've completed the type.
8919
8920 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8921
8922         * decl2.c (validate_nonmember_using_decl): Allow using templates
8923         from the global namespace.
8924
8925 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
8926
8927         Handle specifying template args to member function templates.
8928         * tree.c (build_overload): Always create an OVERLOAD for a template.
8929         * search.c (add_conversions): Handle finding an OVERLOAD.
8930         * decl2.c (check_classfn): Likewise.
8931         * lex.c (identifier_type): See through a baselink.
8932         * parse.y (do_id): Don't call do_identifier if we got a baselink.
8933         * class.c (instantiate_type, case TREE_LIST): Recurse.
8934
8935         * decl.c (grokdeclarator): Allow a boolean constant for array
8936         bounds, odd as that sounds.
8937
8938         * pt.c (unify): Be more strict about non-type parms, except for
8939         array bounds.
8940         (UNIFY_ALLOW_INTEGER): New macro.
8941
8942 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
8943
8944         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
8945
8946 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
8947
8948         * semantics.c (begin_class_definition): Call
8949         maybe_process_partial_specialization before push_template_decl.
8950         Don't call push_template_decl for a specialization.
8951         * search.c (lookup_field): Do return a member template class.
8952         * decl2.c (handle_class_head): Handle member template classes.
8953
8954         * decl.c (grokdeclarator): A parm type need not be complete.
8955
8956         * pt.c (convert_nontype_argument): Fix thinko.
8957
8958 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
8959
8960         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
8961         (global_delete_fndecl): New variable.
8962         * decl.c (global_delete_fndecl): Define it.
8963         (init_decl_processing): Set it.
8964         * init.c (build_builtin_delete_call): Use it.
8965         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
8966         nodes.
8967
8968 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
8969
8970         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
8971         type.
8972
8973         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
8974         * call.c (build_object_call): Also support references to functions.
8975         * typeck.c (convert_for_initialization): Don't decay a function
8976         if the target is a reference to function.
8977
8978         * search.c (add_conversions): Get all the overloads from a class.
8979
8980         * decl.c (grok_ctor_properties): Complain about any constructor
8981         that will take a single arg of the class type by value.
8982
8983         * typeck2.c (build_functional_cast): Can't create objects of
8984         abstract classes this way.
8985         * cvt.c (ocp_convert): Likewise.
8986
8987         * decl.c (grokfndecl): Member functions of local classes are not
8988         public.
8989
8990 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
8991
8992         * Make-lang.in (cc1plus): Add dependency on hash.o.
8993
8994 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
8995
8996         * search.c (get_abstract_virtuals): Complain about virtuals with
8997         no final overrider.
8998         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
8999         with no final overrider.
9000         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
9001         on virtuals with no final overrider.
9002
9003         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
9004
9005         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
9006         after layout_type.
9007
9008         * friend.c (do_friend): Don't set_mangled_name_for_decl.
9009
9010         * class.c (finish_struct_anon): Complain about non-fields.
9011         * decl2.c (build_anon_union_vars): Likewise.
9012
9013         * decl.c (grokdeclarator): Normal data members can't have the same
9014         name as the class, either.
9015         * class.c (finish_struct_anon): Neither can members of an
9016         anonymous union.
9017
9018 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
9019
9020         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
9021         (TYPE_BINFO): Likewise.
9022         (IS_AGGR_TYPE): Tweak.
9023         (SET_IS_AGGR_TYPE): New macro.
9024         (CLASS_TYPE_P): Tweak.
9025         (lang_type): Group mark bitfields together.  Remove linenum.
9026         (CLASSTYPE_SOURCE_LINE): Remove macro.
9027         (CLASSTYPE_MARKED_N): New macro.
9028         (SET_CLASSTYPE_MARKED_N): Likewise.
9029         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
9030         (CLASS_TYPE_MARKED_*): Use them.
9031         (SET_CLASSTYPE_MARKED_*): Likewise.
9032         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
9033         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
9034         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
9035         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
9036         * class.c (class_cache_obstack): New variable.
9037         (class_cache_firstobj): Likewise.
9038         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
9039         (pushclass): Free the cache, when appropriate.
9040         (popclass): Tidy.
9041         (maybe_push_cache_obstack): Use class_cache_obstack.
9042         * decl.c (include hash.h).
9043         (typename_hash): New function.
9044         (typename_compare): Likewise.
9045         (build_typename_type): Check the hash table to avoid creating
9046         duplicates.
9047         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
9048         (grokdeclarator): Use CLASS_TYPE_P.
9049         (xref_basetypes): Likewise.
9050         (start_function): Likewise.  Don't put current_class_ref on the
9051         permanent obstack.
9052         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
9053         and TYPE_TI_ARGS.
9054         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
9055         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
9056         fields for types other than class types.  Do clear TYPE_ALIAS_SET
9057         for types other than class types, though.
9058         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
9059         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9060         * pt.c (process_template_parm): Don't set
9061         CLASSTYPE_GOT_SEMICOLON.
9062         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9063         Coerce arguments on the momentary obstack.
9064         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9065         (instantiate_class_template): Calculate template arguments on the
9066         momentary obstack.  Tidy.
9067         (tsubst_template_arg_vector): Use make_temp_vec.
9068         (tsubst_aggr_type): Put template arguments on the momentary
9069         obstack.
9070         (tsubst_decl): Likewise.
9071         (tsubst): Copy the array bounds index to the permanent obstack
9072         before building index types.  Use new macros.
9073         (unify): Use new macros.
9074         (do_type_instantiation): Likewise.
9075         * search.c (lookup_fnfields_1): Use new macros.
9076         (dfs_pushdecls): Build envelopes on the cache obstack.
9077         (dfs_compress_decls): Use new macros.
9078         (push_class_decls): Build on the cache obstack.
9079         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
9080         * sign.c (build_signature_pointer_or_reference_type): Use
9081         SET_IS_AGGR_TYPE.
9082         * tree.c (make_binfo): Check CLASS_TYPE_P.
9083         (copy_template_template_parm): Adjust.
9084         (make_temp_vec): Use push_expression_obstack.
9085         * typeck.c (complete_type): Use new macros.
9086         (comptypes): Likewise.
9087
9088 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
9089
9090         * pt.c (tsubst): Add diagnostics for invalid array, reference
9091         and pointer to member types.
9092
9093 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
9094
9095         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
9096
9097         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
9098         Simplify.
9099
9100         * parse.y (structsp): Fix cut-and-paste error.
9101
9102         * init.c (build_new): Complain about non-integral size.
9103
9104         * parse.y (unary_expr): Complain about defining types in sizeof.
9105
9106         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
9107
9108         * rtti.c (build_x_typeid): Complain about typeid without
9109         including <typeinfo>.
9110         (get_typeid): Likewise.  Complain about typeid of incomplete type.
9111         (get_tinfo_fn_dynamic): Likewise.
9112         (get_typeid_1): Not static anymore.
9113         * except.c (build_eh_type_type): Use get_typeid_1.
9114
9115         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
9116         ambiguous or private bases.  Fix warning for reference cast.
9117
9118 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
9119
9120         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
9121         * decl.c (duplicate_decls): Remove special-case code to deal with
9122         template friends, and just do the obvious thing.
9123         * pt.c (register_specialization): Tweak for clarity, and also to
9124         clear DECL_INITIAL for an instantiation before it is merged with a
9125         specialization.
9126         (check_explicit_specialization): Fix indentation.
9127         (tsubst_friend_function): Handle both definitions in friend
9128         declaration and outside friend declarations.
9129         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
9130         (regenerate_decl_from_template): Tweak accordingly.
9131         (instantiate_decl): Likewise.
9132
9133 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
9134
9135         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
9136         member function reference to error.
9137         * cvt.c (ocp_convert): Complain about converting an overloaded
9138         function to void.
9139
9140         * init.c (build_offset_ref): Just return a lone static member
9141         function.
9142
9143         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
9144         not internal ones.
9145
9146         * typeck.c (build_binary_op_nodefault): Improve error handling.
9147
9148         * decl.c (grokfndecl): Complain about making 'main' a template.
9149
9150         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
9151
9152         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
9153         TYPE_DECL in a template.
9154
9155 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
9156
9157         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
9158
9159         * decl.c (struct cp_function): Add named_label_uses.
9160         (push_cp_function_context): Save it.
9161         (pop_cp_function_context): Restore it.
9162         (define_label): Also complain about jumping into the scope of
9163         non-POD objects that don't have constructors.
9164         * tree.c (pod_type_p): New fn.
9165
9166         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
9167         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
9168         (get_tinfo_fn): Not here.
9169         * repo.c (repo_get_id): Abort if we get called for an incomplete
9170         type.
9171
9172 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
9173
9174         * except.c (expand_throw): Make sure first argument to
9175         __cp_push_exception is of type `void*' to avoid spurious error
9176         messages.
9177
9178 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
9179
9180         * pt.c (try_one_overload): Take orig_targs again.  Only check for
9181         mismatches against them; we don't care what a previous call found.
9182         (resolve_overloaded_unification): Adjust.
9183
9184         * search.c (lookup_field): Don't return anything for a non-type
9185         field from a dependent type.
9186         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
9187         in an array declarator.
9188         (start_decl): Push into the class before looking for the field.
9189
9190 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
9191
9192         * method.c (build_overload_value): Handle REFERENCE_TYPE.
9193
9194 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9195
9196         * decl.c (grokdeclarator): Allow namespace-scoped members if they
9197         are friends.
9198
9199 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
9200
9201         * pt.c (tsubst_decl): Don't mess with the global value of an
9202         un-mangled DECL_ASSEMBLER_NAME.
9203
9204 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
9205
9206         * decl.c (init_decl_processing): Remove CYGWIN conditional
9207         since CYGWIN is now able to deal with trapping signals.
9208
9209 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9210
9211         * cp-tree.h: Don't include gansidecl.h.
9212         * exception.cc: Include gansidecl.h (since we don't include config.h)
9213         * g++spec.c: Don't include gansidecl.h.
9214
9215 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
9216
9217         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
9218         size of dummy.
9219         (DECL_DEFINED_IN_CLASS_P): New macro.
9220         (TEMPLATE_PARMS_FOR_INLINE): Document.
9221         (check_static_variable_definition): New function.
9222         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
9223         appropriate.
9224         (check_static_variable_definition): Split out from ...
9225         (grokdeclarator): Here.
9226         * pt.c (check_default_tmpl_args): New function, split out from ...
9227         (push_template_decl_real): Here.
9228         (instantiate_template): Fix comment.
9229
9230 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
9231
9232         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
9233         (CP_TYPE_VOLATILE_P): Likewise.
9234         (CP_TYPE_RESTRICT_P): Likewise.
9235
9236 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
9237
9238         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
9239
9240 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
9241
9242         * class.c (instantiate_type): Be more helpful.
9243
9244         * decl2.c (import_export_decl): Call import_export_class.
9245
9246         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
9247         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
9248         * pt.c (tsubst_copy): Likewise.
9249
9250 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
9251
9252         * init.c (expand_vec_init): Fix off-by-one error.
9253
9254 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
9255
9256         * parse.y (apparent_template_type): New type.
9257         (named_complex_class_head_sans_basetype): Use it.
9258         * Makefile.in (CONFLICTS): One new conflict.
9259         * parse.c: Regenerated.
9260
9261 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
9262
9263         * cp-tree.h (COMPARE_STRICT): New macro.
9264         (COMPARE_BASE): Likewise.
9265         (COMPARE_RELAXED): Likewise.
9266         (COMPARE_REDECLARATION): Likewise.
9267         (same_type_p): Likewise.
9268         (same_or_base_type_p): Likewise.
9269         * call.c (standard_conversion): Use them, in place of comptypes
9270         with numeric arguments.
9271         (reference_binding): Likewise.
9272         (convert_like): Likewise.
9273         (build_over_call): Likewise.
9274         (is_subseq): Likewise.
9275         (is_properly_derived_from): Likewise.
9276         (compare_ics): Likewise.
9277         (joust): Likewise.
9278         * class.c (delete_duplicate_fields_1): Likewise.
9279         (resolves_to_fixed_type_p): Likewise.
9280         (instantiate_type): Likewise.  Remove #if 0'd code.
9281         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
9282         (pushdecl): Likewise.
9283         (lookup_name_real): Likewise.
9284         (grokdeclarator): Likewise.  Check for illegal array declarations.
9285         (grokparms): Likewise.
9286         (grok_op_properties): Likewise.
9287         * decl2.c (check_classfn): Likewise.
9288         * friend.c (is_friend): Likewise.
9289         (make_friend_class): Likewise.
9290         * init.c (expand_aggr_init): Likewise.
9291         (expand_vec_init): Likewise.
9292         * pt.c (is_member_template_class): Remove declaration.
9293         (is_specialization_of): Use COMPARE_* and new macros.
9294         (comp_template_parms): Likewise.
9295         (convert_nontype_argument): Likewise.
9296         (coerce_template_template_parms): Likewise.
9297         (template_args_equal): Likewise.
9298         (lookup_template_class): Likewise.
9299         (type_unification_real): Likewise.
9300         (unify): Likewise.
9301         (get_bindings_real): Likewise.
9302         * search.c (covariant_return_p): Likewise.
9303         (get_matching_virtual): Likewise.
9304         * sig.c (match_method_types): Likewise.
9305         * tree.c (vec_binfo_member): Likewise.
9306         (cp_tree_equal): Likewise.
9307         * typeck.c (common_type): Likewise.
9308         (comp_array_types): Likewise.  Get issues involving unknown array
9309         bounds right.
9310         (comptypes): Update comments.  Use new flags.
9311         (comp_target_types): Use new macros.
9312         (compparms): Likewise.
9313         (comp_target_parms): Likewise.
9314         (string_conv_p): Likewise.
9315         (build_component_ref): Likewise.
9316         (build_indirect_ref): Likewise.
9317         (build_conditional_expr): Likewise.
9318         (build_static_cast): Likewise.
9319         (build_reinterpret_cast): Likewise.
9320         (build_const_cast): Likewise.
9321         (build_modify_expr): Likewise.
9322         (convert_for_assignment): Likewise.
9323         (comp_ptr_ttypes_real): Likewise.
9324         (ptr_reasonably_similar): Likewise.
9325         (comp_ptr_ttypes_const): Likewise.
9326
9327 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
9328
9329         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
9330
9331 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
9332
9333         * decl2.c (delete_sanity): Pass integer_zero_node, not
9334         integer_two_node, to build_vec_delete.
9335         * init.c (build_array_eh_cleanup): Remove.
9336         (expand_vec_init_try_block): New function.
9337         (expand_vec_init_catch_clause): Likewise.
9338         (build_vec_delete_1): Don't deal with case that auto_delete_vec
9339         might be integer_two_node anymore.
9340         (expand_vec_init): Rework for initialization-correctness and
9341         exception-correctness.
9342         * typeck2.c (process_init_constructor): Make mutual exclusivity
9343         of cases more obvious.
9344
9345 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
9346
9347         * decl.c (lookup_name_real): OK, only warn if not lexing.
9348         Simplify suggested fix.
9349
9350         * cp-tree.h (IDENTIFIER_MARKED): New macro.
9351         * search.c (lookup_conversions): Use breadth_first_search.
9352         (add_conversions): Avoid adding two conversions to the same type.
9353         (breadth_first_search): Work with base binfos, rather
9354         than binfos and base indices.
9355         (get_virtual_destructor): Adjust.
9356         (tree_has_any_destructor_p): Adjust.
9357         (get_matching_virtual): Adjust.
9358
9359         * pt.c (push_template_decl_real): Generalize check for incorrect
9360         number of template parms.
9361         (is_member_template_class): #if 0.
9362
9363 1998-10-29  Richard Henderson  <rth@cygnus.com>
9364
9365         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
9366         last.
9367
9368 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
9369
9370         * lex.c: Call check_newline from lang_init always.  After
9371         calling cpp_start_read, set yy_cur and yy_lim to read from the
9372         cpplib token buffer.
9373
9374 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
9375
9376         * class.c (instantiate_type): Don't consider templates for a normal
9377         match.
9378
9379         * class.c (finish_struct_1): Don't complain about non-copy
9380         assignment ops in union members.
9381
9382         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
9383         (prepare_fresh_vtable): Likewise.
9384         (finish_struct_1): Don't call import_export_class.
9385         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
9386         (finish_prevtable_vardecl): Lose.
9387         (finish_file): Don't call it.
9388         * pt.c (instantiate_class_template): Likewise.
9389         * cp-tree.h: Remove it.
9390
9391         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
9392         * decl.c (finish_function): Not here.
9393         (start_function): Do set DECL_INITIAL.
9394
9395         * pt.c (push_template_decl_real): Complain about default template
9396         args for enclosing classes.
9397
9398         * call.c (add_function_candidate): Treat conversion functions
9399         as coming from the argument's class.
9400         * cp-tree.h (DECL_CONV_FN_P): New fn.
9401         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
9402         * class.c (add_method): Use DECL_CONV_FN_P.
9403         * decl2.c (check_classfn): Likewise.
9404         * error.c (dump_function_name): Likewise.
9405         (dump_function_decl): Likewise.
9406         * pt.c (fn_type_unification): Likewise.
9407         * search.c (add_conversions): Likewise.
9408
9409 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
9410
9411         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
9412         * method.c (hack_identifier): Also check for using RESULT_DECL
9413         from outer context.
9414
9415 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
9416
9417         * decl.c (grokdeclarator): Use type_quals, rather than constp,
9418         consistently.
9419
9420 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
9421
9422         * call.c (standard_conversion): instantiate_type here.
9423         (reference_binding): And here.
9424         (implicit_conversion): Not here.
9425         (build_op_delete_call): No need to cons up an OVERLOAD.
9426         * cvt.c (cp_convert_to_pointer): instantiate_type here.
9427         (convert_to_reference): And here.
9428         * decl.c (grok_reference_init): Not here.
9429         (grokparms): Or here.
9430         * typeck2.c (digest_init): Or here.
9431         * typeck.c (decay_conversion): Take the address of overloaded
9432         functions, too.
9433         (require_instantiated_type): Lose.
9434         (convert_arguments): Don't handle unknown types here.
9435         (build_c_cast): Likewise.
9436         (build_binary_op): Gut.
9437         (build_conditional_expr): Don't require_instantiated_type.
9438         (build_modify_expr): Likewise.
9439         (build_static_cast): Don't instantiate_type.
9440         (build_reinterpret_cast): Likewise.
9441         (build_const_cast): Likewise.
9442         (convert_for_initialization): Likewise.
9443         (build_ptrmemfunc): Use type_unknown_p.
9444         (convert_for_assignment): Also do default_conversion on overloaded
9445         functions.  Hand them off to ocp_convert.
9446
9447 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
9448
9449         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
9450         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
9451
9452         * class.c (finish_struct_1): Use build_cplus_array_type to build
9453         array types.
9454         * decl.c (init_decl_processing): Likewise.
9455         * except.c (expand_end_eh_spec): Likewise.
9456         * search.c (expand_upcast_fixups): Simplify very slightly.
9457
9458 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
9459
9460         * decl.c (grokdeclarator): Complain about a variable using
9461         constructor syntax coming back null from start_decl.
9462
9463         * friend.c (make_friend_class): Complain about trying to make
9464         a non-class type a friend.
9465
9466         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
9467         (start_function): Not here.
9468
9469 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
9470
9471         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
9472
9473 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
9474
9475         * typeck2.c (process_init_constructor): Only skip anonymous fields
9476         if they are bitfields.
9477
9478         * cp-tree.def (TYPEOF_TYPE): New code.
9479         * error.c (dump_type_real): Handle it.
9480         * pt.c (tsubst): Likewise.
9481         * tree.c (search_tree): Likewise.
9482         * semantics.c (finish_typeof): New fn.
9483         * parse.y (typespec): Use it.
9484         * cp-tree.h: Declare it.
9485
9486 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
9487
9488         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
9489
9490 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
9491
9492         * typeck.c (convert_arguments): Don't handle pmf references
9493         specially.
9494
9495         * init.c (build_member_call): Don't try to convert to the base type
9496         if it's ambiguous or pedantic.
9497
9498         * typeck2.c (check_for_new_type): Only depend on pedantic for
9499         C-style casts.
9500
9501 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
9502
9503         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
9504         non-converting constructors.
9505
9506 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9507
9508         * gxxint.texi: Correct documentation for n, N, Q, and B.
9509
9510 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9511
9512         * parse.y (condition): Convert VAR_DECL from reference to indirect
9513         reference.
9514
9515 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
9516
9517         * exception.cc (__cp_pop_exception): Free the original exception
9518         value, not the potentially coerced one.
9519
9520 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
9521
9522         * Makefile.in (hash.h): Run gperf when necessary.
9523
9524         * cp-tree.h (CP_TYPE_READONLY): Remove.
9525         (CP_TYPE_VOLATILE): Likewise.
9526         (CP_TYPE_QUALS): New macro.
9527         (CP_TYPE_CONST_P): Likewise.
9528         (CP_TYPE_VOLATILE_P): Likewise.
9529         (CP_TYPE_RESTRICT_P): Likewise.
9530         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
9531         (cp_build_type_variant): Rename to ...
9532         (cp_build_qualified_type): New function.
9533         (c_apply_type_quals_to_decl): Declare.
9534         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
9535         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
9536         (cp_type_qual_from_rid): New function.
9537         (compparms): Remove unused parameter.  All callers changed.
9538         (cp_type_quals): New function.
9539         (at_least_as_qualified_p): Likewise.
9540         (more_qualified_p): Likewise.
9541
9542         * call.c (standard_conversion): Replace calls to
9543         cp_build_type_variant with cp_build_qualified_type.  Use
9544         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
9545         compare them.  Use CP_TYPE_* macros to check qualifiers.
9546         (reference_binding): Likewise.
9547         (implicit_conversion): Likewise.
9548         (add_builtin_candidates): Likewise.
9549         (build_over_call): Likewise.
9550         * class.c (overrides): Compare all qualifiers, not just `const',
9551         on method declarations.
9552         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
9553         (convert_pointer_to_real): Likewise.
9554         (type_promotes_to): Likewise.
9555         * decl.c (check_for_uninitialized_const_var): New function.
9556         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
9557         (cp_finish_decl): Use check_for_uninitialized_const_var.
9558         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
9559         handle `restrict'.
9560         (grok_ctor_properties): Likewise.
9561         (grok_op_properties): Likewise.
9562         (start_function): Likewise.
9563         (rever_static_member_fn): Likewise.
9564         * decl2.c (grok_method_quals): Likewise.
9565         (grokfield): Likewise.
9566         * error.c (dump_readonly_or_volatile): Rename to ...
9567         (dump_qualifiers): New function.  Handle `restrict'.
9568         (dump_type_real): Use it.
9569         (dump_aggr_type): Likewise.
9570         (dump_type_prefix): Likewise.
9571         (dump_type_suffix): Likewise.
9572         (dump_function_decl): Likewise.
9573         (cv_as_string): Likewise.
9574         * gxx.gperf: Add __restrict and __restrict__.
9575         * gxxint.texi: Document `u' as used for `__restrict', and a few
9576         other previously undocumented codes.
9577         * hash.h: Regenerated.
9578         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
9579         (build_member_call): Likewise.
9580         (build_new_1): Likewise.
9581         * lex.c (init_parse): Add entry for RID_RESTRICT.
9582         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
9583         (cp_type_qual_from_rid): Define.
9584         * lex.h (enum rid): Add RID_RESTRICT.
9585         * method.c (process_modifiers): Deal with `restrict'.
9586         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
9587         * parse.c: Regenerated.
9588         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
9589         (tsubst_aggr_type): Likewise.
9590         (tsubst): Likewise.
9591         (check_cv_quals_for_unify): Likewise.
9592         (unify): Likewise.
9593         * rtti.c (init_rtti_processing): Likewise.
9594         (build_headof): Likewise.
9595         (get_tinfo_var): Likewise.
9596         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
9597         (expand_class_desc): Likewise.
9598         (expand_attr_desc): Likewise.
9599         (synthesize_tinfo_fn): Likewise.
9600         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
9601         (get_matching_virtual): Likewise.
9602         (expand_upcast_fixups): Likewise.
9603         * sig.c (build_signature_pointer_or_reference_name): Take
9604         type_quals, not constp and volatilep.
9605         (build_signature_pointer_or_reference_type): Likewise.
9606         (match_method_types): More CP_TYPE_QUALS conversion, etc.
9607         (build_signature_pointer_constructor): Likewise.
9608         (build_signature_method_call): Likewise.
9609         * tree.c (build_cplus_array_type): Likewise.
9610         (cp_build_type_variant): Rename to ...
9611         (cp_build_qualified_type): New function.  Deal with `__restrict'.
9612         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
9613         (build_exception_variant): Likewise.
9614         (mapcar): Likewise.
9615         * typeck.c (qualif_type): Likewise.
9616         (common_type): Likewise.
9617         (comptypes): Likewise.
9618         (comp_cv_target_types): Likewise.
9619         (at_least_as_qualified_p): Define.
9620         (more_qualified_p): Likewise.
9621         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
9622         (compparms): Likewise.
9623         (inline_conversion): Likewise.
9624         (string_conv_p): Likewise.
9625         (build_component_ref): Likewise.
9626         (build_indirect_ref): Likewise.
9627         (build_array_ref): Likewise.
9628         (build_unary_op): Likewise.
9629         (build_conditional_expr): Likewise.
9630         (build_static_cast): Likewise.
9631         (build_c_cast): Likewise.
9632         (build_modify_expr): Likewise.
9633         (convert_For_assignment): Likewise.
9634         (comp_ptr_ttypes_real): Likewise.
9635         (cp_type_quals): New function.
9636
9637 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
9638
9639         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
9640         (CP_TYPE_VOLATILE): Likewise.
9641         * decl.c (grokdeclarator): Use them.
9642         * tree.c (canonical_type_variant): Likewise.
9643
9644 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9645
9646         * parse.y (named_class_head): Push into class while parsing the
9647         base class list.
9648         * decl2.c (push_scope, pop_scope): New functions.
9649         * cp-tree.h: Declare them.
9650         * init.c (build_new_1): Delay cleanup until end of full expression.
9651
9652 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
9653
9654         * typeck.c (build_component_ref): Use of a type here is an error.
9655
9656 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
9657
9658         Revamp references to member functions.
9659         * method.c (hack_identifier): Call build_component_ref for a
9660         reference to a member function.
9661         * typeck.c (build_component_ref): Only return a single function
9662         if it's static.  Otherwise, return a COMPONENT_REF.
9663         (build_x_function_call): Handle a COMPONENT_REF.
9664         (build_unary_op): Handle all unknown-type things.
9665         * decl2.c (arg_assoc): Handle COMPONENT_REF.
9666         * class.c (instantiate_type): Complain if the function we get is a
9667         nonstatic member function.  Remove code for finding "compatible"
9668         functions.
9669         * pt.c (tsubst_copy): Handle NOP_EXPR.
9670         * tree.c (build_dummy_object): New fn.
9671         (maybe_dummy_object): New fn.
9672         (is_dummy_object): New fn.
9673         * cp-tree.h: Declare them.
9674         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
9675         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
9676         * init.c (build_member_call): Use maybe_dummy_object and
9677         is_dummy_object.
9678         (build_offset_ref): Use maybe_dummy_object.
9679         (resolve_offset_ref): Use is_dummy_object.
9680         * typeck.c (build_x_function_call): Call build_dummy_object.
9681         (unary_complex_lvalue): Call is_dummy_object.
9682
9683         * typeck.c (build_component_addr): Make sure field is a field.
9684
9685         * call.c (build_new_op): Delete obsolete code.
9686
9687         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
9688
9689 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9690
9691         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
9692         std if std is ignored.
9693
9694 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
9695
9696         * decl.c (grokvardecl): Fix thinko.
9697
9698         * decl.c (grokdeclarator): Embedded attrs bind to the right,
9699         not the left.
9700
9701         * parse.y (fn.def2): Fix 'attrs' format.
9702
9703 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
9704
9705         * Makefile.in (CONFLICTS): Update.
9706         * parse.y (expr_or_declarator_intern): New rule.
9707         (expr_or_declarator, direct_notype_declarator, primary,
9708         functional_cast): Use it.
9709         (notype_declarator_intern): New rule.
9710         (notype_declarator, complex_notype_declarator): Use it.
9711
9712 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
9713
9714         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
9715         (grokvardecl): Likewise.
9716
9717 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9718
9719         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
9720         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
9721
9722         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
9723
9724         * pt.c (process_partial_specialization): Cast 1st argument of
9725         `bzero' to (PTR).
9726
9727         * tree.c (build_base_fields): Cast `base_align' to (int) when
9728         comparing against one.
9729
9730 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
9731
9732         * decl.c (lookup_name_real): Handle template parameters for member
9733         templates where said parameters have the same name as the
9734         surrounding class.
9735
9736         * decl.c (expand_static_init): Build cleanups before entering the
9737         anonymous function used to do them to avoid access-checking
9738         confusion.
9739
9740         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
9741         accidentally removed by previous change, and make DECL_RTL here.
9742         * class.c (add_method): Don't make DECL_RTL here.
9743
9744         * pt.c (for_each_template_parm): Don't examine uninstantiated
9745         default arguments.
9746
9747 1998-10-16  Dave Brolley  <brolley@cygnus.com>
9748
9749         * lex.c (real_yylex): Fix unaligned access of wchar_t.
9750
9751 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
9752
9753         * class.c (add_method): Fix documentation to reflect previous
9754         changes.  Check for duplicate method declarations here.
9755         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
9756         correctly; such things never match.
9757         (grokfndecl): Don't look for duplicate methods here.
9758         * decl2.c (check_classfn): Don't assume names are mangled.
9759         Don't add bogus member function declarations to a class before the
9760         class type is complete.
9761         (grokfield): Reformat error message.
9762         * method.c (set_mangled_name_for_decl): Don't mangle names while
9763         processing_template_decl.
9764
9765 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
9766
9767         * typeck.c (build_indirect_ref): Complain about a pointer to data
9768         member, too.
9769         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
9770         data member.
9771         * init.c (resolve_offset_ref): Don't undo the above.
9772
9773         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
9774         (struct lang_decl_flags): Add `bitfield'.
9775         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
9776         DECL_BIT_FIELD.
9777         * decl2.c (grokbitfield, grok_alignof): Likewise.
9778         * init.c (build_offset_ref): Likewise.
9779         * typeck.c (build_component_addr, expr_sizeof): Likewise.
9780         * cvt.c (build_up_reference): Don't crash if taking the address
9781         returns error_mark_node.
9782
9783         * decl.c (grokfndecl): Also check ctype when checking for ::main().
9784
9785 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
9786
9787         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
9788         Do mangling here.
9789         (grokdeclarator): Instead of here.
9790         * friend.c (do_friend): Lose special handling of ::main and
9791         __builtin_*.
9792         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
9793
9794         * spew.c (yylex): Clear looking_for_typename if we got
9795         'enum { ... };'.
9796
9797 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
9798
9799         * class.c (maybe_warn_about_overly_private_class): Improve error
9800         messages for class with only private constructors.
9801
9802         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
9803         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
9804         (build_typename_type): New function.
9805         * decl.c (build_typename_type): Broken out from ...
9806         (make_typename_type): Use it.
9807         * search.c (lookup_field): Likewise.
9808
9809 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
9810
9811         * pt.c (convert_nontype_argument): Check against type_referred_to.
9812         * decl.c (grokvardecl): Check for declarator name before building
9813         DECL_ASSEMBLER_NAME.
9814
9815 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
9816
9817         * pt.c (lookup_template_class): Add comment.
9818         (instantiate_class_template): Don't mark the _TYPE node for
9819         member class templates as an instantiation.
9820
9821 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
9822
9823         * decl.c (grokfndecl): Fix my thinko.
9824
9825 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
9826
9827         * tinfo2.cc (fast_compare): Remove.
9828         (before): Just use strcmp.
9829         * tinfo.cc (operator==): Just use strcmp.
9830
9831 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
9832
9833         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
9834         declarations.
9835
9836 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
9837
9838         * cp-tree.h (specializations_of_same_template_p): Remove.
9839         * search.c (get_template_base): Don't use it.
9840         (get_template_base_recursive): Likewise.
9841         * pt.c (specializations_of_same_template_p): Remove.
9842         (unify): Don't use it.
9843         (lookup_template_class): Find the correct parent when setting
9844         CLASSTYPE_TI_TEMPLATE.
9845
9846 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
9847
9848         * tinfo.cc (operator==): Always compare names.
9849
9850 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
9851
9852         * decl.c (start_function): Fix cut-and-paste error.
9853
9854 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
9855
9856         * inc/typeinfo: Add #pragma interface.
9857         (operator!=): Just call operator==.
9858         * tinfo.cc: Add #pragma implementation.
9859         (operator==): Move from inc/typeinfo and tinfo2.cc.
9860         Check __COMMON_UNRELIABLE instead of _WIN32.
9861
9862         * typeck2.c (my_friendly_abort): Add URL.
9863
9864 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
9865
9866         * decl.c (start_method): Added extra parameter for attributes.
9867         * cp-tree.h (start_method): Update prototype.
9868         * parse.y (fn.def2): Update start_method parameter list.
9869
9870 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
9871
9872         * cp-tree.h (specializations_of_same_template_p): Declare.
9873         * pt.c (specializations_of_same_template_p): New function.
9874         (unify): Use it.
9875         * search.c (get_template_base): Use it.
9876         (get_template_base_recursive): Likewise.
9877
9878 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
9879
9880         * decl2.c (start_objects): Add new variable `joiner' and
9881         initialize it properly.
9882
9883 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
9884
9885         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
9886         change to vtable types.
9887
9888         * cvt.c (ocp_convert): Avoid infinite recursion caused by
9889         1998-10-03 change.
9890
9891 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
9892
9893         * pt.c (resolve_overloaded_unification): New fn.
9894         (try_one_overload): Likewise.
9895         (unify): Don't fail on unknown type.
9896         (type_unification_real): Likewise.  Use resolve_overloaded_unification
9897         to handle an overloaded argument.
9898         (template_args_equal): Split out...
9899         (comp_template_args): From here.
9900         (determine_specialization): Also allow a template with more
9901         parms than were explicitly specified.
9902         * cp-tree.h: Add template_args_equal.
9903         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
9904
9905 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
9906
9907         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
9908         change.
9909
9910 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
9911
9912         * typeck.c (unsigned_type): Only return TItype nodes when
9913         HOST_BITS_PER_WIDE_INT is >= 64 bits.
9914         (signed_type): Likewise.
9915         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
9916         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
9917         (init_decl_processing): Only create TItype nodes when
9918         HOST_BITS_PER_WIDE_INT is >= 64 bits.
9919         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
9920         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
9921
9922 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9923
9924         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
9925         (gxx.gperf): Update comments describing invocation flags.
9926         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
9927
9928 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
9929
9930         * class.c (finish_struct_1): Add commentary on previous change.
9931
9932         * cp-tree.h (vtbl_ptr_type_node): New variable.
9933         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
9934         already of the right type.
9935         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
9936         Simplify code to grow vtable.
9937         * decl.c (vtbl_ptr_type_node): Define.
9938         (init_decl_processing): Initialize it.
9939
9940 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
9941
9942         * cp-tree.def (PTRMEM_CST): New tree node.
9943         * cp-tree.h (ptrmem_cst): New type.
9944         (lang_type): Remove local_typedecls.
9945         (dummy): Increase to 12 bits from 11.
9946         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
9947         (PTRMEM_CST_CLASS): New macro.
9948         (PTRMEM_CST_MEMBER): Likewise.
9949         (current_access_specifier): New variable.
9950         (current_class_type): Remove duplicate declaration.
9951         (finish_struct): Change prototype.
9952         (unreverse_member_declarations): New function.
9953         (pushdecl_class_level): Change prototype.
9954         (grok_enum_decls): Remove.
9955         (fixup_anonymous_union): New function.
9956         (grok_x_components): Change prototype.
9957         (tsubst_chain): Remove.
9958         (finish_member_template_decl): Likewise.
9959         (check_explicit_specialization): Fix indentation.
9960         (finish_class_definition): Change prototype.
9961         (finish_member_class_template): Likewise.
9962         (finish_member_declaration): New function.
9963         (check_multiple_declarators): Likewise.
9964         * class.c (class_stack_node_t): New type.
9965         (current_class_base): Remove.
9966         (current_class_stack): Change type.
9967         (current_access_specifier): New variable.
9968         (grow_method): Remove.
9969         (check_member_decl_is_same_in_complete_scope): Break out from
9970         finish_struct.
9971         (make_method_vec): New function.
9972         (free_method_vec): Likewise.
9973         (add_implicitly_declared_members): Break out from finish_struct_1.
9974         (free_method_vecs): New variable.
9975         (add_method): Rework for direct use from parser.
9976         (handle_using_decl): Watch for NULL_TREE while iterating through
9977         CLASSTYPE_METHOD_VEC.
9978         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
9979         just do some error-checking.
9980         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
9981         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
9982         (finish_struct): Change prototype.  Simplify; fields and methods
9983         are already set up at this point.
9984         (init_class_processing): Set up current_class_stack.
9985         (pushclass): Save current_access_specifier.
9986         (popclass): Restore it.
9987         (currently_open_class): Simplify.
9988         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
9989         * decl.c (saved_scope): Add access_specifier.
9990         (maybe_push_to_top_level): Save it.
9991         (pop_from_top_level): Restore it.
9992         (maybe_process_template_type_declaration): Use
9993         finish_member_declaration.
9994         (pushtag): Likewise.
9995         (pushdecl_class_level): Don't return a value.
9996         (fixup_anonymous_union): Break out from grok_x_components.
9997         (shadow_tag): Use it.
9998         (xref_tag): Complain about using an elaborated type specifier to
9999         reference a template type parameter or typedef name.
10000         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
10001         (current_local_enum): Remove.
10002         (build_enumerator): Call finish_member_declaration.
10003         (grok_enum_decls): Remove.
10004         * decl2.c (grok_x_components): Simplify.
10005         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
10006         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
10007         (merge_functions): Add to comment.
10008         (arg_assoc_type): Prototype.
10009         (arg_assoc): Pass as many arguments as there are parameters.
10010         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
10011         OFFSET_REF.
10012         * expr.c (cpls_expand_expr): Remove dead code.  Handle
10013         PTRMEM_CST.
10014         * friend.c (do_friend): Lookup friends when in nested classes.
10015         Change comments.
10016         * init.c (build_offset_ref): Do lookup even for classes that are
10017         only partially defined.
10018         (decl_constant_value): Remove dead code.
10019         * method.c (build_overload_value): Remove hack where by TYPE was
10020         not a TYPE.  Handle PTRMEM_CST.
10021         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
10022         should go.
10023         * parse.y (components, notype_components, component_decl,
10024         component_decl_1, component_declarator, component_declarator0):
10025         Now all are itype rather than ttype.  Rework to add members to
10026         classes on the fly.
10027         (typesqpecqual_reserved): Use check_multiple_declarators.
10028         (structsp): Update class to finish_class_definition.
10029         (do_xref_defn): Unsplit into named_class_head.
10030         (access_specifier): Set current_access_specifier.
10031         * pt.c (set_current_access_from_decl): New function.
10032         (finish_member_template_decl): Don't take the parameters.
10033         (comp_template_args): Make more robust.
10034         (lookup_template_class): Don't use current_local_enum.
10035         (for_each_template_parm): Handle PTRMEM_CST.
10036         (instantiate_class_template): Use set_current_access_from_decl,
10037         finish_member_declaration and unreverse_member_declarations.  Set
10038         lineno/input_filename before generating implicit member functions.
10039         (type_unification_real): Don't assume back-unification happens
10040         only for the last argument.
10041         (regenerate_decl_from_template): Call pushclass a bit earlier.
10042         (tsubst_chain): Remove.
10043         (tsubst_enum): Use set_current_access_from_decl.
10044         (set_mangled_name_for_template_decl): Fix indentation.
10045         * search.c (lookup_fnfields_1): Change iteration through
10046         CLASSTYPE_METHOD_VEC.
10047         (dfs_pushdecls): Likewise.
10048         (dfs_compress_decls): Likewise.
10049         (add_conversions): Likewise.
10050         * semantics.c (finish_class_definition): Don't take components.
10051         Change call to finish_struct.
10052         (finish_member_declaration): New function.
10053         (finish_member_class_template): Don't take template parameters.
10054         Change call to grok_x_components.  Call finish_member_template_decl.
10055         (check_multiple_declarators): New function.
10056         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
10057         a passed in fieldlist.
10058         * tree.c (search_tree): Handle PTRMEM_CST.
10059         (mapcar): Likewise.
10060         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
10061         INTEGER_CSTs, for pointer-to-data members.
10062
10063         * call.c (resolve_args): Resolve template specializations, if
10064         possible.
10065
10066 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10067
10068         * Makefile.in (spew.o): Depend on toplev.h.
10069
10070         * call.c (compare_ics): Initialize variables `deref_from_type2',
10071         `deref_to_type1' and `deref_to_type2'.
10072
10073         * except.c (get_eh_type): Hide prototype and definition.
10074         (process_start_catch_block_old): Remove unused static prototype.
10075
10076         * pt.c (tsubst_decl): Initialize variable `argvec'.
10077
10078         * spew.c: Include toplev.h.
10079
10080 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
10081
10082         * pt.c (instantiate_decl): Do save and restore file position.
10083
10084 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10085
10086         * method.c (build_decl_overload_real): Clear
10087         numeric_output_need_bar after __.
10088
10089 1998-10-05  Nathan Sidwell  <nathan@acm.org>
10090
10091         * call.c (build_new_method_call): Issue 'incomplete type' error,
10092         if class is not defined.
10093
10094 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10095
10096         * call.c (build_object_call): Move declaration of variable
10097         `fn' into the scope where it is used.  Don't access variable
10098         `fn' when it is uninitialized, instead use `fns'.
10099
10100 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10101
10102         * errfn.c (cp_thing): Print buf as a string not as a printf format
10103         to avoid problems with the operator%.  Consequently, `%%' sequences
10104         in format are copied as `%' in buf.
10105
10106 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
10107
10108         * pt.c (pop_tinst_level): Call extract_interface_info.
10109         (instantiate_decl): Don't save and restore file position.
10110
10111         * decl.c (cp_finish_decl): Make statics in extern inlines and
10112         templates common, if possible and the target doesn't support weak
10113         symbols.
10114
10115         * decl.c (grokdeclarator): Remove redundant calls to
10116         build_type_variant and some duplicated code.
10117         * sig.c (build_signature_reference_type): Only take the type parm.
10118         (build_signature_pointer_type): Likewise.
10119         * tree.c (build_cplus_method_type): Adjust.
10120         * cp-tree.h: Update.
10121
10122 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
10123
10124         * call.c (build_over_call): Make pedwarns about dropped qualifiers
10125         into full-fledged errors.
10126         * cvt.c (convert_to_reference): Likewise.
10127         * typeck.c (convert_for_assignment): Likewise.
10128
10129         * search.c (expand_upcast_vtables): In addition to unsetting
10130         TREE_READONLY, remove top-level const type qualifier.
10131
10132 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
10133
10134         * class.c (current_class_ptr, current_class_ref): Clarify
10135         documentation.
10136         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
10137         NOP type conversions.
10138         * decl.c (decls_match): Use comptypes directly; ignore
10139         qualifiers on the DECL.
10140         (duplicate_decls): Remove qualifier checks on DECL.
10141         (grokdeclarator): Make the type built up include top-level
10142         qualifiers.
10143         * decl2.c (do_dtors): Fix spelling error.
10144         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
10145         when printing type information.
10146         * init.c (build_new_1): Add documentation.  Deal with the fact
10147         that type of allocated memory now contains qualifiers.
10148         * lex.c (is_global): Improve error-recovery.
10149         * sig.c (build_member_function_pointer): Don't cast away const
10150         on fields of sigtable_entry_type.
10151         * tree.c (lvalue_type): Don't look at top-level qualifiers on
10152         expressions.
10153         * typeck.c (decay_conversion): Likewise.
10154         (build_component_ref): Make sure the type of the COMPONENT_REF
10155         contains top-level qualifiers, as appropriate.  Improve
10156         error-handling.
10157         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
10158         (build_array_ref): Likewise.
10159         (build_unary_op): Improve error-recovery.
10160         (unary_complex_lvalue): Make taking the address a bound member
10161         function an error, not a sorry.
10162         (build_conditional_expr): Look at the type qualifiers, not the
10163         qualifiers on the expression itself.
10164
10165 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
10166
10167         * decl2.c (merge_functions): Remove duplicates.
10168
10169         * decl2.c: Add -f{no-,}implicit-inline-templates.
10170         (import_export_decl): Check it.
10171
10172         * decl.c (lookup_name_real): Template parms also take precedence
10173         over implicit typename.  Only warn if yylex.
10174
10175         * typeck.c (build_conditional_expr): Only fold if ifexp is an
10176         INTEGER_CST.
10177
10178         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
10179         instead of linkage.
10180
10181 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
10182
10183         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
10184         * class.c (build_vbase_pointer): Use it.
10185         * rtti.c (expand_class_desc): Likewise.
10186         * tree.c (build_vbase_pointer_fields): Likewise.
10187
10188 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
10189
10190         * decl.c (start_decl): Add invocation of
10191         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
10192         (start_function): Add invocation of
10193         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
10194
10195         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
10196         HANDLE_GENERIC_PRAGMAS.
10197
10198 1998-09-28  Anthony Green  <green@cygnus.com>
10199
10200         * semantics.c (finish_asm_stmt): Always permit volatile asms.
10201
10202 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
10203
10204         * decl.c (grokdeclarator): Tighten checks for invalid
10205         destructors.  Improve error-messages and error-recovery.
10206         * decl2.c (check_classfn): Don't assume that mangled destructor
10207         names contain type information.
10208
10209 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
10210
10211         * search.c (get_base_distance): Remove assert.
10212
10213         * decl2.c (build_anon_union_vars): Don't process a field with no
10214         name.
10215         (finish_anon_union): Also complain about local anon unions with no
10216         members.
10217
10218 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10219
10220         * decl.c (lookup_namespace_name): If the name is a namespace,
10221         return it immediately.
10222
10223 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10224
10225         * cp-tree.h (define_case_label): Remove unused parameter.
10226         (check_java_method): Likewise.
10227         (grokclassfn): Likewise.
10228         (expand_aggr_init): Likewise.
10229         (build_x_delete): Likewise.
10230         (maybe_end_member_template_processing): Likewise.
10231         (unshare_base_binfos): Add prototype.
10232         (string_conv_p): Likewise.
10233         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
10234
10235         * cvt.c (build_up_reference): Remove unused parameter
10236         `checkconst', all callers changed.
10237         (build_type_conversion): Mark parameter `code' with
10238         ATTRIBUTE_UNUSED.
10239         (build_expr_type_conversion): Initialize variable `conv'.
10240
10241         * decl.c (push_namespace): Initialize variable `d'.
10242         (define_case_label): Remove unused parameter `decl', all callers
10243         changed.
10244
10245         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
10246         `argc' with ATTRIBUTE_UNUSED.
10247         (grokclassfn): Remove unused parameter `cname', all callers
10248         changed.
10249         (check_java_method): Likewise for parameter `ctype'.
10250         (copy_assignment_arg_p): Mark parameter `virtualp' with
10251         ATTRIBUTE_UNUSED.
10252         (finish_prevtable_vardecl): Likewise for parameter `prev'.
10253
10254         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
10255
10256         * init.c (expand_aggr_init_1): Remove unused parameter
10257         `alias_this', all callers changed.
10258         (expand_aggr_init): Likewise.
10259         (expand_default_init): Likewise.
10260         (build_new_1): Initialize variable `susp'.
10261         (build_x_delete): Remove unused parameter `type', all callers
10262         changed.
10263
10264         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
10265         ATTRIBUTE_UNUSED.
10266         (readescape): Use (unsigned) value in shift.
10267         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
10268         comparing to a signed quantity.
10269
10270         * pt.c (maybe_end_member_template_processing): Remove unused
10271         parameter `decl', all callers changed.
10272         (check_explicit_specialization): Add braces around empty body in
10273         an else-statement.
10274         (current_template_args): Initialize variable `args'.
10275         (lookup_template_class): Likewise for variable `prev_local_enum'.
10276         (tsubst_decl): Likewise for variable `r'.
10277         (set_mangled_name_for_template_decl): Initialize variable
10278         `context'.
10279
10280         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
10281         Likewise for variable `i'.
10282         (yylex): Initialize variable `trrr'.
10283
10284         * typeck.c (compparms): Mark variable `strict' with
10285         ATTRIBUTE_UNUSED.
10286
10287         * xref.c (simplify_type): Cast argument of ctype function to
10288         `unsigned char'.
10289
10290 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
10291
10292         * cp-tree.h (language_lvalue_valid): Remove.
10293         * decl.c (grokdeclarator): Don't disallow references to functions.
10294         * tree.c (lvalue_p_1): New function, combining duplicated
10295         code from ...
10296         (lvalue_p): Use it.
10297         (real_lvalue_p): Likewise.
10298         * typeck.c (language_lvalue_valid): Remove.
10299         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
10300         they don't have TREE_READONLY set.
10301         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
10302
10303 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10304
10305         * spew.c (yylex): Give diagnostic.
10306         * hash.h (is_reserved_word): Add export.
10307         * gxx.gperf: Likewise.
10308         * lex.h (rid): Add RID_EXPORT.
10309         * lex.c (init_parse): Likewise.
10310
10311 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
10312
10313         * friend.c (do_friend): Make warning a full sentence.
10314
10315 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
10316
10317         * parse.y (component_decl_list): Improve error-recovery.
10318
10319 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10320
10321         * decl.c (make_typename_type): Move error to point where name
10322         variable can be used by dump_type.
10323
10324 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
10325
10326         * decl.c (grokfndecl): Improve error-recovery.
10327         * decl2.c (grokfield): Likewise.
10328         * pt.c (finish_member_template_decl): Likewise.
10329
10330 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10331
10332         * method.c (hack_identifier): Finding multiple members is always
10333         an error.
10334
10335 1998-09-21  Per Bothner  <bothner@cygnus.com>
10336
10337         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
10338
10339 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
10340
10341         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
10342
10343 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
10344
10345         * class.c (maybe_warn_about_overly_private_class): Reformat.
10346
10347 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
10348
10349         * exception.cc (__cplus_type_matcher): Realign some code.
10350
10351 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
10352
10353         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
10354         (tinfo2.o): Likewise.
10355         (exception.o): Likewise.
10356         (new.o): Likewise.
10357         (opnew.o): Likewise.
10358         (opnewnt.o): Likewise.
10359         (opvnew.o): Likewise.
10360         (opvnewnt.o): Likewise.
10361         (opdel.o): Likewise.
10362         (opdelnt.o): Likewise.
10363         (opvdel.o): Likewise.
10364         (opvdelnt.o): Likewise.
10365
10366 1998-09-16  Richard Henderson  <rth@cygnus.com>
10367
10368         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
10369
10370 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
10371
10372         * call.c (build_field_call): Handle static data members too.
10373
10374         * typeck.c (comptypes): When comparing pointer types, check
10375         whether referred types match even in strictest modes.
10376
10377 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
10378
10379         * cp-tree.h: Revert previous change.
10380         (finish_struct_methods): Remove declaration.
10381         * class.c: Revert previous change.
10382         (maybe_warn_about_overly_private_class): New function.
10383         (finish_struct_methods): Declare here, and make static.  Remove
10384         unnecessary parameters.  Tidy slightly.  Use
10385         maybe_warn_about_overly_private_class.
10386         (finish_struct_1): Adjust.  Remove check for private constructors,
10387         now done elsewhere.
10388         (finish_struct): Adjust.
10389
10390 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
10391
10392         * except.c (expand_start_catch_block): No need to check for new
10393         exception model.
10394         (process_start_catch_block_old): Deleted.
10395         (process_start_catch_block): Add call to start_decl_1().
10396         (expand_end_catch_block): Add call to end_catch_handler().
10397         * exception.cc (__cplus_type_matcher): Only check the exception
10398         language if there is an exception table.
10399
10400 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
10401
10402         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
10403         as used to prevent conflicts with virtual function tables.
10404
10405 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
10406
10407         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
10408         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
10409         * class.c (maybe_class_too_private_p): New function.
10410         (finish_struct_methods): Use it.
10411         (finish_struct_1): Likewise.
10412         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
10413         appropriate.
10414
10415         * pt.c (check_specialization_scope): Fix spelling error.
10416         (check_explicit_specialization): Remove code to handle explicit
10417         specializations in class scope; they are now correctly diagnosed
10418         as errors.
10419
10420 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
10421
10422         * decl.c (pushdecl): Don't copy types if the
10423         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
10424         type.
10425
10426 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
10427
10428         * class.c (get_enclosing_class): New function.
10429         (is_base_of_enclosing_class): Likewise.
10430         * cp-tree.h (get_enclosing_class): Declare.
10431         (is_base_of_enclosing_class): Likewise.
10432         * pt.c (coerce_template_parms): Use them.
10433
10434 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
10435
10436         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
10437         null to decide whether to use it.
10438
10439         * error.c (dump_type_real): Handle NAMESPACE_DECL.
10440         * parse.y (base_class.1): Avoid crash on error.
10441
10442 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10443
10444         * decl.c (make_typename_type): If context is a namespace, the code
10445         is in error.
10446
10447 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
10448
10449         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
10450
10451 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
10452
10453         * cp-tree.h (anonymous_namespace_name): Declare.
10454         * decl.c: Define it.
10455         (push_namespace): Use anonymous_namespace_name, rather than local
10456         static anon_name.
10457         * error.c (dump_decl): If a namespace is named
10458         anonymous_namespace_name, call it {anonymous}.
10459
10460         * decl.c (grokparms): Distinguish between references and pointers
10461         in error message.
10462
10463 1998-09-08  Richard Henderson  <rth@cygnus.com>
10464             Mark Mitchell  <mark@markmitchell.com>
10465
10466         * pt.c (process_partial_specialization): Consistently allocate
10467         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
10468         tpd.parms, where appropriate.
10469
10470 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
10471
10472         * Makefile.in (INCLUDES): Update after recent toplevel gcc
10473         reorganizations.
10474
10475 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
10476
10477         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
10478         * class.c (finish_struct): Remove hackery to deal with explicit
10479         specializations in class scope.
10480         * decl.c (grokfndecl): Improve error-recovery.
10481         * decl2.c (grokfield): Likewise.
10482         * pt.c (check_specialization_scope): New function.
10483         (begin_specialization): Call it.
10484         (process_partial_specialization): New function, split out from
10485         push_template_decl.  Check partial specializations more
10486         stringently.
10487         (push_template_decl): Call it.
10488         (check_explicit_specialization): Don't attempt to handle explicit
10489         specializations in class scope.
10490         (template_parm_data): Document.  Add current_arg and
10491         arg_uses_template_parms.
10492         (mark_template_parm): Set it.
10493         (tsubst_arg_types): Remove unused variable.
10494         * semantics.c (begin_class_definition): Tweak.
10495
10496 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
10497
10498         * inc/typeinfo (type_info::type_info(const char*)): Make
10499         `explicit'.
10500
10501         * cp-tree.h (hash_tree_cons_simple): New macro.
10502         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
10503         (coerce_template_parms): Use make_temp_vec, instead of
10504         make_tree_vec.  Document this behavior.
10505         (lookup_template_class): Likewise.
10506         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
10507         Remove dead code (and add assertion to check its deadness).  Fix
10508         bug w.r.t. exception specifications.
10509
10510 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
10511
10512         * decl2.c (import_export_vtable): Always make artificials comdat.
10513         (import_export_decl): Likewise.
10514         * pt.c (mark_decl_instantiated): Likewise.
10515
10516 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
10517
10518         * cp-tree.h (finish_globally_qualified_member_call_expr):
10519         Rename to ...
10520         (finish_qualified_call_expr).
10521         * semantics.c: Likewise.
10522         * parse.y (primary): Use it.
10523         * method.c (hack_identifier): Remove redundant code.
10524
10525         * init.c (resolve_offset_ref): Call convert_from_reference to
10526         handle members of reference type.  Improve error recovery.
10527
10528 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
10529
10530         * cp-tree.h: Declare warn_nontemplate_friend.
10531         * decl2.c (lang_decode_option): Set.
10532         * lang-options.h: Add -Wnon-template-friend.
10533         * friend.c (do_friend): Use to toggle non-template function warning.
10534
10535 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
10536
10537         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
10538         corresponding INTEGER_CSTs when processing_template_decl.
10539         * pt.c (tsubst_enum): Tweak accordingly.
10540
10541 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10542
10543         * decl.c (pushdecl_class_level): Add warning here.
10544         (pushdecl): Tweak.
10545
10546 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
10547
10548         * cvt.c (convert_pointer_to_real): Tidy.
10549         * search.c (get_base_distance_recursive): Simplify.
10550         (get_base_distance): Likewise.
10551
10552         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
10553         parms.
10554
10555 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
10556
10557         * lex.c (check_newline):  Call HANDLE_PRAGMA before
10558         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
10559         if unknown pragmas are encountered.
10560         (handle_sysv_pragma): Interpret return code from
10561         handle_pragma_token ().  Return success/failure indication rather
10562         than next unprocessed character.
10563         (pragma_getc): New function: retrieves characters from the
10564         input stream.  Defined when HANDLE_PRAGMA is defined.
10565         (pragma_ungetc): New function: replaces characters back into the
10566         input stream.  Defined when HANDLE_PRAGMA is defined.
10567
10568 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
10569
10570         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
10571         * class.c (build_vtable_entry_ref): Likewise.
10572
10573 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
10574
10575         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
10576         * decl2.c (import_export_decl): Likewise.
10577         * pt.c (instantiate_decl): Use it.
10578
10579 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
10580
10581         * decl.c (lookup_name_real): Also do implicit typename thing for
10582         artificial TYPE_DECLs.
10583         * search.c (lookup_field): Likewise.
10584         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
10585         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
10586         (enter_scope_of): Extract type from implicit typename.
10587         (begin_class_definition): Likewise.
10588         * lex.c (identifier_type): Handle implicit typename when checking
10589         for SELFNAME.
10590
10591         * cp-tree.h: Declare flag_strict_prototype.
10592         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
10593         -fstrict-prototype.
10594         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
10595         specified, set it to the value of pedantic.
10596
10597 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
10598
10599         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
10600
10601 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
10602
10603         * decl.c (finish_enum): Handle member enums of classes declared in
10604         template functions.
10605
10606         * decl2.c (grok_x_components): Strip attributes before calling
10607         groktypename.
10608
10609 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
10610
10611         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
10612         -fenum-int-equivalence and -fno-nonnull-objects.
10613         * class.c (check_for_override): Remove support for -fall-virtual.
10614         (finish_struct_1): Likewise.
10615         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
10616         * typeck.c (build_binary_op_nodefault): Likewise.
10617         * cvt.c (ocp_convert): Likewise.
10618         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
10619         * class.c (build_vbase_path): Likewise.
10620
10621 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
10622
10623         * Makefile.in (INTERFACE): New, set to 1.
10624
10625 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
10626
10627         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
10628         comparing with global_namespace.
10629         (dump_aggr_type): Likewise.
10630
10631         * decl.c (grokfndecl): Issue error on declaration of friend
10632         templates with explicit template arguments.
10633
10634         * pt.c (convert_template_argument): New function, split out
10635         from...
10636         (coerce_template_parms): Here.
10637         (tsubst): Attempt better error-recovery.
10638
10639 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10640
10641         * pt.c (decl_template_parm_p): Add checks for
10642         TEMPLATE_TEMPLATE_PARM.
10643
10644 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
10645
10646         * lex.c (do_identifier): Fix thinko in previous change.
10647
10648 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
10649
10650         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
10651         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
10652
10653 1998-08-28  Richard Henderson  <rth@cygnus.com>
10654
10655         Add support for discarding unused virtual functions.
10656         * lang-options.h: Add -fvtable-gc.
10657         * cp-tree.h: Add flag_vtable_gc.
10658         * decl2.c (output_vtable_inherit): New fn.
10659         (finish_vtable_vardecl): Call it.
10660         * class.c (build_vtable_entry_ref): New fn.
10661         (build_vtbl_ref): Call it.
10662
10663 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
10664
10665         * cp-tree.h (build_enumerator): Take the enumeration type as a
10666         parameter.
10667         * decl.c (finish_enum): Don't set the TREE_TYPE for the
10668         enumeration constant values if we're processing_template_decls.
10669         Don't set the type for the CONST_DECLs either; that's done in
10670         build_enumerator.
10671         (build_enumerator): Take the enumeration type as a
10672         parameter.
10673         * lex.c (do_identifier): Don't resolve enumeration constants while
10674         processing template declarations, even if they happen to be
10675         TEMPLATE_PARM_INDEXs.
10676
10677         * parse.y (current_enum_type): New variable.
10678         (primary): Don't allow statement-expression in local classes just
10679         as we don't in global classes.
10680         (structsp): Use current_enum_type.
10681         (enum_list): Likewise.
10682         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
10683         finish_enum; they no longer occur.
10684
10685         * cp-tree.h (finish_base_specifier): New function.
10686         * parse.y (base_class): Use it.
10687         * semantics.c (finish_base_specifier): Define it.
10688
10689         * parse.y (structsp): Warn on use of typename outside of template
10690         declarations.
10691
10692 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
10693
10694         * lex.c (handle_cp_pragma): Remove #pragma vtable.
10695         * lang-options.h: Remove +e options.
10696         * decl2.c (lang_decode_option): Likewise.
10697         (import_export_vtable): Don't check write_virtuals.
10698         (finish_vtable_vardecl, finish_file): Likewise.
10699         * search.c (dfs_debug_mark): Likewise.
10700         * semantics.c (begin_class_definition): Likewise.
10701         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
10702
10703         * call.c (build_over_call): Check flag_elide_constructors.
10704         * decl2.c: flag_elide_constructors defaults to 1.
10705         * typeck.c (convert_arguments): Remove return_loc parm.
10706         (build_function_call_real): Adjust.
10707
10708         * search.c: Tear out all mi_matrix and memoize code.
10709         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
10710         * lang-options.h: Remove documentation for -fhandle-exceptions,
10711         -fmemoize-lookups and -fsave-memoized.
10712         * cp-tree.h: Lose mi_matrix and memoize support.
10713         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
10714         * class.c: Lose struct class_level.
10715         (pushclass, popclass): Lose memoize support.
10716         * init.c (build_offset_ref): Likewise.
10717
10718         Never change BINFO_INHERITANCE_CHAIN.
10719         * init.c (emit_base_init): Change modification of
10720         BINFO_INHERITANCE_CHAIN to an assert.
10721         * search.c (get_base_distance_recursive): Likewise.
10722         (get_base_distance): Likewise.
10723         (lookup_member): Likewise.
10724         (convert_pointer_to_single_level): Likewise.
10725         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
10726         (lookup_fnfields): Likewise.
10727         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
10728         (unshare_base_binfos): Don't call propagate_binfo_offsets.
10729         (layout_basetypes): Call propagate_binfo_offsets instead of
10730         unshare_base_binfos.
10731         * decl.c (xref_basetypes): Call unshare_base_binfos.
10732         * pt.c (instantiate_class_template): Likewise.
10733         * tree.c (reverse_path): Remove 'copy' parm; always make a
10734         temporary copy.
10735         * class.c (build_vbase_path): Just call it.
10736         * search.c (compute_access): Likewise.  Don't re-reverse.
10737
10738 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
10739
10740         * class.c (build_vbase_path): Use reverse_path.
10741         (finish_base_struct): Move warnings for inaccessible bases to
10742         layout_basetypes.
10743         (modify_one_vtable): Remove check of TREE_USED (binfo).
10744         (fixup_vtable_deltas1): Likewise.
10745         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
10746         (xref_tag): Remove binfos parameter.
10747         (make_binfo): Remove chain parameter.
10748         (reverse_path): Add copy parameter.
10749         * decl.c (init_decl_processing): Change calls to xref_tag.
10750         (xref_tag): Remove binfos parameter.
10751         (xref_basetypes): Change calls to make_binfo.
10752         * decl2.c (grok_x_components): Change calls to xref_tag.
10753         (handle_class_head): Likewise.
10754         * friend.c (do_friend): Likewise.
10755         * lex.c (make_lang_type): Change calls to make_binfo.
10756         * parse.y (structsp): Change calls to xref_tag.
10757         (named_complex_class_head_sans_basetype): Likewise.
10758         (named_class_head): Likewise.
10759         * rtti.c (init_rtti_processing): Likewise.
10760         * search.c (compute_access): Change calls to reverse_path.
10761         (dfs_get_vbase_types): Change calls to make_binfo.
10762         (get_vbase_types): Remove dead code.
10763         * tree.c (unshare_base_binfos): Change calls to make_binfo.
10764         (layout_basetypes): Warn here about inaccessible bases.
10765         (make_binfo): Remove chain parameter.
10766         (reverse_path): Add copy parameter.
10767
10768 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
10769
10770         * class.c: #if 0 complete_type_p.
10771         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
10772         * method.c (process_overload_item): Likewise.
10773         * typeck.c (comp_target_types): Likewise.
10774
10775         Stop sharing binfos for indirect virtual bases.
10776         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
10777         (layout_basetypes): Likewise.
10778         (unshare_base_binfos): Copy vbases, too.
10779         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
10780         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
10781         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
10782         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
10783         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
10784         reference to BINFO_VIA_PUBLIC.
10785         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
10786         (push_class_decls): Use them.
10787         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
10788         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
10789
10790 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
10791
10792         * decl.c (build_enumerator): Set DECL_CONTEXT for the
10793         CONST_DECLs.
10794
10795 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
10796
10797         * cp-tree.h (finish_enum): Change prototype.
10798         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
10799         VALUES parameter.  Don't try to compute mins/maxs if
10800         processing_template_decl.
10801         * parse.y (structsp): Use new calling sequence for finish_enum.
10802         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
10803         (lookup_template_class): Remove unused variables.  Tweak.
10804         Register enums on instantiation list before substituting
10805         enumeration constants.
10806         (tsubst_decl): Remove unused variables.
10807         (regenerate_decl_from_template): Likewise.
10808
10809         * decl.c (duplicate_decls): Don't obliterate the
10810         DECL_TEMPLATE_INFO for a template if we're not replacing it with
10811         anything.
10812
10813         * lex.c (do_identifier): Fix typo in comment.
10814
10815 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10816
10817         * errfn.c: Remove stdarg.h/varargs.h.
10818         * tree.c: Likewise.
10819
10820 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
10821
10822         * pt.c (tsubst_copy): Only do typename overloading on an
10823         IDENTIFIER_NODE that happens to look like a typename if it actually
10824         has a type for us to use.
10825
10826 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
10827
10828         * typeck.c (comp_cv_target_types): Split out...
10829         (comp_target_types): From here.  Don't allow cv-qual changes under
10830         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
10831         (build_ptrmemfunc): Pass 1 to nptrs.
10832         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
10833
10834 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
10835
10836         * search.c (dependent_base_p): Don't compare a binfo to
10837         current_class_type; use the TREE_TYPE of the binfo instead.
10838
10839         * cp-tree.h (CLASS_TYPE_P): Revise definition.
10840
10841 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
10842
10843         * decl.c (duplicate_decls): Don't complain about different
10844         exceptions from an internal decl even if pedantic.
10845
10846         * typeck.c (convert_for_assignment): Converting from pm of vbase
10847         to derived is an error, not a sorry.
10848
10849         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
10850         * class.c (fixed_type_or_null): Rename from
10851         resolves_to_fixed_type_p.  Return the dynamic type of the
10852         expression, if fixed, or null.
10853         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
10854         does not match the static type.
10855         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
10856         resolves_to_fixed_type_p again.
10857
10858 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
10859
10860         * pt.c (tsubst_decl): Move special case code for dealing with
10861         tricky friend templates here from ...
10862         (regenerate_decl_from_template): Here.
10863
10864 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
10865
10866         * decl.c (start_decl): Remove redundant linkage check.
10867
10868 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
10869
10870         * typeck.c (c_expand_return): Handle the case that valtype
10871         is wider than the functions return type.
10872
10873 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
10874
10875         * cp-tree.h (CLASS_TYPE_P): New macro.
10876         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
10877         * pt.c (process_template_parm): Undo previous change.
10878
10879 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
10880
10881         * cp-tree.h: Declare.
10882         * pt.c (decl_template_parm_p): New function.
10883         * decl.c (pushdecl): Check decls for redeclaring template parms.
10884         (xref_tag): Make redeclaration an error, print decl.
10885         * decl2.c (grokfield): Check field_decls for redeclaration as well.
10886
10887 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
10888
10889         * parse.y (primary): Fix up the type of string constants.
10890
10891 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
10892
10893         * typeck.c (convert_for_initialization): Move check for odd uses
10894         of NULL to avoid duplicate warnings.
10895
10896 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
10897
10898         * tree.c (lvalue_type): Fix for arrays.
10899         * typeck.c (string_conv_p): New fn.
10900         (convert_for_assignment): Use it.
10901         (build_unary_op): Use lvalue_type.
10902         * call.c (standard_conversion, convert_like): Use string_conv_p.
10903         (add_function_candidate): Use lvalue_type.
10904         * cvt.c (convert_to_reference): Likewise.
10905         * decl2.c (lang_decode_option): Ignore -traditional.
10906         * decl.c (init_decl_processing): flag_writable_strings inhibits
10907         flag_const_strings.
10908
10909 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
10910
10911         * lang-options.h (lang_options): Add fconst-strings to the list
10912         of valid options.
10913         * decl2.c (lang_f_options, lang_decode_option): Likewise.
10914
10915 1998-08-24  Nathan Sidwell  <nathan@acm.org>
10916
10917         * lex.c (real_yylex): Don't warn about long long constants if
10918         we're allowing long long.
10919
10920 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10921
10922         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
10923         accessing bindings directly.
10924
10925         * search.c (my_tree_cons): Reimplement.
10926
10927         * lang-specs.h: Remove __HONOR_STD.
10928         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
10929
10930 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
10931
10932         * decl.c (grokdeclarator): Complain about in-class initialization
10933         of aggregates and/or references.
10934         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
10935         TEMPLATE_TYPE_PARMs.
10936
10937         * decl2.c (grok_array_decl): Add comment.
10938         (mark_used): Don't instantiate an explicit instantiation.
10939         * friend.c (make_friend_class): Remove bogus comment.  Fix check
10940         for partial specializations.
10941         * pt.c (check_explicit_specialization): Don't
10942         SET_DECL_EXPLICIT_INSTANTIATION here.
10943         (mark_decl_instantiated): Or here.
10944         (do_decl_instantiation): Do it here, instead.  Add checks for
10945         duplicate explicit instantiations, etc.  Tidy.
10946         (do_type_instantiation): Likewise.
10947         (instantiate_decl): Improve comments.  Complain about explicit
10948         instantiations where no definition is available.
10949
10950         * cp-tree.h (ansi_null_node): Remove.
10951         * call.c (build_over_call): Warn about converting NULL to an
10952         arithmetic type.
10953         * cvt.c (build_expr_type_conversion): Likewise.  Use
10954         null_ptr_cst_p instead of expanding it inline.
10955         * decl.c (ansi_null_node): Remove.
10956         (init_decl_processing): Make null_node always have integral type.
10957         * except.c (build_throw): Warn about converting NULL to an
10958         arithmetic type.
10959         * lex.c (init_parse): Remove handling of ansi_null_node.
10960         * pt.c (type_unification_real): Don't convert NULL to void* type.
10961         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
10962         (convert_for_assignment): Warn about converting NULL to an
10963         arithmetic type.
10964         (convert_for_initialization): Likewise.
10965
10966 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
10967
10968         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
10969         * pt.c (coerce_template_parms): Use no_linkage_check.
10970         * decl.c (grokvardecl): Likewise.
10971         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
10972
10973         * method.c (process_overload_item): Remove useless code.
10974
10975 1998-08-20  Per Bothner  <bothner@cygnus.com>
10976
10977         Handle new'ing of Java classes.
10978         * init.c (build_class_classref):  New function.
10979         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
10980         constructor does not return this;  don't need to exception-protect.
10981
10982         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
10983         * decl2.c (acceptable_java_type):  Handle template-derived types.
10984
10985 1998-08-20  Per Bothner  <bothner@cygnus.com>
10986
10987         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
10988
10989 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
10990
10991         * decl.c (duplicate_decls): Always merge the old and new patterns
10992         for templates, regardless of whether or not the new one has
10993         DECL_INITIAL.  Don't throw away specializations.  Merge
10994         DECL_SAVED_TREE.
10995         * pt.c (tsubst_decl): Use the right pattern when calculating the
10996         complete args for a new template instance.
10997         (do_decl_instantiation): Fix typo in comment.
10998         (regenerate_decl_from_template): Deal with tricky friend template
10999         case.
11000         (instantiate_decl): Likewise.
11001
11002 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
11003
11004         * init.c (build_builtin_delete_call): Add missing assemble_external
11005         call.
11006
11007 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
11008
11009         * parse.y (notype_unqualified_id): Also accept ~A<int>.
11010
11011 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
11012
11013         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
11014         arithmetic.
11015         * except.c (build_throw): Warn when NULL is thrown, even with
11016         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
11017         thrown expression.
11018
11019         * cp-tree.h (ansi_null_node): New variable.
11020         * decl.c (ansi_null_node): New variable.
11021         (init_decl_processing): Initialize its type.
11022         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
11023         for null_node in non-ANSI mode.
11024         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
11025         place of null_node to avoid spurious errors.
11026
11027 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
11028
11029         * cp-tree.h (enter_scope_of): New function.
11030         * parse.y (complex_direct_notype_declarator): Use it.
11031         * semantics.c (enter_scope_of): New function.
11032
11033 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
11034
11035         * decl.c (grokparms): No, here.
11036
11037         * decl.c (grokdeclarator): Catch parm with pointer to array of
11038         unknown bound here...
11039         * method.c (process_overload_item): ...not here.
11040
11041         * gxxint.texi: Remove obsolete documentation of overloading code.
11042
11043         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
11044         * class.c (finish_struct_bits): Likewise.
11045
11046         * tree.c (lvalue_type): Fix for arrays.
11047         * typeck.c (build_unary_op): Use lvalue_type.
11048         * call.c (add_function_candidate): Likewise.
11049         * cvt.c (convert_to_reference): Likewise.
11050
11051         * decl2.c (lang_decode_option): Ignore -traditional.
11052
11053         * init.c (build_offset_ref): Don't mess with error_mark_node.
11054         * lex.c (do_scoped_id): Use cp_error.
11055
11056         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
11057
11058 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11059
11060         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
11061
11062 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
11063
11064         * cp-tree.h (set_identifier_local_value): Provide prototype.
11065
11066         * decl2.c (do_namespace_alias): Remove unused variables `binding'
11067         and `old'.
11068
11069 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
11070
11071         * Makefile.in: Rename BBISON to BISON so that it can be properly
11072         inherited from the parent makefile.
11073
11074 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
11075
11076         * lang-options.h: Add -finit-priority.
11077         * decl2.c: Likewise.  Check flag_init_priority instead of
11078         USE_INIT_PRIORITY.
11079
11080         * decl2.c (setup_initp): New fn.
11081         (start_objects, finish_objects, do_ctors): Handle init_priority.
11082         (do_dtors, finish_file): Likewise.
11083
11084 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
11085
11086         * pt.c (tsubst_copy): Hush warning.
11087
11088         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
11089
11090 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
11091
11092         * pt.c (print_template_context): Don't abort when instantiating a
11093         synthesized method.
11094
11095         * decl.c (grokdeclarator): Issue errors on namespace qualified
11096         declarators in parameter lists or in class scope.
11097
11098 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
11099
11100         * pt.c (check_explicit_specialization): Don't abort on bogus
11101         explicit instantiations.
11102
11103 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
11104
11105         * typeck.c (require_complete_type): Use complete_type_or_else.
11106         (complete_type_or_else): Always return NULL_TREE on failure, as
11107         documented.
11108
11109         * pt.c (tsubst_aggr_type): Prototype.
11110         (tsubst_decl): New function, split out from tsubst.  Set
11111         input_filename and lineno as appropriate.
11112         (pop_tinst_level): Restore the file and line number saved in
11113         push_tinst_level.
11114         (instantiate_class_template): Set input_filename and lineno as
11115         appropriate.
11116         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
11117         context for a TYPENAME_TYPE is complete.
11118
11119         * decl2.c (grokbitfield): Issue errors on bitfields declared with
11120         function type.
11121         (do_dtors): As in do_ctors, pretend to be a member of the same
11122         class as a static data member while generating a call to its
11123         destructor.
11124
11125         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
11126         conversions, even in complex virtual base class hierarchies.
11127
11128 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
11129
11130         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
11131         (TYPE_TEMPLATE_INFO): Likewise.
11132         (SET_TYPE_TEMPLATE_INFO): Likewise.
11133         (ENUM_TI_TEMPLATE): Likewise.
11134         (ENUM_TI_ARGS): Likewise.
11135         (lookup_nested_type_by_name): Remove.
11136         * decl.c (maybe_process_template_type_declaration): Handle enums.
11137         (start_enum): Don't check for primary-template enum declarations
11138         here.
11139         (finish_enum): Clean up, document.  Make sure template enum
11140         constants get the correct type.
11141         (build_enumerator): Copy initializers for template enumerations,
11142         too.
11143         (grok_enum_decls): Document.
11144         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
11145         better.  Build LOOKUP_EXPRs for local variables, even if they are
11146         TREE_PERMANENT.
11147         * pt.c (tsubst_enum): Remove field_chain parameter.
11148         (template_class_depth): Include the depth of surrounding function
11149         contexts.
11150         (push_template_decl): Check for primary-template enum declarations
11151         here.  Deal with enumeration templates.
11152         (lookup_template_class): Likewise.
11153         (for_each_template_parm): Likewise.
11154         (instantiate_class_template): Don't call tsubst_enum directly,
11155         call tsubst instead, to instantiate enums.  Deal with all
11156         field_chain issues here, not in tsubst_enum.
11157         (lookup_nested_type_by_name): Remove.
11158         (tsubst_aggr_type): Revise handling of enumeration types.
11159         (tsubst): Likewise.
11160         (tsubst_copy): Likewise.
11161         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
11162
11163 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
11164
11165         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
11166         uses template parameters.
11167         * method.c (build_template_parm_names): Use the full set of
11168         template arguments for tsubst'ing.
11169         (build_overload_identifier): Pass the full set of template
11170         arguments to build_template_parm_names, not just the
11171         innermost_args.
11172         * pt.c (TMPL_ARGS_DEPTH): Define using
11173         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
11174         (NUM_TMPL_ARGS): New macro.
11175         (add_outermost_template_args): Deal with the case where the outer
11176         args will be completely discarded.
11177         (coerce_template_parms): Use the full set of template arguments
11178         for tsubst'ing.  Simplify.  Add some asserts.  Improve
11179         error messages.
11180         (lookup_template_class): Pass the full set of template arguments
11181         to coerce_template_parms.
11182         (tsubst): Add assertion.
11183         (do_type_instantiation): Don't instantiate member template
11184         classes.
11185
11186         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
11187         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
11188
11189 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
11190
11191         * method.c (set_mangled_name_for_decl): Change return type to void.
11192
11193         * decl.c (lookup_name_real): A namespace-level decl takes priority
11194         over implicit typename.  Avoid doing the same lookup twice.
11195
11196         * search.c (dependent_base_p): New fn.
11197         (dfs_pushdecls, dfs_compress_decls): Use it.
11198
11199         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
11200         virtual functions if the type doesn't have any.
11201
11202 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
11203
11204         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
11205         uses template parameters.
11206
11207 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
11208
11209         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
11210         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
11211         * lex.c (do_identifier): Don't use a second argument, or a type,
11212         when building LOOKUP_EXPRs.
11213         (do_identifier): Likewise.
11214         (do_scoped_id): Likewise.
11215         * method.c (hack_identifier): Improve error message.
11216         * pt.c (lookup_template_function): Don't needlessly call
11217         copy_to_permanent or build_min.
11218         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
11219         necessary.
11220         (do_decl_instantiation): Improve error message.
11221         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
11222         (build_min): Copy the type to the permanent obstack, too.
11223
11224 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
11225
11226         * init.c (init_init_processing): Remove BI* handling.
11227         (build_builtin_call): Remove.
11228         (build_builtin_delete_call): New fn.
11229         (build_delete): Use it.
11230
11231 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
11232
11233         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
11234         (maybe_check_template_type): New function.
11235         * decl.c (maybe_process_template_type_declaration): New function,
11236         split out from pushtag  Call maybe_check_template_type.
11237         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
11238         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
11239         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
11240         * pt.c (template_class_depth_real): Generalization of ...
11241         (template_class_depth): Use it.
11242         (register_specialization): Use duplicate_decls for duplicate
11243         declarations of specializations.
11244         (maybe_check_template_type): New function.
11245         (push_template_decl_real): Fix comment.
11246         (convert_nontype_argument): Likewise.
11247         (lookup_template_class): Likewise.  Avoid an infinite loop on
11248         erroneous code.
11249         (tsubst_friend_function): Fix comment.
11250         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
11251         an IDENTIFIER_NODE.
11252         * semantics.c (begin_function_definition): Use
11253         reset_specialization to note that template headers don't apply
11254         directly to declarations after the opening curly for a function.
11255
11256 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
11257
11258         * decl.c (push_overloaded_decl): Use current_namespace instead of
11259         DECL_CONTEXT (decl) to determine where we go.
11260
11261         * decl.c (lookup_name_real): Fix typo.
11262
11263 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
11264
11265         * friend.c (is_friend): Be lenient with member functions to deal
11266         with nested friends.
11267
11268 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
11269
11270         * class.c (finish_struct_1): Convert integer_zero_node to
11271         ssizetype before passing it to set_rtti_entry.
11272         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
11273         of any size to a pointer.
11274
11275 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
11276
11277         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
11278         (build_template_decl_overload): Remove.
11279         (set_mangled_name_for_decl): New function.
11280         (innermost_args): Remove is_spec parameter.
11281         (most_specialized, most_specialized_class): Remove declarations.
11282         (lookup_template_class): Add entering_scope parameter.
11283         (maybe_process_partial_specialization): New function.
11284         (finish_template_decl): Likewise.
11285         (finish_template_type): Likewise.
11286         * class.c (finish_struct): Clean up processing of member template
11287         specializations.
11288         * decl.c (pushtag): Fix formatting.
11289         (lookup_tag): Improve handling of pseudo-global levels.
11290         (make_typename_type): Adjust call to lookup_template_class.
11291         (shadow_tag): Use maybe_process_partial_specialization.
11292         (xref_tag): Improve handling of member friends.
11293         (start_function): Call push_nested_class before
11294         push_template_decl.  Don't call push_template_decl for
11295         specializations.
11296         * decl2.c (grok_x_components): Don't call xref_tag for
11297         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
11298         (grokclassfn): Use set_mangled_name_for_decl.
11299         (arg_assoc_class): Adjust call to innermost_args.
11300         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
11301         * error.c (dump_function_name): Improve printing of template
11302         function names.
11303         * friend.c (is_friend): Don't compare types of decls to determine
11304         friendship, unless flag_guiding_decls.
11305         (make_friend_class): Partial specializations cannot be friends.
11306         (do_friend): Use set_mangled_name_for_decl.  Call
11307         push_template_decl_real instead of push_template_decl.
11308         * method.c (build_decl_overload_real): Remove prototype.  Give it
11309         external linkage.
11310         (build_overload_identififer): Adjust call to innermost_args.
11311         (build_template_decl_overload): Remove.
11312         (set_mangled_name_for_decl): New function.
11313         * parse.y (.finish_template_type): New non-terminal.
11314         (template_def): Use finish_template_decl.  Use template_extdef
11315         instead of extdef.
11316         (template_extdef, template_datadef): New non-terminals, containing
11317         only those rules for things which can be templates.
11318         (datadef): Tidy.
11319         (template_type, self_template_type): Use .finish_template_type.
11320         (named_class_head): Use maybe_process_partial_specialization.
11321         * pt.c (mangle_class_name_for_template): Remove context parameter.
11322         (get_class_bindings): Remove outer_args parameter.
11323         (complete_template_args): Remove.
11324         (add_outermost_template_args): New function.
11325         (register_specialization): Return the specialization.
11326         (unregister_specialization): New function.
11327         (tsubst_template_parms): Likewise.
11328         (most_specialized, most_specialized_class): Prototype here as
11329         static.
11330         (original_template): Rename to most_general_template.
11331         (tsubst_template_parms): New function.
11332         (set_mangled_name_for_template_decl): Likewise.
11333         (TMPL_ARGS_DEPTH): New macro.
11334         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
11335         (TMPL_ARGS_LEVEL): New macro.
11336         (SET_TMPL_ARGS_LEVEL): Likewise.
11337         (TMPL_ARG): Likewise.
11338         (SET_TMPL_ARG): Likewise.
11339         (TMPL_ARGS_DEPTH): Likewise.
11340         (finish_member_template_decl): Use finish_template_decl.
11341         (maybe_process_partial_specialization): New function, split out
11342         from tsubst.
11343         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
11344         (maybe_begin_member_template_processing): Use new macros.
11345         (is_member_template): Likewise.
11346         (is_member_template_class): Likewise.
11347         (add_to_template_args): Likewise.  Deal with multiple levels of
11348         args.
11349         (maybe_process_partial_specialization): New function.
11350         (retrieve_specialization): Add consistency check.
11351         (determine_specialization): Return full argument list.
11352         (check_explicit_specialization): Tweak friend handling.  Use full
11353         argument lists.  Simplify.
11354         (current_template_args): Use new macros.
11355         (push_template_decl_real): Change ill-named mainargs to specargs.
11356         Check that a partial specialization actually specializes at least
11357         one parameter.   Improve friend handling.  Modify for full
11358         template arguments.
11359         (classtype_mangled_name): Don't mangle the names of
11360         specializations.
11361         (lookup_template_class): Add entering_scope parameter.  Use it to
11362         avoid finding a template type when an instantiation is required.
11363         Simplify.  Use full template arguments.
11364         (tsubst_friend_function): Use unregister_specialization.  Use new
11365         macros.  Use full template arguments.
11366         (tsubst_friend_class): Substitute, using tsubst_template_parms,
11367         into the template parameters before passing them to
11368         redeclare_class_template.
11369         (instantiate_class_template): Simplify.  Use full template
11370         arguments.  Adjust calls to get_class_bindings.  Use
11371         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
11372         (innermost_args): Use new macros.
11373         (tsubst_aggr_type): New function, split out from tsubst.
11374         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
11375         conventions for lookup_template_class.  Refine handling of partial
11376         instantiations.   Remove calls to complete_template_args.
11377         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
11378         and set_mangled_name_for_template_decl.
11379         (tsubst_copy): Use tsubst_aggr_type.
11380         (instantiate_template): Use full template arguments.
11381         (more_specialized): Improve formatting.
11382         (more_specialized_class): Adjust calls to get_class_bindings.
11383         (get_bindings_real): Don't call complete_template_args.
11384         (most_specialized): Don't overwrite input; create a new list.
11385         (most_specialized_class): Use most_general_template.
11386         (regenerate_decl_from_template): Use unregister_specialization.
11387         Use full template arguments.
11388         (instantiate_decl): Use full template arguments.
11389         (set_mangled_name_for_template_decl): New function.
11390         * semantics.c (begin_class_definition): Use
11391         maybe_process_partial_specialization.
11392         (finish_member_class_template): New function.
11393         (finish_template_decl): Likewise.
11394         (finish_template_type): Likewise.
11395         (typeck.c): Don't crash after issuing a compiler_error.
11396         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
11397
11398 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
11399
11400         * typeck2.c (build_functional_cast): Handle default-initialization.
11401
11402         * call.c (build_over_call): Pass 1 to popclass.
11403
11404         * parse.y (direct_notype_declarator): Add precedence declaration
11405         to notype_unqualified_id case.
11406         * Makefile.in (EXPECT): Adjust.
11407
11408         * tree.c (ovl_member): Fix for single function in OVL.
11409
11410 1998-07-27  Dave Brolley  <brolley@cygnus.com>
11411
11412         * c-lex.c (yylex): Fix boundary conditions in character literal and
11413         string literal loops.
11414
11415 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
11416
11417         * decl.c (lookup_name_real): OK, do return the from_obj value
11418         unless got_object depends on template parms.
11419
11420         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
11421
11422         * pt.c (coerce_template_parms): Also complain about local enums.
11423
11424         * cp-tree.h: Add prototype for set_identifier_local_value.
11425         * decl.c (set_identifier_local_value_with_scope): Make static,
11426         prototype.
11427         * search.c (covariant_return_p): Likewise.
11428         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
11429
11430         * call.c (build_method_call): Only pull out the type of a destructor
11431         if it's a template type parm.
11432         * decl.c (lookup_name_real): Never return the from_obj value.
11433
11434 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
11435
11436         * except.c (process_start_catch_block_old): Call start_decl_1 for
11437         catch parm.
11438         * decl.c (start_decl_1): Avoid duplicate error.
11439
11440         * init.c (expand_default_init): Only perform the initialization if
11441         it will do something.
11442
11443 1998-07-23  H.J. Lu  (hjl@gnu.org)
11444
11445         * parse.y (base_class): Check for invalid base class.
11446
11447 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
11448
11449         * decl2.c (import_export_template): Fold in...
11450         (import_export_class): ...to here.  Handle dllimport/export.
11451
11452         * class.c (build_vtable): Pass at_eof to import_export_vtable.
11453         (prepare_fresh_vtable): Likewise.
11454         * decl2.c (import_export_class): Split out...
11455         (finish_prevtable_vardecl): From here.
11456         * class.c (finish_struct_1): Call import_export_class if at_eof.
11457
11458         * decl.c (start_function): #if 0 mysterious code I wrote and have
11459         forgotten why.
11460         * rtti.c (get_tinfo_fn): If this is for a class type, set
11461         DECL_CONTEXT.
11462
11463 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
11464
11465         * inc/exception: Change terminate and unexpected to ().
11466
11467         * parse.y (named_class_head_sans_basetype_defn): A
11468         named_class_head_sans_basetype followed by '{' or ':' is a defn.
11469
11470 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
11471
11472         * tree.c (canonical_type_variant): New fn to handle arrays.
11473         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
11474         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
11475         * method.c (process_overload_item): Use build_overload_value for
11476         arrays.
11477
11478 1998-07-20  Dave Brolley  <brolley@cygnus.com>
11479
11480         * lex.c (mbchar.h): #include it.
11481         (GET_ENVIRONMENT): New macro.
11482         (init_parse): Set character set based on LANG environment variable.
11483         (real_yylex): Handle multibyte characters in character literals.
11484         (real_yylex): Handle multibyte characters in string literals.
11485
11486 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
11487
11488         * lex.c (do_identifier): Look for class value even if we don't
11489         have a global value.  Do implicit declaration if parsing is 2.
11490         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
11491         lookup.
11492
11493 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
11494
11495         * decl.c (pushtag): Revert previous change.
11496         * pt.c (lookup_template_class): Don't put out debugging
11497         information for types that use template parameters.
11498
11499         * decl.c (pushtag): Don't put out debugging information for
11500         compiler-generated typedefs.
11501
11502         * error.c (dump_type_real): Don't crash when presented with
11503         intQI_type_node or the like.
11504
11505         * semantics.c (finish_translation_unit): Fix spelling error in
11506         comment.
11507
11508 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
11509
11510         * decl.c (lookup_name_real): Pull out single function here.
11511         (select_decl): Not here.
11512         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
11513
11514         * decl.c (qualify_lookup): Tweak again.
11515
11516         * pt.c (lookup_template_class): Don't mess with the context of the
11517         instantiation.
11518         * decl2.c (current_decl_namespace): Remove special handling for
11519         templates.
11520
11521         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
11522         a member template specialization.
11523
11524         * tree.c (ovl_member): Use decls_match to compare functions.
11525         * decl.c (decls_match): Check the context of a function.
11526
11527         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
11528         in Koenig lookup support rules.
11529         * semantics.c (finish_call_expr): Handle the new cases.
11530
11531         * typeck.c (build_x_function_call): Handle overloaded methods.
11532
11533         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
11534
11535 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
11536
11537         * semantics.c (finish_object_call_expr): Revert previous change.
11538         * call.c (build_new_method_call): Likewise.  Instead, convert
11539         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
11540
11541 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
11542
11543         * decl.c (qualify_lookup): Handle templates.
11544
11545         * decl2.c (do_using_directive): Don't pass ancestor.
11546         * decl.c (push_using_directive): Calculate ancestor.
11547
11548         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
11549         * decl.c (pushdecl): Move type shadowing handling from here...
11550         (duplicate_decls): ...to here.
11551         * decl.c (set_identifier_local_value_with_scope): New fn.
11552         (pushdecl): Use it.
11553         (set_identifier_local_value, lookup_type_current_level): New fns.
11554         * decl2.c (do_local_using_decl): Handle types and binding level
11555         stuff properly.
11556
11557         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
11558         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
11559         (lookup_namespace_name): Likewise.
11560         * typeck.c (build_unary_op): Not here anymore.
11561
11562         * decl2.c (do_class_using_decl): Make sure we get an identifier.
11563         * class.c (handle_using_decl): Ignore TYPE_DECLs.
11564
11565         * decl.c (qualify_lookup): New fn.
11566         (lookup_name_real): Use it.
11567
11568 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
11569
11570         * decl2.c (add_using_namespace): When directly using a namespace
11571         that was indirect before, promote it.
11572
11573         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
11574         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
11575         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
11576         * decl.c (select_decl): Replace two flag parameters by one.
11577         (unqualified_namespace_lookup): Likewise, pass flag.
11578         (lookup_flags): New function.
11579         (lookup_name_real): Compute flags, pass them.
11580         (lookup_namespace_name): Call with zero-flag.
11581         * decl2.c (ambiguous_decl): Add flag parameter, complain only
11582         according to flags.
11583         (lookup_using_namespace, qualified_lookup_using_namespace):
11584         Add flag parameter, pass them through.
11585         * lex.c (do_scoped_id): Call with zero-flag.
11586
11587 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
11588
11589         * typeck.c (convert_for_assignment): Use comptypes.
11590
11591 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
11592
11593         * semantics.c (finish_object_call_expr): Move test for the
11594         function called being a TYPE_DECL to ...
11595         * call.c (build_new_method_call): Here.
11596
11597 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
11598
11599         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
11600         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
11601
11602         * lex.c (looking_for_typename): Don't initialize.
11603
11604         * decl2.c (ambiguous_decl): Clarify error message.
11605
11606         * decl.c (push_using_directive): Iterate over namespaces used
11607         indirectly.
11608
11609 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11610
11611         * decl2.c (add_using_namespace): Iterate over namespaces used
11612         indirectly.
11613
11614         * decl.c (lookup_name_real): Accept namespace aliases as locals.
11615         (cat_namespace_levels): Ignore aliases.
11616         (duplicate_decls): Ignore duplicate aliases.
11617         * decl2.c (do_namespace_alias): Process block level namespace
11618         aliases.  Store alias with pushdecl.  Remove odr errors.
11619         * parse.y (namespace_alias): New non-terminal.
11620         (extdef): Use it.
11621
11622 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
11623
11624         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
11625         Handle TEMPLATE_TYPE_PARM.
11626         (arg_assoc): Rewrite.
11627
11628         * pt.c (complete_template_args): Don't look at the context unless
11629         we have to.
11630
11631         * method.c (build_decl_overload_real): Fix namespace handling.
11632
11633         * typeck.c (build_unary_op): Extract a lone function from an
11634         OVERLOAD.
11635
11636         * call.c (build_scoped_method_call): Handle getting a namespace
11637         for basetype in a destructor call.
11638         (check_dtor_name): Handle enums.
11639
11640         * parse.y (using_directive): New nonterminal.
11641         (extdef, simple_stmt): Use it.
11642
11643 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11644
11645         * decl2.c (add_function): Move error message ...
11646         (arg_assoc_namespace): ... from here.
11647
11648 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
11649
11650         * parse.y (namespace_qualifier): Fix multiple level handling.
11651         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
11652         (arg_assoc): Don't skip the first argument of a function.
11653
11654 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
11655
11656         * search.c (my_tree_cons): Clean up.
11657
11658 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
11659
11660         * call.c (joust): Don't warn about "confusing" conversions to the
11661         same type.
11662
11663 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11664
11665         * class.c (push_nested_class): Complain about namespaces.
11666         * decl.c (start_decl): Enter the object's namespace.
11667         (cp_finish_decl): Leave it.
11668         (grokdeclarator): Likewise.
11669         * decl2.c (check_decl_namespace): New function.
11670         (finish_file): Call it.
11671         * parse.y (complex_direct_notype_declarator): Set complexity
11672         of namespace-qualified ids to -1, enter the namespace.
11673
11674         * method.c (build_template_decl_overload): Expect _DECL as first
11675         parameter.  Put context temporarily into current_namespace.
11676         * pt.c (check_explicit_specialization): Change caller.
11677         (tsubst): Likewise.
11678
11679         * init.c (build_offset_ref): Call mark_used and
11680         convert_from_reference for namespace members.
11681
11682 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11683
11684         * search.c (my_tree_cons): The bitfield is at index 2.
11685
11686 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
11687
11688         * lang-options.h: Format changed to work with new --help support
11689         in gcc/toplev.c
11690
11691 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11692
11693         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
11694         Do Koenig lookup in CALL_EXPR.
11695         (arg_assoc): Handle error_mark.
11696         * lex.c (is_global): New function.
11697         (do_identifier): Expect arguments for Koenig lookup.
11698         * parse.y (primary): Add rules for calls of unqualified function calls.
11699         (do_id): Change call of do_identifier.
11700         * pt.c (finish_stmt_expr): Likewise.
11701         * semantics.c (finish_id_expr): Likewise.
11702         (finish_call_expr): Add integer parameter to indicate
11703         argument-dependent lookup.
11704
11705         * decl.c (struct binding_level): New field using_directives.
11706         (push_using_decl): Not sorry anymore.
11707         (push_using_directive): New function.
11708         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
11709         (unqualified_namespace_lookup): New function, code from ...
11710         (lookup_name_real): ... here.
11711         * decl2.c (lookup_using_namespace): Pass using list instead of
11712         initial scope.
11713         (validate_nonmember_using_decl): New function.
11714         (do_nonmember_using_decl): New function.
11715         (do_toplevel_using_decl): Use them.
11716         (do_local_using_decl): New function.
11717         (do_using_directive): Support block-level directives.
11718         * parse.y (simple_stmt): Support using declarations and
11719         directives.
11720         (namespace_qualifier, namespace_using_decl): New non-terminals.
11721
11722         * xref.c (classname): New function.
11723         (GNU_xref_hier): Change class and base parameters to tree.
11724         * decl.c (xref_baseypes): Change caller.
11725         * friend.c (make_friend_class): Likewise.
11726
11727 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
11728
11729         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
11730         comparison.
11731
11732         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
11733         template template parameter, record its use.
11734         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
11735         its template arguments if exists.
11736
11737         * pt.c (coerce_template_template_parms): New function equivalent
11738         to coerce_template_parms when IS_TMPL_PARM is true.
11739         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
11740         all callers changed.
11741
11742         (coerce_template_parms): Access ARGLIST properly when creating a
11743         new vector.  Only accept implicit TYPE_DECL as valid argument for
11744         a template template parameter when it is a base class of
11745         current_class_type.  Don't display error message when COMPLAIN is
11746         false.
11747
11748 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
11749
11750         * repo.c (get_base_filename): Use file_name_nondirectory.
11751         (open_repo_file): Likewise.
11752         * cp-tree.h (file_name_nondirectory): Add prototype.
11753
11754 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
11755
11756         * friend.c (do_friend): Pull the identifier out of declarator.
11757         Use cp_error and friends.
11758         * decl2.c (qualified_lookup_using_namespace): Fix call to
11759         purpose_member.
11760         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
11761         (grokvardecl): Use DECL_CLASS_SCOPE_P.
11762         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
11763         * class.c (warn_hidden): Fix for OVERLOAD.
11764         From grahams@rcp.co.uk:
11765         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
11766         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
11767
11768 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
11769
11770         * g++.1 (-traditional): Remove duplicated documentation.
11771
11772 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
11773
11774         * method.c (flush_repeats): Add nrepeats parameter.
11775         (issue_nrepeats): Likewise.
11776         (is_back_referenceable_type): New function.  Don't back-reference
11777         TEMPLATE_TYPE_PARMs as well as simple types like integers.
11778         (build_mangled_name_for_type): Likewise.
11779         (build_mangled_name_for_type_with_Gcode): Likewise.
11780         (lasttype): Remove.
11781         (nrepeats): Likewise.
11782         (Nrepeats): Likewise.
11783         (start_squangling): Don't clear the variables removed above.
11784         (end_squangling): Likewise.
11785         (flush_repeats): Tidy.  Use nrepeats parameter rather than
11786         Nrepeats global.
11787         (issue_nrepeats): Likewise, but with nrepeats global.  Use
11788         is_backreferenceable_type.
11789         (build_overload_nested_name): Tidy.  Add comment.  Use
11790         build_mangled_name_for_type.
11791         (build_underscore_int): Comment.
11792         (build_overload_scope_ref): Use build_mangled_name_for_type.
11793         (build_overload_int): Likewise.
11794         (build_template_template_parm_names): Tidy.
11795         (build_template_parm_names): Use build_mangled_name_for_type.
11796         (build_overload_identifier): Add comments.
11797         (build_mangled_name_for_type_with_Gcode): Split out from
11798         build_mangled_name.
11799         (build_mangled_name_for_type): Use it.
11800         (build_mangled_name): Rework to use build_mangled_name_for_type
11801         and to not use global nrepeats/Nrepeats.  Tidy.
11802         (process_modifiers): Tidy.
11803         (check_btype): Use is_backreferenceable_type.  Add comment.
11804         Rename `node' to `type'.
11805         (process_overload_item): Set numeric_output_need_bar here.
11806         Use build_mangled_name_for_type.  Tidy.
11807         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
11808         build_mangled_name_for_type.
11809
11810         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
11811         for TYPE_DECLs.
11812
11813 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
11814
11815         * cp-tree.h (warn_long_long): Define.
11816         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
11817         warning "ANSI C++ does not support `long long'".
11818         * decl2.c (warn_long_long): Define.
11819         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
11820
11821 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
11822
11823         * decl.c (xref_tag): Handle attributes between 'class' and name.
11824         * parse.y (aggr): Likewise.
11825         * semantics.c (finish_class_definition): Likewise.
11826         * Makefile.in (EXPECTED): Adjust.
11827
11828         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
11829         * decl2.c: Define them.
11830         (lang_decode_option): Handle them.
11831         * lang-options.h: Add -foptional-diags.
11832         * class.c (finish_struct): Don't complain about multiple meanings of
11833         name if -fno-optional-diags.
11834         * decl.c (pushdecl_class_level): Likewise.
11835         * lex.c (real_yylex): Check warn_multichar.
11836
11837 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
11838
11839         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
11840
11841         * tree.c (make_binfo): Fix length.
11842
11843 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
11844
11845         * decl2.c (lang_decode_option): Remove warn_template_debugging.
11846         * lang-options.h: Likewise.
11847
11848 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11849
11850         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
11851         (process_start_catch_block): Likewise for variables
11852         `false_label_rtx', `call_rtx' and `return_value_rtx'.
11853
11854 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
11855
11856         * tree.c (build_srcloc): Make sure we allocate this node on the
11857         permanent obstack.
11858
11859 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
11860
11861         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
11862         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
11863         (lang_specific_driver): Only add -lm automatically if need_math is
11864         nonzero.
11865
11866 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
11867
11868         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
11869
11870 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11871
11872         * Makefile.in (EXPR_H): New dependency variable.
11873         (decl2.o): Depend on $(EXPR_H).
11874         (typeck.o): Likewise.
11875         (init.o): Likewise.
11876         (expr.o): Likewise.
11877
11878 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
11879
11880         * decl.c (start_enum): Put local enums on permanent_obstack.
11881
11882 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
11883
11884         * cp-tree.h (c_get_alias_set): Declare.
11885         * decl.c (init_decl_processing): Set lang_get_alias_set.
11886
11887 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
11888
11889         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
11890         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
11891         flag for all function decls which are in the exception table.
11892         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
11893         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
11894         code is emitted for any referenced rtti function.
11895
11896 1998-06-25  Dave Brolley  <brolley@cygnus.com>
11897
11898         * lang-specs.h: Use new | syntax to eliminate
11899         string concatenation.
11900
11901 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
11902
11903         * cp-tree.h (CP_DECL_CONTEXT): New macro.
11904         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
11905         * method.c (build_overload_nested_name): Likewise.
11906         * sig.c (build_signature_pointer_or_reference_type): Don't set
11907         DECL_CONTEXT.
11908
11909 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11910
11911         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
11912         * cp-tree.h (FROB_CONTEXT): New macro.
11913         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
11914         * decl.c (namespace_binding): Replace NULL_TREE with
11915         global_namespace.
11916         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
11917         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
11918         Likewise.
11919         * decl.c (pushtag): Use FROB_CONTEXT.
11920         (pushdecl, make_typename_type, define_function, grokdeclarator):
11921         Likewise.
11922         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
11923         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
11924         Likewise.
11925         * decl2.c (decl_namespace): Return global_namespace if no context.
11926         * method.c (build_overload_nested_name): Expect null as context.
11927         * pt.c (mangle_class_name_for_template): Do nothing for null
11928         contexts.
11929         (lookup_template_class): Allow for null id_context.
11930
11931 1998-06-25  Richard Henderson  <rth@cygnus.com>
11932
11933         * method.c (emit_thunk): Set current_function_is_thunk for the
11934         ASM_OUTPUT_MI_THUNK case as well.
11935
11936 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
11937
11938         * exception.cc (__cplus_type_matcher): Get a match_info pointer
11939         instead of an exception table entry as a parameter.
11940
11941 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
11942
11943         * parse.y (function_try_block): Don't call start_catch_handler.
11944         * except.c (call_eh_info): Remove coerced field from declaration.
11945         (build_eh_type_type_ref): New function to create an address of a
11946         rtti function for the new style exception tables.
11947         (expand_start_catch_block): Split function, this contains the
11948         common part.
11949         (process_start_catch_block_old): New function to perform the rest
11950         of expand_start_catch_block under old style exceptions.
11951         (process_start_catch_block_old): New function to perform the rest
11952         of expand_start_catch_block under new style exceptions.
11953         (expand_end_catch_block): Only pop the false label off the stack under
11954         the old style of exceptions.
11955         * semantics.c (finish_try_block): Don't call start_catch_handler.
11956         * exception.cc (struct cp_eh_info): Add original_value field.
11957         (__cplus_type_matcher): Perform type matching on the original exception
11958         value, and if we have a match, set the current value.
11959         (__cp_push_exception): Set the original exception value.
11960
11961 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
11962
11963         * call.c (joust): Fix confusing conversion warning.
11964
11965         * call.c (build_op_delete_call): Add placement parm.  Check
11966         LOOKUP_SPECULATIVELY.
11967         * cp-tree.h, decl2.c, init.c: Adjust.
11968         * decl.c (finish_function): Use it.
11969
11970         * pt.c (tsubst): Diagnose creating void fields or variables.
11971
11972 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11973
11974         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
11975
11976         * cp-tree.h (check_dtor_name): Add prototype.
11977
11978         * init.c (expand_member_init): Remove unused variables
11979         `ptr_type_node', `parm' and `rval'.
11980
11981         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
11982         in call to fprintf.
11983         (lang_print_xnode): Likewise.
11984
11985         * typeck2.c (enum_name_string): Cast argument to sprintf to long
11986         and use %ld specifier.
11987
11988         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
11989         specifier in call to fprintf.
11990         (GNU_xref_member): Cast argument to sprintf to int.
11991
11992 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
11993
11994         * typeck2.c (pop_init_level): Warn about implicit zero initialization
11995         of struct members.
11996
11997 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11998
11999         * cp-tree.h: Prototype function `check_java_method'.
12000
12001 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
12002
12003         * class.c (finish_struct): Make conflicting use of id a pedwarn.
12004         * decl.c (pushdecl_class_level): Likewise.
12005
12006 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
12007
12008         * pt.c (convert_nontype_argument): Issue an error when presented
12009         with an integer (real) constant that cannot be simplified to an
12010         INT_CST (REAL_CST).
12011
12012         * cp-tree.h (c_get_alias_set): Remove declaration added in
12013         1998-06-13 change that should never have been checked in.
12014
12015 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
12016
12017         * typeck.c (build_binary_op_nodefault): Change % in format strings
12018         to %%.
12019
12020         * decl.c (grokvardecl): Don't build_static_name for decls that
12021         aren't at namespace scope.
12022
12023         * init.c (perform_member_init): Catch default-initialization of
12024         references.
12025
12026 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
12027
12028         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
12029
12030 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
12031
12032         * method.c (hack_identifier): Complain about getting a namespace
12033         or class template.
12034         * typeck.c (decay_conversion): Remove check for namespaces.
12035         * typeck2.c (incomplete_type_error): Likewise.
12036         * parse.y (template_arg): Add PTYPENAME expansion.
12037
12038 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
12039
12040         * decl.c (grokvardecl): Don't build external assembler names for
12041         TYPENAMEs in other namespaces as there is no declarator.
12042         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
12043         info from DECL_CONTEXT if it is NULL.
12044
12045 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
12046
12047         * call.c (check_dtor_name): Split out.
12048         (build_scoped_method_call): Use it.
12049         (build_method_call): Use it.
12050         * init.c (build_offset_ref): Use it.
12051
12052         * typeck.c (build_static_cast): Fix handling of pointers to members.
12053
12054         * decl.c (finish_function): Just return nothing from a constructor.
12055         * typeck.c (c_expand_return): Complain about returning a void
12056         expression from a destructor.
12057
12058 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
12059
12060         * class.c (alter_access): Accept a BINFO explaining how to get
12061         from the entity whose accessed is being altered to the type doing
12062         the altering.
12063         (handle_using_decl): New function containing code split out from ...
12064         (finish_struct_1): Here.
12065
12066         * cp-tree.h (complete_type_or_else): Declare.
12067         * init.c (build_new_1, build_delete): Use it.
12068         * typeck.c (require_complete_type): Use complete_type, rather than
12069         expanding it inline.
12070         (complete_type_or_else): New function.
12071         (build_component_ref): Use it.
12072         (pointer_int_sum): Make sure the type pointed to is complete.
12073         (pointer_diff): Likewise.
12074
12075         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
12076         types.
12077
12078         * search.c (get_matching_virtual): Note that member templates
12079         cannot override virtual functions.
12080
12081 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
12082
12083         * pt.c (check_explicit_specialization): If DECLARATOR turned into
12084         an error_mark_node from lookup_template_function, return the same.
12085         (determine_specialization): Also make sure TEMPLATE_ID isn't an
12086         error_mark_node, before we try to read its operands.
12087         * decl.c (grokdeclarator): If we got an error_mark_node from
12088         check_explicit_specialization, just return it right back.
12089
12090 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
12091
12092         * class.c (instantiate_type): Don't treat template-ids that don't
12093         specify any template arguments as equivalent to ordinary
12094         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
12095         pointer-to-members for member templates.  Tidy slightly.
12096         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
12097         * init.c (build_offset_ref): Handle template-ids like ordinary
12098         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
12099         offset part of the OFFSET_REF.
12100         * typeck.c (build_unary_op): Change check for unknown types to
12101         look for OFFSET_REFs, not SCOPE_REFs.
12102
12103 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
12104
12105         * pt.c (is_member_template_class): New function.
12106         (push_template_decl_real): Use it.
12107
12108 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
12109
12110         * friend.c (do_friend): Add support for nested classes using
12111         member functions of the enclosing class as friends.
12112
12113 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
12114
12115         * call.c (convert_default_arg): Make global, not static.
12116         (convert_arg_for_ellipsis): Split out from ...
12117         (build_over_call): Here.
12118         * cp-tree.h (convert_default_arg); Declare.
12119         (convert_arg_to_ellipsis): Likewise.
12120         (do_member_init): Remove.
12121         * init.c (do_member_init): Remove; this code is dead.
12122         (expand_member_init): Remove much of this code; it is dead.
12123         * typeck.c (convert_arguments): Use convert_default_arg and
12124         convert_arg_for_ellipsis, rather than duplicating here.
12125
12126         * call.c (convert_like): Don't fail silently if
12127         build_user_type_conversion fails.  Always return error_mark_node
12128         for failure.
12129
12130 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
12131
12132         * search.c (covariant_return_p): Complain about ambiguous base.
12133
12134         * typeck.c (build_component_ref): Diagnose ref to nested type.
12135
12136 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
12137
12138         * decl.c (grokparms): Check that INIT isn't an error_mark_node
12139         before giving error about invalid type for default arg.
12140
12141 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
12142
12143         * call.c (build_method_call): Fix thinko.
12144
12145 1998-06-10  Dave Brolley  <brolley@cygnus.com>
12146
12147         * decl2.c (lang_decode_option): New argc/argv interface.
12148         * cp-tree.h (lang_decode_option): New argc/argv interface.
12149         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
12150         specified for cpplib-enabled compilers.
12151         * lex.c (lang_init): Don't check_newline for cpplib.
12152         (init_parse): Don't initialize cpplib here.
12153
12154 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
12155
12156         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
12157         piece before checking DECL_MUTABLE_P.
12158
12159 1998-06-10  John Carr  <jfc@mit.edu>
12160
12161         * tree.c (debug_binfo): Make printf format match arguments.
12162
12163         * error.c (OB_PUTI): Make printf format match arguments.
12164
12165 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
12166
12167         * init.c (perform_member_init): Handle default-initialization.
12168
12169         * except.c (build_throw): Handle throwing NULL.
12170
12171         * typeck.c (build_x_function_call): Use resolve_offset_ref.
12172
12173         * search.c (compute_access): Only strip an anonymous union
12174         for a FIELD_DECL.
12175
12176         * call.c (add_builtin_candidates): Tweak.
12177
12178         * cvt.c (build_expr_type_conversion): Restore code for conversion
12179         from class types.
12180         * decl2.c (delete_sanity): Use it.  Clean up.
12181
12182         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
12183
12184 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
12185
12186         * typeck.c (c_expand_return): Don't warn about void expressions on
12187         return statements in functions returning void.
12188
12189 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
12190
12191         * pt.c (fn_type_unification): Revise documentation.  Tidy.
12192         (type_unification): Likewise.
12193
12194 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
12195
12196         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
12197         expand_end_catch.
12198         * parse.y (function_try_block): Rename expand_start_catch, and delete
12199         expand_end_catch.
12200         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
12201         expand_end_catch.
12202
12203 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
12204
12205         * search.c (lookup_member): New fn.
12206         * class.c (finish_struct_1): Use it.
12207         * decl.c (lookup_name_real): Use it.
12208
12209 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12210
12211         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
12212
12213         * cp-tree.h: Add prototype for `maybe_print_template_context' and
12214         `maybe_make_one_only'.
12215
12216         * decl.c (auto_function): Remove unused variable `decl'.
12217
12218         * decl2.c: Include dwarf2out.h and dwarfout.h.
12219
12220         * lex.c: Remove redundant declarations of `set_float_handler' and
12221         `asm_out_file'.
12222
12223 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
12224
12225         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
12226         time flag.  Call __cp_eh_info instead of __cp_exception_info.
12227         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
12228         (__cp_exception_info): Return offset into cp_eh_info structure to
12229         match what use to be the start of this structure.
12230         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
12231         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
12232         compile time flag.
12233         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
12234         __cp_eh_info instead of __cp_exception_info.
12235
12236 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
12237
12238         * decl.c (cp_finish_decl): Disable inlining of extern inlines
12239         with static variables.
12240
12241 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
12242
12243         * init.c (build_offset_ref): Correct previous change to use build,
12244         not build_min.
12245
12246 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
12247
12248         * class.c (instantiate_type): Handle pointer-to-members where the
12249         member is a template.
12250         * init.c (build_offset_ref): Likewise.
12251         * typeck.c (build_unary_op): Likewise.
12252
12253 1998-06-07  Richard Henderson  <rth@cygnus.com>
12254
12255         * lex.c (lang_init_options): New function.
12256         (lang_init): Remove flag_exceptions == 2 hack.
12257
12258 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
12259
12260         * search.c (envelope_add_decl): Tweak for implicit typename.
12261
12262         * call.c (joust): Also warn about confusing conversion op/constructor
12263         overload resolution.
12264
12265         * spew.c (yylex): Also return the TYPE_DECL if got_object.
12266         Don't clear got_object after '~'.
12267         * call.c (build_scoped_method_call): Tweak destructor handling.
12268         (build_method_call): Likewise.
12269         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
12270         TYPE_MAIN_VARIANT for destructors.
12271         * semantics.c (finish_object_call_expr): Complain about calling a
12272         TYPE_DECL.
12273
12274 1998-06-05  Per Bothner  <bothner@cygnus.com>
12275
12276         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
12277         Define - update needed by gcc.c change.
12278
12279 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
12280
12281         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
12282
12283 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12284
12285         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
12286         * decl.c (lookup_name_real): Add namespaces_only parameter.
12287         If set, return only NAMESPACE_DECLs.
12288         (select_decl): Likewise.
12289         (identifier_type_value): Give additional parameter.
12290         (lookup_name_nonclass): Likewise.
12291         (lookup_name): Likewise.
12292         (find_binding): Skip namespace aliases.
12293         (binding_for_name): Likewise.
12294         (push_namespace): Check for namespace aliases.
12295         (lookup_name_namespace_only): New function.
12296         (begin_only_namespace_names, end_only_namespace_names): New functions.
12297         * decl2.c (set_decl_namespace): Skip namespace aliases.
12298         (do_using_directive): Likewise.
12299         (do_namespace_alias): Produce namespace aliases, fix alias
12300         redeclaration.
12301         * error.c (dump_decl): Support SCOPE_REF.
12302         * parse.y (extdef): Wrap lookup with namespace_only for namespace
12303         aliases and using declarations.
12304
12305 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
12306
12307         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
12308
12309         * error.c (dump_expr): Clean up NEW_EXPR case.
12310
12311 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12312
12313         Suggested by Brendan Kehoe
12314         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
12315         treat it as using ::decl.
12316
12317         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
12318
12319         * tree.c (mapcar): Support NEW_EXPR.
12320
12321         * error.c (dump_expr): Support NEW_EXPR.
12322
12323 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
12324
12325         * method.c (make_thunk): Use overload machinery to make name.
12326         * search.c (covariant_return_p): New fn.
12327         (get_matching_virtual): Use it.
12328
12329         * init.c (build_new_1): Fix check for void.
12330
12331 1998-06-01  Per Bothner  <bothner@cygnus.com>
12332
12333         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
12334         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
12335         java_int_type_node, java_long_type_node, java_float_type_node,
12336         java_double_type_node, java_char_type_node, java_boolean_type_node):
12337         New "primitive" types, with predefined names __java_byte etc.
12338         (record_builtin_java_type):  New function.
12339         (init_decl_processing):  Make Java types with record_builtin_java_type.
12340         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
12341         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
12342         (grokfndecl):  Call check_java_method for Java classes.
12343         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
12344         (process_overload_item):  Match types against specific
12345         java_XX_type_node types, rather than using is_java_type.
12346         * class.c (finish_struct_1):  Don't add default copy constructor
12347         or operator= if TYPE_FOR_JAVA.
12348         (pop_lang_conext):  Restore strict_prototyp proper if Java.
12349         * decl2.c (acceptable_java_type, check_java_method):  New functions.
12350         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
12351         (tsubst):  Move common statement after if statement.
12352         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
12353
12354 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
12355
12356         * pt.c (for_each_template_parm): Use first_rtl_op.
12357
12358         * tree.c (build_cplus_array_type_1): Also check index_type for
12359         template parms.
12360
12361 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
12362
12363         * pt.c (tsubst): Always copy BINFO_BASETYPES.
12364
12365 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
12366
12367         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
12368         TYPE_SIZE_UNIT too.
12369
12370 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
12371
12372         * decl.c (grokdeclarator): Don't complain about in-class
12373         initialization of static consts if we don't really know the type
12374         of the variable.
12375
12376 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
12377
12378         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
12379         * method.c (build_destructor_name): New fn.
12380         * decl2.c (maybe_retrofit_in_chrg): Split out...
12381         (grokclassfn): From here.  Reorganize.
12382         * decl.c (grok_ctor_properties): Make sure ctors for types with
12383         vbases have the in_chrg parm.
12384         * pt.c (instantiate_class_template): Update
12385         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
12386         grok_*_properties.
12387         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
12388
12389 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
12390
12391         * pt.c (instantiate_decl): Make test for whether or not static
12392         variables should be instantiated early match its comment.
12393
12394 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
12395
12396         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
12397         a member.
12398         (start_function): Call check_default_args.
12399         * decl2.c (grokfield): Don't call check_default_args.
12400         (check_default_args): Use cp_error_at.
12401         * lex.c (do_pending_defargs): Call check_default_args.
12402
12403 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
12404
12405         * call.c (build_method_call): Make sure get_type_value returns
12406         something before we try to use its TYPE_MAIN_VARIANT.
12407         (build_scoped_method_call): Likewise.
12408
12409 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
12410
12411         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
12412         initialize an array.
12413
12414         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
12415         DECL_VIRTUAL_P.
12416
12417         * friend.c (do_friend): Clarify template warning.
12418
12419 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
12420
12421         * decl.c (shadow_label): Don't treat decls as identifiers.
12422         (maybe_push_to_top_level): Clear shadowed_labels.
12423
12424         * pt.c (instantiate_decl): Reset lineno and filename after calling
12425         regenerate_decl_from_template.
12426
12427         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
12428         error_mark_node.
12429
12430 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
12431
12432         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
12433
12434 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12435
12436         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
12437         (convert_nontype_argument): Handle cases when nontype template
12438         parameters become classes after substitution.
12439
12440 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
12441
12442         * friend.c (is_friend): Use comptypes, rather than == to compare
12443         types.  Modify for new representation of template friends.
12444         (make_friend_class): Likewise.
12445         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
12446         (instantiate_class_template): Deal with template friends.
12447
12448         * decl.c (store_parm_decls): Remove redundant call to
12449         expand_main_function.
12450
12451 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
12452
12453         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
12454         DECL_USE_TEMPLATE.
12455
12456 1998-05-26  Per Bothner  <bothner@cygnus.com>
12457
12458         * language_as_string:  Handle lang_java.
12459
12460 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
12461
12462         * decl.c (pushdecl): Don't copy the type_decl.
12463
12464 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12465
12466         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
12467         current_class_type.
12468         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
12469
12470         * parse.y (complex_direct_notype_declarator): Use $1 to access
12471         scope of notype_qualified_id.
12472
12473 1998-05-26  Dave Brolley  <brolley@cygnus.com>
12474
12475         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
12476         (init_parse): Initialize cpplib interface.
12477
12478         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
12479         empty continuation.
12480
12481 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
12482
12483         * decl.c (pushtag): Avoid crashing on erroneous input.
12484
12485 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12486
12487         * decl.c (push_namespace): Only produce one unique name for
12488         anonymous namespaces.
12489         (get_unique_name): Remove.
12490
12491 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
12492
12493         * call.c (tourney): Don't do any extra comparisons.
12494
12495         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
12496
12497         * cp-tree.h (processing_template_parmlist): Declare.
12498         * decl.c (pushtag): Don't call push_template_decl when we
12499         shouldn't.
12500         * pt.c (processing_template_parmlist): New variable.
12501         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
12502         (complete_template_args): Use it.
12503         (add_to_template_args): Likewise.
12504         (innermost_args): Likewise.
12505         (tsubst): Likewise.
12506         (begin_template_parm_list): Use processing_template_parmlist.
12507         (end_template_parm_list): Likewise.
12508
12509         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
12510         * decl.c (grokdeclarator): Use it.
12511         * decl2.c (grok_x_components): Likewise.
12512         * init.c (initializing_context): Likewise.
12513         * method.c (do_build_copy_constructor): Likewise.
12514         (do_build_assign_ref): Likewise.
12515         * search.c (compute_access): Likewise.
12516         * typeck.c (build_component_ref): Likewise.
12517
12518         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
12519         unnamed type a typedef name "for linkage purposes".
12520
12521         * pt.c (lookup_template_class): Don't look at
12522         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
12523
12524         * method.c (build_overload_int): Handle error cases gracefully.
12525
12526         * pt.c (instantiate_decl): Handle static member variables
12527         correctly.
12528
12529         * pt.c (tsubst): Use the tsubst'd type when producing new
12530         TEMPLATE_PARM_INDEX nodes.
12531
12532 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
12533
12534         * tree.c (cp_tree_equal): Handle pointers to member functions.
12535
12536         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
12537         sure the type of the REF_BIND is a reference type.
12538         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
12539         target_type for clarity.
12540
12541         * parse.y (xcond): Move call to condition_conversion ...
12542         * semantics.c (finish_for_cond): Here.
12543         * parse.c: Regenerated.
12544
12545 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
12546
12547         * decl.c (push_namespace): Namespaces have type void.
12548         * typeck2.c (incomplete_type_error): Complain about namespace
12549         used as expression.
12550         * typeck.c (decay_conversion): Likewise.
12551
12552 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12553
12554         * error.c (dump_expr): Support namespaces.
12555
12556 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
12557
12558         * cp-tree.def: Add SRCLOC.
12559         * cp-tree.h: Add struct tree_srcloc and accessor macros.
12560         * tree.c (build_srcloc, build_srcloc_here): New fns.
12561         * pt.c (add_pending_template): Use build_srcloc_here.
12562         (push_tinst_level): Update last_template_error_tick before erroring.
12563         (instantiate_decl): Restore lineno and input_filename before
12564         calling add_pending_template.
12565         * decl2.c (finish_file): Set up lineno and input_filename for
12566         pending templates.
12567
12568 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
12569
12570         * decl.c (lang_print_error_function): New fn.
12571         (init_decl_processing): Set print_error_function to use it.
12572         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
12573
12574         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
12575         ICS_BAD_FLAG.
12576
12577         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
12578         copy-initialization.
12579
12580         * class.c (build_vtable_entry): Use int_fits_type_p.
12581         (build_vtable): Pass a signed offset to build_vtable_entry.
12582         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
12583         set_rtti_entry): Likewise.
12584
12585 1998-05-22  Per Bothner  <bothner@cygnus.com>
12586
12587         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
12588         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
12589
12590 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
12591
12592         * pt.c (print_template_context): Use fprintf instead of cp_error.
12593
12594         * pt.c (determine_specialization): Just return an error_mark_node.
12595         Also print the decl we want in error messages.  If we complain,
12596         return error_mark_node.
12597         (tsubst_friend_function): Set lineno and input_filename so
12598         error messages will be useful.
12599         (instantiate_template): Just return an error_mark_node.
12600         (check_explicit_specialization): Don't mess with a returned
12601         error_mark_node.
12602
12603         * pt.c (print_template_context): Add new argument.
12604         (maybe_print_template_context): New fn.
12605         (push_tinst_level): Increment tinst_level_tick.
12606         (pop_tinst_level): Likewise.
12607         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
12608         xrealloc instead of xmalloc.
12609
12610         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
12611
12612 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
12613
12614         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
12615         if the template we looked up is the same as the one we already
12616         have.
12617
12618 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
12619
12620         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
12621         (cpp_reader,parse_in): Add for cpplib.
12622         (check_newline): Call handle_sysv_pragma with new interface.
12623         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
12624
12625         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
12626         (sub_getch): Call GETC for cpplib.
12627
12628         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
12629         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
12630
12631         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
12632
12633 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
12634
12635         * decl2.c (maybe_make_one_only): New fn.
12636         (import_export_vtable): Use it.
12637         (import_export_decl): Likewise.
12638         * pt.c (mark_decl_instantiated): Likewise.
12639
12640 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
12641
12642         * decl2.c (find_representative_member): Rename to ...
12643         (build_anon_union_vars): New function.
12644         (finish_anon_union): Fix stupidity of previous change.
12645
12646 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
12647
12648         * decl.c (grokfndecl): Handle definition of specialization in
12649         friend declaration.
12650
12651         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
12652
12653 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
12654
12655         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
12656         to look for type declarations.
12657         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
12658         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
12659         (finish_member_class_template): Declare.
12660         * decl.c (pushtag): Put member class templates on the
12661         CLASSTYPE_TAGS list, just as for ordinary member classes.
12662         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
12663         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
12664         IDENTIFIER_NAMESPACE_VALUEs.
12665         * parse.y (component_decl): Move code to ...
12666         * semantics.c (finish_member_class_template): New function.
12667         Don't put member class templates on the list of components for a
12668         class.
12669         * parse.c: Regenerated.
12670         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
12671         In fact, don't use DECL_CONTEXT at all here.
12672
12673 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12674
12675         * decl.c (record_unknown_type): New function.
12676         (init_decl_processing): Call it for the unknown and global type
12677         nodes.
12678
12679 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
12680
12681         * decl2.c (find_representative_member): New function.
12682         (finish_anon_union): Use it.
12683
12684         * cp-tree.h (MAIN_NAME_P): New macro.
12685         (DECL_MAIN_P): Likwise.
12686         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
12687         (grokfndecl): Use the new macros.
12688         (grokdeclarator): Likewise.
12689         (start_function): Likewise.
12690         (store_parm_decls): Likewise.
12691         (finsh_function): Likewise.
12692         * friend.c (do_friend): Likewise.
12693         * typeck.c (build_function_call_real): Likewise.
12694         (build_unary_op): Likewise.
12695
12696 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
12697
12698         * decl2.c (start_objects, finish_objects, do_dtors,
12699         do_ctors): Split out from...
12700         (finish_file): ...here.
12701
12702 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
12703
12704         * tree.c (is_overloaded_fn): Don't abort on placeholders from
12705         push_class_decls.
12706
12707 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
12708
12709         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
12710
12711         * error.c (dump_expr): Handle an ARROW_EXPR.
12712
12713 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
12714
12715         * decl.c (saveable_obstack): Declare.
12716         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
12717         declare, if necessary.
12718
12719 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
12720
12721         * call.c (compare_qual): Remove.
12722         (is_subseq): Tweak.
12723         (is_properly_derived_from): New function.
12724         (maybe_handle_ref_bind): Likewise.
12725         (maybe_handle_implicit_object): Likewise.
12726         (compare_ics): Modify substantially to bring into conformance with
12727         the standard.
12728         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
12729         (comp_cv_qualification): Declare.
12730         (comp_cv_qual_signature): Likewise.
12731         * typeck.c (comp_cv_qualification): Likewise.
12732         (comp_cv_qual_signature): Likewise.
12733
12734 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12735
12736         * Makefile.in (parse.o): Depend on toplev.h.
12737
12738         * class.c (typecode_p): Remove prototype and definition.
12739
12740         * cp-tree.h (currently_open_class, is_empty_class, member_p):
12741         Add prototype.
12742
12743         * decl.c (push_overloaded_decl_top_level): Remove prototype and
12744         definition.
12745
12746         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
12747         in call to `cp_thing'.
12748         (cp_warning): Likewise for function pointer `warning'.
12749
12750         * except.c (do_function_call): Remove prototype and definition.
12751         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
12752
12753         * method.c (is_java_type): Add prototype and make it static.
12754
12755         * parse.y: Include toplev.h.
12756
12757         * pt.c (type_unification): Remove unused variable `arg'.
12758         (instantiate_decl): Likewise for `save_ti'.
12759
12760         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
12761
12762 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
12763
12764         * init.c (build_member_call): Handle template_ids.
12765         * parse.y (primary): Add global_scope template_id.
12766
12767 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
12768
12769         * decl2.c (get_sentry): Use end_temporary_allocation.
12770         Don't declare permanent_obstack.
12771
12772 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
12773
12774         * parse.y (.finish_new_placement): New non-terminal.
12775         (unary_expr, new_type_id): Use it.
12776         * parse.c: Regenerated.
12777
12778 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
12779
12780         * pt.c (redeclare_class_template): Say where the original definition
12781         of the template-parameter's default argument appeared.
12782
12783 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
12784
12785         * call.c (build_over_call): Tweak empty class handling.
12786
12787         * decl.c (make_typename_type): Use currently_open_class.
12788
12789         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
12790
12791 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12792
12793         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
12794         for a type unless it is one.
12795
12796         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
12797
12798 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
12799
12800         * Makefile.in (program_transform_name, objdir): Define.
12801
12802         * Makefile.in (BISON): Use bison from the build tree if it exists.
12803         (FLEX): Likewise.
12804
12805 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12806
12807         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
12808
12809         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
12810
12811 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
12812
12813         * call.c (build_scoped_method_call): Likewise.
12814
12815 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
12816
12817         * init.c (build_new_1): Call suspend_momentary around the creation
12818         of values that must be saved for exception handling.
12819         * parse.y (.build_new_placement): New non-terminal.
12820         (unary_expr, new_placement): Use it.
12821         * parse.c: Regenerated.
12822
12823 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
12824
12825         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
12826         old and new types.
12827
12828         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
12829         canonical type.
12830
12831         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
12832
12833 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
12834
12835         * decl.c (start_decl): Revert problem change.
12836
12837         * Makefile.in (CONFLICTS): Fix.
12838
12839 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12840
12841         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
12842
12843 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
12844
12845         * class.c (finish_struct_1): Use BINFO_SIZE.
12846
12847         * decl.c (start_decl): Use 'tem'.
12848
12849 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
12850
12851         * exception.cc: Include eh-common.h.
12852         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
12853         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
12854         (__cp_push_exception): Initialize eh_info struct as well.
12855         * except.c: Remove local structs and include eh-common.h.
12856         (init_exception_processing): Set language and version codes.
12857         (call_eh_info): Add presence of eh_info to runtime description of
12858         struct cp_eh_info.
12859         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
12860         * semantics.c (finish_try_block): Call start_catch_block() and
12861         end_catch_block().
12862         * parse.y (function_try_block): Call start_catch_block() and
12863         end_catch_block().
12864
12865 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
12866
12867         * typeck.c (original_type): New function.
12868         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
12869         to see if they're actually the same.
12870         * cp-tree.h (original_type): Declare.
12871
12872 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12873
12874         * Makefile.in (lex.o): Depend on output.h.
12875
12876         * call.c (add_function_candidate): Remove unused variable `cand'.
12877         (add_conv_candidate): Likewise.
12878         (build_builtin_candidate): Likewise.
12879
12880         * cp-tree.h: Add prototype for `types_overlap_p'.
12881
12882         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
12883
12884         * decl2.c (merge_functions): Remove unused variables `tmp' and
12885         `tempn'.
12886
12887         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
12888         (code_as_string): Likewise.
12889         (language_as_string): Likewise.
12890         (parm_as_string): Likewise.
12891         (op_as_string): Likewise.
12892         (assop_as_string): Likewise.
12893         (cv_as_string): Likewise.
12894
12895         * lex.c: Include output.h.
12896
12897         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
12898
12899         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
12900         ATTRIBUTE_UNUSED.
12901
12902         * tinfo.cc (__class_type_info::dcast): Change the type of variable
12903         `i' from int to size_t.
12904
12905         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
12906         ATTRIBUTE_UNUSED.
12907
12908 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
12909
12910         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
12911         DECL_NAMESPACE_SCOPE_P.
12912         (lang_decl_name): Likewise.
12913         * pt.c (tsubst_friend_function, tsubst): Likewise.
12914         * decl.c (pushdecl, redeclaration_error_message, start_decl,
12915         cp_finish_decl, start_function): Likewise.
12916         * class.c (finish_struct_1): Likewise.
12917         * call.c (build_over_call): Likewise.
12918         (compare_ics): Use DERIVED_FROM_P.
12919
12920 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
12921
12922         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
12923         * method.c (build_mangled_name): Use it.
12924         (build_decl_overload_real): Likewise.
12925
12926         * error.c (dump_simple_decl): New function, broken out from ...
12927         (dump_decl): Use it.
12928
12929 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
12930
12931         * ptree.c (lang_print_xnode): Add missing `break'.
12932
12933         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
12934
12935         * call.c (add_template_candidate): Adjust for changes to
12936         fn_type_unification.
12937         (add_template_candidate_real): Likewise.
12938         (add_template_conv_candidate): Likewise.
12939         (build_user_type_conversion_1): Likewise.
12940         (build_new_function_call): Likewise.
12941         (build_object_call): Likewise.
12942         (build_new_op): Likewise.
12943         (build_new_method_call): Likewise.
12944         * class.c (instantiate_type): Likewise.
12945         * cp-tree.h (unification_kind_t): New type.
12946         (fn_type_unification): Adjust prototype.
12947         (type_unificaiton): Likewise.
12948         * pt.c (UNIFY_ALLOW_NONE): New macro.
12949         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
12950         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
12951         (UNIFY_ALLOW_DERIVED): Likewise.
12952         (unify): Change prototype.
12953         (maybe_adjust_types_for_deduction): New function.
12954         (check_cv_quals_for_unify): Likewise.
12955         (determine_specialization): Adjust.
12956         (fn_type_unification): Likewise.
12957         (type_unification): Likewise.
12958         (type_unification_real): Likewise.  Use
12959         maybe_adjust_types_for_deduction.  Fix mishandling of
12960         back-unification of template functions passed as arguments.  Pass
12961         appropriate combination of UNIFY_ALLOW_* to unify.
12962         (unify): Remove unused NTPARMS parameter.  Use
12963         check_cv_quals_for_unify.  Remove bogus code that allowed
12964         too-generous unification in order to adhere more closely to standard.
12965         (get_bindings_real): Adjust.
12966         (get_class_bindings): Likewise.
12967
12968         * method.c (build_overload_identifier): Only use the innermost
12969         template arguments when mangling.
12970         * pt.c (tsubst_template_argument_vector): New function.
12971         (complete_template_args): Deal with the situation where the
12972         extra_args contain more than one level of arguments.
12973         (lookup_template_class): Deal with member template classes, which
12974         may have more than one level of arguments.
12975         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
12976         Improve handling of member template classes.  Use
12977         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
12978         tsubst_template_argument_vector where appropriate.
12979         (regenerate_decl_from_template): Break out from ...
12980         (instantiate_decl): Here.
12981
12982         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
12983         * parse.h: Regenerated.
12984         * parse.c: Really regenerated.
12985
12986         * cp-tree.h (finish_unary_op_expr): New function.
12987         (finish_id_expr): Likewise.
12988         (begin_new_placement): Likewise.
12989         (finish_new_placement): Likewise.
12990         (finish_declarator): Likewise.
12991         (finish_translation_unit): Likewise.
12992         (finish_parmlist): Likewise.
12993         (begin_class_definition): Likewise.
12994         (finish_class_definition): Likewise.
12995         (finish_default_args): Likewise.
12996         (finish_inline_definitions): Likewise.
12997         * parse.y (GCC_ASM_KEYWORD): Remove.
12998         (TYPENAME_ELLIPSIS): Likewise.
12999         * parse.c: Regenerated.
13000         Use new functions in semantics.c in the actions for many rules.
13001         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
13002         * hash.h: Regenerated.
13003         * semantics.c (finish_expr_stmt): Allow NULL expr.
13004         (finish_unary_op_expr): New function, containing
13005         code previously in parse.y.
13006         (finish_id_expr): Likewise.
13007         (begin_new_placement): Likewise.
13008         (finish_new_placement): Likewise.
13009         (finish_declarator): Likewise.
13010         (finish_translation_unit): Likewise.
13011         (finish_parmlist): Likewise.
13012         (begin_class_definition): Likewise.
13013         (finish_class_definition): Likewise.
13014         (finish_default_args): Likewise.
13015         (finish_inline_definitions): Likewise.
13016
13017 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
13018
13019         * typeck.c (build_c_cast): Don't decay arrays and functions to
13020         pointer type when converting to a class type.
13021
13022 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
13023
13024         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
13025         (DECL_CLASS_SCOPE_P): Likewise.
13026
13027 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
13028
13029         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
13030         * decl2.c (constructor_name_full): Likewise.
13031
13032 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
13033
13034         * tree.c (mapcar): Add OVERLOAD support.
13035
13036         * init.c (resolve_offset_ref): We must use basetype_path before we
13037         destroy it with a call to convert_pointer_to.
13038
13039 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
13040
13041         * class.c (currently_open_class): New fn.
13042         * decl.c (lookup_name_real): Use it.
13043         * search.c (lookup_field): Likewise.
13044
13045 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
13046
13047         * cp-tree.def (OVERLOAD): New node.
13048         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
13049         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
13050         (NAMESPACE_BINDING): Remove.
13051         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
13052         namespace_binding.
13053         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
13054         Define.
13055         (tree_overload): New struct.
13056         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
13057         (REAL_IDENTIFIER_TYPE_VALUE): Define.
13058         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
13059         (lang_decl_flags): Remove in_namespace.
13060         (lang_decl): Remove chain.
13061         (DECL_CHAIN, DECL_NAMESPACE): Remove.
13062         (flag_honor_std): Declare extern.
13063         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
13064         namespace_binding, set_namespace_binding,
13065         lookup_function_nonclass, cat_namespace_levels,
13066         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
13067         scratch_ovl_cons, ovl_member, build_overload): Declare.
13068         (decl_list_length, get_namespace_id, current_namespace_id,
13069         overloaded_globals_p): Remove.
13070         (lookup_using_namespace, qualified_lookup_using_namespace): Change
13071         return type.
13072         (push_scratch_obstack): New macro.
13073         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
13074         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
13075         convs, fns.
13076         (build_new_function_call): Iterate using OVL_CHAIN.
13077         Print DECL_NAME in when reporting ambiguities.
13078         (build_object_call): Iterate using OVL_NEXT for fns, convs.
13079         (build_new_op): Call lookup_function_nonclass.
13080         Iterate using OVL_NEXT.
13081         (build_op_delete_call): Change detection of members.
13082         Do not wrap TREE_LIST around fields and single global functions.
13083         (build_over_call): Don't push a class level if the context is a
13084         namespace.
13085         (build_new_method_call): Iterate using OVL_NEXT.
13086         * class.c (add_method): Chain overloaded members using
13087         build_overload.  Remove copying of method.
13088         (grow_method): When iterating through the obstack, expect OVERLOAD
13089         nodes.  Chain overload members.
13090         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
13091         nodes in call to get_baselinks.
13092         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
13093         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
13094         fdecls that are OVERLOAD nodes.
13095         (validate_lhs): New function.
13096         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
13097         code.  Use DECL_NAME in error messages.  Split code between global
13098         and member function processing.
13099         * decl.c (global_type_node): New static variable.
13100         (in_std): New global.
13101         (struct binding_level): New field usings.
13102         (resume_binding_level): Assert that we are not in a class.
13103         (toplevel_bindings_p): Just check for namespace_p or
13104         pseudo_global.
13105         (resume_level): Remove.
13106         (find_binding): New function.
13107         (binding_for_name): Call it.
13108         (namespace_binding, set_namespace_binding): New functions.
13109         (push_namespace): Associate binding level with new namespace,
13110         resume_binding_level for existing namespace.  Remove old code.
13111         Fake std by counting.
13112         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
13113         (maybe_push_to_top_level): Save current namespace.
13114         (pop_from_top_level): Restore saved namespace.
13115         (pop_namespace): Call suspend_binding_level.  Remove old code.
13116         (cat_namespace_levels): New function.
13117         (set_identifier_type_value_with_scope): For namespace bindings,
13118         set BINDING_TYPE, and use global_type_node.
13119         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
13120         (identifier_type_value): New function.
13121         (pushtag): If no context, use current_namespace.
13122         (duplicate_decls): Don't process DECL_CHAIN.
13123         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
13124         already set.  Never reset it to NULL_TREE.  Lookup global variables
13125         in their namespace.  Push overloaded templates if they are on
13126         namespace level.
13127         (pushdecl_namespace_level): New function.
13128         (pushdecl_top_level): Implement using pushdecl_namespace_level.
13129         (pushdecl_using_decl): New function.
13130         (overloaded_globals_p): Remove.
13131         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
13132         them.  Use namespace_binding and set_namespace_value.
13133         (redeclaration_error_message): Complain if the declarations come
13134         from different namespaces.
13135         (lookup_tag): On namespace level, look in the BINDING_TYPE.
13136         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
13137         old code.
13138         (select_decl): New function.
13139         (lookup_name_real): Call it for qualified and unqualified lookup.
13140         Pass tree_bindings from the stack.
13141         If prefer_type is 1, also accept namespaces.
13142         (lookup_function_nonclass): New function.
13143         (init_decl_processing): Set the binding level of the global
13144         namespace to global_binding_level.
13145         Build a proper type list for __builtin_apply.
13146         Initialize std_node to "fake std" if flag_honor_std is set.
13147         Initialize global_type_node.
13148         Allocated bad_alloc in namespace std if flag_honor_std.
13149         (define_function): Set the DECL_CONTEXT to the current_namespace.
13150         (start_decl): A namespace is not considered as a context here.  If
13151         the DECL_CONTEXT is a namespace, push the decl.
13152         (cp_finish_decl): Check for namespaces used as initializers.
13153         (grokfndecl): Add namespace parameter.  Remove processing of
13154         DECL_CHAIN.
13155         (grokvardecl): Add namespace parameter.
13156         (grokdeclarator): Process SCOPEs that are namespaces.  For
13157         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
13158         (start_function): Check for contexts that are namespaces.
13159         Set context for declarations that have not been pushed.
13160         (store_parm_decls): Check for ::main only.
13161         (finish_function): Likewise.
13162         (start_method): Check for contexts that are namespaces.
13163         (start_method): Remove DECL_CHAIN processing.
13164         * decl2.c (flag_honor_std): Declare.
13165         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
13166         (decl_namespace_list): New static global.
13167         (grok_x_components): Ignore namespaces as type contexts.
13168         (check_classfn): Expect OVERLOAD nodes.
13169         (grokfield): Remove DECL_CHAIN processing.
13170         (finish_file): Call cat_namespace_levels.
13171         (merge_functions): New function.
13172         (ambiguous_decl): Rewrite.
13173         (lookup_using_namespace): Produce tree_bindings.
13174         (qualified_lookup_using_namespace): Likewise.
13175         (set_decl_namespace, decl_namespace, current_decl_namespace,
13176         push_decl_namespace, pop_decl_namespace): New functions.
13177         (arg_lookup): New struct.
13178         (add_function, arg_assoc_namespace, arg_assoc_class,
13179         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
13180         New functions.
13181         (get_namespace_id, current_namespace_id): Remove.
13182         (do_toplevel_using_decl): Rewrite.
13183         (do_class_using_decl): Complain about namespace qualifiers.
13184         (do_using_directive): Sorry if not on namespace level.  Complain
13185         about unknown namespaces.
13186         * error.c (dump_aggr_type): Check for namespace contexts.
13187         * except.c (init_exception_processing): Push terminate into std.
13188         * friend.c (is_friend): A namespace is not a context, here.
13189         * init.c (expand_member_init): Remove DECL_CHAIN processing.
13190         (build_offset_ref): Process OVERLOAD nodes.
13191         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
13192         * lex.c (identifier_type): Loop using OVL_CHAIN.
13193         (see_typename): Set looking_for_typename to 2.
13194         (real_yylex): Likewise.
13195         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
13196         (do_scoped_id): Expect OVERLOAD nodes.
13197         Change calling convention for qualified_lookup_using_namespace.
13198         (build_lang_decl): Don't set in_namespace anymore.
13199         * method.c (typevec_size): New global.
13200         (build_overload_nested_name): Return if global_namespace.
13201         Otherwise, always expect a declaration context.
13202         (build_qualified_name): Likewise.
13203         Make sure we don't write beyond typevec_size.
13204         (build_decl_overload_real): Likewise.
13205         Allocate one extra slot for the namespace.
13206         (hack_identifier): Mark code dead.
13207         Process OVERLOAD and NAMESPACE_DECL nodes.
13208         * parse.y (program): Pop namespaces until in global namespace.
13209         (extdef): In a using-declaration, don't discard the identifier if
13210         there is no declaration.
13211         (left_curly): Ignore type contexts which are namespaces.
13212         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
13213         used as scope.
13214         * pt.c (template_class_depth): Expect types to be namespaces.
13215         (determine_specialization): Simplify by expecting OVERLOAD nodes.
13216         (push_template_decl): Push into namespace level.
13217         Reset ctx if it is a namespace.
13218         Set DECL_CONTEXT to current_namespace if not set already.
13219         Ignore real contexts that are namespaces.
13220         (mangle_class_name_for_template): Skip global_namespace.
13221         Mangle other namespaces as declarations.
13222         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
13223         (lookup_template_class): Push into namespace of context.
13224         If the context is a namespace, set it to global_namespace.
13225         Use id_context for mangling.
13226         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
13227         (tsubst_friend_function): Ignore namespace contexts.
13228         Push into namespace level.
13229         (tsubst): Handle NAMESPACE_DECL nodes.
13230         Remove DECL_CHAIN processing.
13231         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
13232         * ptree.c (print_lang_identifier): Print bindings.
13233         (lang_print_xnode): Print OVERLOAD nodes.
13234         * rtti.c (init_rtti_processing): Push type_info into std.
13235         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
13236         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
13237         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
13238         lookup_fnfields_here): Likewise.
13239         Process all nodes, instead of going through TREE_CHAIN.
13240         * sig.c (build_signature_pointer_or_reference_type): Set context
13241         to global_namespace.
13242         (build_signature_table_constructor): Expect OVERLOAD nodes.
13243         * spew.c (yylex): Save old setting of looking_for_typename.
13244         * tree.c (decl_list_length): Remove.
13245         (binding_init): New function.
13246         (count_functions): Rewrite.
13247         (is_overloaded_fn): Expect OVERLOAD nodes.
13248         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
13249         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
13250         ovl_member): New functions.
13251         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
13252         (type_unknown_p): Likewise.
13253         (require_instantiated_type): Likewise.
13254         (build_component_ref): Declare code dead.
13255         (build_x_function_call): Create and expect OVERLOAD nodes.
13256         (build_function_call_real): Check for ::main only.
13257         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
13258         (convert_for_assignment): Check for TREE_LIST before accessing
13259         TREE_VALUE.
13260         * decl.c (duplicate_decls): Check for namespace bindings instead
13261         of global bindings.
13262         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
13263         lookup_name_current_level, start_decl, xref_tag,
13264         finish_enum): Likewise.
13265         * init.c (build_offset_ref): Likewise.
13266         * search.c (lookup_field): Likewise.
13267         (lookup_fnfields): Likewise.
13268         (dfs_debug_mark): Likewise.
13269         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
13270         (poplevel_class, pop_from_top_level): Likewise.
13271         * decl2.c (finish_method): Likewise.
13272         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
13273         * decl.c (record_builtin_type): Likewise.
13274         (init_decl_processing, grokfndecl): Likewise.
13275         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
13276         (make_lang_type): Likewise.
13277         * parse.y (make_thunk): Likewise.
13278         * pt.c (tsubst): Likewise.
13279         * tree.c (debug_binfo): Likewise.
13280         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
13281         tinfo2.cc, inc/new.h: Add std qualifications.
13282         * inc/new: Wrap with namespace std if __HONOR_STD.
13283         * inc/typeinfo: Likewise.
13284
13285 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
13286
13287         * call.c (build_user_type_conversion_1): Handle second_conv
13288         properly for templates.
13289
13290 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
13291
13292         * method.c (build_decl_overload_real): Set TREE_USED flag to
13293         zero for build_type_variants nodes as well.
13294
13295 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
13296
13297         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
13298
13299 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
13300
13301         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
13302         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
13303         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
13304         xref.o): Add toplev.h dependencies.
13305
13306 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
13307
13308         * errfn.c (cp_error, cp_warning): Remove declarations for
13309         error and warning respectively.
13310
13311 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13312
13313         * error.c: Convert to using ctype macros defined in system.h.
13314         * method.c: Likewise.
13315         * xref.c: Likewise.
13316         * lex.c: Likewise.  Also remove redundant system header stuff.
13317
13318 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
13319
13320         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
13321         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
13322         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
13323         xref.c: Add include of toplev.h.
13324
13325 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
13326
13327         * tree.c (perm_manip): Also regenerate the RTL of an extern.
13328         (copy_to_permanent): Use end_temporary_allocation.
13329
13330 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
13331
13332         * init.c (expand_vec_init): The initialization of each array
13333         element is a full-expression.
13334
13335 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
13336
13337         * method.c (build_mangled_name): Add a call to build_type_variant
13338         to get the right type.
13339
13340 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
13341
13342         * Makefile.in: Add .SUFFIXES.
13343
13344         * cp-tree.def: Remove NAMESPACE_DECL.
13345
13346 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
13347
13348         * call.c (build_over_call): Do evaluate arg even if it has empty
13349         class type.
13350         * decl.c (start_function): Don't push a member function.
13351
13352 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
13353
13354         * Makefile.in (g++FAQ.info): Put -o option before input file.
13355
13356 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
13357
13358         * gxxint.texi: Add info for squangling codes K and B.
13359
13360 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
13361
13362         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
13363         the expression in templates.
13364         (finish_stmt_expr): Likewise.
13365
13366 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
13367
13368         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
13369
13370 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
13371
13372         * decl.c (maybe_push_to_top_level): Always clear
13373         current_template_parms and processing_template_decl.
13374         (pushtag): Remove check of current_class_type and some comments,
13375         since maybe_push_to_top_level no longer creates confusion.
13376
13377 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
13378
13379         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
13380         (DECL_CLASS_TEMPLATE_P): Likewise.
13381         (DECL_PRIMARY_TEMPLATE): Likewise.
13382         (PRIMARY_TEMPLATE_P): Use it.
13383         (push_template_decl_real): New function.
13384         (redeclare_class_template): Take new template parameters as
13385         input.
13386         (is_specialization_of): New function.
13387         (comp_template_args): Declare.
13388         * decl.c (pushtag): Handle friend template classes.
13389         (xref_tag): Likewise.  Use new calling convention for
13390         redeclare_class_template.
13391         * decl2.c (grok_x_components): Handle friend templates.
13392         * friend.c (is_friend): Use is_specialization_of where
13393         appropriate.  Deal with friend class templates.
13394         (make_friend_class): Let a class template be friends with itself.
13395         * pt.c (comp_template_args): Remove declaration.
13396         (tsubst_friend_class): New function.
13397         (push_template_decl_real): New function.
13398         (push_template_decl): Use it.
13399         (redeclare_class_template): Adjust for new calling convention.
13400         (comp_template_args): Give it external linkage.
13401         (instantiate_class_type): Use tsubst_friend_class to deal
13402         with friend templates.
13403         * typeck.c (comptypes): Use comp_template_args, rather than
13404         expanding it inline.
13405         * parse.y (component_decl): Handle a nested template type
13406         like other component type declarations.
13407
13408         * pt.c (check_explicit_specialization): Handle overloaded
13409         constructors correctly.
13410
13411         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
13412         (lookup_template_class): Use it.
13413
13414 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
13415
13416         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
13417         * cp-tree.h: Add WRAPPER support.
13418         * call.c (add_candidate): Split out from add_*_candidate fns.
13419         (build_over_call): Take the candidate instead of function and args.
13420         Enforce access control here.  Emit overload warnings here.
13421         (add_warning): New fn.
13422         (joust): Add WARN parm.  If not set, call add_warning instead of
13423         printing a warning.  Re-enable some warnings.
13424         (tourney): Pass it.
13425         (convert_like): Adjust.
13426         (build_new_op): Adjust.
13427         (build_new_function_call): Adjust.
13428         (build_user_type_conversion_1): Adjust.
13429         (USER_CONV_FN): Adjust.
13430         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
13431         build_int_wrapper): New fns.
13432
13433 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
13434
13435         * pt.c (unify): Fix typo in previous change.
13436
13437 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
13438
13439         * error.c (dump_type_real): Declare canonical_name.
13440
13441         * typeck.c (comp_target_types): Fix PMFs.
13442
13443 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
13444
13445         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
13446         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
13447         TEMPLATE_DECL.
13448
13449         * pt.c (tsubst): Decrease the template-level of
13450         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
13451         TEMPLATE_PARM_INDEX.
13452         (template_decl_level): New function.
13453         (unify): Make sure to record unifications for template
13454         parameters, even when the parameters exactly match the arguments.
13455         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
13456         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
13457         aren't from the level we're currently working on.
13458
13459 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
13460
13461         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
13462
13463         * decl2.c (check_member_template): Set DECL_IGNORED for member
13464         class templates, too.
13465
13466         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
13467
13468 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13469
13470         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
13471
13472 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
13473
13474         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
13475         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
13476         (init_decl_processing): Handle TI types.
13477         * typeck.c (unsigned_type, signed_type): Handle TI types.
13478
13479 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
13480
13481         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
13482         New local added_libraries.  Increment count when add library to
13483         arglist.
13484
13485 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
13486
13487         * cp-tree.h (type_as_string_real): New function.
13488         * pt.c (mangle_class_name_for_template): Use it.
13489         * error.c (dump_aggr_type): Change prototype.
13490         (dump_type_prefix): Likewise.
13491         (dump_type_suffix): Likewise.
13492         (dump_type_real): Convert from dump_type.  If desired, the
13493         "canonica" name of a typedef, i.e., the name of the underlying
13494         type, can be printed.
13495         (dump_type): Call dump_type_real.
13496
13497 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
13498
13499         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
13500
13501         * typeck.c (comp_target_types): Tweak pedantic case.
13502         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
13503         Return -1 or 1 instead of 1 or 2.
13504         (compparms): Remove STRICT handling.
13505         (convert_for_assignment): Fix handling of pmfs.
13506
13507 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
13508
13509         * typeck.c (comp_target_types): Handle references like pointers.
13510         (comp_target_parms): Note that return code from comp_target_types
13511         can be negative to indicate failure.
13512
13513 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13514
13515         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
13516         which requires a working target compiler to build.
13517
13518 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
13519
13520         * tree.c (avoid_overlap): Add prototype.
13521
13522         * spew.c (num_tokens): Add prototype.
13523         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
13524
13525         * search.c (dfs_check_overlap): Add prototype.
13526         (dfs_no_overlap_yet): Likewise.
13527
13528         * pt.c (original_template): Add prototype.
13529         (inline_needs_template_parms): Likewise.
13530         (push_inline_template_parms_recursive): Likewise.
13531         (retrieve_specialization, register_specialization): Likewise.
13532         (print_candidates, reduce_template_parm_level): Likewise.
13533         (build_template_decl, mark_template_parm): Likewise.
13534         (tsubst_friend_function, get_bindings_real): Likewise.
13535
13536         * method.c (start_squangling): Add prototype.
13537         (end_squangling, check_ktype, issue_ktype): Likewise.
13538         (build_overloaded_scope_ref, check_btype): Likewise.
13539         (build_mangled_template_parm_index): Likewise.
13540
13541         * lex.c (init_cpp_parse): Add prototype.
13542         (handle_cp_pragma, handle_sysv_pragma): Likewise.
13543         (reduce_cmp, token_cmp): Likewise.
13544
13545         * except.c (call_eh_info): Add prototype.
13546         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
13547         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
13548
13549         * decl2.c (is_namespace_ancestor): Add prototype.
13550         (namespace_ancestor, add_using_namespace): Likewise.
13551         (ambiguous_decl): Likewise.
13552
13553         * decl.c (indent): Add prototype.
13554
13555         * call.c (add_template_candidate_real): Add prototype.
13556
13557 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
13558
13559         * decl2.c (build_expr_from_tree): Just return a PMF.
13560
13561 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
13562
13563         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
13564         when doing initializations.
13565
13566         * pt.c (unify): Use comptypes to compare type args.
13567
13568 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
13569
13570         * decl.c (duplicate_decls): Fix check for when it's safe to free
13571         the new decl.
13572
13573         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
13574         to type_as_string.
13575
13576 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
13577
13578         * pt.c (build_template_parm_index): Add prototype.
13579
13580         * search.c (my_tree_cons): Don't clear words outside the
13581         newly allocated node.
13582
13583 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
13584
13585         * lex.c (init_parse): Now returns char* containing the filename.
13586
13587 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
13588                           Jeff Law   <law@cygnus.com>
13589
13590         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
13591         than a pointer.
13592
13593 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13594
13595         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
13596
13597 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13598
13599         * decl.c (duplicate_decls): Don't warn for redundant decls if
13600         friend: let add_friend take care of it.
13601
13602 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
13603
13604         * sig.c (build_signature_pointer_constructor): Don't set
13605         TREE_HAS_CONSTRUCTOR for a signature pointer.
13606         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
13607         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
13608         here, too.
13609         * typeck.c (build_unary_op): Only allow taking the address of a
13610         real constructor.
13611         * typeck2.c (digest_init): Simplify.
13612         (store_init_value): Don't pedwarn about using { } for pmfs.
13613
13614 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
13615
13616         * cp-tree.h (start_decl):  Update prototype.
13617         * decl.c (start_decl):  Like the C version, new parameters
13618         for the attributes.  Call cplus_decl_attributes here,
13619         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
13620         (grokdeclarator):  Pass NULL for new start_decl arguments.
13621         * pt.c (tsubst_expr):  Likewise.
13622         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
13623         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
13624         * lex.c (build_lang_decl): Add lang_name_java.
13625         * class.c (push_lang_context): Add lang_name_java.
13626         * method.c (build_mangled_name): Check for is_java_type.
13627
13628 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13629
13630         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
13631         * call.c (build_scoped_method_call): Check for TREE_CODE for
13632         VOID_TYPE instead of type ==  void_type_node.
13633         (build_method_call): Likewise.
13634         * decl.c (lookup_name_real): Likewise.
13635         (grokdeclarator): Likewise.
13636         (start_decl): Likewise.
13637         (grokparms): Likewise.
13638         (start_function): Likewise.
13639         (finish_function): Likewise.
13640         (start_method): Likewise.
13641
13642 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
13643
13644         * lex.c (finput): New variable.
13645         (init_cpp_parse):  Renamed from init_parse.
13646         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
13647         (finish_parse): New function.
13648         * cp-tree.h (init_lex, init_parse): Remove declarations.
13649
13650 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
13651
13652         * call.c (build_call): Still evaluate the actual argument.
13653         * class.c (is_empty_class): Update for -fnew-abi.
13654
13655         * decl2.c: -fnew-abi implies -fsquangle.
13656
13657         * method.c (do_build_assign_ref): Don't do anything to copy
13658         an empty class.
13659         (do_build_copy_constructor): Likewise.
13660         * call.c (build_over_call): Likewise.
13661
13662 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
13663
13664         * tree.c (avoid_overlap): Return a value.
13665
13666 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
13667
13668         * method.c (check_btype): Add missing argument to xrealloc.
13669         (check_ktype): Likewise.
13670
13671 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
13672
13673         Implement empty base optimization.
13674         * class.c (finish_struct_1): Add vbase fields earlier.  Set
13675         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
13676         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
13677         (types_overlap_p): New fn.
13678         * tree.c (avoid_overlap): New fn.
13679         (build_base_fields): Use it to avoid overlapping empty bases.
13680         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
13681
13682         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
13683
13684         Re-implement allocation of base class subobjects.
13685         * tree.c (unshare_base_binfos): New fn.
13686         (layout_basetypes): Use it.  Now handles offsets of both virtual and
13687         non-virtual bases, after layout_type.
13688         (layout_vbasetypes): Remove.
13689         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
13690         (build_vbase_pointer_fields): Split out from old layout_basetypes.
13691         * class.c (finish_base_struct): Lose offset handling code.
13692         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
13693         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
13694         * cp-tree.h: Adjust.
13695
13696 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
13697
13698         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
13699         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
13700         * class.c (duplicate_tag_error): Likewise.
13701         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
13702         * tree.c (layout_vbasetypes): Update from layout_record, remove
13703         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
13704         (layout_basetypes): Likewise.
13705
13706 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
13707
13708         * class.c, Make sure system.h is included just after config.h.
13709         Delete lingering stdio and errno references too.
13710         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
13711
13712 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
13713
13714         * friend.c (is_friend): Fix access control for local classes.
13715
13716         * class.c (is_empty_class): New fn.
13717         * call.c (build_call): Don't pass empty class objects to a function.
13718
13719 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
13720
13721         * call.c (build_over_call): Do name resolution for default
13722         arguments of function templates in the scope of the templates.
13723
13724 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
13725
13726         * call.c: Include system.h.  Remove includes, declarations and
13727         defines provided by system.h.
13728         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
13729         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
13730         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
13731         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
13732         * typeck2.c, xref.c: Likewise.
13733         * Makefile.in: Dependencies updated as appropriate.
13734         * Make-lang.in: Likewise.
13735
13736 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
13737
13738         * pt.c (fn_type_unification): Allow incomplete unification without
13739         an immediate error message.
13740
13741 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
13742
13743         * tree.c (member_p): New fn.
13744         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
13745         initializing class members.
13746
13747         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
13748         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
13749
13750         * call.c (build_method_call): Handle non-scoped destructors, too.
13751         * pt.c (tsubst_copy): Likewise.
13752
13753         * pt.c (print_template_context): Split out...
13754         (push_tinst_level): ...from here.
13755
13756         * friend.c (is_friend): Don't pass a type to decl_function_context.
13757
13758         * typeck.c (convert_for_initialization): Always hand off
13759         conversions to class type.
13760
13761 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
13762
13763         * friend.c (is_friend): Local classes have the same access as the
13764         enclosing function.
13765
13766 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
13767
13768         * typeck.c (expand_target_expr): Delete dead function.
13769
13770         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
13771
13772         * repo.c (save_string): Delete dead function.
13773
13774         * method.c (thunk_printable_name): Delete dead function.
13775
13776         * lex.c (yynextch): Delete dead function.
13777
13778         * expr.c (tree_extract_aggr_init): #if 0 out.
13779
13780         * except.c (do_unwind): Delete dead function.
13781         (easy_expand_asm): Likewise.
13782
13783         * cvt.c (build_conversion_type_1): Delete dead function.
13784
13785         * cp-tree.h (push_expression_obstack): Declare.
13786
13787         * call.c (source_type): #if 0 out.
13788
13789         * class.c (alter_access): Remove unused label.  Add braces
13790         around empty else clause.
13791
13792         * lex.c (yyprint): Fix argument to printf.
13793
13794 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
13795
13796         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
13797
13798         * pt.c (instantiate_class_template): Make sure template
13799         arguments are permanent.
13800         * init.c (resolve_offset_ref): Don't go looking around in
13801         template types.
13802
13803         * semantics.c: Add routines to handle expressions, and some
13804         declaration processing.
13805         * parse.y: Use them.
13806         (current_class_depth): Move declaration to cp-tree.h.
13807         * parse.c: Regenerated.
13808         * cp-tree.h: Use them.
13809         (current_class_depth): Declare.
13810         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
13811
13812 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
13813
13814         * error.c (dump_decl): Be a bit more explicit with template
13815         type arguments, when verbose.
13816
13817 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
13818
13819         * inc/exception: Reorder closing braces.
13820
13821 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
13822
13823         * pt.c (redeclare_class_template): New function.
13824         * cp_tree.h (redeclare_class_template): Declare it.
13825         * decl.c (xref_tag): Use it.
13826
13827 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
13828
13829         * call.c (build_over_call): Check IS_AGGR_TYPE, not
13830         TYPE_LANG_SPECIFIC.
13831         * typeck.c (convert_arguments): Likewise.
13832
13833         * decl.c (grokdeclarator): Remove const and volatile from type after
13834         setting constp and volatilep.
13835
13836         * class.c (finish_struct_1): Don't warn about bool bitfield larger
13837         than one bit.
13838
13839 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
13840
13841         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
13842
13843 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
13844
13845         * call.c (build_object_call): Complain about ambiguous operator(),
13846         rather that crashing.
13847         (build_new_op): Likewise.
13848         (build_op_delete_call): Likewise.
13849
13850 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
13851
13852         * cvt.c (perform_qualification_conversions): Use comp_target_types
13853         instead of comp_ptr_ttypes.
13854
13855 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
13856
13857         * cp-tree.h (enforce_access): Declare.
13858         * call.c (enforce_access): Make it extern, not static.
13859         * class.c (alter_access): Use enforce_access; modify code for ISO
13860         compliance, rather than ARM rules.
13861
13862 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13863
13864         * cp-tree.h: Fix typo.
13865
13866 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
13867
13868         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
13869         if (aggregate_value_p (type)).
13870
13871         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
13872
13873 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
13874
13875         * tree.c (mapcar): When dealing with a DECL, use it's constant
13876         value, if any.
13877         * pt.c (lookup_template_class): Don't mangle the names of template
13878         classes whose arguments are unknown.
13879
13880         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
13881
13882 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
13883
13884         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
13885
13886 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
13887
13888         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
13889         boolean_type_node to 1.
13890
13891 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
13892
13893         * error.c (dump_expr): Remove unused variable `l'.
13894
13895         * pt.c (for_each_template_parm): New function, created by
13896         converting uses_template_parms.
13897         (tree_fn_t): New typedef.
13898         (uses_template_parms): Use it.
13899         (mark_template_parm): New function.
13900         (push_template_decl): Check that the argument list of a partial
13901         specialization uses all the template parameters.
13902
13903         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
13904         with it; we might want it for debugging.
13905         * cp-tree.h (type_unification): Change interface.
13906         * class.c (finish_struct_1): Skip nested template types, just like
13907         ordinary nested types.
13908         (instantiate_type): Use new interface to type_unification.
13909         * lex.c (init_lex): Add __sz as opname for sizeof.
13910         * method.c (build_overload_scope_ref): New function.
13911         (build_overload_int): Handle complex expressions.  Set
13912         numeric_output_need_bar if necessary.
13913         (build_overload_value): Handle non-PARM_DECL nodes; this
13914         routine is now used by build_overload_int.  Remove some
13915         assignments to numeric_output_need_bar.  Use
13916         build_overload_scope_ref.
13917         (build_qualified_name): Note that some template mangled names end
13918         with digits, and set numeric_output_need_bar appropriately.  Use
13919         build_underscore_int.
13920         * pt.c (unify): Change interface.
13921         (type_unification_real): Likewise.
13922         (determine_specialization): Use new interfaces.
13923         (tsubst): Deal gracefully with situations in which the argument
13924         vector is not fully filled.
13925         (fn_type_unification): Use new interfaces.
13926         (type_unification): Likewise.  Remove NOP_EXPR hack.
13927         (type_unification_real): Likewise.
13928         (unify): Likewise.  Deal with unification of complex expressions.
13929
13930 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
13931
13932         * pt.c (complete_template_args): Initialize skip properly.
13933
13934         * decl.c (make_typename_type): Revert.
13935         (make_implicit_typename): Remove.
13936         (lookup_name_real): Don't call it.  Call lookup_field if we see a
13937         TYPE_DECL from a template base.
13938         * search.c (lookup_field): Do implicit typename stuff.
13939
13940 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
13941                           Geoff Noer    <noer@cygnus.com>
13942
13943         * Makefile.in: Various fixes for building cygwin32 native toolchains.
13944         * Make-lang.in: Likewise.
13945
13946 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13947
13948         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
13949
13950 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
13951
13952         * decl.c (make_implicit_typename): Rewrite removed code.
13953         (make_typename_type): Call it if the type we look up comes from
13954         a base that uses template parms.
13955
13956         * pt.c (complete_template_args): Rewrite.
13957         (tsubst, FUNCTION_DECL): Use it.
13958
13959 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
13960
13961         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
13962         c_expand_asm_operands () if output_operands, input_operands or
13963         clobbers is not NULL_TREE.
13964
13965 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13966
13967         * pt.c (complete_template_args): New function.
13968         (get_bindings): Deal with specializations of function templates
13969         with return type containing parameters from outer class
13970         templates.
13971         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
13972         substitute arguments and compose a new type.
13973
13974 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
13975
13976         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
13977         FUNCTION_DECLs.
13978
13979 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
13980
13981         * decl.c (make_implicit_typename): Lose useless code.
13982
13983         * call.c (standard_conversion): Handle A* -> const A* properly.
13984
13985         * pt.c (get_bindings_real): Rename from get_bindings.  Add
13986         check_rettype parm.
13987         (get_bindings): Pass 1.
13988         (get_bindings_overload): Pass 0.
13989
13990 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
13991
13992         * pt.c (check_explicit_specialization): When reverting a static
13993         member function, also remove the `this' parameter from
13994         last_function_parms.
13995
13996 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
13997
13998         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
13999         a function context.
14000
14001         * decl.c (store_bindings): Use free_binding_vecs.
14002         (pop_from_top_level): Likewise.
14003
14004 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
14005
14006         * decl.c (make_implicit_typename): Only change the type of a
14007         TYPENAME_TYPE.
14008
14009 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
14010
14011         * semantics.c: New file, containing routines to perform the
14012         semantic phase of parsing.
14013         * parse.y: Use it.
14014         * pt.c (tsubst_expr): Likewise.
14015         * cp-tree.h: Declare the various functions in semantics.c.
14016         Provide macros to access _STMT tree nodes.
14017         * cp-tree.def: Add ASM_STMT tree node.
14018         * Makefile.in, Make-lang.in: Add dependencies on and for
14019         semantics.c.
14020
14021 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
14022
14023         * pt.c (push_template_decl): Only check primary templates.
14024
14025         * pt.c (check_explicit_specialization): Complain about default args
14026         in explicit specialization.
14027
14028         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
14029         constructor_declarator.
14030
14031 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
14032
14033         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
14034         has no overloaded operator ->.
14035
14036         * call.c (build_field_call): Don't crash when presented with a
14037         field that is actually a nested type.
14038
14039         * decl.c (pushtag): Deal with friend class injection in local
14040         classes.
14041
14042         * call.c (build_object_call): Don't crash if OBJ is a
14043         pointer-to-member-function.
14044
14045 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
14046
14047         * pt.c (push_template_decl): Complain about template with C linkage,
14048         anonymous template class.
14049
14050 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
14051
14052         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
14053         * search.c: Likewise.
14054
14055         * lex.c (do_pending_defargs): Only call
14056         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
14057
14058         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
14059
14060 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
14061
14062         * parse.y: Deal with CONSTRUCTORS in new_initializers.
14063
14064 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
14065
14066         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
14067         closely mimics the behavior in parse.y.
14068         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
14069         into a compound statement.
14070
14071 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
14072
14073         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
14074         * pt.c (inline_needs_template_parms): New fn.
14075         (original_template): New fn.
14076         (push_inline_template_parms_recursive): New fn.
14077         (maybe_begin_member_template_processing): Use them.
14078         (maybe_end_member_template_processing): Likewise.
14079         (is_member_or_friend_template): Rename to is_member_template.
14080         Member functions of local classes are never member templates.
14081
14082 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14083
14084         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
14085         added in the class scope to catch redefinition error.
14086
14087         * pt.c (reduce_template_parm_level): Also copy
14088         the DECL_TEMPLATE_PARMS field.
14089
14090 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
14091
14092         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
14093         reduced-level template type parameter.
14094
14095 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14096
14097         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
14098         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
14099         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
14100         * decl.c (duplicate_decls): Propagate it.
14101         * typeck2.c (abstract_virtuals_error): Use two loops to emit
14102         abstract virtual functions and virtual functions which need a
14103         final overrider separately.
14104
14105 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14106
14107         * lang-specs.h: Properly put brackets around array elements in
14108         initializer.
14109
14110         * typeck.c (build_binary_op_nodefault): Correctly place parens around
14111         && and || in expression.
14112
14113 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14114
14115         * call.c (default_parm_conversions): Remove prototype definition.
14116         (build_method_call): Remove unused variable result.
14117
14118         * cvt.c (ocp_convert): Remove unused variable conversion.
14119
14120         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
14121
14122         * except.c (do_unwind): #if 0 definition of unused variables fcall
14123         and next_pc.
14124
14125         * expr.c (extract_scalar_init): #if 0 prototype and function
14126         definition.
14127
14128         * init.c (expand_aggr_init_1): Remove unused variable init_type.
14129         (build_new_1): Remove unused variable t.
14130
14131         * pt.c (instantiate_class_template): Remove unused variable newtag;
14132         cast called function return value to void.
14133         (do_decl_instantiation): Remove unused variables name and fn.
14134
14135         * tree.c (get_type_decl): Add default return to shut up compiler from
14136         complaining control reaches end of non-void function.
14137
14138         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
14139
14140 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14141
14142         * call.c (default_parm_conversions): Remove prototype definition.
14143         (build_method_call): Remove unused variable result.
14144         (build_over_call): Add default case in enumeration switch.
14145
14146 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14147
14148         * decl2.c (lang_decode_option): Change j's type to size_t.
14149
14150         * tree.c (layout_vbasetypes): record_align and desired_align are of
14151         type unsigned int; const_size and nonvirtual_const_size likewise.
14152
14153 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
14154
14155         * parse.y (new_initializer): Make sure all initializers are
14156         lists.
14157
14158 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
14159
14160         * decl2.c (import_export_decl): Mark tinfo functions for
14161         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
14162
14163 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
14164
14165         * method.c: Fix typo.
14166
14167 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14168
14169         * method.c: Include "system.h" to get stdlib.h, stdio.h,
14170         ctype.h, string.h, etc.
14171         (issue_nrepeats): Add default case in enumeration switch.
14172         (check_btype): Likewise.
14173         (process_overload_item): Likewise.
14174
14175         * Makefile.in (method.o): Depend on system.h.
14176
14177 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14178
14179         * lex.c (do_scoped_id): Fix parenthesizing.
14180
14181 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
14182
14183         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
14184         FLAG_RTTI is unset, initialize type info machinery and continue
14185         with FLAG_RTTI enabled.
14186         (get_typeid): Likewise.
14187
14188 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
14189
14190         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
14191         from B.
14192
14193 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
14194
14195         * pt.c (finish_member_template_decl): Deal more gracefully with
14196         invalid declarations.
14197
14198 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
14199
14200         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
14201         cp-tree.h: Clean up more old overloading code, old RTTI code, and
14202         some formatting quirks.
14203
14204         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
14205         method.c, pt.c, ptree.c, typeck.c: Remove support for
14206         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
14207         * class.h: Remove.
14208         * Makefile.in: Adjust.
14209
14210         * pt.c (unify): Don't allow reduced cv-quals when strict.
14211
14212         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
14213         *type_unification* and unify.
14214
14215 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
14216
14217         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
14218         (nested_name_specifier): And add it before this use.
14219         (typename_sub0): And this use.  Also add use without the keyword.
14220         (typename_sub1): Likewise.
14221         * pt.c (instantiate_class_template): Don't actually instantiate
14222         anything if our type uses template parms.
14223
14224 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
14225
14226         * decl.c (start_function): Don't call temporary_allocation for a
14227         nested function.
14228
14229 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
14230
14231         * pt.c (instantiate_class_template): Don't mess with friends if
14232         our type uses template parms.
14233
14234 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
14235
14236         * parse.y (nested_name_specifier): Use explicit_template_type.
14237         (typename_sub): Allow a template_type, an explicit_template_type,
14238         or an implicit template type at the end.
14239         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
14240         * decl.c (make_typename_type): Handle template-id where the name
14241         is a TEMPLATE_DECL.
14242         * call.c (build_scoped_method_call): Handle member template
14243         destructor call.
14244         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
14245         destructor is represented by the type.
14246
14247         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
14248         * parse.y (nested_name_specifier): Add 'template' case.
14249         (explicit_template_type): New rule.
14250         (typename_sub): Use it.
14251         * decl.c (make_typename_type): Handle getting a template-id for NAME.
14252         * pt.c (tsubst): Likewise.
14253
14254 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
14255
14256         * pt.c (add_to_template_args): Fix thinko.
14257         (instantiate_class_template): Call it later.
14258
14259         * pt.c (get_class_bindings): Add outer_args parm.
14260         (most_specialized_class): Likewise.
14261         (instantiate_class_template): Pass it.
14262         (more_specialized_class): Likewise.
14263         (lookup_template_class): Get context from template if none
14264         was specified.
14265         (finish_member_template_decl): Don't do anything with a
14266         partial specialization.
14267         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
14268         AGGREGATE_TYPE_P.
14269         * class.c (finish_struct): Member class templates have already been
14270         checked for name clashes.
14271         * decl.c (pushdecl_with_scope): Handle pushing at class level.
14272
14273 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
14274
14275         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
14276         (tsubst, *_PARM): Support multiple levels of template classes.
14277         (instantiate_class_template): Look up the pattern from the
14278         original template.
14279         (lookup_template_class): Handle getting a template for d1.
14280         (push_template_decl): Correct setting of 'primary'.
14281         (reduce_template_parm_level): Add 'levels' parm.
14282         (finish_member_template_decl): Support member class templates.
14283         (template_class_depth): Handle multiple levels.
14284         * parse.y (component_decl_1, fn.def2): Remove member template case.
14285         (component_decl): Add member template cases.
14286         * decl2.c (check_member_template): We now handle member template
14287         classes.
14288         * decl.c (pushtag): Handle member templates.
14289         * method.c (do_inline_function_hair): Don't touch
14290         IDENTIFIER_GLOBAL_VALUE.
14291         * init.c (build_offset_ref): If name isn't an identifier, just
14292         return it.
14293         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
14294
14295         * typeck.c (get_delta_difference): Do adjust for conversions to
14296         and from virtual base.
14297
14298 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
14299
14300         * typeck.c (get_delta_difference): Give hard error for conversion
14301         from virtual base.
14302
14303         * cp-tree.h: Tweak formatting.
14304
14305 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
14306
14307         * decl.c (push_namespace): Handle redeclaration error.
14308
14309         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
14310         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
14311         (NAMESPACE_BINDING): New macro.
14312         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
14313         * *.c: Use them.
14314
14315         * pt.c (push_template_decl): Use innermost_args.
14316
14317         * decl.c (get_unique_name): Tweak from earlier in the name.
14318
14319 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
14320
14321         * cp-tree.def: Add CPLUS_BINDING node.
14322         * cp-tree.h (tree_binding): New struct.
14323         (BINDING_SCOPE, BINDING_VALUE): New macros.
14324         (current_namespace, global_namespace): Declare extern.
14325         (struct lang_decl_flags): New field in_namespace.
14326         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
14327         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
14328         (TREE_INDIRECT_USING): New macro.
14329         * decl2.c (current_namespace, global_namespace): Declare.  The
14330         value is a NAMESPACE_DECL now, not a TREE_LIST.
14331         (is_namespace_ancestor, namespace_ancestor): New static functions.
14332         (add_using_namespace, ambiguous_decl): Likewise.
14333         (lookup_using_namespace): New support function for lookup_name.
14334         (qualified_lookup_using_namespace): New support function for
14335         do_scoped_id and lookup_namespace_name.
14336         (get_namespace_id): Mark as obsolete.
14337         (current_namespace_id): Likewise.
14338         (do_namespace_alias): Implement.
14339         (do_using_directive): Implement as call to add_using_namespace.
14340         * decl.c (binding_for_name): New function.
14341         (push_namespace, pop_namespace): Implement.
14342         (push_decl): Don't install a FUNCTION_DECL in the global branch.
14343         (lookup_namespace_name): Implement using qualified lookup.
14344         (lookup_name_real): For global scoping, lookup in
14345         global_namespace.  For namespace scoping, lookup in given
14346         namespace.  For unscoped lookup, iterate over namespace,
14347         considering using directives.
14348         (init_decl_processing): Initialize global_namespace.
14349         (grokvardecl): Build assembler name as static name for globals.
14350         (grokdeclarator): Remove old namespace mangling.
14351         (xref_tag): When installing a global binding for the
14352         tag, make sure we have an identifier.
14353         * method.c (build_overload_nested_name): Mangle namespaces.
14354         (build_qualified_name): Likewise.
14355         (build_decl_overload_real): Likewise.
14356         * lex.c (build_lang_decl): Set namespace for new declaration to
14357         current_namespace.
14358         (do_scoped_id): Find global names in global or current
14359         namespace, or using qualified namespace lookup, depending on
14360         context.
14361         * init.c (build_member_call): When scope is namespace, use
14362         build_x_function_call instead.
14363         (build_offset_ref): When scope is namespace, collapse processing
14364         to lookup_namespace_name instead.
14365         * error.c (dump_decl): Support NAMESPACE_DECL.
14366         * decl.c (pushdecl): Bind globals to current namespace.
14367         (push_overloaded_decl): Likewise.
14368         (lookup_tag): Likewise.
14369         (lookup_name_current_level): Likewise.
14370         (xref_tag): Likewise.
14371         (start_function): Likewise.
14372         * lex.c (do_identifier): Likewise.
14373         (identifier_typedecl_value): Likewise.
14374         (real_yylex): Likewise.
14375         * method.c (do_inline_function_hair): Likewise.
14376         * parse.y (unscoped): Likewise.
14377         * pt.c (check_explicit_specialization): Likewise.
14378         (lookup_template_class): Likewise.
14379         * rtti.c (call_void_fn): Likewise.
14380         * sig.c (build_sigtable): Likewise.
14381         * ptree.c (lang_print_xnode): New function.
14382
14383 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
14384
14385         * pt.c (instantiate_class_template): Don't instantiate if pedantic
14386         and the args use template parms.
14387
14388         * pt.c (push_tinst_level): If the instantiation uses template parms,
14389         fail silently.
14390         * decl.c (xref_basetypes): Do call complete_type for basetypes
14391         that involve template parameters.
14392
14393 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
14394
14395         * typeck2.c (process_init_constructor): Fix labeled init check.
14396
14397 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
14398
14399         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
14400         argument to tsubst and friends.
14401
14402         * pt.c (tsubst, FUNCTION_DECL): Tidy.
14403
14404         * typeck.c (build_x_function_call): Handle static member function
14405         templates like non-templates.  Handle friend templates like normal
14406         function templates.
14407         * pt.c (tsubst, *_PARM): Don't use orig_level.
14408         (get_bindings): Don't call add_to_template_args.
14409         (instantiate_template): Likewise.
14410         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
14411         * ptree.c (print_lang_type): Print index/level for template parms.
14412
14413 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
14414
14415         * Make-lang.in (cc1plus): Note that cc1plus depends on
14416         cp/cp-tree.h and cp/cp-tree.def.
14417
14418         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
14419         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
14420         position in a template parameter list.
14421         * cp-tree.h (template_parm_index): New structure, used as the tree
14422         structure for a TEMPLATE_PARM_INDEX.
14423         (TEMPLATE_PARM_IDX): New macro.
14424         (TEMPLATE_PARM_LEVEL): Likewise.
14425         (TEMPLATE_PARM_DESCENDANTS): Likewise.
14426         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
14427         (TEMPLATE_PARM_DECL): Likewise.
14428         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
14429         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
14430         (TEMPLATE_TYPE_DECL): Likewise.
14431         (TEMPLATE_CONST_IDX): Remove.
14432         (TEMPLATE_CONST_LEVEL): Likewise.
14433         (TEMPLATE_CONST_SET_INFO): Likewise.
14434         (TEMPLATE_TYPE_SET_INFO): Likewise.
14435         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
14436         node.
14437         (TEMPLATE_TYPE_LEVEL): Likewise.
14438         * decl.c (decls_match): Call comp_template_parms, rather than
14439         expanding it inline.
14440         (duplicate_decls): If two template declarations are being merged,
14441         then their TEMPLATE_INFOs should be merged as well.
14442         (grokfndecl): Save template-id information when declaring a friend
14443         with explicit template arguments.  Pass arguments to
14444         check_explicit_specialization via correct convention; at some
14445         point check_explicit_specialization changed, but these call-sites
14446         did not.
14447         (grokdeclarator): Tidy up slightly.
14448         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
14449         two template functions with the same DECL_ASSEMBLER_NAME the same,
14450         since the names are not yet mangled.
14451         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
14452         TEMPLATE_CONST_PARM.
14453         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
14454         decl for a non-type parameter, rather than printing `<tparm ...>'.
14455         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
14456         (do_friend): Deal with template friends.
14457         * lex.c (do_pending_inlines): Call
14458         maybe_begin_member_template_processing, rather than
14459         conditionally calling begin_member_template_processing.
14460         (process_next_inline): Likewise.  Call
14461         maybe_end_member_template_processing, rather than
14462         conditionally calling end_member_template_processing.
14463         (do_pending_defargs): Likewise.
14464         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
14465         TEMPLATE_CONST_PARM.
14466         * method.c (build_mangled_template_parm_index): New function.
14467         (build_overload_value): Use it.
14468         (build_overload_name): Likewise.
14469         * pt.c (finish_member_template_decl): Allow friend declarations.
14470         (template_class_depth): New function.
14471         (is_member_template): Rename, and modify, to become...
14472         (is_member_or_friend_template): New function.
14473         (end_member_template_processing): Rename, and modify, to become...
14474         (maybe_end_member_template_processing).
14475         (build_template_parm_index): New function.
14476         (reduce_template_parm_level): New function.
14477         (process_template_parm): Modify to use build_template_parm_index.
14478         (push_template_decl): Deal with friend templates.
14479         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
14480         TEMPLATE_CONST_PARM.
14481         (tsubst_friend_function): New function.
14482         (instantiate_class_template): Generate the DECL_FRIENDLIST
14483         for a new instantiation by using tsubst_friend_function rather
14484         than just tsubst.
14485         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
14486         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
14487         appropriate new macros.  Use reduce_template_parm_level to
14488         generate lower-level template parameters.  Handle tsubst'ing into
14489         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
14490         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
14491         templates.  Similarly for the template parameters for a new
14492         template.
14493         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
14494         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
14495         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
14496         (get_bindings): Call add_to_template_args if necessary.
14497         (instantiate_decl): Handle instantiations of friend templates.
14498         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
14499         TEMPLATE_TYPE_PARM as a list of fields; it's not!
14500         * spew.c (yylex): Do a little manual constant propagation to
14501         clarify the code.
14502
14503 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
14504
14505         * error.c: Include sys/types.h.
14506
14507 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
14508
14509         * method.c (build_mangled_name): Start CPP directives in column zero.
14510
14511 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
14512
14513         * typeck2.c (process_init_constructor): Sorry about non-trivial
14514         labeled initializers.
14515         * parse.y (initlist): Re-enable labeled initializers.
14516
14517 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14518
14519         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
14520         all callers changed.  Rely on the new parameter instead of arg
14521         being a TREE_LIST when determine whether we are working inside
14522         template template parameter.  Clean up is_type test.
14523
14524 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
14525
14526         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
14527         * typeck2.c (initializer_constant_valid_p): Allow conversions
14528         between pointers and references.
14529
14530 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
14531
14532         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
14533         if pedantic || warn_pointer_arith.
14534
14535 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14536
14537         * pt.c (unify): Handle TEMPLATE_DECL.
14538
14539 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
14540
14541         * cp-tree.h (strip_attrs): Remove decl.
14542
14543 1998-02-18  Doug Evans  <devans@cygnus.com>
14544
14545         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
14546         Update olddecl's attributes too.
14547         (strip_attrs): Remove function.
14548         * typeck.c (common_type): Call merge_machine_type_attributes.
14549
14550 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
14551
14552         * parse.y (initdcl0_innards): New grammar symbol.
14553         (nomods_initdecls, nomods_initdcl0): Change type from itype to
14554         none, since the resulting value is never used.
14555         (parse_decl): New function.
14556         (datadef): Remove redundant actions.
14557         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
14558         * parse.c: Regenerated.
14559
14560 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
14561
14562         * parse.y (simple_stmt): Use getdecls() to check for decl.
14563
14564 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14565
14566         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
14567         macros.
14568         (c++.install-common): Install c++filt properly as native or as cross
14569         variant.
14570         (c++.uninstall): Add c++filt.
14571
14572 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
14573
14574         * call.c (standard_conversion): Fix multi-level ptr conversions.
14575
14576 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
14577
14578         * init.c (build_new): Propagate error_mark_node up.
14579
14580 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
14581
14582         * parse.y (simple_stmt): If the condition isn't a declaration,
14583         start the controlled block after the test.
14584
14585 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14586
14587         * call.c (build_over_call): Convert builtin abs, labs and fabs to
14588         tree-codes.
14589         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
14590         builtins.
14591
14592 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
14593
14594         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
14595
14596 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
14597
14598         * cp-tree.h: Add access_protected_virtual_node.
14599         * class.c (init_class_processing): Initialize it.
14600         * decl.c (xref_basetypes): Use it.
14601         * parse.y (base_class_access_list): Likewise.
14602
14603         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
14604         (c++.install-common): Install c++filt.
14605
14606 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14607
14608         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
14609
14610 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
14611
14612         * call.c (reference_binding): Use comptypes when comparing
14613         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
14614
14615 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
14616
14617         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
14618         (really_overloaded_fn): Move check here from is_overloaded_fn.
14619         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
14620
14621 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
14622
14623         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
14624         conversions.
14625
14626 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
14627
14628         * cp-tree.h (push_template_decl): Return the decl passed in, or an
14629         equivalent duplicate.
14630         * decl.c (pushtag): Use the return value from push_template_decl.
14631         (duplicate_decls): When duplicating a template declaration, merge
14632         the DECL_TEMPLATE_RESULTs as well.
14633         (make_implicit_typename): Don't try to dive into typename types to
14634         find a context for making a new implicit typename.
14635         (start_decl): Use the return value from push_template_decl.
14636         (grokdeclarator): Complain about declarations list `const operator
14637         int'.  Since we don't correctly handle in-class initializations of
14638         non-static data members, complain about this (now illegal)
14639         practice.  Issue an error for initializations of non-const statics
14640         since that is illegal as well, and since we don't handle that case
14641         correctly either.
14642         (start_function): Use the return value from push_template_decl.
14643         (start_method): Likewise.
14644         * decl2.c (grokfield): Likewise.  Since the change to
14645         grokdeclarator ensures that all initialized fields are in fact
14646         static, remove a redundant test for TREE_PUBLIC.
14647         * parse.y (initlist): Disable labeled initializers since they do
14648         not work as per the documentation, and since they do not use the
14649         same syntax as the C front end.
14650         * pt.c (push_template_decl): Return the decl passed in, or an
14651         equivalent duplicate.
14652         (lookup_template_class): When searching in a nested context,
14653         use the right arguments.
14654         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
14655         * typeck.c (build_component_ref): Assign the correct type to the
14656         result of build_vfn_ref.
14657
14658 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
14659
14660         * pt.c (convert_nontype_argument): Fix typo.
14661         (check_explicit_specialization): Allow old-style specialization
14662         of class template members.
14663
14664 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
14665                           Manfred Hollstein  <manfred@s-direktnet.de>
14666
14667         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
14668         when deciding to override DECL_ASSEMBLER_NAME.
14669
14670 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
14671
14672         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
14673         * cp-tree.h (flag_do_squangling): Add declaration.
14674         * lang-options.h: Add -fsquangle and -fno-squangle.
14675         * method.c: Add macros and static variables for squangling.
14676         (build_overload_name): Rename to build_mangled_name, add logic for B
14677         compression, and split into process_modifiers and
14678         process_overload_item.
14679         (process_modifiers): New function, to handle constant, reference,
14680         and pointer types.
14681         (process_overload_item): New function, handles issue of type codes.
14682         (build_overload_name): New function, start squangling and call
14683         build_mangled_name.
14684         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
14685         (start_squangling): New function to initialize squangling structs.
14686         (end_squangling): New function to destroy squangling structs.
14687         (nrepeats): Rename variable to Nrepeats.
14688         (issue_nrepeats): New function for issuing 'n' type repeats.
14689         (check_ktype): New function to check for type K name compression.
14690         (build_overload_nested_name): Add a check for K name compression.
14691         (build_qualified_name): Add a check for K name compression and don't
14692         use DECL_ASSEMBLER_NAME when squangling is on.
14693         (check_btype): New function, checks for B type compression.
14694         (build_static_name, build_decl_overload_real): Initiate squangling.
14695         (build_typename_overload, build_overload_with_type): Initiate
14696         squangling
14697
14698 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
14699
14700         * method.c (make_thunk): Avoid name buffer overflow.
14701
14702 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
14703
14704         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
14705         don't define them yet.
14706
14707         * parse.y (nomods_initdcl0): Add constructor_declarator case.
14708
14709 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14710
14711         * config-lang.in (diff_excludes): Use basename only.
14712
14713 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
14714
14715         * tinfo2.cc: Add tinfo for signed char.
14716
14717 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
14718
14719         * search.c (compute_access): Handle protected constructors in derived
14720         classes as accessible.
14721
14722 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
14723
14724         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
14725         Call convert_from_reference sooner.
14726
14727 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
14728
14729         * cvt.c (ocp_convert): Obtain the constant values from constant
14730         decls even if the destination type is the same as the type of the
14731         decl.
14732
14733         * decl2.c (finish_file): Make sure that static inlines with
14734         definitions are not marked DECL_EXTERNAL before returning.
14735
14736 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
14737
14738         * decl.c: Lose arg_looking_for_template.
14739         (lookup_name_real): Likewise.
14740         * parse.y: Lose processing_template_arg, template_arg1.
14741         (primary): Likewise.
14742         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
14743
14744 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14745
14746         * error.c (dump_decl): Fix type of default arguments for template
14747         template parameters and nontype template parameters.
14748         * parse.y (template_parm): Handle invalid default template
14749         template arguments here.
14750
14751         * parse.y (template_parm): Use template_arg instead of PTYPENAME
14752         for default template template argument.
14753         * pt.c (coerce_template_parms): Merge default template argument
14754         codes.  Can treat RECORD_TYPE as template name if it is implicitly
14755         created.  Fix argument index in error message.
14756         * typeck.c (comptypes): Merge template argument comparison codes in
14757         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
14758
14759 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
14760
14761         * lex.c (file_name_nondirectory): Also check for '/'.
14762
14763 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
14764
14765         * parse.y (primary): Deal with statement-expressions in
14766         templates.
14767         * pt.c (tsubst_copy): Handle BIND_EXPR.
14768         * tree.c (mapcar): Likewise.
14769
14770         * call.c (add_template_candidate_real): Pass extra parameter to
14771         fn_type_unification.
14772         * cp-tree.h (fn_type_unification): Add parameter.
14773         * pt.c (fn_type_unification): Add additional parameter to deal with
14774         static member functions.
14775         (get_bindings): Deal with static member functions.
14776
14777         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
14778         (revert_static_member_fn): Declare.
14779         * decl.c (revert_static_member_fn): Remove declaration.  Change
14780         linkage from internal to external.
14781         (cp_finish_decl): Deal with virtual functions in classes local to
14782         template functions.
14783         * decl2.c (finish_file): Don't forget to emit increment/decrement
14784         expressions in initializers for file-scope variables.
14785         * parse.y (typename_sub2): If the typename doesn't names a
14786         template, rather than a type, issue an error message.
14787         * pt.c (check_explicit_specialization): Handle specializations of
14788         static member functions.
14789         (coerce_template_parms): Handle offset references to lists of
14790         member functions.
14791         * search.c (note_debug_info_needed): Don't crash when handed a
14792         type which is being defined.
14793         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
14794         that can happen with some illegal code.
14795
14796 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14797
14798         * call.c (user_harshness): Initialize `code' to 0.
14799         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
14800         (null_ptr_cst_p): Add parentheses around && within ||.
14801         (standard_conversion): Likewise.
14802         (z_candidate): Likewise.
14803         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
14804         (build_object_call): Likewise for `mem_args'.
14805         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
14806         default case in enumeration switch.
14807
14808         * class.c (build_vtable_entry): Add explicit braces to avoid
14809         ambiguous `else'.
14810         (build_class_init_list): Likewise.
14811         (finish_struct_1): Initialize `width' to 0.
14812         (instantiate_type): Initialize `name' to NULL_TREE.  Add
14813         explicit braces to avoid ambiguous `else'.
14814
14815         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
14816         `else'.
14817
14818         * decl.c (grok_reference_init): Eliminate unused parameter, all
14819         callers changed.
14820         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
14821         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
14822         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
14823         (grokdeclarator): Add parentheses around && within ||.  Add
14824         explicit braces to avoid ambiguous `else'.
14825         (grokparms): Initialize `type' to NULL_TREE.
14826         (xref_tag): Remove unused label `just_return'.
14827         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
14828         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
14829         (hack_incomplete_structures): Add parentheses around assignment
14830         used as truth value.
14831
14832         * decl2.c (coerce_delete_type): Hide definition of `e3'.
14833
14834         * error.c: Include <stdlib.h>.
14835         (dump_expr): Change the type of `i' to size_t.  Remove unused
14836         label `error'.
14837
14838         * except.c (init_exception_processing): Remove unused variable `d'.
14839         (expand_throw): Likewise for `label'.
14840
14841         * friend.c (add_friends): Add explicit braces to avoid ambiguous
14842         `else'.
14843
14844         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
14845         (sort_base_init): Likewise for `binfo'.
14846         (expand_member_init): Likewise for `rval'.
14847         (build_member_call): Add parentheses around assignment used as
14848         truth value.
14849         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
14850         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
14851         `old_immediate_size_expand' to 0.
14852         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
14853         (build_vec_delete_1): Remove unused variable `block'.
14854         (expand_vec_init): Initialize `itype' to NULL_TREE.
14855
14856         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
14857         declaration of `index' and `rindex' with autoconf macros.
14858         (reinit_parse_for_expr): Remove unused variables
14859         `look_for_semicolon' and `look_for_lbrac'.
14860         (cons_up_default_function): Initialize `args' to NULL_TREE.
14861         (readescape): Initialize `firstdig' to 0.
14862         (real_yylex): Add parentheses around assignment used as truth value.
14863
14864         * method.c: Include <strings.h> if we don't have <string.h>.
14865         Protect declaration of `index' with autoconf macro.
14866
14867         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
14868         Initialize `type' to NULL_TREE.
14869         (structsp): Remove unused variable `id'.
14870
14871         * pt.c (coerce_template_parms): Add explicit braces to avoid
14872         ambiguous `else'.
14873         (lookup_template_class): Initialize `template' to NULL_TREE.
14874         (instantiate_class_template): Remove unused variable `name' and `e'.
14875         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
14876         (do_poplevel): Initialize `saved_warn_unused' to 0.
14877         (type_unification): Remove unused varable `parm'.
14878         (unify): Likewise for `j'.
14879
14880         * repo.c (init_repo): Add parentheses around assignment used as
14881         truth value.
14882         (finish_repo): Remove unused varable `p'.
14883
14884         * search.c (get_binfo): Initialize `type' to NULL_TREE.
14885         (get_base_distance): Likewise.
14886         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
14887         and `new_v' to NULL_TREE.
14888         (lookup_fnfields): Likewise for `rval_binfo_h'.
14889         (breadth_first_search): Add parentheses around assignment used as
14890         truth value.
14891         (get_template_base): Initialize `type' to NULL_TREE.
14892
14893         * sig.c (append_signature_fields): Initialize `last_mfptr' to
14894         NULL_TREE.
14895         (build_signature_table_constructor): Likewise for
14896         `last_rhs_field', `pfn' and `vt_off'.
14897         (build_sigtable): Likewise for `init'.
14898
14899         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
14900         (propagate_binfo_offsets): Likewise for `delta'.
14901         (hash_tree_cons): Initialize hashcode to 0.
14902         (can_free): Likewise for `size'.
14903         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
14904
14905         * typeck.c (convert_sequence): Hide prototype.
14906         (common_type): Add explicit braces to avoid ambiguous `else'.
14907         (comp_target_types): Likewise.
14908         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
14909         (build_function_call_real): Add explicit braces to avoid ambiguous
14910         `else'.
14911         (convert_arguments): Initialize `called_thing' to 0.
14912         (convert_for_initialization): Initialize `savew' and `savee' to 0.
14913
14914         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
14915         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
14916         (build_x_arrow): Likewise for `last_rval'.
14917
14918         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
14919
14920 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
14921
14922         * decl.c (init_decl_processing): Use set_sizetype.
14923         * decl2.c (sizetype): Don't declare.
14924         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
14925         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
14926         (build_component_addr, unary_complex_lvalue): Likewise.
14927         * rtti.c (expand_class_desc): Likewise.
14928         * class.c (get_vfield_offset): Likewise.
14929
14930 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
14931
14932         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
14933         early to avoid bogus error.  Handle overloaded function
14934         names provided as template arguments correctly.
14935         (coerce_template_parms): Don't mishandle overloaded functions when
14936         dealing with template template parameters.
14937         (lookup_template_class): Issue an error message, rather than
14938         crashing, when the TYPE_DECL provided is not a template type.
14939
14940 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
14941
14942         * class.c (instantiate_type): Don't just return a known type if
14943         it's wrong.
14944
14945 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
14946
14947         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
14948         since that code could never be reached.
14949
14950         * error.c (dump_decl): Avoid aborting in the midst of printing an
14951         error message about an illegal template declaration.
14952
14953         * parse.y (structsp): Print an error message, rather than crashing,
14954         when a class-head does not name a class.
14955
14956         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
14957         template arguments as a g++ extension.
14958
14959         * cp-tree.def (ALIGNOF_EXPR): New tree code.
14960         * decl2.c (grok_alignof): If processing_template_decl, just store
14961         the expression.
14962         * typeck.c (c_alignof): Likewise.
14963         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
14964         * error.c (dump_expr): Likewise.
14965         * pt.c (tsubst_copy): Likewise.
14966         * tree.c (cp_tree_equal): Likewise.
14967         * pt.c (uses_template_parms): Correctly determine whether or not a
14968         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
14969         folding can be done.
14970
14971         * cp-tree.h (grok_enum_decls): Remove type parameter.
14972         * decl.c (grok_enum_decls): Likewise.
14973         * decl2.c (grok_x_components): Call grok_enum_decls
14974         unconditionally, since it will do nothing if there is no
14975         current_local_enum.  Use the new calling sequence.
14976         * pt.c (tsubst_enum): Use the new calling sequence for
14977         grok_enum_decls.
14978
14979         * decl.c (start_function): Make member functions of local classes
14980         in extern inline functions have comdat linkage here...
14981         (grokdeclarator): Rather than here.
14982
14983 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
14984
14985         * pt.c (convert_nontype_argument): Use decl_constant_value.
14986
14987 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
14988
14989         * call.c (add_template_candidate_real): New function.
14990         (add_template_candidate): Use it.
14991         (add_template_conv_candidate): Likewise.
14992         (joust): Pass extra argument to more_specialized.
14993         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
14994         (is_local_class): Remove.
14995         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
14996         * cp-tree.h (is_local_class): Remove.
14997         (perform_array_to_pointer_conversion): Likewise.
14998         (finish_member_template_decl): Add.
14999         (check_explicit_specialization): Return a tree, not an int.
15000         (more_specialized): Take additional argument.
15001         (get_bindings): Likewise.
15002         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
15003         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
15004         (perform_array_to_pointer_conversion): Remove.
15005         * decl.c (saved_scope): Add processing_specialization,
15006         processing_explicit_instantiation fields.
15007         (maybe_push_to_top_level): Save them.
15008         (pop_from_top_level): Restore them.
15009         (grokfndecl): Use new return value from
15010         check_explicit_specialization.
15011         (start_decl): Don't check flag_guiding_decls before pushing
15012         decls.
15013         (cp_finish_decl): Remove previous (bogus) change.
15014         (grok_declarator): Use decl_function_context rather than
15015         is_local_class.
15016         * decl2.c (finish_file): Pass extra argument to get_bindings.
15017         (build_expr_from_tree): Let build_x_component_ref check
15018         validity of arguments rather than doing it here.
15019         * lex.c (cons_up_default_function): Remove code fooling with
15020         processing_specialization, processing_explicit_instantiation
15021         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
15022         * method.c (build_overload_identifier): Mangle local classes in
15023         template functions correctly.
15024         * parse.y (finish_member_template_decl): Move to pt.c.
15025         * pt.c (finish_member_template_decl): Moved here from parse.y.
15026         (print_candidates): New function.
15027         (determine_specialization): Change interface.  Properly look for
15028         most specialized versions of template candidates.
15029         (check_explicit_specialization): Fully process explicit
15030         instantiations.
15031         (push_template_decl): Avoid looking at CLASSTYPE fields in
15032         FUNCTION_DECLS.
15033         (determine_overloaded_function): Remove.
15034         (convert_nontype_argument): Change name from
15035         convert_nontype_parameter.  Use determine_overloaded_function
15036         instead of instantiate_type.
15037         (mangle_class_name_for_template): Handle type contexts as well as
15038         function contexts.
15039         (classtype_mangled_name): Likewise.
15040         (lookup_template_class): Likewise.
15041         (tsubst): Likewise.
15042         (more_specialized): Take explict template arguments as a
15043         parameter.
15044         (most_specialized): Likewise.
15045         (get_bindings): Likewise.  Check that return types match before
15046         proclaiming a function a match.
15047         (do_decl_instantiation): Remove code searching for function to
15048         instantiate; that is now done in check_explicit_specialization.
15049         (add_maybe_template): Pass extra argument to get_bindings.
15050         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
15051         implementation.
15052         * typeck.c (build_component_ref): Check for invalid arguments.
15053
15054 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
15055
15056         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
15057         return_target and call_target are equivalent.
15058
15059         * pt.c (type_unification_real): Just accept function parms that
15060         don't use any template parms.
15061
15062 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
15063
15064         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
15065         unset DECL_NOT_REALLY_EXTERN.
15066
15067         * parse.y (typename_sub*): Fix std::.
15068
15069 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
15070
15071         * error.c (dump_decl): Fix type default template args.
15072         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
15073
15074 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
15075
15076         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
15077         (file_name_nondirectory): Use.
15078
15079 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15080
15081         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
15082         that are not really present.  Substitute default arguments in
15083         template template arguments.  Correctly convert TEMPLATE_DECL to
15084         TEMPLATE_TEMPLATE_PARM.
15085         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
15086         are no longer treated specially here.
15087         * parse.y (template_template_parm): Fix copy error.
15088         * decl.c (grokdeclarator): Warn about missing `typename' for nested
15089         type created from template template parameters.
15090         * parse.y (bad_parm): Likewise
15091
15092         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
15093         (push_nested_class): Likewise.
15094         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
15095         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
15096         (copy_template_template_parm): Declare.
15097         * decl.c (arg_looking_for_template): New variable.
15098         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
15099         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
15100         node if arg_looking_for_template is nonzero.
15101         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
15102         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
15103         (grokdeclarator): Handle TEMPLATE_DECL.
15104         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
15105         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
15106         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
15107         (dump_decl): Handle unnamed template type parameters.
15108         Handle template template parameters.
15109         (dump_function_name): Handle template template parameters.
15110         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
15111         Handle TEMPLATE_TEMPLATE_PARM.
15112         * method.c (build_template_template_parm_names): New function.
15113         (build_template_parm_names): Handle TEMPLATE_DECL.
15114         (build_overload_nested_name, build_overload_name):
15115         Handle TEMPLATE_TEMPLATE_PARM.
15116         * parse.y (maybe_identifier): New nonterminal.
15117         (template_type_parm): Use it.
15118         (template_template_parm, template_arg1): New nonterminal.
15119         (template_parm): Add template_template_parm rules.
15120         (template_arg): Set processing_template_arg.
15121         (template_arg1): Rules moved from template_arg.
15122         (primary, nonnested_type): Set arg_looking_for_template if we are
15123         processing template arguments.
15124         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
15125         (process_template_parm): Handle template template parameters.
15126         (coerce_template_parms, comp_template_args): Likewise.
15127         (mangle_class_name_for_template, lookup_template_class): Likewise.
15128         (uses_template_parms): Handle TEMPLATE_DECL and
15129         TEMPLATE_TEMPLATE_PARM.
15130         (current_template_args): Handle TEMPLATE_DECL.
15131         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
15132         * search.c (dfs_walk, dfs_record_inheritance):
15133         Handle TEMPLATE_TEMPLATE_PARM.
15134         * tree.c (copy_template_template_parm): New function.
15135         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
15136         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
15137
15138 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
15139
15140         * decl.c (start_decl): Don't allow duplicate definitions of static
15141         data members.
15142
15143         * call.c (build_user_type_conversion_1): Handle user-defined
15144         template conversion operators correctly.
15145
15146         * decl2.c (build_expr_from_tree): Issue an error message if the
15147         object in a COMPONENT_REF is a TEMPLATE_DECL.
15148
15149         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
15150
15151         * class.c (is_local_class): New function.
15152         * cp-tree.h (is_local_class): Declare it.
15153         (last_tree): Likewise.
15154         (begin_tree): Likewise.
15155         (end_tree): Likewise.
15156         (lookup_template_class): Change prototype.
15157         * decl.c (cp_finish_decl): Check for NULL where necessary.
15158         Consider FUNCTION_DECLS to declare objects with top-level binding,
15159         when calling make_decl_rtl.
15160         (grokdeclarator): Give members of local classes internal linkage.
15161         (start_function): Remove declaration of last_tree.
15162         (finish_function): Set flag_keep_inline_functions around call to
15163         rest_of_compilation if we are processing a member function in a
15164         local class.
15165         (start_method): Call push_template_decl for member functions of
15166         local classes in template functions.
15167         * decl2.c (import_export_decl): Don't give external linkage to
15168         instantiations of templates with internal linkage.
15169         * parse.y (last_tree): Remove declaration.
15170         (template_type): Pass extra parameter to lookup_template_class.
15171         (self_template_type): Likewise.
15172         (structsp): Move call to reset_specialization into left_curly.
15173         (left_curly): Call reset_specialization, and begin_tree.
15174         * pt.c (saved_trees): New variable.
15175         (mangle_class_name_for_template): Change prototype.  Use
15176         additional function context to name local classes in templates
15177         correctly.
15178         (classtype_mangled_name): Pass the context.
15179         (push_template_decl): Handle local classes and templates, and
15180         member functions for such classes.
15181         (convert_nontype_parameter): Fix handling of pointer-to-member
15182         constants.
15183         (lookup_template_class): Handle local classes in templates.
15184         (tsubst): Likewise.  Don't assume that template instantiations
15185         have external linkage; pay attention to the template declaration.
15186         (mark_decl_instantiated): Likewise.
15187         (begin_tree): New function.
15188         (end_tree): Likewise.
15189
15190         * decl.c (xref_basetypes): Don't call complete_type for basetypes
15191         that involve template parameters; that can lead to infinite
15192         recursion unnecessarily.
15193
15194         * pt.c (register_specialization): Do not register specializations
15195         that aren't ready to be registered yet.
15196         (check_explicit_specialization): Handle explicit specialization of
15197         constructors and destructors.
15198         (build_template_decl): New function.
15199         (push_template_delc): Handle out-of-class specializations of
15200         member templates.
15201
15202         * pt.c (check_explicit_specialization): Set up the template
15203         information before registering the specialization.
15204         (coerce_template_parms): Fix thinko.
15205         (tsubst): Handle specializations of member templates correctly.
15206
15207         * class.c (finish_struct_methods): Remove calls to
15208         check_explicit_specialization from here.
15209         (finish_struct): And insert them here.
15210         * cp-tree.h (perform_qualification_conversions): New function.
15211         (perform_array_to_pointer_conversion): Likewise.
15212         (begin_explicit_instantiation): Likewise.
15213         (end_explicit_instantiation): Likewise.
15214         (determine_specialization): Renamed from
15215         determine_explicit_specialization.
15216         (comp_template_parms): New function.
15217         (processing_explicit_instantiation): New variable.
15218         * cvt.c (perform_qualification_conversions): New function.
15219         (perform_array_to_pointer_conversion): Likewise.
15220         * decl.c (duplicate_decls): Don't consider template functions
15221         alike unless they have the same parameters.  Refine handling of
15222         instantiation/specialization mismatches.
15223         (start_decl): Don't call pushdecl for template specializations,
15224         since they don't affect overloading.
15225         (start_function): Likewise.
15226         (grokfndecl): Call check_explicit_specialization a little later.
15227         Don't call duplicate_decls for memberm template specializations.
15228         (grokdeclarator): Don't update template_count for classes that are
15229         themselves specializations.  Remove use of `2' as parameter to
15230         grokfndecl since that value isn't used.
15231         * lex.c (cons_up_default_function): Save and restore
15232         processing_explicit_instantiation around calls to grokfield.
15233         * parse.y (finish_member_template_decl): New function.
15234         (component_decl_1): Use it.
15235         (fn.def2): Likewise.
15236         (template_arg_list_opt): New nonterminal.
15237         (template_type): Use it.
15238         (self_template_type): Likewise.
15239         (template_id): Likewise.
15240         (object_template_id): Likewise.
15241         (notype_template_declarator): Likwise.
15242         (begin_explicit_instantiation): Likewise.
15243         (end_explicit_instantiation): Likewise.
15244         (explicit_instantiation): Use them.
15245         * pt.c (coerce_template_parms): Add parameters.
15246         (processing_explicit_instantiation): New variable.
15247         (convert_nontype_parameter): New function.
15248         (determine_overloaded_function): Likewise.
15249         (begin_explicit_instantiation): Likewise.
15250         (end_explicit_instantiation): Likewise.
15251         (retrieve_specialization): Likewise.
15252         (register_specialization): Likewise.
15253         (processing_explicit_specialization): Removed.
15254         (determine_specialization): Handle specializations of member
15255         functions of template class instantiations.
15256         (check_explicit_specialization): Refine to conform to standard.
15257         (comp_template_parms): New function.
15258         (coerce_template_parms): Call convert_nontype_parameter.
15259         (tsubst): Refine handling of member templates.  Use
15260         register_specialization.
15261         (instantiate_template): Use retrieve_specialization.
15262         (do_decl_instantiation): Likewise.
15263         (instantiate_decl): Likewise.
15264         (type_unification): Improve handling of explict template
15265         arguments.
15266         * tree.c (mapcar): Return error_mark_node, rather than aborting,
15267         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
15268         * typeck.c (build_unary_op): Call determine_specialization, rather
15269         than determine_explicit_specialization.
15270
15271 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
15272
15273         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
15274
15275 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15276
15277         * error.c (dump_decl): For enum tags, output the tag, not its value.
15278
15279 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
15280
15281         * decl.c (init_decl_processing): Only call init_rtti_processing
15282         FLAG_RTTI is set.
15283
15284 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
15285
15286         * init.c (build_new_1): Split out from build_new.
15287         (build_new): Just return a NEW_EXPR.
15288         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
15289
15290         * decl2.c (get_temp_regvar): Tweak.
15291
15292         * cp-tree.h (TREE_CALLS_NEW): Comment out.
15293         * class.c (resolves_to_fixed_type_p): Remove use.
15294         * method.c (build_opfncall): Likewise.
15295         * call.c (build_new_op): Likewise.
15296
15297 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
15298
15299         * exception.cc (__eh_alloc, __eh_free): New fns.
15300         (__cp_push_exception, __cp_pop_exception): Use them.
15301         (__uncatch_exception): Call terminate here if no exception.
15302         * except.c (build_terminate_handler): New fn.
15303         (expand_start_catch_block): Use it.
15304         (expand_exception_blocks): Likewise.
15305         (alloc_eh_object): New fn.
15306         (expand_throw): Use it.  Protect exception init with terminate.
15307         * typeck.c (build_modify_expr): Remove code that ignores trivial
15308         methods.
15309
15310 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15311
15312         * call.c (add_builtin_candidate): Add default case in enumeration
15313         switch.
15314         (build_new_op): Likewise.
15315         (convert_like): Likewise.
15316         * cvt.c (build_expr_type_conversion): Likewise.
15317         * tree.c (real_lvalue_p): Likewise.
15318         (lvalue_p): Likewise.
15319         (cp_tree_equal): Likewise.
15320         * typeck.c (comptypes): Likewise.
15321         (build_component_ref): Likewise.
15322         (build_function_call_real): Likewise.
15323         (build_binary_op_nodefault): Likewise.
15324         (build_unary_op): Likewise.
15325         (build_modify_expr): Likewise.
15326         * typeck2.c (initializer_constant_valid_p): Likewise.
15327
15328 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
15329
15330         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
15331
15332 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
15333
15334         * pt.c (coerce_template_parms): Make sure to digest_init if
15335         possible.
15336
15337         * decl.c (duplicate_decls): Make the newdecl virtual if the
15338         olddecl was, just as is done with other attributes of olddecl.
15339
15340 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
15341
15342         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
15343         address of an OFFSET_REF.
15344
15345         * cp-tree.def: Add AGGR_INIT_EXPR.
15346         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
15347         AGGR_INIT_EXPR where appropriate.
15348         * expr.c (cplus_expand_expr): Likewise.  Simplify.
15349
15350         * decl2.c (finish_file): Remove call to register_exception_table.
15351
15352 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15353
15354         * pt.c (instantiate_class_template): Don't do injection when
15355         processing_template_decl is true, as pollutes current_binding_level
15356         for base classes.
15357
15358 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
15359
15360         * pt.c (maybe_fold_nontype_arg): Add prototype.
15361
15362 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
15363
15364         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
15365         * error.c (dump_expr): Likewise.
15366
15367 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
15368
15369         * typeck.c (build_function_call_real): Remove "inline called before
15370         definition" pedwarn.
15371
15372         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
15373
15374 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
15375
15376         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
15377
15378         * pt.c (type_unification_real): Change __null to type void* with
15379         a warning.
15380
15381 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
15382
15383         * call.c (implicit_conversion): Don't call
15384         build_user_type_conversion_1 with a NULL expr, since it will
15385         crash.
15386
15387         * pt.c (unify): Don't try to unify array bounds if either array is
15388         unbounded.
15389
15390 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15391
15392         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
15393         Replace extern decls with casts.
15394
15395         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
15396         Update last_parm_cleanup_insn.
15397         (store_after_parms): Remove.
15398         * cp-tree.h: Adjust.
15399
15400 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
15401
15402         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
15403         (finish_file): Check DECL_COMDAT instead of weak|one_only.
15404         (import_export_vtable): Use make_decl_one_only instead of
15405         comdat_linkage for win32 tweak.
15406         (import_export_decl): Likewise.
15407         * pt.c (mark_decl_instantiated): Likewise.
15408
15409         * decl2.c (finish_file): Lose handling of templates in pending_statics.
15410
15411 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
15412
15413         * decl2.c (finish_file): Lose call to expand_builtin_throw.
15414         * except.c (expand_builtin_throw): Remove.
15415         * cp-tree.h: Remove ptr_ptr_type_node.
15416         * decl.c: Likewise.
15417
15418 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
15419
15420         * decl.c (ptr_ptr_type_node): Define.
15421         (init_decl_processing): Initialize it.
15422         * cp-tree.h: Declare it.
15423         * exception.cc (__cp_exception_info): Use __get_eh_info.
15424         (__cp_push_exception): Likewise.
15425         (__cp_pop_exception): Likewise.
15426
15427         From Scott Snyder <snyder@d0sgif.fnal.gov>:
15428         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
15429         saved_pc.
15430         (init_exception_processing): Removed saved_pc initialization.
15431
15432 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
15433
15434         * pt.c (instantiate_decl): Defer all templates but inline functions.
15435
15436 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
15437
15438         * init.c (expand_vec_init): Don't fold a list of parameters.
15439
15440         * decl.c (copy_args_p): Handle copy elision for types with virtual
15441         bases.
15442         * call.c (build_over_call): Likewise.
15443
15444 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
15445
15446         * pt.c (lookup_template_function): Copy the template arguments,
15447         not just the list containing them, to the permanent obstack.
15448
15449 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
15450
15451         * except.c (expand_start_catch_block): suspend_momentary for the
15452         terminate handler.
15453
15454         * error.c (dump_decl): Handle LOOKUP_EXPR.
15455
15456 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
15457
15458         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
15459         permanent obstack if we are processing a template decl.
15460         * typeck.c (build_static_cast): Likewise.
15461         (build_const_cast): Likewise.
15462         (build_reinterpret_cast): Likewise.
15463
15464         * pt.c (coerce_template_parms): Coerce some expressions, even
15465         when processing_template_decl.
15466
15467 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15468
15469         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
15470         handling of pointer difference expressions.
15471
15472         * typeck.c (comp_target_types): Comparison of function/method types
15473         is independent of nptrs.
15474
15475 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
15476
15477         * pt.c (tsubst): Avoid creating pointer to reference and
15478         reference to reference types.
15479
15480 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
15481
15482         * parse.y (do_id): New nonterminal.
15483         (template_id): Use it.
15484
15485 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
15486
15487         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
15488         * spew.c (yylex): Don't do_identifier here.
15489         * decl2.c (build_expr_from_tree): Revert last change.
15490
15491         * decl2.c (build_expr_from_tree): Expand the name for a method call.
15492         * parse.y (object_template_id): Don't try to take the DECL_NAME.
15493
15494 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
15495
15496         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
15497         alloc_expr.
15498         * call.c (build_op_delete_call): Adjust.
15499
15500         * except.c (expand_end_catch_block): Lose rethrow region.
15501         (expand_start_catch_block): Likewise.
15502         (expand_end_catch_block): Don't expand_leftover_cleanups.
15503
15504 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15505
15506         * pt.c (tsubst): Remove tree_cons call (places redundant info into
15507         DECL_TEMPLATE_INSTANTIATION).
15508
15509 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
15510
15511         * tree.c (is_overloaded_fn): Handle getting a fn template.
15512         (really_overloaded_fn): Likewise.
15513         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
15514         * pt.c (check_explicit_specialization): Tweak.
15515         (determine_explicit_specialization): Tweak.
15516
15517         * tree.c, cp-tree.h (get_target_expr): New fn.
15518
15519 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
15520
15521         * pt.c (check_explicit_specialization): Fix misspelling in
15522         diagnostic: `preceeded'.
15523         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
15524         `conversiona'.
15525
15526 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
15527
15528         * pt.c (determine_explicit_specialization): Avoid an internal
15529         error for bad specializations.
15530
15531         * method.c (build_overload_value): Handle SCOPE_REF.
15532
15533 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
15534
15535         * class.c (prepare_fresh_vtable): Enable even more complex MI
15536         vtable names.
15537
15538 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
15539
15540         * exception.cc (__check_eh_spec): Optimize a bit.
15541
15542         * exception.cc (__cp_pop_exception): Lose handler arg.
15543         * except.c (do_pop_exception): Likewise.
15544         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
15545         (expand_end_catch_block): Likewise.
15546
15547 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15548
15549         * pt.c (check_explicit_specialization): Complain about using a
15550         template-id for a non-specialization.
15551
15552 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
15553
15554         * repo.c: Prototype rindex only if needed.
15555         * xref.c: Likewise.
15556
15557 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15558
15559         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
15560
15561 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
15562
15563         * typeck.c (build_const_cast): Handle references here instead of
15564         handing off to convert_to_reference.
15565
15566         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
15567         TerminateFunctionCall.
15568         (init_exception_processing): Likewise.  Terminate et al are now
15569         the fns, not ADDR_EXPRs.
15570         (various): Lose redundant assemble_external calls.
15571         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
15572
15573         * cp-tree.h (struct lang_decl_flags): Add comdat.
15574         (DECL_COMDAT): New macro.
15575         * decl.c (duplicate_decls): Propagate it.
15576         (cp_finish_decl): Handle it.
15577         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
15578
15579         * class.c: Remove static pending_hard_virtuals.
15580         (add_virtual_function): Take pointers to pending_virtuals
15581         and pending_hard_virtuals.
15582         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
15583
15584 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
15585
15586         * decl2.c (import_export_vtable): If we support one_only but not
15587         weak symbols, mark instantiated template vtables one_only.
15588         (import_export_decl): Likewise for tinfo functions.
15589         (finish_vtable_vardecl): Also write out vtables from explicitly
15590         instantiated template classes.
15591         * pt.c (mark_class_instantiated): Revert last change.
15592
15593         * except.c (expand_throw): Call mark_used on the destructor.
15594
15595 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
15596
15597         * lex.c (lang_init): Enable flag_exceptions by default if no
15598         command line switch was specified.
15599
15600 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
15601
15602         * pt.c (unify): Handle `void' template parameters in
15603         specializations.
15604
15605 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
15606
15607         * rtti.c (build_dynamic_cast): Handle template case here.
15608         (build_dynamic_cast_1): Not here.
15609
15610         * typeck2.c (digest_init): Make copies where appropriate.
15611
15612         * decl2.c (delete_sanity): resolve_offset_ref.
15613
15614         * except.c: Call terminate without caching so many bits.
15615
15616         * except.c (expand_start_catch_block): Fix catching a reference
15617         to pointer.
15618
15619 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
15620
15621         * init.c (build_new): Copy size to the saveable obstack.
15622
15623         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
15624         TRY_CATCH_EXPR for now.
15625
15626 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
15627
15628         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
15629         has DECL_LANG_SPECIFIC.
15630
15631         * exception.cc (struct cp_eh_info): Add handlers field.
15632         (__cp_push_exception): Initialize it.
15633         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
15634         (__throw_bad_exception): Remove.
15635         * except.c (call_eh_info): Add handlers field.
15636         (get_eh_handlers): New fn.
15637         (push_eh_cleanup): Increment handlers.
15638
15639 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
15640
15641         * except.c (expand_start_eh_spec): Use the try/catch code.
15642         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
15643         doing everything inline.
15644         (init_exception_processing): throw_type_match now takes
15645         const void pointers.
15646         * exception.cc (__check_eh_spec): New fn.
15647         * inc/exception: Neither terminate nor unexpected return.
15648         * decl.c: Make const_ptr_type_node public.
15649         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
15650
15651         * except.c (expand_start_catch_block): We only need the rethrow
15652         region for non-sjlj exceptions.
15653         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
15654
15655 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
15656
15657         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
15658         (various.o): Likewise.
15659         * inc/new: Add placement deletes.  Add throw specs for default new.
15660         * new.cc (set_new_handler): Move here from libgcc2.
15661         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
15662         (new): Move from libgcc2.  Throw bad_alloc.
15663         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
15664         * decl.c (init_decl_processing): Update exception specs on new and
15665         delete.
15666
15667         * method.c (build_decl_overload_real): Don't mess with global
15668         placement delete.
15669
15670         * init.c (build_new): Check for null throw spec, not nothrow_t.
15671
15672         * decl.c (duplicate_decls): Don't complain about different exceptions
15673         from an internal declaration.
15674
15675         * call.c (build_op_delete_call): Fix check for member fns again.
15676
15677         * decl2.c (import_export_decl): Interface hackery affects
15678         virtual synthesized methods.
15679
15680 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15681
15682         * decl.c (start_decl): Don't just complain about a mismatched
15683         scope, fix it.
15684
15685         * decl.c (make_implicit_typename): Handle case where t is not
15686         actually from context.
15687         * tree.c (get_type_decl): Lose identifier case.
15688         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
15689         * parse.y (nonnested_type): Just use lookup_name.
15690         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
15691
15692 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
15693
15694         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
15695         T was built in C language context (for example, by
15696         output_func_start_profiler).
15697
15698 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
15699
15700         * decl.c (make_implicit_typename): New fn.
15701         (lookup_name_real): Use it.  Use current_class_type as the context.
15702
15703 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
15704
15705         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
15706
15707 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15708
15709         * friend.c (do_friend): Warn about non-template friends in templates.
15710
15711         * call.c (build_op_delete_call): Fix handling of inherited delete.
15712
15713         * search.c (dfs_record_inheritance): Ignore template type parms.
15714
15715 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
15716
15717         * call.c (build_new_op): Fix copy error.
15718         (build_op_new_call): New fn.
15719         (build_op_delete_call): New fn.
15720         * cp-tree.h: Declare them.
15721         * init.c (build_new): Use them.  Support placement delete.
15722         (build_x_delete): Use build_op_delete_call.
15723         (build_delete): Likewise.
15724         * decl2.c (delete_sanity): Likewise.
15725         (coerce_delete_type): Don't complain about placement delete.
15726
15727 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
15728
15729         * call.c (build_new_function_call): Remove unused 'obj' parm.
15730         * cp-tree.h, typeck.c: Adjust.
15731
15732         * init.c (build_new): Make the cleanup last longer.
15733         (expand_vec_init): Call do_pending_stack_adjust.
15734
15735 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
15736
15737         * pt.c (do_type_instantiation): Fix typo.
15738         (mark_class_instantiated): If we support one_only but not weak
15739         symbols, don't mark this as known.
15740
15741         * init.c (build_new): Handle vec delete in EH cleanup.
15742
15743 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15744
15745         * call.c (build_method_call): Call complete_type before checking
15746         for destructor.
15747
15748 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
15749
15750         * decl.c (add_block_current_level): Delete.
15751         * init.c (build_vec_delete_1): Delete build_block and
15752         add_block_current_level calls.
15753
15754 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
15755
15756         * init.c (build_new): Handle freeing allocated memory when the
15757         constructor throws.
15758
15759         * call.c (build_new_method_call): Fix flags arg.
15760
15761         * pt.c (do_type_instantiation): Don't try to instantiate
15762         member templates.
15763         (mark_decl_instantiated): If we support one_only but not
15764         weak symbols, mark this one_only.
15765         * decl2.c (import_export_vtable): Don't defer handling of vtables
15766         if MULTIPLE_SYMBOL_SPACES.
15767
15768 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
15769
15770         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
15771
15772 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
15773
15774         * except.c (do_pop_exception): Return a value.
15775
15776 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
15777
15778         * call.c (build_new_method_call): Handle getting a
15779         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
15780         if we got template parms.
15781         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
15782         not just the args.
15783         * decl2.c (build_expr_from_tree): Tweak last change.
15784         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
15785         (maybe_fold_nontype_arg): Split out from tsubst_copy.
15786         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
15787
15788 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
15789
15790         * pt.c (tsubst_copy): Handle explicit template arguments in
15791         function calls.
15792         * typeck.c (build_x_function_call): Likewise.
15793         * decl2.c (build_expr_from_tree): Lookup function name if it
15794         hasn't been done.
15795
15796         * pt.c (tsubst): Instantiate template functions properly when
15797         template parameter does not appear in function arguments and return
15798         type.
15799         (comp_template_args): Handle member templates required by tsubst.
15800
15801 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
15802
15803         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
15804         previous change.
15805
15806 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15807
15808         * pt.c (coerce_template_parms): Tweak error message.
15809
15810         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
15811         return type defaults to `int', even if there are storage-class
15812         specifiers.
15813
15814 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
15815
15816         Complete nested exception support.
15817         * except.c (do_pop_exception): Split out...
15818         (push_eh_cleanup): From here.  Handle the EH region by hand.
15819         (expand_start_catch_block): Add a new level for the catch parm.
15820         Move the rethrow region outside the two cleanup regions.
15821         Protect the initializer for the catch parm with terminate.
15822         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
15823         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
15824         popping off the middle of the stack.
15825         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
15826         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
15827         (build_cplus_new): Only wrap CALL_EXPRs.
15828         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
15829         the constructor call.
15830
15831 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15832
15833         * Make-lang.in (c++.distdir): Make inc subdirectory.
15834
15835 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15836
15837         * decl2.c (finish_file): Put back some code.
15838
15839 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15840
15841         * decl2.c (finish_file): Remove redundant code.
15842         * method.c (emit_thunk): Don't let the backend defer generic thunks.
15843
15844 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
15845
15846         * except.c (call_eh_info): Split out...
15847         (push_eh_info): From here.
15848         (expand_builtin_throw): Use it.
15849         (expand_start_catch_block): Move region start back.
15850
15851 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
15852
15853         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
15854         (real_yylex): Record wide strings using target endianness, not host.
15855
15856 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
15857
15858         * repo.c (rindex): Add decl unconditionally.
15859         (get_base_filename, open_repo_file): Don't cast rindex.
15860         * xref.c (rindex): Add decl unconditionally.
15861         (index): Remove unused decl.
15862         (open_xref_file): Don't cast rindex.
15863
15864 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
15865
15866         * class.c (build_vbase_path): Propagate the result type properly.
15867
15868 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
15869
15870         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
15871         remaining use of saved_throw_type with a call to get_eh_type.
15872
15873 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
15874
15875         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
15876         (file_name_nondirectory): New function, doing the same as the macro.
15877         (set_typedecl_interface_info): Use it instead of the macro.
15878         (check_newline): Likewise.
15879         (handle_cp_pragma): Likewise.
15880
15881         * repo.c (get_base_filename): Cast result of rindex to char*.
15882         (open_repo_file): Likewise.
15883         * xref.c (open_xref_file): Likewise.
15884         * error.c (dump_char): Make its arg int, not char.
15885
15886         * except.c (push_eh_info): Pass the number of fields - 1 down, not
15887         the exact number of fields.
15888
15889 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
15890
15891         Support for nested exceptions.
15892         * tinfo2.cc (__is_pointer): New fn.
15893         * exception.cc (struct cp_eh_info): Define.
15894         (__cp_exception_info, __uncatch_exception): New fns.
15895         (__cp_push_exception, __cp_pop_exception): New fns.
15896         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
15897         Lose empty_fndecl.
15898         (init_exception_processing): Likewise.  __eh_pc is now external.
15899         (push_eh_info): New fn.
15900         (get_eh_{info,value,type,caught}): New fns.
15901         (push_eh_cleanup): Just call __cp_pop_exception.
15902         (expand_start_catch_block): Use push_eh_info.  Start the eh region
15903         sooner.
15904         (expand_end_eh_spec): Use push_eh_info.
15905         (expand_throw): Call __cp_push_exception to set up the exception info.
15906         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
15907         when we rethrow.
15908         (expand_builtin_throw): Don't refer to empty_fndecl.
15909
15910 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
15911
15912         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
15913
15914 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
15915
15916         * method.c (build_template_parm_names, build_decl_overload_real):
15917         Add static to definitions.
15918         * pt.c (add_to_template_args, note_template_header,
15919         processing_explicit_specialization, type_unification_real): Likewise.
15920         ({determine,check}_explicit_specialization): Use a single string for
15921         error messages.
15922
15923 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
15924
15925         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
15926         (expand_end_catch_block): Likewise.
15927         (expand_end_eh_spec): Likewise.
15928
15929 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
15930
15931         * decl.c (duplicate_decls): Handle template specializations
15932         correctly.
15933         * error.c (dump_function_name): Fix printing of specializations of
15934         member functions that are not member templates.
15935         * cp-tree.h (processing_specialization): Make global.
15936         * pt.c (processing_specialization): Likewise.
15937         * lex.c (cons_up_default_function): Save and restore
15938         processing_specialization to avoid confusion.
15939
15940 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
15941
15942         * decl.c (init_decl_processing): Give null_node unknown* type.
15943         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
15944         (common_type): Likewise.
15945         * error.c (args_as_string): Recognize null_node.
15946
15947 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15948
15949         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
15950         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
15951
15952         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
15953
15954         * Make-lang.in (g++): Include prefix.o.
15955
15956 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
15957
15958         * pt.c (determine_explicit_specialization): Initialize "dummy"
15959         to keep Purify quiet.
15960
15961 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
15962
15963         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
15964         (build_overload_int): Not here.
15965
15966 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
15967
15968         * class.c (build_type_pathname): Remove.
15969         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
15970
15971 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
15972
15973         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
15974         &&label GNU extension.
15975
15976 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
15977
15978         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
15979         so as to avoid incorrect manglings.
15980         * method.c (build_decl_overload_real): Don't mangle return types
15981         for constructors.
15982
15983 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15984
15985         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
15986         scratch_tree_cons): Define as macros for now.
15987         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
15988         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
15989         typeck2.c: Use them and the expression_obstack variants.
15990
15991 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15992
15993         * decl.c (store_return_init): Allow classes with explicit ctors to
15994         be used with the named return values extension.
15995
15996 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
15997
15998         * pt.c (instantiate_decl): Fix previous change.
15999
16000 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
16001
16002         * pt.c (tsubst): Fix thinko.
16003         (instantiate_decl): Really use the original template.
16004
16005         * call.c (build_new_method_call): Use simple constructor_name for
16006         error messages.
16007
16008 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
16009
16010         * method.c (build_underscore_int): Don't use ANSI specific
16011         features.
16012
16013 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
16014
16015         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
16016         for our key method; it might have been inlined by -O3.
16017
16018 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
16019
16020         * decl.c (make_typename_type): Do not try to call lookup_field for
16021         non-aggregate types.
16022
16023 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
16024
16025         * typeck.c (build_reinterpret_cast): Tweak.
16026
16027 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
16028
16029         * typeck.c (build_reinterpret_cast): Converting a void pointer
16030         to function pointer with a reinterpret_cast produces a warning
16031         if -pedantic is issued.
16032
16033 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
16034
16035         * typeck.c (c_expand_return): Don't warn about returning a
16036         reference-type variable as a reference.
16037
16038 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
16039
16040         * method.c (build_static_name): Fix typo.
16041
16042 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
16043
16044         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
16045         OLDDECL before we try to do DECL_USE_TEMPLATE.
16046
16047 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16048
16049         * decl.c (duplicate_decls): Don't warn about template instances.
16050
16051         * typeck.c (mark_addressable): Lose ancient code that unsets
16052         DECL_EXTERNAL.
16053
16054         * pt.c (do_decl_instantiation): Lose support for instantiating
16055         non-templates.
16056
16057         * call.c (build_new_function_call): Fix handling of null explicit
16058         template args.
16059         (build_new_method_call): Likewise.
16060
16061 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
16062
16063         * method.c (build_underscore_int): Fix typo.
16064
16065 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
16066
16067         * tree.c (print_lang_statistics): #if 0 call to
16068         print_inline_obstack_statistics until its definition is checked in.
16069
16070 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
16071
16072         * decl2.c (finish_file): Move dump_tree_statistics to end.
16073
16074         * pt.c (instantiate_decl): Look for the original template.
16075         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
16076         of member templates.
16077
16078 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
16079
16080         * Makefile.in (g++FAQ.*): New rules.
16081         (CONFLICTS): Update.
16082         * g++FAQ.texi: Moved from libg++.
16083
16084         * parse.y (PFUNCNAME): Only specify the type once.
16085
16086 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
16087
16088         * lex.c (real_yylex): Clean up the code to fully behave the way
16089         the c-lex.c parser does for complex and real numbers.
16090
16091 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16092
16093         * method.c (build_decl_overload_real): Reformat.
16094
16095 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
16096
16097         * method.c (synthesize_method): If at_eof, determine our linkage.
16098
16099 1997-09-29  Paul Eggert  <eggert@twinsun.com>
16100
16101         * lex.c (real_yylex): Treat `$' just like `_', except issue a
16102         diagnostic if !dollars_in_ident or if pedantic.
16103
16104         * lang-specs.h (@c++): -ansi no longer implies -$.
16105
16106         * decl2.c (lang_decode_option):
16107         -traditional and -ansi now do not mess with
16108         dollars_in_ident.
16109
16110 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
16111
16112         * Makefile.in (parse.o, decl.o): Also depend on
16113         $(srcdir)/../except.h $(srcdir)/../output.h.
16114         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
16115         $(srcdir)/../except.h $(srcdir)/../output.h.
16116         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
16117         ../insn-codes.h.
16118
16119         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
16120
16121         * expr.c (cplus_expand_expr): Make it static.
16122
16123         * decl2.c, init.c, typeck.c: Include "expr.h".
16124         (expand_expr): Use proper values when calling the function.
16125
16126 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
16127
16128         * lang-options.h: New -Wold-style-cast flag.
16129         * cp-tree.h (warn_old_style_cast): New variable.
16130         * decl2.c (warn_old_style_cast): Likewise.
16131         (lang_decode_option): Support -Wold-style-cast.
16132         (reparse_absdcl_as_casts): Produce old-style-cast warning.
16133
16134 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16135
16136         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
16137         TREE_USED, reset value based on already_used.
16138
16139         * init.c (expand_member_init): Revert change.
16140
16141 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
16142
16143         * cp-tree.h, decl.c, decl2.c, pt.c:
16144         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
16145
16146         * decl2.c (lang_decode_option): Add missing ;.
16147
16148 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
16149
16150         * friend.c (do_friend): Disable injection for all template-derived
16151         decls.
16152         * decl2.c (lang_decode_option): Handle -fguiding-decls.
16153         * parse.y (notype_template_declarator): New nonterminal.
16154         (direct_notype_declarator): Use it.
16155         (complex_direct_notype_declarator): Likewise.
16156         (object_template_id): Accept any kind of identifier after TEMPLATE.
16157         (notype_qualified_id): Don't add template declarators here.
16158
16159 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
16160
16161         * call.c (add_template_candidate): Add explicit_targs parameter.
16162         (build_scoped_method_call): Use it.
16163         (build_overload_call_real): Likewise.
16164         (build_user_type_conversion_1): Likewise.
16165         (build_new_function_call): Likewise.
16166         (build_object_call): Likewise.
16167         (build_new_op): Likewise.
16168         (build_new_method_call): Likewise.
16169         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
16170         (build_new_method_call): Likewise.
16171
16172         * class.c (finish_struct_methods): Add specialization pass to
16173         determine which methods were specializing which other methods.
16174         (instantiate_type): Handle TEMPLATE_ID_EXPR.
16175
16176         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
16177
16178         * cp-tree.h (name_mangling_version): New variable.
16179         (flag_guiding_decls): Likewise.
16180         (build_template_decl_overload): New function.
16181         (begin_specialization): Likewise.
16182         (reset_specialization): Likewise.
16183         (end_specialization): Likewise.
16184         (determine_explicit_specialization): Likewise.
16185         (check_explicit_specialization): Likewise.
16186         (lookup_template_function): Likewise.
16187         (fn_type_unification): Add explicit_targs parameter.
16188         (type_unification): Likewise.
16189
16190         * decl.c (duplicate_decls): Add smarts for explicit
16191         specializations.
16192         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
16193         specializations.
16194         (grokfndecl): Call check_explicit_specialization.
16195
16196         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
16197         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
16198         (check_classfn): Handle specializations.
16199
16200         * error.c (dump_function_name): Print specialization arguments.
16201
16202         * friend.c (do_friend): Don't call pushdecl for template
16203         instantiations.
16204
16205         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
16206
16207         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
16208         and -fno-guiding-decls.
16209
16210         * lex.c (identifier_type): Return PFUNCNAME for template function
16211         names.
16212
16213         * method.c (build_decl_overload_real): New function.
16214         (build_template_parm_names): New function.
16215         (build_overload_identifier): Use it.
16216         (build_underscore_int): New function.
16217         (build_overload_int): Use it.  Add levels for template
16218         parameters.
16219         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
16220         (build_overload_nested_names): Handle template type parameters.
16221         (build_template_decl_overload): New function.
16222
16223         * parse.y (YYSTYPE): New ntype member.
16224         (nested_name_specifier): Use it.
16225         (nested_name_specifier_1): Likewise.
16226         (PFUNCNAME): New token.
16227         (template_id, object_template_id): New non-terminals.
16228         (template_parm_list): Note specializations.
16229         (template_def): Likewise.
16230         (structsp): Likewise.
16231         (fn.def2): Handle member template specializations.
16232         (component_decl_1): Likewise.
16233         (direct_notype_declarator): Handle template-ids.
16234         (component_decl_1): Likewise.
16235         (direct_notype_declarator): Handle template-ids.
16236         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
16237
16238         * pt.c (processing_specializations): New variable.
16239         (template_header_count): Likewise.
16240         (type_unification_real): New function.
16241         (processing_explicit_specialization): Likewise.
16242         (note_template_header): Likewise.
16243         (is_member_template): Handle specializations.
16244         (end_template_decl): Call reset_specialization.
16245         (push_template_decl): Handle member template specializations.
16246         (tsubst): Likewise.
16247         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
16248         (instantiate_template): Handle specializations.
16249         (instantiate_decl): Likewise.
16250         (fn_type_unification): Handle explicit_targs.
16251         (type_unification): Likewise.  Allow incomplete unification
16252         without an error message, if allow_incomplete.
16253         (get_bindings): Use new calling sequence for fn_type_unification.
16254
16255         * spew.c (yylex): Handle PFUNCNAME.
16256
16257         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
16258         (really_overloaded_fn): Likewise.
16259         (get_first_fn): Handle function templates.
16260
16261         * typeck.c (build_x_function_call): Use really_overloaded_fn.
16262         Handle TEMPLATE_ID_EXPR.
16263         (build_x_unary_op): Likewise.
16264         (build_unary_op): Likewise.
16265         (mark_addressable): Templates whose address is taken are marked
16266         as used.
16267
16268 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
16269
16270         * decl.c (init_decl_processing): Declare __builtin_constant_p as
16271         accepting any kind of type, not only int.
16272
16273 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
16274
16275         * search.c (get_matching_virtual): Notice virtual bases when sorrying
16276         about covariant returns.
16277
16278         * parse.y (member_init): Also imply typename here.  Remove ancient
16279         extension for initializing base members.
16280
16281 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
16282
16283         Handle multi-level typenames and implicit typename in base list.
16284         * parse.y (typename_sub{,[0-2]}): New rules.
16285         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
16286         (nonnested_type): New rule.
16287         (complete_type_name): Use it.
16288         (base_class.1): Use typename_sub and nonnested_type.
16289         (nested_name_specifier): Don't elide std:: here.
16290         * decl.c (make_typename_type): Handle getting a type for NAME.
16291         (lookup_name_real): Turn std:: into :: here.
16292
16293         Rvalue conversions were removed in London.
16294         * call.c (is_subseq): Don't consider lvalue transformations.
16295         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
16296         (joust): Re-enable ?: kludge.
16297
16298 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
16299
16300         * decl.c (start_function): Up warning of no return type to be a
16301         pedwarn.
16302
16303 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16304
16305         * init.c (expand_member_init): Don't set TREE_USED.
16306         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
16307         set,don't clear TREE_USED wholesale.
16308
16309 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
16310
16311         * call.c (build_over_call): Do require_complete_type before
16312         build_cplus_new.
16313
16314 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
16315
16316         * search.c (lookup_field): Call complete_type in all cases.
16317
16318         * decl.c (finish_function): Just warn about flowing off the end.
16319
16320 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
16321
16322         * decl.c (grokparms): Don't bash a permanent list node if we're
16323         in a function.
16324
16325 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
16326
16327         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
16328
16329 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
16330
16331         * call.c (build_new_op): Give better error for syntactically
16332         correct, but semantically invalid, use of undeclared template.
16333
16334         * call.c (compare_qual): Handle pmfs.
16335
16336         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
16337         after the exception spec.
16338
16339 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
16340
16341         * call.c (null_ptr_cst_p): Integer type, not integral type.
16342
16343         * call.c (joust): Disable warnings until they can be moved to the
16344         right place.
16345
16346 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
16347
16348         * Makefile.in, config-lang.in:  Convert to autoconf.
16349
16350 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
16351
16352         * decl.c (lookup_name_real): Add implicit 'typename' to types from
16353         base classes.
16354
16355         * pt.c (most_specialized_class): Fix typo.
16356         (tsubst): Move constant folding to TREE_VEC case.
16357
16358 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
16359
16360         * pt.c (do_poplevel): Don't warn about unused local variables
16361         while processing_template_decl since we don't always know whether
16362         or not they will need constructing/destructing.
16363
16364         * pt.c (uses_template_parms): Check the values of an enumeration
16365         type to make sure they don't depend on template parms.
16366
16367         * decl.c (make_typename_type): Don't lookup the field if the
16368         context uses template parms, even if we're not
16369         processing_template_decl at the moment.
16370
16371         * pt.c (coerce_template_parms): Avoid looking at the
16372         TYPE_LANG_DECL portion of a typename type, since there won't be
16373         one.
16374         (tsubst): Do constant folding as necessary to make sure that
16375         arguments passed to lookup_template_class really are constants.
16376
16377 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
16378
16379         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
16380         * decl2.c (finish_file): Only register exception tables if we
16381         need to.
16382
16383         * decl.c (init_decl_processing): Add __builtin_[fs]p.
16384
16385 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
16386
16387         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
16388
16389 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
16390
16391         * error.c (dump_decl): Avoid crashing when presented with a
16392         uninitialized constant, as can occur with a template parameter.
16393         (dump_expr): Make sure that there are enough levels of
16394         current_template_parms before we start diving through them.
16395
16396 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
16397
16398         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
16399         c-typeck.c.
16400
16401 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16402
16403         * except.c (expand_throw): Call build_delete for all
16404         exception types, not just objects with destructors.
16405
16406 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
16407
16408         * decl.c (current_local_enum): Remove static.
16409         * pt.c (tsubst_enum): Save and restore value of current_local_enum
16410         in case template is expanded in enum decl.
16411         (instantiate_class_template): Use new tsubst_enum signature.
16412         (tsubst_expr): Likewise.
16413
16414 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
16415
16416         * pt.c (begin_member_template_processing): Take a function as
16417         argument, not a set of template arguments.  Use the template
16418         parameters, rather than the arguments.  Handle non-type parameters
16419         correctly.  Push a binding level for the parameters so that multiple
16420         member templates using the same parameter names can be declared.
16421         (end_member_template_processing): Pop the binding level.
16422         (push_template_decl): Mark member templates as static when
16423         appropriate.
16424
16425         * lex.c (do_pending_inlines): Pass the function, not its template
16426         arguments, to begin_member_template_processing.
16427         (process_next_inline): Likewise.
16428         (do_pending_defargs): Likewise.
16429
16430         * error.c (dump_expr): Obtain the correct declaration for a
16431         TEMPLATE_CONST_PARM.
16432
16433         * call.c (add_template_conv_candidate): New function.
16434         (build_object_call): Handle member templates, as done in the other
16435         build_ functions.
16436
16437 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
16438
16439         * decl.c (replace_defag): Undo previous change.
16440         * lex.c (do_pending_defargs): Deal with member templates.
16441
16442         * pt.c (is_member_template): Avoid crashing when passed a
16443         non-function argument.
16444
16445 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
16446
16447         * class.c (grow_method): Remove check for redeclaration.
16448
16449 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
16450
16451         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
16452         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
16453         (PRIMARY_TEMPLATE_P): Use it.
16454         * call.c (build_overload_call_real): Use it.
16455         * class.c (instantiate_type): Likewise.
16456         * decl.c (decls_match): Likewise.
16457         * method.c (build_overload_identifier): Likewise.
16458         * pt.c (push_template_decl): Likewise.
16459         (classtype_mangled_name): Likewise.
16460         (lookup_template_class): Likewise.
16461
16462         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
16463         DECL_NTPARMS to conform to usage elsewhere.
16464         * call.c (add_template_candidate): Likewise.
16465         * class.c (instantiate_type): Likewise.
16466         * pt.c (instantiate_template): Likewise.
16467         (get_bindings): Likewise.
16468
16469         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
16470         is_member_template.
16471
16472         * pt.c (unify): Undo changes to allow multiple levels of template
16473         parameters.
16474         (type_unification): Likewise.
16475         (fn_type_unification): Likewise.
16476         (get_class_bindings): Likewise.
16477         * cp-tree.h (Likewise).
16478
16479         * decl.c (replace_defarg): Check that the type of the default
16480         parameter does not invlove a template type before complaining
16481         about the initialization.
16482
16483         * error.c (dump_expr): Deal with template constant parameters in
16484         member templates correctly.
16485
16486         * pt.c (is_member_template): Deal with class specializations
16487         correctly.
16488         (tsubst): Handle "partial instantiation" of member templates
16489         correctly.
16490
16491 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
16492
16493         * pt.c (type_unification): Change calling sequence to allow for
16494         multiple levels of template parameters.
16495         (tsubst_expr): Likewise.
16496         (tsubst): Likewise.
16497         (tsubst_copy): Likewise.
16498         (instantiate_template): Likewise.
16499         (unify): Likewise.
16500         * call.c (build_overload_call_real): Use it.
16501         (add_builtin_candidate): Use it.
16502         (build_new_method_call): Use it.
16503         * class.c (instantiate_type): Use it.
16504         * decl.c (grokdeclarator): Use it.
16505         * decl2.c (finish_file): Use it.
16506         * method.c (build_overload_identifier): Use it.
16507
16508         * call.c (add_template_candidate):  Add additional parameter for
16509         the function return type.  Call fn_type_unification istead of
16510         type_unification.
16511         (build_user_type_conversion_1): Handle member templates.
16512         (build_new_function_call): Likewise.
16513         (build_new_op): Likewise.
16514         (build_new_method_call): Likewise.
16515
16516         * class.c (grow_method): Don't give an error message indicating
16517         that two member templates with the same name are ambiguous.
16518         (finish_struct): Treat member template functions just like member
16519         functions.
16520
16521         * cp-tree.h (check_member_template): Add declaration.
16522         (begin_member_template_processing): Likewise.
16523         (end_member_template_processing): Likewise.
16524         (fn_type_unification): Likewise.
16525         (is_member_template): Likewise.
16526         (tsubst): Change prototype.
16527         (tsubst_expr): Likewise.
16528         (tsubst_copy): Likewise.
16529         (instantiate_template): Likewise.
16530         (get_bindings): Likewise.
16531
16532         * decl.c (decls_match): Handle multiple levels of template
16533         parameters.
16534         (pushdecl): Handle template type params just like other type
16535         declarations.
16536         (push_class_level_binding): Return immediately if the
16537         class_binding_level is NULL.
16538         (grokfndecl): If check_classfn() returns a member_template, use
16539         the result of the template, not the template itself.
16540
16541         * decl2.c (check_member_template): New function.  Check to see
16542         that the entity declared to be a member template can be one.
16543         (check_classfn): Allow redeclaration of member template functions
16544         with different types; the new functions can be specializations or
16545         explicit instantiations.
16546
16547         * error.c (dump_decl): Handle multiple levels of template
16548         parameters.
16549         (dump_function_decl): Update to handle function templates.
16550
16551         * lex.c (do_pending_inlines): Set up template parameter context
16552         for member templates.
16553         (process_next_inline): Likewise.
16554
16555         * method.c (build_overload_identifier): Adjust for multiple levels
16556         of template parameters.
16557
16558         * parse.y (fn.def2): Add member templates.
16559         (component_decl_1): Likewise.
16560
16561         * pt.c (begin_member_template_processing): New function.
16562         (end_member_template_processing): Likewise.
16563         (is_member_template): Likewise.
16564         (fn_type_unification): Likewise.
16565         (current_template_parms): Return a vector of all the template
16566         parms, not just the innermost level of parms.
16567         (push_template_decl): Deal with the possibility of member
16568         templates.
16569         (lookup_template_class): Likewise.
16570         (uses_template_parms): Likewise.
16571         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
16572         TEMPLATE_CONST_PARM to deal with multiple levels of template
16573         arguments.   Add processing of TEMPLATE_DECL to produce new
16574         TEMPLATE_DECLs from old ones.
16575         (do_decl_instantiation): Handle member templates.
16576
16577         * search.c (lookup_fnfields_1): Handle member template conversion
16578         operators.
16579
16580         * tree.c (cp_tree_equal): Check the levels, as well as the
16581         indices, of TEMPLATE_CONST_PARMs.
16582
16583         * typeck.c (comptypes): Check the levels, as well as the indices,
16584         fo TEMPLATE_TYPE_PARMs.
16585         (build_x_function_call): Treat member templates like member
16586         functions.
16587
16588 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
16589
16590         * typeck.c (c_expand_return): Always convert_for_initialization
16591         before checking for returning a pointer to local.
16592
16593         * pt.c (type_unification): If strict and the function parm doesn't
16594         use template parms, just compare types.
16595
16596 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
16597
16598         * method.c (build_overloaded_value): Replace direct call
16599         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
16600
16601 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
16602
16603         * typeck.c (convert_arguments): Don't arbitrarily choose the first
16604         of a set of overloaded functions.
16605
16606 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
16607
16608         * lex.c (real_yylex): Don't elide __FUNCTION__.
16609
16610         * method.c (build_overload_value): Add in_template parm.
16611         (build_overload_int): Likewise.
16612         (build_overload_identifier): Pass it.
16613
16614         * decl.c (duplicate_decls): Don't bash a previous template
16615         definition with a redeclaration.
16616
16617         * pt.c (unify): float doesn't match double.
16618
16619         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
16620         TYPE_DECL.  Handle getting non-template types.
16621         * parse.y (explicit_instantiation): Use typespec instead of
16622         aggr template_type.
16623
16624 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
16625
16626         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
16627
16628 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
16629
16630         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
16631         (compare_ics): Likewise.
16632
16633 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
16634
16635         * call.c (joust): Warn about choosing one conversion op over
16636         another because of 'this' argument when the other return type is
16637         better.
16638         (source_type): New fn.
16639
16640         * call.c (build_new_op): Strip leading REF_BIND from first operand
16641         to builtin operator.
16642
16643         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
16644         use its RTL.
16645
16646 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
16647
16648         * call.c (null_ptr_cst_p): Remove support for (void*)0.
16649
16650 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
16651
16652         * typeck.c (expand_target_expr): Make definition match declaration.
16653
16654         * class.c (get_basefndecls): Make definition match declaration.
16655
16656 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
16657
16658         * input.c (sub_getch): Eventually give up and release the input file.
16659
16660         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
16661         right place.
16662
16663         * call.c (joust): Tweak message.
16664
16665 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
16666
16667         * error.c (type_as_string): Put const/volatile on template type
16668         parameters where appropriate.
16669
16670 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
16671
16672         * call.c (strictly_better): Make arguments unsigned ints.
16673
16674 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
16675
16676         * lex.c (real_yylex): Refer to __complex instead of complex.
16677
16678 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
16679
16680         * lex.c (real_yylex): Don't use getc directly.
16681
16682 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
16683
16684         * call.c (is_subseq): Don't try to be clever.
16685
16686 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
16687
16688         * parse.y, pt.c: Include "except.h".
16689         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
16690         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
16691         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
16692         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
16693         prototyping.
16694
16695 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
16696
16697         * decl2.c (mark_vtable_entries): Instead of replacing pure
16698         virtuals with a reference to __pure_virtual, copy the decl and
16699         change the RTL.
16700
16701 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
16702
16703         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
16704
16705         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
16706
16707         * pt.c (instantiate_class_template): Call repo_template_used
16708         before finish_prevtable_vardecl.
16709
16710         * call.c (is_subseq): New fn.
16711         (compare_ics): Use it.
16712
16713         * repo.c (finish_repo): Don't crash on no args.
16714
16715         * parse.y (named_complex_class_head_sans_basetype): Handle
16716         explicit global scope.
16717         * decl2.c (handle_class_head): New fn.
16718
16719         * pt.c (unify): Add CONST_DECL case.
16720
16721 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16722
16723         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
16724
16725         * cp-tree.h (report_type_mismatch): Add prototype.
16726         * call.c (build_overload_call_real): Remove erroneous fourth
16727         argument to report_type_mismatch.
16728         (build_user_type_conversion_1): Remove erroneous second arg to
16729         tourney.
16730         (build_new_function_call): Likewise.
16731         (build_object_call): Likewise.
16732         (build_new_op): Likewise.
16733         (build_new_method_call): Likewise.
16734
16735 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
16736
16737         * error.c (dump_decl): Don't bother processing a function with no
16738         DECL_LANG_SPECIFIC.
16739
16740         * method.c (emit_thunk): Call init_function_start in the macro case.
16741
16742 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
16743
16744         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
16745         defined and used to set flag_vtable_thunks.
16746
16747 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
16748
16749         * parse.y: Don't clear the inlines from their obstack until they've
16750         all been processed.
16751
16752         * decl.c (duplicate_decls): Don't complain about exception
16753         specification mismatch if flag_exceptions is off.
16754
16755 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
16756
16757         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
16758
16759 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
16760
16761         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
16762         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
16763         Include <stdio.h> before include files that formerly used STDIO_PROTO.
16764
16765         * decl.c, g++spec.c, lex.c, method.c, repo.c:
16766         Include "config.h" first, as per autoconf manual.
16767
16768 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
16769
16770         * decl.c (duplicate_decls): Tweak wording.
16771         * lex.c (do_pending_defargs): Don't die if we see a default arg
16772         that isn't a DEFAULT_ARG.
16773         * error.c (dump_expr): Handle DEFAULT_ARG.
16774
16775         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
16776         * lang-options.h: Add -fhandle-exceptions.
16777
16778         * class.c (build_vtable): Vtables are artificial.
16779         (prepare_fresh_vtable): Likewise.
16780
16781 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16782
16783         * cvt.c (ocp_convert): After converting to the target type, set
16784         LOOKUP_NO_CONVERSION.
16785
16786         * call.c (joust): Warn about potentially confusing promotion rules
16787         with -Wsign-promo.
16788         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
16789
16790 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
16791
16792         * exception.cc: Declare __terminate_func with noreturn attribute.
16793
16794 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
16795
16796         * parse.y: Break out eat_saved_input, handle errors.
16797         (function_try_block): Use compstmt instead of compstmt_or_error.
16798
16799 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
16800
16801         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
16802
16803 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
16804
16805         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
16806         existence of cc1plus check whether $(LANGUAGES) contains C++.
16807
16808 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
16809
16810         * method.c (do_build_copy_constructor): When copying an anonymous
16811         union member loop around to handle nested anonymous unions.  Use
16812         the offset of the member relative to the outer structure, not the
16813         union.
16814
16815 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
16816
16817         * call.c (resolve_args): New fn.
16818         (build_new_function_call): Use it.
16819         (build_object_call): Likewise.
16820         (build_new_method_call): Likewise.
16821
16822 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16823
16824         * call.c (build_over_call): tsubst all default parms from templates.
16825
16826 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
16827
16828         * decl.c (struct cp_function): Add static_labelno.
16829         (push_cp_function_context): Save it.
16830         (pop_cp_function_context): Restore it.
16831
16832 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
16833
16834         * typeck.c (build_component_ref_1): Convert from reference.
16835
16836 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16837
16838         * parse.y (current_declspecs, prefix_attributes): Initialize to
16839         NULL_TREE.
16840
16841         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
16842         before we try to force it to be a TREE_LIST.
16843         (decl): Make sure $1.t is non-nil.
16844
16845 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
16846
16847         * pt.c (uses_template_parms): Handle template first-parse codes.
16848
16849         * decl.c (cp_finish_decl): Only warn about user-defined statics.
16850
16851 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
16852
16853         * pt.c (unify): Handle BOOLEAN_TYPE.
16854
16855         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
16856         * pt.c (tsubst): Don't set it.
16857         * call.c (build_over_call): Use uses_template_parms.
16858
16859 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
16860
16861         * method.c (build_overload_nested_name): Use static_labelno
16862         instead of var_labelno.
16863         (build_qualified_name): New fn.
16864         (build_overload_name): Split out from here.
16865         (build_static_name): Use build_qualified_name.
16866         * decl.c (cp_finish_decl): Statics in extern inline functions
16867         have comdat linkage.
16868         (start_function): Initialize static_labelno.
16869
16870 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16871
16872         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
16873         before "all member functions in class [] are private".
16874
16875 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
16876
16877         * lex.c (do_scoped_id): convert_from_reference.
16878         * init.c (build_offset_ref): Likewise.
16879
16880 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
16881
16882         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
16883
16884 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
16885
16886         * typeck.c (get_member_function_from_ptrfunc): Promote index
16887         before saving it.
16888
16889 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
16890
16891         * tree.c (layout_basetypes): Move non-virtual destructor warning.
16892         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
16893
16894 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
16895
16896         * decl.c (grokdeclarator): Call add_defarg_fn for the function
16897         type, too.
16898         * lex.c (add_defarg_fn): Adjust.
16899         (do_pending_defargs): Adjust.  Don't skip the first parm.
16900
16901 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
16902
16903         * decl.c (build_enumerator): Global enumerators are also readonly.
16904
16905         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
16906         (build_dynamic_cast): Call it and convert_from_reference.
16907
16908         * lex.c (add_defarg_fn): New fn.
16909         (snarf_defarg): Don't add to defarg_types.
16910         (do_pending_defargs): Lose defarg_types.  All fns we process now
16911         have defargs.
16912         * decl.c (grokfndecl): Call add_defarg_fn.
16913
16914         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
16915         * cp-tree.def: Add DEFAULT_ARG.
16916         * spew.c (yylex): Call snarf_defarg as appropriate.
16917         * parse.y: New tokens DEFARG and DEFARG_MARKER.
16918         (defarg_again, pending_defargs, defarg, defarg1): New rules.
16919         (structsp): Use pending_defargs.
16920         (parms, full_parm): Use defarg.
16921         * lex.c (init_lex): Initialize inline_text_firstobj.
16922         (do_pending_inlines): Never pass the obstack to feed_input.
16923         (process_next_inline): Call end_input instead of restore_pending_input.
16924         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
16925         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
16926         * input.c (end_input): New fn.
16927         (sub_getch): At the end of some fed input, just keep returning EOF
16928         until someone calls end_input.
16929         Remove 'obstack' field from struct input_source.
16930         * decl.c (grokparms): Handle DEFAULT_ARG.
16931         (replace_defarg): New fn.
16932         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
16933
16934 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
16935
16936         * call.c (implicit_conversion): If nothing else works, try binding
16937         an rvalue to a reference.
16938
16939 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
16940
16941         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
16942         ifndef for Cygwin32 to include SIGSEGV.
16943
16944 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
16945
16946         * class.c (finish_struct_1): Only complain about pointers without
16947         copy stuff if there are any constructors.
16948
16949         * rtti.c (build_dynamic_cast): Call complete_type on the types.
16950
16951         * decl.c (grokfndecl): If the function we chose doesn't actually
16952         match, die.
16953
16954         * decl2.c (grokclassfn): Don't specify 'const int' for the
16955         artificial destructor parm.
16956
16957         * pt.c (type_unification): If we are called recursively, nothing
16958         decays.
16959
16960 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
16961
16962         * decl.c (init_decl_processing): Stop trying to catch signals
16963         other than SIGABRT since the Cygwin32 library doesn't support
16964         them correctly yet.  This fixes a situation in which g++ causes
16965         a hang on SIGSEGVs and other such signals in our Win32-hosted
16966         tools.
16967
16968 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
16969
16970         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
16971
16972 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
16973
16974         * typeck2.c (store_init_value): Always return the value if our
16975         type needs constructing.
16976
16977         * method.c (hack_identifier): Convert class statics from
16978         reference, too.
16979
16980 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
16981
16982         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
16983
16984 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
16985
16986         * typeck.c (c_expand_return): Make sure we clean up temporaries at
16987         the end of return x;
16988
16989 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16990
16991         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
16992
16993 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
16994
16995         * except.c (expand_builtin_throw): Add support
16996         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
16997
16998 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
16999
17000         * repo.c (extract_string): Null-terminate.
17001
17002         * cp-tree.h (TI_SPEC_INFO): New macro.
17003         (CLASSTYPE_TI_SPEC_INFO): New macro.
17004         * pt.c (push_template_decl): Correctly determine # of template parms
17005         for partial specs.
17006
17007         * call.c (compare_ics): Really fix 'this' conversions.
17008
17009         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
17010         non-template fn.
17011
17012         * pt.c (push_template_decl): Complain about mismatch in # of
17013         template parms between a class template and a member template.
17014
17015 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
17016
17017         * method.c (synthesize_method): You can't call
17018         function_cannot_inline_p after finish_function.
17019         * decl.c (finish_function): Turn on flag_inline_functions and turn
17020         off DECL_INLINE before handing a synthesized method to the
17021         backend.
17022
17023 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
17024
17025         * method.c (synthesize_method): Remove July 30 change to never set
17026         DECL_INLINE if at_eof.
17027
17028 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
17029
17030         * xref.c (GNU_xref_member): Ensure that the node has a
17031         decl_lang_specific part before checking DECL_FRIEND_P.
17032
17033 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
17034
17035         * pt.c (instantiate_class_template): Diagnose non-class types used
17036         as bases.
17037
17038 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
17039
17040         * typeck.c (build_conditional_expr): Use convert_for_initialization
17041         instead of convert_and_check.
17042
17043 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17044
17045         * parse.y (typespec): Don't pedwarn for typeof.
17046
17047 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
17048
17049         * repo.c (finish_repo): Only check changes if we would write a
17050         repo file.
17051
17052         * call.c (compare_ics): Fix handling of 'this' conversions.
17053
17054         * pt.c (do_decl_instantiation): Support static data too.  Rename
17055         from do_function_instantiation.
17056         * cp-tree.h: Adjust.
17057         * parse.y: Adjust.
17058
17059         * repo.c (extract_string): New fn.
17060         (get_base_filename): Use it.
17061         (init_repo): Compare old args with current args.
17062
17063 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
17064
17065         * Makefile.in, Make-lang.in: Protect C-ls with a comment
17066         character, idea from Paul Eggert <eggert@twinsun.com>.
17067
17068 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
17069
17070         * typeck.c (c_expand_return): Be more persistent in looking for
17071         returned temps.
17072
17073         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
17074         pointer to reference.
17075
17076         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
17077
17078 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
17079
17080         * init.c (build_member_call, build_offset_ref):
17081         Use do_scoped_id instead of do_identifier.
17082
17083         * cvt.c (convert): Remove bogosity.
17084
17085 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17086
17087         * cvt.c (build_up_reference): Do checks of ARGTYPE and
17088         TARGET_TYPE before trying to use get_binfo.
17089
17090 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
17091
17092         * cvt.c (build_up_reference): Call get_binfo to get access control.
17093
17094         * decl2.c (import_export_decl): If we don't support weaks, leave
17095         statics undefined.
17096
17097 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
17098
17099         * except.c (expand_builtin_throw): Add support for machines that
17100         cannot access globals after throw's epilogue when
17101         -fno-sjlj-exceptions is used.
17102
17103 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
17104
17105         * parse.y: 'std::' becomes '::'.
17106         * lex.c (real_yylex): Remove 'namespace' warning.
17107         * init.c (build_member_call): Ignore 'std::'.
17108         (build_offset_ref): Likewise.
17109         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
17110         (do_toplevel_using_decl): Ignore 'using std::whatever'.
17111         * decl.c (push_namespace): Just sorry.
17112         (pop_namespace): Nop.
17113         (init_decl_processing): Declare std namespace.
17114
17115 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
17116
17117         * search.c (push_class_decls): A name which ambiguously refers to
17118         several instantiations of the same template just refers to the
17119         template.
17120
17121 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
17122
17123         * decl.c (build_enumerator): Fix problem with unsigned long
17124         enumerated values being smashed to ints, causing overflow
17125         when computing next enumerated value (for enum values around
17126         MAX_VAL).
17127
17128 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
17129
17130         * typeck.c (build_component_ref): Only call mark_used on a decl.
17131
17132 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17133
17134         * typeck.c (build_c_cast): Make the check for a ptr to function
17135         more specific before possible default_conversion call.
17136
17137 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
17138
17139         * except.c (expand_exception_blocks): Simplify and fix and make
17140         sure we don't end a region in a sequence, as expand_end_bindings
17141         doesn't like it.
17142
17143 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
17144
17145         * except.c (init_exception_processing): Mark terminate as not
17146         returning so that the optimizer can optimize better.
17147
17148 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
17149
17150         * cvt.c (convert): Don't do any extra work, if we can avoid it
17151         easily.
17152
17153 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
17154
17155         * *.[chy]: Change cp_convert to ocp_convert, change convert to
17156         cp_convert.  convert is now reserved for the backend, and doesn't
17157         have the semantics a frontend person should ever want.
17158
17159 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
17160
17161         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
17162         Lose -traditional support.
17163
17164 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
17165
17166         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
17167
17168         * parse.y (self_reference): Do it for templates, too.
17169         * class.c (pushclass): Don't overload_template_name; the alias
17170         generated by build_self_reference serves the same purpose.
17171
17172         * tree.c (list_hash): Make static, take more args.
17173         (list_hash_lookup): Likewise.
17174         (list_hash_add): Make static.
17175         (list_hash_canon): Lose.
17176         (hash_tree_cons): Only build a new node if one isn't already in the
17177         hashtable.
17178         (hash_tree_chain): Use hash_tree_cons.
17179         * cp-tree.h: Adjust.
17180         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
17181         of calling lookup_name.
17182
17183 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
17184
17185         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
17186         doesn't refer to the CONST_DECLs.
17187
17188 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
17189
17190         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
17191         is bigger.
17192         (expand_class_desc): Convert the last argument to a sizetype.
17193
17194 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17195
17196         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
17197         __real__): Add reswords.
17198         * hash.h: Regenerate.
17199         * lex.h (rid): Add RID_COMPLEX.
17200         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
17201         * lex.c (init_lex): Add building of RID_COMPLEX.
17202         (real_yylex): General cleanup in line with what c-lex.c also has,
17203         sans the cruft for traditional; add handling of SPEC_IMAG, complex
17204         types, and imaginary numeric constants.
17205         * parse.y (REALPART, IMAGPART): Add tokens.
17206         (unary_expr): Add REALPART and IMAGPART rules.
17207         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
17208         * decl.c (complex_{integer,float,double,long}_type_node): Define
17209         types.
17210         (init_decl_processing): Set up the types.
17211         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
17212         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
17213         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
17214         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
17215         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
17216         COMPLEX_TYPE case.
17217         * method.c (build_overload_name): Add handling of the different
17218         COMPLEX_TYPEs, prefixing them with `J'.
17219         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
17220         as a template parm.
17221         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
17222         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
17223         (mapcar): Handle COMPLEX_CST.
17224         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
17225         (common_type): Add code for complex types.
17226         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
17227         (convert_for_assignment): Likewise.
17228         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
17229
17230 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
17231
17232         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
17233         tsubst_expr, as it might try to do overload resolution.
17234
17235 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
17236
17237         * pt.c (instantiate_class_template): Oops.
17238
17239 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
17240
17241         * cp-tree.def: Add TAG_DEFN.
17242         * pt.c (tsubst_enum): New fn.
17243         (instantiate_class_template): Use it.
17244         (tsubst_expr): Support TAG_DEFN.
17245         (tsubst): Support local enums.
17246         (tsubst_copy): Likewise.
17247         * decl.c (finish_enum): Likewise.
17248         (start_enum): If this is a local enum, switch to permanent_obstack.
17249
17250 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
17251
17252         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
17253         (finish_function): Put the base init code for constructors just
17254         after the parm cleanup insns.
17255         (struct cp_function): Add last_parm_cleanup_insn.
17256         (push_cp_function_context): Likewise.
17257         (pop_cp_function_context): Likewise.
17258
17259 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
17260
17261         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
17262
17263 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17264
17265         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
17266         for THUNK_FNDECL before we switch to temporary allocation.
17267
17268 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
17269
17270         * call.c (build_new_op): Handle null arg2 for ?:.
17271
17272 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
17273
17274         * except.c (expand_exception_blocks): Ensure that we flow through
17275         the end of the exception region for the exception specification.
17276         Move exception region for the exception specification in, so that
17277         it doesn't protect the parm cleanup.  Remove some obsolete code.
17278         * decl.c (store_parm_decls): Likewise.
17279         (finish_function): Likewise.
17280
17281 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
17282
17283         * init.c (build_new): Fix nothrow handling.
17284
17285 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17286
17287         * init.c (emit_base_init): Don't warn about the initialization
17288         list for an artificial member.
17289
17290 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17291
17292         * expr.c (do_case): Handle !START case for the error msg.
17293
17294 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
17295
17296         * decl2.c, lang-options.h: New option -Weffc++.
17297         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
17298         to -Weffc++.
17299
17300         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
17301         to MULTIPLE_SYMBOL_SPACES.
17302
17303 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
17304
17305         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
17306
17307         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
17308
17309         * typeck.c (c_expand_return): Don't complain about returning void
17310         to void in an artificial function.
17311         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
17312         don't set DECL_RESULT, set DECL_ARTIFICIAL.
17313         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
17314
17315 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
17316
17317         * init.c (init_decl_processing): Add support for setjmp/longjmp based
17318         exception handling.
17319         * except.c (init_exception_processing): Likewise.
17320         (expand_end_catch_block): Likewise.
17321         (expand_exception_blocks): Likewise.
17322         (expand_throw): Likewise.
17323         * exception.cc (__default_terminate): Likewise.
17324
17325         * init.c (perform_member_init): Use new method of expr level
17326         cleanups, instead of cleanups_this_call and friends.
17327         (emit_base_init): Likewise.
17328         (expand_aggr_vbase_init_1): Likewise.
17329         (expand_vec_init): Likewise.
17330         * decl.c (cp_finish_decl): Likewise.
17331         (expand_static_init): Likewise.
17332         (store_parm_decls): Likewise.
17333         (cplus_expand_expr_stmt): Likewise.
17334         * decl2.c (finish_file): Likewise.
17335
17336         * Make-lang.in (exception.o): Ok to compile with -O now.
17337
17338         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
17339         we know it will be done later by the backend.
17340
17341         * decl2.c (lang_f_options): Remove support for short temps.
17342         * lang-options.h: Likewise.
17343
17344 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
17345
17346         * tree.c (varargs_function_p): New fn.
17347         * method.c (emit_thunk): Replace broken generic code with code to
17348         generate a heavyweight thunk function.
17349
17350 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
17351
17352         * pt.c (process_template_parm): pedwarn about floating-point parms.
17353
17354         * decl.c (grokdeclarator): inline no longer implies static.
17355
17356         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
17357
17358 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
17359
17360         * class.c (check_for_override): The signature of an overriding
17361         function is not changed.
17362
17363         * call.c (build_over_call): Move setting of conv into the loop.
17364         Note: this change, along with the related changes of the 18th thru
17365         the 20th of April, fix an infinite loop problem in conversions.
17366
17367 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
17368
17369         * call.c (build_user_type_conversion_1): Really ignore rvalue
17370         conversions when looking for a REFERENCE_TYPE.
17371
17372         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
17373         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
17374         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
17375         (build_unary_op): Likewise.
17376         * call.c (build_over_call): See through a CONVERT_EXPR around the
17377         ADDR_EXPR for on a temporary.
17378         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
17379         the ADDR_EXPR for a local variable.
17380
17381 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
17382
17383         * call.c (build_user_type_conversion_1): If we're trying to
17384         convert to a REFERENCE_TYPE, only consider lvalue conversions.
17385         (build_new_function_call): Print candidates.
17386         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
17387         (reference_binding): Binding a temporary of a reference-related type
17388         is BAD.
17389
17390 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17391
17392         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
17393         * tinfo2.cc (type_info::before): Likewise.
17394
17395 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
17396
17397         * call.c (implicit_conversion): Oops.
17398
17399 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
17400
17401         * call.c (implicit_conversion): Try to find a reference conversion
17402         before binding a const reference to a temporary.
17403
17404 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
17405
17406         * exception.cc (__default_unexpected): Call terminate by default,
17407         so that if the user overrides terminate, the correct function will
17408         be called.
17409
17410 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
17411
17412         * parse.y (left_curly): Avoid trying to use any fields of
17413         error_mark_node, as there aren't any.
17414
17415 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
17416
17417         * lex.c (do_identifier): Avoid breaking on overloaded methods
17418         as default arguments.
17419
17420 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
17421
17422         * call.c (add_template_candidate): Initialize the variable "dummy".
17423
17424 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
17425
17426         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
17427         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
17428
17429 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17430
17431         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
17432         (debug_binfo): Delete decl, not needed.
17433
17434         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
17435         promotes_to_aggr_type): Delete fns.
17436         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
17437         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
17438         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
17439
17440         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
17441
17442         * friend.c (is_friend_type): Delete fn.
17443         * cp-tree.h (is_friend_type): Delete decl.
17444
17445         * decl.c (original_result_rtx, double_ftype_double,
17446         double_ftype_double_double, int_ftype_int, long_ftype_long,
17447         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
17448         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
17449
17450         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
17451         fwd decls.
17452         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
17453
17454         * decl.c (pushdecl_nonclass_level): #if 0, unused.
17455         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
17456
17457         * lex.c (reinit_lang_specific): #if 0, unused.
17458         * cp-tree.h (reinit_lang_specific): #if 0 decl.
17459
17460         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
17461         * cp-tree.h (revert_static_member_fn): Delete decl.
17462
17463         * class.c (root_lang_context_p): Delete fn.
17464         * cp-tree.h (root_lang_context_p): Delete decl.
17465
17466         * decl.c (set_current_level_tags_transparency): #if 0, unused.
17467         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
17468
17469         * lex.c (set_vardecl_interface_info): Make static.
17470         * cp-tree.h (set_vardecl_interface_info): Delete decl.
17471
17472         * call.c (find_scoped_type): Make static.
17473         * cp-tree.h (find_scoped_type): Delete decl.
17474
17475         * search.c (convert_pointer_to_vbase): Make static.
17476         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
17477
17478         * decl.c (const_ptr_type_node): Likewise.
17479         * cp-tree.h (const_ptr_type_node): Delete decl.
17480
17481         * typeck.c (common_base_type): Make static.
17482         * cp-tree.h (common_base_types): Delete erroneous decl.
17483
17484         * pt.c (classtype_mangled_name): Make static.
17485         * cp-tree.h (classtype_mangled_name): Delete decl.
17486
17487         * lex.c (check_newline): Make static.
17488         * cp-tree.h (check_newline): Delete decl.
17489
17490         * typeck.c (build_x_array_ref): Delete fn, same idea as
17491         grok_array_decl.
17492         * cp-tree.h (build_x_array_ref): Delete decl.
17493
17494         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
17495         copy_lang_decl.
17496         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
17497
17498         * class.c (build_vtable_entry): Make static.
17499         * cp-tree.h (build_vtable_entry): Delete decl.
17500
17501         * class.c (build_vbase_pointer): Make static.
17502         * cp-tree.h (build_vbase_pointer): Delete decl.
17503
17504         * sig.c (build_sptr_ref): Add forward decl and make static.
17505         * cp-tree.h (build_sptr_ref): Delete decl.
17506
17507         * call.c (build_new_method_call): Add forward decl and make static.
17508         * cp-tree.h (build_new_method_call): Delete decl.
17509
17510         * call.c (build_object_call): Make static.
17511         * class.c (check_for_override, complete_type_p, mark_overriders):
17512         Likewise.
17513         * decl.c (cp_function_chain): Likewise.
17514         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
17515         Likewise.
17516         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
17517         Likewise.
17518         * tree.c (build_cplus_array_type_1): Likewise.
17519         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
17520         (comp_target_parms): Likewise.
17521
17522         * init.c (build_builtin_call): Make static.
17523         * cp-tree.h (build_builtin_call): Delete decl.
17524
17525         * typeck.c (binary_op_error): Delete decl.
17526         * cp-tree.h (binary_op_error): Likewise.
17527
17528 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17529
17530         * call.c (build_method_call): Compare against error_mark_node
17531         directly, rather than the ERROR_MARK tree code.
17532         * cvt.c (cp_convert): Likewise.
17533         * decl.c (print_binding_level): Likewise.
17534         (duplicate_decls): Likewise.
17535         (grokdeclarator): Likewise.
17536         (grokdeclarator): Likewise.
17537         * init.c (expand_aggr_init_1): Likewise.
17538         (decl_constant_value): Likewise.
17539         * method.c (build_opfncall): Likewise.
17540         (hack_identifier): Likewise.
17541         * typeck.c (build_modify_expr): Likewise.
17542
17543         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
17544
17545 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
17546
17547         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
17548
17549         * pt.c (coerce_template_parms): Add new error message.
17550
17551         * method.c (build_overload_value): Implement name mangling for
17552         floating-point template arguments.
17553
17554         * method.c (build_overload_int, icat, dicat): Fix mangling of template
17555         arguments whose absolute value doesn't fit in a signed word.
17556
17557 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17558
17559         * friend.c: New file; put all of the friend stuff in here.
17560         * init.c: Instead of here.
17561         * Makefile.in (CXX_OBJS): Add friend.o.
17562         (friend.o): Add dependencies.
17563         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
17564
17565 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
17566
17567         * call.c (build_scoped_method_call): Complain if the scope isn't a
17568         base.
17569
17570 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
17571
17572         * parse.y (left_curly): Don't crash on erroneous type.
17573
17574         * init.c (build_delete): Fix type of ref.
17575
17576 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
17577
17578         * search.c (get_vbase_1): Renamed from get_vbase.
17579         (get_vbase): Wrapper, now non-static.
17580         (convert_pointer_to_vbase): Now static.
17581
17582         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
17583         * init.c (build_delete): Pass one.
17584         (build_partial_cleanup_for): Use build_scoped_method_call.
17585         * decl.c (finish_function): Pass a binfo.
17586
17587 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
17588
17589         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
17590
17591         * typeck.c (build_c_cast): Lose other reference to flag.
17592
17593         * call.c (build_field_call): Don't look for [cd]tor_identifier.
17594         * decl2.c (delete_sanity): Remove meaningless use of
17595         LOOKUP_HAS_IN_CHARGE.
17596         * decl.c (finish_function): Use build_scoped_method_call instead
17597         of build_delete for running vbase dtors.
17598         * init.c (build_delete): Call overload resolution code instead of
17599         duplicating it badly.
17600
17601 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
17602
17603         * call.c (build_over_call): Call mark_used before trying to elide
17604         the call.
17605
17606         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
17607
17608 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17609
17610         * typeck.c (build_modify_expr): Always pedwarn for a cast to
17611         non-reference used as an lvalue.
17612
17613 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
17614
17615         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
17616
17617 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
17618
17619         * parse.y (handler): Fix template typo.
17620
17621 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
17622
17623         * error.c (lang_decl_name): New fn.
17624         * tree.c (lang_printable_name): Use it.
17625
17626 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
17627
17628         * g++spec.c: Include config.h so that we can catch bzero #defines
17629         from the config file.
17630
17631 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
17632
17633         * new1.cc: Include a declaration for malloc, to avoid warning, and
17634         avoid lossing on systems that require one (ones that define malloc
17635         in xm.h).
17636
17637 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
17638
17639         * decl2.c (max_tinst_depth): New variable.
17640         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
17641         option.
17642         * pt.c (max_tinst_depth): Variable moved.
17643         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
17644         as legal.
17645
17646 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
17647
17648         * decl.c (xref_basetypes): Allow a base class that depends on
17649         template parms to be incomplete.
17650
17651         * decl2.c (build_expr_from_tree): Support typeid(type).
17652         * rtti.c (get_typeid): Support templates.
17653         (expand_si_desc, expand_class_desc): Fix string length.
17654         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
17655
17656 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
17657
17658         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
17659
17660         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
17661
17662 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
17663
17664         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
17665         smashes together template and non-template decls of the same
17666         signature.
17667
17668 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
17669
17670         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
17671
17672 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17673
17674         * decl.c (duplicate_decls): Next route, pedwarn about different
17675         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
17676
17677 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17678
17679         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
17680         (struct lang_type): Delete has_default_implementation member.
17681         Increase dummy to 21.
17682         * decl.c (start_method): Delete usage.
17683
17684         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
17685         store_after_parms, start_decl_1, auto_function): Add decls.
17686         (get_arglist_len_in_bytes, declare_implicit_exception,
17687         have_exceptions_p, make_type_decl, typedecl_for_tag,
17688         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
17689         build_component_type_expr, cplus_exception_name,
17690         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
17691         * call.c (build_this): Make static.
17692         (is_complete): Likewise.
17693         (implicit_conversion): Likewise.
17694         (reference_binding): Likewise.
17695         (standard_conversion): Likewise.
17696         (strip_top_quals): Likewise.
17697         (non_reference): Likewise.
17698         (build_conv): Likewise.
17699         (user_harshness): Likewise.
17700         (rank_for_ideal): Likewise.
17701         * decl.c (start_decl_1): Delete forward decl.
17702         (push_decl_level): Make static.
17703         (resume_binding_level): Make static.
17704         (namespace_bindings_p): Make static.
17705         (declare_namespace_level): Make static.
17706         (lookup_name_real): Make static.
17707         (duplicate_decls): Make static.  Take register off NEWDECL and
17708         OLDDECL parm decls.
17709         * decl2.c (get_sentry): Make static.
17710         (temp_name_p): Delete fn.
17711         * except.c (auto_function): Delete decl.
17712         * lex.c (handle_{cp,sysv}_pragma): Make static.
17713         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
17714         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
17715         * pt.c (tsubst_expr_values): Make static.
17716         * rtti.c (combine_strings): Delete decl.
17717
17718 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
17719
17720         * pt.c (push_template_decl): Handle getting a typedef.
17721
17722         * call.c (build_new_function_call): Complain about void arg.
17723
17724 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17725
17726         * decl.c (duplicate_decls): Give pedwarn of different exceptions
17727         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
17728
17729 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
17730
17731         * except.c (expand_throw): Don't expand the cleanup tree here,
17732         since we are not going to write the rtl out.  Fixes problem with
17733         -g -O on SPARC.
17734
17735 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
17736
17737         * Make-lang.in: Add $(exeext) as necessary.
17738
17739 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
17740
17741         * parse.y (handler_seq): Must have at least one catch clause.
17742
17743 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
17744
17745         * call.c (add_builtin_candidate): Restore ?: hack.
17746
17747         * decl.c (grok_op_properties): More warnings.
17748
17749 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17750
17751         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
17752         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
17753
17754         * decl.c (duplicate_decls): Scale back to a warning, and only do
17755         'em if -pedantic.
17756
17757 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
17758
17759         * decl.c (duplicate_decls): pedwarn mismatched exception
17760         specifications.
17761
17762 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
17763
17764         * call.c (build_new_method_call): Don't display the invisible
17765         argument for controlling virtual bases.
17766
17767 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
17768
17769         * new: Add nothrow new and delete, bad_alloc and throw specifications
17770         for delete.
17771         * decl.c (init_decl_processing): Add throw specification for delete.
17772         * new.cc (nothrow): Define.
17773         * lex.c (real_yylex): Removing warning that throw and friends are
17774         keywords.
17775         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
17776         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
17777         * Make-lang.in: Add new{1,2}.{cc,o}.
17778
17779 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
17780
17781         * lex.c (cons_up_default_function): Fix return type of synth op=.
17782
17783         * init.c (emit_base_init): Add warnings for uninitialized members
17784         and bases.
17785
17786         * decl.c (xref_basetypes): Add warning for non-polymorphic type
17787         with destructor used as base type.
17788
17789         * decl.c (grok_op_properties): Add warning for op= returning void.
17790         * typeck.c (c_expand_return): Add warning for op= returning anything
17791         other than *this.
17792
17793         * class.c (finish_struct_1): Add warning for class with pointers
17794         but not copy ctor or copy op=.
17795
17796         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
17797         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
17798         (instantiate_template): If -fexternal-templates, add this
17799         instantiation to pending_templates.
17800
17801         * decl2.c (copy_assignment_arg_p): Disable old hack to support
17802         Booch components.
17803
17804 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
17805
17806         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
17807
17808 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
17809
17810         * call.c (standard_conversion): Handle getting references.  Tack
17811         on RVALUE_CONV here.  Do it for non-class types, too.
17812         (reference_binding): Pass references to standard_conversion.
17813         (implicit_conversion): Likewise.
17814         (add_builtin_candidate): Disable one ?: kludge.
17815         (convert_like): Handle RVALUE_CONVs for non-class types.
17816         (joust): Disable the other ?: kludge.
17817
17818 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17819
17820         * decl.c (init_decl_processing): Add code to build up common
17821         function types beforehand, to avoid creation then removal of
17822         things already in the hash table.
17823
17824 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
17825
17826         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
17827         the arguments.
17828
17829         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
17830         current_template_parms.
17831
17832 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
17833
17834         * search.c (lookup_field): Don't return a function, check want_type.
17835
17836 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17837
17838         * init.c (build_new): Make sure PLACEMENT has a type.
17839
17840 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
17841
17842         * init.c (build_new): Support new (nothrow).
17843
17844 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
17845
17846         * pt.c (instantiate_decl): Also do push_to_top_level before setting
17847         up DECL_INITIAL.
17848
17849         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
17850         * pt.c (tsubst): Defer instantiation of default args.
17851         * call.c (build_over_call): Until here.
17852
17853 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17854
17855         * search.c (lookup_field): Make sure we have an
17856         IDENTIFIER_CLASS_VALUE before we try to return it.
17857
17858 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17859
17860         * call.c (build_method_call): Delete unused var PARM.
17861         (build_overload_call_real): Likewise.
17862         (build_object_call): Delete unused var P.
17863         (build_new_op): Likewise.
17864         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
17865         var definitions, which are never used.
17866         (shadow_tag): Delete unused var FN.
17867         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
17868         * init.c (build_new): Delete unused var ALLOC_TEMP.
17869         * method.c (hack_identifier): Delete unused var CONTEXT.
17870         (do_build_copy_constructor): Delete unused var NAME.
17871         (synthesize_method): Delete unused var BASE.
17872         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
17873         * rtti.c (build_headof): Delete unused var VPTR.
17874         (get_typeid): Delete unused var T.
17875         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
17876         and ORIG_OP2.
17877         (build_ptrmemfunc): Delete unused vars U and NINDEX.
17878         * typeck2.c (build_functional_cast): Delete unused var BINFO.
17879
17880 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
17881
17882         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
17883         things in a type being defined.
17884         * decl.c (finish_enum): Reverse the values so that they are in
17885         the correct order.
17886
17887         * pt.c (instantiate_class_template): Don't initialize
17888         BINFO_BASETYPES until the vector is filled out.
17889         (unify): Don't abort on conflicting bindings, just fail.
17890         (instantiate_decl): Do push_tinst_level before any tsubsting.
17891
17892         * method.c (build_overload_value): Handle getting a
17893         TEMPLATE_CONST_PARM for a pointer.
17894
17895 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
17896
17897         * init.c (expand_member_init): Don't give 'not a base' error for
17898         templates.
17899
17900         * pt.c (instantiate_decl): Call import_export_decl later.
17901
17902         * pt.c (instantiate_class_template): Return a value.
17903
17904         * parse.y (extension): New rule for __extension__.
17905         (extdef, unary_expr, decl, component_decl): Use it.
17906
17907 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
17908
17909         * class.c (base_binfo): Remove unused base_has_virtual member.
17910         (finish_base_struct): Likewise.
17911         (finish_struct_1): Likewise.
17912
17913 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
17914
17915         * search.c (expand_upcast_fixups): Fix bogus code generation
17916         problem where the generated code uses the wrong index into the
17917         runtime built vtable on the stack.  Old code could clobber random
17918         stack values.
17919
17920 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
17921
17922         * init.c (perform_member_init): Make sure the partial EH cleanups
17923         live on the function_obstack.
17924
17925 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
17926
17927         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
17928         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
17929
17930 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
17931
17932         * decl.c (grokvardecl): Avoid ANSI style initialization.
17933
17934 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
17935
17936         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
17937
17938 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
17939
17940         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
17941
17942 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17943
17944         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
17945         arguments we compare against.  Start the count of I at 1, not 0,
17946         since argv[0] is still the command.
17947
17948 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
17949
17950         * lang-specs.h: Accept .cp as an C++ extension.
17951
17952 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17953
17954         * cp-tree.h (ptr_reasonably_similar): Add decl.
17955
17956 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17957
17958         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
17959         pointer.  New local SPECBITS with the parm's value.
17960         (grokdeclarator): Pass &specbits down.
17961
17962         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
17963         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
17964
17965         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
17966         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
17967
17968         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
17969         not an error_mark_node.
17970
17971 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17972
17973         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
17974         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
17975
17976 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17977
17978         * decl.c (grokdeclarator): When giving an anonymous struct a name,
17979         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
17980         not affected).
17981
17982         * typeck2.c (build_m_component_ref): If component is a pointer
17983         to data member, resolve the OFFSET_REF now.
17984
17985         * call.c (convert_like): Don't go into infinite recursion.
17986
17987         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
17988
17989         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
17990         * tree.c (layout_basetypes): And on the vbase ptr.
17991
17992 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
17993
17994         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
17995         CHAR_TYPE_SIZE so bool is always the same size as another type.
17996
17997         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
17998
17999 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
18000
18001         * decl2.c (grok_x_components): Remove synthesized methods from
18002         TYPE_METHODS of an anonymous union, complain about member
18003         functions.
18004         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
18005         anonymous unions.
18006         (finish_function): Just clear the DECL_RTL of our arguments.
18007
18008 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18009
18010         * decl2.c (finish_file): Emit DWARF debugging info for static data
18011         members.
18012
18013         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
18014
18015 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
18016
18017         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
18018         IDENTIFIER_NODE.
18019
18020 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
18021
18022         * Make-lang.in (g++-cross$(exeext)): Fix typo.
18023
18024 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18025
18026         Make the g++ driver now be a standalone program, rather than one
18027         that tries to run the gcc driver after munging up the options.
18028         * Make-lang.in (g++.c, g++spec.o): New rules.
18029         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
18030         added.
18031         (g++$(exeext)): New rule, based on xgcc rule.
18032         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
18033         * g++spec.c: New file.
18034         * g++.c: Removed file.
18035
18036 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
18037
18038         * cvt.c (build_up_reference): Arrange for any temporary values
18039         that have been keep in registers until now to be put into memory.
18040
18041 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18042
18043         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
18044         that make -j3 bootstrap works better.
18045
18046 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
18047
18048         * decl.c (pushtag): Do pushdecl for anon tags.
18049
18050 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
18051
18052         * typeck.c (c_expand_return): Fix logic.
18053         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
18054
18055 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
18056
18057         * g++.c (main): Make sure arglist has a final NULL entry.  Add
18058         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
18059         stdin/stdout of the invoked program are redirected to
18060         nowheresville.
18061
18062 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18063
18064         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
18065
18066 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
18067
18068         * init.c (resolve_offset_ref): Handle obj.vfn better.
18069         * typeck.c (build_component_ref): Set TREE_TYPE on result from
18070         build_vfn_ref.
18071
18072 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
18073
18074         * typeck.c (convert_for_assignment): Also handle anachronistic
18075         implicit conversions from (::*)() to cv void*.
18076         * cvt.c (cp_convert_to_pointer): Likewise.
18077
18078 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
18079
18080         * lex.c (handle_cp_pragma): Fix bogus warning.
18081
18082 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
18083
18084         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
18085         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
18086
18087 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18088
18089         * class.c (finish_struct_1): Support DWARF2_DEBUG.
18090         * search.c (dfs_debug_mark): Likewise.
18091         * decl2.c (finish_vtable_vardecl): Likewise.
18092         * decl.c (pushtag, finish_enum): Likewise.
18093         * lex.c (check_newline): Use debug_* instead of calling *out
18094         functions directly.
18095
18096 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18097
18098         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
18099         on some picky hosts.
18100
18101 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
18102
18103         * class.c (finish_struct_1): A class has a non-trivial copy
18104         constructor if it has virtual functions.
18105
18106         * cvt.c (cp_convert): Always call a constructor.
18107
18108         * call.c (reference_binding): Still tack on a REF_BIND
18109         for bad conversions.
18110         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
18111
18112         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
18113         (c_expand_return): Likewise.
18114         * typeck2.c (digest_init): Likewise for { }.
18115         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
18116         * cvt.c (cp_convert): Handle failure better.
18117
18118 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18119
18120         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
18121         of GCC be path-relative.
18122
18123 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
18124
18125         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
18126         it does need choose-temp.o and pexecute.o.
18127
18128 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18129
18130         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
18131         that we still use it.
18132         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
18133
18134 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
18135
18136         * init.c (expand_default_init): Avoid calling constructors to
18137         initialize reference temps.
18138
18139         * cvt.c (convert_to_reference): Fix.
18140
18141 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
18142
18143         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
18144         (convert_to_reference): Likewise.
18145         * typeck.c (convert_for_initialization): Likewise.
18146         * init.c (expand_default_init): Likewise.
18147         (expand_aggr_init_1): Likewise.
18148         * cp-tree.h (CONV_NONCONVERTING): Lose.
18149         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
18150         * *.c: Adjust.
18151         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
18152
18153 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
18154
18155         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
18156
18157 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18158
18159         * init.c (expand_aggr_init_1): Don't crash on non-constructor
18160         TARGET_EXPR.
18161
18162 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18163
18164         * g++.c: Include gansidecl.h.
18165         (VPROTO, PVPROTO, VA_START): Delete.
18166         (choose_temp_base_try, choose_temp_base, perror_exec,
18167         run_dos) [__MSDOS__]: Delete fns.
18168         (pfatal_with_name): Delete fn.
18169         (temp_filename): Declare like in gcc.c.
18170         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
18171         (error_count, signal_count): Define.
18172         (error): Delete both definitions.
18173         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
18174         (pfatal_pexecute): Add fn from gcc.c.
18175         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
18176         code to use the pexecute stuff also used by gcc.c.
18177         (MIN_FATAL_STATUS): Define.
18178         * Make-lang.in (g++): Add dependency on and linking with
18179         choose-temp.o and pexecute.o.
18180
18181         * cp-tree.h: Include gansidecl.h.
18182         (STDIO_PROTO): Delete #undef/#define.
18183         * cvt.c (NULL): Delete #undef/#define.
18184         * expr.c (NULL): Likewise.
18185         * init.c (NULL): Likewise.
18186         * rtti.c (NULL): Likewise.
18187         * xref.c (NULL): Likewise.
18188
18189         * cp-tree.h (build_user_type_conversion): Add prototype.
18190         * call.c (build_user_type_conversion): Delete prototype.  Correct
18191         decl of FLAGS arg to be an int.
18192         * cvt.c (build_user_type_conversion): Likewise.
18193
18194 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
18195
18196         * cp-tree.def: Add TRY_BLOCK and HANDLER.
18197         * except.c (expand_start_catch_block): Support templates.
18198         * parse.y (try_block, handler_seq): Likewise.
18199         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
18200
18201 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
18202
18203         * pt.c (current_template_args): New fn.
18204         (push_template_decl): Use it.
18205         * decl.c (grokdeclarator): Use it.
18206
18207         * decl2.c (build_expr_from_tree): Dereference ref vars.
18208
18209         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
18210         the decl-specifier-seq.
18211
18212         * decl.c (grok_op_properties): Don't force the type of a conversion
18213         op to be complete.  Don't warn about converting to the same type
18214         for template instantiations.
18215
18216         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
18217         methods.
18218
18219 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
18220
18221         * typeck.c (get_delta_difference): Remove previous bogusness.
18222         Don't give errors if force is set.
18223
18224 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18225
18226         * decl2.c (finish_file): Don't emit debug info.
18227         * decl.c (pushdecl): Lose obsolete code.
18228         (grokdeclarator): Still do the long long thing after complaining.
18229         * search.c (note_debug_info_needed): Don't do anything if we're in a
18230         template.
18231         * method.c (synthesize_method): For non-local classes,
18232         push_to_top_level first.
18233
18234 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
18235
18236         * typeck.c (get_delta_difference): Add no_error parameter.
18237         (build_ptrmemfunc): Call get_delta_difference with no_error set;
18238         we don't want error messages when converting unrelated
18239         pointer-to-member functions.
18240
18241 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
18242
18243         * error.c (dump_expr): Improve the wording on error messages that
18244         involve pointer to member functions.
18245
18246 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
18247
18248         * cvt.c (cp_convert_to_pointer): Move code for conversions from
18249         (::*)() to void* or (*)() up a bit, so that we can convert from
18250         METHOD_TYPEs as well.
18251
18252 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18253
18254         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
18255         There are no 'member' types.
18256         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
18257         (build_x_typeid): Handle errors.
18258
18259 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
18260
18261         * typeck.c (convert_for_assignment): Handle anachronistic implicit
18262         conversions from (::*)() to void* or (*)().
18263         * cvt.c (cp_convert_to_pointer): Likewise.
18264         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
18265         conversions from here.
18266         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
18267         * lang-options.h: Likewise.
18268         * decl2.c (warn_pmf2ptr): Define.
18269         * cp-tree.h: Declare it.
18270         * typeck2.c (digest_init): Allow pmfs down into
18271         convert_for_initialization.
18272
18273 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
18274
18275         * typeck.c (c_expand_return): Fix for returning overloaded fn.
18276
18277 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18278
18279         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
18280         * decl.c (grok_reference_init): Pass DIRECT_BIND.
18281         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
18282         DIRECT_BIND.
18283         * call.c (convert_like): Don't pass INDIRECT_BIND.
18284         * typeck.c (convert_arguments): Likewise.
18285         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
18286
18287 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
18288
18289         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
18290         similar code in build_up_ref.
18291         * cvt.c (build_up_reference): Drastically simplify.
18292
18293 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
18294
18295         * typeck.c (signed_or_unsigned_type): If the given type already
18296         as the correct signedness, then just return it.
18297
18298         * typeck.c ({un,}signed_type): If can't do anything, call
18299         signed_or_unsigned_type.
18300
18301 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
18302
18303         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
18304         current_class_type is NULL.
18305
18306 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
18307
18308         * class.c (finish_struct_1): Avoid empty structs by adding a field
18309         so layout_type gets the mode right.
18310
18311         * typeck.c (c_expand_return): Drastically simplify.
18312
18313 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
18314
18315         * typeck.c (decay_conversion): Handle overloaded methods.
18316
18317 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
18318
18319         * call.c (build_over_call): A TARGET_EXPR has side-effects.
18320
18321 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
18322
18323         * cvt.c (convert_to_pointer_force): Add code to support pointer to
18324         member function to pointer to function conversions.
18325         * init.c (resolve_offset_ref): Add code to allow faked up objects,
18326         ignoring them if they are not used, and giving an error, if they
18327         are needed.
18328         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
18329         code, and so that we can give an error, if we needed an object,
18330         and one was not provided.
18331         (build_c_cast): Don't call default_conversion when we want to
18332         convert to pointer to function from a METHOD_TYPE.
18333
18334 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
18335
18336         * Make-lang.in (cplib2.ready): Fix logic.
18337
18338         * decl.c (shadow_tag): Only complain about non-artificial function
18339         members.
18340
18341         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
18342
18343 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
18344
18345         * expr.c (cplus_expand_expr): Pre-tweak call_target like
18346         expand_inline_function would.
18347
18348         * pt.c (mark_decl_instantiated): If extern_p, call
18349         mark_inline_for_output.
18350
18351 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
18352
18353         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
18354         pmd conversions.
18355
18356         * typeck.c (get_delta_difference): Fix wording, as we can be used
18357         for pointer to data members.
18358
18359 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
18360
18361         * pt.c (tsubst): If the function decl isn't a member of this
18362         template, return a copy of the decl (including copying the
18363         lang-specific part) so we don't hose ourselves later.
18364
18365 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
18366
18367         * class.c (finish_struct): Remove DWARF-specific tag handling.
18368         * decl.c (pushtag): Likewise.
18369         (finish_function): Always clear DECL_ARGUMENTS on function decls with
18370         no saved RTX.
18371         * decl2.c (finish_file): Emit DWARF debugging info for static data
18372         members.
18373
18374 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
18375
18376         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
18377         isn't the same as the new one before we whack it.
18378
18379 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
18380
18381         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
18382         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
18383         warn_traditional and warn_strict_prototypes; remove ancient
18384         'overload' code; remove references to flag_traditional.
18385
18386 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
18387
18388         * input.c (sub_getch): Handle 8-bit characters in string literals.
18389
18390 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
18391
18392         * tree.c (mapcar): Handle CONSTRUCTORs.
18393         (copy_to_permanent): Handle expression_obstack properly.
18394
18395         * Make-lang.in (cplib2.txt): Also depend on the headers.
18396
18397         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
18398         INT_TYPE_SIZE.
18399         (expand_class_desc): Use USItype for offset field.
18400         * tinfo.h (struct __class_type_info): Likewise.
18401
18402         * method.c (build_overload_int): TYPE_PRECISION should be applied
18403         to types.
18404
18405 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
18406
18407         * call.c (build_new_op): A COND_EXPR involving void must be a
18408         builtin.
18409
18410 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
18411
18412         * typeck.c (build_x_component_ref): New fn.
18413         (build_object_ref): Use it.
18414         * parse.y (primary): Use it.
18415         * decl2.c (build_expr_from_tree): Use it.
18416         * cp-tree.h: Declare it.
18417
18418         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
18419         * error.c (dump_type_suffix): Handle variable arrays.
18420
18421 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18422
18423         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
18424
18425 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
18426
18427         * decl.c (lookup_name_real): Don't try to look up anything in a
18428         TYPENAME_TYPE.
18429
18430         * tinfo2.cc (__throw_type_match_rtti): Oops.
18431
18432 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18433
18434         * Make-lang.in (exception.o): Use -fno-PIC for now.
18435
18436 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
18437
18438         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
18439         calling them.
18440         (get_tinfo_fn_dynamic): Extracted from build_typeid.
18441         * tinfo2.cc (__dynamic_cast): Adjust.
18442
18443         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
18444         (build_x_typeid): Likewise.
18445
18446         * parse.y: Call build_x_typeid instead of build_typeid.
18447         * cp-tree.def: Add TYPEID_EXPR.
18448         * pt.c (tsubst_copy): Handle typeid.
18449         * decl2.c (build_expr_from_tree): Likewise.
18450         * rtti.c (build_x_typeid): Throw bad_typeid from here.
18451         (build_typeid): Not here.
18452         * cp-tree.h: Declare build_x_typeid.
18453
18454 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
18455
18456         * call.c (convert_like): Pull out constant values.
18457
18458         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
18459
18460 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
18461
18462         * decl.c (init_decl_processing): Create short int types before
18463         creating size_t in case a machine description needs to use
18464         unsigned short for size_t.
18465
18466 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18467
18468         * Make-lang.in (exception.o): Turn off pic.
18469
18470         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
18471         type, multi-level ptr conversions.
18472
18473         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
18474         (throw_bad_cast): Use it.
18475         (throw_bad_typeid): New fn.
18476         (build_typeid): Throw bad_typeid as needed.
18477         Use build_call.
18478         (synthesize_tinfo_fn): Handle functions and arrays before checking
18479         for cv-quals.
18480
18481         * Remove .h from standard C++ headers, add new.h, move into inc
18482         subdirectory.
18483
18484         * exception*: Remove pointer from object, constructors.  Add
18485         default exception::what that uses type_info::name.  Add
18486         __throw_bad_typeid.
18487
18488         * init.c (build_new): Don't add a cookie to new (void *) T[2].
18489
18490 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
18491
18492         * Make-lang.in: Building C++ code depends on cc1plus.
18493
18494 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18495
18496         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
18497         a HOST_WIDE_INT, not a tree.
18498
18499 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
18500
18501         * exception.cc: Don't include <stdlib.h>.
18502
18503         * Make-lang.in (c++.clean): Remove cplib2.*.
18504
18505 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
18506
18507         * parse.y (component_decl_1, component_costructor_declarator case):
18508         Pass attributes/prefix_attributes in tree list.
18509
18510 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
18511
18512         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
18513
18514 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
18515
18516         * lex.c (do_identifier): Don't do deferred lookup in a template
18517         header.
18518
18519         * typeck2.c (store_init_value): Oops.
18520
18521         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
18522         New files for C++ lang-support library.
18523         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
18524         (CXX_LIB2FUNCS): Define.
18525         And rules for building the C++ lang-support code.
18526         * config-lang.in (headers): Define.
18527         (lib2funcs): Define.
18528
18529 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
18530
18531         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
18532         digest_init.
18533         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
18534         * typeck2.c (store_init_value): Check for initializing pmf with { }
18535         here.
18536         (process_init_constructor): Not here.
18537
18538 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
18539
18540         * pt.c (begin_template_parm_list): Increment
18541         processing_template_decl here.
18542         (end_template_parm_list): Not here.
18543         (process_template_parm): No need to add 1 to it now.
18544         * *.c: Use processing_template_decl instead of current_template_parms
18545         to check for being in a template.
18546
18547         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
18548         (tsubst_copy): Handle CONSTRUCTOR.
18549         (instantiate_decl): Set up context properly for variables.
18550         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
18551         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
18552
18553 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18554
18555         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
18556
18557 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
18558
18559         * method.c (make_thunk): Call comdat_linkage before setting the
18560         TREE_CODE.
18561
18562         * decl2.c (comdat_linkage): Use make_decl_one_only.
18563         (import_export_decl): Likewise.
18564         * decl.c (init_decl_processing): Check supports_one_only instead of
18565         SUPPORTS_WEAK.
18566
18567 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
18568
18569         * decl2.c (grokfield): Tighten checking for access decls.
18570
18571         * decl.c (make_typename_type): Resolve references to
18572         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
18573         (lookup_name_real): Types that depend on a template parameter get
18574         an implicit 'typename' unless they're in the current scope.
18575         (start_decl_1): We don't care about incomplete types that depend
18576         on a template parm.
18577         (grokdeclarator): Resolve 'typename's in the type specifier that
18578         refer to members of the current scope.
18579
18580         * call.c (build_over_call): Remove 'inline called before
18581         definition' diagnostic.
18582         (build_method_call): Likewise.
18583         * decl.c (duplicate_decls): Downgrade 'used before declared
18584         inline' to a warning, only with -Winline.
18585
18586 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
18587
18588         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
18589
18590 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
18591
18592         * call.c (build_method_call): When calling a signature
18593         default implementation, as in other cases, let instance_ptr simply
18594         be instance.
18595
18596 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
18597
18598         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
18599
18600 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
18601
18602         * except.c (expand_start_catch_block): Add a pushlevel so that -g
18603         works on hppa and SPARC.
18604
18605 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18606
18607         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
18608
18609 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
18610
18611         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
18612         before testing whether it's a signature.
18613
18614 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
18615
18616         * call.c (build_new_method_call): Don't complain about signature
18617         pointers and references not being an aggr type.
18618         (build_this): If a signature pointer or reference was passed in,
18619         just return it.
18620         (build_new_method_call): If instance is a signature pointer, set
18621         basetype to the signature type of instance.
18622         * sig.c (build_signature_method_call): Deleted basetype and
18623         instance parameters, they can be found as the DECL_CONTEXT of
18624         function and as the first argument passed in.
18625         * cp-tree.h: Changed declaration of build_signature_method_call.
18626         * call.c (build_method_call): Deleted first two arguments in call
18627         of build_signature_method_call.
18628         (build_over_call): Added call to build_signature_method_call.
18629
18630 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
18631
18632         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
18633         target_expr.
18634
18635 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18636
18637         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
18638
18639 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
18640
18641         * except.c (expand_start_try_stmts): Move to except.c in the backend.
18642         (expand_end_try_stmts): Remove.
18643
18644         * init.c (perform_member_init): Use add_partial_entry () instead
18645         of directly manipulating lists.
18646         (emit_base_init): Likewise.
18647
18648 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
18649
18650         * except.c (expand_exception_blocks): Always make sure USE and
18651         CLOBBER insns that came at the end still do, the backend relies
18652         upon this.
18653
18654 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
18655
18656         * call.c (build_over_call): We can only use a TARGET_EXPR of the
18657         right type.
18658
18659 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
18660
18661         * cvt.c (convert_to_reference): Revert last change, don't complain
18662         about temp without target decl.
18663
18664 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
18665
18666         * decl.c (grokdeclarator): Don't core dump when void() is given.
18667
18668 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
18669
18670         * decl.c (copy_args_p): Don't crash.
18671
18672 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
18673
18674         * pt.c (tsubst): And support template args inside the exception
18675         specification.
18676
18677         * pt.c (tsubst): Add support for exception specifications in
18678         template functions.
18679
18680 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
18681
18682         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
18683         fields now.
18684         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
18685         (start_function): Likewise.
18686         (start_method): Likewise.
18687         (grokfield): Likewise.
18688         (make_call_declarator): Add throw spec parameter.
18689         (set_quals_and_spec): Add routine.
18690         * lex.c (set_quals_and_spec): Likewise.
18691         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
18692         * decl.c (shadow_tag): Eliminate the throw spec parameter to
18693         grokdeclarator.
18694         (groktypename): Likewise.
18695         (start_decl): Eliminate the throw spec parameter.  Eliminate the
18696         throw spec parameter to grokdeclarator.  Eliminate the throw spec
18697         field in DECL_STMT.
18698         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
18699         (grokfndecl): Remove useless set of raises.
18700         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
18701         the throw spec parameter to start_decl.  Pull the throw spec out
18702         of the call declarator.
18703         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
18704         (start_function): Eliminate the throw spec parameter.  Eliminate
18705         the throw spec parameter to grokdeclarator.
18706         (start_method): Likewise.
18707         * decl2.c (grokfield): Likewise.
18708         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
18709         (grokoptypename): Likewise.
18710         (finish_file): Eliminate the throw spec parameter to
18711         start_function.  Add throw spec to make_call_declarator.
18712         * except.c (init_exception_processing): Add throw spec to
18713         make_call_declarator.  Eliminate the throw spec parameter to
18714         start_decl.
18715         (expand_start_catch_block): Eliminate the throw spec parameter to
18716         grokdeclarator.
18717         (expand_builtin_throw): Add throw spec to make_call_declarator.
18718         Eliminate the throw spec parameter to start_function.
18719         (start_anon_func): Likewise.
18720         * lex.c (make_call_declarator): Add throw spec parameter.
18721         (set_quals_and_spec): New routine.
18722         (cons_up_default_function): Add throw spec to make_call_declarator.
18723         Eliminate the throw spec parameter to grokfield.
18724         * method.c (synthesize_method): Eliminate the throw spec parameter
18725         to start_function.
18726         * pt.c (process_template_parm): Eliminate the throw spec parameter
18727         to grokdeclarator.
18728         (tsubst): Add throw spec to make_call_declarator.
18729         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
18730         (do_function_instantiation): Eliminate the throw spec parameter to
18731         grokdeclarator.  Eliminate the throw spec parameter to
18732         start_function.
18733         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
18734         to start_function.
18735         * parse.y (datadef): Remove non-winning optimization.
18736         (decl): Likewise.
18737         (fndef): Remove ambiguous error productions uncovered by grammar
18738         fixing.
18739         (constructor_declarator): Add exception_specification_opt here.
18740         (component_constructor_declarator): Likewise.
18741         (direct_after_type_declarator): Likewise.
18742         (complex_direct_notype_declarator): Likewise.
18743         (direct_abstract_declarator): Likewise.
18744         (fn.def1): Remove exception_specification_opt.
18745         (fn.def2): Likewise.
18746         (condition): Likewise.
18747         (initdcl0): Likewise.
18748         (initdcl): Likewise.
18749         (notype_initdcl0): Likewise.
18750         (nomods_initdcl0): Likewise.
18751         (component_decl_1): Likewise.
18752         (component_declarator): Likewise.
18753         (after_type_component_declarator0): Likewise.
18754         (after_type_component_declarator): Likewise.
18755         (notype_component_declarator): Likewise.
18756
18757 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
18758
18759         * call.c (build_over_call): Also use an INIT_EXPR when
18760         initializing anything from an rvalue.
18761
18762         * call.c (build_over_call): Call stabilize_reference when building
18763         an INIT_EXPR instead of calling the copy ctor.
18764
18765         * call.c (joust): Extend the previous change to all comparisons.
18766
18767         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
18768         NO_LINKAGE_HEURISTICS.
18769
18770         * decl2.c (finish_file): Emit any statics that weren't already.
18771
18772         * typeck.c (build_static_cast): Implement.
18773         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
18774         * decl.c (grokparms): Use can_convert_arg instead of
18775         implicit_conversion directly.
18776         (copy_args_p): New fn.
18777         * cvt.c (convert_to_reference): Don't complain about temp with
18778         static_cast.
18779         (build_up_reference): Handle TARGET_EXPRs.
18780         * call.c (build_over_call): Elide unnecessary temps.
18781         (can_convert*): Use new overloading code.
18782
18783 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
18784
18785         * call.c: Move TYPE_PTR*_MACROS ...
18786         * cp-tree.h: To here.
18787         * typeck.c (build_reinterpret_cast): Implement.
18788
18789         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
18790         ptr_complete_ob.
18791         (joust): If we're comparing a function to a builtin and the worst
18792         conversion for the builtin is worse than the worst conversion for the
18793         function, take the function.
18794
18795         * typeck.c (build_const_cast): Implement.
18796         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
18797         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
18798
18799 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
18800
18801         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
18802         too early.  Make sure we explode if exprtype turns out to be a
18803         NULL_TREE when it shouldn't be.
18804
18805 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
18806
18807         * cp-tree.h: New routine make_call_declarator.
18808         * lex.c (make_call_declarator): Define it.
18809         * except.c (init_exception_processing): Use it.
18810         (expand_builtin_throw): Likewise.
18811         (start_anon_func): Likewise.
18812         * decl2.c (finish_file): Likewise.
18813         * lex.c (cons_up_default_function): Likewise.
18814         * parse.y: Likewise.
18815         * pt.c (tsubst): Likewise.
18816
18817 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
18818
18819         * decl2.c (groktypefield): Remove unused code.
18820
18821 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
18822
18823         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
18824         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
18825         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
18826         nonempty_cv_qualifiers.
18827         * hash.h: Rebuild.
18828
18829         * lex.c (make_pointer_declarator): Change type_quals into
18830         cv_qualifiers.
18831         (make_reference_declarator): Likewise.
18832
18833 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
18834
18835         * decl.c (start_function): Only check interface_* for templates
18836         with flag_alt_external_templates.
18837
18838         * call.c (build_new_op): Check for comparison of different enum types.
18839         (build_over_call): Fix arg # output.
18840
18841         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
18842
18843 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
18844
18845         * call.c (build_new_op): Check for erroneous args.
18846
18847         * call.c (build_new_method_call): Add missing args to cp_error.
18848
18849         * tree.c (error_type): Don't print reference-to-array.
18850
18851         * typeck.c (convert_for_assignment): Don't say contravariance for
18852         removing const.
18853
18854 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
18855
18856         * call.c (build_over_call): Diagnose bad convs for `this'.
18857
18858         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
18859         on _ctor_arg.
18860
18861         * call.c (convert_like): Handle bad convs.
18862         (build_over_call): Handle bad convs better.
18863
18864         * decl2.c: -fansi-overloading is now the default.
18865
18866         * call.c (build_new_method_call): Check for erroneous args.
18867
18868         * pt.c (instantiate_class_template): Propagate
18869         TYPE_USES_MULTIPLE_INHERITANCE.
18870
18871 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
18872
18873         * call.c (enforce_access): Add static to routine.
18874
18875 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
18876
18877         * call.c (build_user_type_conversion_1): Fix bad handling.
18878         (compare_ics): Likewise.
18879
18880 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
18881
18882         * call.c (standard_conversion): Oops.
18883
18884 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
18885
18886         * g++.c: Update test for win32 (&& ! cygwin32).
18887
18888 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
18889
18890         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
18891         (ptr_reasonably_similar): New fn.
18892         * call.c (BAD_RANK): New rank.
18893         (ICS_BAD_FLAG): New macro.
18894         (standard_conversion): Handle almost-right pointer conversions.
18895         (reference_binding): Handle bad rvalue bindings.
18896         (add_*_candidate): Stuff.
18897         (build_over_call): Pass bad conversions to convert_for_initialization.
18898         (compare_ics): Handle bad convs.
18899         (joust): Likewise.
18900
18901 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
18902
18903         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
18904         integer_type_node when computing pointer offsets.
18905
18906 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
18907
18908         * tree.c (lvalue_type): New fn.
18909         (error_type): New fn.
18910         * call.c (op_error): Use error_type.
18911         (add_conv_candidate): Use lvalue_type.
18912         (add_builtin_candidates): Likewise.
18913         * error.c (args_as_string): Use error_type.
18914
18915 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
18916
18917         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
18918         (tsubst): Not here.
18919
18920         * decl.c (init_decl_processing): With -ansi, __null's type is the
18921         signed integral type with the same number of bits as a pointer.
18922         Introduce a new variable null_node for it.
18923         * cp-tree.h: Adjust.
18924         * call.c (null_ptr_cst_p): Adjust.
18925
18926 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
18927
18928         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
18929         optimize.
18930
18931 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
18932
18933         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
18934         fns of classes without virtual functions.
18935
18936         * call.c (add_function_candidate): Handle `this' specially.
18937         (compare_ics): Likewise.
18938
18939 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
18940
18941         * typeck.c (build_conditional_expr): Fix handling of __null.
18942
18943         * decl2.c (comdat_linkage): New fn.
18944         (import_export_vtable): Use it.
18945         (import_export_decl): Use it.
18946         * method.c (make_thunk): Use it.
18947
18948 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
18949
18950         * pt.c (end_template_decl): If we don't actually have parms, return.
18951         * parse.y (template_header): Accept 'template <>'.
18952
18953         * errfn.c: Allow 5 args.
18954
18955 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
18956
18957         * tree.c (make_temp_vec): New fn.
18958         * pt.c (push_template_decl): Handle partial specs.
18959         (instantiate_class_template): Likewise.
18960         (more_specialized): Use get_bindings.
18961         (more_specialized_class): New fn.
18962         (get_class_bindings): New fn.
18963         (most_specialized_class): New fn.
18964         (do_function_instantiation): List candidates for ambiguous case.
18965         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
18966         (shadow_tag): Call push_template_decl for partial specializations.
18967         * parse.y: Likewise.
18968         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
18969         DECL_TEMPLATE_MEMBERS.
18970         * call.c (print_z_candidates): Reduce duplication.
18971
18972 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
18973
18974         * decl2.c (lang_decode_option): Allow -fansi-overloading.
18975
18976 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
18977
18978         * pt.c (get_bindings): New fn.
18979         (most_specialized): Likewise.
18980         (do_function_instantiation): Use them.
18981         (add_maybe_template): New fn.
18982         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
18983         * call.c (build_new_op): Handle guiding decls.
18984         (build_new_function_call): Likewise.
18985         * decl2.c (finish_file): Likewise.
18986
18987         * decl2.c (mark_used): Do synthesis here.
18988         * call.c (build_method_call): Not here.
18989         (build_over_call): Or here.
18990         * typeck.c (build_function_call_real): Or here.
18991         * tree.c (bot_manip): Call mark_used on functions used in default
18992         args.
18993
18994 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
18995
18996         * decl2.c (import_export_vtable): Delete code that disabled vtable
18997         heuristic on systems with ASM_OUTPUT_EXTERNAL.
18998
18999 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
19000
19001         * typeck.c (build_x_function_call): Handle static call context
19002         better.
19003
19004         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
19005         the function, not its outer block.
19006
19007         * call.c (build_field_call): Pass fields on to build_opfncall
19008         regardless of TYPE_OVERLOADS_CALL_EXPR.
19009         (build_method_call): Pass on to build_new_method_call sooner.
19010
19011         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
19012         gives us.
19013         * class.c (instantiate_type): Don't put a POINTER_TYPE to
19014         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
19015         modifying it.
19016
19017 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
19018
19019         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
19020         (add_builtin_candidate): Don't take enums for ++.
19021         (build_new_method_call): Handle non-aggregates and field calls.
19022         Move new overloading code from...
19023         * cvt.c: Here.
19024
19025         * decl.c (grokparms): Don't check default args in templates.
19026
19027 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
19028
19029         * cvt.c (build_new_op): Fix args to build_unary_op.
19030         (add_builtin_candidates): Don't call type_promotes_to on float.
19031
19032         * decl.c (grokparms): Check the type of the default arg.
19033
19034         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
19035         returning NULL_TREE.
19036
19037         * typeck.c (build_x_binary_op): Avoid doing extra work.
19038         (build_x_unary_op): Likewise.
19039         (build_x_conditional_expr): Likewise.
19040         * cvt.c (build_over_call): Return.
19041         (add_builtin_candidate): Fix MEMBER_REF.
19042         (build_new_op): Likewise.
19043
19044 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
19045
19046         * method.c (build_overload_name): Put bug fix into code but leave
19047         disabled for now so we can be bug compatible with older releases
19048         that do repeats incorrectly.  In the future, we can enable it.
19049
19050 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
19051
19052         * cvt.c (convert_like): Don't call build_cplus_new twice.
19053
19054         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
19055         Control new overloading code with -fansi-overloading.
19056
19057 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
19058
19059         * cvt.c (build_over_call): Call build_cplus_new.
19060         * call.c (build_method_call): Likewise.
19061         * typeck.c (build_function_call_real): Likewise.
19062         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
19063         the COND_EXPR in a TARGET_EXPR so they use the same slot.
19064
19065         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
19066         recursive calls.
19067         * typeck.c (complete_type): Propagate
19068         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
19069
19070 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
19071
19072         * cvt.c (joust): More ?: kludging.  Sigh.
19073         (build_over_call): Don't try to synthesize global fns.
19074
19075         * search.c (lookup_conversions): Use binfo marking.
19076
19077 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
19078
19079         * search.c (build_mi_matrix): Use the correct value of cid
19080         when determining the new mi_size.
19081
19082 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
19083
19084         * cvt.c (add_builtin_candidates): Do consider type conversion ops
19085         for the first parms of += et al.
19086         (strip_top_quals): New fn.
19087         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
19088         (implicit_conversion): Likewise.
19089         (add_builtin_candidates): Be careful about arrays.
19090         (build_new_method_call): Handle vtable optimization.
19091
19092 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
19093
19094         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
19095         * cvt.c (reference_binding): Use it.
19096         (implicit_conversion): Use it.
19097         (add_builtin_candidate, COND_EXPR): Use it.
19098
19099         * cvt.c (build_new_function_call): Check for error args.
19100
19101         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
19102
19103         * gxx.gperf: Add __null.
19104         * hash.h: Regenerate.
19105         * lex.h: Add RID_NULL.
19106         * lex.c (init_lex): Create null_pointer_node here, stick it in
19107         RID_NULL.
19108         * decl.c (init_decl_processing): Still set its type here.
19109         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
19110         (convert_to_pointer_force): Likewise.
19111         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
19112         if (! pedantic).
19113         * call.c (convert_harshness): Use null_ptr_cst_p.
19114         * typeck.c (convert_for_assignment): Likewise.  Don't produce
19115         null_pointer_node.
19116
19117         * error.c (args_as_string): Handle lists of actual args, too.
19118         * cvt.c (null_ptr_cst): Support (void*)0 for now.
19119         (build_user_type_conversion_1): Improve diagnostics.
19120         (build_new_function_call): Likewise.
19121         (build_object_call): Likewise.
19122         (build_new_method_call): Likewise.  Move call before def diagnostic...
19123         (build_over_call): Here.
19124
19125         * cvt.c (build_new_method_call): Don't complain about no match if
19126         LOOKUP_SPECULATIVELY.
19127         (build_over_call): Fix 'this' for virtual fn.
19128         (build_new_method_call): Add diagnostic.
19129
19130 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
19131
19132         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
19133         constructors to be passed in.
19134         (build_over_call): Likewise.
19135         (build_user_type_conversion_1): Pass them in.
19136         (convert_like): Likewise.
19137         (build_object_call): Handle overloaded conversions.
19138         (build_over_call): Pass the right args to build_vfn_ref.
19139         (standard_conversion): Fix pmf convs.
19140         (joust): Handle comparing statics and non-statics.
19141         (build_new_method_call): New fn.
19142         * call.c (build_method_call): Call it if NEW_OVER.
19143
19144 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
19145
19146         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
19147         %D instead.
19148
19149 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
19150
19151         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
19152         instead of just maybe_build_cleanup so that we deallocate the
19153         thrown object.
19154
19155 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19156
19157         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
19158         * cp-tree.h (finish_prevtable_vardecl): Add decl.
19159
19160 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
19161
19162         * pt.c (instantiate_class_template): Call complete_type.  Also, if
19163         we're at the end of the file and we just instantiated a template
19164         class with a vtable, call finish_prevtable_vardecl.
19165
19166         * error.c (dump_decl): Don't explode (or explode more gracefully
19167         as appropriate) if the object being dumped has a null type.
19168         (dump_expr): Likewise.
19169
19170         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
19171         by counting the number of nodes that we'll need before allocating
19172         the array.
19173         (lookup_fnfields): Fix comment.
19174         (breadth_first_search): Fix comment.
19175
19176 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
19177
19178         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
19179         TYPE_ALIGN.
19180         * class.c (finish_struct): Call cplus_decl_attributes here.
19181         (finish_struct_1): Not here.
19182         * cp-tree.h: Adjust.
19183
19184         * pt.c (type_unification): New parameter STRICT.
19185         (unify): If STRICT, don't allow cv addition or base deduction.
19186         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
19187
19188 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
19189
19190         * search.c (get_template_base{_recursive}): New fns.
19191         * pt.c (more_specialized): New fn.
19192         (do_function_instantiation): Use it.
19193         (unify): Handle base deduction.
19194         * cvt.c (joust): Use more_specialized.
19195         Don't arbitrarily choose between non-builtin candidates.
19196         (build_over_call): Call require_complete_type.
19197
19198         * decl.c (start_function): Statics are static even in a #pragma
19199         interface file.
19200
19201         * decl2.c (import_export_vtable): Disable vtable heuristic on
19202         systems with ASM_OUTPUT_EXTERNAL.
19203
19204         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
19205         (standard_conversion): No std conv to enum type.
19206
19207         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
19208         for ptm's.
19209
19210         * cvt.c (reference_binding): Bind directly to a base subobject of
19211         a class rvalue.
19212
19213         * cvt.c (build_new_op): Enforce access control.
19214
19215 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
19216
19217         * typeck2.c (process_init_constructor): When scanning the
19218         union for a named field, skip things that aren't FIELD_DECLs.
19219
19220         * method.c (synthesize_method): Don't scan fndecl's rtl if
19221         we're at the end of the file; just assume the function can't
19222         be inlined.
19223
19224 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19225
19226         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
19227         it failed.
19228
19229         * cvt.c (build_user_type_conversion_1): Handle overloaded
19230         conversion ops.
19231
19232         * cvt.c (add_builtin_candidates): Don't consider type conversion
19233         operators for the first parameter of operator=.
19234
19235 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
19236
19237         * typeck.c (complete_type): Only call layout_type if we're not
19238         expanding a template.
19239
19240 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
19241
19242         * cvt.c (compare_ics): Oops.
19243
19244         * cvt.c (op_error): Oops.
19245
19246         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
19247         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
19248         (build_conv): Use them.
19249         (implicit_conversion): Use them.
19250         (convert_like): Handle them.
19251         (build_new_op): Handle builtin COND_EXPR again.
19252         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
19253         in lists of types for COND_EXPR.
19254         (add_builtin_candidate): Add enum candidates for COND_EXPR.
19255
19256 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
19257
19258         * typeck.c (build_modify_expr): Always attempt to build a call to
19259         the assignment operator, even if we're using a default one.
19260         (convert_for_initialization): Call complete_type.
19261
19262 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
19263
19264         * cvt.c (reference_binding): A REF_BIND gets the reference type.
19265         (implicit_conversion): Likewise.
19266         (convert_like): Likewise.
19267         (compare_ics): Likewise.
19268         (compare_qual): Likewise.
19269         (print_z_candidates): Handle no candidates.
19270         (build_new_op): Don't handle builtin COND_EXPR for now.
19271
19272 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
19273
19274         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
19275
19276 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
19277
19278         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
19279
19280         * cvt.c (build_builtin_candidate): Oops.
19281         (build_new_op): Oops.
19282
19283         * method.c (build_opfncall): Pass COND_EXPR on.
19284         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
19285         (add_builtin_candidate{,s}): Likewise.
19286         (add_builtin_candidates): Likewise.
19287         (print_z_candidates, op_error, build_new_op): Likewise.
19288         (type_decays_to): New fn.
19289         * lex.c (init_lex): Just say ?: for COND_EXPR.
19290
19291 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
19292
19293         * typeck.c (complete_type): Call layout_type rather than building
19294         a new array type.
19295
19296         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
19297         only use ptrdiff_t.
19298
19299 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
19300
19301         * cvt.c: Always compile the new overloading code (but don't use it).
19302         (implicit_conversion): Add a BASE_CONV when converting to
19303         the same class type.
19304         (convert_like): Handle BASE_CONV.
19305
19306 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19307
19308         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
19309         (add_builtin_candidate): Likewise.
19310
19311         NEW_OVER changes:
19312         * typeck.c (build_x_function_call): Try an operator function
19313         whenever we call an object of class type.
19314         * method.c (build_opfncall): Pass CALL_EXPRs through.
19315         * cvt.c (implicit_conversion): Do const-ref case first.
19316         (add_conv_candidate, build_object_call, op_error): New fns.
19317         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
19318         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
19319         builtin candidates.
19320         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
19321         Fall back on preincrement handling.  Use op_error.
19322         Handle warn_synth.
19323         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
19324         an error_mark_node.
19325         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
19326         properly.
19327
19328 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
19329
19330         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
19331
19332 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
19333
19334         * typeck.c (build_component_ref_1): Use build_component_ref
19335         instead of open coding it here.
19336
19337 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
19338
19339         * g++.c (main): Don't link with -lg++.
19340
19341         NEW_OVER changes:
19342         * cvt.c (convert_to_reference): Don't use convert_from_reference on
19343         result of build_type_conversion.
19344         (cp_convert): Only call build_method_call for ctors if
19345         build_type_conversion failed.
19346         (ptr_complete_ob): New function.
19347         (TYPE_PTR{,OB,MEM}_P): New macros.
19348         ({add,build}_builtin_candidate{,s}): New functions.
19349         (print_z_candidates): Handle builtins.
19350         (build_user_type_conversion_1): Don't use conversion fns for
19351         converting to a base type.
19352         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
19353         (build_user_type_conversion): Use convert_from_reference.
19354         (build_new_op): New function.
19355         (build_over_call): Fix handling of methods.
19356         (compare_ics): Handle AMBIG_CONV properly.
19357         * typeck2.c: Increment abort count.
19358         * method.c (build_opfncall): Forward most requests to build_new_op.
19359         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
19360
19361 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19362
19363         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
19364         invalid second argument to dump_expr_list.
19365
19366 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
19367
19368         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
19369
19370 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
19371
19372         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
19373         ASSEMBLE_EXTERNAL.
19374
19375 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
19376
19377         * typeck2.c (process_init_constructor): New pedwarn for using { }
19378         to initialize a pointer to member function.
19379         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
19380         we can avoid the new error.
19381
19382 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
19383
19384         * typeck.c (build_ptrmemfunc1): New function to hide details of
19385         pointer to member functions better.
19386
19387 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
19388
19389         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
19390         methods into the actual method, as we know the implied object is
19391         not used.
19392
19393 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19394
19395         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
19396         inside a system header.
19397
19398 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
19399
19400         * call.c (build_method_call): Call complete_type on the
19401         instance type.
19402
19403 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
19404
19405         * typeck.c (build_component_ref): Always build up an OFFSET_REF
19406         for obj_ptr->func so that we can know which object to use in a
19407         method call.
19408
19409 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
19410
19411         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
19412         around things.  Also improve maintainability.
19413
19414 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
19415
19416         * decl.c (grokdeclarator): Check for overflow when evaluating an
19417         array dimension.
19418
19419 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
19420
19421         * cvt.c (cp_convert): Don't check for ambiguity with constructor
19422         if NEW_OVER.
19423
19424         * typeck.c (build_x_function_call): Pass function overload
19425         questions to new overloading code if NEW_OVER.
19426         * init.c (expand_aggr_init_1): Only check for type conversion ops
19427         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
19428         Don't check for ambiguity with constructor if NEW_OVER.
19429         * cvt.c (convert_to_reference): Dereference the result of a type
19430         conversion operator.
19431         (build_conv): Propagate ICS_USER_FLAG.
19432         (implicit_conversion): Call instantiate_type.
19433         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
19434         (add_function_candidate): Fix cv-quals on argtype.
19435         (print_z_candidates): New function.
19436         (build_new_function_call): Call it.
19437         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
19438         consider non-converting constructors.
19439         Call print_z_candidates.
19440         Return an AMBIG_CONV for an ambiguous conversion.
19441         (build_user_type_conversion): Handle AMBIG_CONV.
19442         (convert_like): Fix test for building TARGET_EXPR.
19443         Call instantiate_type.
19444         Handle AMBIG_CONV and LVALUE_CONV.
19445         (build_over_call): Handle 0 args and ellipsis.
19446         * cp-tree.def: Add AMBIG_CONV.
19447
19448 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
19449
19450         * decl.c (lookup_name_real): If we find mem in obj when parsing
19451         `obj->mem', make sure we return the right value.
19452
19453 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
19454
19455         * search.c (get_base_distance): Call complete_type.
19456
19457 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
19458
19459         * decl.c (store_bindings): Make static.
19460
19461 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
19462
19463         * init.c (expand_aggr_init_1): Don't check type conversions if
19464         NEW_OVER.
19465
19466         * cvt.c (z_candidate): Put back template field.
19467         (add_function_candidate): Set it.
19468         (add_template_candidate): Likewise.
19469         (joust): Use it.
19470         (compare_qual): Handle references and pointers to members.
19471         (compare_ics): Handle reference bindings.
19472
19473         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
19474
19475 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
19476
19477         * call.c (compute_conversion_costs): Call complete_type.
19478
19479         * tree.c (vec_binfo_member): Use comptypes instead of comparing
19480         pointers, so we can handle template parameters.
19481
19482 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
19483
19484         * cvt.c (cp_convert_to_pointer): We have to call complete_type
19485         here; let's make it explicit instead of a side effect of an
19486         error check.
19487
19488 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
19489
19490         * cvt.c (z_candidate): Remove template field.
19491         (reference_binding): Handle binding to temporary.
19492         (implicit_conversion): Likewise.
19493         (add_function_candidate): Handle artificial constructor parms.
19494         Handle functions with too few parms.
19495         (add_template_candidate): New function.
19496         (build_user_type_conversion_1): Handle constructors.
19497         (convert_like): Likewise.
19498         (build_over_call): Likewise.
19499         (build_new_function_call): Support templates.
19500         (compare_ics): Fix reference, inheritance handling.
19501
19502 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
19503
19504         * decl.c: Add signed_size_zero_node.
19505         (init_decl_processing): Build it.
19506         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
19507         when we're trying to make a negative delta.
19508
19509 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19510
19511         Stop doing this damn index==strchr variable name confusion.
19512         * class.c (add_virtual_function): Change local var INDEX to be
19513         named IDX.
19514         (add_method): Likewise.
19515         * lex.c (print_parse_statistics): Likewise.
19516         * search.c (make_memoized_table_entry): Likewise.
19517         (lookup_fnfields_here): Likewise.
19518         (lookup_field): Likewise.
19519         (lookup_fnfields): Likewise.
19520         (get_baselinks): Likewise.
19521         * sig.c (build_signature_table_constructor): Likewise.
19522         (build_signature_method_call): Likewise.
19523         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
19524         (get_member_function_from_ptrfunc): Likewise.
19525         (build_ptrmemfunc): Change local var INDEX to be IDX.
19526         (c_expand_start_case): Likewise.
19527
19528 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
19529
19530         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
19531         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
19532         (convert_to_reference): Use build_type_conversion to convert to
19533         the reference type directly.
19534         (standard_conversion): Fix void* case, non-conversions.
19535         (reference_binding): Fix expr == 0 case, non-conversions.
19536         (convert_like): Support REF_BIND.
19537         (compare_qual): Split out from compare_ics.
19538         (compare_ics): Use it, handle icses with only a qual_conv.
19539
19540         * init.c (expand_vec_init): Don't crash if decl is NULL.
19541
19542 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
19543
19544         * mpw-config.in: New file, configury for Mac MPW.
19545         * mpw-make.sed: New file, makefile editing for MPW.
19546
19547 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19548
19549         * pt.c (instantiate_class_template): Call repo_template_used.
19550
19551         * search.c (lookup_conversions): Only lookup conversions in
19552         complete types.
19553
19554 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19555
19556         * cp-tree.def: Renamed from tree.def, to avoid confusion with
19557         gcc's tree.def.
19558         * cp-tree.h, lex.c: Include cp-tree.def.
19559         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
19560
19561 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
19562
19563         * init.c (build_vec_delete_1): Call complete_type.
19564
19565 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
19566
19567         * except.c (start_anon_func): Make sure anonymous functions are
19568         never external.
19569
19570 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
19571
19572         * decl.c (finish_function): If function_depth > 1, set nested.
19573
19574         * decl2.c (grokbitfield): Revert Bob's change.
19575         * class.c (finish_struct_1): Fix handling of named bitfield widths.
19576
19577 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
19578
19579         * pt.c (add_pending_template): Handle types.
19580         (lookup_template_class): With -fexternal-templates, just add the class
19581         to pending_templates instead of instantiating it now.
19582         * decl2.c (finish_file): Handle types in pending_templates.
19583
19584 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
19585
19586         * decl2.c (grokbitfield): Handle constant decls appropriately.
19587         Give an appropriate error message now instead of spewing core
19588         later.
19589
19590 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
19591
19592         * decl2.c: Don't turn on thunks by default for now.
19593
19594 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
19595
19596         * typeck.c (complete_type): Handle error_mark_node.
19597         (common_type, OFFSET_TYPE): Handle template_type_parms.
19598
19599 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
19600
19601         * pt.c (instantiate_decl): If at_eof, call import_export_decl
19602         regardless of DECL_INLINE.
19603
19604         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
19605
19606         * class.c (finish_struct_bits): Copy TYPE_SIZE.
19607
19608         * rtti.c (build_dynamic_cast): Support templates.
19609         * tree.def: Support DYNAMIC_CAST_EXPR.
19610         * pt.c (tsubst_copy): Likewise.
19611         * decl2.c (build_expr_from_tree): Likewise.
19612
19613 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
19614
19615         * typeck.c (build_static_cast): Support templates.
19616         (build_const_cast): Likewise.
19617         * tree.def: Support CONST/STATIC_CAST_EXPR.
19618         * pt.c (tsubst_copy): Likewise.
19619         * decl2.c (build_expr_from_tree): Likewise.
19620
19621 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
19622
19623         * decl2.c (finish_vtable_vardecl): Don't trust
19624         TREE_SYMBOL_REFERENCED for vtables of local classes.
19625
19626 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
19627
19628         * pt.c (tsubst_copy): Handle operator T.
19629
19630 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19631
19632         * init.c (build_delete): Move creation of PARMS inside test of
19633         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
19634
19635 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
19636
19637         * typeck.c (build_conditional_expr): Don't assume that
19638         the arguments to ?: are always pointers or records.
19639
19640 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
19641
19642         * decl2.c (import_export_decl): Still emit static/weak/comdat
19643         copies of inline template functions with -fno-implicit-templates.
19644
19645 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
19646
19647         * init.c (build_delete): Determine the complete basetype
19648         path to the destructor we're calling.
19649
19650 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
19651
19652         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
19653         initialize the enum, because we really and truly don't know where
19654         it came from.
19655         (start_enum): Don't copy integer_zero_node because
19656         build_enumerator will do it.
19657
19658 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
19659
19660         * decl.c (finish_function): Do access control on base destructors.
19661
19662         * pt.c (tsubst, case FUNCTION_DECL): Set up
19663         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
19664         hose us.
19665
19666 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
19667
19668         * cvt.c (build_up_reference): If we have already extended the
19669         lifetime of the temporary, don't try it again.
19670         * typeck.c (c_expand_return): Don't try and convert the return
19671         value twice when we want a reference, once is enough.
19672
19673 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
19674
19675         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
19676         LOOKUP_ONLYCONVERTING at all for now.
19677
19678         * search.c (add_conversions): Put the conversion function in
19679         TREE_VALUE, the basetype in TREE_PURPOSE.
19680         * cvt.c (build_type_conversion): Adjust.
19681         * cvt.c (build_expr_type_conversion): Adjust.
19682         * call.c (user_harshness): Adjust.
19683
19684 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
19685
19686         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
19687         backend's benefit.
19688
19689 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
19690
19691         * except.c (expand_start_catch_block): Add a dummy region, if we
19692         get an error, so that we can avoid core dumping later.
19693
19694 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
19695
19696         * cp-tree.h (OFFSET_REF): Remove.
19697         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
19698         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
19699         * init.c (expand_aggr_init_1): Likewise.
19700         (build_new): Likewise.
19701         * typeck.c (expand_target_expr): Likewise.
19702
19703 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
19704
19705         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
19706         TARGET_EXPR.
19707
19708 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
19709
19710         * cvt.c (build_up_reference): Redo how and when temporaries are
19711         created.
19712         * decl.c (grok_reference_init): Don't try and be smart about
19713         running cleanups.
19714
19715 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
19716
19717         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
19718         (TARGET_EXPR...), now that it has 4 arguments.
19719         * tree.c (build_cplus_new): Likewise.
19720
19721 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19722
19723         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
19724
19725         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
19726         * decl.c (struct saved_scope): Remove named_labels,
19727         {base,member}_init_list.
19728         (maybe_push_to_top_level): Don't set them.  Call
19729         push_cp_function_context if appropriate.
19730         (pop_from_top_level): Likewise.
19731
19732         * method.c (do_build_assign_ref): Remove obsolete check of
19733         TYPE_HAS_ASSIGN_REF (basetype).
19734
19735         * decl.c (grokfndecl): Diagnose user definition of
19736         implicitly-declared methods.
19737
19738 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
19739
19740         * method.c (do_build_copy_constructor): Add code to give
19741         meaningful error messages instead of crashing.
19742         (do_build_assign_ref): Don't synthesize assignment operators for
19743         classes containing reference or const members.
19744
19745         * class.c (struct base_info): Remove cant_synth_copy_ctor
19746         and cant_synth_asn_ref.
19747         (finish_base_struct): Remove the code that tries to conditionalize
19748         synthesis of copy constructors & assignment operators based on
19749         access permissions.  Instead, let it fail when it tries to
19750         synthesize the copy constructor.  This will give meaningful error
19751         messages instead of silently generating code to perform a bitcopy.
19752
19753 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
19754
19755         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
19756         determining types for constant values.
19757
19758         * decl.c (struct named_label_list): Use instead of stuffing
19759         random items into a TREE_LIST node.
19760         (named_label_uses): Use the new struct.
19761         (poplevel): Likewise.
19762         (lookup_label): Likewise.
19763         (define_label): Add an error message to tell the user the line
19764         where the goto is located in addition to the destination of the
19765         goto.
19766         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
19767         named_label_uses.
19768         (finish_function): Likewise.
19769
19770         (start_decl): Complain about defining a static data member
19771         in a different type from which it was declared.
19772
19773 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
19774
19775         * cvt.c (build_expr_type_conversion): Adjust.
19776
19777 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
19778
19779         * call.c (build_method_call): Always convert 'this' to the
19780         appropriate type.
19781
19782         * search.c (add_conversions): Put the conversion function in
19783         TREE_VALUE, the type in TREE_PURPOSE.
19784         * cvt.c (build_type_conversion): Adjust.
19785         * call.c (user_harshness): Adjust.
19786
19787         * method.c (emit_thunk): Call temporary_allocation and
19788         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
19789
19790         * tree.c (build_cplus_array_type): Handle tweaking of
19791         TYPE_MAIN_VARIANT here.
19792         * typeck.c (common_type): Not here.
19793
19794         * typeck.c (complete_type): Only try to complete an array type if
19795         it has a domain.
19796
19797 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
19798
19799         * decl.c (grokvardecl): Call complete_type.
19800         (grokdeclarator): Call complete_type for PARM_DECLs.
19801
19802 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
19803
19804         * pt.c (instantiate_class_template): Re-set
19805         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
19806
19807 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
19808
19809         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
19810         smart enough to do it right.
19811         * tree.c (cp_expand_decl_cleanup): Likewise.
19812         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
19813         cp_expand_decl_cleanup.
19814         (store_parm_decls): Likewise.
19815         (hack_incomplete_structures): Likewise.
19816         * except.c (push_eh_cleanup): Likewise.
19817
19818 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
19819
19820         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
19821         frontend to the backend where it belongs.
19822         * tree.c (unsave_expr): Likewise.
19823         (unsave_expr_now): Likewise.
19824         * tree.def (UNSAVE_EXPR): Likewise.
19825         * cp-tree.h (unsave_expr): Likewise.
19826         (unsave_expr_now): Likewise.
19827
19828 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
19829
19830         * init.c (emit_base_init): Make sure the partial EH cleanups live
19831         on the function_obstack.
19832
19833 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
19834
19835         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
19836         when checking for pointer types.
19837
19838 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
19839
19840         * pt.c (instantiate_class_template): Remove obsolete check for
19841         access declarations.
19842
19843 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
19844
19845         * call.c (build_overload_call): Simplify calls to
19846         build_overload_call by removing last parameter.
19847         (build_method_call): Likewise.
19848         * cp-tree.h: Likewise.
19849         * method.c (build_opfncall): Likewise.
19850         * typeck.c (build_x_function_call): Likewise.
19851
19852 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
19853
19854         * call.c (default_parm_conversions): Factor out common code.
19855         (build_method_call): Use it.
19856         (build_overload_call_real): Use it.
19857
19858 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
19859
19860         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
19861         but pedwarn as the code is bogus.
19862         * typeck.c (decay_conversion): Likewise.
19863         (build_function_call_real): Use build_addr_func instead of
19864         default_conversion.  Don't allow pointer-to-method functions down
19865         here.
19866         (build_unary_op): Use real pointer-to-member functions instead of
19867         fake ones.
19868         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
19869         (convert_for_assignment): Removed some obsolete code.
19870         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
19871         build_x_function_call instead of current_class_ptr.  Only call
19872         digest_init once on an initializer, we do this just checking
19873         TREE_TYPE.
19874         (build_expr_from_tree): Pass current_class_ref to
19875         build_x_function_call instead of current_class_ptr.
19876         * init.c (build_member_call): Likewise.
19877         * pase.y: Likewise.
19878         * error.c (dump_expr): Handle OFFSET_REFs better.
19879         * pt.c (unify): Handle pointer-to-member functions better.
19880         * decl.c (finish_function): Clear out current_class_ref just like
19881         we do for current_class_ptr.
19882
19883         * typeck.c (get_delta_difference): Handle virtual bases better.
19884
19885 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
19886
19887         * sig.c (build_signature_table_constructor): Use the delta for
19888         the original basetype for this virtual function with thunks.
19889         (build_signature_method_call): We still need to adjust 'this'
19890         with thunks.
19891
19892 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
19893
19894         * call.c (build_addr_func): New routine.  Used to get the `real'
19895         address of a function or a method.  Needed to avoid getting a
19896         pointer-to-member function.
19897         (build_call): New routine to build CALL_EXPRs.
19898         (build_method_call): Use it.
19899         * cvt.c (convert_to_aggr): Likewise.
19900         * typeck.c (build_function_call_real): Likewise.
19901         * sig.c (build_signature_table_constructor): Use build_addr_func.
19902         * cp-tree.h (build_call, build_addr_func): Declare them.
19903
19904 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
19905
19906         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
19907         * parse.y: Remove uses of LOOKUP_AGGR.
19908
19909 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
19910
19911         * *.[chy]: Rename current_class_decl to current_class_ptr, and
19912         C_C_D to current_class_ref.
19913
19914 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
19915
19916         * call.c (convert_harshness): Tighten up pointer conversions.
19917
19918 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
19919
19920         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
19921         (finish_file): Likewise.
19922
19923 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
19924
19925         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
19926
19927         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
19928         code.
19929
19930 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19931
19932         * decl2.c: Turn on thunks by default where supported.
19933
19934 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
19935
19936         * cp-tree.h (build_overload_call_maybe): Removed.
19937         * call.c (build_overload_call_real): Invert meaning of last arg to
19938         be require_complete.
19939         (build_overload_call): Likewise.
19940         * typeck.c (build_x_function_call): Use build_overload_call_real
19941         instead of build_overload_call_maybe.
19942
19943 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
19944
19945         * decl2.c (finish_file): Don't try to emit functions that haven't
19946         been compiled.
19947
19948 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
19949
19950         * decl2.c (finish_vtable_vardecl): Oops.
19951
19952         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
19953         Also store the bindings from previous_class_values.
19954         (pop_from_top_level): Restore them.
19955
19956 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
19957
19958         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
19959         symbol has been referenced.
19960         (finish_file): Re-join synthesis/vtable loop with inline emission
19961         loop, disable inlining when an inline is output.
19962
19963 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
19964
19965         * except.c (init_exception_processing): Setup saved_in_catch.
19966         (push_eh_cleanup): Reset __eh_in_catch.
19967         (expand_start_catch_block): Set __eh_in_catch.
19968
19969 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
19970
19971         * except.c (push_eh_cleanup): Add tracking for whether or not we
19972         have an active exception object.
19973         (expand_builtin_throw): Use it to make sure a rethrow without an
19974         exception object is caught.
19975
19976 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
19977
19978         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
19979         cache.
19980
19981 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
19982
19983         * decl2.c (finish_file): Also use sentries for vars with
19984         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
19985         created).
19986
19987         * lex.c (handle_cp_pragma): Disable #pragma
19988         interface/implementation if SUPPORTS_ONE_ONLY > 1.
19989
19990 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
19991
19992         * method.c (emit_thunk): Wrap default case in
19993         temporary/permanent_allocation.
19994
19995         * method.c (make_thunk): Use DECL_ONE_ONLY.
19996         (emit_thunk): Call assemble_end_function.
19997
19998 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
19999
20000         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
20001         (import_export_decl): Likewise.
20002         (finish_prevtable_vardecl): Disable vtable hack if
20003         SUPPORTS_ONE_ONLY > 1.
20004
20005 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
20006
20007         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
20008         PREDECREMENT_EXPRs take two arguments, not one.
20009
20010 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
20011
20012         * class.c (build_vtable_entry): Don't build thunks for abstract
20013         virtuals.
20014
20015         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
20016         frontend.
20017
20018 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
20019
20020         * class.c (set_rtti_entry): Use size_zero_node.
20021         (build_vtable): Likewise.
20022
20023 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
20024
20025         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
20026         (prepare_fresh_vtable): Likewise.
20027
20028 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
20029
20030         * method.c (emit_thunk): Call mark_used on the target function.
20031
20032         * call.c (build_method_call): Don't warn about pending templates.
20033
20034 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
20035
20036         * decl2.c (finish_file): Fix list walking logic.
20037
20038         * typeck2.c (check_for_new_type): Only warn if -pedantic.
20039
20040 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
20041
20042         * class.c (finish_struct_1): Remove old code for
20043         dont_allow_type_definitions.
20044         * cp-tree.h: Likewise.
20045         * spew.c: Make sure cp-tree.h is included before parse.h, so the
20046         definition of flagged_type_tree is found before it is used.
20047         * lex.c: Likewise.
20048         * parse.y: Added the ftype member to the type union, and changed a
20049         number of rules to use it instead of ttype.  Added calls to
20050         check_for_new_type() as appropriate.
20051         * typeck2.c (check_for_new_type): New function for checking
20052         if a newly defined type appears in the specified tree.
20053         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
20054         for check_for_new_type().
20055
20056 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
20057
20058         * decl2.c (finish_file): Only use a sentry if the decl is public.
20059
20060         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
20061         don't pass LOOKUP_ONLYCONVERTING.
20062
20063 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
20064
20065         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
20066         properly keeps track of const and volatile type modifiers.
20067
20068 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
20069
20070         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
20071         * pt.c (comp_template_args): Use it.
20072
20073         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
20074         assemble_external for artificial function decls.
20075
20076         * decl.c (cp_finish_decl): Oops.
20077
20078 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
20079
20080         * decl2.c (import_export_decl): Put static data member templates
20081         into common storage, or make them weak, depending on whether they
20082         are dynamically or statically initialized.
20083         (get_sentry): New function.
20084         (finish_file): Do import_export_decl for static data members before
20085         building the init/fini functions.  Don't init/fini a variable that's
20086         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
20087         push/pop_temp_slots.
20088         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
20089         expand_static_init thang.
20090         * method.c (get_id_2): New function.
20091
20092 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
20093
20094         * parse.y (empty_parms): Make sure we use C++-style prototypes
20095         when we're declaring member functions.
20096
20097 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
20098
20099         * Makefile.in (CONFLICTS): 16 s/r conflicts.
20100         * parse.y (self_template_type): New nonterminal.
20101
20102 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
20103
20104         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
20105         name.
20106         * parse.y (base_class.1): Allow 'typename foo::bar'.
20107
20108         * lex.c (check_newline): Remove #pragma code that plays with the
20109         input stream, since we now deal with tokens.  Clear nextchar when
20110         we're done.
20111         (handle_cp_pragma): Use real_yylex.
20112         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
20113         in one place.
20114
20115         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
20116
20117         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
20118
20119 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20120
20121         * parse.y: New token SELFNAME for potential constructor.
20122         * spew.c (yylex): Handle it.
20123         * lex.c (identifier_type): Produce it.
20124
20125         * parse.y (complete_type_name): In :: case, don't push class binding.
20126         (complex_type_name): Likewise.
20127
20128 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
20129
20130         * typeck.c (build_reinterpret_cast): Handle pointer to member
20131         functions.
20132
20133 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20134
20135         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
20136         pragmas.
20137         (check_newline): Put the vtable/unit/implementation/interface pragma
20138         code into handle_cp_pragma, replacing it with a call.
20139         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
20140         args.  Get the next token after handling the pragma token.
20141
20142 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
20143
20144         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
20145         (convert_to_pointer_force): Likewise.
20146
20147         * init.c (build_new): Fix array new without -fcheck-new.
20148
20149 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
20150
20151         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
20152         tree.c: Lose TYPE_NESTED_NAME.
20153
20154         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
20155         as identifiers.
20156
20157         * tree.def: Add VEC_INIT_EXPR.
20158         * expr.c (cplus_expand_expr): Handle it.
20159         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
20160         the extra file-scope symbol nastiness.
20161
20162 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
20163
20164         * method.c (make_thunk): Thunks are static.
20165         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
20166
20167         * decl2.c (mark_vtable_entries): Emit thunks as needed.
20168         (finish_file): Don't emit them here.
20169
20170 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
20171
20172         * rtti.c (build_dynamic_cast): Handle null pointers.
20173         (ifnonnull): New function.
20174
20175 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
20176
20177         * call.c (build_method_call): Remember the original basetype we
20178         were called with.  Give an error message instead of trying
20179         (incorrectly) to call a non-static member function through a
20180         non-inherited class.
20181
20182         * search.c (expand_upcast_fixups): Mark the new fixup as
20183         DECL_ARTIFICIAL.
20184
20185 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20186
20187         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
20188
20189         * class.c (set_rtti_entry): Fix for thunks.
20190
20191         * decl2.c (import_export_decl): Still emit typeinfo fns for
20192         cv-variants of builtin types.
20193
20194         * rtti.c (expand_class_desc): Set up base_info_type_node here.
20195         (init_rtti_processing): Instead of here.
20196
20197 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
20198
20199         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
20200         (build_typeid): Only complain about taking dynamic typeid without
20201         -frtti.
20202
20203         * decl2.c: flag_rtti defaults to 1.
20204
20205         * rtti.c (get_tinfo_var): The general class case is now smaller.
20206         (init_rtti_processing): Pack the latter three fields of base_info
20207         into 32 bits.
20208
20209 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
20210
20211         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
20212
20213 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
20214
20215         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
20216         (push_memoized_context): Split out code to undefer pop_type_level to
20217         (clear_memoized_cache): here.
20218         (pop_memoized_context): We can only handle one layer of deferral of
20219         pop_type_level so clear the cache, if there was a previous level.
20220
20221 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20222
20223         * rtti.c (init_rtti_processing): Build up base_info_type_node.
20224         (expand_class_desc): Use one pointer to an array of base_info
20225         structs, passed using a CONSTRUCTOR.
20226
20227 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
20228
20229         * class.c (build_vbase_path): Remove block extern for
20230         flag_assume_nonnull_objects here.
20231         (build_vfn_ref): Split out functionality into build_vtbl_ref.
20232         (build_vtbl_ref): New routine.
20233         (build_vtable): Set up rtti info here.
20234         (add_virtual_function): Note in CLASSTYPE_RTTI the best
20235         place where we can get the rtti pointers from to avoid having to
20236         search around for a place.
20237         (finish_base_struct): Likewise.
20238         (finish_struct_1): Likewise.  Never create totally new vtables
20239         with totally new vtable pointers for rtti.  Disable code to layout
20240         vtable pointers better until we want to break binary
20241         compatibility.
20242         * rtti.c (build_headof_sub): New routine to convert down to a
20243         sub-object that has an rtti pointer in the vtable.
20244         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
20245         maintainable.
20246         (build_dynamic_cast): Make sure we have saved it, if we need to.
20247         * search.c (dfs_init_vbase_pointers): Disable code that deals with
20248         a more efficient vtable layout, enable later.
20249         * call.c (flag_assume_nonnull_objects): Moved declaration to
20250         * cp-tree.h: here.  Declare build_vtbl_ref.
20251         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
20252         function calls that want a tree.
20253
20254 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
20255
20256         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
20257         other X subobjects in the most derived type.  Ack.
20258
20259         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
20260         get_typeid will do it for us.
20261         (get_typeid_1): Break out call-building for expand_*_desc to use.
20262         (get_typeid): Call it.
20263         (expand_*_desc): Likewise.
20264         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
20265         and void *.
20266         (init_decl_processing): Lose builtin_type_tdescs lossage.
20267         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
20268
20269 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
20270
20271         * pt.c (tsubst): When calling set_nested_typename, use
20272         TYPE_NESTED_NAME (current_class_type) instead of
20273         current_class_name.
20274
20275         * decl.c (pushdecl): Likewise.
20276         (pushdecl_class_level): Likewise.
20277         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
20278         set_nested_typename.
20279
20280 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
20281
20282         * rtti.c (synthesize_tinfo_fn): Handle arrays.
20283
20284         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
20285
20286 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
20287
20288         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
20289         (init_rtti_processing): Lose bad_cast_type.
20290         (build_dynamic_cast): Use throw_bad_cast.
20291
20292         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
20293
20294         * decl2.c (finish_file): Don't synthesize artificial functions
20295         that are external and not inline.
20296
20297         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
20298
20299         * decl2.c (finish_file): Handle having new inlines added to
20300         saved_inlines by synthesis.
20301
20302         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
20303
20304 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20305
20306         RTTI rewrite to initialize nodes as needed, not require that
20307         users #include <typeinfo>, complete functionality and reduce wasted
20308         space.
20309         * rtti.c (init_rtti_processing): New fn.
20310         (build_typeid): The vtable entry is now a function.
20311         (get_tinfo_var): New fn.
20312         (get_tinfo_fn): Likewise.
20313         (get_typeid): Use it.
20314         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
20315         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
20316         points __rtti_*.
20317         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
20318         (synthesize_tinfo_fn): New fn.
20319         * method.c (build_t_desc_overload): Lose.
20320         (build_overload_with_type): More generic.
20321         * decl.c (init_decl_processing): Call init_rtti_processing.
20322         * class.c (set_rtti_entry): Use get_tinfo_fn.
20323         * decl2.c (mark_vtable_entries): Mark the rtti function.
20324         (finish_prevtable_vardecl): Don't build_t_desc.
20325         (import_export_decl): Handle tinfo functions.
20326         (finish_file): Likewise.
20327         * typeck.c (inline_conversion): New fn.
20328         (build_function_call_real): Use it.
20329         * cp-tree.h: Add decls.
20330
20331         * method.c (hack_identifier): Also convert component_refs from
20332         references.
20333
20334         * lex.c (cons_up_default_function): Use the type, not the name, in
20335         declspecs.
20336
20337         * decl2.c (import_export_vtable): Fix weak vtables.
20338
20339 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
20340
20341         * search.c (get_base_distance_recursive): Fix access checks for
20342         protected bases.
20343
20344 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20345
20346         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
20347         cp-tree.h.
20348         (convert_harshness): Add prototypes wrapped by PROTO.
20349         * decl2.c (grok_function_init): Likewise.
20350         (do_toplevel_using_decl): Change to void return type.
20351         * class.c (build_vtable_entry): Remove decl of make_thunk.
20352         (merge_overrides): Fix order of arg definitions.
20353         (finish_vtbls): Likewise.
20354         (fixup_vtable_deltas): Likewise.
20355         (modify_all_direct_vtables): Likewise.
20356         (modify_all_indirect_vtables): Likewise.
20357         * search.c (get_base_distance_recursive): Likewise.
20358         (get_abstract_virtuals_1): Likewise.
20359         (fixup_virtual_upcast_offsets): Likewise.
20360         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
20361         * init.c (perform_member_init): Fix order of arg definitions.
20362         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
20363         * cp-tree.h (make_thunk): Add decl.
20364         (overload_template_name, push_template_decl): Add decls.
20365         (do_toplevel_using_decl): Change to void return type.
20366         (vec_binfo_member): Add decl.
20367
20368 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20369
20370         * typeck.c (mark_addressable, convert_for_assignment,
20371         convert_for_initialization, pointer_int_sum, pointer_diff,
20372         unary_complex_lvalue): Add prototypes wrapped by PROTO.
20373         (convert_sequence): #if 0 fn decl, since definition also is.
20374
20375 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
20376
20377         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
20378         cast to pointer types for type searching.
20379
20380 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20381
20382         * typeck.c (get_delta_difference): Use cp_error, not error, in the
20383         case where BINFO == 0.
20384
20385 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
20386
20387         * call.c (build_method_call): Fix wording of error messages so
20388         constructors come out right.
20389
20390 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
20391
20392         * decl.c (push_overloaded_decl): Don't warn about hidden
20393         constructors when both the type and the function are declared
20394         in a system header file.
20395
20396 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
20397
20398         * class.c (finish_struct_1): Propagate the TYPE_PACKED
20399         flag for the type to the type's fields.
20400
20401 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20402
20403         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
20404
20405 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
20406
20407         * class.c (base_info, finish_base_struct): Replace
20408         needs_virtual_dtor with base_has_virtual.
20409
20410         (finish_struct_1): Remove the old code that tried to make default
20411         destructors virtual.  Use base_has_virtual when checking if we need
20412         to add a vtable entry for the rtti code.
20413
20414 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
20415
20416         * pt.c (push_template_decl): Complain about template decl with
20417         inappropriate declaration.
20418
20419 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
20420
20421         * typeck.c (build_x_unary_op): Remove bogus check for taking
20422         the address of a member function.
20423
20424 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
20425
20426         * parse.y (constructor_declarator): Only push the class if
20427         we are not already in the class.
20428
20429 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
20430
20431         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
20432         Add additional argument to INIT_CUMULATIVE_ARGS.
20433
20434 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
20435
20436         * decl.c (shadow_tag): Fix error about anon union with methods.
20437
20438         * parse.y (self_reference): Only generate a self-reference if this
20439         is a non-template class.
20440         (opt.component_decl_list): Only use it if it was generated.
20441
20442         * parse.y (component_decl_1): Use constructor_declarator.
20443         (fn.def2): Likewise.
20444         (notype_component_declarator0): Likewise.
20445
20446 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
20447
20448         * typeck.c (build_x_unary_op): Add checks for taking the address
20449         of a TARGET_EXPR or of a member function, and give appropriate
20450         warnings.
20451
20452 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
20453
20454         * pt.c (process_template_parm): Allow template type parms to be
20455         used as types for template const parms.
20456
20457 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
20458
20459         * init.c (expand_vec_init): Ensure the eh cleanups are on the
20460         function_obstack.
20461
20462 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20463
20464         * decl.c (lookup_name_real): Be even more picky about the
20465         ambiguous lookup warning.
20466         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
20467         * parse.y (constructor_declarator): Rather than here.
20468
20469         * parse.y (constructor_declarator): New nonterminal.
20470         (fn.def1): Use it.
20471         (explicit_instantiation): Likewise.
20472
20473 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20474
20475         Add implicit declaration of class name at class scope.
20476         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
20477         * parse.y (self_reference): New nonterminal.
20478         (opt.component_decl_list): Use it.
20479         (fn.def1): Add nested_name_specifier type_name cases.
20480         * class.c (build_self_reference): New function.
20481         (finish_struct): Handle access_default later, move self-reference
20482         decl to the end.
20483         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
20484         * cp-tree.h: Adjust.
20485
20486         * pt.c (do_function_instantiation): Separate handling of member
20487         functions and non-member functions properly.
20488
20489 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
20490
20491         * pt.c (process_template_parm): Improve error for 'volatile class K'.
20492
20493         * class.c (finish_struct_1): Check the right slot for destructors.
20494
20495         * decl.c (start_enum): Complain about enum templates.
20496
20497 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
20498
20499         * init.c (resolve_offset_ref): Offset pointers to member data by one.
20500         * typeck.c (unary_complex_lvalue): Likewise.
20501
20502 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
20503
20504         * typeck.c (c_expand_return): Check for a returned local
20505         array name, similar to the check for an ADDR_EXPR.
20506
20507 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
20508
20509         * decl.c (cp_finish_decl): Don't build cleanups for static
20510         variables here.
20511
20512 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
20513
20514         * typeck.c (build_modify_expr): Fix error messages to be more
20515         accurate.
20516         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
20517         assignment operators.
20518         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
20519         assignment operators.
20520
20521 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
20522
20523         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
20524         give an error if initialized.  pedwarn about nested type with the
20525         same name as its enclosing class.
20526
20527         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
20528
20529         * typeck.c (require_complete_type): Be sure to instantiate the
20530         MAIN_VARIANT of the type.
20531
20532         * decl2.c (finish_file): Instantiate pending templates before
20533         processing static constructors and destructors.
20534
20535         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
20536         unless at_eof.
20537
20538 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
20539
20540         * decl2.c (delete_sanity): If error_mark_node is passed
20541         in as an expression, quit while we're ahead.
20542
20543         * decl.c (grokdeclarator): Give an error message if `friend'
20544         is combined with any storage class specifiers.
20545
20546 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
20547
20548         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
20549         definition of nonexistent nested type.
20550
20551         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
20552         not to say 'typedef'.
20553
20554 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20555
20556         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
20557         * search.c (dfs_walk, dfs_init_vbase_pointers,
20558         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
20559         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
20560
20561 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
20562
20563         * except.c (build_throw): Support minimal parse.
20564         * pt.c (tsubst_copy): Support THROW_EXPR.
20565         * decl2.c (build_expr_from_tree): Likewise.
20566
20567         * pt.c (mangle_class_name_for_template): Always allocate
20568         scratch_firstobj.
20569
20570 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
20571
20572         * cvt.c (cp_convert_to_pointer): Give an appropriate error
20573         when trying to cast from an incomplete type.
20574
20575 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20576
20577         * pt.c (instantiate_class_template): Don't bother setting up
20578         CLASSTYPE_TAGS explicitly, as the nested types will add
20579         themselves.
20580
20581 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
20582
20583         * decl.c (shadow_tag): Remove old error check for usage of
20584         an enum without a previous declaration.
20585         (xref_tag): Add error message about usage of enums without a
20586         previous declaration.
20587
20588 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
20589
20590         * lex.c (do_identifier): Only do name consistency check if we're
20591         parsing.
20592
20593         * pt.c (push_template_decl): Don't crash if we get a member defn
20594         that doesn't match.
20595
20596         * decl.c (xref_tag_from_type): New function to do an xref without
20597         always having to figure out code_type_node.
20598         * cp-tree.h: Declare it.
20599         * pt.c (instantiate_class_template): Use it for friend classes.
20600         (lookup_template_class): Use it.
20601
20602         * typeck2.c (build_functional_cast): Pull out a single parm before
20603         passing it to build_c_cast.
20604
20605 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
20606
20607         * expr.c (do_case): Give an error message if a pointer is
20608         given as a case value.
20609
20610 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
20611
20612         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
20613         an overload list.
20614
20615         * lex.c (cons_up_default_function): Really, now, interface hackery
20616         does not apply to synthesized methods.
20617
20618 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
20619
20620         * call.c (build_method_call): Ctors and dtors now have special names
20621         with respect to lookups.
20622         * class.c (add_method): Likewise.
20623         (grow_method): Likewise.
20624         (finish_struct_methods): Likewise.
20625         (warn_hidden): Likewise.
20626         (finish_struct_1): Likewise.
20627         * cvt.c (convert_to_reference): Likewise.
20628         (convert_to_aggr): Likewise.
20629         (cp_convert): Likewise.
20630         * decl2.c (check_classfn): Likewise.
20631         * init.c (expand_member_init): Likewise.
20632         (expand_default_init): Likewise.
20633         (expand_aggr_init_1): Likewise.
20634         (build_offset_ref): Likewise.
20635         (build_new): Likewise.
20636         (build_delete): Likewise.
20637         * lex.c (do_inline_function_hair): Likewise.
20638         * search.c (lookup_field_1): Likewise.
20639         (lookup_fnfields_here): Likewise.
20640         (lookup_field): Likewise.
20641         (lookup_fnfields): Likewise.
20642         (get_virtual_destructor): Likewise.
20643         (dfs_debug_mark): Likewise.
20644         (dfs_pushdecls): Likewise.
20645         (dfs_compress_decls): Likewise.
20646         * tree.c (layout_basetypes): Likewise.
20647         * typeck.c (build_component_ref): Likewise.
20648         (build_x_function_call): Likewise.
20649         (build_modify_expr): Likewise.
20650         (convert_for_initialization): Likewise.
20651         (build_functional_cast): Likewise.
20652         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
20653         (CTOR_NAME): New.
20654         (DTOR_NAME): New.
20655         * decl.c (ctor_identifier): New.
20656         (dtor_identifier): New.
20657         (init_decl_processing): Set them.
20658
20659 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
20660
20661         * typeck.c (build_component_ref): Don't get confused by fields whose
20662         context has no type name, like pointer to member functions.
20663
20664 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
20665
20666         * decl.c (grokdeclarator): Handle typedef without declarator.
20667
20668         * pt.c (tsubst): Handle SCOPE_REF in declarator.
20669
20670         * parse.y (bad_parm): Catch another case of missing `typename'.
20671
20672         * lex.c (yyprint): Handle TYPE_DECLs.
20673
20674         * decl.c (start_function): Don't try to be clever.
20675
20676         * lex.c: Lose compiler_error_with_decl.
20677         * typeck2.c: Lose error_with_aggr_type.
20678         (incomplete_type_error): Use cp_* instead of old functions.
20679         (readonly_error): Likewise.
20680         * typeck.c (convert_arguments): Likewise.
20681         * search.c (lookup_nested_field): Likewise.
20682         * method.c (make_thunk): Likewise.
20683         * decl.c (grokparms): Likewise.
20684         * cp-tree.h: Update.
20685
20686         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
20687         and value.
20688
20689 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
20690
20691         * method.c (build_opfncall): When deleting a pointer to an
20692         array, build a new pointer to the tree past any ARRAY_TYPE
20693         nodes.
20694
20695 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20696
20697         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
20698
20699 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
20700
20701         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
20702         and ! DECL_INLINE.
20703
20704         * decl.c (finish_function): Don't set nested based on
20705         hack_decl_function_context.
20706         * parse.y (function_try_block): Check for nested function.
20707         (pending_inlines): Likewise.
20708
20709         * decl2.c (build_expr_from_tree): If a unary op already has a
20710         type, just return it.
20711
20712         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
20713
20714         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
20715         (finish_file): Check the return value of walk_vtables.
20716         (finish_prevtable_vardecl): Return int.
20717         (finish_vtable_vardecl): Likewise.
20718         (prune_vtable_vardecl): Likewise.
20719         * lex.c (set_vardecl_interface_info): Likewise.
20720         * cp-tree.h: Adjust return types.
20721
20722         * class.c (delete_duplicate_fields_1): Don't complain about
20723         duplicate nested types if they're the same type.
20724         (finish_struct): Remove check for duplicate.
20725         * decl2.c (grokfield): Don't check for typedef of anonymous type.
20726
20727 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
20728
20729         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
20730
20731         * decl.c (grokdeclarator): Lose special handling of class-level
20732         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
20733         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
20734
20735         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
20736
20737         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
20738
20739         * search.c (compute_access): Fix handling of anonymous union
20740         members.
20741         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
20742         from anonymous unions to their members.
20743
20744         * typeck.c (build_x_function_call): For static member functions,
20745         hand off to build_member_call.
20746
20747 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
20748
20749         * typeck.c (build_component_ref): Handle OFFSET_REFs.
20750
20751         * init.c (expand_vec_init): Fix init == 0 case.
20752
20753 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
20754
20755         * init.c (build_new): pedwarn about init and array new.
20756         (expand_vec_init): Handle lists, use convert_for_initialization.
20757
20758         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
20759         when converting to an aggregate type.
20760         * cvt.c (cp_convert): Pass it through.
20761
20762         * typeck.c (build_conditional_expr): Handle user-defined
20763         conversions to slightly different types.
20764
20765         * decl.c (grokdeclarator): Force an array type in a parm to be
20766         permanent.
20767
20768         * decl2.c (do_using_directive): Sorry.
20769         (do_namespace_alias): Likewise.
20770         * lex.c (real_yylex): Warn about using the `namespace' keyword.
20771
20772 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20773
20774         * parse.y (datadef): Move call to note_list_got_semicolon up.
20775
20776 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
20777
20778         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
20779
20780 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
20781
20782         * decl.c (cp_finish_decl): The exception regions have to be
20783         nested, not overlapping.  We start the exception region for a
20784         decl, after it has been fully built, and all temporaries for it
20785         have been cleaned up.
20786
20787 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
20788
20789         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
20790
20791 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
20792
20793         * tree.def: Add RETURN_INIT.
20794         * pt.c (instantiate_decl): Handle RETURN_INIT.
20795         * decl.c (store_return_init): Handle minimal_parse_mode.
20796
20797         * tree.c (cp_build_type_variant): Just return an error_mark_node.
20798         * decl.c (make_typename_type): Don't try to get the file and line
20799         of an identifier.
20800         * typeck.c (comptypes): Handle TYPENAME_TYPE.
20801
20802 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
20803
20804         * decl.c (poplevel): Make sure we clear out and restore old local
20805         non-VAR_DECL values by default when they go out of scope.
20806
20807 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
20808
20809         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
20810         referring to addresses of variables and functions.
20811
20812         * error.c (dump_expr): Support SIZEOF_EXPR.
20813
20814         * init.c (do_friend): Use the return value of check_classfn.
20815
20816         * typeck.c (convert_arguments): Call complete_type.
20817
20818         * method.c (hack_identifier): After giving an error, set value to
20819         error_mark_node.
20820
20821 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
20822
20823         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
20824         lossage for local classes.
20825         * cp-tree.h: Declare it.
20826         * decl.c (lookup_name_real): Evil, painful hack for local classes.
20827         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
20828         Use hack_decl_function_context.
20829         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
20830         (start_function): Use hack_decl_function_context.
20831         (finish_function): Likewise.
20832         * method.c (synthesize_method): Likewise.
20833         * lex.c (process_next_inline): Likewise.
20834         (do_pending_inlines): Likewise.
20835         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
20836         done with it.
20837
20838 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
20839
20840         * sig.c (build_signature_pointer_or_reference_type): Align
20841         signature pointers/references on 8-byte boundaries so they can be
20842         grabbed 2 words at a time on a Sparc.
20843
20844 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
20845
20846         * method.c (hack_identifier): Requiring a static chain is now a
20847         hard error.
20848         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
20849         functions.
20850
20851 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20852
20853         * init.c (build_offset_ref): Call complete_type.
20854
20855         * decl.c (pop_from_top_level): Always pop previous_class_type.
20856
20857         * parse.y: Handle multiple decls in a for-init-statement.
20858         * pt.c (tsubst_expr): Likewise.
20859
20860         * pt.c (tsubst): Use tsubst_expr for the second operand of an
20861         ARRAY_REF.
20862
20863         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
20864         (poplevel_class): Set it here.
20865         (pop_from_top_level): Pop it here if we're returning to class scope.
20866         * class.c (pushclass): Don't set it here.
20867
20868         * decl.c (maybe_push_to_top_level): Save current_template_parms,
20869         and clear it if !pseudo.
20870         (pop_from_top_level): Restore it.
20871
20872         * decl2.c (finish_file): Push the dummy each time we walk the list
20873         of vtables.
20874
20875         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
20876         something for CAST_EXPR.
20877
20878 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
20879
20880         * cvt.c (cp_convert): Warn about implicit conversion of the
20881         address of a function to bool, as it is always true.
20882
20883 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
20884
20885         * typeck.c (c_expand_return): Fix warning for local externs returned.
20886
20887 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
20888
20889         * tree.c (mapcar): Propagate const and volatile properly.
20890
20891         * typeck.c (complete_type): Be sure to instantiate the
20892         MAIN_VARIANT of the type.
20893
20894         * method.c (synthesize_method): Class interface hackery does not
20895         apply to synthesized methods.
20896
20897 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
20898
20899         * pt.c (comp_template_args): Use comptypes rather than just
20900         checking for TEMPLATE_TYPE_PARM equivalence.
20901
20902         * typeck.c (build_x_function_call): Call complete_type before
20903         checking TYPE_OVERLOADS_CALL_EXPR.
20904
20905 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
20906
20907         * g++.c (main): Check also for new define ALT_LIBM.
20908
20909 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20910
20911         * pt.c (instantiate_class_template): If we don't have a pattern
20912         yet, that's OK.
20913         (coerce_template_parms): If we see a local class, bail.
20914
20915         * decl.c (grok_reference_init): Make sure there's a type before
20916         checking its code.
20917
20918         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
20919         (push_template_decl): Likewise.
20920
20921         * parse.y (named_class_head): Set
20922         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
20923
20924         * decl.c (xref_tag): Diagnose redeclaration of template
20925         type-parameter name.
20926
20927         * error.c (dump_type): Handle anonymous template type parms.
20928
20929         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
20930         TYPE_STUB_DECL.
20931         (coerce_template_parms): Likewise.
20932
20933 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
20934
20935         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
20936         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
20937
20938 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
20939
20940         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
20941         before trying to get its STUB_DECL.
20942         (coerce_template_parms): Likewise.
20943
20944         * parse.y (template_type_parm): If they didn't use 'class',
20945         pretend they did after giving an error.
20946
20947         * pt.c (coerce_template_parms): Diagnose use of local class.
20948
20949         * decl.c (grok_reference_init): Use instantiate_type.
20950
20951         * error.c (dump_expr): Handle TEMPLATE_DECLs.
20952
20953         * parse.y (named_class_head): Diagnose mismatching types and tags.
20954
20955         * decl.c (pushdecl): Type decls and class templates clash with
20956         artificial type decls, not hide them.
20957
20958         * decl.c (redeclaration_error_message): Diagnose redefinition of
20959         templates properly.
20960         (duplicate_decls): Diagnose disallowed overloads for template
20961         functions, too.
20962
20963         * decl.c (start_decl): Call complete_type before checking for a
20964         destructor.
20965
20966         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
20967
20968         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
20969
20970 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
20971
20972         * decl.c (grok_op_properties): Don't check for operator++(int) in
20973         a template.
20974
20975         * tree.c (perm_manip): Return a copy of variable and function
20976         decls with external linkage.
20977
20978         * tree.def: Change some of the min tree codes to type "1".
20979         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
20980         * method.c (build_overload_int): Emit something arbitrary for
20981         anything but an INTEGER_CST if we're in a template.
20982
20983         * decl.c (cp_finish_decl): Call complete_type before deciding
20984         whether or not to lay out the decl.
20985
20986         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
20987
20988 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
20989
20990         * typeck2.c (build_x_arrow): Call complete_type.
20991
20992         * pt.c (add_pending_template): Broken out.
20993         (lookup_template_class): If -fexternal-templates, call it for all
20994         the methods of implemented types.
20995         (instantiate_class_template): Instead of instantiating them here.
20996         (instantiate_decl): Handle -fexternal-templates earlier.
20997
20998 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20999
21000         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
21001         memoized lookup stuff inside GATHER_STATISTICS.
21002
21003 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
21004
21005         * decl.c (start_decl): Complain about array of incomplete type
21006         here.
21007         (grokdeclarator): Not here.
21008
21009         * parse.y (template_parm): Expand full_parm inline so we can set
21010         the rule's precedence.
21011
21012         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
21013         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
21014         * decl2.c (grokbitfield): Don't check for integer constant here.
21015         * class.c (finish_struct_1): Check here.
21016
21017         * decl.c (define_label): Make the min decl go on permanent_obstack.
21018
21019         * pt.c (unify): Don't handle CONST_DECLs.
21020         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
21021         (tsubst_copy): Likewise.
21022
21023         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
21024         CONST_DECL for a template parm.
21025
21026 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
21027
21028         * decl.c (grokdeclarator): Complain about array of incomplete type
21029         here.
21030         (start_decl_1): Not here.
21031
21032         * pt.c (tsubst): Handle pointer-to-function declarators.
21033
21034         * method.c (hack_identifier): If pedantic, diagnose local class
21035         methods that require a static chain.
21036
21037         * decl.c (grok_op_properties): No longer static.
21038         * cp-tree.h: Declare it.
21039         * pt.c (tsubst): Call it for operators.
21040         Use tsubst_copy for TREE_VECs.
21041
21042         * parse.y (template_arg): The expr has precedence like '>'.
21043
21044 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
21045
21046         * pt.c (coerce_template_parms): Don't coerce an expression using
21047         template parms.
21048         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
21049         (tsubst): Don't use build_index_2_type if the max_value uses template
21050         parms.
21051         * method.c (build_overload_int): Emit something arbitrary for an
21052         expression using template parms.
21053
21054         * parse.y (template_close_bracket): New non-terminal to catch use
21055         of '>>' instead of '> >' in template class names.
21056         (template_type): Use it.
21057         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
21058
21059         * tree.def: Add CAST_EXPR.
21060         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
21061         CONVERT_EXPR for minimal_parse_mode.
21062         * typeck.c (build_c_cast): Likewise.
21063         * pt.c (tsubst_copy): Likewise.
21064         * decl2.c (build_expr_from_tree): Likewise.
21065         * error.c (dump_expr): Likewise.
21066
21067 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21068
21069         * except.c (SetTerminate, SetUnexpected): Put back global vars.
21070         (init_exception_processing): Put back decl/init of
21071         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
21072         fns from libstdc++.
21073
21074         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
21075         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
21076         Delete unused fns.
21077         * cp-tree.h (declare_uninstantiated_type_level,
21078         uninstantiated_type_level_p): Delete prototypes.
21079
21080 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
21081
21082         * pt.c (tsubst_expr): Add default return.
21083
21084 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21085
21086         * error.c (fndecl_as_string): Delete unused arg CNAME.
21087         * sig.c (build_signature_table_constructor,
21088         build_signature_method_call): Fix calls.
21089
21090         * class.c (the_null_vtable_entry): Delete var definition.
21091         (init_class_processing): Delete tree the_null_vtable_entry init.
21092         * decl.c (no_print_{functions, builtins}): Declare as static.
21093         (__tp_desc_type_node): #if 0 var definition.
21094         (init_type_desc): #if 0 init of __tp_desc_type_node.
21095         (vb_off_identifier): Move var decl into init_decl_processing.
21096         (current_function_assigns_this): Declare as static.
21097         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
21098         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
21099         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
21100         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
21101         * init.c (BI_header_type, BI_header_size): Declare as static.
21102         * pt.c (template_classes): Delete unused var.
21103         (add_pending_template): Delete decl for non-existent fn.
21104         (lookup_template_class): Delete vars CODE and TAG_CODE.
21105         (instantiate_template): Delete unused var TARGS.
21106         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
21107         Delete decls.
21108         (__tp_desc_type_node): #if 0 var decl.
21109         (fndecl_as_string): Fix prototype.
21110
21111 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
21112
21113         * tree.def: Add GOTO_STMT.
21114         * pt.c (tsubst_expr): Support goto and labels.
21115         * decl.c (define_label): Support minimal parsing.
21116         * parse.y (simple_stmt): Likewise.
21117
21118 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21119
21120         * xref.c (GNU_xref_member): Only define/set var I if
21121         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
21122         used.
21123         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
21124         (GNU_xref_end): Fix call.
21125         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
21126         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
21127
21128         * tree.c (build_exception_variant): Delete unused vars I, A, T,
21129         T2, and CNAME.
21130         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
21131         (mapcar): Delete unused var CODE.
21132         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
21133         (break_out_cleanups): Fix call.
21134         (bot_manip): Likewise.
21135         * call.c (build_method_call): Likewise.
21136         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
21137         Likewise.
21138         * typeck.c (unary_complex_lvalue, build_modify_expr,
21139         convert_for_initialization): Likewise.
21140         * typeck2.c (build_functional_cast): Likewise.
21141         * cp-tree.h (build_cplus_new): Fix prototype.
21142
21143         * repo.c (open_repo_file): Delete unused var Q.
21144         (repo_compile_flags, repo_template_declared,
21145         repo_template_defined, repo_class_defined, repo_inline_used,
21146         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
21147         (repo_get_id, repo_vtable_used): Declare as static.
21148         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
21149         prototypes.
21150
21151 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
21152
21153         * parse.y (pending_inlines): Add function_try_block case.
21154
21155         * pt.c (unify): Fix for template const parms.
21156
21157 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21158
21159         * lex.c (extract_interface_info): Delete forward decl.
21160         (default_copy_constructor_body, default_assign_ref_body): Delete
21161         decls for non-existent functions.
21162         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
21163         (init_lex): Delete setting them.
21164         (cons_up_default_function): Delete unused vars FUNC_BUF,
21165         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
21166         #if 0'd synth code.
21167         (toplevel, expression_obstack): Delete unused extern decls.
21168         (tree_node_kind): Delete unused enum.
21169         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
21170         GATHER_STATISTICS.
21171         (tree_node_kind_names): Delete unused extern decl.
21172         (synth_obstack): Delete unused var.
21173         (init_lex): Don't set it.
21174         (init_parse): Add decl before use.
21175         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
21176         (current_unit_{name, language}): Delete unused vars.
21177         (check_newline): Don't bother setting them, just accept the #pragma.
21178         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
21179         (current_unit_{name, language}): Delete decls.
21180
21181         * search.c: Wrap all of the memoized functions, macros, and
21182         variables inside #ifdef GATHER_STATISTICS.
21183         (lookup_field, lookup_fnfields): Likewise.
21184         (init_search_processing): Likewise.
21185         (reinit_search_statistics): Wrap whole function.
21186         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
21187
21188         * decl.c (finish_function): Only call pop_memoized_context if
21189         GATHER_STATISTICS is defined.
21190         (start_function): Likewise for push_memoized_context.
21191         * class.c (pushclass, popclass): Likewise.
21192
21193         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
21194         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
21195
21196         * cvt.c (cp_convert): Delete unused local var FORM.
21197         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
21198         prototypes.
21199
21200 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
21201
21202         * pt.c (do_poplevel): Oops; really return what we get from
21203         poplevel this time.
21204
21205 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21206
21207         * cp-tree.h (is_aggr_type): Add prototype.
21208
21209         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
21210         * method.c ({push,pop}_cp_function_context): Delete decls.
21211         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
21212         (SetUnexpected, SetTerminate): Delete unused vars.
21213         (init_exception_processing): Don't set SetUnexpected or
21214         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
21215         (output_exception_table_entry): Delete unused array LABEL.
21216         (expand_internal_throw): Delete unused var PARAMS.
21217         (expand_start_catch_block): Delete unused var CLEANUP.
21218         (emit_exception_table): Delete unused var EH_NODE_DECL.
21219         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
21220         GOTO_UNWIND_AND_THROW.  Don't set them.
21221         (end_eh_unwinder): Add top decl.
21222         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
21223         (exception_section, push_rtl_perm, do_function_call,
21224         lang_interim_eh, push_eh_cleanup, eh_outer_context,
21225         expand_end_eh_spec, end_eh_unwinder): Declare as static.
21226         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
21227         throw_used): Likewise.
21228         * cp-tree.h (expand_end_eh_spec): Delete prototype.
21229
21230         * search.c (dfs_mark, dfs_mark_vtable_path,
21231         dfs_unmark_vtable_path, dfs_mark_new_vtable,
21232         dfs_unmark_new_vtable, dfs_clear_search_slot,
21233         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
21234         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
21235         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
21236         functions.
21237         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
21238         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
21239         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
21240         Only define #ifdef GATHER_STATISTICS.
21241         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
21242         is defined.
21243         (vbase_decl): Delete var definition.
21244         (init_search): Delete old decl.
21245         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
21246         never actually used.
21247         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
21248         (get_base_distance_recursive): Delete unused fourth arg
21249         BASETYPE_PATH.  Fix call .
21250         (get_base_distance): Fix call.
21251         (push_class_decls): Delete unused var ID.
21252         (make_memoized_table_entry): Declare as static.
21253         (breadth_first_search): Declare as static.
21254         (tree_has_any_destructor_p): Declare as static.
21255         (pop_class_decls): Delete unused arg pop_class_decls.
21256         * class.c (popclass): Fix call to pop_class_decls.
21257         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
21258         tree_has_any_destructor_p): Delete prototypes.
21259
21260         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
21261         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
21262         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
21263         (build_user_desc): Delete unused var T.
21264         (build_class_desc): Delete unused vars T and OFF.
21265         (build_t_desc): Delete unused var NAME_STRING.
21266         (build_headof): Make static.
21267         (get_bad_cast_node): Likewise.
21268         (get_def_to_follow): Likewise.
21269         * cp-tree.h (init_type_desc): Add prototype.
21270         (build_headof): Remove prototype.
21271
21272 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
21273
21274         * pt.c (tsubst): Only look for matching decls at file scope for
21275         non-member functions.
21276
21277         * call.c (build_scoped_method_call): Handle scoped destructor
21278         calls in templates.
21279
21280         * decl.c (*_top_level): Also save previous_class_values.
21281
21282         * pt.c (tsubst_expr): Support do {} while loops.
21283         * parse.y (simple_stmt): Likewise.
21284         * tree.def: Likewise.
21285
21286         * method.c (build_overload_identifier): For a class nested in a
21287         template class, don't mangle in the template parms from our
21288         context.
21289
21290         * lex.c, cp-tree.h: Remove support for template instantiations in
21291         the pending_inlines code.
21292         * pt.c: Remove dead functions and unused arguments.
21293         (uses_template_parms): TYPENAME_TYPEs always use template parms.
21294         * parse.y: Stop passing anything to end_template_decl.
21295         * tree.c (print_lang_statistics): Only print tinst info #ifdef
21296         GATHER_STATISTICS.
21297
21298 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21299
21300         * init.c (expand_recursive_init{,_1}): Delete decls.
21301         (sort_member_init): Delete unused var INIT.
21302         (emit_base_init): Delete unused var X.
21303         (build_offset_ref): Delete unused var CNAME.
21304         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
21305         (emit_base_init): Delete unused local var BASE.  Delete extern
21306         decl of IN_CHARGE_IDENTIFIER.
21307         (build_delete): Delete unused local var VIRTUAL_SIZE.
21308
21309         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
21310         (build_delete): Fix call.
21311         * decl2.c (delete_sanity): Likewise.
21312         * cp-tree.h (build_vec_delete): Update prototype.
21313
21314         * typeck.c (common_base_type): Delete unused var TMP.
21315         (build_binary_op): Delete local var ARGS_SAVE.
21316         (build_array_ref): Delete unused var ITYPE.
21317         (c_expand_return): Delete unused var USE_TEMP.
21318
21319         * typeck.c (compexcepttypes): Delete unused arg STRICT.
21320         (comptypes): Fix calls.
21321         * decl.c (duplicate_decls): Likewise.
21322         * cp-tree.h (compexcepttypes): Delete extra arg.
21323
21324         * decl2.c (check_classfn): Delete unused second arg CNAME.
21325         * decl.c (start_decl, grokfndecl): Fix calls.
21326         * init.c (do_friend): Likewise.
21327         * cp-tree.h (check_classfn): Update prototype.
21328
21329         * cp-tree.h (signature_error, import_export_vtable,
21330         append_signature_fields, id_in_current_class, mark_used,
21331         copy_assignment_arg_p): Add decls.
21332         * decl2.c (mark_used): Delete decl.
21333
21334         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
21335
21336         * class.c (get_vtable_entry): Disable unused function.
21337         (doing_hard_virtuals): Delete unused static global var.
21338         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
21339         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
21340         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
21341         (modify_one_vtable): Delete unused var OLD_RTTI.
21342         (finish_struct_anon): Delete unused vars OFFSET and X.
21343         (finish_struct_bits): Delete unused var METHOD_VEC.
21344         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
21345         for-scope local variable METHODS.
21346
21347         * call.c (user_harshness): Delete unused/unneeded arg PARM.
21348         (ideal_candidate): Delete unused args BASETYPE and PARMS.
21349         (build_method_call): Delete unused args passed into ideal_candidate.
21350         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
21351         * cp-tree.h (synthesize_method): Add decl.
21352
21353         * decl.c (note_level_for_for): Give void return type.
21354         (pushdecl_nonclass_level): Likewise.
21355         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
21356         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
21357         (suspend_binding_level): Delete unused var LEVEL.
21358         (duplicate_decls): Delete unused var CTYPE.
21359         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
21360         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
21361         PTR_ENDLINK.
21362         (grokdeclarator): Delete unused var C.
21363         (grokdeclarator): Delete unused var SIZE_VARIES.
21364         (grokparms): Delete unused var SAW_VOID.
21365         (start_function): Delete unused var OLDDECL.
21366         (cplus_expand_expr_stmt): Delete unused var
21367         REMOVE_IMPLICIT_IMMEDIATELY.
21368
21369         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
21370
21371         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
21372
21373 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
21374
21375         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
21376         (build_min_nt): Likewise.
21377         * pt.c (do_pushlevel): Emit line note.
21378         (do_poplevel): Return what we get from poplevel.
21379         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
21380         * parse.y: Use do_pushlevel and do_poplevel.
21381         * cp-tree.h: Declare do_poplevel.
21382
21383         * cp-tree.h: Declare at_eof.
21384         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
21385         * decl2.c (import_export_decl): Renamed from import_export_inline.
21386         (finish_file): Call it to do interface handling for statics.
21387         * pt.c (tsubst_copy): Call mark_used on variables and functions
21388         used here.
21389
21390         * decl2.c (finish_file): Don't emit statics we can't generate.
21391         * pt.c (instantiate_decl): Don't set interface on instantiations
21392         we can't generate.
21393
21394         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
21395         * tree.c (print_lang_statistics): Print max template depth.
21396         * pt.c (push_tinst_level): Dump entire instantiation context.
21397         (instantiate_class_template): Use it and pop_tinst_level.
21398         (instantiate_decl): Likewise.
21399
21400         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
21401         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
21402
21403 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
21404
21405         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
21406         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
21407         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
21408         the new template implementation.
21409
21410 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21411
21412         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
21413
21414 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
21415
21416         * decl.c (cp_finish_decl): Delay emitting the debug information for
21417         a typedef that has been installed as the canonical typedef, if the
21418         type has not yet been defined.
21419
21420 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
21421
21422         * decl2.c (grokfield): Still call pop_nested_class for access decls.
21423
21424 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21425
21426         * decl.c (lookup_label): Call label_rtx.
21427
21428         * decl.c (make_binding_level): New function.
21429         (pushlevel, pushlevel_class): Call it instead of explicit
21430         duplicate calls to xmalloc.
21431
21432         * decl.c (init_decl_processing): Delete useless build_pointer_type
21433         call.
21434
21435         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
21436         (sizet_ftype_string): Delete variable.
21437         (init_decl_processing): Add built-in functions fabsf, fabsl,
21438         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
21439         variable strlen_ftype, used for strlen.
21440
21441 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
21442
21443         * decl.c (push_to_top_level): Start from current_binding_level
21444         again for now; the stl hacks depend on g++ being broken in this
21445         way, and it'll be fixed in the template rewrite.
21446
21447         * tree.def: Add USING_DECL.
21448         * decl2.c (do_class_using_decl): Implement.
21449         (grokfield): Pass access decls off to do_class_using_decl instead of
21450         grokdeclarator.
21451         * error.c (dump_decl): Handle USING_DECLs.
21452         * decl.c (grokdeclarator): Remove code for handling access decls.
21453         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
21454         as access decls for now.
21455         (finish_struct): Don't check USING_DECLs for other uses of the name.
21456
21457         * search.c (get_matching_virtual): Use cp_error_at.
21458
21459 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21460
21461         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
21462         match c-typeck.c.
21463         (self_promoting_args_p): Move the check that TYPE is non-nil
21464         before trying to look at its main variant.
21465         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
21466
21467         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
21468         Delete macros.
21469         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
21470         (do_friend): Delete call to xref_friend.
21471         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
21472
21473         * typeck.c (convert_sequence): #if 0 unused function.
21474
21475         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
21476         be in decl_in_memory_p.
21477         (decl_in_memory_p): Delete decl.
21478         * expr.c (decl_in_memory_p): Delete fn.
21479         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
21480
21481         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
21482
21483 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
21484
21485         * class.c (finish_struct_1): Check for a pure-specifier on a
21486         non-virtual function here.
21487
21488         * decl2.c (grok_function_init): Don't check whether the function
21489         is virtual here.
21490         (grokfield): Don't call check_for_override here.
21491
21492         * decl.c (push_to_top_level): Start from inner_binding_level,
21493         check class_shadowed in class levels.
21494
21495 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
21496
21497         * decl.c (resume_level): Ignore things that don't have names, instead
21498         of core dumping.
21499
21500 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21501
21502         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
21503
21504 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
21505
21506         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
21507         synthesized dtor.
21508
21509         * parse.y (complete_type_name): Bind global_scope earlier.
21510         (complex_type_name): Likewise.
21511         (qualified_type_name): Remove.
21512
21513 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
21514
21515         * decl.c (grokfndecl): Move code that looks for virtuals in base
21516         classes...
21517         * class.c (check_for_override): ... to a new function.
21518         (finish_struct_1): Call it.
21519
21520         * cp-tree.h: Declare warn_sign_compare.
21521
21522         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
21523         rather than extra_warnings to decide whether to warn about
21524         comparison of signed and unsigned.
21525
21526         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
21527         implies -Wsign-compare.  -Wall doesn't imply -W.
21528
21529 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
21530
21531         * typeck.c (build_component_ref): Fix to handle anon unions in base
21532         classes as well.
21533
21534 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21535
21536         * class.c (resolves_to_fixed_type_p): Delete code dealing with
21537         a WITH_CLEANUP_EXPR, since we don't generate them any more.
21538         * cvt.c (build_up_reference): Likewise.
21539         * decl.c (grok_reference_init): Likewise.
21540         (cp_finish_decl): Likewise.
21541         * error.c (dump_expr): Likewise.
21542         * tree.c (real_lvalue_p): Likewise.
21543         (lvalue_p): Likewise.
21544         (build_cplus_new): Likewise.
21545         (unsave_expr_now): Likewise.
21546         * typeck.c (unary_complex_lvalue, build_modify_expr,
21547         c_expand_return): Likewise.
21548
21549 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21550
21551         Make the C++ front-end pay attention to attributes for structures.
21552         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
21553         finish_struct_1.
21554         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
21555         Take out old round_up_size use and setting the DECL_ALIGN possibly
21556         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
21557         can override what the attribute set.
21558         * cp-tree.h (finish_struct): Update prototype.
21559         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
21560         attributes to finish_struct.
21561         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
21562         value down into finish_struct.
21563         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
21564
21565 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
21566
21567         * decl.c (poplevel):  Re-word dead for local handling.
21568         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
21569         (cp_finish_decl):  If is_for_scope, check for duplicates so
21570         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
21571
21572         * lex.c (do_identifier):  Use global binding in preference of
21573         dead for local variable.
21574
21575 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
21576
21577         * init.c (initializing_context): Handle anon union changes, the
21578         context where fields of anon unions can be initialized now has to be
21579         found by walking up the TYPE_CONTEXT chain.
21580
21581 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
21582
21583         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
21584         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
21585         (obscure_complex_init): If bss is supported, always set
21586         DECL_INITIAL to error_mark_node.
21587
21588 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21589
21590         * init.c (is_friend): Make sure there's a context before we see if
21591         it's an aggr type.
21592
21593 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
21594
21595         * init.c (is_friend): Classes are not friendly with nested classes.
21596
21597 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
21598
21599         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
21600         and record its result.
21601
21602 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
21603
21604         * class.c (finish_struct_anon): Switch around code to not move anon
21605         union elements around, nor mess up their contexts, nor offsets,
21606         instead we now build up the right number of COMPONENT_REFs for all
21607         the anon unions that may be present at build_component_ref time.
21608         * typeck.c (lookup_anon_field): New routine to handle field lookup
21609         on fields without names.  We find them, based upon their unique type
21610         instead.
21611         * typeck.c (build_component_ref): Allow FIELD_DECL components.
21612         Handle finding components in anonymous unions, and ensure that a
21613         COMPONENT_REF is built for each level as necessary.
21614
21615 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
21616
21617         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
21618         code that ensures that copy ctors are used if appropriate.
21619
21620 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21621
21622         * init.c (build_vec_delete): Only give an error if base isn't an
21623         error_mark_node.
21624
21625 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
21626
21627         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
21628         (yylex): If we see `new', keep slurping.
21629
21630 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
21631
21632         * class.c (finish_struct_1): Move code for handling anon unions...
21633         (finish_struct_anon): to here.  Fixup so that we do the offset
21634         calculations right, and so that the fields are physically moved to
21635         the containers's chain.
21636
21637 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21638
21639         * decl.c (grokdeclarator): Avoid trying to get an operand off an
21640         identifier node.
21641
21642 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
21643
21644         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
21645         POINTER_SIZE to agree with expr.c.
21646
21647 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
21648
21649         * search.c (lookup_field): Don't report ambiguities if protect is 0,
21650         instead return NULL_TREE.
21651
21652 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
21653
21654         * class.c (finish_struct_1): Call warn_hidden if we want warnings
21655         about overloaded virtual functions.
21656         (warn_hidden): New routine to warn of virtual functions that are
21657         hidden by other virtual functions, that are not overridden.
21658         (get_basefndecls): New routine, used by warn_hidden.
21659         (mark_overriders): New routine, used by warn_hidden.
21660         * search.c (get_matching_virtual): Remove old warning that just
21661         isn't very useful.
21662
21663 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21664
21665         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
21666
21667         * typeck.c (null_ptr_cst_p): Delete unused fn.
21668         (build_function_call_maybe): Delete unused fn.
21669
21670         * expr.c (extract_init): #if 0 the code after unconditional return 0
21671         for now.
21672
21673         Delete old cadillac code.
21674         * edsel.c: Remove file.
21675         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
21676         * Makefile.in (CXX_OBJS): Delete edsel.o.
21677         (edsel.o): Delete rule.
21678         * cp-tree.h (flag_cadillac): Delete var decl.
21679         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
21680         * decl2.c (flag_cadillac): Delete var definition.
21681         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
21682         (grokfield): Delete code depending on flag_cadillac.
21683         (finish_anon_union): Likewise.
21684         * class.c (finish_struct_1): Likewise.
21685         (pushclass): Likewise.
21686         (popclass): Likewise.
21687         (push_lang_context): Likewise.
21688         (pop_lang_context): Likewise.
21689         * decl.c (init_decl_processing): Likewise.
21690         (start_decl): Likewise.
21691         (cp_finish_decl): Likewise.
21692         (xref_tag): Likewise.
21693         (finish_enum): Likewise.
21694         (start_function): Likewise.
21695         (finish_function): Likewise.
21696         (finish_stmt): Likewise.
21697         * lex.c (lang_init): Likewise.
21698         (check_newline): Likewise.
21699
21700         * lex.c (do_pending_inlines): Delete synthesized method kludge.
21701
21702         Delete defunct, ancient garbage collection implementation.
21703         * rtti.c: New file with the RTTI stuff from gc.c.
21704         * gc.c: Removed file (moved the remaining stuff into rtti.c).
21705         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
21706         (rtti.o): New rule, replacing gc.o.
21707         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
21708         * cp-tree.h: Delete gc-related fn decls.
21709         (DECL_GC_OFFSET): Delete macro.
21710         (flag_gc): Delete extern decl.
21711         * decl.c (current_function_obstack_index): Delete var decl.
21712         (current_function_obstack_usage): Delete var decl.
21713         (start_function): Delete clearing of current_function_obstack_index
21714         and current_function_obstack_usage.
21715         (init_decl_processing): Delete code relying on -fgc.
21716         Delete call to init_gc_processing.
21717         (cp_finish_decl): Delete calls to build_static_gc_entry and
21718         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
21719         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
21720         and to expand_expr of a __gc_main call.
21721         (maybe_gc_cleanup): Delete var decl.
21722         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
21723         * decl2.c (flag_gc): Delete var decl.
21724         (lang_f_options): Delete offering of -fgc.
21725         (lang_decode_option): Delete -fgc and -fno-gc handling.
21726         (get_temp_regvar): Delete gc code.
21727         * init.c (build_new): Delete gc code.
21728         * lex.c (init_lex): Delete checking of flag_gc.
21729
21730         * typeck.c (convert_arguments): Delete gc code.
21731         (build_component_addr): Delete -fgc warning.
21732         (build_modify_expr): Delete gc code.
21733
21734         * decl2.c (build_push_scope): Delete fn.
21735         * cp-tree.h (build_push_scope): Delete decl.
21736
21737         * search.c (clear_search_slots): Delete fn.
21738         * cp-tree.h (clear_search_slots): Delete decl.
21739
21740         * search.c (tree_needs_constructor_p): Delete fn.
21741         * cp-tree.h (tree_needs_constructor_p): Delete decl.
21742
21743         * tree.c (id_cmp): Delete fn.
21744
21745         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
21746         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
21747
21748         * tree.c (decl_value_member): Delete fn.
21749         * cp-tree.h (decl_value_member): Delete decl.
21750
21751         * tree.c (list_hash_lookup_or_cons): Delete fn.
21752         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
21753
21754         * method.c (cplus_exception_name): Delete fn.
21755         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
21756
21757         * spew.c (shift_tokens): Delete fn.
21758
21759 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21760
21761         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
21762         to cp_finish_decl.
21763         * parse.y: Likewise.
21764
21765 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21766
21767         * tree.c (build_cplus_staticfn_type): Delete function definition;
21768         never used.
21769         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
21770
21771         * tree.c (virtual_member): Delete function definition; never used.
21772         * cp-tree.h (virtual_member): Delete decl.
21773
21774 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
21775
21776         * typeck.c (build_component_ref): Handle getting vbase pointers
21777         out of complex multiple inheritance better.
21778
21779 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
21780
21781         * typeck.c (build_object_ref): Make sure we use the real type, not
21782         any reference type.
21783
21784 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
21785
21786         * tree.c (build_exception_variant): Don't create new types if we
21787         don't have to, also build new types on the right obstack.
21788
21789 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
21790
21791         * decl.c (store_bindings): Split out from push_to_top_level.
21792         (push_to_top_level): Call it for b->type_shadowed on class binding
21793         levels.
21794
21795 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
21796
21797         * search.c (expand_upcast_fixups): Fix so that offsets stored in
21798         vbase_offsets are always right.  Fixes a problem where virtual base
21799         upcasting and downcasting could be wrong during conversions on this
21800         during virtual function dispatch at ctor/dtor time when dynamic
21801         vtable fixups for deltas are needed.  This only sounds easier than
21802         it is.  :-)
21803         (fixup_virtual_upcast_offsets): Change to reflect new calling
21804         convention for expand_upcast_fixups.
21805
21806 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21807
21808         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
21809         check that it's usable as the bitfield width.
21810
21811 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21812
21813         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
21814         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
21815         only ever used for functions in it.
21816
21817 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
21818
21819         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
21820         (nested_type): Likewise.
21821         (nested_name_specifier): Use lastiddecl.
21822
21823         * decl.c (grokdeclarator): Adjust accordingly.
21824         * init.c (expand_member_init): Likewise.
21825         * parse.y (base_class): Likewise.
21826         * typeck2.c (build_functional_cast): Likewise.
21827
21828         * typeck2.c (build_functional_cast): Fill in name after we've
21829         checked for non-aggr type.
21830
21831 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
21832
21833         * decl2.c (warn_pointer_arith): Default to on.
21834
21835 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
21836
21837         * lex.c (is_rid): New function.
21838         * decl.c (grokdeclarator): Diagnose reserved words used as
21839         declarator-ids.
21840
21841 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
21842
21843         * tree.c (get_decl_list): Don't lose cv-quals.
21844
21845         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
21846         typespecs used as declarator-ids.
21847
21848 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
21849
21850         * decl.c (poplevel): When poping a level, don't give a warning for
21851         any subblocks that already exist.
21852
21853 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21854
21855         * typeck.c (build_object_ref): Finish what I started.
21856
21857         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
21858
21859         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
21860
21861         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
21862         scope.
21863
21864 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
21865
21866         * decl.c (xref_tag): Handle passing a type in directly.
21867
21868         * parse.y (qualified_type_name): Pull out the type.
21869         (nested_type): Likewise.
21870         Take types directly instead of as identifiers.
21871         * call.c (build_scoped_method_call): Take types directly instead of
21872         as identifiers.
21873         * decl.c (xref_basetypes): Likewise.
21874         * init.c (expand_member_init): Likewise.
21875         (build_member_call): Likewise.
21876         (build_offset_ref): Likewise.
21877         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
21878         * method.c (do_build_assign_ref): Likewise.
21879         * decl.c (grokdeclarator): Handle a type appearing as the
21880         declarator-id for constructors.
21881         * method.c (do_build_copy_constructor): current_base_init_list now
21882         uses the types directly, not their names.
21883         * init.c (sort_base_init): Likewise.
21884         (expand_member_init): Likewise.
21885         * init.c (is_aggr_type): New function, like is_aggr_typedef.
21886
21887 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
21888
21889         * tree.c (layout_basetypes): Call build_lang_field_decl instead
21890         of build_lang_decl if first arg is a FIELD_DECL.
21891
21892 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21893
21894         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
21895         non-empty.
21896         * except.c (expand_start_catch_block): Set TREE_USED to avoid
21897         warnings about the catch handler.
21898
21899 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
21900
21901         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
21902         expand_target_expr.
21903
21904 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21905
21906         Fix access control to use trees rather than integers.
21907         * class.c (access_{default, public, protected, private,
21908         default_virtual, public_virtual, private_virtual}_node): Add
21909         definitions.
21910         (init_class_processing): Do creation of those nodes.
21911         * cp-tree.h (access_type): Delete enum decl.
21912         (access_{default, public, protected, private, default_virtual,
21913         public_virtual, private_virtual}_node): Add decls.
21914         (compute_access): Change return type.
21915         * search.c (compute_access): Have tree return type, instead of enum.
21916         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
21917         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
21918         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
21919         * parse.y (VISSPEC): Make ttype rather than itype.
21920         (base_class_access_list): Likewise.
21921         * *.[cy]: Change all refs of `access_public' to `access_public_node',
21922         etc.
21923         * call.c (build_method_call): Make ACCESS be a tree.
21924         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
21925         * cvt.c (convert_to_aggr): Likewise.
21926         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
21927         Likewise.
21928         * method.c (hack_identifier): Likewise.
21929         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
21930
21931 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
21932
21933         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
21934         frontend, and make it more consistent with respect to
21935         warn_pointer_arith.
21936
21937 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
21938
21939         * decl.c (pushdecl): Check for duplicate parameter names.
21940
21941 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
21942
21943         * decl.c (expand_static_init): Call assemble_external for atexit.
21944
21945 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
21946
21947         * except.c (do_unwind): Remove some generated dead code.
21948         (eh_outer_context): New routine, factor out some common code from
21949         expand_builtin_throw and end_eh_unwinder.  Add code to do return
21950         address masking for the PA.
21951         (expand_builtin_throw): Use eh_outer_context instead of open coding
21952         it here.
21953         (end_eh_unwinder): Likewise.
21954
21955 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
21956
21957         * except.c (expand_throw): Call assemble_external for __empty, if we
21958         use it.
21959
21960 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
21961
21962         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
21963         NORMAL_RETURN_ADDR_OFFSET.
21964         (end_eh_unwinder): Likewise.
21965
21966 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
21967
21968         * gc.c (build_dynamic_cast): Make sure we don't cast away const
21969         when dealing with references, and make sure we handle dynamic
21970         casting to a cv qualified reference.
21971
21972 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
21973
21974         * except.c (struct eh_context): New structure top hold eh context
21975         information.
21976         (push_eh_context): New routine.
21977         (pop_eh_context): Likewise.
21978         * decl.c (push_cp_function_context): Use them.
21979         (pop_cp_function_context): Likewise.
21980
21981 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
21982
21983         * decl2.c (finish_file): Also prune uninteresting functions in the
21984         inline emission loop.
21985
21986 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
21987
21988         * sig.c (build_signature_table_constructor): Mark functions
21989         in the signature as referenced.
21990
21991 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
21992
21993         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
21994         the inline emission stuff.
21995
21996 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
21997
21998         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
21999         weak symbols.
22000         * lang-options.h: Add -f{no-,}weak.
22001         * decl.c (init_decl_processing): If the target does not support weak
22002         symbols, don't use them.
22003         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
22004
22005 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
22006
22007         * init.c (expand_member_init): warning for base init after members.
22008
22009 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
22010
22011         * cvt.c (build_expr_type_conversion): Don't convert to a reference
22012         type.
22013
22014 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
22015
22016         * method.c (report_type_mismatch): Improve wording for volatile
22017         mismatches.
22018
22019 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
22020
22021         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
22022         expand_assignment, as the later doesn't handle things that have
22023         copy constructors well.  The compiler would do bitwise copying,
22024         instead of ctor calling in some cases.
22025
22026 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
22027
22028         * g++.c (my_strerror): Return "cannot access" if errno is 0.
22029         (pfatal_with_name, perror_exec): Don't assume that
22030         the returned value from my_strerror contains no '%'s.
22031         (concat): Remove.
22032         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
22033
22034 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
22035
22036         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
22037         TYPE_METHODS/TREE_CHAIN mean what they used to.
22038         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
22039         instead of TYPE_METHODS.
22040         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
22041         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
22042         * cp-tree.h (CLASSTYPE_METHODS): Lose.
22043         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
22044         TYPE_METHODS.
22045         (struct lang_decl): Lose next_method field.
22046         (DECL_NEXT_METHOD): Lose.
22047         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
22048         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
22049         anymore.
22050         (finish_struct_methods): Don't mess with the TREE_CHAINs in
22051         fn_fields.
22052
22053         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
22054         vector.
22055
22056         * call.c (build_method_call): Synthesize here even when not inlining.
22057         * typeck.c (build_function_call_real): Likewise.
22058
22059 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
22060
22061         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
22062         == DBX_DEBUG, call dbxout_start_new_source_file and
22063         dbxout_resume_previous_source_file when appropriate.
22064
22065 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
22066
22067         * except.c (start_anon_func): Push to the top level.
22068         (end_anon_func): Pop from the top level.
22069
22070 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
22071
22072         * cp-tree.h (build_cleanup): New routine to build cleanups.
22073         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
22074         call at ctor time and use atexit to run it later.
22075         * decl2.c (build_cleanup): New routine, taken from finish_file.
22076         (finish_file): Use build_cleanup instead, and don't put function
22077         local statics in global dtor list.
22078
22079 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
22080
22081         * except.c (expand_throw): Ensure that we have cleanups, if we try
22082         and expand cleanups.
22083
22084 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
22085
22086         * except.c (expand_throw): Add logic to manage dynamic cleanups for
22087         the EH object.
22088         (expand_end_catch_block): Use the magic of expand_goto, instead of
22089         emit_jump so that we get the cleanup for any catch clause parameter
22090         and the cleanup for the exception object.  Update to reflect label
22091         changes.
22092         (push_eh_cleanup): New routine to register a cleanup for an
22093         exception object.
22094         (empty_fndecl): Used to default cleanup actions to
22095         nothing.
22096         (init_exception_processing): Setup empty_fndecl.  Setup
22097         saved_cleanup.
22098         (expand_start_catch_block): Update to reflect label changes.  Call
22099         push_eh_object to register the cleanup for the EH object.
22100         (start_anon_func): New routine to start building lambda expressions
22101         from trees.
22102         (end_anon_func): New routine to end them.
22103         (struct labelNode): Change so that we can use tree labels, or rtx
22104         labels.
22105         (saved_cleanup): Object to check for dynamic cleanups for the
22106         exception handling object.
22107         (push_label_entry): Change so that we can use tree labels, or rtx
22108         labels.
22109         (pop_label_entry): Likewise.
22110         (top_label_entry): Likewise.
22111         (expand_start_all_catch): Use tree label instead of rtx label, so
22112         that we can get the magic of expand_goto.
22113         (expand_end_all_catch): Update to reflect label changes.
22114
22115         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
22116         use UNSAVE_EXPRs.
22117         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
22118         building_cleanup logic, as we now use UNSAVE_EXPRs.
22119         * cp-tree.h (unsave_expr): Declare it.
22120         * decl.c (building_cleanup): Remove.
22121         (maybe_build_cleanup): Remove building_cleanup logic, and use
22122         UNSAVE_EXPR instead.
22123
22124 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
22125
22126         * gc.c (build_t_desc): Update error message to say <typeinfo>.
22127
22128 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22129
22130         * decl.c (pushdecl): Only warn about shadowing a local variable if
22131         warn_shadow is true.
22132
22133 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
22134
22135         * typeck.c (build_binary_op_nodefault): Added warning about
22136         comparisons between different enum types with -Wall, unless
22137         -fenum-int-equiv set.
22138
22139 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
22140
22141         * class.c (finish_struct_1): Skip down to the inner type in
22142         multidimensional arrays.  Ensures ctors will be made for types that
22143         need constructing.
22144
22145 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
22146
22147         * decl.c (last_dtor_insn): New to track the last compiler generated
22148         insn in a dtor.
22149         (store_parm_decls): Set it.
22150         (finish_function): Use it to see if the dtor is empty.  Avoid doing
22151         vtable setup all the time, if we can.
22152         (struct cp_function): Add last_dtor_insn.
22153         (push_cp_function_context): Save it.
22154         (pop_cp_function_context): Restore it.
22155
22156 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
22157
22158         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
22159         warnings.
22160
22161 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
22162
22163         * typeck.c (expand_target_expr): Make sure targets get put into the
22164         current temp_slot_level, so that the free_temp_slots call will reuse
22165         them.
22166
22167 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
22168
22169         * class.c (finish_struct_1): Delay delta fixups for virtual bases
22170         until after we have done the hard virtuals, to avoid a bogus `every
22171         virtual function must have a unique final overrider' for virtual
22172         functions that are only overridden by hard virtuals.
22173
22174 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
22175
22176         * pt.c (do_function_instantiation): Don't try to find a file-scope
22177         template for a member function.
22178
22179 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
22180
22181         * g++.c (main): Add handling of -nodefaultlibs.
22182
22183 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
22184
22185         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
22186         distinguish between direct bindings of reference variables, and
22187         indirect bindings of reference variables.
22188         * cvt.c (build_up_reference): Use it.
22189         * typeck.c (convert_arguments): Use it to indicate this is an
22190         indirect binding.
22191         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
22192         as they are unused.
22193         (expand_static_init): Likewise.
22194         (cplus_expand_expr_stmt): Likewise.
22195         * decl2.c (finish_file): Likewise.
22196         * init.c (perform_member_init): Likewise.
22197         (emit_base_init): Likewise.
22198         (expand_aggr_vbase_init_1): Likewise.
22199
22200 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22201
22202         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
22203         get a DECL_LANG_SPECIFIC node.
22204         * cp-tree.h (lang_decl_flags): Add new member `level'.
22205         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
22206         decl_flags level member.
22207
22208 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22209
22210         * call.c (build_method_call): Make sure instance has a
22211         TYPE_LANG_SPECIFIC node before we dive into it.
22212
22213 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
22214
22215         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
22216
22217 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
22218
22219         * decl.c (duplicate_decls): When smashing decls, smash staticness in
22220         the usual way.
22221
22222 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
22223
22224         * decl.c (poplevel): Handle the merging of subblocks of cleanups
22225         when finishing blocks that have already been created (usually due to
22226         the fixup goto code).  Fixes bad debugging information.
22227
22228 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
22229
22230         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
22231         that's not a list of overloaded functions.
22232
22233 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22234
22235         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
22236         before trying to use DECL_ABSTRACT_VIRTUAL_P.
22237
22238 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
22239
22240         * decl2.c (mark_used): New function for hooking into setting of
22241         TREE_USED on decls.
22242         * call.c (build_method_call): Use it.
22243         * class.c (instantiate_type): Likewise.
22244         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
22245         for all like-named functions.
22246         * method.c (hack_identifier): Likewise.
22247         (emit_thunk): Don't call assemble_external.
22248         (make_thunk): Create thunk as a FUNCTION_DECL so that it
22249         gets the right mode and ENCODE_SECTION_INFO works.
22250
22251         * parse.y: Use mark_used.  Pass operator names to do_identifier.
22252         * lex.c (do_identifier): Handle operator names.
22253
22254         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
22255
22256 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22257
22258         * errfn.c: Include stdio.h.
22259         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
22260
22261 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
22262
22263         * typeck2.c (digest_init): Always convert initializers to the
22264         right type.
22265
22266 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
22267
22268         * init.c (member_init_ok_or_else): Don't allow member initializers
22269         for indirect members, as it is invalid.
22270
22271 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22272
22273         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
22274
22275 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
22276
22277         * parse.y (for.init.statement): Catch compound statements inside for
22278         initializations, if we're being pedantic.
22279
22280 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
22281
22282         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
22283         looking for.
22284
22285 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
22286
22287         * error.c (dump_expr): Don't core dump when a boolean expression is
22288         used as a default argument.
22289
22290 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
22291
22292         * class.c (finish_struct_bits): Check aggregate_value_p instead of
22293         RETURN_IN_MEMORY.
22294
22295 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
22296
22297         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
22298         BLKmode type that would otherwise be returned in registers.
22299
22300 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22301
22302         * g++.c (WITHLIBC): New macro.
22303         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
22304         saw_libc and pass it at the end if it was set.
22305
22306 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22307
22308         * parse.y (fn.def1): Call split_specs_attrs in
22309         declmods notype_declarator case.